heartbeads 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/required-server-files.json +1 -1
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/api/docs/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/docs.html +2 -2
  22. package/.next/server/app/api/docs.rsc +2 -2
  23. package/.next/server/app/api/docs.segments/_full.segment.rsc +2 -2
  24. package/.next/server/app/api/docs.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/api/docs.segments/_index.segment.rsc +2 -2
  26. package/.next/server/app/api/docs.segments/_tree.segment.rsc +2 -2
  27. package/.next/server/app/api/docs.segments/api/docs/__PAGE__.segment.rsc +1 -1
  28. package/.next/server/app/api/docs.segments/api/docs.segment.rsc +1 -1
  29. package/.next/server/app/api/docs.segments/api.segment.rsc +1 -1
  30. package/.next/server/app/index.html +1 -1
  31. package/.next/server/app/index.rsc +3 -3
  32. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  33. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  34. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  35. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  36. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  37. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/login.html +1 -1
  39. package/.next/server/app/login.rsc +2 -2
  40. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  41. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  43. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  44. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  45. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  46. package/.next/server/app/page_client-reference-manifest.js +1 -1
  47. package/.next/server/chunks/ssr/[root-of-the-server]__04e6e565._.js +3 -3
  48. package/.next/server/chunks/ssr/[root-of-the-server]__04e6e565._.js.map +1 -1
  49. package/.next/server/middleware/middleware-manifest.json +1 -1
  50. package/.next/server/middleware-manifest.json +1 -1
  51. package/.next/server/pages/404.html +1 -1
  52. package/.next/server/pages/500.html +2 -2
  53. package/.next/static/chunks/{7e4fcecd4ca504d5.js → 2394a2e7d0fff196.js} +3 -3
  54. package/.next/static/chunks/295ab055d1c2269f.css +1 -0
  55. package/app/page.tsx +163 -0
  56. package/components/AllCommentsPanel.tsx +177 -128
  57. package/components/BeadsGraph.tsx +8 -2
  58. package/components/DescriptionModal.tsx +51 -0
  59. package/components/ProfilePanel.tsx +107 -86
  60. package/package.json +1 -1
  61. package/.next/static/chunks/5d4996401af7e2d1.css +0 -1
  62. /package/.next/static/{zq8Ew2hci2YIJ61-i832n → 9kusRFLCVoWHASQ-qfwqV}/_buildManifest.js +0 -0
  63. /package/.next/static/{zq8Ew2hci2YIJ61-i832n → 9kusRFLCVoWHASQ-qfwqV}/_clientMiddlewareManifest.json +0 -0
  64. /package/.next/static/{zq8Ew2hci2YIJ61-i832n → 9kusRFLCVoWHASQ-qfwqV}/_ssgManifest.js +0 -0
@@ -1,8 +1,8 @@
1
- module.exports=[6103,(a,b,c)=>{"use strict";var d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,f=/^\s*/,g=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,j=/^[;\s]*/,k=/^\s+|\s+$/g;function l(a){return a?a.replace(k,""):""}b.exports=function(a,b){if("string"!=typeof a)throw TypeError("First argument must be a string");if(!a)return[];b=b||{};var c=1,k=1;function m(a){var b=a.match(e);b&&(c+=b.length);var d=a.lastIndexOf("\n");k=~d?a.length-d:k+a.length}function n(){var a={line:c,column:k};return function(b){return b.position=new o(a),q(f),b}}function o(a){this.start=a,this.end={line:c,column:k},this.source=b.source}function p(d){var e=Error(b.source+":"+c+":"+k+": "+d);if(e.reason=d,e.filename=b.source,e.line=c,e.column=k,e.source=a,b.silent);else throw e}function q(b){var c=b.exec(a);if(c){var d=c[0];return m(d),a=a.slice(d.length),c}}function r(a){var b;for(a=a||[];b=s();)!1!==b&&a.push(b);return a}function s(){var b=n();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var c=2;""!=a.charAt(c)&&("*"!=a.charAt(c)||"/"!=a.charAt(c+1));)++c;if(c+=2,""===a.charAt(c-1))return p("End of comment missing");var d=a.slice(2,c-2);return k+=2,m(d),a=a.slice(c),k+=2,b({type:"comment",comment:d})}}o.prototype.content=a,q(f);var t,u=[];for(r(u);t=function(){var a=n(),b=q(g);if(b){if(s(),!q(h))return p("property missing ':'");var c=q(i),e=a({type:"declaration",property:l(b[0].replace(d,"")),value:c?l(c[0].replace(d,"")):""});return q(j),e}}();)!1!==t&&(u.push(t),r(u));return u}},66510,(a,b,c)=>{"use strict";var d=a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a,b){let c=null;if(!a||"string"!=typeof a)return c;let d=(0,e.default)(a),f="function"==typeof b;return d.forEach(a=>{if("declaration"!==a.type)return;let{property:d,value:e}=a;f?b(d,e,a):e&&((c=c||{})[d]=e)}),c};let e=d(a.r(6103))},98257,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.camelCase=void 0;var d=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,f=/^[^-]+$/,g=/^-(webkit|moz|ms|o|khtml)-/,h=/^-(ms)-/,i=function(a,b){return b.toUpperCase()},j=function(a,b){return"".concat(b,"-")};c.camelCase=function(a,b){var c;return(void 0===b&&(b={}),!(c=a)||f.test(c)||d.test(c))?a:(a=a.toLowerCase(),(a=b.reactCompat?a.replace(h,j):a.replace(g,j)).replace(e,i))}},30841,(a,b,c)=>{"use strict";var d=(a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}})(a.r(66510)),e=a.r(98257);function f(a,b){var c={};return a&&"string"==typeof a&&(0,d.default)(a,function(a,d){a&&d&&(c[(0,e.camelCase)(a,b)]=d)}),c}f.default=f,b.exports=f},83230,(a,b,c)=>{"use strict";var d=Object.prototype.hasOwnProperty,e=Object.prototype.toString,f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,h=function(a){return"function"==typeof Array.isArray?Array.isArray(a):"[object Array]"===e.call(a)},i=function(a){if(!a||"[object Object]"!==e.call(a))return!1;var b,c=d.call(a,"constructor"),f=a.constructor&&a.constructor.prototype&&d.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!f)return!1;for(b in a);return void 0===b||d.call(a,b)},j=function(a,b){f&&"__proto__"===b.name?f(a,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):a[b.name]=b.newValue},k=function(a,b){if("__proto__"===b){if(!d.call(a,b))return;else if(g)return g(a,b).value}return a[b]};b.exports=function a(){var b,c,d,e,f,g,l=arguments[0],m=1,n=arguments.length,o=!1;for("boolean"==typeof l&&(o=l,l=arguments[1]||{},m=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});m<n;++m)if(b=arguments[m],null!=b)for(c in b)d=k(l,c),l!==(e=k(b,c))&&(o&&e&&(i(e)||(f=h(e)))?(f?(f=!1,g=d&&h(d)?d:[]):g=d&&i(d)?d:{},j(l,{name:c,newValue:a(o,g,e)})):void 0!==e&&j(l,{name:c,newValue:e}));return l}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},60350,a=>{"use strict";var b=a.i(3137),c=a.i(71459);let d={status:"Status",priority:"Priority",type:"Type",owner:"Owner",assignee:"Assignee",prefix:"Prefix"},e={open:"#10b981",in_progress:"#f59e0b",blocked:"#ef4444",deferred:"#8b5cf6",closed:"#a1a1aa"},f={open:"Open",in_progress:"In Progress",blocked:"Blocked",deferred:"Deferred",closed:"Closed"},g={0:"P0 - Critical",1:"P1 - High",2:"P2 - Medium",3:"P3 - Low",4:"P4 - Backlog"},h={0:"#ef4444",1:"#f97316",2:"#3b82f6",3:"#a1a1aa",4:"#d4d4d8"},i=["#d20f39","#179299","#fe640b","#1e66f5","#40a02b","#8839ef","#df8e1d","#209fb5","#ea76cb","#04a5e5","#e64553","#7287fd","#dd7878","#dc8a78","#862d2d","#bf4040","#d27979","#931f1f","#d22d2d","#e06c6c","#a11212","#e61919","#ed5e5e","#86592d","#bf8040","#d2a679","#93591f","#d2802d","#e0a66c","#a15912","#e68019","#eda65e","#86862d","#bfbf40","#d2d279","#93931f","#d2d22d","#e0e06c","#a1a112","#e6e619","#eded5e","#59862d","#80bf40","#a6d279","#59931f","#80d22d","#a6e06c","#59a112","#80e619","#a6ed5e","#2d862d","#40bf40","#79d279","#1f931f","#2dd22d","#6ce06c","#12a112","#19e619","#5eed5e","#2d8659","#40bf80","#79d2a6","#1f9359","#2dd280","#6ce0a6","#12a159","#19e680","#5eeda6","#2d8686","#40bfbf","#79d2d2","#1f9393","#2dd2d2","#6ce0e0","#12a1a1","#19e6e6","#5eeded","#2d5986","#4080bf","#79a6d2","#1f5993","#2d80d2","#6ca6e0","#1259a1","#1980e6"],j={bug:"🐛",feature:"✨",task:"📝",epic:"🎯",chore:"🔧"},k={epic:"#8839ef",task:"#1e66f5",bug:"#d20f39",feature:"#40a02b",chore:"#acb0be"},l={epic:"Epic",task:"Task",bug:"Bug",feature:"Feature",chore:"Chore"};function m(a){return a.split(/[-_]/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function n(a){if(!a)return"#acb0be";let b=0x811c9dc5;for(let c=0;c<a.length;c++)b^=a.charCodeAt(c),b=0x1000193*b>>>0;return i[b%i.length]}let o=new Proxy({},{get:(a,b)=>m(b),has:()=>!0}),p=new Proxy({},{get:(a,b)=>(function(a){let b=0x811c9dc5;for(let c=0;c<a.length;c++)b^=a.charCodeAt(c),b=0x1000193*b>>>0;let c=b%360;return`hsl(${c}, 65%, 55%)`})(b),has:()=>!0});function q(a){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;return`${b}->${c}:${a.type}`}function r(a,b){if(!a)return{addedNodeIds:new Set(b.graphData.nodes.map(a=>a.id)),removedNodeIds:new Set,changedNodes:new Map,addedLinkKeys:new Set(b.graphData.links.map(q)),removedLinkKeys:new Set,hasChanges:!0};let c=new Map(a.graphData.nodes.map(a=>[a.id,a])),d=new Map(b.graphData.nodes.map(a=>[a.id,a])),e=new Set,f=new Set,g=new Map;for(let[a,b]of d)if(c.has(a)){let d=c.get(a),e=[];d.status!==b.status&&e.push({field:"status",from:d.status,to:b.status}),d.priority!==b.priority&&e.push({field:"priority",from:String(d.priority),to:String(b.priority)}),d.title!==b.title&&e.push({field:"title",from:d.title,to:b.title}),(d.owner||"")!==(b.owner||"")&&e.push({field:"owner",from:d.owner||"",to:b.owner||""}),(d.assignee||"")!==(b.assignee||"")&&e.push({field:"assignee",from:d.assignee||"",to:b.assignee||""}),e.length>0&&g.set(a,e)}else e.add(a);for(let a of c.keys())d.has(a)||f.add(a);let h=new Set(a.graphData.links.map(q)),i=new Set(b.graphData.links.map(q)),j=new Set,k=new Set;for(let a of i)h.has(a)||j.add(a);for(let a of h)i.has(a)||k.add(a);let l=e.size>0||f.size>0||g.size>0||j.size>0||k.size>0;return{addedNodeIds:e,removedNodeIds:f,changedNodes:g,addedLinkKeys:j,removedLinkKeys:k,hasChanges:l}}var s=a.i(77369);function t(a){return function(){return a}}function u(a){return(a()-.5)*1e-6}function v(a){return a.x+a.vx}function w(a){return a.y+a.vy}function x(a){var b,c,d,e=1,f=1;function g(){for(var a,g,i,j,k,l,m,n=b.length,o=0;o<f;++o)for(a=0,g=(0,s.quadtree)(b,v,w).visitAfter(h);a<n;++a)m=(l=c[(i=b[a]).index])*l,j=i.x+i.vx,k=i.y+i.vy,g.visit(p);function p(a,b,c,f,g){var h=a.data,n=a.r,o=l+n;if(h){if(h.index>i.index){var p=j-h.x-h.vx,q=k-h.y-h.vy,r=p*p+q*q;r<o*o&&(0===p&&(r+=(p=u(d))*p),0===q&&(r+=(q=u(d))*q),r=(o-(r=Math.sqrt(r)))/r*e,i.vx+=(p*=r)*(o=(n*=n)/(m+n)),i.vy+=(q*=r)*o,h.vx-=p*(o=1-o),h.vy-=q*o)}return}return b>j+o||f<j-o||c>k+o||g<k-o}}function h(a){if(a.data)return a.r=c[a.data.index];for(var b=a.r=0;b<4;++b)a[b]&&a[b].r>a.r&&(a.r=a[b].r)}function i(){if(b){var d,e,f=b.length;for(d=0,c=Array(f);d<f;++d)c[(e=b[d]).index]=+a(e,d,b)}}return"function"!=typeof a&&(a=t(null==a?1:+a)),g.initialize=function(a,c){b=a,d=c,i()},g.iterations=function(a){return arguments.length?(f=+a,g):f},g.strength=function(a){return arguments.length?(e=+a,g):e},g.radius=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),i(),g):a},g}let y=null;function z(a){let b=a.blockerCount+a.dependentCount;return"epic"===a.issueType&&(b+=3),5+17*Math.min(b/6,1)}let A="status";function B(a){switch(A){case"priority":return h[a.priority]||h[2];case"type":return k[a.issueType]||k.task;case"owner":return n(a.createdBy);case"assignee":return n(a.assignee);case"prefix":return n(a.prefix);default:return e[a.status]||e.open}}function C(a){return 1-(1-a)*(1-a)}let D=new Map;function E(a,b){let c=D.get(a);if("loading"===c||"failed"===c)return null;if(c)return c;D.set(a,"loading");let d=new Image;return d.onload=()=>{D.set(a,d),b()},d.onerror=()=>{D.set(a,"failed")},d.src=a,null}function F(a,b,c,d,e,f,g){a.beginPath(),a.arc(b,c,d,0,2*Math.PI),a.fillStyle=g?"#3f3f46":"#e4e4e7",a.fill();let h=e.replace("@","").charAt(0).toUpperCase(),i=Math.min(7,Math.max(3,1.3*d));a.font=`600 ${i}px 'Inter', system-ui, sans-serif`,a.textAlign="center",a.textBaseline="middle",a.fillStyle="#71717a",a.fillText(h,b,c+.3)}function G(a,b){let c=new Set([a]),d=[{id:a,depth:0}];for(;d.length>0;){let{id:a,depth:e}=d.shift();if(!(e>=2))for(let f of b){let b="object"==typeof f.source?f.source.id:f.source,g="object"==typeof f.target?f.target.id:f.target;b!==a||c.has(g)||(c.add(g),d.push({id:g,depth:e+1})),g!==a||c.has(b)||(c.add(b),d.push({id:b,depth:e+1}))}}return c}function H(a){let b=a.current;if(!b)return;let c=b.zoom();"number"!=typeof c||isNaN(c)||(b.zoom(1.000001*c,0),requestAnimationFrame(()=>{a.current&&a.current.zoom(c,0)}))}let I=()=>"replace",J=()=>"#10b981",K=(0,c.forwardRef)(function({nodes:i,links:j,selectedNode:o,selectedNodeIds:p,onSelectedNodeIdsChange:q,onNodeClick:r,onNodeHover:s,onBackgroundClick:u,onNodeRightClick:v,commentedNodeIds:w,claimedNodeAvatars:D,assigneeNodeAvatars:K,onAvatarHover:L,onAvatarClick:N,timelineActive:O,stats:P,sidebarOpen:Q,collapsedEpicIds:R,onCollapseAll:S,onExpandAll:T,colorMode:U="status",onColorModeChange:V,autoFit:W=!0,onAutoFitToggle:X,pulseNodeId:Y,showPulse:Z=!0,onShowPulseToggle:$,showParticles:_=!0,onShowParticlesToggle:aa,focusedEpicId:ab,onExitFocusedEpic:ac,isMobile:ad,onNodeDoubleTap:ae,activeLegendFilters:af,onToggleLegendFilter:ag,onClearLegendFilters:ah,theme:ai},aj){let ak=(0,c.useRef)(null),al=(0,c.useRef)(null),am=(0,c.useRef)(null),an=(0,c.useRef)(0),ao=(0,c.useRef)(()=>{}),[ap,aq]=(0,c.useState)({width:800,height:600}),ar=(0,c.useRef)(!1),as=(0,c.useRef)(new Set),at=(0,c.useRef)(null),au=(0,c.useRef)(ai),[av,aw]=(0,c.useState)(null),ax=(0,c.useRef)(null),ay=(0,c.useRef)(null),az=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{az.current&&clearTimeout(az.current)},[]);let[aA,aB]=(0,c.useState)({w:160,h:120}),aC=aA.w,aD=aA.h,aE=(0,c.useRef)(null),[aF,aG]=(0,c.useState)(y);(0,c.useEffect)(()=>{y||a.A(21671).then(a=>{y=a.default||a,aG(()=>y)})},[]);let[aH,aI]=(0,c.useState)("dag"),[aJ,aK]=(0,c.useState)(!0),aL=(0,c.useRef)(o),aM=(0,c.useRef)(null),aN=(0,c.useRef)(new Set),aO=(0,c.useRef)(w||new Map),aP=(0,c.useRef)(D||new Map),aQ=(0,c.useRef)(K||new Map),aR=(0,c.useRef)(U),aS=(0,c.useRef)(Y||null),aT=(0,c.useRef)(Z),aU=(0,c.useRef)(()=>{});aU.current=()=>H(ak);let aV=(0,c.useRef)(L);aV.current=L;let aW=(0,c.useRef)(N);(0,c.useEffect)(()=>{aW.current=N},[N]);let aX=(0,c.useRef)(q);(0,c.useEffect)(()=>{aX.current=q},[q]);let aY=(0,c.useRef)(null),aZ=(0,c.useRef)(0),a$=(0,c.useRef)({x:0,y:0}),a_=(0,c.useRef)(i),a0=(0,c.useRef)(null),a1=(0,c.useRef)(null),a2=(0,c.useRef)([]),{viewNodes:a3,viewLinks:a4,preFilterNodes:a5}=(0,c.useMemo)(()=>{let a=i,b=j;if(ab){let c=new Map;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;"parent-child"===a.type&&c.set(d,b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(!c.has(b.id)&&b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.set(b.id,a)}let e=new Set;for(let[a,b]of(e.add(ab),c))b===ab&&e.add(a);for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;"parent-child"!==a.type&&(e.has(b)&&d.has(c)&&e.add(c),e.has(c)&&d.has(b)&&e.add(b))}a=a.filter(a=>e.has(a.id)),b=b.filter(a=>{let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;return e.has(b)&&e.has(c)})}if(R&&R.size>0){let c=new Map;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;"parent-child"===a.type&&c.set(d,b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(!c.has(b.id)&&b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.set(b.id,a)}let e=new Set;for(let[a,b]of c)R.has(b)&&e.add(a);if(e.size>0){let d=new Map;for(let a of e)d.set(a,c.get(a));let f=new Map,g=new Map,h=new Map;for(let[b,c]of d){f.set(c,(f.get(c)||0)+1);let d=a.find(a=>a.id===b);d&&(g.set(c,(g.get(c)||0)+d.blockerCount),h.set(c,(h.get(c)||0)+d.dependentCount))}let i=a.filter(a=>!e.has(a.id)).map(a=>({...a,blockerCount:a.blockerCount+(g.get(a.id)||0),dependentCount:a.dependentCount+(h.get(a.id)||0),collapsedCount:f.get(a.id)||0})),j=[],k=new Set;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;if("parent-child"===a.type&&e.has(c)||(b=d.get(b)||b)===(c=d.get(c)||c))continue;let f=`${b}->${c}:${a.type}`;k.has(f)||(k.add(f),j.push({source:b,target:c,type:a.type}))}a=i,b=j}}let c=[...a];if(af&&af.size>0){let c=new Set(a.filter(a=>{switch(U){case"status":return af.has(a.status);case"priority":return af.has(String(a.priority));case"type":return af.has(a.issueType);case"owner":return af.has(a.createdBy||"Unassigned");case"assignee":return af.has(a.assignee||"Unassigned");case"prefix":return af.has(m(a.prefix));default:return!0}}).map(a=>a.id));a=a.filter(a=>c.has(a.id)),b=b.filter(a=>{let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;return c.has(b)&&c.has(d)})}return{viewNodes:a,viewLinks:b,preFilterNodes:c}},[i,j,R,ab,af,U]);a_.current=a3;let a6=(0,c.useMemo)(()=>P&&af&&0!==af.size?{total:a3.length,edges:a4.length,prefixes:[...new Set(a3.map(a=>a.prefix))]}:P,[P,af,a3,a4]);(0,c.useEffect)(()=>{let a=new Map;for(let b of j){let c="object"==typeof b.source?b.source.id:b.source,d="object"==typeof b.target?b.target.id:b.target;"parent-child"===b.type&&a.set(d,c)}let b=new Set(i.map(a=>a.id));for(let c of i)if(!a.has(c.id)&&c.id.includes(".")){let d=c.id.split(".")[0];b.has(d)&&a.set(c.id,d)}let c=new Map;for(let[b,d]of a){let a=c.get(d)||[];a.push(b),c.set(d,a)}let d=new Map(i.map(a=>[a.id,a])),e=[];for(let[a,b]of c){let c=d.get(a);c&&e.push({parentId:a,title:c.title||a,prefix:c.prefix,memberIds:[a,...b]})}a2.current=e},[i,j]);let a7=(0,c.useMemo)(()=>{if("status"===U||"priority"===U||"type"===U)return[];let a=new Map;for(let b of a5)switch(U){case"owner":{let c=b.createdBy||void 0;a.set(c||"Unassigned",n(c));break}case"assignee":{let c=b.assignee||void 0;a.set(c||"Unassigned",n(c));break}case"prefix":a.set(m(b.prefix),n(b.prefix))}return Array.from(a.entries()).sort(([a],[b])=>"Unassigned"===a?1:"Unassigned"===b?-1:a.localeCompare(b)).map(([a,b])=>({label:a,color:b}))},[U,a5]),a8=(0,c.useRef)(a4);(0,c.useEffect)(()=>{a8.current=a4},[a4]),(0,c.useEffect)(()=>{aL.current=o;let a=aM.current||o;a?aN.current=G(a.id,a4):aN.current=new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},[o,a4]),(0,c.useEffect)(()=>{as.current=p||new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},[p]),(0,c.useEffect)(()=>{aO.current=w||new Map,H(ak)},[w]),(0,c.useEffect)(()=>{aP.current=D||new Map,H(ak)},[D]),(0,c.useEffect)(()=>{aQ.current=K||new Map,H(ak)},[K]),(0,c.useEffect)(()=>{aR.current=U,A=U,H(ak),an.current=requestAnimationFrame(()=>ao.current())},[U]),(0,c.useEffect)(()=>{aS.current=Y||null,aT.current=Z,H(ak)},[Y,Z]),(0,c.useEffect)(()=>{au.current=ai,H(ak),an.current=requestAnimationFrame(()=>ao.current())},[ai]),(0,c.useEffect)(()=>{ax.current=av},[av]),(0,c.useEffect)(()=>{if(!av)return;let a=a=>{let b=ax.current;if(!b)return;let c=a.clientX-b.startX,d=a.clientY-b.startY,e=b.active||Math.abs(c)>5||Math.abs(d)>5;aw(b=>b?{...b,currentX:a.clientX,currentY:a.clientY,active:e}:null)},b=a=>{let b=ax.current;if(!b)return void aw(null);if(b.active){let c=ak.current;if(c){let d=al.current?.getBoundingClientRect();if(d){let e=c.screen2GraphCoords(Math.min(b.startX,a.clientX)-d.left,Math.min(b.startY,a.clientY)-d.top),f=c.screen2GraphCoords(Math.max(b.startX,a.clientX)-d.left,Math.max(b.startY,a.clientY)-d.top),g=new Set;for(let a of a_.current)null!=a.x&&null!=a.y&&a.x>=e.x&&a.x<=f.x&&a.y>=e.y&&a.y<=f.y&&g.add(a.id);g.size>0&&aX.current?.(g)}}}aw(null)};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",b),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",b)}},[!!av]),(0,c.useEffect)(()=>{let a=al.current;if(!a)return;let b=b=>{let c;a$.current={x:b.clientX,y:b.clientY};let d=ak.current,e=aV.current;if(!d||!e)return;let f=aP.current;if(0===f.size&&0===aQ.current.size){aY.current&&(aY.current=null,e(null));return}let g=a.getBoundingClientRect(),h=b.clientX-g.left,i=b.clientY-g.top;try{c=d.screen2GraphCoords(h,i)}catch{return}let j=Math.max(4,10/(d.zoom()||1));for(let d of a_.current){if(null==d.x||null==d.y)continue;let g=f.get(d.id);if(!g)continue;let h=z(d),i=d.x+.7*h,k=d.y+.7*h,l=c.x-i,m=c.y-k;if(l*l+m*m<=j*j){aY.current!==d.id&&(aY.current=d.id,e({handle:g.handle,avatar:g.avatar,claimedAt:g.claimedAt,did:g.did,x:b.clientX,y:b.clientY,nodeId:d.id,nodeClosed:"closed"===d.status})),a.style.cursor="pointer";return}}let k=aQ.current;if(k.size>0)for(let d of a_.current){if(null==d.x||null==d.y||f.get(d.id))continue;let g=k.get(d.id);if(!g)continue;let h=z(d),i=d.x+.7*h,l=d.y+.7*h,m=c.x-i,n=c.y-l;if(m*m+n*n<=j*j){aY.current!==d.id&&(aY.current=d.id,e({handle:g.handle,avatar:g.avatar,claimedAt:g.updatedAt,did:void 0,x:b.clientX,y:b.clientY,isAssignee:!0,nodeId:d.id,nodeClosed:"closed"===d.status})),a.style.cursor="pointer";return}}aY.current&&(aY.current=null,e(null)),a.style.cursor=""},c=b=>{let c=ak.current,d=aW.current;if(!c||!d)return;let e=aP.current,f=aQ.current;if((!e||0===e.size)&&(!f||0===f.size))return;let g=a.getBoundingClientRect(),h=b.clientX-g.left,i=b.clientY-g.top,{x:j,y:k}=c.screen2GraphCoords(h,i),l=Math.max(4,10/(c.zoom()||1));if(e)for(let a of a_.current){if(null==a.x||null==a.y)continue;let c=e.get(a.id);if(!c)continue;let f=z(a),g=a.x+.7*f,h=a.y+.7*f,i=j-g,m=k-h;if(i*i+m*m<=l*l){b.stopPropagation(),aZ.current=Date.now(),d({handle:c.handle,avatar:c.avatar,did:c.did,nodeId:a.id});return}}if(f)for(let a of a_.current){if(null==a.x||null==a.y||e?.has(a.id))continue;let c=f.get(a.id);if(!c)continue;let g=z(a),h=a.x+.7*g,i=a.y+.7*g,m=j-h,n=k-i;if(m*m+n*n<=l*l){b.stopPropagation(),aZ.current=Date.now(),d({handle:c.handle,avatar:c.avatar,did:void 0,nodeId:a.id,isAssignee:!0});return}}};return a.addEventListener("mousemove",b),a.addEventListener("click",c),()=>{a.removeEventListener("mousemove",b),a.removeEventListener("click",c)}},[]),(0,c.useEffect)(()=>{let a=()=>{if(al.current){let a=al.current.getBoundingClientRect();aq({width:a.width,height:a.height})}};return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&as.current.size>0&&aX.current?.(new Set)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let a9=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a3.find(b=>b.id===a.id);c&&void 0!==c.x&&void 0!==c.y&&(b.centerAt(c.x,c.y,500),b.zoom(2.5,500),r(a))},[r,a3]),ba=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a3.find(b=>b.id===a);c&&void 0!==c.x&&void 0!==c.y&&(b.centerAt(c.x,c.y,500),b.zoom(2.5,500))},[a3]);(0,c.useImperativeHandle)(aj,()=>({focusNode:a9,zoomToNode:ba}),[a9,ba]);let bb=(0,c.useCallback)(a=>{let b=a||null;aM.current=b;let c=b||aL.current;c?aN.current=G(c.id,a8.current):aN.current=new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current()),s(b,a$.current.x,a$.current.y)},[s]),bc=(0,c.useCallback)((a,b)=>{b.preventDefault(),v?.(a,b)},[v]);(0,c.useEffect)(()=>{let a,b=ak.current;if(!b||0===a3.length)return;let c=()=>{b.d3Force("radial",null),b.d3Force("x",null),b.d3Force("y",null)},d=()=>{a3.forEach(a=>{delete a.fx,delete a.fy})};if("dag"===aH)c(),b.d3Force("charge")?.strength(-250).distanceMax(500),b.d3Force("link")?.distance(120).strength(.3),b.d3Force("center")?.strength(.015),b.d3Force("collision",x().radius(a=>z(a)+8).strength(.8));else if("radial"===aH){c(),d();let a=new Map;for(let b of a4){if("parent-child"===b.type)continue;let c="object"==typeof b.target?b.target.id:b.target,d="object"==typeof b.source?b.source.id:b.source;a.has(c)||a.set(c,[]),a.get(c).push(d)}let e=new Map,f=[];a3.forEach(b=>{a.has(b.id)||(e.set(b.id,0),f.push(b.id))});let g=0;for(;g<f.length;){let a=f[g++],b=e.get(a);for(let c of a4){if("parent-child"===c.type)continue;let d="object"==typeof c.source?c.source.id:c.source,g="object"==typeof c.target?c.target.id:c.target;d!==a||e.has(g)||(e.set(g,b+1),f.push(g))}}a3.forEach(a=>{a._depth=e.get(a.id)??0}),Array.from(e.values());let h=Math.max(200,4*a3.length);b.d3Force("charge")?.strength(-300).distanceMax(800),b.d3Force("link")?.distance(150).strength(.15),b.d3Force("center")?.strength(0),b.d3Force("radial",(function(a,b,c){var d,e,f,g=t(.1);function h(a){for(var g=0,h=d.length;g<h;++g){var i=d[g],j=i.x-b||1e-6,k=i.y-c||1e-6,l=Math.sqrt(j*j+k*k),m=(f[g]-l)*e[g]*a/l;i.vx+=j*m,i.vy+=k*m}}function i(){if(d){var b,c=d.length;for(b=0,e=Array(c),f=Array(c);b<c;++b)f[b]=+a(d[b],b,d),e[b]=isNaN(f[b])?0:+g(d[b],b,d)}}return"function"!=typeof a&&(a=t(+a)),null==b&&(b=0),null==c&&(c=0),h.initialize=function(a){d=a,i()},h.strength=function(a){return arguments.length?(g="function"==typeof a?a:t(+a),i(),h):g},h.radius=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),i(),h):a},h.x=function(a){return arguments.length?(b=+a,h):b},h.y=function(a){return arguments.length?(c=+a,h):c},h})(a=>(a._depth||0)*h,0,0).strength(.8)),b.d3Force("x",null),b.d3Force("y",null),b.d3Force("collision",x().radius(a=>z(a)+10).strength(.9))}else if("cluster"===aH){c(),d();let a=[...new Set(a3.map(a=>a.prefix))],e=Math.max(400,5*a3.length,150*a.length),f=new Map;a.forEach((b,c)=>{let d=2*Math.PI*c/a.length-Math.PI/2;f.set(b,{x:Math.cos(d)*e,y:Math.sin(d)*e})}),b.d3Force("charge")?.strength(-200).distanceMax(600),b.d3Force("link")?.distance(100).strength(.15),b.d3Force("center")?.strength(0),b.d3Force("x",(function(a){var b,c,d,e=t(.1);function f(a){for(var e,f=0,g=b.length;f<g;++f)e=b[f],e.vx+=(d[f]-e.x)*c[f]*a}function g(){if(b){var f,g=b.length;for(f=0,c=Array(g),d=Array(g);f<g;++f)c[f]=isNaN(d[f]=+a(b[f],f,b))?0:+e(b[f],f,b)}}return"function"!=typeof a&&(a=t(null==a?0:+a)),f.initialize=function(a){b=a,g()},f.strength=function(a){return arguments.length?(e="function"==typeof a?a:t(+a),g(),f):e},f.x=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),g(),f):a},f})(a=>f.get(a.prefix)?.x||0).strength(.5)),b.d3Force("y",(function(a){var b,c,d,e=t(.1);function f(a){for(var e,f=0,g=b.length;f<g;++f)e=b[f],e.vy+=(d[f]-e.y)*c[f]*a}function g(){if(b){var f,g=b.length;for(f=0,c=Array(g),d=Array(g);f<g;++f)c[f]=isNaN(d[f]=+a(b[f],f,b))?0:+e(b[f],f,b)}}return"function"!=typeof a&&(a=t(null==a?0:+a)),f.initialize=function(a){b=a,g()},f.strength=function(a){return arguments.length?(e="function"==typeof a?a:t(+a),g(),f):e},f.y=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),g(),f):a},f})(a=>f.get(a.prefix)?.y||0).strength(.5)),b.d3Force("collision",x().radius(a=>z(a)+10).strength(.9))}else"spread"===aH?(c(),d(),b.d3Force("charge")?.strength(-300).distanceMax(500),b.d3Force("link")?.distance(180).strength(.4),b.d3Force("center")?.strength(.02),b.d3Force("collision",x().radius(a=>z(a)+8).strength(.8))):(c(),d(),b.d3Force("charge")?.strength(-180).distanceMax(400),b.d3Force("link")?.distance(a=>((a.source?.blockerCount||0)+(a.source?.dependentCount||0)+((a.target?.blockerCount||0)+(a.target?.dependentCount||0)))/2>4?90:120).strength(.6),b.d3Force("center")?.strength(.03),b.d3Force("collision",x().radius(a=>z(a)+6).strength(.7)));return b.d3ReheatSimulation(),W&&(a=setTimeout(()=>{ak.current&&ak.current.zoomToFit(400,60)},ar.current?600:1e3)),ar.current=!0,()=>{a&&clearTimeout(a)}},[aH,a3,a4,W]);let bd=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(bd.current||!aF||0===i.length)return;bd.current=!0;let a=setTimeout(()=>{aI("force")},15);return()=>clearTimeout(a)},[aF,i.length]),(0,c.useEffect)(()=>{if(!O&&W&&ak.current&&i.length>0){let a=setTimeout(()=>{ak.current.zoomToFit(400,60)},800);return()=>clearTimeout(a)}},[i.length,O,W]);let be=(0,c.useRef)(void 0);(0,c.useEffect)(()=>{if(void 0===be.current){be.current=ab??null;return}be.current=ab??null;let a=ak.current;if(!a)return;let b=setTimeout(()=>{a.zoomToFit(400,60)},100);return()=>clearTimeout(b)},[ab]);let bf=(0,c.useMemo)(()=>{let a=Math.sqrt(a3.length)||1;return a3.forEach((b,c)=>{if(null==b.x&&null==b.y){let d=c*Math.PI*(3-Math.sqrt(5)),e=300*Math.sqrt(.5+c)/a;b.x=e*Math.cos(d),b.y=e*Math.sin(d)}}),{nodes:a3,links:a4}},[a3,a4]),bg=()=>"dark"===au.current,bh=(0,c.useCallback)((a,b,c)=>{let d=z(a),f=B(a),g=n(a.prefix),h=aL.current?.id===a.id,i=aM.current?.id===a.id,j=as.current.has(a.id),k=aN.current,l=k.has(a.id),m=k.size>0,o=Date.now(),p=1,q=a._spawnTime;if(q){var r;let a=o-q;a<500&&(p=1+2.70158*Math.pow((r=a/500)-1,3)+1.70158*Math.pow(r-1,2))}let s=1,t=1,u=a._removeTime;if(u){let a=o-u;if(a<400){let b=a/400;s=1-C(b),t=1-b}else s=0,t=0}let v=p*s;if(v<=.01)return;let w=d*v,x=(as.current.size>0&&!j?.25:m&&!l?.15:"closed"===a.status?.5:1)*t;if(x<=.01)return;b.save(),b.globalAlpha=x,(l&&m||j)&&(b.shadowColor="#10b981",b.shadowBlur=h?20:j?14:i?16:10),c>.3&&(b.beginPath(),b.arc(a.x,a.y,w+2,0,2*Math.PI),b.strokeStyle=g,b.lineWidth=2,b.stroke()),b.beginPath(),b.arc(a.x,a.y,w,0,2*Math.PI),b.fillStyle=f,b.fill(),b.strokeStyle=h?"#10b981":j?"#34d399":i?"#3f3f46":"#e4e4e7",b.lineWidth=h?2.5:j||i?2:1,b.stroke(),b.shadowBlur=0;let y=a._changedAt;if(y){let c=o-y;if(c<800){let d=c/800,f=e[a.status]||"#a1a1aa";b.beginPath(),b.arc(a.x,a.y,w+4+20*d,0,2*Math.PI),b.strokeStyle=f,b.lineWidth=2*(1-d),b.globalAlpha=(1-d)*.6,b.stroke(),b.globalAlpha=x}}if(aT.current&&aS.current===a.id){let d=w+Math.max(25,30/c);for(let e=0;e<3;e++){let f=(o+500*e)%2e3/2e3,g=w+2/c+f*(d-w),h=(1-f)*.6;b.beginPath(),b.arc(a.x,a.y,g,0,2*Math.PI),b.strokeStyle="#10b981",b.lineWidth=Math.max(1.5/c,.5),b.globalAlpha=h*x,b.stroke()}b.globalAlpha=x}if(q){let c=o-q;if(c<500){let d=c/500;b.beginPath(),b.arc(a.x,a.y,w+6+8*d,0,2*Math.PI),b.strokeStyle="#10b981",b.lineWidth=3*(1-d),b.globalAlpha=(1-d)*.4,b.stroke(),b.globalAlpha=x}}if(a.priority<=1&&c>.5){let d=Math.min(10,Math.max(4,12/c));b.font=`${d}px sans-serif`,b.textAlign="center",b.textBaseline="bottom",b.fillText(0===a.priority?"🔥🔥":"🔥",a.x,a.y-w-2)}if(c>.5){let d=Math.min(7,Math.max(3,10/c));b.font=`500 ${d}px 'Inter', system-ui, sans-serif`,b.textAlign="center",b.textBaseline="top",b.fillStyle=bg()?"#d4d4d8":"#3f3f46",b.globalAlpha=.85*x;let e=a.id;c>1.5?e=M(a.title||a.id,30):c>.9&&(e=M(a.title||a.id,18)),b.fillText(e,a.x,a.y+w+3);let f=a.collapsedCount;if(f&&f>0){let e=Math.min(5.5,Math.max(2.5,8/c));b.font=`400 ${e}px 'Inter', system-ui, sans-serif`,b.fillStyle=bg()?"#71717a":"#a1a1aa",b.fillText(`${f} task${1!==f?"s":""}`,a.x,a.y+w+3+d+1)}}let A=aO.current.get(a.id);if(A&&A>0&&c>.4){let d=Math.min(6,Math.max(3.5,8/c)),e=a.x+.75*w,f=a.y-.75*w,g=A>99?"99+":String(A);b.save(),b.globalAlpha=Math.min(x,.95),b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.fillStyle="#ef4444",b.fill(),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke();let h=Math.min(7,Math.max(3,1.3*d));b.font=`600 ${h}px 'Inter', system-ui, sans-serif`,b.textAlign="center",b.textBaseline="middle",b.fillStyle="#ffffff",b.fillText(g,e,f+.3),b.restore()}let D=aP.current.get(a.id);if(D){let d=Math.max(4,10/c),e=a.x+.7*w,f=a.y+.7*w;if(b.save(),b.globalAlpha=1,D.avatar){let a=E(D.avatar,()=>aU.current());a?(b.save(),b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.clip(),b.drawImage(a,e-d,f-d,2*d,2*d),b.restore()):F(b,e,f,d,D.handle,c,bg())}else F(b,e,f,d,D.handle,c,bg());b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke(),b.restore()}if(!D){let d=aQ.current.get(a.id);if(d){let e=Math.max(4,10/c),f=a.x+.7*w,g=a.y+.7*w;if(b.save(),b.globalAlpha=1,d.avatar){let a=E(d.avatar,()=>aU.current());a?(b.save(),b.beginPath(),b.arc(f,g,e,0,2*Math.PI),b.clip(),b.drawImage(a,f-e,g-e,2*e,2*e),b.restore()):F(b,f,g,e,d.handle,c,bg())}else F(b,f,g,e,d.handle,c,bg());b.beginPath(),b.arc(f,g,e,0,2*Math.PI),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke(),b.restore()}}b.restore()},[]),bi=(0,c.useCallback)((a,b,c)=>{let d=a.source,e=a.target;if(void 0===d.x||void 0===e.x)return;let f=Date.now(),g=1,h=1,i=a._spawnTime;if(i){let a=f-i;if(a<500){let b=a/500;g=C(b),h=1+(1-b)*1.5}}let j=1,k=a._removeTime;if(k){let a=f-k;if(!(a<400))return;j=1-C(a/400)}let l=g*j;if(l<=.01)return;let m=d.id||a.source,n=e.id||a.target,o="parent-child"===a.type,p=aN.current,q=p.size>0,r=q&&p.has(m)&&p.has(n),s=(o?q?r?.5:.05:.2:q?r?.8:.08:.35)*l;if(s<=.01)return;b.save(),b.globalAlpha=s,o?(b.strokeStyle=r?bg()?"#a1a1aa":"#71717a":(bg(),"#a1a1aa"),b.lineWidth=Math.max(.6,1.5/c)*h,b.setLineDash([4,3])):(b.strokeStyle=r?"#10b981":bg()?"#a1a1aa":"#d4d4d8",b.lineWidth=(r?Math.max(2,2.5/c):Math.max(.8,1.2/c))*h);let t=e.x-d.x,u=e.y-d.y,v=Math.sqrt(t*t+u*u),w=(d.x+e.x)/2+.15*u,x=(d.y+e.y)/2-.15*t;if(b.beginPath(),b.moveTo(d.x,d.y),b.quadraticCurveTo(w,x,e.x,e.y),b.stroke(),o&&b.setLineDash([]),i){let a=f-i;a<300&&(b.save(),b.globalAlpha=(1-a/300)*.5,b.strokeStyle="#10b981",b.lineWidth=(o?3:4)/c,b.beginPath(),b.moveTo(d.x,d.y),b.quadraticCurveTo(w,x,e.x,e.y),b.stroke(),b.restore())}if(!o){let a=z(e);if(v<a+1)return void b.restore();let f=Math.min(8,6/c),g=1-a/v,h=d.x+g*t,i=d.y+g*u,j=Math.atan2(u,t);b.fillStyle=r?"#10b981":bg()?"#a1a1aa":"#d4d4d8",b.beginPath(),b.moveTo(h,i),b.lineTo(h-f*Math.cos(j-Math.PI/7),i-f*Math.sin(j-Math.PI/7)),b.lineTo(h-f*Math.cos(j+Math.PI/7),i-f*Math.sin(j+Math.PI/7)),b.closePath(),b.fill()}b.restore()},[]),bj=(0,c.useCallback)((a,b)=>{if(!aJ)return;let c=b>=.8?0:b<=.4?1:(.8-b)/.4;if(c<=.01)return;let d=a2.current;if(0===d.length)return;let e=new Map;for(let a of a3)null!=a.x&&null!=a.y&&e.set(a.id,{x:a.x,y:a.y});for(let f of(a.save(),d)){let d=0,g=0,h=0;for(let a of f.memberIds){let b=e.get(a);b&&(d+=b.x,g+=b.y,h++)}if(0===h)continue;let i=d/h,j=g/h,k=0;for(let a of f.memberIds){let b=e.get(a);if(b){let a=b.x-i,c=b.y-j,d=Math.sqrt(a*a+c*c);d>k&&(k=d)}}let l=k+30,m=n(f.prefix);a.beginPath(),a.arc(i,j,l,0,2*Math.PI),a.globalAlpha=.05*c,a.fillStyle=m,a.fill(),a.globalAlpha=.25*c,a.strokeStyle=m,a.lineWidth=1.5/b,a.setLineDash([8/b,4/b]),a.stroke(),a.setLineDash([]);let o=Math.min(24,Math.max(10,14/b)),p=Math.min(12,Math.max(5,8/b)),q=.35*o;a.font=`500 ${p}px 'Inter', system-ui, sans-serif`,a.textAlign="center",a.textBaseline="middle",a.globalAlpha=.45*c,a.fillStyle=bg()?"#a1a1aa":"#71717a",a.fillText(f.parentId,i,j-.5*o-q),a.font=`600 ${o}px 'Inter', system-ui, sans-serif`,a.globalAlpha=.85*c,a.fillStyle=bg()?"#d4d4d8":"#18181b";let r=f.title.length>40?f.title.slice(0,39)+"…":f.title;a.fillText(r,i,j+.15*o);let s=Math.min(14,Math.max(6,9/b));a.font=`400 ${s}px 'Inter', system-ui, sans-serif`,a.globalAlpha=.5*c,a.fillStyle="#71717a",a.fillText(`${f.memberIds.length} issue${1!==f.memberIds.length?"s":""}`,i,j+.15*o+.7*o)}a.restore()},[a3,i,aJ]),bk=(0,c.useCallback)((a,b,c)=>{let d=z(a)+5;c.fillStyle=b,c.beginPath(),c.arc(a.x,a.y,d,0,2*Math.PI),c.fill()},[]),bl=(0,c.useCallback)(()=>{},[]),bm=(0,c.useCallback)(()=>{let a=am.current,b=ak.current;if(!a||!b)return;let c=a.getContext("2d");if(!c)return;let d=1/0,e=-1/0,f=1/0,g=-1/0,h=!1;for(let a of a3)null!=a.x&&null!=a.y&&(h=!0,a.x<d&&(d=a.x),a.x>e&&(e=a.x),a.y<f&&(f=a.y),a.y>g&&(g=a.y));if(!h)return;let i=(e+=40)-(d-=40)||1,j=(g+=40)-(f-=40)||1,k=aC-16,l=aD-16,n=Math.min(k/i,l/j),o=8+(k-i*n)/2,p=8+(l-j*n)/2,q=window.devicePixelRatio||1;(a.width!==aC*q||a.height!==aD*q)&&(a.width=aC*q,a.height=aD*q,c.setTransform(q,0,0,q,0,0)),c.clearRect(0,0,aC,aD),c.fillStyle=bg()?"rgba(24, 24, 27, 0.92)":"rgba(250, 250, 250, 0.92)",c.beginPath(),c.roundRect(0,0,aC,aD,6),c.fill();let r=aN.current,s=r.size>0,t=aM.current?.id||aL.current?.id||null,u=at.current,v=null!==u;for(let a of a4){let b=a.source,e=a.target;if(null==b.x||null==e.x)continue;let g=b.id||a.source,h=e.id||a.target,i=s&&r.has(g)&&r.has(h);c.globalAlpha=v?.03:s?i?.5:.04:.1,c.strokeStyle=i?"#10b981":bg()?"#71717a":"#a1a1aa",c.lineWidth=i?1:.5;let j=o+(b.x-d)*n,k=p+(b.y-f)*n,l=o+(e.x-d)*n,m=p+(e.y-f)*n;c.beginPath(),c.moveTo(j,k),c.lineTo(l,m),c.stroke()}for(let a of(c.globalAlpha=1,a3)){if(null==a.x||null==a.y)continue;let b=o+(a.x-d)*n,e=p+(a.y-f)*n,g=a.id===t,h=r.has(a.id),i=!0;if(v)switch(A){case"status":i=a.status===u;break;case"priority":i=String(a.priority)===u;break;case"type":i=a.issueType===u;break;case"owner":i=(a.createdBy||"Unassigned")===u;break;case"assignee":i=(a.assignee||"Unassigned")===u;break;case"prefix":i=m(a.prefix)===u}v&&!i?c.globalAlpha=.08:v&&i?c.globalAlpha=1:s&&!h?c.globalAlpha=.1:"closed"===a.status?c.globalAlpha=.35:c.globalAlpha=.85,c.fillStyle=B(a);let j="epic"===a.issueType?3:2;if(v&&i?j+=1:g?j=5:s&&h&&(j=4),g){let d=c.globalAlpha;c.globalAlpha=.4,c.fillStyle="#10b981",c.beginPath(),c.arc(b,e,j+2,0,2*Math.PI),c.fill(),c.globalAlpha=d,c.fillStyle=B(a)}c.fillRect(b-j/2,e-j/2,j,j)}c.globalAlpha=1;let w=aP.current;if(w.size>0)for(let a of a3){if(null==a.x||null==a.y)continue;let b=w.get(a.id);if(!b)continue;let e=o+(a.x-d)*n,g=p+(a.y-f)*n;if(c.save(),c.globalAlpha=1,b.avatar){let a=E(b.avatar,()=>aU.current());a?(c.save(),c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.clip(),c.drawImage(a,e-5,g-5,10,10),c.restore()):(c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill())}else c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill();c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.strokeStyle=bg()?"#18181b":"#ffffff",c.lineWidth=1,c.stroke(),c.restore()}let x=aQ.current;if(x.size>0)for(let a of a3){if(null==a.x||null==a.y||w.get(a.id))continue;let b=x.get(a.id);if(!b)continue;let e=o+(a.x-d)*n,g=p+(a.y-f)*n;if(c.save(),c.globalAlpha=1,b.avatar){let a=E(b.avatar,()=>aU.current());a?(c.save(),c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.clip(),c.drawImage(a,e-5,g-5,10,10),c.restore()):(c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill())}else c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill();c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.strokeStyle=bg()?"#18181b":"#ffffff",c.lineWidth=1,c.stroke(),c.restore()}try{let a=b.screen2GraphCoords(0,0),e=b.screen2GraphCoords(ap.width,ap.height),g=o+(a.x-d)*n,h=p+(a.y-f)*n,i=(e.x-a.x)*n,j=(e.y-a.y)*n,k=Math.max(0,g),l=Math.max(0,h),m=Math.min(aC-k,i-(k-g)),q=Math.min(aD-l,j-(l-h));m>0&&q>0&&(c.fillStyle="rgba(16, 185, 129, 0.06)",c.fillRect(k,l,m,q),c.strokeStyle="rgba(16, 185, 129, 0.5)",c.lineWidth=1.5,c.strokeRect(k,l,m,q))}catch{}},[a3,a4,ap,aC,aD,8]);ao.current=bm;let bn=(0,c.useCallback)(()=>{cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>{bm()})},[bm]);(0,c.useEffect)(()=>{if(!aF||0===i.length)return;let a=setInterval(()=>{bm()},200);return()=>clearInterval(a)},[aF,i.length,bm]),(0,c.useEffect)(()=>{let a,b=!0,c=!1,d=Date.now();return(a3.some(a=>a._spawnTime&&d-a._spawnTime<500||a._removeTime&&d-a._removeTime<400||a._changedAt&&d-a._changedAt<800)||a4.some(a=>a._spawnTime&&d-a._spawnTime<500||a._removeTime&&d-a._removeTime<400))&&!c&&(c=!0,a=requestAnimationFrame(function d(){if(!b)return;let e=Date.now();a3.some(a=>!!a._spawnTime&&!!(e-a._spawnTime<500)||!!a._removeTime&&!!(e-a._removeTime<400)||!!a._changedAt&&!!(e-a._changedAt<800))||a4.some(a=>!!a._spawnTime&&!!(e-a._spawnTime<500)||!!a._removeTime&&!!(e-a._removeTime<400))?(H(ak),a=requestAnimationFrame(d)):c=!1})),()=>{b=!1,cancelAnimationFrame(a)}},[a3,a4]);let bo=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a.currentTarget.getBoundingClientRect(),d=a.clientX-c.left,e=a.clientY-c.top,f=1/0,g=-1/0,h=1/0,i=-1/0;for(let a of a3)null!=a.x&&null!=a.y&&(a.x<f&&(f=a.x),a.x>g&&(g=a.x),a.y<h&&(h=a.y),a.y>i&&(i=a.y));let j=(g+=40)-(f-=40)||1,k=(i+=40)-(h-=40)||1,l=aC-16,m=aD-16,n=Math.min(l/j,m/k),o=f+(d-(8+(l-j*n)/2))/n,p=h+(e-(8+(m-k*n)/2))/n;b.centerAt(o,p,300)},[a3,aC,aD,8]),bp=(0,c.useCallback)((a,b)=>{if(Date.now()-aZ.current<100)return;if(!ad)return void r(a,b);let c=Date.now(),d=ay.current;d&&d.nodeId===a.id&&c-d.time<300?(az.current&&(clearTimeout(az.current),az.current=null),ay.current=null,ae?.(a,window.innerWidth/2,window.innerHeight/2)):(ay.current={nodeId:a.id,time:c},az.current&&clearTimeout(az.current),az.current=setTimeout(()=>{az.current=null,ay.current=null,r(a,b)},300))},[ad,r,ae]);(0,c.useEffect)(()=>{let a=al.current;if(!a)return;let b=b=>{let c=b.target.closest("button, [data-tutorial], .bead-tooltip");if(c&&c!==al.current||2!==b.button)return;let d=ak.current;if(!d)return;let e=a.getBoundingClientRect(),f=d.screen2GraphCoords(b.clientX-e.left,b.clientY-e.top);for(let a of a_.current)if(null!=a.x&&null!=a.y){let b=a.x-f.x,c=a.y-f.y;if(Math.sqrt(b*b+c*c)<=z(a))return}b.preventDefault(),b.stopPropagation(),aw({startX:b.clientX,startY:b.clientY,currentX:b.clientX,currentY:b.clientY,active:!1})},c=a=>{ax.current&&a.preventDefault()};return a.addEventListener("pointerdown",b,{capture:!0}),a.addEventListener("contextmenu",c),()=>{a.removeEventListener("pointerdown",b,{capture:!0}),a.removeEventListener("contextmenu",c)}},[]);let bq=(0,c.useCallback)((a,b)=>{let c=as.current;if(c.size<2||!c.has(a.id))return;if(!a0.current){let a=new Map;for(let b of a_.current)c.has(b.id)&&null!=b.x&&null!=b.y&&a.set(b.id,{x:b.x,y:b.y});a0.current=a}let d=a0.current.get(a.id);if(!d)return;let e=a.x-d.x,f=a.y-d.y;for(let[b,c]of a0.current){if(b===a.id)continue;let d=a_.current.find(a=>a.id===b);d&&(d.fx=c.x+e,d.fy=c.y+f)}},[]),br=(0,c.useCallback)(a=>{if(a0.current){for(let[a]of a0.current){let b=a_.current.find(b=>b.id===a);b&&(b.fx=void 0,b.fy=void 0)}a0.current=null,a1.current=null}},[]);return(0,b.jsxs)("div",{ref:al,className:"w-full h-full relative","data-tutorial":"graph",children:[(0,b.jsxs)("div",{className:"absolute top-3 left-3 sm:top-4 sm:left-4 z-10 flex flex-col gap-1.5 sm:gap-2",children:[ab&&ac&&(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-medium bg-emerald-50/90 dark:bg-emerald-950/90 backdrop-blur-sm rounded-lg border border-emerald-200 dark:border-emerald-800 shadow-sm text-emerald-700 dark:text-emerald-300",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500 dark:text-emerald-400 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),(0,b.jsxs)("span",{className:"truncate max-w-[180px]",children:["Focused: ",(0,b.jsx)("span",{className:"font-semibold",children:i.find(a=>a.id===ab)?.title||ab})]}),(0,b.jsx)("button",{onClick:ac,className:"ml-auto p-0.5 rounded hover:bg-emerald-200/50 dark:hover:bg-emerald-900/50 transition-colors flex-shrink-0",title:"Show full graph",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex w-full items-start gap-1.5 sm:gap-2",children:(0,b.jsxs)("div",{className:"flex w-full bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden","data-tutorial":"layouts",children:[(0,b.jsx)("button",{onClick:()=>aI("force"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"force"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"4",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13",cy:"11",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("line",{x1:"4",y1:"4",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"12",y1:"3",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"3",y1:"12",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"13",y1:"11",x2:"8",y2:"8",strokeOpacity:"0.5"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Force"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("dag"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"dag"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"2.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"4",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"2",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"6",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("line",{x1:"8",y1:"4",x2:"4",y2:"6.5",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"8",y1:"4",x2:"12",y2:"6.5",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"4",y1:"9.5",x2:"2",y2:"12",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"4",y1:"9.5",x2:"6",y2:"12",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"12",y1:"9.5",x2:"12",y2:"12",strokeOpacity:"0.5"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"DAG"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("radial"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"radial"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"5",fill:"none",strokeOpacity:"0.5"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"7.5",fill:"none",strokeOpacity:"0.3"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Radial"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("cluster"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"cluster"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"3.5",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"6",cy:"6",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"11",cy:"10",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13.5",cy:"11.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"11",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Cluster"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("spread"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"spread"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"2",cy:"2",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"14",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"14",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Spread"})]})})]})}),(0,b.jsx)("div",{className:"flex w-full items-start gap-1.5 sm:gap-2","data-tutorial":"view-controls",children:(0,b.jsxs)("div",{className:"flex w-full bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden",children:[(S||T)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:R&&R.size>0?T:S,className:"flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800","data-tutorial":"btn-collapse",children:R&&R.size>0?(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Expand all"})]}):(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Collapse all"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"})]}),(0,b.jsx)("button",{onClick:()=>aK(a=>!a),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${aJ?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:aJ?"Hide cluster labels":"Show cluster labels","data-tutorial":"btn-clusters",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6",strokeDasharray:"2.5 2",strokeOpacity:aJ?1:.5}),(0,b.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8",strokeOpacity:aJ?1:.4}),(0,b.jsx)("line",{x1:"6",y1:"10",x2:"10",y2:"10",strokeOpacity:aJ?.6:.25,strokeWidth:"1"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Clusters"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>X?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${W?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:W?"Auto-fit enabled: camera adjusts after updates":"Auto-fit disabled: camera stays fixed","data-tutorial":"btn-autofit",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M20.25 16.5V18A2.25 2.25 0 0118 20.25h-1.5M3.75 16.5V18A2.25 2.25 0 006 20.25h1.5"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Auto-fit"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>$?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${Z?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:Z?"Pulse enabled: ripple highlights most recent activity":"Pulse disabled: no activity highlight","data-tutorial":"btn-pulse",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.07 4.93A10 10 0 014.93 19.07M4.93 4.93a10 10 0 0114.14 14.14",strokeOpacity:"0.5"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.24 7.76a6 6 0 01.01 8.49M7.76 7.76a6 6 0 000 8.49",strokeOpacity:"0.7"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Pulse"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aa?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${_?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:_?"Particles enabled: flowing dots show dependency direction":"Particles disabled: improves performance on large graphs","data-tutorial":"btn-particles",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("path",{strokeLinecap:"round",d:"M7 12h3m3 0h3",strokeOpacity:"0.4"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Particles"})]})})]})})]}),!O&&(0,b.jsxs)("div",{className:"absolute bottom-2 sm:bottom-4 z-10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm px-2 sm:px-3 py-1.5 sm:py-2 text-xs text-zinc-400 dark:text-zinc-500 transition-[right] duration-300 ease-out","data-tutorial":"legend",style:{right:Q?"calc(360px + 1rem)":"1rem",maxWidth:320},children:[a6&&(0,b.jsxs)("div",{className:"text-zinc-500 dark:text-zinc-400 mb-1.5","data-tutorial":"legend-stats",children:[(0,b.jsx)("strong",{className:"text-zinc-700 dark:text-zinc-300",children:a6.total})," issues"," · ",(0,b.jsx)("strong",{className:"text-zinc-700 dark:text-zinc-300",children:a6.edges})," deps"," · ",(0,b.jsx)("strong",{className:"text-emerald-600 dark:text-emerald-400",children:a6.prefixes.length}),1===a6.prefixes.length?" project":" projects",af&&af.size>0&&(0,b.jsx)("span",{className:"text-zinc-400 dark:text-zinc-500",children:" (filtered)"})]}),(0,b.jsx)("div",{className:"hidden sm:flex bg-zinc-100 dark:bg-zinc-800 rounded-md overflow-hidden mb-1.5","data-tutorial":"legend-color-mode",children:["status","priority","type","owner","assignee","prefix"].map(a=>(0,b.jsx)("button",{onClick:()=>V?.(a),className:`flex-1 px-2 py-1 text-[10px] font-medium transition-colors ${U===a?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60"}`,children:d[a]},a))}),(0,b.jsxs)("div",{className:"hidden sm:flex flex-wrap gap-x-3 gap-y-1 mb-1.5","data-tutorial":"legend-items",children:["status"===U?(0,b.jsx)(b.Fragment,{children:["open","in_progress","blocked","deferred","closed"].map(a=>{let c=af?.has(a),d=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${f[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${c?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":d?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:e[a]}}),(0,b.jsx)("span",{className:`${c?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:f[a]})]},a)})}):"priority"===U?(0,b.jsx)(b.Fragment,{children:[0,1,2,3,4].map(a=>{let c=String(a),d=af?.has(c),e=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(c),onMouseEnter:()=>{at.current=c,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${g[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${d?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":e?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:h[a]}}),(0,b.jsx)("span",{className:`${d?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:g[a]})]},a)})}):"type"===U?(0,b.jsx)(b.Fragment,{children:["epic","task","bug","feature","chore"].map(a=>{let c=af?.has(a),d=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${l[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${c?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":d?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:k[a]}}),(0,b.jsx)("span",{className:`${c?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:l[a]})]},a)})}):(0,b.jsx)(b.Fragment,{children:a7.map(({label:a,color:c})=>{let d=af?.has(a),e=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${a} — click to filter by ${U}`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${d?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":e?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:c}}),(0,b.jsx)("span",{className:`${d?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:a})]},a)})}),af&&af.size>0&&(0,b.jsx)("button",{onClick:()=>ah?.(),className:"text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-400 underline ml-auto",children:"Clear filters"})]}),(0,b.jsx)("div",{className:"hidden sm:flex flex-col gap-0.5 text-zinc-400 dark:text-zinc-500",children:(0,b.jsxs)("span",{children:["Size = importance · Ring = project","status"!==U&&` \xb7 Fill = ${d[U].toLowerCase()}`]})}),(0,b.jsx)("span",{className:"sm:hidden",children:"Tap a node for details"})]}),(0,b.jsxs)("div",{className:"hidden sm:block absolute bottom-4 left-4 z-10","data-tutorial":"minimap",style:{width:aC,height:aD},children:[(0,b.jsx)("canvas",{ref:am,width:aC,height:aD,onClick:bo,className:"rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm cursor-crosshair bg-white dark:bg-zinc-900",style:{width:aC,height:aD}}),(0,b.jsx)("div",{className:"absolute top-0 left-2 right-2 h-1.5 cursor-n-resize hover:bg-zinc-300/40 rounded-t-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"top",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=aE.current.startY-a.clientY,c=Math.max(80,Math.min(400,aE.current.startH+b));aB(a=>({...a,h:c}))},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}}),(0,b.jsx)("div",{className:"absolute top-2 right-0 bottom-2 w-1.5 cursor-e-resize hover:bg-zinc-300/40 rounded-r-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"right",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=a.clientX-aE.current.startX,c=Math.max(100,Math.min(500,aE.current.startW+b));aB(a=>({...a,w:c}))},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}}),(0,b.jsx)("div",{className:"absolute top-0 right-0 w-3 h-3 cursor-ne-resize hover:bg-zinc-300/40 rounded-tr-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"top-right",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=a.clientX-aE.current.startX,c=aE.current.startY-a.clientY;aB({w:Math.max(100,Math.min(500,aE.current.startW+b)),h:Math.max(80,Math.min(400,aE.current.startH+c))})},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}})]}),aF?(0,b.jsx)(aF,{ref:ak,graphData:bf,width:ap.width,height:ap.height,nodeCanvasObject:bh,nodeCanvasObjectMode:I,nodePointerAreaPaint:bk,onRenderFramePost:bj,linkCanvasObject:bi,linkCanvasObjectMode:I,linkDirectionalParticles:a=>_&&"parent-child"!==a.type?2:0,linkDirectionalParticleSpeed:.004*!!_,linkDirectionalParticleWidth:2.5*!!_,linkDirectionalParticleColor:J,dagMode:"dag"===aH?"td":void 0,dagLevelDistance:150,onDagError:bl,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:300,warmupTicks:50,onNodeClick:bp,onNodeHover:bb,onNodeRightClick:bc,onBackgroundClick:u,onNodeDrag:bq,onNodeDragEnd:br,onZoom:bn,backgroundColor:"transparent",autoPauseRedraw:!(Z&&Y)}):(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)("div",{className:"text-zinc-400 dark:text-zinc-500 text-sm animate-pulse-soft",children:"Loading graph engine..."})}),av&&av.active&&(0,b.jsx)("div",{style:{position:"absolute",left:Math.min(av.startX,av.currentX)-(al.current?.getBoundingClientRect().left||0),top:Math.min(av.startY,av.currentY)-(al.current?.getBoundingClientRect().top||0),width:Math.abs(av.currentX-av.startX),height:Math.abs(av.currentY-av.startY),border:"1.5px dashed #10b981",backgroundColor:"rgba(16, 185, 129, 0.08)",borderRadius:4,pointerEvents:"none",zIndex:5}})]})}),L=c.default.memo(K);function M(a,b){return a.length<=b?a:a.slice(0,b-1)+"…"}function N(){}function O(){}let P=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R={};function S(a,b){return((b||R).jsx?Q:P).test(a)}let T=/[ \t\n\f\r]/g;function U(a){return""===a.replace(T,"")}class V{constructor(a,b){this.attribute=b,this.property=a}}V.prototype.attribute="",V.prototype.booleanish=!1,V.prototype.boolean=!1,V.prototype.commaOrSpaceSeparated=!1,V.prototype.commaSeparated=!1,V.prototype.defined=!1,V.prototype.mustUseProperty=!1,V.prototype.number=!1,V.prototype.overloadedBoolean=!1,V.prototype.property="",V.prototype.spaceSeparated=!1,V.prototype.space=void 0;let W=0,X=ac(),Y=ac(),Z=ac(),$=ac(),_=ac(),aa=ac(),ab=ac();function ac(){return 2**++W}a.s(["boolean",0,X,"booleanish",0,Y,"commaOrSpaceSeparated",0,ab,"commaSeparated",0,aa,"number",0,$,"overloadedBoolean",0,Z,"spaceSeparated",0,_],43429);var ad=a.i(43429);let ae=Object.keys(ad);class af extends V{constructor(a,b,c,d){let e=-1;if(super(a,b),function(a,b,c){c&&(a[b]=c)}(this,"space",d),"number"==typeof c)for(;++e<ae.length;){const a=ae[e];!function(a,b,c){c&&(a[b]=c)}(this,ae[e],(c&ad[a])===ad[a])}}}function ag(a){return a.toLowerCase()}af.prototype.defined=!0;let ah=/[A-Z]/g,ai=/-[a-z]/g,aj=/^data[-\w.:]+$/i;function ak(a){return"-"+a.toLowerCase()}function al(a){return a.charAt(1).toUpperCase()}let am={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};class an{constructor(a,b,c){this.normal=b,this.property=a,c&&(this.space=c)}}function ao(a,b){let c={},d={};for(let b of a)Object.assign(c,b.property),Object.assign(d,b.normal);return new an(c,d,b)}function ap(a){let b={},c={};for(let[d,e]of Object.entries(a.properties)){let f=new af(d,a.transform(a.attributes||{},d),e,a.space);a.mustUseProperty&&a.mustUseProperty.includes(d)&&(f.mustUseProperty=!0),b[d]=f,c[ag(d)]=d,c[ag(f.attribute)]=d}return new an(b,c,a.space)}an.prototype.normal={},an.prototype.property={},an.prototype.space=void 0;let aq=ap({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:_,ariaCurrent:null,ariaDescribedBy:_,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:_,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:_,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_,ariaLevel:$,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:_,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:_,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Y,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform:(a,b)=>"role"===b?b:"aria-"+b.slice(4).toLowerCase()});function ar(a,b){return b in a?a[b]:b}function as(a,b){return ar(a,b.toLowerCase())}let at=ap({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:aa,acceptCharset:_,accessKey:_,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:_,autoFocus:X,autoPlay:X,blocking:_,capture:null,charSet:null,checked:X,cite:null,className:_,cols:$,colSpan:null,content:null,contentEditable:Y,controls:X,controlsList:_,coords:$|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Z,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:_,height:$,hidden:Z,high:$,href:null,hrefLang:null,htmlFor:_,httpEquiv:_,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:_,itemRef:_,itemScope:X,itemType:_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:$,pattern:null,ping:_,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:_,required:X,reversed:X,rows:$,rowSpan:$,sandbox:_,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:Y,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:as}),au=ap({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ab,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:_,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:ab,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ab,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ab,rev:ab,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ab,requiredFeatures:ab,requiredFonts:ab,requiredFormats:ab,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:ab,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ab,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ab,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ar}),av=ap({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(a,b)=>"xlink:"+b.slice(5).toLowerCase()}),aw=ap({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:as}),ax=ap({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(a,b)=>"xml:"+b.slice(3).toLowerCase()}),ay=ao([aq,at,av,aw,ax],"html"),az=ao([aq,au,av,aw,ax],"svg");var aA=a.i(30841);let aB=aD("end"),aC=aD("start");function aD(a){return function(b){let c=b&&b.position&&b.position[a]||{};if("number"==typeof c.line&&c.line>0&&"number"==typeof c.column&&c.column>0)return{line:c.line,column:c.column,offset:"number"==typeof c.offset&&c.offset>-1?c.offset:void 0}}}function aE(a){return a&&"object"==typeof a?"position"in a||"type"in a?aG(a.position):"start"in a||"end"in a?aG(a):"line"in a||"column"in a?aF(a):"":""}function aF(a){return aH(a&&a.line)+":"+aH(a&&a.column)}function aG(a){return aF(a&&a.start)+"-"+aF(a&&a.end)}function aH(a){return a&&"number"==typeof a?a:1}class aI extends Error{constructor(a,b,c){super(),"string"==typeof b&&(c=b,b=void 0);let d="",e={},f=!1;if(b&&(e="line"in b&&"column"in b||"start"in b&&"end"in b?{place:b}:"type"in b?{ancestors:[b],place:b.position}:{...b}),"string"==typeof a?d=a:!e.cause&&a&&(f=!0,d=a.message,e.cause=a),!e.ruleId&&!e.source&&"string"==typeof c){const a=c.indexOf(":");-1===a?e.ruleId=c:(e.source=c.slice(0,a),e.ruleId=c.slice(a+1))}if(!e.place&&e.ancestors&&e.ancestors){const a=e.ancestors[e.ancestors.length-1];a&&(e.place=a.position)}const g=e.place&&"start"in e.place?e.place.start:e.place;this.ancestors=e.ancestors||void 0,this.cause=e.cause||void 0,this.column=g?g.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=g?g.line:void 0,this.name=aE(e.place)||"1:1",this.place=e.place||void 0,this.reason=this.message,this.ruleId=e.ruleId||void 0,this.source=e.source||void 0,this.stack=f&&e.cause&&"string"==typeof e.cause.stack?e.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}aI.prototype.file="",aI.prototype.name="",aI.prototype.reason="",aI.prototype.message="",aI.prototype.stack="",aI.prototype.column=void 0,aI.prototype.line=void 0,aI.prototype.ancestors=void 0,aI.prototype.cause=void 0,aI.prototype.fatal=void 0,aI.prototype.place=void 0,aI.prototype.ruleId=void 0,aI.prototype.source=void 0;let aJ={}.hasOwnProperty,aK=new Map,aL=/[A-Z]/g,aM=new Set(["table","tbody","thead","tfoot","tr"]),aN=new Set(["td","th"]),aO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aP(a,b,c){var d,e,f,g,h,i,j,k,l;let m,n,o,p,q,r,s,t,u,v,w;return"element"===b.type?(d=a,e=b,f=c,n=m=d.schema,"svg"===e.tagName.toLowerCase()&&"html"===m.space&&(d.schema=az),d.ancestors.push(e),o=aT(d,e.tagName,!1),p=function(a,b){let c,d,e={};for(d in b.properties)if("children"!==d&&aJ.call(b.properties,d)){let f=function(a,b,c){let d=function(a,b){let c=ag(b),d=b,e=V;if(c in a.normal)return a.property[a.normal[c]];if(c.length>4&&"data"===c.slice(0,4)&&aj.test(b)){if("-"===b.charAt(4)){let a=b.slice(5).replace(ai,al);d="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=b.slice(4);if(!ai.test(a)){let c=a.replace(ah,ak);"-"!==c.charAt(0)&&(c="-"+c),b="data"+c}}e=af}return new e(d,b)}(a.schema,b);if(!(null==c||"number"==typeof c&&Number.isNaN(c))){var e;let b;if(Array.isArray(c)&&(c=d.commaSeparated?(b={},(""===(e=c)[e.length-1]?[...e,""]:e).join((b.padRight?" ":"")+","+(!1===b.padLeft?"":" ")).trim()):c.join(" ").trim()),"style"===d.property){let b="object"==typeof c?c:function(a,b){try{return(0,aA.default)(b,{reactCompat:!0})}catch(c){if(a.ignoreInvalidStyle)return{};let b=new aI("Cannot parse `style` attribute",{ancestors:a.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw b.file=a.filePath||void 0,b.url=aO+"#cannot-parse-style-attribute",b}}(a,String(c));return"css"===a.stylePropertyNameCase&&(b=function(a){let b,c={};for(b in a)aJ.call(a,b)&&(c[function(a){let b=a.replace(aL,aV);return"ms-"===b.slice(0,3)&&(b="-"+b),b}(b)]=a[b]);return c}(b)),["style",b]}return["react"===a.elementAttributeNameCase&&d.space?am[d.property]||d.property:d.attribute,c]}}(a,d,b.properties[d]);if(f){let[d,g]=f;a.tableCellAlignToStyle&&"align"===d&&"string"==typeof g&&aN.has(b.tagName)?c=g:e[d]=g}}return c&&((e.style||(e.style={}))["css"===a.stylePropertyNameCase?"text-align":"textAlign"]=c),e}(d,e),q=aS(d,e),aM.has(e.tagName)&&(q=q.filter(function(a){return"string"!=typeof a||!("object"==typeof a?"text"===a.type&&U(a.value):U(a))})),aQ(d,p,o,e),aR(p,q),d.ancestors.pop(),d.schema=m,d.create(e,o,p,f)):"mdxFlowExpression"===b.type||"mdxTextExpression"===b.type?function(a,b){if(b.data&&b.data.estree&&a.evaluater){let c=b.data.estree.body[0];return N("ExpressionStatement"===c.type),a.evaluater.evaluateExpression(c.expression)}aU(a,b.position)}(a,b):"mdxJsxFlowElement"===b.type||"mdxJsxTextElement"===b.type?(g=a,h=b,i=c,s=r=g.schema,"svg"===h.name&&"html"===r.space&&(g.schema=az),g.ancestors.push(h),t=null===h.name?g.Fragment:aT(g,h.name,!0),u=function(a,b){let c={};for(let d of b.attributes)if("mdxJsxExpressionAttribute"===d.type)if(d.data&&d.data.estree&&a.evaluater){let b=d.data.estree.body[0];N("ExpressionStatement"===b.type);let e=b.expression;N("ObjectExpression"===e.type);let f=e.properties[0];N("SpreadElement"===f.type),Object.assign(c,a.evaluater.evaluateExpression(f.argument))}else aU(a,b.position);else{let e,f=d.name;if(d.value&&"object"==typeof d.value)if(d.value.data&&d.value.data.estree&&a.evaluater){let b=d.value.data.estree.body[0];N("ExpressionStatement"===b.type),e=a.evaluater.evaluateExpression(b.expression)}else aU(a,b.position);else e=null===d.value||d.value;c[f]=e}return c}(g,h),v=aS(g,h),aQ(g,u,t,h),aR(u,v),g.ancestors.pop(),g.schema=r,g.create(h,t,u,i)):"mdxjsEsm"===b.type?function(a,b){if(b.data&&b.data.estree&&a.evaluater)return a.evaluater.evaluateProgram(b.data.estree);aU(a,b.position)}(a,b):"root"===b.type?(j=a,k=b,l=c,aR(w={},aS(j,k)),j.create(k,j.Fragment,w,l)):"text"===b.type?b.value:void 0}function aQ(a,b,c,d){"string"!=typeof c&&c!==a.Fragment&&a.passNode&&(b.node=d)}function aR(a,b){if(b.length>0){let c=b.length>1?b:b[0];c&&(a.children=c)}}function aS(a,b){let c=[],d=-1,e=a.passKeys?new Map:aK;for(;++d<b.children.length;){let f,g=b.children[d];if(a.passKeys){let a="element"===g.type?g.tagName:"mdxJsxFlowElement"===g.type||"mdxJsxTextElement"===g.type?g.name:void 0;if(a){let b=e.get(a)||0;f=a+"-"+b,e.set(a,b+1)}}let h=aP(a,g,f);void 0!==h&&c.push(h)}return c}function aT(a,b,c){let d;if(c)if(b.includes(".")){let a,c=b.split("."),e=-1;for(;++e<c.length;){let b=S(c[e])?{type:"Identifier",name:c[e]}:{type:"Literal",value:c[e]};a=a?{type:"MemberExpression",object:a,property:b,computed:!!(e&&"Literal"===b.type),optional:!1}:b}N(a,"always a result"),d=a}else d=S(b)&&!/^[a-z]/.test(b)?{type:"Identifier",name:b}:{type:"Literal",value:b};else d={type:"Literal",value:b};if("Literal"===d.type){let b=d.value;return aJ.call(a.components,b)?a.components[b]:b}if(a.evaluater)return a.evaluater.evaluateExpression(d);aU(a)}function aU(a,b){let c=new aI("Cannot handle MDX estrees without `createEvaluater`",{ancestors:a.ancestors,place:b,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw c.file=a.filePath||void 0,c.url=aO+"#cannot-handle-mdx-estrees-without-createevaluater",c}function aV(a){return"-"+a.toLowerCase()}let aW={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aX={};function aY(a,b){let c=b||aX;return aZ(a,"boolean"!=typeof c.includeImageAlt||c.includeImageAlt,"boolean"!=typeof c.includeHtml||c.includeHtml)}function aZ(a,b,c){var d;if((d=a)&&"object"==typeof d){if("value"in a)return"html"!==a.type||c?a.value:"";if(b&&"alt"in a&&a.alt)return a.alt;if("children"in a)return a$(a.children,b,c)}return Array.isArray(a)?a$(a,b,c):""}function a$(a,b,c){let d=[],e=-1;for(;++e<a.length;)d[e]=aZ(a[e],b,c);return d.join("")}function a_(a,b,c,d){let e,f=a.length,g=0;if(b=b<0?-b>f?0:f+b:b>f?f:b,c=c>0?c:0,d.length<1e4)(e=Array.from(d)).unshift(b,c),a.splice(...e);else for(c&&a.splice(b,c);g<d.length;)(e=d.slice(g,g+1e4)).unshift(b,0),a.splice(...e),g+=1e4,b+=1e4}function a0(a,b){return a.length>0?(a_(a,a.length,0,b),a):b}let a1={}.hasOwnProperty;function a2(a){let b={},c=-1;for(;++c<a.length;)!function(a,b){let c;for(c in b){let d,e=(a1.call(a,c)?a[c]:void 0)||(a[c]={}),f=b[c];if(f)for(d in f){a1.call(e,d)||(e[d]=[]);let a=f[d];!function(a,b){let c=-1,d=[];for(;++c<b.length;)("after"===b[c].add?a:d).push(b[c]);a_(a,0,0,d)}(e[d],Array.isArray(a)?a:a?[a]:[])}}}(b,a[c]);return b}let a3=bf(/[A-Za-z]/),a4=bf(/[\dA-Za-z]/),a5=bf(/[#-'*+\--9=?A-Z^-~]/);function a6(a){return null!==a&&(a<32||127===a)}let a7=bf(/\d/),a8=bf(/[\dA-Fa-f]/),a9=bf(/[!-/:-@[-`{-~]/);function ba(a){return null!==a&&a<-2}function bb(a){return null!==a&&(a<0||32===a)}function bc(a){return -2===a||-1===a||32===a}let bd=bf(/\p{P}|\p{S}/u),be=bf(/\s/);function bf(a){return function(b){return null!==b&&b>-1&&a.test(String.fromCharCode(b))}}function bg(a,b,c,d){let e=d?d-1:1/0,f=0;return function(d){return bc(d)?(a.enter(c),function d(g){return bc(g)&&f++<e?(a.consume(g),d):(a.exit(c),b(g))}(d)):b(d)}}let bh={tokenize:function(a){let b,c=a.attempt(this.parser.constructs.contentInitial,function(b){return null===b?void a.consume(b):(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,c,"linePrefix"))},function(c){return a.enter("paragraph"),function c(d){let e=a.enter("chunkText",{contentType:"text",previous:b});return b&&(b.next=e),b=e,function b(d){if(null===d){a.exit("chunkText"),a.exit("paragraph"),a.consume(d);return}return ba(d)?(a.consume(d),a.exit("chunkText"),c):(a.consume(d),b)}(d)}(c)});return c}},bi={tokenize:function(a){let b,c,d,e=this,f=[],g=0;return h;function h(b){if(g<f.length){let c=f[g];return e.containerState=c[1],a.attempt(c[0].continuation,i,j)(b)}return j(b)}function i(a){if(g++,e.containerState._closeFlow){let c;e.containerState._closeFlow=void 0,b&&r();let d=e.events.length,f=d;for(;f--;)if("exit"===e.events[f][0]&&"chunkFlow"===e.events[f][1].type){c=e.events[f][1].end;break}q(g);let h=d;for(;h<e.events.length;)e.events[h][1].end={...c},h++;return a_(e.events,f+1,0,e.events.slice(d)),e.events.length=h,j(a)}return h(a)}function j(c){if(g===f.length){if(!b)return m(c);if(b.currentConstruct&&b.currentConstruct.concrete)return o(c);e.interrupt=!!(b.currentConstruct&&!b._gfmTableDynamicInterruptHack)}return e.containerState={},a.check(bj,k,l)(c)}function k(a){return b&&r(),q(g),m(a)}function l(a){return e.parser.lazy[e.now().line]=g!==f.length,d=e.now().offset,o(a)}function m(b){return e.containerState={},a.attempt(bj,n,o)(b)}function n(a){return g++,f.push([e.currentConstruct,e.containerState]),m(a)}function o(d){if(null===d){b&&r(),q(0),a.consume(d);return}return b=b||e.parser.flow(e.now()),a.enter("chunkFlow",{_tokenizer:b,contentType:"flow",previous:c}),function b(c){if(null===c){p(a.exit("chunkFlow"),!0),q(0),a.consume(c);return}return ba(c)?(a.consume(c),p(a.exit("chunkFlow")),g=0,e.interrupt=void 0,h):(a.consume(c),b)}(d)}function p(a,f){let h=e.sliceStream(a);if(f&&h.push(null),a.previous=c,c&&(c.next=a),c=a,b.defineSkip(a.start),b.write(h),e.parser.lazy[a.start.line]){let a,c,f=b.events.length;for(;f--;)if(b.events[f][1].start.offset<d&&(!b.events[f][1].end||b.events[f][1].end.offset>d))return;let h=e.events.length,i=h;for(;i--;)if("exit"===e.events[i][0]&&"chunkFlow"===e.events[i][1].type){if(a){c=e.events[i][1].end;break}a=!0}for(q(g),f=h;f<e.events.length;)e.events[f][1].end={...c},f++;a_(e.events,i+1,0,e.events.slice(h)),e.events.length=f}}function q(b){let c=f.length;for(;c-- >b;){let b=f[c];e.containerState=b[1],b[0].exit.call(e,a)}f.length=b}function r(){b.write([null]),c=void 0,b=void 0,e.containerState._closeFlow=void 0}}},bj={tokenize:function(a,b,c){return bg(a,a.attempt(this.parser.constructs.document,b,c),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},bk={partial:!0,tokenize:function(a,b,c){return function(b){return bc(b)?bg(a,d,"linePrefix")(b):d(b)};function d(a){return null===a||ba(a)?b(a):c(a)}}};class bl{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,b){let c=null==b?1/0:b;return c<this.left.length?this.left.slice(a,c):a>this.left.length?this.right.slice(this.right.length-c+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-c+this.left.length).reverse())}splice(a,b,c){this.setCursor(Math.trunc(a));let d=this.right.splice(this.right.length-(b||0),1/0);return c&&bm(this.left,c),d.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(a){this.setCursor(1/0),this.left.push(a)}pushMany(a){this.setCursor(1/0),bm(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),bm(this.right,a.reverse())}setCursor(a){if(a!==this.left.length&&(!(a>this.left.length)||0!==this.right.length)&&(!(a<0)||0!==this.left.length))if(a<this.left.length){let b=this.left.splice(a,1/0);bm(this.right,b.reverse())}else{let b=this.right.splice(this.left.length+this.right.length-a,1/0);bm(this.left,b.reverse())}}}function bm(a,b){let c=0;if(b.length<1e4)a.push(...b);else for(;c<b.length;)a.push(...b.slice(c,c+1e4)),c+=1e4}function bn(a){let b,c,d,e,f,g,h,i={},j=-1,k=new bl(a);for(;++j<k.length;){for(;j in i;)j=i[j];if(b=k.get(j),j&&"chunkFlow"===b[1].type&&"listItemPrefix"===k.get(j-1)[1].type&&((d=0)<(g=b[1]._tokenizer.events).length&&"lineEndingBlank"===g[d][1].type&&(d+=2),d<g.length&&"content"===g[d][1].type))for(;++d<g.length&&"content"!==g[d][1].type;)"chunkText"===g[d][1].type&&(g[d][1]._isInFirstContentOfListItem=!0,d++);if("enter"===b[0])b[1].contentType&&(Object.assign(i,function(a,b){let c,d,e=a.get(b)[1],f=a.get(b)[2],g=b-1,h=[],i=e._tokenizer;!i&&(i=f.parser[e.contentType](e.start),e._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));let j=i.events,k=[],l={},m=-1,n=e,o=0,p=0,q=[0];for(;n;){for(;a.get(++g)[1]!==n;);h.push(g),!n._tokenizer&&(c=f.sliceStream(n),n.next||c.push(null),d&&i.defineSkip(n.start),n._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),n._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=n,n=n.next}for(n=e;++m<j.length;)"exit"===j[m][0]&&"enter"===j[m-1][0]&&j[m][1].type===j[m-1][1].type&&j[m][1].start.line!==j[m][1].end.line&&(p=m+1,q.push(p),n._tokenizer=void 0,n.previous=void 0,n=n.next);for(i.events=[],n?(n._tokenizer=void 0,n.previous=void 0):q.pop(),m=q.length;m--;){let b=j.slice(q[m],q[m+1]),c=h.pop();k.push([c,c+b.length-1]),a.splice(c,2,b)}for(k.reverse(),m=-1;++m<k.length;)l[o+k[m][0]]=o+k[m][1],o+=k[m][1]-k[m][0]-1;return l}(k,j)),j=i[j],h=!0);else if(b[1]._container){for(d=j,c=void 0;d--;)if("lineEnding"===(e=k.get(d))[1].type||"lineEndingBlank"===e[1].type)"enter"===e[0]&&(c&&(k.get(c)[1].type="lineEndingBlank"),e[1].type="lineEnding",c=d);else if("linePrefix"===e[1].type||"listItemIndent"===e[1].type);else break;c&&(b[1].end={...k.get(c)[1].start},(f=k.slice(c,j)).unshift(b),k.splice(c,j-c+1,f))}}return a_(a,0,1/0,k.slice(0)),!h}let bo={resolve:function(a){return bn(a),a},tokenize:function(a,b){let c;return function(b){return a.enter("content"),c=a.enter("chunkContent",{contentType:"content"}),d(b)};function d(b){return null===b?e(b):ba(b)?a.check(bp,f,e)(b):(a.consume(b),d)}function e(c){return a.exit("chunkContent"),a.exit("content"),b(c)}function f(b){return a.consume(b),a.exit("chunkContent"),c.next=a.enter("chunkContent",{contentType:"content",previous:c}),c=c.next,d}}},bp={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return a.exit("chunkContent"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,e,"linePrefix")};function e(e){if(null===e||ba(e))return c(e);let f=d.events[d.events.length-1];return!d.parser.constructs.disable.null.includes("codeIndented")&&f&&"linePrefix"===f[1].type&&f[2].sliceSerialize(f[1],!0).length>=4?b(e):a.interrupt(d.parser.constructs.flow,c,b)(e)}}},bq={tokenize:function(a){let b=this,c=a.attempt(bk,function(d){return null===d?void a.consume(d):(a.enter("lineEndingBlank"),a.consume(d),a.exit("lineEndingBlank"),b.currentConstruct=void 0,c)},a.attempt(this.parser.constructs.flowInitial,d,bg(a,a.attempt(this.parser.constructs.flow,d,a.attempt(bo,d)),"linePrefix")));return c;function d(d){return null===d?void a.consume(d):(a.enter("lineEnding"),a.consume(d),a.exit("lineEnding"),b.currentConstruct=void 0,c)}}},br={resolveAll:bv()},bs=bu("string"),bt=bu("text");function bu(a){return{resolveAll:bv("text"===a?bw:void 0),tokenize:function(b){let c=this,d=this.parser.constructs[a],e=b.attempt(d,f,g);return f;function f(a){return i(a)?e(a):g(a)}function g(a){return null===a?void b.consume(a):(b.enter("data"),b.consume(a),h)}function h(a){return i(a)?(b.exit("data"),e(a)):(b.consume(a),h)}function i(a){if(null===a)return!0;let b=d[a],e=-1;if(b)for(;++e<b.length;){let a=b[e];if(!a.previous||a.previous.call(c,c.previous))return!0}return!1}}}}function bv(a){return function(b,c){let d,e=-1;for(;++e<=b.length;)void 0===d?b[e]&&"data"===b[e][1].type&&(d=e,e++):b[e]&&"data"===b[e][1].type||(e!==d+2&&(b[d][1].end=b[e-1][1].end,b.splice(d+2,e-d-2),e=d+2),d=void 0);return a?a(b,c):b}}function bw(a,b){let c=0;for(;++c<=a.length;)if((c===a.length||"lineEnding"===a[c][1].type)&&"data"===a[c-1][1].type){let d,e=a[c-1][1],f=b.sliceStream(e),g=f.length,h=-1,i=0;for(;g--;){let a=f[g];if("string"==typeof a){for(h=a.length;32===a.charCodeAt(h-1);)i++,h--;if(h)break;h=-1}else if(-2===a)d=!0,i++;else if(-1===a);else{g++;break}}if(b._contentTypeTextTrailing&&c===a.length&&(i=0),i){let f={type:c===a.length||d||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:g?h:e.start._bufferIndex+h,_index:e.start._index+g,line:e.end.line,column:e.end.column-i,offset:e.end.offset-i},end:{...e.end}};e.end={...f.start},e.start.offset===e.end.offset?Object.assign(e,f):(a.splice(c,0,["enter",f,b],["exit",f,b]),c+=2)}c++}return a}function bx(a){return null===a||bb(a)||be(a)?1:bd(a)?2:void 0}function by(a,b,c){let d=[],e=-1;for(;++e<a.length;){let f=a[e].resolveAll;f&&!d.includes(f)&&(b=f(b,c),d.push(f))}return b}let bz={name:"attention",resolveAll:function(a,b){let c,d,e,f,g,h,i,j,k=-1;for(;++k<a.length;)if("enter"===a[k][0]&&"attentionSequence"===a[k][1].type&&a[k][1]._close){for(c=k;c--;)if("exit"===a[c][0]&&"attentionSequence"===a[c][1].type&&a[c][1]._open&&b.sliceSerialize(a[c][1]).charCodeAt(0)===b.sliceSerialize(a[k][1]).charCodeAt(0)){if((a[c][1]._close||a[k][1]._open)&&(a[k][1].end.offset-a[k][1].start.offset)%3&&!((a[c][1].end.offset-a[c][1].start.offset+a[k][1].end.offset-a[k][1].start.offset)%3))continue;h=a[c][1].end.offset-a[c][1].start.offset>1&&a[k][1].end.offset-a[k][1].start.offset>1?2:1;let l={...a[c][1].end},m={...a[k][1].start};bA(l,-h),bA(m,h),f={type:h>1?"strongSequence":"emphasisSequence",start:l,end:{...a[c][1].end}},g={type:h>1?"strongSequence":"emphasisSequence",start:{...a[k][1].start},end:m},e={type:h>1?"strongText":"emphasisText",start:{...a[c][1].end},end:{...a[k][1].start}},d={type:h>1?"strong":"emphasis",start:{...f.start},end:{...g.end}},a[c][1].end={...f.start},a[k][1].start={...g.end},i=[],a[c][1].end.offset-a[c][1].start.offset&&(i=a0(i,[["enter",a[c][1],b],["exit",a[c][1],b]])),i=a0(i,[["enter",d,b],["enter",f,b],["exit",f,b],["enter",e,b]]),i=a0(i,by(b.parser.constructs.insideSpan.null,a.slice(c+1,k),b)),i=a0(i,[["exit",e,b],["enter",g,b],["exit",g,b],["exit",d,b]]),a[k][1].end.offset-a[k][1].start.offset?(j=2,i=a0(i,[["enter",a[k][1],b],["exit",a[k][1],b]])):j=0,a_(a,c-1,k-c+3,i),k=c+i.length-j-2;break}}for(k=-1;++k<a.length;)"attentionSequence"===a[k][1].type&&(a[k][1].type="data");return a},tokenize:function(a,b){let c,d=this.parser.constructs.attentionMarkers.null,e=this.previous,f=bx(e);return function(g){return c=g,a.enter("attentionSequence"),function g(h){if(h===c)return a.consume(h),g;let i=a.exit("attentionSequence"),j=bx(h),k=!j||2===j&&f||d.includes(h),l=!f||2===f&&j||d.includes(e);return i._open=!!(42===c?k:k&&(f||!l)),i._close=!!(42===c?l:l&&(j||!k)),b(h)}(g)}}};function bA(a,b){a.column+=b,a.offset+=b,a._bufferIndex+=b}let bB={continuation:{tokenize:function(a,b,c){let d=this;return function(b){return bc(b)?bg(a,e,"linePrefix",d.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):e(b)};function e(d){return a.attempt(bB,b,c)(d)}}},exit:function(a){a.exit("blockQuote")},name:"blockQuote",tokenize:function(a,b,c){let d=this;return function(b){if(62===b){let c=d.containerState;return c.open||(a.enter("blockQuote",{_container:!0}),c.open=!0),a.enter("blockQuotePrefix"),a.enter("blockQuoteMarker"),a.consume(b),a.exit("blockQuoteMarker"),e}return c(b)};function e(c){return bc(c)?(a.enter("blockQuotePrefixWhitespace"),a.consume(c),a.exit("blockQuotePrefixWhitespace"),a.exit("blockQuotePrefix"),b):(a.exit("blockQuotePrefix"),b(c))}}},bC={name:"characterEscape",tokenize:function(a,b,c){return function(b){return a.enter("characterEscape"),a.enter("escapeMarker"),a.consume(b),a.exit("escapeMarker"),d};function d(d){return a9(d)?(a.enter("characterEscapeValue"),a.consume(d),a.exit("characterEscapeValue"),a.exit("characterEscape"),b):c(d)}}},bD={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},bE={}.hasOwnProperty;function bF(a){return!!bE.call(bD,a)&&bD[a]}let bG={name:"characterReference",tokenize:function(a,b,c){let d,e,f=this,g=0;return function(b){return a.enter("characterReference"),a.enter("characterReferenceMarker"),a.consume(b),a.exit("characterReferenceMarker"),h};function h(b){return 35===b?(a.enter("characterReferenceMarkerNumeric"),a.consume(b),a.exit("characterReferenceMarkerNumeric"),i):(a.enter("characterReferenceValue"),d=31,e=a4,j(b))}function i(b){return 88===b||120===b?(a.enter("characterReferenceMarkerHexadecimal"),a.consume(b),a.exit("characterReferenceMarkerHexadecimal"),a.enter("characterReferenceValue"),d=6,e=a8,j):(a.enter("characterReferenceValue"),d=7,e=a7,j(b))}function j(h){if(59===h&&g){let d=a.exit("characterReferenceValue");return e!==a4||bF(f.sliceSerialize(d))?(a.enter("characterReferenceMarker"),a.consume(h),a.exit("characterReferenceMarker"),a.exit("characterReference"),b):c(h)}return e(h)&&g++<d?(a.consume(h),j):c(h)}}},bH={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return null===b?c(b):(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e)};function e(a){return d.parser.lazy[d.now().line]?c(a):b(a)}}},bI={concrete:!0,name:"codeFenced",tokenize:function(a,b,c){let d,e=this,f={partial:!0,tokenize:function(a,b,c){let f=0;return function(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),g};function g(b){return a.enter("codeFencedFence"),bc(b)?bg(a,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):i(b)}function i(b){return b===d?(a.enter("codeFencedFenceSequence"),function b(e){return e===d?(f++,a.consume(e),b):f>=h?(a.exit("codeFencedFenceSequence"),bc(e)?bg(a,j,"whitespace")(e):j(e)):c(e)}(b)):c(b)}function j(d){return null===d||ba(d)?(a.exit("codeFencedFence"),b(d)):c(d)}}},g=0,h=0;return function(b){var f;let j;return f=b,g=(j=e.events[e.events.length-1])&&"linePrefix"===j[1].type?j[2].sliceSerialize(j[1],!0).length:0,d=f,a.enter("codeFenced"),a.enter("codeFencedFence"),a.enter("codeFencedFenceSequence"),function b(e){return e===d?(h++,a.consume(e),b):h<3?c(e):(a.exit("codeFencedFenceSequence"),bc(e)?bg(a,i,"whitespace")(e):i(e))}(f)};function i(f){return null===f||ba(f)?(a.exit("codeFencedFence"),e.interrupt?b(f):a.check(bH,k,o)(f)):(a.enter("codeFencedFenceInfo"),a.enter("chunkString",{contentType:"string"}),function b(e){return null===e||ba(e)?(a.exit("chunkString"),a.exit("codeFencedFenceInfo"),i(e)):bc(e)?(a.exit("chunkString"),a.exit("codeFencedFenceInfo"),bg(a,j,"whitespace")(e)):96===e&&e===d?c(e):(a.consume(e),b)}(f))}function j(b){return null===b||ba(b)?i(b):(a.enter("codeFencedFenceMeta"),a.enter("chunkString",{contentType:"string"}),function b(e){return null===e||ba(e)?(a.exit("chunkString"),a.exit("codeFencedFenceMeta"),i(e)):96===e&&e===d?c(e):(a.consume(e),b)}(b))}function k(b){return a.attempt(f,o,l)(b)}function l(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),m}function m(b){return g>0&&bc(b)?bg(a,n,"linePrefix",g+1)(b):n(b)}function n(b){return null===b||ba(b)?a.check(bH,k,o)(b):(a.enter("codeFlowValue"),function b(c){return null===c||ba(c)?(a.exit("codeFlowValue"),n(c)):(a.consume(c),b)}(b))}function o(c){return a.exit("codeFenced"),b(c)}}},bJ={name:"codeIndented",tokenize:function(a,b,c){let d=this;return function(b){return a.enter("codeIndented"),bg(a,e,"linePrefix",5)(b)};function e(b){let e=d.events[d.events.length-1];return e&&"linePrefix"===e[1].type&&e[2].sliceSerialize(e[1],!0).length>=4?function b(c){return null===c?f(c):ba(c)?a.attempt(bK,b,f)(c):(a.enter("codeFlowValue"),function c(d){return null===d||ba(d)?(a.exit("codeFlowValue"),b(d)):(a.consume(d),c)}(c))}(b):c(b)}function f(c){return a.exit("codeIndented"),b(c)}}},bK={partial:!0,tokenize:function(a,b,c){let d=this;return e;function e(b){return d.parser.lazy[d.now().line]?c(b):ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e):bg(a,f,"linePrefix",5)(b)}function f(a){let f=d.events[d.events.length-1];return f&&"linePrefix"===f[1].type&&f[2].sliceSerialize(f[1],!0).length>=4?b(a):ba(a)?e(a):c(a)}}};function bL(a,b,c,d,e,f,g,h,i){let j=i||1/0,k=0;return function(b){return 60===b?(a.enter(d),a.enter(e),a.enter(f),a.consume(b),a.exit(f),l):null===b||32===b||41===b||a6(b)?c(b):(a.enter(d),a.enter(g),a.enter(h),a.enter("chunkString",{contentType:"string"}),o(b))};function l(c){return 62===c?(a.enter(f),a.consume(c),a.exit(f),a.exit(e),a.exit(d),b):(a.enter(h),a.enter("chunkString",{contentType:"string"}),m(c))}function m(b){return 62===b?(a.exit("chunkString"),a.exit(h),l(b)):null===b||60===b||ba(b)?c(b):(a.consume(b),92===b?n:m)}function n(b){return 60===b||62===b||92===b?(a.consume(b),m):m(b)}function o(e){return!k&&(null===e||41===e||bb(e))?(a.exit("chunkString"),a.exit(h),a.exit(g),a.exit(d),b(e)):k<j&&40===e?(a.consume(e),k++,o):41===e?(a.consume(e),k--,o):null===e||32===e||40===e||a6(e)?c(e):(a.consume(e),92===e?p:o)}function p(b){return 40===b||41===b||92===b?(a.consume(b),o):o(b)}}function bM(a,b,c,d,e,f){let g,h=this,i=0;return function(b){return a.enter(d),a.enter(e),a.consume(b),a.exit(e),a.enter(f),j};function j(l){return i>999||null===l||91===l||93===l&&!g||94===l&&!i&&"_hiddenFootnoteSupport"in h.parser.constructs?c(l):93===l?(a.exit(f),a.enter(e),a.consume(l),a.exit(e),a.exit(d),b):ba(l)?(a.enter("lineEnding"),a.consume(l),a.exit("lineEnding"),j):(a.enter("chunkString",{contentType:"string"}),k(l))}function k(b){return null===b||91===b||93===b||ba(b)||i++>999?(a.exit("chunkString"),j(b)):(a.consume(b),g||(g=!bc(b)),92===b?l:k)}function l(b){return 91===b||92===b||93===b?(a.consume(b),i++,k):k(b)}}function bN(a,b,c,d,e,f){let g;return function(b){return 34===b||39===b||40===b?(a.enter(d),a.enter(e),a.consume(b),a.exit(e),g=40===b?41:b,h):c(b)};function h(c){return c===g?(a.enter(e),a.consume(c),a.exit(e),a.exit(d),b):(a.enter(f),i(c))}function i(b){return b===g?(a.exit(f),h(g)):null===b?c(b):ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,i,"linePrefix")):(a.enter("chunkString",{contentType:"string"}),j(b))}function j(b){return b===g||null===b||ba(b)?(a.exit("chunkString"),i(b)):(a.consume(b),92===b?k:j)}function k(b){return b===g||92===b?(a.consume(b),j):j(b)}}function bO(a,b){let c;return function d(e){return ba(e)?(a.enter("lineEnding"),a.consume(e),a.exit("lineEnding"),c=!0,d):bc(e)?bg(a,d,c?"linePrefix":"lineSuffix")(e):b(e)}}function bP(a){return a.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let bQ={partial:!0,tokenize:function(a,b,c){return function(b){return bb(b)?bO(a,d)(b):c(b)};function d(b){return bN(a,e,c,"definitionTitle","definitionTitleMarker","definitionTitleString")(b)}function e(b){return bc(b)?bg(a,f,"whitespace")(b):f(b)}function f(a){return null===a||ba(a)?b(a):c(a)}}},bR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],bS=["pre","script","style","textarea"],bT={partial:!0,tokenize:function(a,b,c){return function(d){return a.enter("lineEnding"),a.consume(d),a.exit("lineEnding"),a.attempt(bk,b,c)}}},bU={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e):c(b)};function e(a){return d.parser.lazy[d.now().line]?c(a):b(a)}}},bV={name:"labelEnd",resolveAll:function(a){let b=-1,c=[];for(;++b<a.length;){let d=a[b][1];if(c.push(a[b]),"labelImage"===d.type||"labelLink"===d.type||"labelEnd"===d.type){let a="labelImage"===d.type?4:2;d.type="data",b+=a}}return a.length!==c.length&&a_(a,0,a.length,c),a},resolveTo:function(a,b){let c,d,e,f,g=a.length,h=0;for(;g--;)if(c=a[g][1],d){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===a[g][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(e){if("enter"===a[g][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(d=g,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(e=g);let i={type:"labelLink"===a[d][1].type?"link":"image",start:{...a[d][1].start},end:{...a[a.length-1][1].end}},j={type:"label",start:{...a[d][1].start},end:{...a[e][1].end}},k={type:"labelText",start:{...a[d+h+2][1].end},end:{...a[e-2][1].start}};return f=a0(f=[["enter",i,b],["enter",j,b]],a.slice(d+1,d+h+3)),f=a0(f,[["enter",k,b]]),f=a0(f,by(b.parser.constructs.insideSpan.null,a.slice(d+h+4,e-3),b)),f=a0(f,[["exit",k,b],a[e-2],a[e-1],["exit",j,b]]),f=a0(f,a.slice(e+1)),f=a0(f,[["exit",i,b]]),a_(a,d,a.length,f),a},tokenize:function(a,b,c){let d,e,f=this,g=f.events.length;for(;g--;)if(("labelImage"===f.events[g][1].type||"labelLink"===f.events[g][1].type)&&!f.events[g][1]._balanced){d=f.events[g][1];break}return function(b){return d?d._inactive?k(b):(e=f.parser.defined.includes(bP(f.sliceSerialize({start:d.end,end:f.now()}))),a.enter("labelEnd"),a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelEnd"),h):c(b)};function h(b){return 40===b?a.attempt(bW,j,e?j:k)(b):91===b?a.attempt(bX,j,e?i:k)(b):e?j(b):k(b)}function i(b){return a.attempt(bY,j,k)(b)}function j(a){return b(a)}function k(a){return d._balanced=!0,c(a)}}},bW={tokenize:function(a,b,c){return function(b){return a.enter("resource"),a.enter("resourceMarker"),a.consume(b),a.exit("resourceMarker"),d};function d(b){return bb(b)?bO(a,e)(b):e(b)}function e(b){return 41===b?j(b):bL(a,f,g,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function f(b){return bb(b)?bO(a,h)(b):j(b)}function g(a){return c(a)}function h(b){return 34===b||39===b||40===b?bN(a,i,c,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):j(b)}function i(b){return bb(b)?bO(a,j)(b):j(b)}function j(d){return 41===d?(a.enter("resourceMarker"),a.consume(d),a.exit("resourceMarker"),a.exit("resource"),b):c(d)}}},bX={tokenize:function(a,b,c){let d=this;return function(b){return bM.call(d,a,e,f,"reference","referenceMarker","referenceString")(b)};function e(a){return d.parser.defined.includes(bP(d.sliceSerialize(d.events[d.events.length-1][1]).slice(1,-1)))?b(a):c(a)}function f(a){return c(a)}}},bY={tokenize:function(a,b,c){return function(b){return a.enter("reference"),a.enter("referenceMarker"),a.consume(b),a.exit("referenceMarker"),d};function d(d){return 93===d?(a.enter("referenceMarker"),a.consume(d),a.exit("referenceMarker"),a.exit("reference"),b):c(d)}}},bZ={name:"labelStartImage",resolveAll:bV.resolveAll,tokenize:function(a,b,c){let d=this;return function(b){return a.enter("labelImage"),a.enter("labelImageMarker"),a.consume(b),a.exit("labelImageMarker"),e};function e(b){return 91===b?(a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelImage"),f):c(b)}function f(a){return 94===a&&"_hiddenFootnoteSupport"in d.parser.constructs?c(a):b(a)}}},b$={name:"labelStartLink",resolveAll:bV.resolveAll,tokenize:function(a,b,c){let d=this;return function(b){return a.enter("labelLink"),a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelLink"),e};function e(a){return 94===a&&"_hiddenFootnoteSupport"in d.parser.constructs?c(a):b(a)}}},b_={name:"lineEnding",tokenize:function(a,b){return function(c){return a.enter("lineEnding"),a.consume(c),a.exit("lineEnding"),bg(a,b,"linePrefix")}}},b0={name:"thematicBreak",tokenize:function(a,b,c){let d,e=0;return function(f){var g;return a.enter("thematicBreak"),d=g=f,function f(g){return g===d?(a.enter("thematicBreakSequence"),function b(c){return c===d?(a.consume(c),e++,b):(a.exit("thematicBreakSequence"),bc(c)?bg(a,f,"whitespace")(c):f(c))}(g)):e>=3&&(null===g||ba(g))?(a.exit("thematicBreak"),b(g)):c(g)}(g)}}},b1={continuation:{tokenize:function(a,b,c){let d=this;return d.containerState._closeFlow=void 0,a.check(bk,function(c){return d.containerState.furtherBlankLines=d.containerState.furtherBlankLines||d.containerState.initialBlankLine,bg(a,b,"listItemIndent",d.containerState.size+1)(c)},function(c){return d.containerState.furtherBlankLines||!bc(c)?(d.containerState.furtherBlankLines=void 0,d.containerState.initialBlankLine=void 0,e(c)):(d.containerState.furtherBlankLines=void 0,d.containerState.initialBlankLine=void 0,a.attempt(b3,b,e)(c))});function e(e){return d.containerState._closeFlow=!0,d.interrupt=void 0,bg(a,a.attempt(b1,b,c),"linePrefix",d.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(e)}}},exit:function(a){a.exit(this.containerState.type)},name:"list",tokenize:function(a,b,c){let d=this,e=d.events[d.events.length-1],f=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0,g=0;return function(b){let e=d.containerState.type||(42===b||43===b||45===b?"listUnordered":"listOrdered");if("listUnordered"===e?!d.containerState.marker||b===d.containerState.marker:a7(b)){if(d.containerState.type||(d.containerState.type=e,a.enter(e,{_container:!0})),"listUnordered"===e)return a.enter("listItemPrefix"),42===b||45===b?a.check(b0,c,h)(b):h(b);if(!d.interrupt||49===b)return a.enter("listItemPrefix"),a.enter("listItemValue"),function b(e){return a7(e)&&++g<10?(a.consume(e),b):(!d.interrupt||g<2)&&(d.containerState.marker?e===d.containerState.marker:41===e||46===e)?(a.exit("listItemValue"),h(e)):c(e)}(b)}return c(b)};function h(b){return a.enter("listItemMarker"),a.consume(b),a.exit("listItemMarker"),d.containerState.marker=d.containerState.marker||b,a.check(bk,d.interrupt?c:i,a.attempt(b2,k,j))}function i(a){return d.containerState.initialBlankLine=!0,f++,k(a)}function j(b){return bc(b)?(a.enter("listItemPrefixWhitespace"),a.consume(b),a.exit("listItemPrefixWhitespace"),k):c(b)}function k(c){return d.containerState.size=f+d.sliceSerialize(a.exit("listItemPrefix"),!0).length,b(c)}}},b2={partial:!0,tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return!bc(a)&&e&&"listItemPrefixWhitespace"===e[1].type?b(a):c(a)},"listItemPrefixWhitespace",d.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},b3={partial:!0,tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return e&&"listItemIndent"===e[1].type&&e[2].sliceSerialize(e[1],!0).length===d.containerState.size?b(a):c(a)},"listItemIndent",d.containerState.size+1)}},b4={name:"setextUnderline",resolveTo:function(a,b){let c,d,e,f=a.length;for(;f--;)if("enter"===a[f][0]){if("content"===a[f][1].type){c=f;break}"paragraph"===a[f][1].type&&(d=f)}else"content"===a[f][1].type&&a.splice(f,1),e||"definition"!==a[f][1].type||(e=f);let g={type:"setextHeading",start:{...a[c][1].start},end:{...a[a.length-1][1].end}};return a[d][1].type="setextHeadingText",e?(a.splice(d,0,["enter",g,b]),a.splice(e+1,0,["exit",a[c][1],b]),a[c][1].end={...a[e][1].end}):a[c][1]=g,a.push(["exit",g,b]),a},tokenize:function(a,b,c){let d,e=this;return function(b){var g;let h,i=e.events.length;for(;i--;)if("lineEnding"!==e.events[i][1].type&&"linePrefix"!==e.events[i][1].type&&"content"!==e.events[i][1].type){h="paragraph"===e.events[i][1].type;break}return!e.parser.lazy[e.now().line]&&(e.interrupt||h)?(a.enter("setextHeadingLine"),d=b,g=b,a.enter("setextHeadingLineSequence"),function b(c){return c===d?(a.consume(c),b):(a.exit("setextHeadingLineSequence"),bc(c)?bg(a,f,"lineSuffix")(c):f(c))}(g)):c(b)};function f(d){return null===d||ba(d)?(a.exit("setextHeadingLine"),b(d)):c(d)}}};a.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(a,b,c){let d,e=this;return function(b){var d;return a.enter("definition"),d=b,bM.call(e,a,f,c,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)};function f(b){return(d=bP(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),58===b)?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),g):c(b)}function g(b){return bb(b)?bO(a,h)(b):h(b)}function h(b){return bL(a,i,c,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function i(b){return a.attempt(bQ,j,j)(b)}function j(b){return bc(b)?bg(a,k,"whitespace")(b):k(b)}function k(f){return null===f||ba(f)?(a.exit("definition"),e.parser.defined.push(d),b(f)):c(f)}}}},"disable",0,{null:[]},"document",0,{42:b1,43:b1,45:b1,48:b1,49:b1,50:b1,51:b1,52:b1,53:b1,54:b1,55:b1,56:b1,57:b1,62:bB},"flow",0,{35:{name:"headingAtx",resolve:function(a,b){let c,d,e=a.length-2,f=3;return"whitespace"===a[3][1].type&&(f+=2),e-2>f&&"whitespace"===a[e][1].type&&(e-=2),"atxHeadingSequence"===a[e][1].type&&(f===e-1||e-4>f&&"whitespace"===a[e-2][1].type)&&(e-=f+1===e?2:4),e>f&&(c={type:"atxHeadingText",start:a[f][1].start,end:a[e][1].end},d={type:"chunkText",start:a[f][1].start,end:a[e][1].end,contentType:"text"},a_(a,f,e-f+1,[["enter",c,b],["enter",d,b],["exit",d,b],["exit",c,b]])),a},tokenize:function(a,b,c){let d=0;return function(e){var f;return a.enter("atxHeading"),f=e,a.enter("atxHeadingSequence"),function e(f){return 35===f&&d++<6?(a.consume(f),e):null===f||bb(f)?(a.exit("atxHeadingSequence"),function c(d){return 35===d?(a.enter("atxHeadingSequence"),function b(d){return 35===d?(a.consume(d),b):(a.exit("atxHeadingSequence"),c(d))}(d)):null===d||ba(d)?(a.exit("atxHeading"),b(d)):bc(d)?bg(a,c,"whitespace")(d):(a.enter("atxHeadingText"),function b(d){return null===d||35===d||bb(d)?(a.exit("atxHeadingText"),c(d)):(a.consume(d),b)}(d))}(f)):c(f)}(f)}}},42:b0,45:[b4,b0],60:{concrete:!0,name:"htmlFlow",resolveTo:function(a){let b=a.length;for(;b--&&("enter"!==a[b][0]||"htmlFlow"!==a[b][1].type););return b>1&&"linePrefix"===a[b-2][1].type&&(a[b][1].start=a[b-2][1].start,a[b+1][1].start=a[b-2][1].start,a.splice(b-2,2)),a},tokenize:function(a,b,c){let d,e,f,g,h,i=this;return function(b){var c;return c=b,a.enter("htmlFlow"),a.enter("htmlFlowData"),a.consume(c),j};function j(g){return 33===g?(a.consume(g),k):47===g?(a.consume(g),e=!0,n):63===g?(a.consume(g),d=3,i.interrupt?b:G):a3(g)?(a.consume(g),f=String.fromCharCode(g),o):c(g)}function k(e){return 45===e?(a.consume(e),d=2,l):91===e?(a.consume(e),d=5,g=0,m):a3(e)?(a.consume(e),d=4,i.interrupt?b:G):c(e)}function l(d){return 45===d?(a.consume(d),i.interrupt?b:G):c(d)}function m(d){let e="CDATA[";return d===e.charCodeAt(g++)?(a.consume(d),g===e.length)?i.interrupt?b:y:m:c(d)}function n(b){return a3(b)?(a.consume(b),f=String.fromCharCode(b),o):c(b)}function o(g){if(null===g||47===g||62===g||bb(g)){let h=47===g,j=f.toLowerCase();return!h&&!e&&bS.includes(j)?(d=1,i.interrupt?b(g):y(g)):bR.includes(f.toLowerCase())?(d=6,h)?(a.consume(g),p):i.interrupt?b(g):y(g):(d=7,i.interrupt&&!i.parser.lazy[i.now().line]?c(g):e?function b(c){return bc(c)?(a.consume(c),b):w(c)}(g):q(g))}return 45===g||a4(g)?(a.consume(g),f+=String.fromCharCode(g),o):c(g)}function p(d){return 62===d?(a.consume(d),i.interrupt?b:y):c(d)}function q(b){return 47===b?(a.consume(b),w):58===b||95===b||a3(b)?(a.consume(b),r):bc(b)?(a.consume(b),q):w(b)}function r(b){return 45===b||46===b||58===b||95===b||a4(b)?(a.consume(b),r):s(b)}function s(b){return 61===b?(a.consume(b),t):bc(b)?(a.consume(b),s):q(b)}function t(b){return null===b||60===b||61===b||62===b||96===b?c(b):34===b||39===b?(a.consume(b),h=b,u):bc(b)?(a.consume(b),t):function b(c){return null===c||34===c||39===c||47===c||60===c||61===c||62===c||96===c||bb(c)?s(c):(a.consume(c),b)}(b)}function u(b){return b===h?(a.consume(b),h=null,v):null===b||ba(b)?c(b):(a.consume(b),u)}function v(a){return 47===a||62===a||bc(a)?q(a):c(a)}function w(b){return 62===b?(a.consume(b),x):c(b)}function x(b){return null===b||ba(b)?y(b):bc(b)?(a.consume(b),x):c(b)}function y(b){return 45===b&&2===d?(a.consume(b),C):60===b&&1===d?(a.consume(b),D):62===b&&4===d?(a.consume(b),H):63===b&&3===d?(a.consume(b),G):93===b&&5===d?(a.consume(b),F):ba(b)&&(6===d||7===d)?(a.exit("htmlFlowData"),a.check(bT,I,z)(b)):null===b||ba(b)?(a.exit("htmlFlowData"),z(b)):(a.consume(b),y)}function z(b){return a.check(bU,A,I)(b)}function A(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),B}function B(b){return null===b||ba(b)?z(b):(a.enter("htmlFlowData"),y(b))}function C(b){return 45===b?(a.consume(b),G):y(b)}function D(b){return 47===b?(a.consume(b),f="",E):y(b)}function E(b){if(62===b){let c=f.toLowerCase();return bS.includes(c)?(a.consume(b),H):y(b)}return a3(b)&&f.length<8?(a.consume(b),f+=String.fromCharCode(b),E):y(b)}function F(b){return 93===b?(a.consume(b),G):y(b)}function G(b){return 62===b?(a.consume(b),H):45===b&&2===d?(a.consume(b),G):y(b)}function H(b){return null===b||ba(b)?(a.exit("htmlFlowData"),I(b)):(a.consume(b),H)}function I(c){return a.exit("htmlFlow"),b(c)}}},61:b4,95:b0,96:bI,126:bI},"flowInitial",0,{[-2]:bJ,[-1]:bJ,32:bJ},"insideSpan",0,{null:[bz,br]},"string",0,{38:bG,92:bC},"text",0,{[-5]:b_,[-4]:b_,[-3]:b_,33:bZ,38:bG,42:bz,60:[{name:"autolink",tokenize:function(a,b,c){let d=0;return function(b){return a.enter("autolink"),a.enter("autolinkMarker"),a.consume(b),a.exit("autolinkMarker"),a.enter("autolinkProtocol"),e};function e(b){return a3(b)?(a.consume(b),f):64===b?c(b):h(b)}function f(b){return 43===b||45===b||46===b||a4(b)?(d=1,function b(c){return 58===c?(a.consume(c),d=0,g):(43===c||45===c||46===c||a4(c))&&d++<32?(a.consume(c),b):(d=0,h(c))}(b)):h(b)}function g(d){return 62===d?(a.exit("autolinkProtocol"),a.enter("autolinkMarker"),a.consume(d),a.exit("autolinkMarker"),a.exit("autolink"),b):null===d||32===d||60===d||a6(d)?c(d):(a.consume(d),g)}function h(b){return 64===b?(a.consume(b),i):a5(b)?(a.consume(b),h):c(b)}function i(e){return a4(e)?function e(f){return 46===f?(a.consume(f),d=0,i):62===f?(a.exit("autolinkProtocol").type="autolinkEmail",a.enter("autolinkMarker"),a.consume(f),a.exit("autolinkMarker"),a.exit("autolink"),b):function b(f){if((45===f||a4(f))&&d++<63){let c=45===f?b:e;return a.consume(f),c}return c(f)}(f)}(e):c(e)}}},{name:"htmlText",tokenize:function(a,b,c){let d,e,f,g=this;return function(b){return a.enter("htmlText"),a.enter("htmlTextData"),a.consume(b),h};function h(b){return 33===b?(a.consume(b),i):47===b?(a.consume(b),u):63===b?(a.consume(b),s):a3(b)?(a.consume(b),w):c(b)}function i(b){return 45===b?(a.consume(b),j):91===b?(a.consume(b),e=0,n):a3(b)?(a.consume(b),r):c(b)}function j(b){return 45===b?(a.consume(b),m):c(b)}function k(b){return null===b?c(b):45===b?(a.consume(b),l):ba(b)?(f=k,E(b)):(a.consume(b),k)}function l(b){return 45===b?(a.consume(b),m):k(b)}function m(a){return 62===a?D(a):45===a?l(a):k(a)}function n(b){let d="CDATA[";return b===d.charCodeAt(e++)?(a.consume(b),e===d.length?o:n):c(b)}function o(b){return null===b?c(b):93===b?(a.consume(b),p):ba(b)?(f=o,E(b)):(a.consume(b),o)}function p(b){return 93===b?(a.consume(b),q):o(b)}function q(b){return 62===b?D(b):93===b?(a.consume(b),q):o(b)}function r(b){return null===b||62===b?D(b):ba(b)?(f=r,E(b)):(a.consume(b),r)}function s(b){return null===b?c(b):63===b?(a.consume(b),t):ba(b)?(f=s,E(b)):(a.consume(b),s)}function t(a){return 62===a?D(a):s(a)}function u(b){return a3(b)?(a.consume(b),v):c(b)}function v(b){return 45===b||a4(b)?(a.consume(b),v):function b(c){return ba(c)?(f=b,E(c)):bc(c)?(a.consume(c),b):D(c)}(b)}function w(b){return 45===b||a4(b)?(a.consume(b),w):47===b||62===b||bb(b)?x(b):c(b)}function x(b){return 47===b?(a.consume(b),D):58===b||95===b||a3(b)?(a.consume(b),y):ba(b)?(f=x,E(b)):bc(b)?(a.consume(b),x):D(b)}function y(b){return 45===b||46===b||58===b||95===b||a4(b)?(a.consume(b),y):function b(c){return 61===c?(a.consume(c),z):ba(c)?(f=b,E(c)):bc(c)?(a.consume(c),b):x(c)}(b)}function z(b){return null===b||60===b||61===b||62===b||96===b?c(b):34===b||39===b?(a.consume(b),d=b,A):ba(b)?(f=z,E(b)):bc(b)?(a.consume(b),z):(a.consume(b),B)}function A(b){return b===d?(a.consume(b),d=void 0,C):null===b?c(b):ba(b)?(f=A,E(b)):(a.consume(b),A)}function B(b){return null===b||34===b||39===b||60===b||61===b||96===b?c(b):47===b||62===b||bb(b)?x(b):(a.consume(b),B)}function C(a){return 47===a||62===a||bb(a)?x(a):c(a)}function D(d){return 62===d?(a.consume(d),a.exit("htmlTextData"),a.exit("htmlText"),b):c(d)}function E(b){return a.exit("htmlTextData"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),F}function F(b){return bc(b)?bg(a,G,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):G(b)}function G(b){return a.enter("htmlTextData"),f(b)}}}],91:b$,92:[{name:"hardBreakEscape",tokenize:function(a,b,c){return function(b){return a.enter("hardBreakEscape"),a.consume(b),d};function d(d){return ba(d)?(a.exit("hardBreakEscape"),b(d)):c(d)}}},bC],93:bV,95:bz,96:{name:"codeText",previous:function(a){return 96!==a||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(a){let b,c,d=a.length-4,e=3;if(("lineEnding"===a[3][1].type||"space"===a[e][1].type)&&("lineEnding"===a[d][1].type||"space"===a[d][1].type)){for(b=e;++b<d;)if("codeTextData"===a[b][1].type){a[e][1].type="codeTextPadding",a[d][1].type="codeTextPadding",e+=2,d-=2;break}}for(b=e-1,d++;++b<=d;)void 0===c?b!==d&&"lineEnding"!==a[b][1].type&&(c=b):(b===d||"lineEnding"===a[b][1].type)&&(a[c][1].type="codeTextData",b!==c+2&&(a[c][1].end=a[b-1][1].end,a.splice(c+2,b-c-2),d-=b-c-2,b=c+2),c=void 0);return a},tokenize:function(a,b,c){let d,e,f=0;return function(b){return a.enter("codeText"),a.enter("codeTextSequence"),function b(c){return 96===c?(a.consume(c),f++,b):(a.exit("codeTextSequence"),g(c))}(b)};function g(i){return null===i?c(i):32===i?(a.enter("space"),a.consume(i),a.exit("space"),g):96===i?(e=a.enter("codeTextSequence"),d=0,function c(g){return 96===g?(a.consume(g),d++,c):d===f?(a.exit("codeTextSequence"),a.exit("codeText"),b(g)):(e.type="codeTextData",h(g))}(i)):ba(i)?(a.enter("lineEnding"),a.consume(i),a.exit("lineEnding"),g):(a.enter("codeTextData"),h(i))}function h(b){return null===b||32===b||96===b||ba(b)?(a.exit("codeTextData"),g(b)):(a.consume(b),h)}}}}],31051);var b5=a.i(31051);let b6=/[\0\t\n\r]/g;function b7(a,b){let c=Number.parseInt(a,b);return c<9||11===c||c>13&&c<32||c>126&&c<160||c>55295&&c<57344||c>64975&&c<65008||(65535&c)==65535||(65535&c)==65534||c>1114111?"�":String.fromCodePoint(c)}let b8=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function b9(a,b,c){if(b)return b;if(35===c.charCodeAt(0)){let a=c.charCodeAt(1),b=120===a||88===a;return b7(c.slice(b?2:1),b?16:10)}return bF(c)||a}let ca={}.hasOwnProperty;function cb(a){return{line:a.line,column:a.column,offset:a.offset}}function cc(a,b){if(a)throw Error("Cannot close `"+a.type+"` ("+aE({start:a.start,end:a.end})+"): a different token (`"+b.type+"`, "+aE({start:b.start,end:b.end})+") is open");throw Error("Cannot close document, a token (`"+b.type+"`, "+aE({start:b.start,end:b.end})+") is still open")}function cd(a){let b=this;b.parser=function(c){var d,e;let f,g,h,i;return"string"!=typeof(d={...b.data("settings"),...a,extensions:b.data("micromarkExtensions")||[],mdastExtensions:b.data("fromMarkdownExtensions")||[]})&&(e=d,d=void 0),(function(a){let b={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:d(r),autolinkProtocol:j,autolinkEmail:j,atxHeading:d(o),blockQuote:d(function(){return{type:"blockquote",children:[]}}),characterEscape:j,characterReference:j,codeFenced:d(n),codeFencedFenceInfo:e,codeFencedFenceMeta:e,codeIndented:d(n,e),codeText:d(function(){return{type:"inlineCode",value:""}},e),codeTextData:j,data:j,codeFlowValue:j,definition:d(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:e,definitionLabelString:e,definitionTitleString:e,emphasis:d(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:d(p),hardBreakTrailing:d(p),htmlFlow:d(q,e),htmlFlowData:j,htmlText:d(q,e),htmlTextData:j,image:d(function(){return{type:"image",title:null,url:"",alt:null}}),label:e,link:d(r),listItem:d(function(a){return{type:"listItem",spread:a._spread,checked:null,children:[]}}),listItemValue:function(a){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(a),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:d(s,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:d(s),paragraph:d(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:e,resourceDestinationString:e,resourceTitleString:e,setextHeading:d(o),strong:d(function(){return{type:"strong",children:[]}}),thematicBreak:d(function(){return{type:"thematicBreak"}})},exit:{atxHeading:g(),atxHeadingSequence:function(a){let b=this.stack[this.stack.length-1];b.depth||(b.depth=this.sliceSerialize(a).length)},autolink:g(),autolinkEmail:function(a){k.call(this,a),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(a)},autolinkProtocol:function(a){k.call(this,a),this.stack[this.stack.length-1].url=this.sliceSerialize(a)},blockQuote:g(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:m,characterReferenceMarkerNumeric:m,characterReferenceValue:function(a){let b,c=this.sliceSerialize(a),d=this.data.characterReferenceType;d?(b=b7(c,"characterReferenceMarkerNumeric"===d?10:16),this.data.characterReferenceType=void 0):b=bF(c);let e=this.stack[this.stack.length-1];e.value+=b},characterReference:function(a){this.stack.pop().position.end=cb(a.end)},codeFenced:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let a=this.resume();this.stack[this.stack.length-1].lang=a},codeFencedFenceMeta:function(){let a=this.resume();this.stack[this.stack.length-1].meta=a},codeFlowValue:k,codeIndented:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a.replace(/(\r?\n|\r)$/g,"")}),codeText:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),codeTextData:k,data:k,definition:g(),definitionDestinationString:function(){let a=this.resume();this.stack[this.stack.length-1].url=a},definitionLabelString:function(a){let b=this.resume(),c=this.stack[this.stack.length-1];c.label=b,c.identifier=bP(this.sliceSerialize(a)).toLowerCase()},definitionTitleString:function(){let a=this.resume();this.stack[this.stack.length-1].title=a},emphasis:g(),hardBreakEscape:g(l),hardBreakTrailing:g(l),htmlFlow:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),htmlFlowData:k,htmlText:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),htmlTextData:k,image:g(function(){let a=this.stack[this.stack.length-1];if(this.data.inReference){let b=this.data.referenceType||"shortcut";a.type+="Reference",a.referenceType=b,delete a.url,delete a.title}else delete a.identifier,delete a.label;this.data.referenceType=void 0}),label:function(){let a=this.stack[this.stack.length-1],b=this.resume(),c=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===c.type?c.children=a.children:c.alt=b},labelText:function(a){let b=this.sliceSerialize(a),c=this.stack[this.stack.length-2];c.label=b.replace(b8,b9),c.identifier=bP(b).toLowerCase()},lineEnding:function(a){let c=this.stack[this.stack.length-1];if(this.data.atHardBreak){c.children[c.children.length-1].position.end=cb(a.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&b.canContainEols.includes(c.type)&&(j.call(this,a),k.call(this,a))},link:g(function(){let a=this.stack[this.stack.length-1];if(this.data.inReference){let b=this.data.referenceType||"shortcut";a.type+="Reference",a.referenceType=b,delete a.url,delete a.title}else delete a.identifier,delete a.label;this.data.referenceType=void 0}),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:function(a){let b=this.resume(),c=this.stack[this.stack.length-1];c.label=b,c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let a=this.resume();this.stack[this.stack.length-1].url=a},resourceTitleString:function(){let a=this.resume();this.stack[this.stack.length-1].title=a},resource:function(){this.data.inReference=void 0},setextHeading:g(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(a){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(a).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:g(),thematicBreak:g()}};!function a(b,c){let d=-1;for(;++d<c.length;){let e=c[d];Array.isArray(e)?a(b,e):function(a,b){let c;for(c in b)if(ca.call(b,c))switch(c){case"canContainEols":{let d=b[c];d&&a[c].push(...d);break}case"transforms":{let d=b[c];d&&a[c].push(...d);break}case"enter":case"exit":{let d=b[c];d&&Object.assign(a[c],d)}}}(b,e)}}(b,(a||{}).mdastExtensions||[]);let c={};return function(a){let d={type:"root",children:[]},g={stack:[d],tokenStack:[],config:b,enter:f,exit:h,buffer:e,resume:i,data:c},j=[],k=-1;for(;++k<a.length;)("listOrdered"===a[k][1].type||"listUnordered"===a[k][1].type)&&("enter"===a[k][0]?j.push(k):k=function(a,b,c){let d,e,f,g,h=b-1,i=-1,j=!1;for(;++h<=c;){let b=a[h];switch(b[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===b[0]?i++:i--,g=void 0;break;case"lineEndingBlank":"enter"===b[0]&&(!d||g||i||f||(f=h),g=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:g=void 0}if(!i&&"enter"===b[0]&&"listItemPrefix"===b[1].type||-1===i&&"exit"===b[0]&&("listUnordered"===b[1].type||"listOrdered"===b[1].type)){if(d){let g=h;for(e=void 0;g--;){let b=a[g];if("lineEnding"===b[1].type||"lineEndingBlank"===b[1].type){if("exit"===b[0])continue;e&&(a[e][1].type="lineEndingBlank",j=!0),b[1].type="lineEnding",e=g}else if("linePrefix"===b[1].type||"blockQuotePrefix"===b[1].type||"blockQuotePrefixWhitespace"===b[1].type||"blockQuoteMarker"===b[1].type||"listItemIndent"===b[1].type);else break}f&&(!e||f<e)&&(d._spread=!0),d.end=Object.assign({},e?a[e][1].start:b[1].end),a.splice(e||h,0,["exit",d,b[2]]),h++,c++}if("listItemPrefix"===b[1].type){let e={type:"listItem",_spread:!1,start:Object.assign({},b[1].start),end:void 0};d=e,a.splice(h,0,["enter",e,b[2]]),h++,c++,f=void 0,g=!0}}}return a[b][1]._spread=j,c}(a,j.pop(),k));for(k=-1;++k<a.length;){let c=b[a[k][0]];ca.call(c,a[k][1].type)&&c[a[k][1].type].call(Object.assign({sliceSerialize:a[k][2].sliceSerialize},g),a[k][1])}if(g.tokenStack.length>0){let a=g.tokenStack[g.tokenStack.length-1];(a[1]||cc).call(g,void 0,a[0])}for(d.position={start:cb(a.length>0?a[0][1].start:{line:1,column:1,offset:0}),end:cb(a.length>0?a[a.length-2][1].end:{line:1,column:1,offset:0})},k=-1;++k<b.transforms.length;)d=b.transforms[k](d)||d;return d};function d(a,b){return function(c){f.call(this,a(c),c),b&&b.call(this,c)}}function e(){this.stack.push({type:"fragment",children:[]})}function f(a,b,c){this.stack[this.stack.length-1].children.push(a),this.stack.push(a),this.tokenStack.push([b,c||void 0]),a.position={start:cb(b.start),end:void 0}}function g(a){return function(b){a&&a.call(this,b),h.call(this,b)}}function h(a,b){let c=this.stack.pop(),d=this.tokenStack.pop();if(d)d[0].type!==a.type&&(b?b.call(this,a,d[0]):(d[1]||cc).call(this,a,d[0]));else throw Error("Cannot close `"+a.type+"` ("+aE({start:a.start,end:a.end})+"): it’s not open");c.position.end=cb(a.end)}function i(){return aY(this.stack.pop())}function j(a){let b=this.stack[this.stack.length-1].children,c=b[b.length-1];c&&"text"===c.type||((c={type:"text",value:""}).position={start:cb(a.start),end:void 0},b.push(c)),this.stack.push(c)}function k(a){let b=this.stack.pop();b.value+=this.sliceSerialize(a),b.position.end=cb(a.end)}function l(){this.data.atHardBreak=!0}function m(a){this.data.characterReferenceType=a.type}function n(){return{type:"code",lang:null,meta:null,value:""}}function o(){return{type:"heading",depth:0,children:[]}}function p(){return{type:"break"}}function q(){return{type:"html",value:""}}function r(){return{type:"link",title:null,url:"",children:[]}}function s(a){return{type:"list",ordered:"listOrdered"===a.type,start:null,spread:a._spread,children:[]}}})(e)(function(a){for(;!bn(a););return a}((function(a){let b={constructs:a2([b5,...(a||{}).extensions||[]]),content:c(bh),defined:[],document:c(bi),flow:c(bq),lazy:{},string:c(bs),text:c(bt)};return b;function c(a){return function(c){return function(a,b,c){let d={_bufferIndex:-1,_index:0,line:c&&c.line||1,column:c&&c.column||1,offset:c&&c.offset||0},e={},f=[],g=[],h=[],i={attempt:o(function(a,b){p(a,b.from)}),check:o(n),consume:function(a){ba(a)?(d.line++,d.column=1,d.offset+=-3===a?2:1,q()):-1!==a&&(d.column++,d.offset++),d._bufferIndex<0?d._index++:(d._bufferIndex++,d._bufferIndex===g[d._index].length&&(d._bufferIndex=-1,d._index++)),j.previous=a},enter:function(a,b){let c=b||{};return c.type=a,c.start=m(),j.events.push(["enter",c,j]),h.push(c),c},exit:function(a){let b=h.pop();return b.end=m(),j.events.push(["exit",b,j]),b},interrupt:o(n,{interrupt:!0})},j={code:null,containerState:{},defineSkip:function(a){e[a.line]=a.column,q()},events:[],now:m,parser:a,previous:null,sliceSerialize:function(a,b){return function(a,b){let c,d=-1,e=[];for(;++d<a.length;){let f,g=a[d];if("string"==typeof g)f=g;else switch(g){case -5:f="\r";break;case -4:f="\n";break;case -3:f="\r\n";break;case -2:f=b?" ":" ";break;case -1:if(!b&&c)continue;f=" ";break;default:f=String.fromCharCode(g)}c=-2===g,e.push(f)}return e.join("")}(l(a),b)},sliceStream:l,write:function(a){return(g=a0(g,a),function(){let a;for(;d._index<g.length;){let c=g[d._index];if("string"==typeof c)for(a=d._index,d._bufferIndex<0&&(d._bufferIndex=0);d._index===a&&d._bufferIndex<c.length;){var b;b=c.charCodeAt(d._bufferIndex),k=k(b)}else k=k(c)}}(),null!==g[g.length-1])?[]:(p(b,0),j.events=by(f,j.events,j),j.events)}},k=b.tokenize.call(j,i);return b.resolveAll&&f.push(b),j;function l(a){return function(a,b){let c,d=b.start._index,e=b.start._bufferIndex,f=b.end._index,g=b.end._bufferIndex;if(d===f)c=[a[d].slice(e,g)];else{if(c=a.slice(d,f),e>-1){let a=c[0];"string"==typeof a?c[0]=a.slice(e):c.shift()}g>0&&c.push(a[f].slice(0,g))}return c}(g,a)}function m(){let{_bufferIndex:a,_index:b,line:c,column:e,offset:f}=d;return{_bufferIndex:a,_index:b,line:c,column:e,offset:f}}function n(a,b){b.restore()}function o(a,b){return function(c,e,f){var g;let k,l,n,o;return Array.isArray(c)?p(c):"tokenize"in c?p([c]):(g=c,function(a){let b=null!==a&&g[a],c=null!==a&&g.null;return p([...Array.isArray(b)?b:b?[b]:[],...Array.isArray(c)?c:c?[c]:[]])(a)});function p(a){return(k=a,l=0,0===a.length)?f:r(a[l])}function r(a){return function(c){let e,f,g,k,l;return(e=m(),f=j.previous,g=j.currentConstruct,k=j.events.length,l=Array.from(h),o={from:k,restore:function(){d=e,j.previous=f,j.currentConstruct=g,j.events.length=k,h=l,q()}},n=a,a.partial||(j.currentConstruct=a),a.name&&j.parser.constructs.disable.null.includes(a.name))?t(c):a.tokenize.call(b?Object.assign(Object.create(j),b):j,i,s,t)(c)}}function s(b){return a(n,o),e}function t(a){return(o.restore(),++l<k.length)?r(k[l]):f}}}function p(a,b){a.resolveAll&&!f.includes(a)&&f.push(a),a.resolve&&a_(j.events,b,j.events.length-b,a.resolve(j.events.slice(b),j)),a.resolveTo&&(j.events=a.resolveTo(j.events,j))}function q(){d.line in e&&d.column<2&&(d.column=e[d.line],d.offset+=e[d.line]-1)}}(b,a,c)}}})(e).document().write((g=1,h="",i=!0,function(a,b,c){let d,e,j,k,l,m=[];for(a=h+("string"==typeof a?a.toString():new TextDecoder(b||void 0).decode(a)),j=0,h="",i&&(65279===a.charCodeAt(0)&&j++,i=void 0);j<a.length;){if(b6.lastIndex=j,k=(d=b6.exec(a))&&void 0!==d.index?d.index:a.length,l=a.charCodeAt(k),!d){h=a.slice(j);break}if(10===l&&j===k&&f)m.push(-3),f=void 0;else switch(f&&(m.push(-5),f=void 0),j<k&&(m.push(a.slice(j,k)),g+=k-j),l){case 0:m.push(65533),g++;break;case 9:for(e=4*Math.ceil(g/4),m.push(-2);g++<e;)m.push(-1);break;case 10:m.push(-4),g=1;break;default:f=!0,g=1}j=k+1}return c&&(f&&m.push(-5),h&&m.push(h),m.push(null)),m})(c,d,!0))))}}let ce="object"==typeof self?self:globalThis,cf=a=>{var b;let c,d;return(b=new Map,c=(a,c)=>(b.set(c,a),a),d=e=>{if(b.has(e))return b.get(e);let[f,g]=a[e];switch(f){case 0:case -1:return c(g,e);case 1:{let a=c([],e);for(let b of g)a.push(d(b));return a}case 2:{let a=c({},e);for(let[b,c]of g)a[d(b)]=d(c);return a}case 3:return c(new Date(g),e);case 4:{let{source:a,flags:b}=g;return c(new RegExp(a,b),e)}case 5:{let a=c(new Map,e);for(let[b,c]of g)a.set(d(b),d(c));return a}case 6:{let a=c(new Set,e);for(let b of g)a.add(d(b));return a}case 7:{let{name:a,message:b}=g;return c(new ce[a](b),e)}case 8:return c(BigInt(g),e);case"BigInt":return c(Object(BigInt(g)),e);case"ArrayBuffer":return c(new Uint8Array(g).buffer,g);case"DataView":{let{buffer:a}=new Uint8Array(g);return c(new DataView(a),g)}}return c(new ce[f](g),e)})(0)},{toString:cg}={},{keys:ch}=Object,ci=a=>{let b=typeof a;if("object"!==b||!a)return[0,b];let c=cg.call(a).slice(8,-1);switch(c){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,c]}return c.includes("Array")?[1,c]:c.includes("Error")?[7,c]:[2,c]},cj=([a,b])=>0===a&&("function"===b||"symbol"===b),ck=(a,{json:b,lossy:c}={})=>{var d,e,f;let g,h,i=[];return(d=!(b||c),e=!!b,f=new Map,g=(a,b)=>{let c=i.push(a)-1;return f.set(b,c),c},h=a=>{if(f.has(a))return f.get(a);let[b,c]=ci(a);switch(b){case 0:{let e=a;switch(c){case"bigint":b=8,e=a.toString();break;case"function":case"symbol":if(d)throw TypeError("unable to serialize "+c);e=null;break;case"undefined":return g([-1],a)}return g([b,e],a)}case 1:{if(c){let b=a;return"DataView"===c?b=new Uint8Array(a.buffer):"ArrayBuffer"===c&&(b=new Uint8Array(a)),g([c,[...b]],a)}let d=[],e=g([b,d],a);for(let b of a)d.push(h(b));return e}case 2:{if(c)switch(c){case"BigInt":return g([c,a.toString()],a);case"Boolean":case"Number":case"String":return g([c,a.valueOf()],a)}if(e&&"toJSON"in a)return h(a.toJSON());let f=[],i=g([b,f],a);for(let b of ch(a))(d||!cj(ci(a[b])))&&f.push([h(b),h(a[b])]);return i}case 3:return g([b,a.toISOString()],a);case 4:{let{source:c,flags:d}=a;return g([b,{source:c,flags:d}],a)}case 5:{let c=[],e=g([b,c],a);for(let[b,e]of a)(d||!(cj(ci(b))||cj(ci(e))))&&c.push([h(b),h(e)]);return e}case 6:{let c=[],e=g([b,c],a);for(let b of a)(d||!cj(ci(b)))&&c.push(h(b));return e}}let{message:i}=a;return g([b,{name:c,message:i}],a)})(a),i},cl="function"==typeof structuredClone?(a,b)=>b&&("json"in b||"lossy"in b)?cf(ck(a,b)):structuredClone(a):(a,b)=>cf(ck(a,b));function cm(a){let b=[],c=-1,d=0,e=0;for(;++c<a.length;){let f=a.charCodeAt(c),g="";if(37===f&&a4(a.charCodeAt(c+1))&&a4(a.charCodeAt(c+2)))e=2;else if(f<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(f))||(g=String.fromCharCode(f));else if(f>55295&&f<57344){let b=a.charCodeAt(c+1);f<56320&&b>56319&&b<57344?(g=String.fromCharCode(f,b),e=1):g="�"}else g=String.fromCharCode(f);g&&(b.push(a.slice(d,c),encodeURIComponent(g)),d=c+e+1,g=""),e&&(c+=e,e=0)}return b.join("")+a.slice(d)}function cn(a,b){let c=[{type:"text",value:"↩"}];return b>1&&c.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(b)}]}),c}function co(a,b){return"Back to reference "+(a+1)+(b>1?"-"+b:"")}let cp=function(a){var b,c;if(null==a)return cr;if("function"==typeof a)return cq(a);if("object"==typeof a){return Array.isArray(a)?function(a){let b=[],c=-1;for(;++c<a.length;)b[c]=cp(a[c]);return cq(function(...a){let c=-1;for(;++c<b.length;)if(b[c].apply(this,a))return!0;return!1})}(a):(b=a,cq(function(a){let c;for(c in b)if(a[c]!==b[c])return!1;return!0}))}if("string"==typeof a){return c=a,cq(function(a){return a&&a.type===c})}throw Error("Expected function, string, or object as test")};function cq(a){return function(b,c,d){return!!(function(a){return null!==a&&"object"==typeof a&&"type"in a}(b)&&a.call(this,b,"number"==typeof c?c:void 0,d||void 0))}}function cr(){return!0}let cs=[];function ct(a,b,c,d){let e;"function"==typeof b&&"function"!=typeof c?(d=c,c=b):e=b;let f=cp(e),g=d?-1:1;(function a(e,h,i){let j=e&&"object"==typeof e?e:{};if("string"==typeof j.type){let a="string"==typeof j.tagName?j.tagName:"string"==typeof j.name?j.name:void 0;Object.defineProperty(k,"name",{value:"node (\x1b[33m"+e.type+(a?"<"+a+">":"")+"\x1b[39m)"})}return k;function k(){var j;let k,l,m,n=cs;if((!b||f(e,h,i[i.length-1]||void 0))&&!1===(n=Array.isArray(j=c(e,i))?j:"number"==typeof j?[!0,j]:null==j?cs:[j])[0])return n;if("children"in e&&e.children&&e.children&&"skip"!==n[0])for(l=(d?e.children.length:-1)+g,m=i.concat(e);l>-1&&l<e.children.length;){if(!1===(k=a(e.children[l],l,m)())[0])return k;l="number"==typeof k[1]?k[1]:l+g}return n}})(a,void 0,[])()}function cu(a,b,c,d){let e,f,g;"function"==typeof b&&"function"!=typeof c?(f=void 0,g=b,e=c):(f=b,g=c,e=d),ct(a,f,function(a,b){let c=b[b.length-1],d=c?c.children.indexOf(a):void 0;return g(a,d,c)},e)}function cv(a,b){let c=b.referenceType,d="]";if("collapsed"===c?d+="[]":"full"===c&&(d+="["+(b.label||b.identifier)+"]"),"imageReference"===b.type)return[{type:"text",value:"!["+b.alt+d}];let e=a.all(b),f=e[0];f&&"text"===f.type?f.value="["+f.value:e.unshift({type:"text",value:"["});let g=e[e.length-1];return g&&"text"===g.type?g.value+=d:e.push({type:"text",value:d}),e}function cw(a){let b=a.spread;return null==b?a.children.length>1:b}function cx(a,b,c){let d=0,e=a.length;if(b){let b=a.codePointAt(d);for(;9===b||32===b;)d++,b=a.codePointAt(d)}if(c){let b=a.codePointAt(e-1);for(;9===b||32===b;)e--,b=a.codePointAt(e-1)}return e>d?a.slice(d,e):""}let cy={blockquote:function(a,b){let c={type:"element",tagName:"blockquote",properties:{},children:a.wrap(a.all(b),!0)};return a.patch(b,c),a.applyData(b,c)},break:function(a,b){let c={type:"element",tagName:"br",properties:{},children:[]};return a.patch(b,c),[a.applyData(b,c),{type:"text",value:"\n"}]},code:function(a,b){let c=b.value?b.value+"\n":"",d={},e=b.lang?b.lang.split(/\s+/):[];e.length>0&&(d.className=["language-"+e[0]]);let f={type:"element",tagName:"code",properties:d,children:[{type:"text",value:c}]};return b.meta&&(f.data={meta:b.meta}),a.patch(b,f),f={type:"element",tagName:"pre",properties:{},children:[f=a.applyData(b,f)]},a.patch(b,f),f},delete:function(a,b){let c={type:"element",tagName:"del",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},emphasis:function(a,b){let c={type:"element",tagName:"em",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},footnoteReference:function(a,b){let c,d="string"==typeof a.options.clobberPrefix?a.options.clobberPrefix:"user-content-",e=String(b.identifier).toUpperCase(),f=cm(e.toLowerCase()),g=a.footnoteOrder.indexOf(e),h=a.footnoteCounts.get(e);void 0===h?(h=0,a.footnoteOrder.push(e),c=a.footnoteOrder.length):c=g+1,h+=1,a.footnoteCounts.set(e,h);let i={type:"element",tagName:"a",properties:{href:"#"+d+"fn-"+f,id:d+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};a.patch(b,i);let j={type:"element",tagName:"sup",properties:{},children:[i]};return a.patch(b,j),a.applyData(b,j)},heading:function(a,b){let c={type:"element",tagName:"h"+b.depth,properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},html:function(a,b){if(a.options.allowDangerousHtml){let c={type:"raw",value:b.value};return a.patch(b,c),a.applyData(b,c)}},imageReference:function(a,b){let c=String(b.identifier).toUpperCase(),d=a.definitionById.get(c);if(!d)return cv(a,b);let e={src:cm(d.url||""),alt:b.alt};null!==d.title&&void 0!==d.title&&(e.title=d.title);let f={type:"element",tagName:"img",properties:e,children:[]};return a.patch(b,f),a.applyData(b,f)},image:function(a,b){let c={src:cm(b.url)};null!==b.alt&&void 0!==b.alt&&(c.alt=b.alt),null!==b.title&&void 0!==b.title&&(c.title=b.title);let d={type:"element",tagName:"img",properties:c,children:[]};return a.patch(b,d),a.applyData(b,d)},inlineCode:function(a,b){let c={type:"text",value:b.value.replace(/\r?\n|\r/g," ")};a.patch(b,c);let d={type:"element",tagName:"code",properties:{},children:[c]};return a.patch(b,d),a.applyData(b,d)},linkReference:function(a,b){let c=String(b.identifier).toUpperCase(),d=a.definitionById.get(c);if(!d)return cv(a,b);let e={href:cm(d.url||"")};null!==d.title&&void 0!==d.title&&(e.title=d.title);let f={type:"element",tagName:"a",properties:e,children:a.all(b)};return a.patch(b,f),a.applyData(b,f)},link:function(a,b){let c={href:cm(b.url)};null!==b.title&&void 0!==b.title&&(c.title=b.title);let d={type:"element",tagName:"a",properties:c,children:a.all(b)};return a.patch(b,d),a.applyData(b,d)},listItem:function(a,b,c){let d=a.all(b),e=c?function(a){let b=!1;if("list"===a.type){b=a.spread||!1;let c=a.children,d=-1;for(;!b&&++d<c.length;)b=cw(c[d])}return b}(c):cw(b),f={},g=[];if("boolean"==typeof b.checked){let a,c=d[0];c&&"element"===c.type&&"p"===c.tagName?a=c:(a={type:"element",tagName:"p",properties:{},children:[]},d.unshift(a)),a.children.length>0&&a.children.unshift({type:"text",value:" "}),a.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:b.checked,disabled:!0},children:[]}),f.className=["task-list-item"]}let h=-1;for(;++h<d.length;){let a=d[h];(e||0!==h||"element"!==a.type||"p"!==a.tagName)&&g.push({type:"text",value:"\n"}),"element"!==a.type||"p"!==a.tagName||e?g.push(a):g.push(...a.children)}let i=d[d.length-1];i&&(e||"element"!==i.type||"p"!==i.tagName)&&g.push({type:"text",value:"\n"});let j={type:"element",tagName:"li",properties:f,children:g};return a.patch(b,j),a.applyData(b,j)},list:function(a,b){let c={},d=a.all(b),e=-1;for("number"==typeof b.start&&1!==b.start&&(c.start=b.start);++e<d.length;){let a=d[e];if("element"===a.type&&"li"===a.tagName&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){c.className=["contains-task-list"];break}}let f={type:"element",tagName:b.ordered?"ol":"ul",properties:c,children:a.wrap(d,!0)};return a.patch(b,f),a.applyData(b,f)},paragraph:function(a,b){let c={type:"element",tagName:"p",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},root:function(a,b){let c={type:"root",children:a.wrap(a.all(b))};return a.patch(b,c),a.applyData(b,c)},strong:function(a,b){let c={type:"element",tagName:"strong",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},table:function(a,b){let c=a.all(b),d=c.shift(),e=[];if(d){let c={type:"element",tagName:"thead",properties:{},children:a.wrap([d],!0)};a.patch(b.children[0],c),e.push(c)}if(c.length>0){let d={type:"element",tagName:"tbody",properties:{},children:a.wrap(c,!0)},f=aC(b.children[1]),g=aB(b.children[b.children.length-1]);f&&g&&(d.position={start:f,end:g}),e.push(d)}let f={type:"element",tagName:"table",properties:{},children:a.wrap(e,!0)};return a.patch(b,f),a.applyData(b,f)},tableCell:function(a,b){let c={type:"element",tagName:"td",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},tableRow:function(a,b,c){let d=c?c.children:void 0,e=0===(d?d.indexOf(b):1)?"th":"td",f=c&&"table"===c.type?c.align:void 0,g=f?f.length:b.children.length,h=-1,i=[];for(;++h<g;){let c=b.children[h],d={},g=f?f[h]:void 0;g&&(d.align=g);let j={type:"element",tagName:e,properties:d,children:[]};c&&(j.children=a.all(c),a.patch(c,j),j=a.applyData(c,j)),i.push(j)}let j={type:"element",tagName:"tr",properties:{},children:a.wrap(i,!0)};return a.patch(b,j),a.applyData(b,j)},text:function(a,b){let c={type:"text",value:function(a){let b=String(a),c=/\r?\n|\r/g,d=c.exec(b),e=0,f=[];for(;d;)f.push(cx(b.slice(e,d.index),e>0,!0),d[0]),e=d.index+d[0].length,d=c.exec(b);return f.push(cx(b.slice(e),e>0,!1)),f.join("")}(String(b.value))};return a.patch(b,c),a.applyData(b,c)},thematicBreak:function(a,b){let c={type:"element",tagName:"hr",properties:{},children:[]};return a.patch(b,c),a.applyData(b,c)},toml:cz,yaml:cz,definition:cz,footnoteDefinition:cz};function cz(){}let cA={}.hasOwnProperty,cB={};function cC(a,b){a.position&&(b.position=function(a){let b=aC(a),c=aB(a);if(b&&c)return{start:b,end:c}}(a))}function cD(a,b){let c=b;if(a&&a.data){let b=a.data.hName,d=a.data.hChildren,e=a.data.hProperties;"string"==typeof b&&("element"===c.type?c.tagName=b:c={type:"element",tagName:b,properties:{},children:"children"in c?c.children:[c]}),"element"===c.type&&e&&Object.assign(c.properties,cl(e)),"children"in c&&c.children&&null!=d&&(c.children=d)}return c}function cE(a,b){let c=[],d=-1;for(b&&c.push({type:"text",value:"\n"});++d<a.length;)d&&c.push({type:"text",value:"\n"}),c.push(a[d]);return b&&a.length>0&&c.push({type:"text",value:"\n"}),c}function cF(a){let b=0,c=a.charCodeAt(b);for(;9===c||32===c;)b++,c=a.charCodeAt(b);return a.slice(b)}function cG(a,b){let c,d,e,f,g=(c=b||cB,d=new Map,e=new Map,f={all:function(a){let b=[];if("children"in a){let c=a.children,d=-1;for(;++d<c.length;){let e=f.one(c[d],a);if(e){if(d&&"break"===c[d-1].type&&(Array.isArray(e)||"text"!==e.type||(e.value=cF(e.value)),!Array.isArray(e)&&"element"===e.type)){let a=e.children[0];a&&"text"===a.type&&(a.value=cF(a.value))}Array.isArray(e)?b.push(...e):b.push(e)}}}return b},applyData:cD,definitionById:d,footnoteById:e,footnoteCounts:new Map,footnoteOrder:[],handlers:{...cy,...c.handlers},one:function(a,b){let c=a.type,d=f.handlers[c];if(cA.call(f.handlers,c)&&d)return d(f,a,b);if(f.options.passThrough&&f.options.passThrough.includes(c)){if("children"in a){let{children:b,...c}=a,d=cl(c);return d.children=f.all(a),d}return cl(a)}return(f.options.unknownHandler||function(a,b){let c=b.data||{},d="value"in b&&!(cA.call(c,"hProperties")||cA.call(c,"hChildren"))?{type:"text",value:b.value}:{type:"element",tagName:"div",properties:{},children:a.all(b)};return a.patch(b,d),a.applyData(b,d)})(f,a,b)},options:c,patch:cC,wrap:cE},cu(a,function(a){if("definition"===a.type||"footnoteDefinition"===a.type){let b="definition"===a.type?d:e,c=String(a.identifier).toUpperCase();b.has(c)||b.set(c,a)}}),f),h=g.one(a,void 0),i=function(a){let b="string"==typeof a.options.clobberPrefix?a.options.clobberPrefix:"user-content-",c=a.options.footnoteBackContent||cn,d=a.options.footnoteBackLabel||co,e=a.options.footnoteLabel||"Footnotes",f=a.options.footnoteLabelTagName||"h2",g=a.options.footnoteLabelProperties||{className:["sr-only"]},h=[],i=-1;for(;++i<a.footnoteOrder.length;){let e=a.footnoteById.get(a.footnoteOrder[i]);if(!e)continue;let f=a.all(e),g=String(e.identifier).toUpperCase(),j=cm(g.toLowerCase()),k=0,l=[],m=a.footnoteCounts.get(g);for(;void 0!==m&&++k<=m;){l.length>0&&l.push({type:"text",value:" "});let a="string"==typeof c?c:c(i,k);"string"==typeof a&&(a={type:"text",value:a}),l.push({type:"element",tagName:"a",properties:{href:"#"+b+"fnref-"+j+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof d?d:d(i,k),className:["data-footnote-backref"]},children:Array.isArray(a)?a:[a]})}let n=f[f.length-1];if(n&&"element"===n.type&&"p"===n.tagName){let a=n.children[n.children.length-1];a&&"text"===a.type?a.value+=" ":n.children.push({type:"text",value:" "}),n.children.push(...l)}else f.push(...l);let o={type:"element",tagName:"li",properties:{id:b+"fn-"+j},children:a.wrap(f,!0)};a.patch(e,o),h.push(o)}if(0!==h.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:f,properties:{...cl(g),id:"footnote-label"},children:[{type:"text",value:e}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:a.wrap(h,!0)},{type:"text",value:"\n"}]}}(g),j=Array.isArray(h)?{type:"root",children:h}:h||{type:"root",children:[]};return i&&(N("children"in j),j.children.push({type:"text",value:"\n"},i)),j}function cH(a,b){return a&&"run"in a?async function(c,d){let e=cG(c,{file:d,...b});await a.run(e,d)}:function(c,d){return cG(c,{file:d,...a||b})}}function cI(a){if(a)throw a}var cJ=a.i(83230);function cK(a){if("object"!=typeof a||null===a)return!1;let b=Object.getPrototypeOf(a);return(null===b||b===Object.prototype||null===Object.getPrototypeOf(b))&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}var cL=a.i(50227),cL=cL,cM=a.i(59639),cM=cM,cN=a.i(57764),cN=cN;function cO(a){return!!(null!==a&&"object"==typeof a&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&void 0===a.auth)}let cP=["history","path","basename","stem","extname","dirname"];class cQ{constructor(a){let b,c;b=a?cO(a)?{path:a}:"string"==typeof a||function(a){return!!(a&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a)}(a)?{value:a}:a:{},this.cwd="cwd"in b?"":cM.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let d=-1;for(;++d<cP.length;){const a=cP[d];a in b&&void 0!==b[a]&&null!==b[a]&&(this[a]="history"===a?[...b[a]]:b[a])}for(c in b)cP.includes(c)||(this[c]=b[c])}get basename(){return"string"==typeof this.path?cL.default.basename(this.path):void 0}set basename(a){cS(a,"basename"),cR(a,"basename"),this.path=cL.default.join(this.dirname||"",a)}get dirname(){return"string"==typeof this.path?cL.default.dirname(this.path):void 0}set dirname(a){cT(this.basename,"dirname"),this.path=cL.default.join(a||"",this.basename)}get extname(){return"string"==typeof this.path?cL.default.extname(this.path):void 0}set extname(a){if(cR(a,"extname"),cT(this.dirname,"extname"),a){if(46!==a.codePointAt(0))throw Error("`extname` must start with `.`");if(a.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=cL.default.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){cO(a)&&(a=(0,cN.fileURLToPath)(a)),cS(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return"string"==typeof this.path?cL.default.basename(this.path,this.extname):void 0}set stem(a){cS(a,"stem"),cR(a,"stem"),this.path=cL.default.join(this.dirname||"",a+(this.extname||""))}fail(a,b,c){let d=this.message(a,b,c);throw d.fatal=!0,d}info(a,b,c){let d=this.message(a,b,c);return d.fatal=void 0,d}message(a,b,c){let d=new aI(a,b,c);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(a){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(a||void 0).decode(this.value)}}function cR(a,b){if(a&&a.includes(cL.default.sep))throw Error("`"+b+"` cannot be a path: did not expect `"+cL.default.sep+"`")}function cS(a,b){if(!a)throw Error("`"+b+"` cannot be empty")}function cT(a,b){if(!a)throw Error("Setting `"+b+"` requires `path` to be set too")}let cU=function(a){let b=this.constructor.prototype,c=b[a],d=function(){return c.apply(d,arguments)};return Object.setPrototypeOf(d,b),d},cV={}.hasOwnProperty;class cW extends cU{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let a=[],b={run:function(...b){let c=-1,d=b.pop();if("function"!=typeof d)throw TypeError("Expected function as last argument, not "+d);!function e(f,...g){let h=a[++c],i=-1;if(f)return void d(f);for(;++i<b.length;)(null===g[i]||void 0===g[i])&&(g[i]=b[i]);b=g,h?(function(a,b){let c;return function(...b){let f,g=a.length>b.length;g&&b.push(d);try{f=a.apply(this,b)}catch(a){if(g&&c)throw a;return d(a)}g||(f&&f.then&&"function"==typeof f.then?f.then(e,d):f instanceof Error?d(f):e(f))};function d(a,...e){c||(c=!0,b(a,...e))}function e(a){d(null,a)}})(h,e)(...g):d(null,...g)}(null,...b)},use:function(c){if("function"!=typeof c)throw TypeError("Expected `middelware` to be a function, not "+c);return a.push(c),b}};return b}()}copy(){let a=new cW,b=-1;for(;++b<this.attachers.length;){let c=this.attachers[b];a.use(...c)}return a.data((0,cJ.default)(!0,{},this.namespace)),a}data(a,b){return"string"==typeof a?2==arguments.length?(c$("data",this.frozen),this.namespace[a]=b,this):cV.call(this.namespace,a)&&this.namespace[a]||void 0:a?(c$("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[a,...b]=this.attachers[this.freezeIndex];if(!1===b[0])continue;!0===b[0]&&(b[0]=void 0);let c=a.call(this,...b);"function"==typeof c&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(a){this.freeze();let b=c1(a),c=this.parser||this.Parser;return cY("parse",c),c(String(b),b)}process(a,b){let c=this;return this.freeze(),cY("process",this.parser||this.Parser),cZ("process",this.compiler||this.Compiler),b?d(void 0,b):new Promise(d);function d(d,e){let f=c1(a),g=c.parse(f);function h(a,c){a||!c?e(a):d?d(c):(N(b,"`done` is defined if `resolve` is not"),b(void 0,c))}c.run(g,f,function(a,b,d){var e,f;if(a||!b||!d)return h(a);let g=c.stringify(b,d);"string"==typeof(e=g)||(f=e)&&"object"==typeof f&&"byteLength"in f&&"byteOffset"in f?d.value=g:d.result=g,h(a,d)})}}processSync(a){let b,c=!1;return this.freeze(),cY("processSync",this.parser||this.Parser),cZ("processSync",this.compiler||this.Compiler),this.process(a,function(a,d){c=!0,cI(a),b=d}),c0("processSync","process",c),N(b,"we either bailed on an error or have a tree"),b}run(a,b,c){c_(a),this.freeze();let d=this.transformers;return c||"function"!=typeof b||(c=b,b=void 0),c?e(void 0,c):new Promise(e);function e(e,f){N("function"!=typeof b,"`file` can’t be a `done` anymore, we checked");let g=c1(b);d.run(a,g,function(b,d,g){let h=d||a;b?f(b):e?e(h):(N(c,"`done` is defined if `resolve` is not"),c(void 0,h,g))})}}runSync(a,b){let c,d=!1;return this.run(a,b,function(a,b){cI(a),c=b,d=!0}),c0("runSync","run",d),N(c,"we either bailed on an error or have a tree"),c}stringify(a,b){this.freeze();let c=c1(b),d=this.compiler||this.Compiler;return cZ("stringify",d),c_(a),d(a,c)}use(a,...b){let c=this.attachers,d=this.namespace;if(c$("use",this.frozen),null==a);else if("function"==typeof a)g(a,b);else if("object"==typeof a)Array.isArray(a)?f(a):e(a);else throw TypeError("Expected usable value, not `"+a+"`");return this;function e(a){if(!("plugins"in a)&&!("settings"in a))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(a.plugins),a.settings&&(d.settings=(0,cJ.default)(!0,d.settings,a.settings))}function f(a){let b=-1;if(null==a);else if(Array.isArray(a))for(;++b<a.length;)!function(a){if("function"==typeof a)g(a,[]);else if("object"==typeof a)if(Array.isArray(a)){let[b,...c]=a;g(b,c)}else e(a);else throw TypeError("Expected usable value, not `"+a+"`")}(a[b]);else throw TypeError("Expected a list of plugins, not `"+a+"`")}function g(a,b){let d=-1,e=-1;for(;++d<c.length;)if(c[d][0]===a){e=d;break}if(-1===e)c.push([a,...b]);else if(b.length>0){let[d,...f]=b,g=c[e][1];cK(g)&&cK(d)&&(d=(0,cJ.default)(!0,g,d)),c[e]=[a,d,...f]}}}}let cX=new cW().freeze();function cY(a,b){if("function"!=typeof b)throw TypeError("Cannot `"+a+"` without `parser`")}function cZ(a,b){if("function"!=typeof b)throw TypeError("Cannot `"+a+"` without `compiler`")}function c$(a,b){if(b)throw Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function c_(a){if(!cK(a)||"string"!=typeof a.type)throw TypeError("Expected node, got `"+a+"`")}function c0(a,b,c){if(!c)throw Error("`"+a+"` finished async. Use `"+b+"` instead")}function c1(a){var b;return(b=a)&&"object"==typeof b&&"message"in b&&"messages"in b?a:new cQ(a)}let c2=[],c3={allowDangerousHtml:!0},c4=/^(https?|ircs?|mailto|xmpp)$/i,c5=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function c6(a){var c;let d,e,f,g,h,i=(d=(c=a).rehypePlugins||c2,e=c.remarkPlugins||c2,f=c.remarkRehypeOptions?{...c.remarkRehypeOptions,...c3}:c3,cX().use(cd).use(e).use(cH,f).use(d)),j=(g=a.children||"",h=new cQ,"string"==typeof g?h.value=g:O("Unexpected value `"+g+"` for `children` prop, expected `string`"),h);return function(a,c){let d=c.allowedElements,e=c.allowElement,f=c.components,g=c.disallowedElements,h=c.skipHtml,i=c.unwrapDisallowed,j=c.urlTransform||c7;for(let a of c5)Object.hasOwn(c,a.from)&&O("Unexpected `"+a.from+"` prop, "+(a.to?"use `"+a.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+a.id+"> for more info)");return d&&g&&O("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),cu(a,function(a,b,c){if("raw"===a.type&&c&&"number"==typeof b)return h?c.children.splice(b,1):c.children[b]={type:"text",value:a.value},b;if("element"===a.type){let b;for(b in aW)if(Object.hasOwn(aW,b)&&Object.hasOwn(a.properties,b)){let c=a.properties[b],d=aW[b];(null===d||d.includes(a.tagName))&&(a.properties[b]=j(String(c||""),b,a))}}if("element"===a.type){let f=d?!d.includes(a.tagName):!!g&&g.includes(a.tagName);if(!f&&e&&"number"==typeof b&&(f=!e(a,b,c)),f&&c&&"number"==typeof b)return i&&a.children?c.children.splice(b,1,...a.children):c.children.splice(b,1),b}}),function(a,b){var c,d,e,f;let g;if(!b||void 0===b.Fragment)throw TypeError("Expected `Fragment` in options");let h=b.filePath||void 0;if(b.development){if("function"!=typeof b.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");c=h,d=b.jsxDEV,g=function(a,b,e,f){let g=Array.isArray(e.children),h=aC(a);return d(b,e,f,g,{columnNumber:h?h.column-1:void 0,fileName:c,lineNumber:h?h.line:void 0},void 0)}}else{if("function"!=typeof b.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof b.jsxs)throw TypeError("Expected `jsxs` in production options");e=b.jsx,f=b.jsxs,g=function(a,b,c,d){let g=Array.isArray(c.children)?f:e;return d?g(b,c,d):g(b,c)}}let i={Fragment:b.Fragment,ancestors:[],components:b.components||{},create:g,elementAttributeNameCase:b.elementAttributeNameCase||"react",evaluater:b.createEvaluater?b.createEvaluater():void 0,filePath:h,ignoreInvalidStyle:b.ignoreInvalidStyle||!1,passKeys:!1!==b.passKeys,passNode:b.passNode||!1,schema:"svg"===b.space?az:ay,stylePropertyNameCase:b.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==b.tableCellAlignToStyle},j=aP(i,a,void 0);return j&&"string"!=typeof j?j:i.create(a,i.Fragment,{children:j||void 0},void 0)}(a,{Fragment:b.Fragment,components:f,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0})}(i.runSync(i.parse(j),j),a)}function c7(a){let b=a.indexOf(":"),c=a.indexOf("?"),d=a.indexOf("#"),e=a.indexOf("/");return -1===b||-1!==e&&b>e||-1!==c&&b>c||-1!==d&&b>d||c4.test(a.slice(0,b))?a:""}function c8(a,b){let c=String(a);if("string"!=typeof b)throw TypeError("Expected character");let d=0,e=c.indexOf(b);for(;-1!==e;)d++,e=c.indexOf(b,e+b.length);return d}let c9="phrasing",da=["autolink","link","image","label"];function db(a){this.enter({type:"link",title:null,url:"",children:[]},a)}function dc(a){this.config.enter.autolinkProtocol.call(this,a)}function dd(a){this.config.exit.autolinkProtocol.call(this,a)}function de(a){this.config.exit.data.call(this,a);let b=this.stack[this.stack.length-1];N("link"===b.type),b.url="http://"+this.sliceSerialize(a)}function df(a){this.config.exit.autolinkEmail.call(this,a)}function dg(a){this.exit(a)}function dh(a){!function(a,b,c){let d=cp((c||{}).ignore||[]),e=function(a){let b=[];if(!Array.isArray(a))throw TypeError("Expected find and replace tuple or list of tuples");let c=!a[0]||Array.isArray(a[0])?a:[a],d=-1;for(;++d<c.length;){var e;let a=c[d];b.push(["string"==typeof(e=a[0])?RegExp(function(a){if("string"!=typeof a)throw TypeError("Expected a string");return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e,function(a){return"function"==typeof a?a:function(){return a}}(a[1])])}return b}(b),f=-1;for(;++f<e.length;)ct(a,"text",g);function g(a,b){let c,g=-1;for(;++g<b.length;){let a=b[g],e=c?c.children:void 0;if(d(a,e?e.indexOf(a):void 0,c))return;c=a}if(c)return function(a,b){let c=b[b.length-1],d=e[f][0],g=e[f][1],h=0,i=c.children.indexOf(a),j=!1,k=[];d.lastIndex=0;let l=d.exec(a.value);for(;l;){let c=l.index,e={index:l.index,input:l.input,stack:[...b,a]},f=g(...l,e);if("string"==typeof f&&(f=f.length>0?{type:"text",value:f}:void 0),!1===f?d.lastIndex=c+1:(h!==c&&k.push({type:"text",value:a.value.slice(h,c)}),Array.isArray(f)?k.push(...f):f&&k.push(f),h=c+l[0].length,j=!0),!d.global)break;l=d.exec(a.value)}return j?(h<a.value.length&&k.push({type:"text",value:a.value.slice(h)}),c.children.splice(i,1,...k)):k=[a],i+k.length}(a,b)}}(a,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,di],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,dj]],{ignore:["link","linkReference"]})}function di(a,b,c,d,e){let f,g="";if(!dk(e))return!1;if(/^w/i.test(b)&&(c=b+c,b="",g="http://"),(f=c.split(".")).length<2||f[f.length-1]&&(/_/.test(f[f.length-1])||!/[a-zA-Z\d]/.test(f[f.length-1]))||f[f.length-2]&&(/_/.test(f[f.length-2])||!/[a-zA-Z\d]/.test(f[f.length-2])))return!1;let h=function(a){let b=/[!"&'),.:;<>?\]}]+$/.exec(a);if(!b)return[a,void 0];a=a.slice(0,b.index);let c=b[0],d=c.indexOf(")"),e=c8(a,"("),f=c8(a,")");for(;-1!==d&&e>f;)a+=c.slice(0,d+1),d=(c=c.slice(d+1)).indexOf(")"),f++;return[a,c]}(c+d);if(!h[0])return!1;let i={type:"link",title:null,url:g+b+h[0],children:[{type:"text",value:b+h[0]}]};return h[1]?[i,{type:"text",value:h[1]}]:i}function dj(a,b,c,d){return!(!dk(d,!0)||/[-\d_]$/.test(c))&&{type:"link",title:null,url:"mailto:"+b+"@"+c,children:[{type:"text",value:b+"@"+c}]}}function dk(a,b){let c=a.input.charCodeAt(a.index-1);return(0===a.index||be(c)||bd(c))&&(!b||47!==c)}function dl(){this.buffer()}function dm(a){this.enter({type:"footnoteReference",identifier:"",label:""},a)}function dn(){this.buffer()}function dp(a){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},a)}function dq(a){let b=this.resume(),c=this.stack[this.stack.length-1];N("footnoteReference"===c.type),c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),c.label=b}function dr(a){this.exit(a)}function ds(a){let b=this.resume(),c=this.stack[this.stack.length-1];N("footnoteDefinition"===c.type),c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),c.label=b}function dt(a){this.exit(a)}function du(a,b,c,d){let e=c.createTracker(d),f=e.move("[^"),g=c.enter("footnoteReference"),h=c.enter("reference");return f+=e.move(c.safe(c.associationId(a),{after:"]",before:f})),h(),g(),f+=e.move("]")}function dv(a,b,c){return 0===b?a:dw(a,b,c)}function dw(a,b,c){return(c?"":" ")+a}du.peek=function(){return"["};let dx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function dy(a){this.enter({type:"delete",children:[]},a)}function dz(a){this.exit(a)}function dA(a,b,c,d){let e=c.createTracker(d),f=c.enter("strikethrough"),g=e.move("~~");return g+=c.containerPhrasing(a,{...e.current(),before:g,after:"~"}),g+=e.move("~~"),f(),g}function dB(a){return a.length}function dC(a){let b="string"==typeof a?a.codePointAt(0):0;return 67===b||99===b?99:76===b||108===b?108:114*(82===b||114===b)}dA.peek=function(){return"~"};function dD(a,b,c){let d=a.value||"",e="`",f=-1;for(;RegExp("(^|[^`])"+e+"([^`]|$)").test(d);)e+="`";for(/[^ \r\n]/.test(d)&&(/^[ \r\n]/.test(d)&&/[ \r\n]$/.test(d)||/^`|`$/.test(d))&&(d=" "+d+" ");++f<c.unsafe.length;){let a,b=c.unsafe[f],e=c.compilePattern(b);if(b.atBreak)for(;a=e.exec(d);){let b=a.index;10===d.charCodeAt(b)&&13===d.charCodeAt(b-1)&&b--,d=d.slice(0,b)+" "+d.slice(a.index+1)}}return e+d+e}dD.peek=function(){return"`"};cp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let dE=function(a,b,c,d){let e=function(a){let b=a.options.listItemIndent||"one";if("tab"!==b&&"one"!==b&&"mixed"!==b)throw Error("Cannot serialize items with `"+b+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return b}(c),f=c.bulletCurrent||function(a){let b=a.options.bullet||"*";if("*"!==b&&"+"!==b&&"-"!==b)throw Error("Cannot serialize items with `"+b+"` for `options.bullet`, expected `*`, `+`, or `-`");return b}(c);b&&"list"===b.type&&b.ordered&&(f=("number"==typeof b.start&&b.start>-1?b.start:1)+(!1===c.options.incrementListMarker?0:b.children.indexOf(a))+f);let g=f.length+1;("tab"===e||"mixed"===e&&(b&&"list"===b.type&&b.spread||a.spread))&&(g=4*Math.ceil(g/4));let h=c.createTracker(d);h.move(f+" ".repeat(g-f.length)),h.shift(g);let i=c.enter("listItem"),j=c.indentLines(c.containerFlow(a,h.current()),function(a,b,c){return b?(c?"":" ".repeat(g))+a:(c?f:f+" ".repeat(g-f.length))+a});return i(),j};function dF(a){let b=a._align;N(b,"expected `_align` on table"),this.enter({type:"table",align:b.map(function(a){return"none"===a?null:a}),children:[]},a),this.data.inTable=!0}function dG(a){this.exit(a),this.data.inTable=void 0}function dH(a){this.enter({type:"tableRow",children:[]},a)}function dI(a){this.exit(a)}function dJ(a){this.enter({type:"tableCell",children:[]},a)}function dK(a){let b=this.resume();this.data.inTable&&(b=b.replace(/\\([\\|])/g,dL));let c=this.stack[this.stack.length-1];N("inlineCode"===c.type),c.value=b,this.exit(a)}function dL(a,b){return"|"===b?b:a}function dM(a){let b=this.stack[this.stack.length-2];N("listItem"===b.type),b.checked="taskListCheckValueChecked"===a.type}function dN(a){let b=this.stack[this.stack.length-2];if(b&&"listItem"===b.type&&"boolean"==typeof b.checked){let a=this.stack[this.stack.length-1];N("paragraph"===a.type);let c=a.children[0];if(c&&"text"===c.type){let d,e=b.children,f=-1;for(;++f<e.length;){let a=e[f];if("paragraph"===a.type){d=a;break}}d===a&&(c.value=c.value.slice(1),0===c.value.length?a.children.shift():a.position&&c.position&&"number"==typeof c.position.start.offset&&(c.position.start.column++,c.position.start.offset++,a.position.start=Object.assign({},c.position.start)))}}this.exit(a)}function dO(a,b,c,d){let e=a.children[0],f="boolean"==typeof a.checked&&e&&"paragraph"===e.type,g="["+(a.checked?"x":" ")+"] ",h=c.createTracker(d);f&&h.move(g);let i=dE(a,b,c,{...d,...h.current()});return f&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(a){return a+g})),i}let dP={tokenize:function(a,b,c){let d=0;return function b(f){return(87===f||119===f)&&d<3?(d++,a.consume(f),b):46===f&&3===d?(a.consume(f),e):c(f)};function e(a){return null===a?c(a):b(a)}},partial:!0},dQ={tokenize:function(a,b,c){let d,e,f;return g;function g(b){return 46===b||95===b?a.check(dS,i,h)(b):null===b||bb(b)||be(b)||45!==b&&bd(b)?i(b):(f=!0,a.consume(b),g)}function h(b){return 95===b?d=!0:(e=d,d=void 0),a.consume(b),g}function i(a){return e||d||!f?c(a):b(a)}},partial:!0},dR={tokenize:function(a,b){let c=0,d=0;return e;function e(g){return 40===g?(c++,a.consume(g),e):41===g&&d<c?f(g):33===g||34===g||38===g||39===g||41===g||42===g||44===g||46===g||58===g||59===g||60===g||63===g||93===g||95===g||126===g?a.check(dS,b,f)(g):null===g||bb(g)||be(g)?b(g):(a.consume(g),e)}function f(b){return 41===b&&d++,a.consume(b),e}},partial:!0},dS={tokenize:function(a,b,c){return d;function d(g){return 33===g||34===g||39===g||41===g||42===g||44===g||46===g||58===g||59===g||63===g||95===g||126===g?(a.consume(g),d):38===g?(a.consume(g),f):93===g?(a.consume(g),e):60===g||null===g||bb(g)||be(g)?b(g):c(g)}function e(a){return null===a||40===a||91===a||bb(a)||be(a)?b(a):d(a)}function f(b){return a3(b)?function b(e){return 59===e?(a.consume(e),d):a3(e)?(a.consume(e),b):c(e)}(b):c(b)}},partial:!0},dT={tokenize:function(a,b,c){return function(b){return a.consume(b),d};function d(a){return a4(a)?c(a):b(a)}},partial:!0},dU={name:"wwwAutolink",tokenize:function(a,b,c){let d=this;return function(b){return 87!==b&&119!==b||!dZ.call(d,d.previous)||d1(d.events)?c(b):(a.enter("literalAutolink"),a.enter("literalAutolinkWww"),a.check(dP,a.attempt(dQ,a.attempt(dR,e),c),c)(b))};function e(c){return a.exit("literalAutolinkWww"),a.exit("literalAutolink"),b(c)}},previous:dZ},dV={name:"protocolAutolink",tokenize:function(a,b,c){let d=this,e="",f=!1;return function(b){return(72===b||104===b)&&d$.call(d,d.previous)&&!d1(d.events)?(a.enter("literalAutolink"),a.enter("literalAutolinkHttp"),e+=String.fromCodePoint(b),a.consume(b),g):c(b)};function g(b){if(a3(b)&&e.length<5)return e+=String.fromCodePoint(b),a.consume(b),g;if(58===b){let c=e.toLowerCase();if("http"===c||"https"===c)return a.consume(b),h}return c(b)}function h(b){return 47===b?(a.consume(b),f)?i:(f=!0,h):c(b)}function i(b){return null===b||a6(b)||bb(b)||be(b)||bd(b)?c(b):a.attempt(dQ,a.attempt(dR,j),c)(b)}function j(c){return a.exit("literalAutolinkHttp"),a.exit("literalAutolink"),b(c)}},previous:d$},dW={name:"emailAutolink",tokenize:function(a,b,c){let d,e,f=this;return function(b){return!d0(b)||!d_.call(f,f.previous)||d1(f.events)?c(b):(a.enter("literalAutolink"),a.enter("literalAutolinkEmail"),function b(d){return d0(d)?(a.consume(d),b):64===d?(a.consume(d),g):c(d)}(b))};function g(b){return 46===b?a.check(dT,i,h)(b):45===b||95===b||a4(b)?(e=!0,a.consume(b),g):i(b)}function h(b){return a.consume(b),d=!0,g}function i(g){return e&&d&&a3(f.previous)?(a.exit("literalAutolinkEmail"),a.exit("literalAutolink"),b(g)):c(g)}},previous:d_},dX={},dY=48;for(;dY<123;)dX[dY]=dW,58==++dY?dY=65:91===dY&&(dY=97);function dZ(a){return null===a||40===a||42===a||95===a||91===a||93===a||126===a||bb(a)}function d$(a){return!a3(a)}function d_(a){return!(47===a||d0(a))}function d0(a){return 43===a||45===a||46===a||95===a||a4(a)}function d1(a){let b=a.length,c=!1;for(;b--;){let d=a[b][1];if(("labelLink"===d.type||"labelImage"===d.type)&&!d._balanced){c=!0;break}if(d._gfmAutolinkLiteralWalkedInto){c=!1;break}}return a.length>0&&!c&&(a[a.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),c}dX[43]=dW,dX[45]=dW,dX[46]=dW,dX[95]=dW,dX[72]=[dW,dV],dX[104]=[dW,dV],dX[87]=[dW,dU],dX[119]=[dW,dU];let d2={tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return e&&"gfmFootnoteDefinitionIndent"===e[1].type&&4===e[2].sliceSerialize(e[1],!0).length?b(a):c(a)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function d3(a,b,c){let d,e=this,f=e.events.length,g=e.parser.gfmFootnotes||(e.parser.gfmFootnotes=[]);for(;f--;){let a=e.events[f][1];if("labelImage"===a.type){d=a;break}if("gfmFootnoteCall"===a.type||"labelLink"===a.type||"label"===a.type||"image"===a.type||"link"===a.type)break}return function(f){if(!d||!d._balanced)return c(f);let h=bP(e.sliceSerialize({start:d.end,end:e.now()}));return 94===h.codePointAt(0)&&g.includes(h.slice(1))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(f),a.exit("gfmFootnoteCallLabelMarker"),b(f)):c(f)}}function d4(a,b){let c=a.length;for(;c--;)if("labelImage"===a[c][1].type&&"enter"===a[c][0]){a[c][1];break}a[c+1][1].type="data",a[c+3][1].type="gfmFootnoteCallLabelMarker";let d={type:"gfmFootnoteCall",start:Object.assign({},a[c+3][1].start),end:Object.assign({},a[a.length-1][1].end)},e={type:"gfmFootnoteCallMarker",start:Object.assign({},a[c+3][1].end),end:Object.assign({},a[c+3][1].end)};e.end.column++,e.end.offset++,e.end._bufferIndex++;let f={type:"gfmFootnoteCallString",start:Object.assign({},e.end),end:Object.assign({},a[a.length-1][1].start)},g={type:"chunkString",contentType:"string",start:Object.assign({},f.start),end:Object.assign({},f.end)},h=[a[c+1],a[c+2],["enter",d,b],a[c+3],a[c+4],["enter",e,b],["exit",e,b],["enter",f,b],["enter",g,b],["exit",g,b],["exit",f,b],a[a.length-2],a[a.length-1],["exit",d,b]];return a.splice(c,a.length-c+1,...h),a}function d5(a,b,c){let d,e=this,f=e.parser.gfmFootnotes||(e.parser.gfmFootnotes=[]),g=0;return function(b){return a.enter("gfmFootnoteCall"),a.enter("gfmFootnoteCallLabelMarker"),a.consume(b),a.exit("gfmFootnoteCallLabelMarker"),h};function h(b){return 94!==b?c(b):(a.enter("gfmFootnoteCallMarker"),a.consume(b),a.exit("gfmFootnoteCallMarker"),a.enter("gfmFootnoteCallString"),a.enter("chunkString").contentType="string",i)}function i(h){if(g>999||93===h&&!d||null===h||91===h||bb(h))return c(h);if(93===h){a.exit("chunkString");let d=a.exit("gfmFootnoteCallString");return f.includes(bP(e.sliceSerialize(d)))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(h),a.exit("gfmFootnoteCallLabelMarker"),a.exit("gfmFootnoteCall"),b):c(h)}return bb(h)||(d=!0),g++,a.consume(h),92===h?j:i}function j(b){return 91===b||92===b||93===b?(a.consume(b),g++,i):i(b)}}function d6(a,b,c){let d,e,f=this,g=f.parser.gfmFootnotes||(f.parser.gfmFootnotes=[]),h=0;return function(b){return a.enter("gfmFootnoteDefinition")._container=!0,a.enter("gfmFootnoteDefinitionLabel"),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),i};function i(b){return 94===b?(a.enter("gfmFootnoteDefinitionMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionMarker"),a.enter("gfmFootnoteDefinitionLabelString"),a.enter("chunkString").contentType="string",j):c(b)}function j(b){if(h>999||93===b&&!e||null===b||91===b||bb(b))return c(b);if(93===b){a.exit("chunkString");let c=a.exit("gfmFootnoteDefinitionLabelString");return d=bP(f.sliceSerialize(c)),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),a.exit("gfmFootnoteDefinitionLabel"),l}return bb(b)||(e=!0),h++,a.consume(b),92===b?k:j}function k(b){return 91===b||92===b||93===b?(a.consume(b),h++,j):j(b)}function l(b){return 58===b?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),g.includes(d)||g.push(d),bg(a,m,"gfmFootnoteDefinitionWhitespace")):c(b)}function m(a){return b(a)}}function d7(a,b,c){return a.check(bk,b,a.attempt(d2,b,c))}function d8(a){a.exit("gfmFootnoteDefinition")}class d9{constructor(){this.map=[]}add(a,b,c){!function(a,b,c,d){let e=0;if(0!==c||0!==d.length){for(;e<a.map.length;){if(a.map[e][0]===b){a.map[e][1]+=c,a.map[e][2].push(...d);return}e+=1}a.map.push([b,c,d])}}(this,a,b,c)}consume(a){if(this.map.sort(function(a,b){return a[0]-b[0]}),0===this.map.length)return;let b=this.map.length,c=[];for(;b>0;)b-=1,c.push(a.slice(this.map[b][0]+this.map[b][1]),this.map[b][2]),a.length=this.map[b][0];c.push(a.slice()),a.length=0;let d=c.pop();for(;d;){for(let b of d)a.push(b);d=c.pop()}this.map.length=0}}function ea(a,b,c){let d,e=this,f=0,g=0;return function(a){let b=e.events.length-1;for(;b>-1;){let a=e.events[b][1].type;if("lineEnding"===a||"linePrefix"===a)b--;else break}let d=b>-1?e.events[b][1].type:null,f="tableHead"===d||"tableRow"===d?s:h;return f===s&&e.parser.lazy[e.now().line]?c(a):f(a)};function h(b){var c;return a.enter("tableHead"),a.enter("tableRow"),124===(c=b)||(d=!0,g+=1),i(c)}function i(b){return null===b?c(b):ba(b)?g>1?(g=0,e.interrupt=!0,a.exit("tableRow"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),l):c(b):bc(b)?bg(a,i,"whitespace")(b):(g+=1,d&&(d=!1,f+=1),124===b)?(a.enter("tableCellDivider"),a.consume(b),a.exit("tableCellDivider"),d=!0,i):(a.enter("data"),j(b))}function j(b){return null===b||124===b||bb(b)?(a.exit("data"),i(b)):(a.consume(b),92===b?k:j)}function k(b){return 92===b||124===b?(a.consume(b),j):j(b)}function l(b){return(e.interrupt=!1,e.parser.lazy[e.now().line])?c(b):(a.enter("tableDelimiterRow"),d=!1,bc(b))?bg(a,m,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):m(b)}function m(b){return 45===b||58===b?o(b):124===b?(d=!0,a.enter("tableCellDivider"),a.consume(b),a.exit("tableCellDivider"),n):c(b)}function n(b){return bc(b)?bg(a,o,"whitespace")(b):o(b)}function o(b){return 58===b?(g+=1,d=!0,a.enter("tableDelimiterMarker"),a.consume(b),a.exit("tableDelimiterMarker"),p):45===b?(g+=1,p(b)):null===b||ba(b)?r(b):c(b)}function p(b){return 45===b?(a.enter("tableDelimiterFiller"),function b(c){return 45===c?(a.consume(c),b):58===c?(d=!0,a.exit("tableDelimiterFiller"),a.enter("tableDelimiterMarker"),a.consume(c),a.exit("tableDelimiterMarker"),q):(a.exit("tableDelimiterFiller"),q(c))}(b)):c(b)}function q(b){return bc(b)?bg(a,r,"whitespace")(b):r(b)}function r(e){if(124===e)return m(e);if(null===e||ba(e))return d&&f===g?(a.exit("tableDelimiterRow"),a.exit("tableHead"),b(e)):c(e);return c(e)}function s(b){return a.enter("tableRow"),t(b)}function t(c){return 124===c?(a.enter("tableCellDivider"),a.consume(c),a.exit("tableCellDivider"),t):null===c||ba(c)?(a.exit("tableRow"),b(c)):bc(c)?bg(a,t,"whitespace")(c):(a.enter("data"),u(c))}function u(b){return null===b||124===b||bb(b)?(a.exit("data"),t(b)):(a.consume(b),92===b?v:u)}function v(b){return 92===b||124===b?(a.consume(b),u):u(b)}}function eb(a,b){let c,d,e,f=-1,g=!0,h=0,i=[0,0,0,0],j=[0,0,0,0],k=!1,l=0,m=new d9;for(;++f<a.length;){let n=a[f],o=n[1];"enter"===n[0]?"tableHead"===o.type?(k=!1,0!==l&&(ed(m,b,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},o.start),end:Object.assign({},o.end)},m.add(f,0,[["enter",c,b]])):"tableRow"===o.type||"tableDelimiterRow"===o.type?(g=!0,e=void 0,i=[0,0,0,0],j=[0,f+1,0,0],k&&(k=!1,d={type:"tableBody",start:Object.assign({},o.start),end:Object.assign({},o.end)},m.add(f,0,[["enter",d,b]])),h="tableDelimiterRow"===o.type?2:d?3:1):h&&("data"===o.type||"tableDelimiterMarker"===o.type||"tableDelimiterFiller"===o.type)?(g=!1,0===j[2]&&(0!==i[1]&&(j[0]=j[1],e=ec(m,b,i,h,void 0,e),i=[0,0,0,0]),j[2]=f)):"tableCellDivider"===o.type&&(g?g=!1:(0!==i[1]&&(j[0]=j[1],e=ec(m,b,i,h,void 0,e)),j=[(i=j)[1],f,0,0])):"tableHead"===o.type?(k=!0,l=f):"tableRow"===o.type||"tableDelimiterRow"===o.type?(l=f,0!==i[1]?(j[0]=j[1],e=ec(m,b,i,h,f,e)):0!==j[1]&&(e=ec(m,b,j,h,f,e)),h=0):h&&("data"===o.type||"tableDelimiterMarker"===o.type||"tableDelimiterFiller"===o.type)&&(j[3]=f)}for(0!==l&&ed(m,b,l,c,d),m.consume(b.events),f=-1;++f<b.events.length;){let a=b.events[f];"enter"===a[0]&&"table"===a[1].type&&(a[1]._align=function(a,b){let c=!1,d=[];for(;b<a.length;){let e=a[b];if(c){if("enter"===e[0])"tableContent"===e[1].type&&d.push("tableDelimiterMarker"===a[b+1][1].type?"left":"none");else if("tableContent"===e[1].type){if("tableDelimiterMarker"===a[b-1][1].type){let a=d.length-1;d[a]="left"===d[a]?"center":"right"}}else if("tableDelimiterRow"===e[1].type)break}else"enter"===e[0]&&"tableDelimiterRow"===e[1].type&&(c=!0);b+=1}return d}(b.events,f))}return a}function ec(a,b,c,d,e,f){0!==c[0]&&(f.end=Object.assign({},ee(b.events,c[0])),a.add(c[0],0,[["exit",f,b]]));let g=ee(b.events,c[1]);if(f={type:1===d?"tableHeader":2===d?"tableDelimiter":"tableData",start:Object.assign({},g),end:Object.assign({},g)},a.add(c[1],0,[["enter",f,b]]),0!==c[2]){let e=ee(b.events,c[2]),f=ee(b.events,c[3]),g={type:"tableContent",start:Object.assign({},e),end:Object.assign({},f)};if(a.add(c[2],0,[["enter",g,b]]),2!==d){let d=b.events[c[2]],e=b.events[c[3]];if(d[1].end=Object.assign({},e[1].end),d[1].type="chunkText",d[1].contentType="text",c[3]>c[2]+1){let b=c[2]+1,d=c[3]-c[2]-1;a.add(b,d,[])}}a.add(c[3]+1,0,[["exit",g,b]])}return void 0!==e&&(f.end=Object.assign({},ee(b.events,e)),a.add(e,0,[["exit",f,b]]),f=void 0),f}function ed(a,b,c,d,e){let f=[],g=ee(b.events,c);e&&(e.end=Object.assign({},g),f.push(["exit",e,b])),d.end=Object.assign({},g),f.push(["exit",d,b]),a.add(c+1,0,f)}function ee(a,b){let c=a[b],d="enter"===c[0]?"start":"end";return c[1][d]}let ef={name:"tasklistCheck",tokenize:function(a,b,c){let d=this;return function(b){return null===d.previous&&d._gfmTasklistFirstContentOfListItem?(a.enter("taskListCheck"),a.enter("taskListCheckMarker"),a.consume(b),a.exit("taskListCheckMarker"),e):c(b)};function e(b){return bb(b)?(a.enter("taskListCheckValueUnchecked"),a.consume(b),a.exit("taskListCheckValueUnchecked"),f):88===b||120===b?(a.enter("taskListCheckValueChecked"),a.consume(b),a.exit("taskListCheckValueChecked"),f):c(b)}function f(b){return 93===b?(a.enter("taskListCheckMarker"),a.consume(b),a.exit("taskListCheckMarker"),a.exit("taskListCheck"),g):c(b)}function g(d){return ba(d)?b(d):bc(d)?a.check({tokenize:eg},b,c)(d):c(d)}}};function eg(a,b,c){return bg(a,function(a){return null===a?c(a):b(a)},"whitespace")}let eh={};function ei(a){let b,c,d,e=a||eh,f=this.data(),g=f.micromarkExtensions||(f.micromarkExtensions=[]),h=f.fromMarkdownExtensions||(f.fromMarkdownExtensions=[]),i=f.toMarkdownExtensions||(f.toMarkdownExtensions=[]);g.push(a2([{text:dX},{document:{91:{name:"gfmFootnoteDefinition",tokenize:d6,continuation:{tokenize:d7},exit:d8}},text:{91:{name:"gfmFootnoteCall",tokenize:d5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d3,resolveTo:d4}}},(b=(e||{}).singleTilde,c={name:"strikethrough",tokenize:function(a,c,d){let e=this.previous,f=this.events,g=0;return function(h){return 126===e&&"characterEscape"!==f[f.length-1][1].type?d(h):(a.enter("strikethroughSequenceTemporary"),function f(h){let i=bx(e);if(126===h)return g>1?d(h):(a.consume(h),g++,f);if(g<2&&!b)return d(h);let j=a.exit("strikethroughSequenceTemporary"),k=bx(h);return j._open=!k||2===k&&!!i,j._close=!i||2===i&&!!k,c(h)}(h))}},resolveAll:function(a,b){let c=-1;for(;++c<a.length;)if("enter"===a[c][0]&&"strikethroughSequenceTemporary"===a[c][1].type&&a[c][1]._close){let d=c;for(;d--;)if("exit"===a[d][0]&&"strikethroughSequenceTemporary"===a[d][1].type&&a[d][1]._open&&a[c][1].end.offset-a[c][1].start.offset==a[d][1].end.offset-a[d][1].start.offset){a[c][1].type="strikethroughSequence",a[d][1].type="strikethroughSequence";let e={type:"strikethrough",start:Object.assign({},a[d][1].start),end:Object.assign({},a[c][1].end)},f={type:"strikethroughText",start:Object.assign({},a[d][1].end),end:Object.assign({},a[c][1].start)},g=[["enter",e,b],["enter",a[d][1],b],["exit",a[d][1],b],["enter",f,b]],h=b.parser.constructs.insideSpan.null;h&&a_(g,g.length,0,by(h,a.slice(d+1,c),b)),a_(g,g.length,0,[["exit",f,b],["enter",a[c][1],b],["exit",a[c][1],b],["exit",e,b]]),a_(a,d-1,c-d+3,g),c=d+g.length-2;break}}for(c=-1;++c<a.length;)"strikethroughSequenceTemporary"===a[c][1].type&&(a[c][1].type="data");return a}},null==b&&(b=!0),{text:{126:c},insideSpan:{null:[c]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:ea,resolveAll:eb}}},{text:{91:ef}}])),h.push([{transforms:[dh],enter:{literalAutolink:db,literalAutolinkEmail:dc,literalAutolinkHttp:dc,literalAutolinkWww:dc},exit:{literalAutolink:dg,literalAutolinkEmail:df,literalAutolinkHttp:dd,literalAutolinkWww:de}},{enter:{gfmFootnoteCallString:dl,gfmFootnoteCall:dm,gfmFootnoteDefinitionLabelString:dn,gfmFootnoteDefinition:dp},exit:{gfmFootnoteCallString:dq,gfmFootnoteCall:dr,gfmFootnoteDefinitionLabelString:ds,gfmFootnoteDefinition:dt}},{canContainEols:["delete"],enter:{strikethrough:dy},exit:{strikethrough:dz}},{enter:{table:dF,tableData:dJ,tableHeader:dJ,tableRow:dH},exit:{codeText:dK,table:dG,tableData:dI,tableHeader:dI,tableRow:dI}},{exit:{taskListCheckValueChecked:dM,taskListCheckValueUnchecked:dM,paragraph:dN}}]),i.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:c9,notInConstruct:da},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:c9,notInConstruct:da},{character:":",before:"[ps]",after:"\\/",inConstruct:c9,notInConstruct:da}]},(d=!1,e&&e.firstLineBlank&&(d=!0),{handlers:{footnoteDefinition:function(a,b,c,e){let f=c.createTracker(e),g=f.move("[^"),h=c.enter("footnoteDefinition"),i=c.enter("label");return g+=f.move(c.safe(c.associationId(a),{before:g,after:"]"})),i(),g+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),g+=f.move((d?"\n":" ")+c.indentLines(c.containerFlow(a,f.current()),d?dw:dv))),h(),g},footnoteReference:du},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dx}],handlers:{delete:dA}},function(a){let b=a||{},c=b.tableCellPadding,d=b.tablePipeAlign,e=b.stringLength,f=c?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(a,b,c){let d=dD(a,b,c);return c.stack.includes("tableCell")&&(d=d.replace(/\|/g,"\\$&")),d},table:function(a,b,c,d){return h(function(a,b,c){let d=a.children,e=-1,f=[],g=b.enter("table");for(;++e<d.length;)f[e]=i(d[e],b,c);return g(),f}(a,c,d),a.align)},tableCell:g,tableRow:function(a,b,c,d){let e=h([i(a,c,d)]);return e.slice(0,e.indexOf("\n"))}}};function g(a,b,c,d){let e=c.enter("tableCell"),g=c.enter("phrasing"),h=c.containerPhrasing(a,{...d,before:f,after:f});return g(),e(),h}function h(a,b){return function(a,b){let c=b||{},d=(c.align||[]).concat(),e=c.stringLength||dB,f=[],g=[],h=[],i=[],j=0,k=-1;for(;++k<a.length;){let b=[],d=[],f=-1;for(a[k].length>j&&(j=a[k].length);++f<a[k].length;){var l;let g=null==(l=a[k][f])?"":String(l);if(!1!==c.alignDelimiters){let a=e(g);d[f]=a,(void 0===i[f]||a>i[f])&&(i[f]=a)}b.push(g)}g[k]=b,h[k]=d}let m=-1;if("object"==typeof d&&"length"in d)for(;++m<j;)f[m]=dC(d[m]);else{let a=dC(d);for(;++m<j;)f[m]=a}m=-1;let n=[],o=[];for(;++m<j;){let a=f[m],b="",d="";99===a?(b=":",d=":"):108===a?b=":":114===a&&(d=":");let e=!1===c.alignDelimiters?1:Math.max(1,i[m]-b.length-d.length),g=b+"-".repeat(e)+d;!1!==c.alignDelimiters&&((e=b.length+e+d.length)>i[m]&&(i[m]=e),o[m]=e),n[m]=g}g.splice(1,0,n),h.splice(1,0,o),k=-1;let p=[];for(;++k<g.length;){let a=g[k],b=h[k];m=-1;let d=[];for(;++m<j;){let e=a[m]||"",g="",h="";if(!1!==c.alignDelimiters){let a=i[m]-(b[m]||0),c=f[m];114===c?g=" ".repeat(a):99===c?a%2?(g=" ".repeat(a/2+.5),h=" ".repeat(a/2-.5)):h=g=" ".repeat(a/2):h=" ".repeat(a)}!1===c.delimiterStart||m||d.push("|"),!1!==c.padding&&(!1!==c.alignDelimiters||""!==e)&&(!1!==c.delimiterStart||m)&&d.push(" "),!1!==c.alignDelimiters&&d.push(g),d.push(e),!1!==c.alignDelimiters&&d.push(h),!1!==c.padding&&d.push(" "),(!1!==c.delimiterEnd||m!==j-1)&&d.push("|")}p.push(!1===c.delimiterEnd?d.join("").replace(/ +$/,""):d.join(""))}return p.join("\n")}(a,{align:b,alignDelimiters:d,padding:c,stringLength:e})}function i(a,b,c){let d=a.children,e=-1,f=[],h=b.enter("tableRow");for(;++e<d.length;)f[e]=g(d[e],a,b,c);return h(),f}}(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dO}}]})}var ej=a.i(33878);function ek(a){let b=new Date(a),c=Math.floor((new Date().getTime()-b.getTime())/1e3);if(c<60)return"just now";let d=Math.floor(c/60);if(d<60)return`${d}m ago`;let e=Math.floor(d/60);if(e<24)return`${e}h ago`;let f=Math.floor(e/24);return f<7?`${f}d ago`:b.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function el(a,b){let c=[];return c.push(`[${m(a.prefix)}] ${a.id}`),b&&c.push(b),c.push(""),c.push(a.description||""),c.join("\n")}let em={elevenLabsVoiceId:"UgBBYS2sOqTuMpoF3BR0",elevenLabsModel:"eleven_flash_v2_5"};function en(){let a={...em};return!!a.elevenLabsApiKey&&a.elevenLabsApiKey.trim().length>0}let eo=new Map;function ep(a){return a.replace(/\s+/g," ").trim().toLowerCase()}let eq=null,er=null,es=null;function et(a){eq&&(eq.playbackRate=a)}function eu(){eq&&(eq.pause(),eq.currentTime=0,eq.onended=null,eq.onerror=null,eq.ontimeupdate=null,eq=null),er&&(URL.revokeObjectURL(er),er=null),es=null}function ev(a,b){es=null;let c=URL.createObjectURL(a);er=c;let d=new Audio(c);eq=d,b("playing"),d.onended=()=>{eu(),b("idle")},d.onerror=()=>{eu(),b("error","Audio playback failed")},d.play()}async function ew(a,b){let c;eu();let d={...em};if(!d.elevenLabsApiKey)return void b("error","No API key configured");let e=d.elevenLabsVoiceId,f=(h=d.elevenLabsModel,`${e}:${h}:${a}`),g=((c=eo.get(f))&&(eo.delete(f),eo.set(f,c)),c);if(g)return void ev(g.blob,b);b("loading");try{var h;let c=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${e}/with-timestamps?output_format=mp3_44100_128`,{method:"POST",headers:{"Content-Type":"application/json","xi-api-key":d.elevenLabsApiKey},body:JSON.stringify({text:a,model_id:d.elevenLabsModel})});if(!c.ok){let a=await c.text().catch(()=>c.statusText);throw Error(`ElevenLabs API error (${c.status}): ${a}`)}let{audio_base64:g,alignment:i}=await c.json(),j=atob(g),k=new Uint8Array(j.length);for(let a=0;a<j.length;a++)k[a]=j.charCodeAt(a);let l=new Blob([k],{type:"audio/mpeg"}),m={blob:l,alignment:{characters:i.characters,characterStartTimesSeconds:i.character_start_times_seconds,characterEndTimesSeconds:i.character_end_times_seconds},strippedText:a};if(eo.size>=10){let a=eo.keys().next().value;a&&eo.delete(a)}eo.set(f,m),ev(l,b)}catch(a){eu(),b("error",a instanceof Error?a.message:"TTS failed")}}async function ex(a,b){eu();let c=function(a){let b=ep(a);if(!b)return null;for(let a of eo.values()){let c=ep(a.strippedText).indexOf(b);if(-1===c)continue;let{strippedText:d,alignment:e}=a,f=[],g=0,h=!1;for(let a=0;a<d.length;a++)/\s/.test(d[a])?(!h&&g>0?(f.push(g),g++):f.push(-1),h=!0):(f.push(g),g++,h=!1);let i=c+b.length-1,j=-1,k=-1;for(let a=0;a<f.length;a++)f[a]===c&&-1===j&&(j=a),f[a]===i&&(k=a);if(-1===j||-1===k)continue;let l=e.characterStartTimesSeconds.length;if(0===l)continue;let m=Math.min(j,l-1),n=Math.min(k,e.characterEndTimesSeconds.length-1);if(!(m<0)&&!(n<0))return{blob:a.blob,startTime:e.characterStartTimesSeconds[m],endTime:e.characterEndTimesSeconds[n]}}return null}(a);if(c){let{blob:a,startTime:d,endTime:e}=c,f=URL.createObjectURL(a);er=f;let g=new Audio(f);eq=g,es=e,g.onended=()=>{eu(),b("idle")},g.onerror=()=>{eu(),b("error","Audio playback failed")},g.ontimeupdate=()=>{null!==es&&g.currentTime>=es&&(eu(),b("idle"))},g.currentTime=d,b("playing"),await g.play();return}await ew(a,b)}function ey(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=window.matchMedia("(max-width: 768px)");b(a.matches);let c=a=>b(a.matches);return a.addEventListener("change",c),()=>a.removeEventListener("change",c)},[]),a}let ez=[{label:"Normal",value:1},{label:"1.25x",value:1.25},{label:"1.5x",value:1.5},{label:"1.75x",value:1.75},{label:"2x",value:2}];function eA({node:a,onClose:d,repoUrl:e,onOpenSettings:f}){let[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)("idle"),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(1),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)(""),[s,t]=(0,c.useState)(!1),u=(0,c.useRef)(null),v=(0,c.useRef)(null),w=ey(),[x,y]=(0,c.useState)(null),z=(0,c.useRef)(null),A=(0,c.useRef)(!1),B=(0,c.useCallback)((a,b)=>{j(a),b&&l(b)},[]),C=(0,c.useCallback)(()=>{if(!en())return void f?.();let b=(a.description||"").replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/^[-*_]{3,}\s*$/gm,"").replace(/^>\s+/gm,"").replace(/^[\s]*[-*+]\s+/gm,"").replace(/^[\s]*\d+\.\s+/gm,"").replace(/<[^>]+>/g,"").replace(/\n{3,}/g,"\n\n").trim();b&&(l(null),ew(b,B))},[a.description,f,B]),D=(0,c.useCallback)(()=>{eu(),j("idle"),p(!1),t(!1)},[]),E=(0,c.useCallback)(()=>{eq&&!eq.paused&&eq.pause(),j("paused")},[]),F=(0,c.useCallback)(()=>{eq&&eq.paused&&eq.currentTime>0&&eq.play(),j("playing")},[]),G=(0,c.useCallback)(a=>{let b=Math.max(.25,Math.min(4,a));n(b),et(b),p(!1),t(!1)},[]);(0,c.useEffect)(()=>{"playing"===i&&et(m)},[i,m]),(0,c.useEffect)(()=>{if(!o)return;let a=a=>{v.current&&!v.current.contains(a.target)&&u.current&&!u.current.contains(a.target)&&(p(!1),t(!1))},b=setTimeout(()=>window.addEventListener("mousedown",a),50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[o]);let H=(0,c.useCallback)(()=>{setTimeout(()=>{let a=window.getSelection();if(!a||a.isCollapsed)return;let b=a.toString().trim();if(!(b.length<3))try{let c=a.getRangeAt(0).getBoundingClientRect();y({text:b,x:c.left+c.width/2,y:c.top-8})}catch{}},10)},[]);(0,c.useEffect)(()=>{if(w)return;let a=()=>{if(A.current)return;let a=window.getSelection();a&&!a.isCollapsed&&a.toString().trim()||y(null)};return document.addEventListener("selectionchange",a),()=>document.removeEventListener("selectionchange",a)},[w]);let I=(0,c.useCallback)(()=>{if(!x)return;let a=x.text;if(a.trim()){if(!en()){f?.(),y(null);return}A.current=!0,l(null),y(null),ex(a,B),setTimeout(()=>{A.current=!1},100)}},[x,f,B]);return((0,c.useEffect)(()=>()=>{eu(),p(!1),y(null)},[]),a.description)?(0,ej.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:d,children:[(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-2xl w-[90vw] max-w-2xl max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600 dark:text-emerald-400 shrink-0",children:a.id}),(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100 truncate",children:a.title})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,b.jsx)("button",{onClick:()=>{a.description&&navigator.clipboard.writeText(el(a,e)).then(()=>{h(!0),setTimeout(()=>h(!1),1500)})},className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:"Copy description",children:g?(0,b.jsx)("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),"loading"===i?(0,b.jsx)("button",{disabled:!0,className:"p-1 text-zinc-300 cursor-wait",title:"Loading audio...",children:(0,b.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:4}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):"playing"===i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:E,className:"p-1 text-emerald-500 hover:text-amber-500 hover:bg-amber-50 rounded transition-colors",title:"Pause",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25v13.5m-7.5-13.5v13.5"})})}),(0,b.jsx)("button",{onClick:D,className:"p-1 text-zinc-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Stop",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})})})]}):"paused"===i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:F,className:"p-1 text-amber-500 hover:text-emerald-500 hover:bg-emerald-50 rounded transition-colors",title:"Resume",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 010 1.972l-11.54 6.347a1.125 1.125 0 01-1.667-.986V5.653z"})})}),(0,b.jsx)("button",{onClick:D,className:"p-1 text-zinc-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Stop",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})})})]}):(0,b.jsx)("button",{onClick:C,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",title:"Read aloud",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})})}),("playing"===i||"loading"===i||"paused"===i)&&(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("button",{ref:u,onClick:()=>p(a=>!a),className:"px-1.5 py-0.5 text-[11px] font-mono font-medium rounded text-zinc-500 hover:text-zinc-700 hover:bg-zinc-100 transition-colors",title:"Playback speed",children:1===m?"1x":`${m}x`}),o&&(0,b.jsxs)("div",{ref:v,className:"absolute right-0 top-full mt-1 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-lg overflow-hidden z-[110]",style:{minWidth:150},onClick:a=>a.stopPropagation(),children:[ez.map(a=>(0,b.jsxs)("button",{onClick:()=>G(a.value),className:`w-full px-3 py-2 text-xs text-left flex items-center justify-between hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors ${m===a.value?"text-emerald-600 dark:text-emerald-400 font-medium":"text-zinc-700 dark:text-zinc-300"}`,children:[(0,b.jsx)("span",{children:a.label}),m===a.value&&(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})]},a.value)),(0,b.jsx)("div",{className:"border-t border-zinc-100 dark:border-zinc-800"}),s?(0,b.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",children:[(0,b.jsx)("input",{type:"number",min:.25,max:4,step:.25,value:q,onChange:a=>r(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=parseFloat(q);!isNaN(a)&&a>=.25&&a<=4&&G(a)}"Escape"===a.key&&(t(!1),p(!1))},onBlur:()=>{let a=parseFloat(q);!isNaN(a)&&a>=.25&&a<=4?G(a):t(!1)},autoFocus:!0,className:"w-16 rounded border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-2 py-1 text-xs text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-1 focus:ring-emerald-500"}),(0,b.jsx)("span",{className:"text-[11px] text-zinc-400 dark:text-zinc-400",children:"x"})]}):(0,b.jsxs)("button",{onClick:()=>{t(!0),r(String(m))},className:`w-full px-3 py-2 text-xs text-left flex items-center justify-between hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors ${!ez.some(a=>a.value===m)?"text-emerald-600 dark:text-emerald-400 font-medium":"text-zinc-700 dark:text-zinc-300"}`,children:[(0,b.jsxs)("span",{children:["Custom",ez.some(a=>a.value===m)?"...":` (${m}x)`]}),!ez.some(a=>a.value===m)&&(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})]})]})]}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})]}),k&&(0,b.jsxs)("div",{className:"px-5 py-2 text-xs text-red-500 bg-red-50 dark:bg-red-950 border-b border-red-100 dark:border-red-800 flex items-center justify-between",children:[(0,b.jsx)("span",{children:k}),(0,b.jsx)("button",{onClick:()=>l(null),className:"text-red-400 hover:text-red-600 ml-2",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 custom-scrollbar description-markdown text-sm text-zinc-700 dark:text-zinc-300 leading-relaxed",onMouseUp:w?void 0:H,children:[(0,b.jsx)(c6,{remarkPlugins:[ei],children:a.description}),a.acceptanceCriteria&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"border-t border-zinc-200 dark:border-zinc-700 my-4"}),(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Acceptance Criteria"}),(0,b.jsx)("pre",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800 overflow-x-auto",children:(0,b.jsx)("code",{className:"text-[11px] font-mono text-zinc-600 dark:text-zinc-300 whitespace-pre-wrap break-all",children:a.acceptanceCriteria})})]})]})]}),x&&!w&&(0,b.jsx)("div",{ref:z,className:"fixed z-[110] flex items-center gap-1.5 px-2.5 py-1.5 bg-zinc-800 text-white text-xs rounded-lg shadow-lg select-none",style:{left:x.x,top:x.y,transform:"translate(-50%, -100%)",pointerEvents:"auto"},onMouseDown:a=>a.stopPropagation(),onClick:a=>a.stopPropagation(),children:(0,b.jsxs)("button",{onClick:I,className:"flex items-center gap-1 hover:text-emerald-300 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})}),(0,b.jsx)("span",{children:"Read aloud"})]})})]}),document.body):null}function eB({className:a="w-3 h-3",filled:c=!1}){return c?(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"currentColor",children:(0,b.jsx)("path",{d:"M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z"})}):(0,b.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})})}function eC({node:a,allNodes:d,onNodeNavigate:i,comments:k,onPostComment:l,onDeleteComment:m,onLikeComment:n,onReplyComment:q,isAuthenticated:r,currentDid:s,repoUrls:t,onOpenSettings:u,onProfileClick:v}){var w;let x,y,[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(""),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),J=a=>{A(a.uri),C("")},K=()=>{A(null),C("")},L=async()=>{if(B.trim()&&z&&q){E(!0);try{let a=b=>{for(let c of b){if(c.uri===z)return c;let b=a(c.replies);if(b)return b}},b=k?a(k):void 0;b&&await q(b,B.trim()),A(null),C("")}catch(a){console.error("Failed to post reply:",a)}finally{E(!1)}}};if(!a)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("div",{className:"w-12 h-12 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center mb-4",children:(0,b.jsx)("svg",{className:"w-6 h-6 text-zinc-400 dark:text-zinc-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})})}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 leading-relaxed",children:"Click a node to see details"}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-1",children:"Hover to highlight connections"})]});let M=j[a.issueType]||"📋",N=e[a.status]||e.open,O=f[a.status]||a.status,P=g[a.priority]||`P${a.priority}`,Q=h[a.priority]||"#a1a1aa",R=o[a.prefix]||a.prefix,S=p[a.prefix]||"#a1a1aa",T=t?.[a.prefix],U=a.blockerIds.map(a=>d.find(b=>b.id===a)).filter(Boolean),V=a.dependentIds.map(a=>d.find(b=>b.id===a)).filter(Boolean),W=a=>{try{let b=new Date(a),c=b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),d=b.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!1});return`${c} at ${d}`}catch{return a}};return(0,b.jsxs)("div",{className:"animate-fade-in",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 mb-4",children:[(0,b.jsx)("span",{className:"text-2xl mt-0.5",children:M}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600 dark:text-emerald-400",children:a.id})}),(0,b.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100 mt-1 leading-snug",children:a.title})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[(0,b.jsxs)("span",{className:"status-badge",style:{backgroundColor:N+"18",color:N,border:`1px solid ${N}30`},children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mr-1.5",style:{backgroundColor:N}}),O]}),(0,b.jsx)("span",{className:"status-badge",style:{backgroundColor:Q+"15",color:Q,border:`1px solid ${Q}25`},children:P}),T?(0,b.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"status-badge hover:opacity-80 transition-opacity",style:{backgroundColor:S+"15",color:S,border:`1px solid ${S}25`,textDecoration:"none"},children:[R,(0,b.jsx)("svg",{className:"w-2.5 h-2.5 ml-1 opacity-50",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]}):(0,b.jsx)("span",{className:"status-badge",style:{backgroundColor:S+"15",color:S,border:`1px solid ${S}25`},children:R})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:a.labels.map(a=>(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium bg-zinc-100 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400 border border-zinc-200/60 dark:border-zinc-700/60",children:a},a))}),T&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),T.replace(/^https?:\/\//,"")]})}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[(0,b.jsx)(eE,{label:"Blocks",value:a.blockerCount,color:a.blockerCount>0?"#f59e0b":void 0}),(0,b.jsx)(eE,{label:"Blocked by",value:a.dependentCount,color:a.dependentCount>0?"#ef4444":void 0})]}),(0,b.jsxs)("div",{className:"space-y-1.5 mb-4 text-xs text-zinc-500 dark:text-zinc-400",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Created"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.createdAt)})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Updated"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.updatedAt)})]}),a.closedAt&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Closed"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.closedAt)})]}),a.closeReason&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Reason"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium ml-2 text-right",children:(w=a.closeReason,x=T||"https://github.com/GainForest/heartbeads",1===(y=w.split(/\b([0-9a-f]{7,40})\b/)).length?w:y.map((a,c)=>/^[0-9a-f]{7,40}$/.test(a)?(0,b.jsx)("a",{href:`${x}/commit/${a}`,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 underline decoration-emerald-300 hover:decoration-emerald-500 cursor-pointer transition-colors",children:a},c):(0,b.jsx)("span",{children:a},c)))})]}),(a.createdBy||a.owner||a.assignee)&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Created by"}),(0,b.jsx)("button",{onClick:()=>v?.(a.createdBy||a.owner||a.assignee||""),className:"text-zinc-700 dark:text-zinc-300 font-medium truncate ml-2 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.createdBy||a.owner||a.assignee})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Assignee"}),a.assignee?(0,b.jsx)("button",{onClick:()=>v?.(a.assignee),className:"text-zinc-700 dark:text-zinc-300 font-medium truncate ml-2 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.assignee}):(0,b.jsx)("span",{className:"text-zinc-400 dark:text-zinc-500 italic ml-2",children:"No assignee"})]}),null!=a.estimatedMinutes&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Estimate"}),(0,b.jsxs)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:["⏱ ",a.estimatedMinutes,"m"]})]})]}),a.description&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",children:"Description"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>{if(!a.description)return;let b=t?.[a.prefix];navigator.clipboard.writeText(el(a,b)).then(()=>{I(!0),setTimeout(()=>I(!1),1500)})},className:"text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:"Copy description",children:H?(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),(0,b.jsx)("button",{onClick:()=>G(!0),className:"text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:"View in window"})]})]}),(0,b.jsx)("div",{className:"text-xs text-zinc-600 dark:text-zinc-300 leading-relaxed bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 max-h-40 overflow-y-auto custom-scrollbar border border-zinc-100 dark:border-zinc-800 description-markdown",children:(0,b.jsx)(c6,{remarkPlugins:[ei],children:a.description})})]}),F&&a.description&&(0,b.jsx)(eA,{node:a,onClose:()=>G(!1),repoUrl:t?.[a.prefix],onOpenSettings:u}),a.acceptanceCriteria&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Acceptance Criteria"}),(0,b.jsx)("pre",{className:"text-[11px] font-mono bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800 overflow-x-auto whitespace-pre-wrap break-all",children:(0,b.jsx)("code",{children:a.acceptanceCriteria})})]}),U.length>0&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Blocks (",U.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:U.map(a=>(0,b.jsx)(eF,{node:a,onClick:()=>i(a.id)},a.id))})]}),V.length>0&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Blocked by (",V.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:V.map(a=>(0,b.jsx)(eF,{node:a,onClick:()=>i(a.id)},a.id))})]}),(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Comments"," ",k&&k.length>0&&(0,b.jsx)("span",{className:"ml-1 px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:k.length})]}),k&&k.length>0?(0,b.jsx)("div",{className:"space-y-1",children:k.map(a=>(0,b.jsx)(eG,{comment:a,currentDid:s,isAuthenticated:r,onDelete:m,onLike:n,onStartReply:J,replyingToUri:z,replyText:B,onReplyTextChange:C,onSubmitReply:L,onCancelReply:K,isSubmittingReply:D,depth:0},a.uri))}):(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 italic",children:"No comments yet"}),r&&l?(0,b.jsx)(eH,{onSubmit:l}):r?null:(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-2",children:"Sign in to leave a comment"})]})]})}function eD({replyingTo:a,replyText:c,onTextChange:d,onSubmit:e,onCancel:f,isSubmitting:g}){return(0,b.jsxs)("div",{className:"mt-2 ml-4 pl-3 border-l border-emerald-200 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-zinc-400 dark:text-zinc-500",children:[(0,b.jsx)("span",{children:"Replying to"}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-600 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||e()},placeholder:"Write a reply...",disabled:g,autoFocus:!0,className:"flex-1 px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:border-emerald-400 disabled:opacity-50"}),(0,b.jsx)("button",{onClick:e,disabled:!c.trim()||g,className:"px-2 py-1 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:g?"...":"Reply"}),(0,b.jsx)("button",{onClick:f,disabled:g,className:"px-2 py-1 text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 disabled:opacity-50 transition-colors",children:"Cancel"})]})]})}function eE({label:a,value:c,color:d}){return(0,b.jsxs)("div",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"text-xl font-bold",style:{color:d||"#3f3f46"},children:c}),(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 uppercase tracking-wider mt-0.5",children:a})]})}function eF({node:a,onClick:c}){let d=e[a.status]||e.open;return(0,b.jsxs)("button",{onClick:c,className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors text-left group border border-transparent hover:border-zinc-200 dark:hover:border-zinc-700",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:d}}),(0,b.jsx)("span",{className:"text-xs font-mono text-emerald-600 dark:text-emerald-400 group-hover:text-emerald-700 dark:group-hover:text-emerald-300 shrink-0",children:a.id}),(0,b.jsx)("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 truncate",children:a.title})]})}function eG({comment:a,currentDid:d,isAuthenticated:e,onDelete:f,onLike:g,onStartReply:h,replyingToUri:i,replyText:j,onReplyTextChange:k,onSubmitReply:l,onCancelReply:m,isSubmittingReply:n,depth:o}){let[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(!1),t=d&&d===a.did,u=!!d&&a.likes.some(a=>a.did===d),v=i===a.uri,w=async()=>{if(f&&!p){q(!0);try{await f(a)}catch(a){console.error("Failed to delete comment:",a)}finally{q(!1)}}},x=async()=>{if(g&&!r){s(!0);try{await g(a)}catch(a){console.error("Failed to toggle like:",a)}finally{s(!1)}}};return(0,b.jsxs)("div",{className:`${o>0?"ml-4 pl-3 border-l border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle||a.did.slice(0,16)+"..."}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 shrink-0",children:ek(a.createdAt)})]}),(0,b.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed whitespace-pre-wrap break-words",children:a.text}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,b.jsxs)("button",{onClick:x,disabled:!e||r,className:`flex items-center gap-0.5 transition-colors ${u?"text-rose-500":"text-zinc-300 hover:text-rose-500"} disabled:opacity-50`,children:[(0,b.jsx)(eB,{className:"w-3 h-3",filled:u}),a.likes.length>0&&(0,b.jsx)("span",{children:a.likes.length})]}),(0,b.jsx)("button",{onClick:()=>h(a),disabled:!e,className:`transition-colors disabled:opacity-50 ${v?"text-emerald-500 dark:text-emerald-400":"text-zinc-300 dark:text-zinc-600 hover:text-zinc-500 dark:hover:text-zinc-400"}`,children:"reply"}),t&&f&&(0,b.jsx)("button",{onClick:w,disabled:p,className:"ml-auto shrink-0 text-zinc-300 dark:text-zinc-600 hover:text-red-400 disabled:opacity-50 transition-colors",children:p?"...":"delete"})]})]}),v&&(0,b.jsx)(eD,{replyingTo:a,replyText:j,onTextChange:k,onSubmit:l,onCancel:m,isSubmitting:n}),a.replies.length>0&&(0,b.jsx)("div",{children:a.replies.map(a=>(0,b.jsx)(eG,{comment:a,currentDid:d,isAuthenticated:e,onDelete:f,onLike:g,onStartReply:h,replyingToUri:i,replyText:j,onReplyTextChange:k,onSubmitReply:l,onCancelReply:m,isSubmittingReply:n,depth:o+1},a.uri))})]})}function eH({onSubmit:a}){let[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(!1),h=async()=>{if(d.trim()&&!f){g(!0);try{await a(d.trim()),e("")}catch(a){console.error("Failed to post comment:",a)}finally{g(!1)}}};return(0,b.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,b.jsx)("textarea",{value:d,onChange:a=>e(a.target.value),placeholder:"Leave a comment...",rows:2,className:"w-full px-2.5 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsx)("button",{onClick:h,disabled:!d.trim()||f,className:"px-3 py-1 text-xs font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:f?"Sending...":"Comment"})]})}var eI=a.i(27833);function eJ({onViewProfile:a}){let{isAuthenticated:d,isLoading:e,session:f,login:g,logout:h}=(0,eI.useAuth)(),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)(""),s=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!k)return;let a=a=>{s.current&&!s.current.contains(a.target)&&l(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[k]);let t=async a=>{if(a.preventDefault(),m.trim()){p(!0),r("");try{await g(m.trim())}catch(a){r(a instanceof Error?a.message:"Login failed"),p(!1)}}},u=async()=>{l(!1),await h()};return e?(0,b.jsx)("div",{className:"w-4 h-4 rounded-full border-2 border-zinc-200 border-t-zinc-400 animate-spin"}):d&&f?(0,b.jsxs)("div",{className:"relative",ref:s,children:[(0,b.jsxs)("button",{onClick:()=>l(a=>!a),className:"flex items-center gap-2 px-3 py-1.5 rounded-full hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:[f.avatar?(0,b.jsx)("img",{src:f.avatar,alt:f.handle,width:24,height:24,className:"rounded-full"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-emerald-100 dark:bg-emerald-950 flex items-center justify-center text-[11px] text-emerald-700 dark:text-emerald-400 font-medium",children:(f.displayName||f.handle).charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-400 max-w-[100px] truncate",children:f.displayName||f.handle})]}),k&&(0,b.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-44 bg-white dark:bg-zinc-900 rounded-xl shadow-xl border border-zinc-100 dark:border-zinc-700 py-2 z-50",children:[(0,b.jsxs)("button",{onClick:()=>{a?(a(f.handle),l(!1)):window.open(f.did?`https://www.impactindexer.org/data?did=${f.did}`:"#","_blank")},className:"block w-full text-left px-3 py-1.5 text-xs text-zinc-400 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors cursor-pointer",children:["@",f.handle]}),(0,b.jsx)("div",{className:"h-px bg-zinc-100 dark:border-zinc-800 my-1"}),(0,b.jsxs)("button",{onClick:u,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"})}),"Sign out"]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>j(!0),className:"px-4 py-1.5 text-sm font-medium text-zinc-600 dark:text-zinc-400 rounded-full hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer whitespace-nowrap",children:"Sign in"}),i&&(0,b.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",onClick:()=>j(!1),children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),(0,b.jsxs)("div",{className:"relative w-full max-w-sm mx-4 bg-white dark:bg-zinc-900 rounded-xl shadow-lg border border-zinc-200 dark:border-zinc-700 p-6",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100 mb-1",children:"Sign in with ATProto"}),(0,b.jsx)("p",{className:"text-sm text-zinc-400 dark:text-zinc-400 mb-5",children:"Enter your Bluesky handle to connect."}),(0,b.jsxs)("form",{onSubmit:t,children:[(0,b.jsx)("label",{htmlFor:"auth-handle",className:"block text-sm text-zinc-600 dark:text-zinc-400 mb-1.5",children:"Handle"}),(0,b.jsx)("input",{id:"auth-handle",type:"text",value:m,onChange:a=>n(a.target.value),placeholder:"alice.bsky.social",disabled:o,autoFocus:!0,className:"w-full px-3 py-2 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-lg placeholder:text-zinc-300 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed text-zinc-900 dark:text-zinc-100"}),(0,b.jsx)("p",{className:"text-xs text-zinc-300 dark:text-zinc-500 mt-1.5",children:"Just a username? We'll add .bsky.social for you."}),q&&(0,b.jsx)("p",{className:"text-sm text-red-500 mt-2",children:q}),(0,b.jsxs)("div",{className:"flex gap-2 mt-5",children:[(0,b.jsx)("button",{type:"button",onClick:()=>j(!1),disabled:o,className:"flex-1 px-3 py-2 text-sm text-zinc-600 dark:text-zinc-400 bg-zinc-50 dark:bg-zinc-800 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),(0,b.jsx)("button",{type:"submit",disabled:o||!m.trim(),className:"flex-1 px-3 py-2 text-sm text-white bg-emerald-600 rounded-lg hover:bg-emerald-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Connecting...":"Connect"})]})]})]})]})]})}var eK=a.i(88467);function eL({node:a,x:d,y:e,onClose:f,onSubmit:g,isAuthenticated:h,existingComments:i}){let[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(!1),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[q,r]=(0,c.useState)({x:0,y:0}),[s,t]=(0,c.useState)(!1),u=ey();(0,c.useEffect)(()=>{if(!n.current)return;let a=n.current.getBoundingClientRect(),b=window.innerWidth,c=window.innerHeight,f=d+14,g=e-a.height-14;f+a.width>b-16&&(f=b-a.width-16),f<16&&(f=16),g<16&&(g=e+28),g+a.height>c-16&&(g=c-a.height-16),r({x:f,y:g}),t(!0)},[d,e]),(0,c.useEffect)(()=>{if(h){let a=setTimeout(()=>o.current?.focus(),100);return()=>clearTimeout(a)}},[h]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&f()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[f]),(0,c.useEffect)(()=>{let a=a=>{n.current&&!n.current.contains(a.target)&&f()},b=setTimeout(()=>{window.addEventListener("mousedown",a)},50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[f]);let v=(0,c.useCallback)(async()=>{if(j.trim()&&!l){m(!0);try{await g(j.trim()),k("")}catch(a){console.error("Failed to post comment:",a)}finally{m(!1)}}},[j,l,g]),w=(0,c.useCallback)(a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&(a.preventDefault(),v())},[v]),x=p[a.prefix]||"#a1a1aa",y=i?.length||0,z=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mb-3",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-emerald-600 dark:text-emerald-400",children:a.id}),(0,b.jsx)("h3",{className:"text-sm font-semibold text-zinc-800 dark:text-zinc-200 leading-tight mt-0.5",children:a.title})]}),y>0&&i&&(0,b.jsxs)("div",{className:"mb-3 pb-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-blue-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),(0,b.jsxs)("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",children:[y," comment",1!==y?"s":""]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[i.slice(0,2).map(a=>(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden mt-0.5",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[7px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle}),(0,b.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400 line-clamp-2 leading-tight",children:a.text})]})]},a.uri)),y>2&&(0,b.jsxs)("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 italic",children:["+",y-2," more — see detail panel"]})]})]}),h?(0,b.jsxs)("div",{children:[(0,b.jsx)("textarea",{ref:o,value:j,onChange:a=>k(a.target.value),onKeyDown:w,placeholder:"Leave a comment...",rows:3,className:"w-full px-2.5 py-2 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","+Enter to send"]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:f,className:"px-2.5 py-1 text-[11px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:"Cancel"}),(0,b.jsx)("button",{onClick:v,disabled:!j.trim()||l,className:"px-3 py-1 text-[11px] font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsxs)("svg",{className:"w-3 h-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Sending"]}):"Send"})]})]})]}):(0,b.jsxs)("div",{className:"text-center py-3",children:[(0,b.jsx)("svg",{className:"w-5 h-5 text-zinc-300 dark:text-zinc-600 mx-auto mb-1.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:"Sign in to comment"})]})]});return u?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[99] bg-black/20",onClick:f}),(0,b.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-[100] bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl animate-slide-up-sheet",children:[(0,b.jsx)("div",{className:"w-10 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full mx-auto mt-3 mb-1"}),(0,b.jsx)("div",{className:"px-4 pb-6 pt-2",children:z}),(0,b.jsx)("div",{className:"h-[env(safe-area-inset-bottom)]"})]})]}):(0,b.jsxs)("div",{ref:n,style:{position:"fixed",left:q.x,top:q.y,width:320,zIndex:100,opacity:+!!s,transform:s?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease"},className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg overflow-hidden",onContextMenu:a=>a.preventDefault(),children:[(0,b.jsx)("style",{children:`
1
+ module.exports=[6103,(a,b,c)=>{"use strict";var d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,f=/^\s*/,g=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,j=/^[;\s]*/,k=/^\s+|\s+$/g;function l(a){return a?a.replace(k,""):""}b.exports=function(a,b){if("string"!=typeof a)throw TypeError("First argument must be a string");if(!a)return[];b=b||{};var c=1,k=1;function m(a){var b=a.match(e);b&&(c+=b.length);var d=a.lastIndexOf("\n");k=~d?a.length-d:k+a.length}function n(){var a={line:c,column:k};return function(b){return b.position=new o(a),q(f),b}}function o(a){this.start=a,this.end={line:c,column:k},this.source=b.source}function p(d){var e=Error(b.source+":"+c+":"+k+": "+d);if(e.reason=d,e.filename=b.source,e.line=c,e.column=k,e.source=a,b.silent);else throw e}function q(b){var c=b.exec(a);if(c){var d=c[0];return m(d),a=a.slice(d.length),c}}function r(a){var b;for(a=a||[];b=s();)!1!==b&&a.push(b);return a}function s(){var b=n();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var c=2;""!=a.charAt(c)&&("*"!=a.charAt(c)||"/"!=a.charAt(c+1));)++c;if(c+=2,""===a.charAt(c-1))return p("End of comment missing");var d=a.slice(2,c-2);return k+=2,m(d),a=a.slice(c),k+=2,b({type:"comment",comment:d})}}o.prototype.content=a,q(f);var t,u=[];for(r(u);t=function(){var a=n(),b=q(g);if(b){if(s(),!q(h))return p("property missing ':'");var c=q(i),e=a({type:"declaration",property:l(b[0].replace(d,"")),value:c?l(c[0].replace(d,"")):""});return q(j),e}}();)!1!==t&&(u.push(t),r(u));return u}},66510,(a,b,c)=>{"use strict";var d=a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(a,b){let c=null;if(!a||"string"!=typeof a)return c;let d=(0,e.default)(a),f="function"==typeof b;return d.forEach(a=>{if("declaration"!==a.type)return;let{property:d,value:e}=a;f?b(d,e,a):e&&((c=c||{})[d]=e)}),c};let e=d(a.r(6103))},98257,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.camelCase=void 0;var d=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,f=/^[^-]+$/,g=/^-(webkit|moz|ms|o|khtml)-/,h=/^-(ms)-/,i=function(a,b){return b.toUpperCase()},j=function(a,b){return"".concat(b,"-")};c.camelCase=function(a,b){var c;return(void 0===b&&(b={}),!(c=a)||f.test(c)||d.test(c))?a:(a=a.toLowerCase(),(a=b.reactCompat?a.replace(h,j):a.replace(g,j)).replace(e,i))}},30841,(a,b,c)=>{"use strict";var d=(a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}})(a.r(66510)),e=a.r(98257);function f(a,b){var c={};return a&&"string"==typeof a&&(0,d.default)(a,function(a,d){a&&d&&(c[(0,e.camelCase)(a,b)]=d)}),c}f.default=f,b.exports=f},83230,(a,b,c)=>{"use strict";var d=Object.prototype.hasOwnProperty,e=Object.prototype.toString,f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,h=function(a){return"function"==typeof Array.isArray?Array.isArray(a):"[object Array]"===e.call(a)},i=function(a){if(!a||"[object Object]"!==e.call(a))return!1;var b,c=d.call(a,"constructor"),f=a.constructor&&a.constructor.prototype&&d.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!f)return!1;for(b in a);return void 0===b||d.call(a,b)},j=function(a,b){f&&"__proto__"===b.name?f(a,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):a[b.name]=b.newValue},k=function(a,b){if("__proto__"===b){if(!d.call(a,b))return;else if(g)return g(a,b).value}return a[b]};b.exports=function a(){var b,c,d,e,f,g,l=arguments[0],m=1,n=arguments.length,o=!1;for("boolean"==typeof l&&(o=l,l=arguments[1]||{},m=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});m<n;++m)if(b=arguments[m],null!=b)for(c in b)d=k(l,c),l!==(e=k(b,c))&&(o&&e&&(i(e)||(f=h(e)))?(f?(f=!1,g=d&&h(d)?d:[]):g=d&&i(d)?d:{},j(l,{name:c,newValue:a(o,g,e)})):void 0!==e&&j(l,{name:c,newValue:e}));return l}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},60350,a=>{"use strict";var b=a.i(3137),c=a.i(71459);let d={status:"Status",priority:"Priority",type:"Type",owner:"Owner",assignee:"Assignee",prefix:"Prefix"},e={open:"#10b981",in_progress:"#f59e0b",blocked:"#ef4444",deferred:"#8b5cf6",closed:"#a1a1aa"},f={open:"Open",in_progress:"In Progress",blocked:"Blocked",deferred:"Deferred",closed:"Closed"},g={0:"P0 - Critical",1:"P1 - High",2:"P2 - Medium",3:"P3 - Low",4:"P4 - Backlog"},h={0:"#ef4444",1:"#f97316",2:"#3b82f6",3:"#a1a1aa",4:"#d4d4d8"},i=["#d20f39","#179299","#fe640b","#1e66f5","#40a02b","#8839ef","#df8e1d","#209fb5","#ea76cb","#04a5e5","#e64553","#7287fd","#dd7878","#dc8a78","#862d2d","#bf4040","#d27979","#931f1f","#d22d2d","#e06c6c","#a11212","#e61919","#ed5e5e","#86592d","#bf8040","#d2a679","#93591f","#d2802d","#e0a66c","#a15912","#e68019","#eda65e","#86862d","#bfbf40","#d2d279","#93931f","#d2d22d","#e0e06c","#a1a112","#e6e619","#eded5e","#59862d","#80bf40","#a6d279","#59931f","#80d22d","#a6e06c","#59a112","#80e619","#a6ed5e","#2d862d","#40bf40","#79d279","#1f931f","#2dd22d","#6ce06c","#12a112","#19e619","#5eed5e","#2d8659","#40bf80","#79d2a6","#1f9359","#2dd280","#6ce0a6","#12a159","#19e680","#5eeda6","#2d8686","#40bfbf","#79d2d2","#1f9393","#2dd2d2","#6ce0e0","#12a1a1","#19e6e6","#5eeded","#2d5986","#4080bf","#79a6d2","#1f5993","#2d80d2","#6ca6e0","#1259a1","#1980e6"],j={bug:"🐛",feature:"✨",task:"📝",epic:"🎯",chore:"🔧"},k={epic:"#8839ef",task:"#1e66f5",bug:"#d20f39",feature:"#40a02b",chore:"#acb0be"},l={epic:"Epic",task:"Task",bug:"Bug",feature:"Feature",chore:"Chore"};function m(a){return a.split(/[-_]/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function n(a){if(!a)return"#acb0be";let b=0x811c9dc5;for(let c=0;c<a.length;c++)b^=a.charCodeAt(c),b=0x1000193*b>>>0;return i[b%i.length]}let o=new Proxy({},{get:(a,b)=>m(b),has:()=>!0}),p=new Proxy({},{get:(a,b)=>(function(a){let b=0x811c9dc5;for(let c=0;c<a.length;c++)b^=a.charCodeAt(c),b=0x1000193*b>>>0;let c=b%360;return`hsl(${c}, 65%, 55%)`})(b),has:()=>!0});function q(a){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;return`${b}->${c}:${a.type}`}function r(a,b){if(!a)return{addedNodeIds:new Set(b.graphData.nodes.map(a=>a.id)),removedNodeIds:new Set,changedNodes:new Map,addedLinkKeys:new Set(b.graphData.links.map(q)),removedLinkKeys:new Set,hasChanges:!0};let c=new Map(a.graphData.nodes.map(a=>[a.id,a])),d=new Map(b.graphData.nodes.map(a=>[a.id,a])),e=new Set,f=new Set,g=new Map;for(let[a,b]of d)if(c.has(a)){let d=c.get(a),e=[];d.status!==b.status&&e.push({field:"status",from:d.status,to:b.status}),d.priority!==b.priority&&e.push({field:"priority",from:String(d.priority),to:String(b.priority)}),d.title!==b.title&&e.push({field:"title",from:d.title,to:b.title}),(d.owner||"")!==(b.owner||"")&&e.push({field:"owner",from:d.owner||"",to:b.owner||""}),(d.assignee||"")!==(b.assignee||"")&&e.push({field:"assignee",from:d.assignee||"",to:b.assignee||""}),e.length>0&&g.set(a,e)}else e.add(a);for(let a of c.keys())d.has(a)||f.add(a);let h=new Set(a.graphData.links.map(q)),i=new Set(b.graphData.links.map(q)),j=new Set,k=new Set;for(let a of i)h.has(a)||j.add(a);for(let a of h)i.has(a)||k.add(a);let l=e.size>0||f.size>0||g.size>0||j.size>0||k.size>0;return{addedNodeIds:e,removedNodeIds:f,changedNodes:g,addedLinkKeys:j,removedLinkKeys:k,hasChanges:l}}var s=a.i(77369);function t(a){return function(){return a}}function u(a){return(a()-.5)*1e-6}function v(a){return a.x+a.vx}function w(a){return a.y+a.vy}function x(a){var b,c,d,e=1,f=1;function g(){for(var a,g,i,j,k,l,m,n=b.length,o=0;o<f;++o)for(a=0,g=(0,s.quadtree)(b,v,w).visitAfter(h);a<n;++a)m=(l=c[(i=b[a]).index])*l,j=i.x+i.vx,k=i.y+i.vy,g.visit(p);function p(a,b,c,f,g){var h=a.data,n=a.r,o=l+n;if(h){if(h.index>i.index){var p=j-h.x-h.vx,q=k-h.y-h.vy,r=p*p+q*q;r<o*o&&(0===p&&(r+=(p=u(d))*p),0===q&&(r+=(q=u(d))*q),r=(o-(r=Math.sqrt(r)))/r*e,i.vx+=(p*=r)*(o=(n*=n)/(m+n)),i.vy+=(q*=r)*o,h.vx-=p*(o=1-o),h.vy-=q*o)}return}return b>j+o||f<j-o||c>k+o||g<k-o}}function h(a){if(a.data)return a.r=c[a.data.index];for(var b=a.r=0;b<4;++b)a[b]&&a[b].r>a.r&&(a.r=a[b].r)}function i(){if(b){var d,e,f=b.length;for(d=0,c=Array(f);d<f;++d)c[(e=b[d]).index]=+a(e,d,b)}}return"function"!=typeof a&&(a=t(null==a?1:+a)),g.initialize=function(a,c){b=a,d=c,i()},g.iterations=function(a){return arguments.length?(f=+a,g):f},g.strength=function(a){return arguments.length?(e=+a,g):e},g.radius=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),i(),g):a},g}let y=null;function z(a){let b=a.blockerCount+a.dependentCount;return"epic"===a.issueType&&(b+=3),5+17*Math.min(b/6,1)}let A="status";function B(a){switch(A){case"priority":return h[a.priority]||h[2];case"type":return k[a.issueType]||k.task;case"owner":return n(a.createdBy);case"assignee":return n(a.assignee);case"prefix":return n(a.prefix);default:return e[a.status]||e.open}}function C(a){return 1-(1-a)*(1-a)}let D=new Map;function E(a,b){let c=D.get(a);if("loading"===c||"failed"===c)return null;if(c)return c;D.set(a,"loading");let d=new Image;return d.onload=()=>{D.set(a,d),b()},d.onerror=()=>{D.set(a,"failed")},d.src=a,null}function F(a,b,c,d,e,f,g){a.beginPath(),a.arc(b,c,d,0,2*Math.PI),a.fillStyle=g?"#3f3f46":"#e4e4e7",a.fill();let h=e.replace("@","").charAt(0).toUpperCase(),i=Math.min(7,Math.max(3,1.3*d));a.font=`600 ${i}px 'Inter', system-ui, sans-serif`,a.textAlign="center",a.textBaseline="middle",a.fillStyle="#71717a",a.fillText(h,b,c+.3)}function G(a,b){let c=new Set([a]),d=[{id:a,depth:0}];for(;d.length>0;){let{id:a,depth:e}=d.shift();if(!(e>=2))for(let f of b){let b="object"==typeof f.source?f.source.id:f.source,g="object"==typeof f.target?f.target.id:f.target;b!==a||c.has(g)||(c.add(g),d.push({id:g,depth:e+1})),g!==a||c.has(b)||(c.add(b),d.push({id:b,depth:e+1}))}}return c}function H(a){let b=a.current;if(!b)return;let c=b.zoom();"number"!=typeof c||isNaN(c)||(b.zoom(1.000001*c,0),requestAnimationFrame(()=>{a.current&&a.current.zoom(c,0)}))}let I=()=>"replace",J=()=>"#10b981",K=(0,c.forwardRef)(function({nodes:i,links:j,selectedNode:o,selectedNodeIds:p,onSelectedNodeIdsChange:q,onNodeClick:r,onNodeHover:s,onBackgroundClick:u,onNodeRightClick:v,commentedNodeIds:w,claimedNodeAvatars:D,assigneeNodeAvatars:K,onAvatarHover:L,onAvatarClick:N,timelineActive:O,stats:P,sidebarOpen:Q,collapsedEpicIds:R,onCollapseAll:S,onExpandAll:T,colorMode:U="status",onColorModeChange:V,autoFit:W=!0,onAutoFitToggle:X,pulseNodeId:Y,showPulse:Z=!0,onShowPulseToggle:$,showParticles:_=!0,onShowParticlesToggle:aa,focusedEpicId:ab,onExitFocusedEpic:ac,isMobile:ad,onNodeDoubleTap:ae,activeLegendFilters:af,onToggleLegendFilter:ag,onClearLegendFilters:ah,theme:ai},aj){let ak=(0,c.useRef)(null),al=(0,c.useRef)(null),am=(0,c.useRef)(null),an=(0,c.useRef)(0),ao=(0,c.useRef)(()=>{}),[ap,aq]=(0,c.useState)({width:800,height:600}),ar=(0,c.useRef)(!1),as=(0,c.useRef)(new Set),at=(0,c.useRef)(null),au=(0,c.useRef)(ai),[av,aw]=(0,c.useState)(null),ax=(0,c.useRef)(null),ay=(0,c.useRef)(null),az=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{az.current&&clearTimeout(az.current)},[]);let[aA,aB]=(0,c.useState)({w:160,h:120}),aC=aA.w,aD=aA.h,aE=(0,c.useRef)(null),[aF,aG]=(0,c.useState)(y);(0,c.useEffect)(()=>{y||a.A(21671).then(a=>{y=a.default||a,aG(()=>y)})},[]);let[aH,aI]=(0,c.useState)("dag"),[aJ,aK]=(0,c.useState)(!0),aL=(0,c.useRef)(o),aM=(0,c.useRef)(null),aN=(0,c.useRef)(new Set),aO=(0,c.useRef)(w||new Map),aP=(0,c.useRef)(D||new Map),aQ=(0,c.useRef)(K||new Map),aR=(0,c.useRef)(U),aS=(0,c.useRef)(Y||null),aT=(0,c.useRef)(Z),aU=(0,c.useRef)(()=>{});aU.current=()=>H(ak);let aV=(0,c.useRef)(L);aV.current=L;let aW=(0,c.useRef)(N);(0,c.useEffect)(()=>{aW.current=N},[N]);let aX=(0,c.useRef)(q);(0,c.useEffect)(()=>{aX.current=q},[q]);let aY=(0,c.useRef)(null),aZ=(0,c.useRef)(0),a$=(0,c.useRef)({x:0,y:0}),a_=(0,c.useRef)(i),a0=(0,c.useRef)(null),a1=(0,c.useRef)(null),a2=(0,c.useRef)([]),{viewNodes:a3,viewLinks:a4,preFilterNodes:a5}=(0,c.useMemo)(()=>{let a=i,b=j;if(ab){let c=new Map;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;"parent-child"===a.type&&c.set(d,b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(!c.has(b.id)&&b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.set(b.id,a)}let e=new Set;for(let[a,b]of(e.add(ab),c))b===ab&&e.add(a);for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;"parent-child"!==a.type&&(e.has(b)&&d.has(c)&&e.add(c),e.has(c)&&d.has(b)&&e.add(b))}a=a.filter(a=>e.has(a.id)),b=b.filter(a=>{let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;return e.has(b)&&e.has(c)})}if(R&&R.size>0){let c=new Map;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;"parent-child"===a.type&&c.set(d,b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(!c.has(b.id)&&b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.set(b.id,a)}let e=new Set;for(let[a,b]of c)R.has(b)&&e.add(a);if(e.size>0){let d=new Map;for(let a of e)d.set(a,c.get(a));let f=new Map,g=new Map,h=new Map;for(let[b,c]of d){f.set(c,(f.get(c)||0)+1);let d=a.find(a=>a.id===b);d&&(g.set(c,(g.get(c)||0)+d.blockerCount),h.set(c,(h.get(c)||0)+d.dependentCount))}let i=a.filter(a=>!e.has(a.id)).map(a=>({...a,blockerCount:a.blockerCount+(g.get(a.id)||0),dependentCount:a.dependentCount+(h.get(a.id)||0),collapsedCount:f.get(a.id)||0})),j=[],k=new Set;for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;if("parent-child"===a.type&&e.has(c)||(b=d.get(b)||b)===(c=d.get(c)||c))continue;let f=`${b}->${c}:${a.type}`;k.has(f)||(k.add(f),j.push({source:b,target:c,type:a.type}))}a=i,b=j}}let c=[...a];if(af&&af.size>0){let c=new Set(a.filter(a=>{switch(U){case"status":return af.has(a.status);case"priority":return af.has(String(a.priority));case"type":return af.has(a.issueType);case"owner":return af.has(a.createdBy||"Unassigned");case"assignee":return af.has(a.assignee||"Unassigned");case"prefix":return af.has(m(a.prefix));default:return!0}}).map(a=>a.id));a=a.filter(a=>c.has(a.id)),b=b.filter(a=>{let b="object"==typeof a.source?a.source.id:a.source,d="object"==typeof a.target?a.target.id:a.target;return c.has(b)&&c.has(d)})}return{viewNodes:a,viewLinks:b,preFilterNodes:c}},[i,j,R,ab,af,U]);a_.current=a3;let a6=(0,c.useMemo)(()=>P&&af&&0!==af.size?{total:a3.length,edges:a4.length,prefixes:[...new Set(a3.map(a=>a.prefix))]}:P,[P,af,a3,a4]);(0,c.useEffect)(()=>{let a=new Map;for(let b of j){let c="object"==typeof b.source?b.source.id:b.source,d="object"==typeof b.target?b.target.id:b.target;"parent-child"===b.type&&a.set(d,c)}let b=new Set(i.map(a=>a.id));for(let c of i)if(!a.has(c.id)&&c.id.includes(".")){let d=c.id.split(".")[0];b.has(d)&&a.set(c.id,d)}let c=new Map;for(let[b,d]of a){let a=c.get(d)||[];a.push(b),c.set(d,a)}let d=new Map(i.map(a=>[a.id,a])),e=[];for(let[a,b]of c){let c=d.get(a);c&&e.push({parentId:a,title:c.title||a,prefix:c.prefix,memberIds:[a,...b]})}a2.current=e},[i,j]);let a7=(0,c.useMemo)(()=>{if("status"===U||"priority"===U||"type"===U)return[];let a=new Map;for(let b of a5)switch(U){case"owner":{let c=b.createdBy||void 0;a.set(c||"Unassigned",n(c));break}case"assignee":{let c=b.assignee||void 0;a.set(c||"Unassigned",n(c));break}case"prefix":a.set(m(b.prefix),n(b.prefix))}return Array.from(a.entries()).sort(([a],[b])=>"Unassigned"===a?1:"Unassigned"===b?-1:a.localeCompare(b)).map(([a,b])=>({label:a,color:b}))},[U,a5]),a8=(0,c.useRef)(a4);(0,c.useEffect)(()=>{a8.current=a4},[a4]),(0,c.useEffect)(()=>{aL.current=o;let a=aM.current||o;a?aN.current=G(a.id,a4):aN.current=new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},[o,a4]),(0,c.useEffect)(()=>{as.current=p||new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},[p]),(0,c.useEffect)(()=>{aO.current=w||new Map,H(ak)},[w]),(0,c.useEffect)(()=>{aP.current=D||new Map,H(ak)},[D]),(0,c.useEffect)(()=>{aQ.current=K||new Map,H(ak)},[K]),(0,c.useEffect)(()=>{aR.current=U,A=U,H(ak),an.current=requestAnimationFrame(()=>ao.current())},[U]),(0,c.useEffect)(()=>{aS.current=Y||null,aT.current=Z,H(ak)},[Y,Z]),(0,c.useEffect)(()=>{au.current=ai,H(ak),an.current=requestAnimationFrame(()=>ao.current())},[ai]),(0,c.useEffect)(()=>{ax.current=av},[av]),(0,c.useEffect)(()=>{if(!av)return;let a=a=>{let b=ax.current;if(!b)return;let c=a.clientX-b.startX,d=a.clientY-b.startY,e=b.active||Math.abs(c)>5||Math.abs(d)>5;aw(b=>b?{...b,currentX:a.clientX,currentY:a.clientY,active:e}:null)},b=a=>{let b=ax.current;if(!b)return void aw(null);if(b.active){let c=ak.current;if(c){let d=al.current?.getBoundingClientRect();if(d){let e=c.screen2GraphCoords(Math.min(b.startX,a.clientX)-d.left,Math.min(b.startY,a.clientY)-d.top),f=c.screen2GraphCoords(Math.max(b.startX,a.clientX)-d.left,Math.max(b.startY,a.clientY)-d.top),g=new Set;for(let a of a_.current)null!=a.x&&null!=a.y&&a.x>=e.x&&a.x<=f.x&&a.y>=e.y&&a.y<=f.y&&g.add(a.id);g.size>0&&aX.current?.(g)}}}aw(null)};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",b),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",b)}},[!!av]),(0,c.useEffect)(()=>{let a=al.current;if(!a)return;let b=b=>{let c;a$.current={x:b.clientX,y:b.clientY};let d=ak.current,e=aV.current;if(!d||!e)return;let f=aP.current;if(0===f.size&&0===aQ.current.size){aY.current&&(aY.current=null,e(null));return}let g=a.getBoundingClientRect(),h=b.clientX-g.left,i=b.clientY-g.top;try{c=d.screen2GraphCoords(h,i)}catch{return}let j=Math.max(4,10/(d.zoom()||1));for(let d of a_.current){if(null==d.x||null==d.y)continue;let g=f.get(d.id);if(!g)continue;let h=z(d),i=d.x+.7*h,k=d.y+.7*h,l=c.x-i,m=c.y-k;if(l*l+m*m<=j*j){aY.current!==d.id&&(aY.current=d.id,e({handle:g.handle,avatar:g.avatar,claimedAt:g.claimedAt,did:g.did,x:b.clientX,y:b.clientY,nodeId:d.id,nodeClosed:"closed"===d.status})),a.style.cursor="pointer";return}}let k=aQ.current;if(k.size>0)for(let d of a_.current){if(null==d.x||null==d.y||f.get(d.id))continue;let g=k.get(d.id);if(!g)continue;let h=z(d),i=d.x+.7*h,l=d.y+.7*h,m=c.x-i,n=c.y-l;if(m*m+n*n<=j*j){aY.current!==d.id&&(aY.current=d.id,e({handle:g.handle,avatar:g.avatar,claimedAt:g.updatedAt,did:void 0,x:b.clientX,y:b.clientY,isAssignee:!0,nodeId:d.id,nodeClosed:"closed"===d.status})),a.style.cursor="pointer";return}}aY.current&&(aY.current=null,e(null)),a.style.cursor=""},c=b=>{let c=ak.current,d=aW.current;if(!c||!d)return;let e=aP.current,f=aQ.current;if((!e||0===e.size)&&(!f||0===f.size))return;let g=a.getBoundingClientRect(),h=b.clientX-g.left,i=b.clientY-g.top,{x:j,y:k}=c.screen2GraphCoords(h,i),l=Math.max(4,10/(c.zoom()||1));if(e)for(let a of a_.current){if(null==a.x||null==a.y)continue;let c=e.get(a.id);if(!c)continue;let f=z(a),g=a.x+.7*f,h=a.y+.7*f,i=j-g,m=k-h;if(i*i+m*m<=l*l){b.stopPropagation(),aZ.current=Date.now(),d({handle:c.handle,avatar:c.avatar,did:c.did,nodeId:a.id});return}}if(f)for(let a of a_.current){if(null==a.x||null==a.y||e?.has(a.id))continue;let c=f.get(a.id);if(!c)continue;let g=z(a),h=a.x+.7*g,i=a.y+.7*g,m=j-h,n=k-i;if(m*m+n*n<=l*l){b.stopPropagation(),aZ.current=Date.now(),d({handle:c.handle,avatar:c.avatar,did:void 0,nodeId:a.id,isAssignee:!0});return}}};return a.addEventListener("mousemove",b),a.addEventListener("click",c),()=>{a.removeEventListener("mousemove",b),a.removeEventListener("click",c)}},[]),(0,c.useEffect)(()=>{let a=()=>{if(al.current){let a=al.current.getBoundingClientRect();aq({width:a.width,height:a.height})}};return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&as.current.size>0&&aX.current?.(new Set)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let a9=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a3.find(b=>b.id===a.id);c&&void 0!==c.x&&void 0!==c.y&&(b.centerAt(c.x,c.y,500),b.zoom(2.5,500),r(a))},[r,a3]),ba=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a3.find(b=>b.id===a);c&&void 0!==c.x&&void 0!==c.y&&(b.centerAt(c.x,c.y,500),b.zoom(2.5,500))},[a3]);(0,c.useImperativeHandle)(aj,()=>({focusNode:a9,zoomToNode:ba}),[a9,ba]);let bb=(0,c.useCallback)(a=>{let b=a||null;aM.current=b;let c=b||aL.current;c?aN.current=G(c.id,a8.current):aN.current=new Set,H(ak),cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current()),s(b,a$.current.x,a$.current.y)},[s]),bc=(0,c.useCallback)((a,b)=>{b.preventDefault(),v?.(a,b)},[v]);(0,c.useEffect)(()=>{let a,b=ak.current;if(!b||0===a3.length)return;let c=()=>{b.d3Force("radial",null),b.d3Force("x",null),b.d3Force("y",null)},d=()=>{a3.forEach(a=>{delete a.fx,delete a.fy})};if("dag"===aH)c(),b.d3Force("charge")?.strength(-250).distanceMax(500),b.d3Force("link")?.distance(120).strength(.3),b.d3Force("center")?.strength(.015),b.d3Force("collision",x().radius(a=>z(a)+8).strength(.8));else if("radial"===aH){c(),d();let a=new Map;for(let b of a4){if("parent-child"===b.type)continue;let c="object"==typeof b.target?b.target.id:b.target,d="object"==typeof b.source?b.source.id:b.source;a.has(c)||a.set(c,[]),a.get(c).push(d)}let e=new Map,f=[];a3.forEach(b=>{a.has(b.id)||(e.set(b.id,0),f.push(b.id))});let g=0;for(;g<f.length;){let a=f[g++],b=e.get(a);for(let c of a4){if("parent-child"===c.type)continue;let d="object"==typeof c.source?c.source.id:c.source,g="object"==typeof c.target?c.target.id:c.target;d!==a||e.has(g)||(e.set(g,b+1),f.push(g))}}a3.forEach(a=>{a._depth=e.get(a.id)??0}),Array.from(e.values());let h=Math.max(200,4*a3.length);b.d3Force("charge")?.strength(-300).distanceMax(800),b.d3Force("link")?.distance(150).strength(.15),b.d3Force("center")?.strength(0),b.d3Force("radial",(function(a,b,c){var d,e,f,g=t(.1);function h(a){for(var g=0,h=d.length;g<h;++g){var i=d[g],j=i.x-b||1e-6,k=i.y-c||1e-6,l=Math.sqrt(j*j+k*k),m=(f[g]-l)*e[g]*a/l;i.vx+=j*m,i.vy+=k*m}}function i(){if(d){var b,c=d.length;for(b=0,e=Array(c),f=Array(c);b<c;++b)f[b]=+a(d[b],b,d),e[b]=isNaN(f[b])?0:+g(d[b],b,d)}}return"function"!=typeof a&&(a=t(+a)),null==b&&(b=0),null==c&&(c=0),h.initialize=function(a){d=a,i()},h.strength=function(a){return arguments.length?(g="function"==typeof a?a:t(+a),i(),h):g},h.radius=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),i(),h):a},h.x=function(a){return arguments.length?(b=+a,h):b},h.y=function(a){return arguments.length?(c=+a,h):c},h})(a=>(a._depth||0)*h,0,0).strength(.8)),b.d3Force("x",null),b.d3Force("y",null),b.d3Force("collision",x().radius(a=>z(a)+10).strength(.9))}else if("cluster"===aH){c(),d();let a=[...new Set(a3.map(a=>a.prefix))],e=Math.max(400,5*a3.length,150*a.length),f=new Map;a.forEach((b,c)=>{let d=2*Math.PI*c/a.length-Math.PI/2;f.set(b,{x:Math.cos(d)*e,y:Math.sin(d)*e})}),b.d3Force("charge")?.strength(-200).distanceMax(600),b.d3Force("link")?.distance(100).strength(.15),b.d3Force("center")?.strength(0),b.d3Force("x",(function(a){var b,c,d,e=t(.1);function f(a){for(var e,f=0,g=b.length;f<g;++f)e=b[f],e.vx+=(d[f]-e.x)*c[f]*a}function g(){if(b){var f,g=b.length;for(f=0,c=Array(g),d=Array(g);f<g;++f)c[f]=isNaN(d[f]=+a(b[f],f,b))?0:+e(b[f],f,b)}}return"function"!=typeof a&&(a=t(null==a?0:+a)),f.initialize=function(a){b=a,g()},f.strength=function(a){return arguments.length?(e="function"==typeof a?a:t(+a),g(),f):e},f.x=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),g(),f):a},f})(a=>f.get(a.prefix)?.x||0).strength(.5)),b.d3Force("y",(function(a){var b,c,d,e=t(.1);function f(a){for(var e,f=0,g=b.length;f<g;++f)e=b[f],e.vy+=(d[f]-e.y)*c[f]*a}function g(){if(b){var f,g=b.length;for(f=0,c=Array(g),d=Array(g);f<g;++f)c[f]=isNaN(d[f]=+a(b[f],f,b))?0:+e(b[f],f,b)}}return"function"!=typeof a&&(a=t(null==a?0:+a)),f.initialize=function(a){b=a,g()},f.strength=function(a){return arguments.length?(e="function"==typeof a?a:t(+a),g(),f):e},f.y=function(b){return arguments.length?(a="function"==typeof b?b:t(+b),g(),f):a},f})(a=>f.get(a.prefix)?.y||0).strength(.5)),b.d3Force("collision",x().radius(a=>z(a)+10).strength(.9))}else"spread"===aH?(c(),d(),b.d3Force("charge")?.strength(-300).distanceMax(500),b.d3Force("link")?.distance(180).strength(.4),b.d3Force("center")?.strength(.02),b.d3Force("collision",x().radius(a=>z(a)+8).strength(.8))):(c(),d(),b.d3Force("charge")?.strength(-180).distanceMax(400),b.d3Force("link")?.distance(a=>((a.source?.blockerCount||0)+(a.source?.dependentCount||0)+((a.target?.blockerCount||0)+(a.target?.dependentCount||0)))/2>4?90:120).strength(.6),b.d3Force("center")?.strength(.03),b.d3Force("collision",x().radius(a=>z(a)+6).strength(.7)));return b.d3ReheatSimulation(),W&&(a=setTimeout(()=>{ak.current&&ak.current.zoomToFit(400,60)},ar.current?600:1e3)),ar.current=!0,()=>{a&&clearTimeout(a)}},[aH,a3,a4,W]);let bd=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(bd.current||!aF||0===i.length)return;bd.current=!0;let a=setTimeout(()=>{aI("force")},15);return()=>clearTimeout(a)},[aF,i.length]),(0,c.useEffect)(()=>{if(!O&&W&&ak.current&&i.length>0){let a=setTimeout(()=>{ak.current.zoomToFit(400,60)},800);return()=>clearTimeout(a)}},[i.length,O,W]);let be=(0,c.useRef)(void 0);(0,c.useEffect)(()=>{if(void 0===be.current){be.current=ab??null;return}be.current=ab??null;let a=ak.current;if(!a)return;let b=setTimeout(()=>{a.zoomToFit(400,60)},100);return()=>clearTimeout(b)},[ab]);let bf=(0,c.useMemo)(()=>{let a=Math.sqrt(a3.length)||1;return a3.forEach((b,c)=>{if(null==b.x&&null==b.y){let d=c*Math.PI*(3-Math.sqrt(5)),e=300*Math.sqrt(.5+c)/a;b.x=e*Math.cos(d),b.y=e*Math.sin(d)}}),{nodes:a3,links:a4}},[a3,a4]),bg=()=>"dark"===au.current,bh=(0,c.useCallback)((a,b,c)=>{let d=z(a),f=B(a),g=n(a.prefix),h=aL.current?.id===a.id,i=aM.current?.id===a.id,j=as.current.has(a.id),k=aN.current,l=k.has(a.id),m=k.size>0,o=Date.now(),p=1,q=a._spawnTime;if(q){var r;let a=o-q;a<500&&(p=1+2.70158*Math.pow((r=a/500)-1,3)+1.70158*Math.pow(r-1,2))}let s=1,t=1,u=a._removeTime;if(u){let a=o-u;if(a<400){let b=a/400;s=1-C(b),t=1-b}else s=0,t=0}let v=p*s;if(v<=.01)return;let w=d*v,x=(as.current.size>0&&!j?.25:m&&!l?.15:"closed"===a.status?.5:1)*t;if(x<=.01)return;b.save(),b.globalAlpha=x,(l&&m||j)&&(b.shadowColor="#10b981",b.shadowBlur=h?20:j?14:i?16:10),c>.3&&(b.beginPath(),b.arc(a.x,a.y,w+2,0,2*Math.PI),b.strokeStyle=g,b.lineWidth=2,b.stroke()),b.beginPath(),b.arc(a.x,a.y,w,0,2*Math.PI),b.fillStyle=f,b.fill(),b.strokeStyle=h?"#10b981":j?"#34d399":i?"#3f3f46":"#e4e4e7",b.lineWidth=h?2.5:j||i?2:1,b.stroke(),b.shadowBlur=0;let y=a._changedAt;if(y){let c=o-y;if(c<800){let d=c/800,f=e[a.status]||"#a1a1aa";b.beginPath(),b.arc(a.x,a.y,w+4+20*d,0,2*Math.PI),b.strokeStyle=f,b.lineWidth=2*(1-d),b.globalAlpha=(1-d)*.6,b.stroke(),b.globalAlpha=x}}if(aT.current&&aS.current===a.id){let d=w+Math.max(25,30/c);for(let e=0;e<3;e++){let f=(o+500*e)%2e3/2e3,g=w+2/c+f*(d-w),h=(1-f)*.6;b.beginPath(),b.arc(a.x,a.y,g,0,2*Math.PI),b.strokeStyle="#10b981",b.lineWidth=Math.max(1.5/c,.5),b.globalAlpha=h*x,b.stroke()}b.globalAlpha=x}if(q){let c=o-q;if(c<500){let d=c/500;b.beginPath(),b.arc(a.x,a.y,w+6+8*d,0,2*Math.PI),b.strokeStyle="#10b981",b.lineWidth=3*(1-d),b.globalAlpha=(1-d)*.4,b.stroke(),b.globalAlpha=x}}if(a.priority<=1&&c>.5){let d=Math.min(10,Math.max(4,12/c));b.font=`${d}px sans-serif`,b.textAlign="center",b.textBaseline="bottom",b.fillText(0===a.priority?"🔥🔥":"🔥",a.x,a.y-w-2)}if(c>.5){let d=Math.min(7,Math.max(3,10/c));b.font=`500 ${d}px 'Inter', system-ui, sans-serif`,b.textAlign="center",b.textBaseline="top",b.fillStyle=bg()?"#d4d4d8":"#3f3f46",b.globalAlpha=.85*x;let e=a.id;c>1.5?e=M(a.title||a.id,30):c>.9&&(e=M(a.title||a.id,18)),b.fillText(e,a.x,a.y+w+3);let f=a.collapsedCount;if(f&&f>0){let e=Math.min(5.5,Math.max(2.5,8/c));b.font=`400 ${e}px 'Inter', system-ui, sans-serif`,b.fillStyle=bg()?"#71717a":"#a1a1aa",b.fillText(`${f} task${1!==f?"s":""}`,a.x,a.y+w+3+d+1)}}let A=aO.current.get(a.id);if(A&&A>0&&c>.4){let d=Math.min(6,Math.max(3.5,8/c)),e=a.x+.75*w,f=a.y-.75*w,g=A>99?"99+":String(A);b.save(),b.globalAlpha=Math.min(x,.95),b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.fillStyle="#ef4444",b.fill(),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke();let h=Math.min(7,Math.max(3,1.3*d));b.font=`600 ${h}px 'Inter', system-ui, sans-serif`,b.textAlign="center",b.textBaseline="middle",b.fillStyle="#ffffff",b.fillText(g,e,f+.3),b.restore()}let D=aP.current.get(a.id);if(D){let d=Math.max(4,10/c),e=a.x+.7*w,f=a.y+.7*w;if(b.save(),b.globalAlpha=1,D.avatar){let a=E(D.avatar,()=>aU.current());a?(b.save(),b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.clip(),b.drawImage(a,e-d,f-d,2*d,2*d),b.restore()):F(b,e,f,d,D.handle,c,bg())}else F(b,e,f,d,D.handle,c,bg());b.beginPath(),b.arc(e,f,d,0,2*Math.PI),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke(),b.restore()}if(!D){let d=aQ.current.get(a.id);if(d){let e=Math.max(4,10/c),f=a.x+.7*w,g=a.y+.7*w;if(b.save(),b.globalAlpha=1,d.avatar){let a=E(d.avatar,()=>aU.current());a?(b.save(),b.beginPath(),b.arc(f,g,e,0,2*Math.PI),b.clip(),b.drawImage(a,f-e,g-e,2*e,2*e),b.restore()):F(b,f,g,e,d.handle,c,bg())}else F(b,f,g,e,d.handle,c,bg());b.beginPath(),b.arc(f,g,e,0,2*Math.PI),b.strokeStyle=bg()?"#18181b":"#ffffff",b.lineWidth=Math.max(.8,1.2/c),b.stroke(),b.restore()}}b.restore()},[]),bi=(0,c.useCallback)((a,b,c)=>{let d=a.source,e=a.target;if(void 0===d.x||void 0===e.x)return;let f=Date.now(),g=1,h=1,i=a._spawnTime;if(i){let a=f-i;if(a<500){let b=a/500;g=C(b),h=1+(1-b)*1.5}}let j=1,k=a._removeTime;if(k){let a=f-k;if(!(a<400))return;j=1-C(a/400)}let l=g*j;if(l<=.01)return;let m=d.id||a.source,n=e.id||a.target,o="parent-child"===a.type,p=aN.current,q=p.size>0,r=q&&p.has(m)&&p.has(n),s=(o?q?r?.5:.05:.2:q?r?.8:.08:.35)*l;if(s<=.01)return;b.save(),b.globalAlpha=s,o?(b.strokeStyle=r?bg()?"#a1a1aa":"#71717a":(bg(),"#a1a1aa"),b.lineWidth=Math.max(.6,1.5/c)*h,b.setLineDash([4,3])):(b.strokeStyle=r?"#10b981":bg()?"#a1a1aa":"#d4d4d8",b.lineWidth=(r?Math.max(2,2.5/c):Math.max(.8,1.2/c))*h);let t=e.x-d.x,u=e.y-d.y,v=Math.sqrt(t*t+u*u),w=(d.x+e.x)/2+.15*u,x=(d.y+e.y)/2-.15*t;if(b.beginPath(),b.moveTo(d.x,d.y),b.quadraticCurveTo(w,x,e.x,e.y),b.stroke(),o&&b.setLineDash([]),i){let a=f-i;a<300&&(b.save(),b.globalAlpha=(1-a/300)*.5,b.strokeStyle="#10b981",b.lineWidth=(o?3:4)/c,b.beginPath(),b.moveTo(d.x,d.y),b.quadraticCurveTo(w,x,e.x,e.y),b.stroke(),b.restore())}if(!o){let a=z(e);if(v<a+1)return void b.restore();let f=Math.min(8,6/c),g=1-a/v,h=d.x+g*t,i=d.y+g*u,j=Math.atan2(u,t);b.fillStyle=r?"#10b981":bg()?"#a1a1aa":"#d4d4d8",b.beginPath(),b.moveTo(h,i),b.lineTo(h-f*Math.cos(j-Math.PI/7),i-f*Math.sin(j-Math.PI/7)),b.lineTo(h-f*Math.cos(j+Math.PI/7),i-f*Math.sin(j+Math.PI/7)),b.closePath(),b.fill()}b.restore()},[]),bj=(0,c.useCallback)((a,b)=>{if(!aJ)return;let c=b>=.8?0:b<=.4?1:(.8-b)/.4;if(c<=.01)return;let d=a2.current;if(0===d.length)return;let e=new Map;for(let a of a3)null!=a.x&&null!=a.y&&e.set(a.id,{x:a.x,y:a.y});for(let f of(a.save(),d)){let d=0,g=0,h=0;for(let a of f.memberIds){let b=e.get(a);b&&(d+=b.x,g+=b.y,h++)}if(0===h)continue;let i=d/h,j=g/h,k=0;for(let a of f.memberIds){let b=e.get(a);if(b){let a=b.x-i,c=b.y-j,d=Math.sqrt(a*a+c*c);d>k&&(k=d)}}let l=k+30,m=n(f.prefix);a.beginPath(),a.arc(i,j,l,0,2*Math.PI),a.globalAlpha=.05*c,a.fillStyle=m,a.fill(),a.globalAlpha=.25*c,a.strokeStyle=m,a.lineWidth=1.5/b,a.setLineDash([8/b,4/b]),a.stroke(),a.setLineDash([]);let o=Math.min(24,Math.max(10,14/b)),p=Math.min(12,Math.max(5,8/b)),q=.35*o;a.font=`500 ${p}px 'Inter', system-ui, sans-serif`,a.textAlign="center",a.textBaseline="middle",a.globalAlpha=.45*c,a.fillStyle=bg()?"#a1a1aa":"#71717a",a.fillText(f.parentId,i,j-.5*o-q),a.font=`600 ${o}px 'Inter', system-ui, sans-serif`,a.globalAlpha=.85*c,a.fillStyle=bg()?"#d4d4d8":"#18181b";let r=f.title.length>40?f.title.slice(0,39)+"…":f.title;a.fillText(r,i,j+.15*o);let s=Math.min(14,Math.max(6,9/b));a.font=`400 ${s}px 'Inter', system-ui, sans-serif`,a.globalAlpha=.5*c,a.fillStyle="#71717a",a.fillText(`${f.memberIds.length} issue${1!==f.memberIds.length?"s":""}`,i,j+.15*o+.7*o)}a.restore()},[a3,i,aJ]),bk=(0,c.useCallback)((a,b,c)=>{let d=z(a)+5;c.fillStyle=b,c.beginPath(),c.arc(a.x,a.y,d,0,2*Math.PI),c.fill()},[]),bl=(0,c.useCallback)(()=>{},[]),bm=(0,c.useCallback)(()=>{let a=am.current,b=ak.current;if(!a||!b)return;let c=a.getContext("2d");if(!c)return;let d=1/0,e=-1/0,f=1/0,g=-1/0,h=!1;for(let a of a3)null!=a.x&&null!=a.y&&(h=!0,a.x<d&&(d=a.x),a.x>e&&(e=a.x),a.y<f&&(f=a.y),a.y>g&&(g=a.y));if(!h)return;let i=(e+=40)-(d-=40)||1,j=(g+=40)-(f-=40)||1,k=aC-16,l=aD-16,n=Math.min(k/i,l/j),o=8+(k-i*n)/2,p=8+(l-j*n)/2,q=window.devicePixelRatio||1;(a.width!==aC*q||a.height!==aD*q)&&(a.width=aC*q,a.height=aD*q,c.setTransform(q,0,0,q,0,0)),c.clearRect(0,0,aC,aD),c.fillStyle=bg()?"rgba(24, 24, 27, 0.92)":"rgba(250, 250, 250, 0.92)",c.beginPath(),c.roundRect(0,0,aC,aD,6),c.fill();let r=aN.current,s=r.size>0,t=aM.current?.id||aL.current?.id||null,u=at.current,v=null!==u;for(let a of a4){let b=a.source,e=a.target;if(null==b.x||null==e.x)continue;let g=b.id||a.source,h=e.id||a.target,i=s&&r.has(g)&&r.has(h);c.globalAlpha=v?.03:s?i?.5:.04:.1,c.strokeStyle=i?"#10b981":bg()?"#71717a":"#a1a1aa",c.lineWidth=i?1:.5;let j=o+(b.x-d)*n,k=p+(b.y-f)*n,l=o+(e.x-d)*n,m=p+(e.y-f)*n;c.beginPath(),c.moveTo(j,k),c.lineTo(l,m),c.stroke()}for(let a of(c.globalAlpha=1,a3)){if(null==a.x||null==a.y)continue;let b=o+(a.x-d)*n,e=p+(a.y-f)*n,g=a.id===t,h=r.has(a.id),i=!0;if(v)switch(A){case"status":i=a.status===u;break;case"priority":i=String(a.priority)===u;break;case"type":i=a.issueType===u;break;case"owner":i=(a.createdBy||"Unassigned")===u;break;case"assignee":i=(a.assignee||"Unassigned")===u;break;case"prefix":i=m(a.prefix)===u}v&&!i?c.globalAlpha=.08:v&&i?c.globalAlpha=1:s&&!h?c.globalAlpha=.1:"closed"===a.status?c.globalAlpha=.35:c.globalAlpha=.85,c.fillStyle=B(a);let j="epic"===a.issueType?3:2;if(v&&i?j+=1:g?j=5:s&&h&&(j=4),g){let d=c.globalAlpha;c.globalAlpha=.4,c.fillStyle="#10b981",c.beginPath(),c.arc(b,e,j+2,0,2*Math.PI),c.fill(),c.globalAlpha=d,c.fillStyle=B(a)}c.fillRect(b-j/2,e-j/2,j,j)}c.globalAlpha=1;let w=aP.current;if(w.size>0)for(let a of a3){if(null==a.x||null==a.y)continue;let b=w.get(a.id);if(!b)continue;let e=o+(a.x-d)*n,g=p+(a.y-f)*n;if(c.save(),c.globalAlpha=1,b.avatar){let a=E(b.avatar,()=>aU.current());a?(c.save(),c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.clip(),c.drawImage(a,e-5,g-5,10,10),c.restore()):(c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill())}else c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill();c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.strokeStyle=bg()?"#18181b":"#ffffff",c.lineWidth=1,c.stroke(),c.restore()}let x=aQ.current;if(x.size>0)for(let a of a3){if(null==a.x||null==a.y||w.get(a.id))continue;let b=x.get(a.id);if(!b)continue;let e=o+(a.x-d)*n,g=p+(a.y-f)*n;if(c.save(),c.globalAlpha=1,b.avatar){let a=E(b.avatar,()=>aU.current());a?(c.save(),c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.clip(),c.drawImage(a,e-5,g-5,10,10),c.restore()):(c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill())}else c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.fillStyle=bg()?"#52525b":"#d4d4d8",c.fill();c.beginPath(),c.arc(e,g,5,0,2*Math.PI),c.strokeStyle=bg()?"#18181b":"#ffffff",c.lineWidth=1,c.stroke(),c.restore()}try{let a=b.screen2GraphCoords(0,0),e=b.screen2GraphCoords(ap.width,ap.height),g=o+(a.x-d)*n,h=p+(a.y-f)*n,i=(e.x-a.x)*n,j=(e.y-a.y)*n,k=Math.max(0,g),l=Math.max(0,h),m=Math.min(aC-k,i-(k-g)),q=Math.min(aD-l,j-(l-h));m>0&&q>0&&(c.fillStyle="rgba(16, 185, 129, 0.06)",c.fillRect(k,l,m,q),c.strokeStyle="rgba(16, 185, 129, 0.5)",c.lineWidth=1.5,c.strokeRect(k,l,m,q))}catch{}},[a3,a4,ap,aC,aD,8]);ao.current=bm;let bn=(0,c.useCallback)(()=>{cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>{bm()})},[bm]);(0,c.useEffect)(()=>{if(!aF||0===i.length)return;let a=setInterval(()=>{bm()},200);return()=>clearInterval(a)},[aF,i.length,bm]),(0,c.useEffect)(()=>{let a,b=!0,c=!1,d=Date.now();return(a3.some(a=>a._spawnTime&&d-a._spawnTime<500||a._removeTime&&d-a._removeTime<400||a._changedAt&&d-a._changedAt<800)||a4.some(a=>a._spawnTime&&d-a._spawnTime<500||a._removeTime&&d-a._removeTime<400))&&!c&&(c=!0,a=requestAnimationFrame(function d(){if(!b)return;let e=Date.now();a3.some(a=>!!a._spawnTime&&!!(e-a._spawnTime<500)||!!a._removeTime&&!!(e-a._removeTime<400)||!!a._changedAt&&!!(e-a._changedAt<800))||a4.some(a=>!!a._spawnTime&&!!(e-a._spawnTime<500)||!!a._removeTime&&!!(e-a._removeTime<400))?(H(ak),a=requestAnimationFrame(d)):c=!1})),()=>{b=!1,cancelAnimationFrame(a)}},[a3,a4]);let bo=(0,c.useCallback)(a=>{let b=ak.current;if(!b)return;let c=a.currentTarget.getBoundingClientRect(),d=a.clientX-c.left,e=a.clientY-c.top,f=1/0,g=-1/0,h=1/0,i=-1/0;for(let a of a3)null!=a.x&&null!=a.y&&(a.x<f&&(f=a.x),a.x>g&&(g=a.x),a.y<h&&(h=a.y),a.y>i&&(i=a.y));let j=(g+=40)-(f-=40)||1,k=(i+=40)-(h-=40)||1,l=aC-16,m=aD-16,n=Math.min(l/j,m/k),o=f+(d-(8+(l-j*n)/2))/n,p=h+(e-(8+(m-k*n)/2))/n;b.centerAt(o,p,300)},[a3,aC,aD,8]),bp=(0,c.useCallback)((a,b)=>{if(Date.now()-aZ.current<200)return;if(!ad)return void r(a,b);let c=Date.now(),d=ay.current;d&&d.nodeId===a.id&&c-d.time<300?(az.current&&(clearTimeout(az.current),az.current=null),ay.current=null,ae?.(a,window.innerWidth/2,window.innerHeight/2)):(ay.current={nodeId:a.id,time:c},az.current&&clearTimeout(az.current),az.current=setTimeout(()=>{az.current=null,ay.current=null,r(a,b)},300))},[ad,r,ae]);(0,c.useEffect)(()=>{let a=al.current;if(!a)return;let b=b=>{let c=b.target.closest("button, [data-tutorial], .bead-tooltip");if(c&&c!==al.current||2!==b.button)return;let d=ak.current;if(!d)return;let e=a.getBoundingClientRect(),f=d.screen2GraphCoords(b.clientX-e.left,b.clientY-e.top);for(let a of a_.current)if(null!=a.x&&null!=a.y){let b=a.x-f.x,c=a.y-f.y;if(Math.sqrt(b*b+c*c)<=z(a))return}b.preventDefault(),b.stopPropagation(),aw({startX:b.clientX,startY:b.clientY,currentX:b.clientX,currentY:b.clientY,active:!1})},c=a=>{ax.current&&a.preventDefault()};return a.addEventListener("pointerdown",b,{capture:!0}),a.addEventListener("contextmenu",c),()=>{a.removeEventListener("pointerdown",b,{capture:!0}),a.removeEventListener("contextmenu",c)}},[]);let bq=(0,c.useCallback)((a,b)=>{let c=as.current;if(c.size<2||!c.has(a.id))return;if(!a0.current){let a=new Map;for(let b of a_.current)c.has(b.id)&&null!=b.x&&null!=b.y&&a.set(b.id,{x:b.x,y:b.y});a0.current=a}let d=a0.current.get(a.id);if(!d)return;let e=a.x-d.x,f=a.y-d.y;for(let[b,c]of a0.current){if(b===a.id)continue;let d=a_.current.find(a=>a.id===b);d&&(d.fx=c.x+e,d.fy=c.y+f)}},[]),br=(0,c.useCallback)(a=>{if(a0.current){for(let[a]of a0.current){let b=a_.current.find(b=>b.id===a);b&&(b.fx=void 0,b.fy=void 0)}a0.current=null,a1.current=null}},[]);return(0,b.jsxs)("div",{ref:al,className:"w-full h-full relative","data-tutorial":"graph",children:[(0,b.jsxs)("div",{className:"absolute top-3 left-3 sm:top-4 sm:left-4 z-10 flex flex-col gap-1.5 sm:gap-2",children:[ab&&ac&&(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-medium bg-emerald-50/90 dark:bg-emerald-950/90 backdrop-blur-sm rounded-lg border border-emerald-200 dark:border-emerald-800 shadow-sm text-emerald-700 dark:text-emerald-300",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500 dark:text-emerald-400 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),(0,b.jsxs)("span",{className:"truncate max-w-[180px]",children:["Focused: ",(0,b.jsx)("span",{className:"font-semibold",children:i.find(a=>a.id===ab)?.title||ab})]}),(0,b.jsx)("button",{onClick:ac,className:"ml-auto p-0.5 rounded hover:bg-emerald-200/50 dark:hover:bg-emerald-900/50 transition-colors flex-shrink-0",title:"Show full graph",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex w-full items-start gap-1.5 sm:gap-2",children:(0,b.jsxs)("div",{className:"flex w-full bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden","data-tutorial":"layouts",children:[(0,b.jsx)("button",{onClick:()=>aI("force"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"force"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"4",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13",cy:"11",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("line",{x1:"4",y1:"4",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"12",y1:"3",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"3",y1:"12",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"13",y1:"11",x2:"8",y2:"8",strokeOpacity:"0.5"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Force"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("dag"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"dag"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"2.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"4",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"2",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"6",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"12",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("line",{x1:"8",y1:"4",x2:"4",y2:"6.5",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"8",y1:"4",x2:"12",y2:"6.5",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"4",y1:"9.5",x2:"2",y2:"12",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"4",y1:"9.5",x2:"6",y2:"12",strokeOpacity:"0.5"}),(0,b.jsx)("line",{x1:"12",y1:"9.5",x2:"12",y2:"12",strokeOpacity:"0.5"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"DAG"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("radial"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"radial"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"5",fill:"none",strokeOpacity:"0.5"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"7.5",fill:"none",strokeOpacity:"0.3"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Radial"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("cluster"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"cluster"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"3.5",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"6",cy:"6",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"11",cy:"10",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13.5",cy:"11.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"11",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Cluster"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aI("spread"),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${"spread"===aH?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"2",cy:"2",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"14",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"3",cy:"14",r:"1.5",fill:"currentColor",stroke:"none"}),(0,b.jsx)("circle",{cx:"13",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Spread"})]})})]})}),(0,b.jsx)("div",{className:"flex w-full items-start gap-1.5 sm:gap-2","data-tutorial":"view-controls",children:(0,b.jsxs)("div",{className:"flex w-full bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden",children:[(S||T)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:R&&R.size>0?T:S,className:"flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800","data-tutorial":"btn-collapse",children:R&&R.size>0?(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Expand all"})]}):(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Collapse all"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"})]}),(0,b.jsx)("button",{onClick:()=>aK(a=>!a),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${aJ?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:aJ?"Hide cluster labels":"Show cluster labels","data-tutorial":"btn-clusters",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6",strokeDasharray:"2.5 2",strokeOpacity:aJ?1:.5}),(0,b.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8",strokeOpacity:aJ?1:.4}),(0,b.jsx)("line",{x1:"6",y1:"10",x2:"10",y2:"10",strokeOpacity:aJ?.6:.25,strokeWidth:"1"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Clusters"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>X?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${W?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:W?"Auto-fit enabled: camera adjusts after updates":"Auto-fit disabled: camera stays fixed","data-tutorial":"btn-autofit",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M20.25 16.5V18A2.25 2.25 0 0118 20.25h-1.5M3.75 16.5V18A2.25 2.25 0 006 20.25h1.5"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Auto-fit"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>$?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${Z?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:Z?"Pulse enabled: ripple highlights most recent activity":"Pulse disabled: no activity highlight","data-tutorial":"btn-pulse",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.07 4.93A10 10 0 014.93 19.07M4.93 4.93a10 10 0 0114.14 14.14",strokeOpacity:"0.5"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.24 7.76a6 6 0 01.01 8.49M7.76 7.76a6 6 0 000 8.49",strokeOpacity:"0.7"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Pulse"})]})}),(0,b.jsx)("div",{className:"w-px bg-zinc-200 dark:bg-zinc-700"}),(0,b.jsx)("button",{onClick:()=>aa?.(),className:`flex-1 flex items-center justify-center gap-1 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${_?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,title:_?"Particles enabled: flowing dots show dependency direction":"Particles disabled: improves performance on large graphs","data-tutorial":"btn-particles",children:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,b.jsx)("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"}),(0,b.jsx)("path",{strokeLinecap:"round",d:"M7 12h3m3 0h3",strokeOpacity:"0.4"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Particles"})]})})]})})]}),!O&&(0,b.jsxs)("div",{className:"absolute bottom-2 sm:bottom-4 z-10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm px-2 sm:px-3 py-1.5 sm:py-2 text-xs text-zinc-400 dark:text-zinc-500 transition-[right] duration-300 ease-out","data-tutorial":"legend",style:{right:Q?"calc(360px + 1rem)":"1rem",maxWidth:320},children:[a6&&(0,b.jsxs)("div",{className:"text-zinc-500 dark:text-zinc-400 mb-1.5","data-tutorial":"legend-stats",children:[(0,b.jsx)("strong",{className:"text-zinc-700 dark:text-zinc-300",children:a6.total})," issues"," · ",(0,b.jsx)("strong",{className:"text-zinc-700 dark:text-zinc-300",children:a6.edges})," deps"," · ",(0,b.jsx)("strong",{className:"text-emerald-600 dark:text-emerald-400",children:a6.prefixes.length}),1===a6.prefixes.length?" project":" projects",af&&af.size>0&&(0,b.jsx)("span",{className:"text-zinc-400 dark:text-zinc-500",children:" (filtered)"})]}),(0,b.jsx)("div",{className:"hidden sm:flex bg-zinc-100 dark:bg-zinc-800 rounded-md overflow-hidden mb-1.5","data-tutorial":"legend-color-mode",children:["status","priority","type","owner","assignee","prefix"].map(a=>(0,b.jsx)("button",{onClick:()=>V?.(a),className:`flex-1 px-2 py-1 text-[10px] font-medium transition-colors ${U===a?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 hover:bg-zinc-200/60 dark:hover:bg-zinc-700/60"}`,children:d[a]},a))}),(0,b.jsxs)("div",{className:"hidden sm:flex flex-wrap gap-x-3 gap-y-1 mb-1.5","data-tutorial":"legend-items",children:["status"===U?(0,b.jsx)(b.Fragment,{children:["open","in_progress","blocked","deferred","closed"].map(a=>{let c=af?.has(a),d=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${f[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${c?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":d?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:e[a]}}),(0,b.jsx)("span",{className:`${c?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:f[a]})]},a)})}):"priority"===U?(0,b.jsx)(b.Fragment,{children:[0,1,2,3,4].map(a=>{let c=String(a),d=af?.has(c),e=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(c),onMouseEnter:()=>{at.current=c,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${g[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${d?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":e?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:h[a]}}),(0,b.jsx)("span",{className:`${d?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:g[a]})]},a)})}):"type"===U?(0,b.jsx)(b.Fragment,{children:["epic","task","bug","feature","chore"].map(a=>{let c=af?.has(a),d=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${l[a]} — click to filter`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${c?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":d?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:k[a]}}),(0,b.jsx)("span",{className:`${c?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:l[a]})]},a)})}):(0,b.jsx)(b.Fragment,{children:a7.map(({label:a,color:c})=>{let d=af?.has(a),e=af&&af.size>0;return(0,b.jsxs)("button",{onClick:()=>ag?.(a),onMouseEnter:()=>{at.current=a,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},onMouseLeave:()=>{at.current=null,cancelAnimationFrame(an.current),an.current=requestAnimationFrame(()=>ao.current())},title:`${a} — click to filter by ${U}`,className:`flex items-center gap-1 px-1 py-0.5 rounded transition-all cursor-pointer ${d?"bg-zinc-200/80 dark:bg-zinc-700/80 ring-1 ring-zinc-300 dark:ring-zinc-600":e?"opacity-40 hover:opacity-70":"hover:bg-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:c}}),(0,b.jsx)("span",{className:`${d?"text-zinc-800 dark:text-zinc-200 font-medium":"text-zinc-500 dark:text-zinc-400"}`,children:a})]},a)})}),af&&af.size>0&&(0,b.jsx)("button",{onClick:()=>ah?.(),className:"text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-400 underline ml-auto",children:"Clear filters"})]}),(0,b.jsx)("div",{className:"hidden sm:flex flex-col gap-0.5 text-zinc-400 dark:text-zinc-500",children:(0,b.jsxs)("span",{children:["Size = importance · Ring = project","status"!==U&&` \xb7 Fill = ${d[U].toLowerCase()}`]})}),(0,b.jsx)("span",{className:"sm:hidden",children:"Tap a node for details"})]}),(0,b.jsxs)("div",{className:"hidden sm:block absolute bottom-4 left-4 z-10","data-tutorial":"minimap",style:{width:aC,height:aD},children:[(0,b.jsx)("canvas",{ref:am,width:aC,height:aD,onClick:bo,className:"rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm cursor-crosshair bg-white dark:bg-zinc-900",style:{width:aC,height:aD}}),(0,b.jsx)("div",{className:"absolute top-0 left-2 right-2 h-1.5 cursor-n-resize hover:bg-zinc-300/40 rounded-t-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"top",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=aE.current.startY-a.clientY,c=Math.max(80,Math.min(400,aE.current.startH+b));aB(a=>({...a,h:c}))},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}}),(0,b.jsx)("div",{className:"absolute top-2 right-0 bottom-2 w-1.5 cursor-e-resize hover:bg-zinc-300/40 rounded-r-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"right",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=a.clientX-aE.current.startX,c=Math.max(100,Math.min(500,aE.current.startW+b));aB(a=>({...a,w:c}))},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}}),(0,b.jsx)("div",{className:"absolute top-0 right-0 w-3 h-3 cursor-ne-resize hover:bg-zinc-300/40 rounded-tr-lg transition-colors",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),aE.current={edge:"top-right",startX:a.clientX,startY:a.clientY,startW:aC,startH:aD};let b=a=>{if(!aE.current)return;let b=a.clientX-aE.current.startX,c=aE.current.startY-a.clientY;aB({w:Math.max(100,Math.min(500,aE.current.startW+b)),h:Math.max(80,Math.min(400,aE.current.startH+c))})},c=()=>{aE.current=null,window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",c)}})]}),aF?(0,b.jsx)(aF,{ref:ak,graphData:bf,width:ap.width,height:ap.height,nodeCanvasObject:bh,nodeCanvasObjectMode:I,nodePointerAreaPaint:bk,onRenderFramePost:bj,linkCanvasObject:bi,linkCanvasObjectMode:I,linkDirectionalParticles:a=>_&&"parent-child"!==a.type?2:0,linkDirectionalParticleSpeed:.004*!!_,linkDirectionalParticleWidth:2.5*!!_,linkDirectionalParticleColor:J,dagMode:"dag"===aH?"td":void 0,dagLevelDistance:150,onDagError:bl,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:300,warmupTicks:50,onNodeClick:bp,onNodeHover:bb,onNodeRightClick:bc,onBackgroundClick:u,onNodeDrag:bq,onNodeDragEnd:br,onZoom:bn,backgroundColor:"transparent",autoPauseRedraw:!(Z&&Y)}):(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)("div",{className:"text-zinc-400 dark:text-zinc-500 text-sm animate-pulse-soft",children:"Loading graph engine..."})}),av&&av.active&&(0,b.jsx)("div",{style:{position:"absolute",left:Math.min(av.startX,av.currentX)-(al.current?.getBoundingClientRect().left||0),top:Math.min(av.startY,av.currentY)-(al.current?.getBoundingClientRect().top||0),width:Math.abs(av.currentX-av.startX),height:Math.abs(av.currentY-av.startY),border:"1.5px dashed #10b981",backgroundColor:"rgba(16, 185, 129, 0.08)",borderRadius:4,pointerEvents:"none",zIndex:5}})]})}),L=c.default.memo(K);function M(a,b){return a.length<=b?a:a.slice(0,b-1)+"…"}function N(){}function O(){}let P=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R={};function S(a,b){return((b||R).jsx?Q:P).test(a)}let T=/[ \t\n\f\r]/g;function U(a){return""===a.replace(T,"")}class V{constructor(a,b){this.attribute=b,this.property=a}}V.prototype.attribute="",V.prototype.booleanish=!1,V.prototype.boolean=!1,V.prototype.commaOrSpaceSeparated=!1,V.prototype.commaSeparated=!1,V.prototype.defined=!1,V.prototype.mustUseProperty=!1,V.prototype.number=!1,V.prototype.overloadedBoolean=!1,V.prototype.property="",V.prototype.spaceSeparated=!1,V.prototype.space=void 0;let W=0,X=ac(),Y=ac(),Z=ac(),$=ac(),_=ac(),aa=ac(),ab=ac();function ac(){return 2**++W}a.s(["boolean",0,X,"booleanish",0,Y,"commaOrSpaceSeparated",0,ab,"commaSeparated",0,aa,"number",0,$,"overloadedBoolean",0,Z,"spaceSeparated",0,_],43429);var ad=a.i(43429);let ae=Object.keys(ad);class af extends V{constructor(a,b,c,d){let e=-1;if(super(a,b),function(a,b,c){c&&(a[b]=c)}(this,"space",d),"number"==typeof c)for(;++e<ae.length;){const a=ae[e];!function(a,b,c){c&&(a[b]=c)}(this,ae[e],(c&ad[a])===ad[a])}}}function ag(a){return a.toLowerCase()}af.prototype.defined=!0;let ah=/[A-Z]/g,ai=/-[a-z]/g,aj=/^data[-\w.:]+$/i;function ak(a){return"-"+a.toLowerCase()}function al(a){return a.charAt(1).toUpperCase()}let am={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};class an{constructor(a,b,c){this.normal=b,this.property=a,c&&(this.space=c)}}function ao(a,b){let c={},d={};for(let b of a)Object.assign(c,b.property),Object.assign(d,b.normal);return new an(c,d,b)}function ap(a){let b={},c={};for(let[d,e]of Object.entries(a.properties)){let f=new af(d,a.transform(a.attributes||{},d),e,a.space);a.mustUseProperty&&a.mustUseProperty.includes(d)&&(f.mustUseProperty=!0),b[d]=f,c[ag(d)]=d,c[ag(f.attribute)]=d}return new an(b,c,a.space)}an.prototype.normal={},an.prototype.property={},an.prototype.space=void 0;let aq=ap({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:_,ariaCurrent:null,ariaDescribedBy:_,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:_,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:_,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_,ariaLevel:$,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:_,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:_,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Y,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform:(a,b)=>"role"===b?b:"aria-"+b.slice(4).toLowerCase()});function ar(a,b){return b in a?a[b]:b}function as(a,b){return ar(a,b.toLowerCase())}let at=ap({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:aa,acceptCharset:_,accessKey:_,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:_,autoFocus:X,autoPlay:X,blocking:_,capture:null,charSet:null,checked:X,cite:null,className:_,cols:$,colSpan:null,content:null,contentEditable:Y,controls:X,controlsList:_,coords:$|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Z,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:_,height:$,hidden:Z,high:$,href:null,hrefLang:null,htmlFor:_,httpEquiv:_,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:_,itemRef:_,itemScope:X,itemType:_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:$,pattern:null,ping:_,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:_,required:X,reversed:X,rows:$,rowSpan:$,sandbox:_,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:Y,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:as}),au=ap({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ab,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:_,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:ab,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ab,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ab,rev:ab,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ab,requiredFeatures:ab,requiredFonts:ab,requiredFormats:ab,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:ab,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ab,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ab,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ar}),av=ap({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(a,b)=>"xlink:"+b.slice(5).toLowerCase()}),aw=ap({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:as}),ax=ap({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(a,b)=>"xml:"+b.slice(3).toLowerCase()}),ay=ao([aq,at,av,aw,ax],"html"),az=ao([aq,au,av,aw,ax],"svg");var aA=a.i(30841);let aB=aD("end"),aC=aD("start");function aD(a){return function(b){let c=b&&b.position&&b.position[a]||{};if("number"==typeof c.line&&c.line>0&&"number"==typeof c.column&&c.column>0)return{line:c.line,column:c.column,offset:"number"==typeof c.offset&&c.offset>-1?c.offset:void 0}}}function aE(a){return a&&"object"==typeof a?"position"in a||"type"in a?aG(a.position):"start"in a||"end"in a?aG(a):"line"in a||"column"in a?aF(a):"":""}function aF(a){return aH(a&&a.line)+":"+aH(a&&a.column)}function aG(a){return aF(a&&a.start)+"-"+aF(a&&a.end)}function aH(a){return a&&"number"==typeof a?a:1}class aI extends Error{constructor(a,b,c){super(),"string"==typeof b&&(c=b,b=void 0);let d="",e={},f=!1;if(b&&(e="line"in b&&"column"in b||"start"in b&&"end"in b?{place:b}:"type"in b?{ancestors:[b],place:b.position}:{...b}),"string"==typeof a?d=a:!e.cause&&a&&(f=!0,d=a.message,e.cause=a),!e.ruleId&&!e.source&&"string"==typeof c){const a=c.indexOf(":");-1===a?e.ruleId=c:(e.source=c.slice(0,a),e.ruleId=c.slice(a+1))}if(!e.place&&e.ancestors&&e.ancestors){const a=e.ancestors[e.ancestors.length-1];a&&(e.place=a.position)}const g=e.place&&"start"in e.place?e.place.start:e.place;this.ancestors=e.ancestors||void 0,this.cause=e.cause||void 0,this.column=g?g.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=g?g.line:void 0,this.name=aE(e.place)||"1:1",this.place=e.place||void 0,this.reason=this.message,this.ruleId=e.ruleId||void 0,this.source=e.source||void 0,this.stack=f&&e.cause&&"string"==typeof e.cause.stack?e.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}aI.prototype.file="",aI.prototype.name="",aI.prototype.reason="",aI.prototype.message="",aI.prototype.stack="",aI.prototype.column=void 0,aI.prototype.line=void 0,aI.prototype.ancestors=void 0,aI.prototype.cause=void 0,aI.prototype.fatal=void 0,aI.prototype.place=void 0,aI.prototype.ruleId=void 0,aI.prototype.source=void 0;let aJ={}.hasOwnProperty,aK=new Map,aL=/[A-Z]/g,aM=new Set(["table","tbody","thead","tfoot","tr"]),aN=new Set(["td","th"]),aO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aP(a,b,c){var d,e,f,g,h,i,j,k,l;let m,n,o,p,q,r,s,t,u,v,w;return"element"===b.type?(d=a,e=b,f=c,n=m=d.schema,"svg"===e.tagName.toLowerCase()&&"html"===m.space&&(d.schema=az),d.ancestors.push(e),o=aT(d,e.tagName,!1),p=function(a,b){let c,d,e={};for(d in b.properties)if("children"!==d&&aJ.call(b.properties,d)){let f=function(a,b,c){let d=function(a,b){let c=ag(b),d=b,e=V;if(c in a.normal)return a.property[a.normal[c]];if(c.length>4&&"data"===c.slice(0,4)&&aj.test(b)){if("-"===b.charAt(4)){let a=b.slice(5).replace(ai,al);d="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=b.slice(4);if(!ai.test(a)){let c=a.replace(ah,ak);"-"!==c.charAt(0)&&(c="-"+c),b="data"+c}}e=af}return new e(d,b)}(a.schema,b);if(!(null==c||"number"==typeof c&&Number.isNaN(c))){var e;let b;if(Array.isArray(c)&&(c=d.commaSeparated?(b={},(""===(e=c)[e.length-1]?[...e,""]:e).join((b.padRight?" ":"")+","+(!1===b.padLeft?"":" ")).trim()):c.join(" ").trim()),"style"===d.property){let b="object"==typeof c?c:function(a,b){try{return(0,aA.default)(b,{reactCompat:!0})}catch(c){if(a.ignoreInvalidStyle)return{};let b=new aI("Cannot parse `style` attribute",{ancestors:a.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw b.file=a.filePath||void 0,b.url=aO+"#cannot-parse-style-attribute",b}}(a,String(c));return"css"===a.stylePropertyNameCase&&(b=function(a){let b,c={};for(b in a)aJ.call(a,b)&&(c[function(a){let b=a.replace(aL,aV);return"ms-"===b.slice(0,3)&&(b="-"+b),b}(b)]=a[b]);return c}(b)),["style",b]}return["react"===a.elementAttributeNameCase&&d.space?am[d.property]||d.property:d.attribute,c]}}(a,d,b.properties[d]);if(f){let[d,g]=f;a.tableCellAlignToStyle&&"align"===d&&"string"==typeof g&&aN.has(b.tagName)?c=g:e[d]=g}}return c&&((e.style||(e.style={}))["css"===a.stylePropertyNameCase?"text-align":"textAlign"]=c),e}(d,e),q=aS(d,e),aM.has(e.tagName)&&(q=q.filter(function(a){return"string"!=typeof a||!("object"==typeof a?"text"===a.type&&U(a.value):U(a))})),aQ(d,p,o,e),aR(p,q),d.ancestors.pop(),d.schema=m,d.create(e,o,p,f)):"mdxFlowExpression"===b.type||"mdxTextExpression"===b.type?function(a,b){if(b.data&&b.data.estree&&a.evaluater){let c=b.data.estree.body[0];return N("ExpressionStatement"===c.type),a.evaluater.evaluateExpression(c.expression)}aU(a,b.position)}(a,b):"mdxJsxFlowElement"===b.type||"mdxJsxTextElement"===b.type?(g=a,h=b,i=c,s=r=g.schema,"svg"===h.name&&"html"===r.space&&(g.schema=az),g.ancestors.push(h),t=null===h.name?g.Fragment:aT(g,h.name,!0),u=function(a,b){let c={};for(let d of b.attributes)if("mdxJsxExpressionAttribute"===d.type)if(d.data&&d.data.estree&&a.evaluater){let b=d.data.estree.body[0];N("ExpressionStatement"===b.type);let e=b.expression;N("ObjectExpression"===e.type);let f=e.properties[0];N("SpreadElement"===f.type),Object.assign(c,a.evaluater.evaluateExpression(f.argument))}else aU(a,b.position);else{let e,f=d.name;if(d.value&&"object"==typeof d.value)if(d.value.data&&d.value.data.estree&&a.evaluater){let b=d.value.data.estree.body[0];N("ExpressionStatement"===b.type),e=a.evaluater.evaluateExpression(b.expression)}else aU(a,b.position);else e=null===d.value||d.value;c[f]=e}return c}(g,h),v=aS(g,h),aQ(g,u,t,h),aR(u,v),g.ancestors.pop(),g.schema=r,g.create(h,t,u,i)):"mdxjsEsm"===b.type?function(a,b){if(b.data&&b.data.estree&&a.evaluater)return a.evaluater.evaluateProgram(b.data.estree);aU(a,b.position)}(a,b):"root"===b.type?(j=a,k=b,l=c,aR(w={},aS(j,k)),j.create(k,j.Fragment,w,l)):"text"===b.type?b.value:void 0}function aQ(a,b,c,d){"string"!=typeof c&&c!==a.Fragment&&a.passNode&&(b.node=d)}function aR(a,b){if(b.length>0){let c=b.length>1?b:b[0];c&&(a.children=c)}}function aS(a,b){let c=[],d=-1,e=a.passKeys?new Map:aK;for(;++d<b.children.length;){let f,g=b.children[d];if(a.passKeys){let a="element"===g.type?g.tagName:"mdxJsxFlowElement"===g.type||"mdxJsxTextElement"===g.type?g.name:void 0;if(a){let b=e.get(a)||0;f=a+"-"+b,e.set(a,b+1)}}let h=aP(a,g,f);void 0!==h&&c.push(h)}return c}function aT(a,b,c){let d;if(c)if(b.includes(".")){let a,c=b.split("."),e=-1;for(;++e<c.length;){let b=S(c[e])?{type:"Identifier",name:c[e]}:{type:"Literal",value:c[e]};a=a?{type:"MemberExpression",object:a,property:b,computed:!!(e&&"Literal"===b.type),optional:!1}:b}N(a,"always a result"),d=a}else d=S(b)&&!/^[a-z]/.test(b)?{type:"Identifier",name:b}:{type:"Literal",value:b};else d={type:"Literal",value:b};if("Literal"===d.type){let b=d.value;return aJ.call(a.components,b)?a.components[b]:b}if(a.evaluater)return a.evaluater.evaluateExpression(d);aU(a)}function aU(a,b){let c=new aI("Cannot handle MDX estrees without `createEvaluater`",{ancestors:a.ancestors,place:b,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw c.file=a.filePath||void 0,c.url=aO+"#cannot-handle-mdx-estrees-without-createevaluater",c}function aV(a){return"-"+a.toLowerCase()}let aW={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aX={};function aY(a,b){let c=b||aX;return aZ(a,"boolean"!=typeof c.includeImageAlt||c.includeImageAlt,"boolean"!=typeof c.includeHtml||c.includeHtml)}function aZ(a,b,c){var d;if((d=a)&&"object"==typeof d){if("value"in a)return"html"!==a.type||c?a.value:"";if(b&&"alt"in a&&a.alt)return a.alt;if("children"in a)return a$(a.children,b,c)}return Array.isArray(a)?a$(a,b,c):""}function a$(a,b,c){let d=[],e=-1;for(;++e<a.length;)d[e]=aZ(a[e],b,c);return d.join("")}function a_(a,b,c,d){let e,f=a.length,g=0;if(b=b<0?-b>f?0:f+b:b>f?f:b,c=c>0?c:0,d.length<1e4)(e=Array.from(d)).unshift(b,c),a.splice(...e);else for(c&&a.splice(b,c);g<d.length;)(e=d.slice(g,g+1e4)).unshift(b,0),a.splice(...e),g+=1e4,b+=1e4}function a0(a,b){return a.length>0?(a_(a,a.length,0,b),a):b}let a1={}.hasOwnProperty;function a2(a){let b={},c=-1;for(;++c<a.length;)!function(a,b){let c;for(c in b){let d,e=(a1.call(a,c)?a[c]:void 0)||(a[c]={}),f=b[c];if(f)for(d in f){a1.call(e,d)||(e[d]=[]);let a=f[d];!function(a,b){let c=-1,d=[];for(;++c<b.length;)("after"===b[c].add?a:d).push(b[c]);a_(a,0,0,d)}(e[d],Array.isArray(a)?a:a?[a]:[])}}}(b,a[c]);return b}let a3=bf(/[A-Za-z]/),a4=bf(/[\dA-Za-z]/),a5=bf(/[#-'*+\--9=?A-Z^-~]/);function a6(a){return null!==a&&(a<32||127===a)}let a7=bf(/\d/),a8=bf(/[\dA-Fa-f]/),a9=bf(/[!-/:-@[-`{-~]/);function ba(a){return null!==a&&a<-2}function bb(a){return null!==a&&(a<0||32===a)}function bc(a){return -2===a||-1===a||32===a}let bd=bf(/\p{P}|\p{S}/u),be=bf(/\s/);function bf(a){return function(b){return null!==b&&b>-1&&a.test(String.fromCharCode(b))}}function bg(a,b,c,d){let e=d?d-1:1/0,f=0;return function(d){return bc(d)?(a.enter(c),function d(g){return bc(g)&&f++<e?(a.consume(g),d):(a.exit(c),b(g))}(d)):b(d)}}let bh={tokenize:function(a){let b,c=a.attempt(this.parser.constructs.contentInitial,function(b){return null===b?void a.consume(b):(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,c,"linePrefix"))},function(c){return a.enter("paragraph"),function c(d){let e=a.enter("chunkText",{contentType:"text",previous:b});return b&&(b.next=e),b=e,function b(d){if(null===d){a.exit("chunkText"),a.exit("paragraph"),a.consume(d);return}return ba(d)?(a.consume(d),a.exit("chunkText"),c):(a.consume(d),b)}(d)}(c)});return c}},bi={tokenize:function(a){let b,c,d,e=this,f=[],g=0;return h;function h(b){if(g<f.length){let c=f[g];return e.containerState=c[1],a.attempt(c[0].continuation,i,j)(b)}return j(b)}function i(a){if(g++,e.containerState._closeFlow){let c;e.containerState._closeFlow=void 0,b&&r();let d=e.events.length,f=d;for(;f--;)if("exit"===e.events[f][0]&&"chunkFlow"===e.events[f][1].type){c=e.events[f][1].end;break}q(g);let h=d;for(;h<e.events.length;)e.events[h][1].end={...c},h++;return a_(e.events,f+1,0,e.events.slice(d)),e.events.length=h,j(a)}return h(a)}function j(c){if(g===f.length){if(!b)return m(c);if(b.currentConstruct&&b.currentConstruct.concrete)return o(c);e.interrupt=!!(b.currentConstruct&&!b._gfmTableDynamicInterruptHack)}return e.containerState={},a.check(bj,k,l)(c)}function k(a){return b&&r(),q(g),m(a)}function l(a){return e.parser.lazy[e.now().line]=g!==f.length,d=e.now().offset,o(a)}function m(b){return e.containerState={},a.attempt(bj,n,o)(b)}function n(a){return g++,f.push([e.currentConstruct,e.containerState]),m(a)}function o(d){if(null===d){b&&r(),q(0),a.consume(d);return}return b=b||e.parser.flow(e.now()),a.enter("chunkFlow",{_tokenizer:b,contentType:"flow",previous:c}),function b(c){if(null===c){p(a.exit("chunkFlow"),!0),q(0),a.consume(c);return}return ba(c)?(a.consume(c),p(a.exit("chunkFlow")),g=0,e.interrupt=void 0,h):(a.consume(c),b)}(d)}function p(a,f){let h=e.sliceStream(a);if(f&&h.push(null),a.previous=c,c&&(c.next=a),c=a,b.defineSkip(a.start),b.write(h),e.parser.lazy[a.start.line]){let a,c,f=b.events.length;for(;f--;)if(b.events[f][1].start.offset<d&&(!b.events[f][1].end||b.events[f][1].end.offset>d))return;let h=e.events.length,i=h;for(;i--;)if("exit"===e.events[i][0]&&"chunkFlow"===e.events[i][1].type){if(a){c=e.events[i][1].end;break}a=!0}for(q(g),f=h;f<e.events.length;)e.events[f][1].end={...c},f++;a_(e.events,i+1,0,e.events.slice(h)),e.events.length=f}}function q(b){let c=f.length;for(;c-- >b;){let b=f[c];e.containerState=b[1],b[0].exit.call(e,a)}f.length=b}function r(){b.write([null]),c=void 0,b=void 0,e.containerState._closeFlow=void 0}}},bj={tokenize:function(a,b,c){return bg(a,a.attempt(this.parser.constructs.document,b,c),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},bk={partial:!0,tokenize:function(a,b,c){return function(b){return bc(b)?bg(a,d,"linePrefix")(b):d(b)};function d(a){return null===a||ba(a)?b(a):c(a)}}};class bl{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,b){let c=null==b?1/0:b;return c<this.left.length?this.left.slice(a,c):a>this.left.length?this.right.slice(this.right.length-c+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-c+this.left.length).reverse())}splice(a,b,c){this.setCursor(Math.trunc(a));let d=this.right.splice(this.right.length-(b||0),1/0);return c&&bm(this.left,c),d.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(a){this.setCursor(1/0),this.left.push(a)}pushMany(a){this.setCursor(1/0),bm(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),bm(this.right,a.reverse())}setCursor(a){if(a!==this.left.length&&(!(a>this.left.length)||0!==this.right.length)&&(!(a<0)||0!==this.left.length))if(a<this.left.length){let b=this.left.splice(a,1/0);bm(this.right,b.reverse())}else{let b=this.right.splice(this.left.length+this.right.length-a,1/0);bm(this.left,b.reverse())}}}function bm(a,b){let c=0;if(b.length<1e4)a.push(...b);else for(;c<b.length;)a.push(...b.slice(c,c+1e4)),c+=1e4}function bn(a){let b,c,d,e,f,g,h,i={},j=-1,k=new bl(a);for(;++j<k.length;){for(;j in i;)j=i[j];if(b=k.get(j),j&&"chunkFlow"===b[1].type&&"listItemPrefix"===k.get(j-1)[1].type&&((d=0)<(g=b[1]._tokenizer.events).length&&"lineEndingBlank"===g[d][1].type&&(d+=2),d<g.length&&"content"===g[d][1].type))for(;++d<g.length&&"content"!==g[d][1].type;)"chunkText"===g[d][1].type&&(g[d][1]._isInFirstContentOfListItem=!0,d++);if("enter"===b[0])b[1].contentType&&(Object.assign(i,function(a,b){let c,d,e=a.get(b)[1],f=a.get(b)[2],g=b-1,h=[],i=e._tokenizer;!i&&(i=f.parser[e.contentType](e.start),e._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));let j=i.events,k=[],l={},m=-1,n=e,o=0,p=0,q=[0];for(;n;){for(;a.get(++g)[1]!==n;);h.push(g),!n._tokenizer&&(c=f.sliceStream(n),n.next||c.push(null),d&&i.defineSkip(n.start),n._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),n._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=n,n=n.next}for(n=e;++m<j.length;)"exit"===j[m][0]&&"enter"===j[m-1][0]&&j[m][1].type===j[m-1][1].type&&j[m][1].start.line!==j[m][1].end.line&&(p=m+1,q.push(p),n._tokenizer=void 0,n.previous=void 0,n=n.next);for(i.events=[],n?(n._tokenizer=void 0,n.previous=void 0):q.pop(),m=q.length;m--;){let b=j.slice(q[m],q[m+1]),c=h.pop();k.push([c,c+b.length-1]),a.splice(c,2,b)}for(k.reverse(),m=-1;++m<k.length;)l[o+k[m][0]]=o+k[m][1],o+=k[m][1]-k[m][0]-1;return l}(k,j)),j=i[j],h=!0);else if(b[1]._container){for(d=j,c=void 0;d--;)if("lineEnding"===(e=k.get(d))[1].type||"lineEndingBlank"===e[1].type)"enter"===e[0]&&(c&&(k.get(c)[1].type="lineEndingBlank"),e[1].type="lineEnding",c=d);else if("linePrefix"===e[1].type||"listItemIndent"===e[1].type);else break;c&&(b[1].end={...k.get(c)[1].start},(f=k.slice(c,j)).unshift(b),k.splice(c,j-c+1,f))}}return a_(a,0,1/0,k.slice(0)),!h}let bo={resolve:function(a){return bn(a),a},tokenize:function(a,b){let c;return function(b){return a.enter("content"),c=a.enter("chunkContent",{contentType:"content"}),d(b)};function d(b){return null===b?e(b):ba(b)?a.check(bp,f,e)(b):(a.consume(b),d)}function e(c){return a.exit("chunkContent"),a.exit("content"),b(c)}function f(b){return a.consume(b),a.exit("chunkContent"),c.next=a.enter("chunkContent",{contentType:"content",previous:c}),c=c.next,d}}},bp={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return a.exit("chunkContent"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,e,"linePrefix")};function e(e){if(null===e||ba(e))return c(e);let f=d.events[d.events.length-1];return!d.parser.constructs.disable.null.includes("codeIndented")&&f&&"linePrefix"===f[1].type&&f[2].sliceSerialize(f[1],!0).length>=4?b(e):a.interrupt(d.parser.constructs.flow,c,b)(e)}}},bq={tokenize:function(a){let b=this,c=a.attempt(bk,function(d){return null===d?void a.consume(d):(a.enter("lineEndingBlank"),a.consume(d),a.exit("lineEndingBlank"),b.currentConstruct=void 0,c)},a.attempt(this.parser.constructs.flowInitial,d,bg(a,a.attempt(this.parser.constructs.flow,d,a.attempt(bo,d)),"linePrefix")));return c;function d(d){return null===d?void a.consume(d):(a.enter("lineEnding"),a.consume(d),a.exit("lineEnding"),b.currentConstruct=void 0,c)}}},br={resolveAll:bv()},bs=bu("string"),bt=bu("text");function bu(a){return{resolveAll:bv("text"===a?bw:void 0),tokenize:function(b){let c=this,d=this.parser.constructs[a],e=b.attempt(d,f,g);return f;function f(a){return i(a)?e(a):g(a)}function g(a){return null===a?void b.consume(a):(b.enter("data"),b.consume(a),h)}function h(a){return i(a)?(b.exit("data"),e(a)):(b.consume(a),h)}function i(a){if(null===a)return!0;let b=d[a],e=-1;if(b)for(;++e<b.length;){let a=b[e];if(!a.previous||a.previous.call(c,c.previous))return!0}return!1}}}}function bv(a){return function(b,c){let d,e=-1;for(;++e<=b.length;)void 0===d?b[e]&&"data"===b[e][1].type&&(d=e,e++):b[e]&&"data"===b[e][1].type||(e!==d+2&&(b[d][1].end=b[e-1][1].end,b.splice(d+2,e-d-2),e=d+2),d=void 0);return a?a(b,c):b}}function bw(a,b){let c=0;for(;++c<=a.length;)if((c===a.length||"lineEnding"===a[c][1].type)&&"data"===a[c-1][1].type){let d,e=a[c-1][1],f=b.sliceStream(e),g=f.length,h=-1,i=0;for(;g--;){let a=f[g];if("string"==typeof a){for(h=a.length;32===a.charCodeAt(h-1);)i++,h--;if(h)break;h=-1}else if(-2===a)d=!0,i++;else if(-1===a);else{g++;break}}if(b._contentTypeTextTrailing&&c===a.length&&(i=0),i){let f={type:c===a.length||d||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:g?h:e.start._bufferIndex+h,_index:e.start._index+g,line:e.end.line,column:e.end.column-i,offset:e.end.offset-i},end:{...e.end}};e.end={...f.start},e.start.offset===e.end.offset?Object.assign(e,f):(a.splice(c,0,["enter",f,b],["exit",f,b]),c+=2)}c++}return a}function bx(a){return null===a||bb(a)||be(a)?1:bd(a)?2:void 0}function by(a,b,c){let d=[],e=-1;for(;++e<a.length;){let f=a[e].resolveAll;f&&!d.includes(f)&&(b=f(b,c),d.push(f))}return b}let bz={name:"attention",resolveAll:function(a,b){let c,d,e,f,g,h,i,j,k=-1;for(;++k<a.length;)if("enter"===a[k][0]&&"attentionSequence"===a[k][1].type&&a[k][1]._close){for(c=k;c--;)if("exit"===a[c][0]&&"attentionSequence"===a[c][1].type&&a[c][1]._open&&b.sliceSerialize(a[c][1]).charCodeAt(0)===b.sliceSerialize(a[k][1]).charCodeAt(0)){if((a[c][1]._close||a[k][1]._open)&&(a[k][1].end.offset-a[k][1].start.offset)%3&&!((a[c][1].end.offset-a[c][1].start.offset+a[k][1].end.offset-a[k][1].start.offset)%3))continue;h=a[c][1].end.offset-a[c][1].start.offset>1&&a[k][1].end.offset-a[k][1].start.offset>1?2:1;let l={...a[c][1].end},m={...a[k][1].start};bA(l,-h),bA(m,h),f={type:h>1?"strongSequence":"emphasisSequence",start:l,end:{...a[c][1].end}},g={type:h>1?"strongSequence":"emphasisSequence",start:{...a[k][1].start},end:m},e={type:h>1?"strongText":"emphasisText",start:{...a[c][1].end},end:{...a[k][1].start}},d={type:h>1?"strong":"emphasis",start:{...f.start},end:{...g.end}},a[c][1].end={...f.start},a[k][1].start={...g.end},i=[],a[c][1].end.offset-a[c][1].start.offset&&(i=a0(i,[["enter",a[c][1],b],["exit",a[c][1],b]])),i=a0(i,[["enter",d,b],["enter",f,b],["exit",f,b],["enter",e,b]]),i=a0(i,by(b.parser.constructs.insideSpan.null,a.slice(c+1,k),b)),i=a0(i,[["exit",e,b],["enter",g,b],["exit",g,b],["exit",d,b]]),a[k][1].end.offset-a[k][1].start.offset?(j=2,i=a0(i,[["enter",a[k][1],b],["exit",a[k][1],b]])):j=0,a_(a,c-1,k-c+3,i),k=c+i.length-j-2;break}}for(k=-1;++k<a.length;)"attentionSequence"===a[k][1].type&&(a[k][1].type="data");return a},tokenize:function(a,b){let c,d=this.parser.constructs.attentionMarkers.null,e=this.previous,f=bx(e);return function(g){return c=g,a.enter("attentionSequence"),function g(h){if(h===c)return a.consume(h),g;let i=a.exit("attentionSequence"),j=bx(h),k=!j||2===j&&f||d.includes(h),l=!f||2===f&&j||d.includes(e);return i._open=!!(42===c?k:k&&(f||!l)),i._close=!!(42===c?l:l&&(j||!k)),b(h)}(g)}}};function bA(a,b){a.column+=b,a.offset+=b,a._bufferIndex+=b}let bB={continuation:{tokenize:function(a,b,c){let d=this;return function(b){return bc(b)?bg(a,e,"linePrefix",d.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):e(b)};function e(d){return a.attempt(bB,b,c)(d)}}},exit:function(a){a.exit("blockQuote")},name:"blockQuote",tokenize:function(a,b,c){let d=this;return function(b){if(62===b){let c=d.containerState;return c.open||(a.enter("blockQuote",{_container:!0}),c.open=!0),a.enter("blockQuotePrefix"),a.enter("blockQuoteMarker"),a.consume(b),a.exit("blockQuoteMarker"),e}return c(b)};function e(c){return bc(c)?(a.enter("blockQuotePrefixWhitespace"),a.consume(c),a.exit("blockQuotePrefixWhitespace"),a.exit("blockQuotePrefix"),b):(a.exit("blockQuotePrefix"),b(c))}}},bC={name:"characterEscape",tokenize:function(a,b,c){return function(b){return a.enter("characterEscape"),a.enter("escapeMarker"),a.consume(b),a.exit("escapeMarker"),d};function d(d){return a9(d)?(a.enter("characterEscapeValue"),a.consume(d),a.exit("characterEscapeValue"),a.exit("characterEscape"),b):c(d)}}},bD={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},bE={}.hasOwnProperty;function bF(a){return!!bE.call(bD,a)&&bD[a]}let bG={name:"characterReference",tokenize:function(a,b,c){let d,e,f=this,g=0;return function(b){return a.enter("characterReference"),a.enter("characterReferenceMarker"),a.consume(b),a.exit("characterReferenceMarker"),h};function h(b){return 35===b?(a.enter("characterReferenceMarkerNumeric"),a.consume(b),a.exit("characterReferenceMarkerNumeric"),i):(a.enter("characterReferenceValue"),d=31,e=a4,j(b))}function i(b){return 88===b||120===b?(a.enter("characterReferenceMarkerHexadecimal"),a.consume(b),a.exit("characterReferenceMarkerHexadecimal"),a.enter("characterReferenceValue"),d=6,e=a8,j):(a.enter("characterReferenceValue"),d=7,e=a7,j(b))}function j(h){if(59===h&&g){let d=a.exit("characterReferenceValue");return e!==a4||bF(f.sliceSerialize(d))?(a.enter("characterReferenceMarker"),a.consume(h),a.exit("characterReferenceMarker"),a.exit("characterReference"),b):c(h)}return e(h)&&g++<d?(a.consume(h),j):c(h)}}},bH={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return null===b?c(b):(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e)};function e(a){return d.parser.lazy[d.now().line]?c(a):b(a)}}},bI={concrete:!0,name:"codeFenced",tokenize:function(a,b,c){let d,e=this,f={partial:!0,tokenize:function(a,b,c){let f=0;return function(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),g};function g(b){return a.enter("codeFencedFence"),bc(b)?bg(a,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):i(b)}function i(b){return b===d?(a.enter("codeFencedFenceSequence"),function b(e){return e===d?(f++,a.consume(e),b):f>=h?(a.exit("codeFencedFenceSequence"),bc(e)?bg(a,j,"whitespace")(e):j(e)):c(e)}(b)):c(b)}function j(d){return null===d||ba(d)?(a.exit("codeFencedFence"),b(d)):c(d)}}},g=0,h=0;return function(b){var f;let j;return f=b,g=(j=e.events[e.events.length-1])&&"linePrefix"===j[1].type?j[2].sliceSerialize(j[1],!0).length:0,d=f,a.enter("codeFenced"),a.enter("codeFencedFence"),a.enter("codeFencedFenceSequence"),function b(e){return e===d?(h++,a.consume(e),b):h<3?c(e):(a.exit("codeFencedFenceSequence"),bc(e)?bg(a,i,"whitespace")(e):i(e))}(f)};function i(f){return null===f||ba(f)?(a.exit("codeFencedFence"),e.interrupt?b(f):a.check(bH,k,o)(f)):(a.enter("codeFencedFenceInfo"),a.enter("chunkString",{contentType:"string"}),function b(e){return null===e||ba(e)?(a.exit("chunkString"),a.exit("codeFencedFenceInfo"),i(e)):bc(e)?(a.exit("chunkString"),a.exit("codeFencedFenceInfo"),bg(a,j,"whitespace")(e)):96===e&&e===d?c(e):(a.consume(e),b)}(f))}function j(b){return null===b||ba(b)?i(b):(a.enter("codeFencedFenceMeta"),a.enter("chunkString",{contentType:"string"}),function b(e){return null===e||ba(e)?(a.exit("chunkString"),a.exit("codeFencedFenceMeta"),i(e)):96===e&&e===d?c(e):(a.consume(e),b)}(b))}function k(b){return a.attempt(f,o,l)(b)}function l(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),m}function m(b){return g>0&&bc(b)?bg(a,n,"linePrefix",g+1)(b):n(b)}function n(b){return null===b||ba(b)?a.check(bH,k,o)(b):(a.enter("codeFlowValue"),function b(c){return null===c||ba(c)?(a.exit("codeFlowValue"),n(c)):(a.consume(c),b)}(b))}function o(c){return a.exit("codeFenced"),b(c)}}},bJ={name:"codeIndented",tokenize:function(a,b,c){let d=this;return function(b){return a.enter("codeIndented"),bg(a,e,"linePrefix",5)(b)};function e(b){let e=d.events[d.events.length-1];return e&&"linePrefix"===e[1].type&&e[2].sliceSerialize(e[1],!0).length>=4?function b(c){return null===c?f(c):ba(c)?a.attempt(bK,b,f)(c):(a.enter("codeFlowValue"),function c(d){return null===d||ba(d)?(a.exit("codeFlowValue"),b(d)):(a.consume(d),c)}(c))}(b):c(b)}function f(c){return a.exit("codeIndented"),b(c)}}},bK={partial:!0,tokenize:function(a,b,c){let d=this;return e;function e(b){return d.parser.lazy[d.now().line]?c(b):ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e):bg(a,f,"linePrefix",5)(b)}function f(a){let f=d.events[d.events.length-1];return f&&"linePrefix"===f[1].type&&f[2].sliceSerialize(f[1],!0).length>=4?b(a):ba(a)?e(a):c(a)}}};function bL(a,b,c,d,e,f,g,h,i){let j=i||1/0,k=0;return function(b){return 60===b?(a.enter(d),a.enter(e),a.enter(f),a.consume(b),a.exit(f),l):null===b||32===b||41===b||a6(b)?c(b):(a.enter(d),a.enter(g),a.enter(h),a.enter("chunkString",{contentType:"string"}),o(b))};function l(c){return 62===c?(a.enter(f),a.consume(c),a.exit(f),a.exit(e),a.exit(d),b):(a.enter(h),a.enter("chunkString",{contentType:"string"}),m(c))}function m(b){return 62===b?(a.exit("chunkString"),a.exit(h),l(b)):null===b||60===b||ba(b)?c(b):(a.consume(b),92===b?n:m)}function n(b){return 60===b||62===b||92===b?(a.consume(b),m):m(b)}function o(e){return!k&&(null===e||41===e||bb(e))?(a.exit("chunkString"),a.exit(h),a.exit(g),a.exit(d),b(e)):k<j&&40===e?(a.consume(e),k++,o):41===e?(a.consume(e),k--,o):null===e||32===e||40===e||a6(e)?c(e):(a.consume(e),92===e?p:o)}function p(b){return 40===b||41===b||92===b?(a.consume(b),o):o(b)}}function bM(a,b,c,d,e,f){let g,h=this,i=0;return function(b){return a.enter(d),a.enter(e),a.consume(b),a.exit(e),a.enter(f),j};function j(l){return i>999||null===l||91===l||93===l&&!g||94===l&&!i&&"_hiddenFootnoteSupport"in h.parser.constructs?c(l):93===l?(a.exit(f),a.enter(e),a.consume(l),a.exit(e),a.exit(d),b):ba(l)?(a.enter("lineEnding"),a.consume(l),a.exit("lineEnding"),j):(a.enter("chunkString",{contentType:"string"}),k(l))}function k(b){return null===b||91===b||93===b||ba(b)||i++>999?(a.exit("chunkString"),j(b)):(a.consume(b),g||(g=!bc(b)),92===b?l:k)}function l(b){return 91===b||92===b||93===b?(a.consume(b),i++,k):k(b)}}function bN(a,b,c,d,e,f){let g;return function(b){return 34===b||39===b||40===b?(a.enter(d),a.enter(e),a.consume(b),a.exit(e),g=40===b?41:b,h):c(b)};function h(c){return c===g?(a.enter(e),a.consume(c),a.exit(e),a.exit(d),b):(a.enter(f),i(c))}function i(b){return b===g?(a.exit(f),h(g)):null===b?c(b):ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),bg(a,i,"linePrefix")):(a.enter("chunkString",{contentType:"string"}),j(b))}function j(b){return b===g||null===b||ba(b)?(a.exit("chunkString"),i(b)):(a.consume(b),92===b?k:j)}function k(b){return b===g||92===b?(a.consume(b),j):j(b)}}function bO(a,b){let c;return function d(e){return ba(e)?(a.enter("lineEnding"),a.consume(e),a.exit("lineEnding"),c=!0,d):bc(e)?bg(a,d,c?"linePrefix":"lineSuffix")(e):b(e)}}function bP(a){return a.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let bQ={partial:!0,tokenize:function(a,b,c){return function(b){return bb(b)?bO(a,d)(b):c(b)};function d(b){return bN(a,e,c,"definitionTitle","definitionTitleMarker","definitionTitleString")(b)}function e(b){return bc(b)?bg(a,f,"whitespace")(b):f(b)}function f(a){return null===a||ba(a)?b(a):c(a)}}},bR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],bS=["pre","script","style","textarea"],bT={partial:!0,tokenize:function(a,b,c){return function(d){return a.enter("lineEnding"),a.consume(d),a.exit("lineEnding"),a.attempt(bk,b,c)}}},bU={partial:!0,tokenize:function(a,b,c){let d=this;return function(b){return ba(b)?(a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),e):c(b)};function e(a){return d.parser.lazy[d.now().line]?c(a):b(a)}}},bV={name:"labelEnd",resolveAll:function(a){let b=-1,c=[];for(;++b<a.length;){let d=a[b][1];if(c.push(a[b]),"labelImage"===d.type||"labelLink"===d.type||"labelEnd"===d.type){let a="labelImage"===d.type?4:2;d.type="data",b+=a}}return a.length!==c.length&&a_(a,0,a.length,c),a},resolveTo:function(a,b){let c,d,e,f,g=a.length,h=0;for(;g--;)if(c=a[g][1],d){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===a[g][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(e){if("enter"===a[g][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(d=g,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(e=g);let i={type:"labelLink"===a[d][1].type?"link":"image",start:{...a[d][1].start},end:{...a[a.length-1][1].end}},j={type:"label",start:{...a[d][1].start},end:{...a[e][1].end}},k={type:"labelText",start:{...a[d+h+2][1].end},end:{...a[e-2][1].start}};return f=a0(f=[["enter",i,b],["enter",j,b]],a.slice(d+1,d+h+3)),f=a0(f,[["enter",k,b]]),f=a0(f,by(b.parser.constructs.insideSpan.null,a.slice(d+h+4,e-3),b)),f=a0(f,[["exit",k,b],a[e-2],a[e-1],["exit",j,b]]),f=a0(f,a.slice(e+1)),f=a0(f,[["exit",i,b]]),a_(a,d,a.length,f),a},tokenize:function(a,b,c){let d,e,f=this,g=f.events.length;for(;g--;)if(("labelImage"===f.events[g][1].type||"labelLink"===f.events[g][1].type)&&!f.events[g][1]._balanced){d=f.events[g][1];break}return function(b){return d?d._inactive?k(b):(e=f.parser.defined.includes(bP(f.sliceSerialize({start:d.end,end:f.now()}))),a.enter("labelEnd"),a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelEnd"),h):c(b)};function h(b){return 40===b?a.attempt(bW,j,e?j:k)(b):91===b?a.attempt(bX,j,e?i:k)(b):e?j(b):k(b)}function i(b){return a.attempt(bY,j,k)(b)}function j(a){return b(a)}function k(a){return d._balanced=!0,c(a)}}},bW={tokenize:function(a,b,c){return function(b){return a.enter("resource"),a.enter("resourceMarker"),a.consume(b),a.exit("resourceMarker"),d};function d(b){return bb(b)?bO(a,e)(b):e(b)}function e(b){return 41===b?j(b):bL(a,f,g,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function f(b){return bb(b)?bO(a,h)(b):j(b)}function g(a){return c(a)}function h(b){return 34===b||39===b||40===b?bN(a,i,c,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):j(b)}function i(b){return bb(b)?bO(a,j)(b):j(b)}function j(d){return 41===d?(a.enter("resourceMarker"),a.consume(d),a.exit("resourceMarker"),a.exit("resource"),b):c(d)}}},bX={tokenize:function(a,b,c){let d=this;return function(b){return bM.call(d,a,e,f,"reference","referenceMarker","referenceString")(b)};function e(a){return d.parser.defined.includes(bP(d.sliceSerialize(d.events[d.events.length-1][1]).slice(1,-1)))?b(a):c(a)}function f(a){return c(a)}}},bY={tokenize:function(a,b,c){return function(b){return a.enter("reference"),a.enter("referenceMarker"),a.consume(b),a.exit("referenceMarker"),d};function d(d){return 93===d?(a.enter("referenceMarker"),a.consume(d),a.exit("referenceMarker"),a.exit("reference"),b):c(d)}}},bZ={name:"labelStartImage",resolveAll:bV.resolveAll,tokenize:function(a,b,c){let d=this;return function(b){return a.enter("labelImage"),a.enter("labelImageMarker"),a.consume(b),a.exit("labelImageMarker"),e};function e(b){return 91===b?(a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelImage"),f):c(b)}function f(a){return 94===a&&"_hiddenFootnoteSupport"in d.parser.constructs?c(a):b(a)}}},b$={name:"labelStartLink",resolveAll:bV.resolveAll,tokenize:function(a,b,c){let d=this;return function(b){return a.enter("labelLink"),a.enter("labelMarker"),a.consume(b),a.exit("labelMarker"),a.exit("labelLink"),e};function e(a){return 94===a&&"_hiddenFootnoteSupport"in d.parser.constructs?c(a):b(a)}}},b_={name:"lineEnding",tokenize:function(a,b){return function(c){return a.enter("lineEnding"),a.consume(c),a.exit("lineEnding"),bg(a,b,"linePrefix")}}},b0={name:"thematicBreak",tokenize:function(a,b,c){let d,e=0;return function(f){var g;return a.enter("thematicBreak"),d=g=f,function f(g){return g===d?(a.enter("thematicBreakSequence"),function b(c){return c===d?(a.consume(c),e++,b):(a.exit("thematicBreakSequence"),bc(c)?bg(a,f,"whitespace")(c):f(c))}(g)):e>=3&&(null===g||ba(g))?(a.exit("thematicBreak"),b(g)):c(g)}(g)}}},b1={continuation:{tokenize:function(a,b,c){let d=this;return d.containerState._closeFlow=void 0,a.check(bk,function(c){return d.containerState.furtherBlankLines=d.containerState.furtherBlankLines||d.containerState.initialBlankLine,bg(a,b,"listItemIndent",d.containerState.size+1)(c)},function(c){return d.containerState.furtherBlankLines||!bc(c)?(d.containerState.furtherBlankLines=void 0,d.containerState.initialBlankLine=void 0,e(c)):(d.containerState.furtherBlankLines=void 0,d.containerState.initialBlankLine=void 0,a.attempt(b3,b,e)(c))});function e(e){return d.containerState._closeFlow=!0,d.interrupt=void 0,bg(a,a.attempt(b1,b,c),"linePrefix",d.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(e)}}},exit:function(a){a.exit(this.containerState.type)},name:"list",tokenize:function(a,b,c){let d=this,e=d.events[d.events.length-1],f=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0,g=0;return function(b){let e=d.containerState.type||(42===b||43===b||45===b?"listUnordered":"listOrdered");if("listUnordered"===e?!d.containerState.marker||b===d.containerState.marker:a7(b)){if(d.containerState.type||(d.containerState.type=e,a.enter(e,{_container:!0})),"listUnordered"===e)return a.enter("listItemPrefix"),42===b||45===b?a.check(b0,c,h)(b):h(b);if(!d.interrupt||49===b)return a.enter("listItemPrefix"),a.enter("listItemValue"),function b(e){return a7(e)&&++g<10?(a.consume(e),b):(!d.interrupt||g<2)&&(d.containerState.marker?e===d.containerState.marker:41===e||46===e)?(a.exit("listItemValue"),h(e)):c(e)}(b)}return c(b)};function h(b){return a.enter("listItemMarker"),a.consume(b),a.exit("listItemMarker"),d.containerState.marker=d.containerState.marker||b,a.check(bk,d.interrupt?c:i,a.attempt(b2,k,j))}function i(a){return d.containerState.initialBlankLine=!0,f++,k(a)}function j(b){return bc(b)?(a.enter("listItemPrefixWhitespace"),a.consume(b),a.exit("listItemPrefixWhitespace"),k):c(b)}function k(c){return d.containerState.size=f+d.sliceSerialize(a.exit("listItemPrefix"),!0).length,b(c)}}},b2={partial:!0,tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return!bc(a)&&e&&"listItemPrefixWhitespace"===e[1].type?b(a):c(a)},"listItemPrefixWhitespace",d.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},b3={partial:!0,tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return e&&"listItemIndent"===e[1].type&&e[2].sliceSerialize(e[1],!0).length===d.containerState.size?b(a):c(a)},"listItemIndent",d.containerState.size+1)}},b4={name:"setextUnderline",resolveTo:function(a,b){let c,d,e,f=a.length;for(;f--;)if("enter"===a[f][0]){if("content"===a[f][1].type){c=f;break}"paragraph"===a[f][1].type&&(d=f)}else"content"===a[f][1].type&&a.splice(f,1),e||"definition"!==a[f][1].type||(e=f);let g={type:"setextHeading",start:{...a[c][1].start},end:{...a[a.length-1][1].end}};return a[d][1].type="setextHeadingText",e?(a.splice(d,0,["enter",g,b]),a.splice(e+1,0,["exit",a[c][1],b]),a[c][1].end={...a[e][1].end}):a[c][1]=g,a.push(["exit",g,b]),a},tokenize:function(a,b,c){let d,e=this;return function(b){var g;let h,i=e.events.length;for(;i--;)if("lineEnding"!==e.events[i][1].type&&"linePrefix"!==e.events[i][1].type&&"content"!==e.events[i][1].type){h="paragraph"===e.events[i][1].type;break}return!e.parser.lazy[e.now().line]&&(e.interrupt||h)?(a.enter("setextHeadingLine"),d=b,g=b,a.enter("setextHeadingLineSequence"),function b(c){return c===d?(a.consume(c),b):(a.exit("setextHeadingLineSequence"),bc(c)?bg(a,f,"lineSuffix")(c):f(c))}(g)):c(b)};function f(d){return null===d||ba(d)?(a.exit("setextHeadingLine"),b(d)):c(d)}}};a.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(a,b,c){let d,e=this;return function(b){var d;return a.enter("definition"),d=b,bM.call(e,a,f,c,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)};function f(b){return(d=bP(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),58===b)?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),g):c(b)}function g(b){return bb(b)?bO(a,h)(b):h(b)}function h(b){return bL(a,i,c,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function i(b){return a.attempt(bQ,j,j)(b)}function j(b){return bc(b)?bg(a,k,"whitespace")(b):k(b)}function k(f){return null===f||ba(f)?(a.exit("definition"),e.parser.defined.push(d),b(f)):c(f)}}}},"disable",0,{null:[]},"document",0,{42:b1,43:b1,45:b1,48:b1,49:b1,50:b1,51:b1,52:b1,53:b1,54:b1,55:b1,56:b1,57:b1,62:bB},"flow",0,{35:{name:"headingAtx",resolve:function(a,b){let c,d,e=a.length-2,f=3;return"whitespace"===a[3][1].type&&(f+=2),e-2>f&&"whitespace"===a[e][1].type&&(e-=2),"atxHeadingSequence"===a[e][1].type&&(f===e-1||e-4>f&&"whitespace"===a[e-2][1].type)&&(e-=f+1===e?2:4),e>f&&(c={type:"atxHeadingText",start:a[f][1].start,end:a[e][1].end},d={type:"chunkText",start:a[f][1].start,end:a[e][1].end,contentType:"text"},a_(a,f,e-f+1,[["enter",c,b],["enter",d,b],["exit",d,b],["exit",c,b]])),a},tokenize:function(a,b,c){let d=0;return function(e){var f;return a.enter("atxHeading"),f=e,a.enter("atxHeadingSequence"),function e(f){return 35===f&&d++<6?(a.consume(f),e):null===f||bb(f)?(a.exit("atxHeadingSequence"),function c(d){return 35===d?(a.enter("atxHeadingSequence"),function b(d){return 35===d?(a.consume(d),b):(a.exit("atxHeadingSequence"),c(d))}(d)):null===d||ba(d)?(a.exit("atxHeading"),b(d)):bc(d)?bg(a,c,"whitespace")(d):(a.enter("atxHeadingText"),function b(d){return null===d||35===d||bb(d)?(a.exit("atxHeadingText"),c(d)):(a.consume(d),b)}(d))}(f)):c(f)}(f)}}},42:b0,45:[b4,b0],60:{concrete:!0,name:"htmlFlow",resolveTo:function(a){let b=a.length;for(;b--&&("enter"!==a[b][0]||"htmlFlow"!==a[b][1].type););return b>1&&"linePrefix"===a[b-2][1].type&&(a[b][1].start=a[b-2][1].start,a[b+1][1].start=a[b-2][1].start,a.splice(b-2,2)),a},tokenize:function(a,b,c){let d,e,f,g,h,i=this;return function(b){var c;return c=b,a.enter("htmlFlow"),a.enter("htmlFlowData"),a.consume(c),j};function j(g){return 33===g?(a.consume(g),k):47===g?(a.consume(g),e=!0,n):63===g?(a.consume(g),d=3,i.interrupt?b:G):a3(g)?(a.consume(g),f=String.fromCharCode(g),o):c(g)}function k(e){return 45===e?(a.consume(e),d=2,l):91===e?(a.consume(e),d=5,g=0,m):a3(e)?(a.consume(e),d=4,i.interrupt?b:G):c(e)}function l(d){return 45===d?(a.consume(d),i.interrupt?b:G):c(d)}function m(d){let e="CDATA[";return d===e.charCodeAt(g++)?(a.consume(d),g===e.length)?i.interrupt?b:y:m:c(d)}function n(b){return a3(b)?(a.consume(b),f=String.fromCharCode(b),o):c(b)}function o(g){if(null===g||47===g||62===g||bb(g)){let h=47===g,j=f.toLowerCase();return!h&&!e&&bS.includes(j)?(d=1,i.interrupt?b(g):y(g)):bR.includes(f.toLowerCase())?(d=6,h)?(a.consume(g),p):i.interrupt?b(g):y(g):(d=7,i.interrupt&&!i.parser.lazy[i.now().line]?c(g):e?function b(c){return bc(c)?(a.consume(c),b):w(c)}(g):q(g))}return 45===g||a4(g)?(a.consume(g),f+=String.fromCharCode(g),o):c(g)}function p(d){return 62===d?(a.consume(d),i.interrupt?b:y):c(d)}function q(b){return 47===b?(a.consume(b),w):58===b||95===b||a3(b)?(a.consume(b),r):bc(b)?(a.consume(b),q):w(b)}function r(b){return 45===b||46===b||58===b||95===b||a4(b)?(a.consume(b),r):s(b)}function s(b){return 61===b?(a.consume(b),t):bc(b)?(a.consume(b),s):q(b)}function t(b){return null===b||60===b||61===b||62===b||96===b?c(b):34===b||39===b?(a.consume(b),h=b,u):bc(b)?(a.consume(b),t):function b(c){return null===c||34===c||39===c||47===c||60===c||61===c||62===c||96===c||bb(c)?s(c):(a.consume(c),b)}(b)}function u(b){return b===h?(a.consume(b),h=null,v):null===b||ba(b)?c(b):(a.consume(b),u)}function v(a){return 47===a||62===a||bc(a)?q(a):c(a)}function w(b){return 62===b?(a.consume(b),x):c(b)}function x(b){return null===b||ba(b)?y(b):bc(b)?(a.consume(b),x):c(b)}function y(b){return 45===b&&2===d?(a.consume(b),C):60===b&&1===d?(a.consume(b),D):62===b&&4===d?(a.consume(b),H):63===b&&3===d?(a.consume(b),G):93===b&&5===d?(a.consume(b),F):ba(b)&&(6===d||7===d)?(a.exit("htmlFlowData"),a.check(bT,I,z)(b)):null===b||ba(b)?(a.exit("htmlFlowData"),z(b)):(a.consume(b),y)}function z(b){return a.check(bU,A,I)(b)}function A(b){return a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),B}function B(b){return null===b||ba(b)?z(b):(a.enter("htmlFlowData"),y(b))}function C(b){return 45===b?(a.consume(b),G):y(b)}function D(b){return 47===b?(a.consume(b),f="",E):y(b)}function E(b){if(62===b){let c=f.toLowerCase();return bS.includes(c)?(a.consume(b),H):y(b)}return a3(b)&&f.length<8?(a.consume(b),f+=String.fromCharCode(b),E):y(b)}function F(b){return 93===b?(a.consume(b),G):y(b)}function G(b){return 62===b?(a.consume(b),H):45===b&&2===d?(a.consume(b),G):y(b)}function H(b){return null===b||ba(b)?(a.exit("htmlFlowData"),I(b)):(a.consume(b),H)}function I(c){return a.exit("htmlFlow"),b(c)}}},61:b4,95:b0,96:bI,126:bI},"flowInitial",0,{[-2]:bJ,[-1]:bJ,32:bJ},"insideSpan",0,{null:[bz,br]},"string",0,{38:bG,92:bC},"text",0,{[-5]:b_,[-4]:b_,[-3]:b_,33:bZ,38:bG,42:bz,60:[{name:"autolink",tokenize:function(a,b,c){let d=0;return function(b){return a.enter("autolink"),a.enter("autolinkMarker"),a.consume(b),a.exit("autolinkMarker"),a.enter("autolinkProtocol"),e};function e(b){return a3(b)?(a.consume(b),f):64===b?c(b):h(b)}function f(b){return 43===b||45===b||46===b||a4(b)?(d=1,function b(c){return 58===c?(a.consume(c),d=0,g):(43===c||45===c||46===c||a4(c))&&d++<32?(a.consume(c),b):(d=0,h(c))}(b)):h(b)}function g(d){return 62===d?(a.exit("autolinkProtocol"),a.enter("autolinkMarker"),a.consume(d),a.exit("autolinkMarker"),a.exit("autolink"),b):null===d||32===d||60===d||a6(d)?c(d):(a.consume(d),g)}function h(b){return 64===b?(a.consume(b),i):a5(b)?(a.consume(b),h):c(b)}function i(e){return a4(e)?function e(f){return 46===f?(a.consume(f),d=0,i):62===f?(a.exit("autolinkProtocol").type="autolinkEmail",a.enter("autolinkMarker"),a.consume(f),a.exit("autolinkMarker"),a.exit("autolink"),b):function b(f){if((45===f||a4(f))&&d++<63){let c=45===f?b:e;return a.consume(f),c}return c(f)}(f)}(e):c(e)}}},{name:"htmlText",tokenize:function(a,b,c){let d,e,f,g=this;return function(b){return a.enter("htmlText"),a.enter("htmlTextData"),a.consume(b),h};function h(b){return 33===b?(a.consume(b),i):47===b?(a.consume(b),u):63===b?(a.consume(b),s):a3(b)?(a.consume(b),w):c(b)}function i(b){return 45===b?(a.consume(b),j):91===b?(a.consume(b),e=0,n):a3(b)?(a.consume(b),r):c(b)}function j(b){return 45===b?(a.consume(b),m):c(b)}function k(b){return null===b?c(b):45===b?(a.consume(b),l):ba(b)?(f=k,E(b)):(a.consume(b),k)}function l(b){return 45===b?(a.consume(b),m):k(b)}function m(a){return 62===a?D(a):45===a?l(a):k(a)}function n(b){let d="CDATA[";return b===d.charCodeAt(e++)?(a.consume(b),e===d.length?o:n):c(b)}function o(b){return null===b?c(b):93===b?(a.consume(b),p):ba(b)?(f=o,E(b)):(a.consume(b),o)}function p(b){return 93===b?(a.consume(b),q):o(b)}function q(b){return 62===b?D(b):93===b?(a.consume(b),q):o(b)}function r(b){return null===b||62===b?D(b):ba(b)?(f=r,E(b)):(a.consume(b),r)}function s(b){return null===b?c(b):63===b?(a.consume(b),t):ba(b)?(f=s,E(b)):(a.consume(b),s)}function t(a){return 62===a?D(a):s(a)}function u(b){return a3(b)?(a.consume(b),v):c(b)}function v(b){return 45===b||a4(b)?(a.consume(b),v):function b(c){return ba(c)?(f=b,E(c)):bc(c)?(a.consume(c),b):D(c)}(b)}function w(b){return 45===b||a4(b)?(a.consume(b),w):47===b||62===b||bb(b)?x(b):c(b)}function x(b){return 47===b?(a.consume(b),D):58===b||95===b||a3(b)?(a.consume(b),y):ba(b)?(f=x,E(b)):bc(b)?(a.consume(b),x):D(b)}function y(b){return 45===b||46===b||58===b||95===b||a4(b)?(a.consume(b),y):function b(c){return 61===c?(a.consume(c),z):ba(c)?(f=b,E(c)):bc(c)?(a.consume(c),b):x(c)}(b)}function z(b){return null===b||60===b||61===b||62===b||96===b?c(b):34===b||39===b?(a.consume(b),d=b,A):ba(b)?(f=z,E(b)):bc(b)?(a.consume(b),z):(a.consume(b),B)}function A(b){return b===d?(a.consume(b),d=void 0,C):null===b?c(b):ba(b)?(f=A,E(b)):(a.consume(b),A)}function B(b){return null===b||34===b||39===b||60===b||61===b||96===b?c(b):47===b||62===b||bb(b)?x(b):(a.consume(b),B)}function C(a){return 47===a||62===a||bb(a)?x(a):c(a)}function D(d){return 62===d?(a.consume(d),a.exit("htmlTextData"),a.exit("htmlText"),b):c(d)}function E(b){return a.exit("htmlTextData"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),F}function F(b){return bc(b)?bg(a,G,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):G(b)}function G(b){return a.enter("htmlTextData"),f(b)}}}],91:b$,92:[{name:"hardBreakEscape",tokenize:function(a,b,c){return function(b){return a.enter("hardBreakEscape"),a.consume(b),d};function d(d){return ba(d)?(a.exit("hardBreakEscape"),b(d)):c(d)}}},bC],93:bV,95:bz,96:{name:"codeText",previous:function(a){return 96!==a||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(a){let b,c,d=a.length-4,e=3;if(("lineEnding"===a[3][1].type||"space"===a[e][1].type)&&("lineEnding"===a[d][1].type||"space"===a[d][1].type)){for(b=e;++b<d;)if("codeTextData"===a[b][1].type){a[e][1].type="codeTextPadding",a[d][1].type="codeTextPadding",e+=2,d-=2;break}}for(b=e-1,d++;++b<=d;)void 0===c?b!==d&&"lineEnding"!==a[b][1].type&&(c=b):(b===d||"lineEnding"===a[b][1].type)&&(a[c][1].type="codeTextData",b!==c+2&&(a[c][1].end=a[b-1][1].end,a.splice(c+2,b-c-2),d-=b-c-2,b=c+2),c=void 0);return a},tokenize:function(a,b,c){let d,e,f=0;return function(b){return a.enter("codeText"),a.enter("codeTextSequence"),function b(c){return 96===c?(a.consume(c),f++,b):(a.exit("codeTextSequence"),g(c))}(b)};function g(i){return null===i?c(i):32===i?(a.enter("space"),a.consume(i),a.exit("space"),g):96===i?(e=a.enter("codeTextSequence"),d=0,function c(g){return 96===g?(a.consume(g),d++,c):d===f?(a.exit("codeTextSequence"),a.exit("codeText"),b(g)):(e.type="codeTextData",h(g))}(i)):ba(i)?(a.enter("lineEnding"),a.consume(i),a.exit("lineEnding"),g):(a.enter("codeTextData"),h(i))}function h(b){return null===b||32===b||96===b||ba(b)?(a.exit("codeTextData"),g(b)):(a.consume(b),h)}}}}],31051);var b5=a.i(31051);let b6=/[\0\t\n\r]/g;function b7(a,b){let c=Number.parseInt(a,b);return c<9||11===c||c>13&&c<32||c>126&&c<160||c>55295&&c<57344||c>64975&&c<65008||(65535&c)==65535||(65535&c)==65534||c>1114111?"�":String.fromCodePoint(c)}let b8=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function b9(a,b,c){if(b)return b;if(35===c.charCodeAt(0)){let a=c.charCodeAt(1),b=120===a||88===a;return b7(c.slice(b?2:1),b?16:10)}return bF(c)||a}let ca={}.hasOwnProperty;function cb(a){return{line:a.line,column:a.column,offset:a.offset}}function cc(a,b){if(a)throw Error("Cannot close `"+a.type+"` ("+aE({start:a.start,end:a.end})+"): a different token (`"+b.type+"`, "+aE({start:b.start,end:b.end})+") is open");throw Error("Cannot close document, a token (`"+b.type+"`, "+aE({start:b.start,end:b.end})+") is still open")}function cd(a){let b=this;b.parser=function(c){var d,e;let f,g,h,i;return"string"!=typeof(d={...b.data("settings"),...a,extensions:b.data("micromarkExtensions")||[],mdastExtensions:b.data("fromMarkdownExtensions")||[]})&&(e=d,d=void 0),(function(a){let b={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:d(r),autolinkProtocol:j,autolinkEmail:j,atxHeading:d(o),blockQuote:d(function(){return{type:"blockquote",children:[]}}),characterEscape:j,characterReference:j,codeFenced:d(n),codeFencedFenceInfo:e,codeFencedFenceMeta:e,codeIndented:d(n,e),codeText:d(function(){return{type:"inlineCode",value:""}},e),codeTextData:j,data:j,codeFlowValue:j,definition:d(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:e,definitionLabelString:e,definitionTitleString:e,emphasis:d(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:d(p),hardBreakTrailing:d(p),htmlFlow:d(q,e),htmlFlowData:j,htmlText:d(q,e),htmlTextData:j,image:d(function(){return{type:"image",title:null,url:"",alt:null}}),label:e,link:d(r),listItem:d(function(a){return{type:"listItem",spread:a._spread,checked:null,children:[]}}),listItemValue:function(a){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(a),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:d(s,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:d(s),paragraph:d(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:e,resourceDestinationString:e,resourceTitleString:e,setextHeading:d(o),strong:d(function(){return{type:"strong",children:[]}}),thematicBreak:d(function(){return{type:"thematicBreak"}})},exit:{atxHeading:g(),atxHeadingSequence:function(a){let b=this.stack[this.stack.length-1];b.depth||(b.depth=this.sliceSerialize(a).length)},autolink:g(),autolinkEmail:function(a){k.call(this,a),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(a)},autolinkProtocol:function(a){k.call(this,a),this.stack[this.stack.length-1].url=this.sliceSerialize(a)},blockQuote:g(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:m,characterReferenceMarkerNumeric:m,characterReferenceValue:function(a){let b,c=this.sliceSerialize(a),d=this.data.characterReferenceType;d?(b=b7(c,"characterReferenceMarkerNumeric"===d?10:16),this.data.characterReferenceType=void 0):b=bF(c);let e=this.stack[this.stack.length-1];e.value+=b},characterReference:function(a){this.stack.pop().position.end=cb(a.end)},codeFenced:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let a=this.resume();this.stack[this.stack.length-1].lang=a},codeFencedFenceMeta:function(){let a=this.resume();this.stack[this.stack.length-1].meta=a},codeFlowValue:k,codeIndented:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a.replace(/(\r?\n|\r)$/g,"")}),codeText:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),codeTextData:k,data:k,definition:g(),definitionDestinationString:function(){let a=this.resume();this.stack[this.stack.length-1].url=a},definitionLabelString:function(a){let b=this.resume(),c=this.stack[this.stack.length-1];c.label=b,c.identifier=bP(this.sliceSerialize(a)).toLowerCase()},definitionTitleString:function(){let a=this.resume();this.stack[this.stack.length-1].title=a},emphasis:g(),hardBreakEscape:g(l),hardBreakTrailing:g(l),htmlFlow:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),htmlFlowData:k,htmlText:g(function(){let a=this.resume();this.stack[this.stack.length-1].value=a}),htmlTextData:k,image:g(function(){let a=this.stack[this.stack.length-1];if(this.data.inReference){let b=this.data.referenceType||"shortcut";a.type+="Reference",a.referenceType=b,delete a.url,delete a.title}else delete a.identifier,delete a.label;this.data.referenceType=void 0}),label:function(){let a=this.stack[this.stack.length-1],b=this.resume(),c=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===c.type?c.children=a.children:c.alt=b},labelText:function(a){let b=this.sliceSerialize(a),c=this.stack[this.stack.length-2];c.label=b.replace(b8,b9),c.identifier=bP(b).toLowerCase()},lineEnding:function(a){let c=this.stack[this.stack.length-1];if(this.data.atHardBreak){c.children[c.children.length-1].position.end=cb(a.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&b.canContainEols.includes(c.type)&&(j.call(this,a),k.call(this,a))},link:g(function(){let a=this.stack[this.stack.length-1];if(this.data.inReference){let b=this.data.referenceType||"shortcut";a.type+="Reference",a.referenceType=b,delete a.url,delete a.title}else delete a.identifier,delete a.label;this.data.referenceType=void 0}),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:function(a){let b=this.resume(),c=this.stack[this.stack.length-1];c.label=b,c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let a=this.resume();this.stack[this.stack.length-1].url=a},resourceTitleString:function(){let a=this.resume();this.stack[this.stack.length-1].title=a},resource:function(){this.data.inReference=void 0},setextHeading:g(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(a){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(a).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:g(),thematicBreak:g()}};!function a(b,c){let d=-1;for(;++d<c.length;){let e=c[d];Array.isArray(e)?a(b,e):function(a,b){let c;for(c in b)if(ca.call(b,c))switch(c){case"canContainEols":{let d=b[c];d&&a[c].push(...d);break}case"transforms":{let d=b[c];d&&a[c].push(...d);break}case"enter":case"exit":{let d=b[c];d&&Object.assign(a[c],d)}}}(b,e)}}(b,(a||{}).mdastExtensions||[]);let c={};return function(a){let d={type:"root",children:[]},g={stack:[d],tokenStack:[],config:b,enter:f,exit:h,buffer:e,resume:i,data:c},j=[],k=-1;for(;++k<a.length;)("listOrdered"===a[k][1].type||"listUnordered"===a[k][1].type)&&("enter"===a[k][0]?j.push(k):k=function(a,b,c){let d,e,f,g,h=b-1,i=-1,j=!1;for(;++h<=c;){let b=a[h];switch(b[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===b[0]?i++:i--,g=void 0;break;case"lineEndingBlank":"enter"===b[0]&&(!d||g||i||f||(f=h),g=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:g=void 0}if(!i&&"enter"===b[0]&&"listItemPrefix"===b[1].type||-1===i&&"exit"===b[0]&&("listUnordered"===b[1].type||"listOrdered"===b[1].type)){if(d){let g=h;for(e=void 0;g--;){let b=a[g];if("lineEnding"===b[1].type||"lineEndingBlank"===b[1].type){if("exit"===b[0])continue;e&&(a[e][1].type="lineEndingBlank",j=!0),b[1].type="lineEnding",e=g}else if("linePrefix"===b[1].type||"blockQuotePrefix"===b[1].type||"blockQuotePrefixWhitespace"===b[1].type||"blockQuoteMarker"===b[1].type||"listItemIndent"===b[1].type);else break}f&&(!e||f<e)&&(d._spread=!0),d.end=Object.assign({},e?a[e][1].start:b[1].end),a.splice(e||h,0,["exit",d,b[2]]),h++,c++}if("listItemPrefix"===b[1].type){let e={type:"listItem",_spread:!1,start:Object.assign({},b[1].start),end:void 0};d=e,a.splice(h,0,["enter",e,b[2]]),h++,c++,f=void 0,g=!0}}}return a[b][1]._spread=j,c}(a,j.pop(),k));for(k=-1;++k<a.length;){let c=b[a[k][0]];ca.call(c,a[k][1].type)&&c[a[k][1].type].call(Object.assign({sliceSerialize:a[k][2].sliceSerialize},g),a[k][1])}if(g.tokenStack.length>0){let a=g.tokenStack[g.tokenStack.length-1];(a[1]||cc).call(g,void 0,a[0])}for(d.position={start:cb(a.length>0?a[0][1].start:{line:1,column:1,offset:0}),end:cb(a.length>0?a[a.length-2][1].end:{line:1,column:1,offset:0})},k=-1;++k<b.transforms.length;)d=b.transforms[k](d)||d;return d};function d(a,b){return function(c){f.call(this,a(c),c),b&&b.call(this,c)}}function e(){this.stack.push({type:"fragment",children:[]})}function f(a,b,c){this.stack[this.stack.length-1].children.push(a),this.stack.push(a),this.tokenStack.push([b,c||void 0]),a.position={start:cb(b.start),end:void 0}}function g(a){return function(b){a&&a.call(this,b),h.call(this,b)}}function h(a,b){let c=this.stack.pop(),d=this.tokenStack.pop();if(d)d[0].type!==a.type&&(b?b.call(this,a,d[0]):(d[1]||cc).call(this,a,d[0]));else throw Error("Cannot close `"+a.type+"` ("+aE({start:a.start,end:a.end})+"): it’s not open");c.position.end=cb(a.end)}function i(){return aY(this.stack.pop())}function j(a){let b=this.stack[this.stack.length-1].children,c=b[b.length-1];c&&"text"===c.type||((c={type:"text",value:""}).position={start:cb(a.start),end:void 0},b.push(c)),this.stack.push(c)}function k(a){let b=this.stack.pop();b.value+=this.sliceSerialize(a),b.position.end=cb(a.end)}function l(){this.data.atHardBreak=!0}function m(a){this.data.characterReferenceType=a.type}function n(){return{type:"code",lang:null,meta:null,value:""}}function o(){return{type:"heading",depth:0,children:[]}}function p(){return{type:"break"}}function q(){return{type:"html",value:""}}function r(){return{type:"link",title:null,url:"",children:[]}}function s(a){return{type:"list",ordered:"listOrdered"===a.type,start:null,spread:a._spread,children:[]}}})(e)(function(a){for(;!bn(a););return a}((function(a){let b={constructs:a2([b5,...(a||{}).extensions||[]]),content:c(bh),defined:[],document:c(bi),flow:c(bq),lazy:{},string:c(bs),text:c(bt)};return b;function c(a){return function(c){return function(a,b,c){let d={_bufferIndex:-1,_index:0,line:c&&c.line||1,column:c&&c.column||1,offset:c&&c.offset||0},e={},f=[],g=[],h=[],i={attempt:o(function(a,b){p(a,b.from)}),check:o(n),consume:function(a){ba(a)?(d.line++,d.column=1,d.offset+=-3===a?2:1,q()):-1!==a&&(d.column++,d.offset++),d._bufferIndex<0?d._index++:(d._bufferIndex++,d._bufferIndex===g[d._index].length&&(d._bufferIndex=-1,d._index++)),j.previous=a},enter:function(a,b){let c=b||{};return c.type=a,c.start=m(),j.events.push(["enter",c,j]),h.push(c),c},exit:function(a){let b=h.pop();return b.end=m(),j.events.push(["exit",b,j]),b},interrupt:o(n,{interrupt:!0})},j={code:null,containerState:{},defineSkip:function(a){e[a.line]=a.column,q()},events:[],now:m,parser:a,previous:null,sliceSerialize:function(a,b){return function(a,b){let c,d=-1,e=[];for(;++d<a.length;){let f,g=a[d];if("string"==typeof g)f=g;else switch(g){case -5:f="\r";break;case -4:f="\n";break;case -3:f="\r\n";break;case -2:f=b?" ":" ";break;case -1:if(!b&&c)continue;f=" ";break;default:f=String.fromCharCode(g)}c=-2===g,e.push(f)}return e.join("")}(l(a),b)},sliceStream:l,write:function(a){return(g=a0(g,a),function(){let a;for(;d._index<g.length;){let c=g[d._index];if("string"==typeof c)for(a=d._index,d._bufferIndex<0&&(d._bufferIndex=0);d._index===a&&d._bufferIndex<c.length;){var b;b=c.charCodeAt(d._bufferIndex),k=k(b)}else k=k(c)}}(),null!==g[g.length-1])?[]:(p(b,0),j.events=by(f,j.events,j),j.events)}},k=b.tokenize.call(j,i);return b.resolveAll&&f.push(b),j;function l(a){return function(a,b){let c,d=b.start._index,e=b.start._bufferIndex,f=b.end._index,g=b.end._bufferIndex;if(d===f)c=[a[d].slice(e,g)];else{if(c=a.slice(d,f),e>-1){let a=c[0];"string"==typeof a?c[0]=a.slice(e):c.shift()}g>0&&c.push(a[f].slice(0,g))}return c}(g,a)}function m(){let{_bufferIndex:a,_index:b,line:c,column:e,offset:f}=d;return{_bufferIndex:a,_index:b,line:c,column:e,offset:f}}function n(a,b){b.restore()}function o(a,b){return function(c,e,f){var g;let k,l,n,o;return Array.isArray(c)?p(c):"tokenize"in c?p([c]):(g=c,function(a){let b=null!==a&&g[a],c=null!==a&&g.null;return p([...Array.isArray(b)?b:b?[b]:[],...Array.isArray(c)?c:c?[c]:[]])(a)});function p(a){return(k=a,l=0,0===a.length)?f:r(a[l])}function r(a){return function(c){let e,f,g,k,l;return(e=m(),f=j.previous,g=j.currentConstruct,k=j.events.length,l=Array.from(h),o={from:k,restore:function(){d=e,j.previous=f,j.currentConstruct=g,j.events.length=k,h=l,q()}},n=a,a.partial||(j.currentConstruct=a),a.name&&j.parser.constructs.disable.null.includes(a.name))?t(c):a.tokenize.call(b?Object.assign(Object.create(j),b):j,i,s,t)(c)}}function s(b){return a(n,o),e}function t(a){return(o.restore(),++l<k.length)?r(k[l]):f}}}function p(a,b){a.resolveAll&&!f.includes(a)&&f.push(a),a.resolve&&a_(j.events,b,j.events.length-b,a.resolve(j.events.slice(b),j)),a.resolveTo&&(j.events=a.resolveTo(j.events,j))}function q(){d.line in e&&d.column<2&&(d.column=e[d.line],d.offset+=e[d.line]-1)}}(b,a,c)}}})(e).document().write((g=1,h="",i=!0,function(a,b,c){let d,e,j,k,l,m=[];for(a=h+("string"==typeof a?a.toString():new TextDecoder(b||void 0).decode(a)),j=0,h="",i&&(65279===a.charCodeAt(0)&&j++,i=void 0);j<a.length;){if(b6.lastIndex=j,k=(d=b6.exec(a))&&void 0!==d.index?d.index:a.length,l=a.charCodeAt(k),!d){h=a.slice(j);break}if(10===l&&j===k&&f)m.push(-3),f=void 0;else switch(f&&(m.push(-5),f=void 0),j<k&&(m.push(a.slice(j,k)),g+=k-j),l){case 0:m.push(65533),g++;break;case 9:for(e=4*Math.ceil(g/4),m.push(-2);g++<e;)m.push(-1);break;case 10:m.push(-4),g=1;break;default:f=!0,g=1}j=k+1}return c&&(f&&m.push(-5),h&&m.push(h),m.push(null)),m})(c,d,!0))))}}let ce="object"==typeof self?self:globalThis,cf=a=>{var b;let c,d;return(b=new Map,c=(a,c)=>(b.set(c,a),a),d=e=>{if(b.has(e))return b.get(e);let[f,g]=a[e];switch(f){case 0:case -1:return c(g,e);case 1:{let a=c([],e);for(let b of g)a.push(d(b));return a}case 2:{let a=c({},e);for(let[b,c]of g)a[d(b)]=d(c);return a}case 3:return c(new Date(g),e);case 4:{let{source:a,flags:b}=g;return c(new RegExp(a,b),e)}case 5:{let a=c(new Map,e);for(let[b,c]of g)a.set(d(b),d(c));return a}case 6:{let a=c(new Set,e);for(let b of g)a.add(d(b));return a}case 7:{let{name:a,message:b}=g;return c(new ce[a](b),e)}case 8:return c(BigInt(g),e);case"BigInt":return c(Object(BigInt(g)),e);case"ArrayBuffer":return c(new Uint8Array(g).buffer,g);case"DataView":{let{buffer:a}=new Uint8Array(g);return c(new DataView(a),g)}}return c(new ce[f](g),e)})(0)},{toString:cg}={},{keys:ch}=Object,ci=a=>{let b=typeof a;if("object"!==b||!a)return[0,b];let c=cg.call(a).slice(8,-1);switch(c){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,c]}return c.includes("Array")?[1,c]:c.includes("Error")?[7,c]:[2,c]},cj=([a,b])=>0===a&&("function"===b||"symbol"===b),ck=(a,{json:b,lossy:c}={})=>{var d,e,f;let g,h,i=[];return(d=!(b||c),e=!!b,f=new Map,g=(a,b)=>{let c=i.push(a)-1;return f.set(b,c),c},h=a=>{if(f.has(a))return f.get(a);let[b,c]=ci(a);switch(b){case 0:{let e=a;switch(c){case"bigint":b=8,e=a.toString();break;case"function":case"symbol":if(d)throw TypeError("unable to serialize "+c);e=null;break;case"undefined":return g([-1],a)}return g([b,e],a)}case 1:{if(c){let b=a;return"DataView"===c?b=new Uint8Array(a.buffer):"ArrayBuffer"===c&&(b=new Uint8Array(a)),g([c,[...b]],a)}let d=[],e=g([b,d],a);for(let b of a)d.push(h(b));return e}case 2:{if(c)switch(c){case"BigInt":return g([c,a.toString()],a);case"Boolean":case"Number":case"String":return g([c,a.valueOf()],a)}if(e&&"toJSON"in a)return h(a.toJSON());let f=[],i=g([b,f],a);for(let b of ch(a))(d||!cj(ci(a[b])))&&f.push([h(b),h(a[b])]);return i}case 3:return g([b,a.toISOString()],a);case 4:{let{source:c,flags:d}=a;return g([b,{source:c,flags:d}],a)}case 5:{let c=[],e=g([b,c],a);for(let[b,e]of a)(d||!(cj(ci(b))||cj(ci(e))))&&c.push([h(b),h(e)]);return e}case 6:{let c=[],e=g([b,c],a);for(let b of a)(d||!cj(ci(b)))&&c.push(h(b));return e}}let{message:i}=a;return g([b,{name:c,message:i}],a)})(a),i},cl="function"==typeof structuredClone?(a,b)=>b&&("json"in b||"lossy"in b)?cf(ck(a,b)):structuredClone(a):(a,b)=>cf(ck(a,b));function cm(a){let b=[],c=-1,d=0,e=0;for(;++c<a.length;){let f=a.charCodeAt(c),g="";if(37===f&&a4(a.charCodeAt(c+1))&&a4(a.charCodeAt(c+2)))e=2;else if(f<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(f))||(g=String.fromCharCode(f));else if(f>55295&&f<57344){let b=a.charCodeAt(c+1);f<56320&&b>56319&&b<57344?(g=String.fromCharCode(f,b),e=1):g="�"}else g=String.fromCharCode(f);g&&(b.push(a.slice(d,c),encodeURIComponent(g)),d=c+e+1,g=""),e&&(c+=e,e=0)}return b.join("")+a.slice(d)}function cn(a,b){let c=[{type:"text",value:"↩"}];return b>1&&c.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(b)}]}),c}function co(a,b){return"Back to reference "+(a+1)+(b>1?"-"+b:"")}let cp=function(a){var b,c;if(null==a)return cr;if("function"==typeof a)return cq(a);if("object"==typeof a){return Array.isArray(a)?function(a){let b=[],c=-1;for(;++c<a.length;)b[c]=cp(a[c]);return cq(function(...a){let c=-1;for(;++c<b.length;)if(b[c].apply(this,a))return!0;return!1})}(a):(b=a,cq(function(a){let c;for(c in b)if(a[c]!==b[c])return!1;return!0}))}if("string"==typeof a){return c=a,cq(function(a){return a&&a.type===c})}throw Error("Expected function, string, or object as test")};function cq(a){return function(b,c,d){return!!(function(a){return null!==a&&"object"==typeof a&&"type"in a}(b)&&a.call(this,b,"number"==typeof c?c:void 0,d||void 0))}}function cr(){return!0}let cs=[];function ct(a,b,c,d){let e;"function"==typeof b&&"function"!=typeof c?(d=c,c=b):e=b;let f=cp(e),g=d?-1:1;(function a(e,h,i){let j=e&&"object"==typeof e?e:{};if("string"==typeof j.type){let a="string"==typeof j.tagName?j.tagName:"string"==typeof j.name?j.name:void 0;Object.defineProperty(k,"name",{value:"node (\x1b[33m"+e.type+(a?"<"+a+">":"")+"\x1b[39m)"})}return k;function k(){var j;let k,l,m,n=cs;if((!b||f(e,h,i[i.length-1]||void 0))&&!1===(n=Array.isArray(j=c(e,i))?j:"number"==typeof j?[!0,j]:null==j?cs:[j])[0])return n;if("children"in e&&e.children&&e.children&&"skip"!==n[0])for(l=(d?e.children.length:-1)+g,m=i.concat(e);l>-1&&l<e.children.length;){if(!1===(k=a(e.children[l],l,m)())[0])return k;l="number"==typeof k[1]?k[1]:l+g}return n}})(a,void 0,[])()}function cu(a,b,c,d){let e,f,g;"function"==typeof b&&"function"!=typeof c?(f=void 0,g=b,e=c):(f=b,g=c,e=d),ct(a,f,function(a,b){let c=b[b.length-1],d=c?c.children.indexOf(a):void 0;return g(a,d,c)},e)}function cv(a,b){let c=b.referenceType,d="]";if("collapsed"===c?d+="[]":"full"===c&&(d+="["+(b.label||b.identifier)+"]"),"imageReference"===b.type)return[{type:"text",value:"!["+b.alt+d}];let e=a.all(b),f=e[0];f&&"text"===f.type?f.value="["+f.value:e.unshift({type:"text",value:"["});let g=e[e.length-1];return g&&"text"===g.type?g.value+=d:e.push({type:"text",value:d}),e}function cw(a){let b=a.spread;return null==b?a.children.length>1:b}function cx(a,b,c){let d=0,e=a.length;if(b){let b=a.codePointAt(d);for(;9===b||32===b;)d++,b=a.codePointAt(d)}if(c){let b=a.codePointAt(e-1);for(;9===b||32===b;)e--,b=a.codePointAt(e-1)}return e>d?a.slice(d,e):""}let cy={blockquote:function(a,b){let c={type:"element",tagName:"blockquote",properties:{},children:a.wrap(a.all(b),!0)};return a.patch(b,c),a.applyData(b,c)},break:function(a,b){let c={type:"element",tagName:"br",properties:{},children:[]};return a.patch(b,c),[a.applyData(b,c),{type:"text",value:"\n"}]},code:function(a,b){let c=b.value?b.value+"\n":"",d={},e=b.lang?b.lang.split(/\s+/):[];e.length>0&&(d.className=["language-"+e[0]]);let f={type:"element",tagName:"code",properties:d,children:[{type:"text",value:c}]};return b.meta&&(f.data={meta:b.meta}),a.patch(b,f),f={type:"element",tagName:"pre",properties:{},children:[f=a.applyData(b,f)]},a.patch(b,f),f},delete:function(a,b){let c={type:"element",tagName:"del",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},emphasis:function(a,b){let c={type:"element",tagName:"em",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},footnoteReference:function(a,b){let c,d="string"==typeof a.options.clobberPrefix?a.options.clobberPrefix:"user-content-",e=String(b.identifier).toUpperCase(),f=cm(e.toLowerCase()),g=a.footnoteOrder.indexOf(e),h=a.footnoteCounts.get(e);void 0===h?(h=0,a.footnoteOrder.push(e),c=a.footnoteOrder.length):c=g+1,h+=1,a.footnoteCounts.set(e,h);let i={type:"element",tagName:"a",properties:{href:"#"+d+"fn-"+f,id:d+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};a.patch(b,i);let j={type:"element",tagName:"sup",properties:{},children:[i]};return a.patch(b,j),a.applyData(b,j)},heading:function(a,b){let c={type:"element",tagName:"h"+b.depth,properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},html:function(a,b){if(a.options.allowDangerousHtml){let c={type:"raw",value:b.value};return a.patch(b,c),a.applyData(b,c)}},imageReference:function(a,b){let c=String(b.identifier).toUpperCase(),d=a.definitionById.get(c);if(!d)return cv(a,b);let e={src:cm(d.url||""),alt:b.alt};null!==d.title&&void 0!==d.title&&(e.title=d.title);let f={type:"element",tagName:"img",properties:e,children:[]};return a.patch(b,f),a.applyData(b,f)},image:function(a,b){let c={src:cm(b.url)};null!==b.alt&&void 0!==b.alt&&(c.alt=b.alt),null!==b.title&&void 0!==b.title&&(c.title=b.title);let d={type:"element",tagName:"img",properties:c,children:[]};return a.patch(b,d),a.applyData(b,d)},inlineCode:function(a,b){let c={type:"text",value:b.value.replace(/\r?\n|\r/g," ")};a.patch(b,c);let d={type:"element",tagName:"code",properties:{},children:[c]};return a.patch(b,d),a.applyData(b,d)},linkReference:function(a,b){let c=String(b.identifier).toUpperCase(),d=a.definitionById.get(c);if(!d)return cv(a,b);let e={href:cm(d.url||"")};null!==d.title&&void 0!==d.title&&(e.title=d.title);let f={type:"element",tagName:"a",properties:e,children:a.all(b)};return a.patch(b,f),a.applyData(b,f)},link:function(a,b){let c={href:cm(b.url)};null!==b.title&&void 0!==b.title&&(c.title=b.title);let d={type:"element",tagName:"a",properties:c,children:a.all(b)};return a.patch(b,d),a.applyData(b,d)},listItem:function(a,b,c){let d=a.all(b),e=c?function(a){let b=!1;if("list"===a.type){b=a.spread||!1;let c=a.children,d=-1;for(;!b&&++d<c.length;)b=cw(c[d])}return b}(c):cw(b),f={},g=[];if("boolean"==typeof b.checked){let a,c=d[0];c&&"element"===c.type&&"p"===c.tagName?a=c:(a={type:"element",tagName:"p",properties:{},children:[]},d.unshift(a)),a.children.length>0&&a.children.unshift({type:"text",value:" "}),a.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:b.checked,disabled:!0},children:[]}),f.className=["task-list-item"]}let h=-1;for(;++h<d.length;){let a=d[h];(e||0!==h||"element"!==a.type||"p"!==a.tagName)&&g.push({type:"text",value:"\n"}),"element"!==a.type||"p"!==a.tagName||e?g.push(a):g.push(...a.children)}let i=d[d.length-1];i&&(e||"element"!==i.type||"p"!==i.tagName)&&g.push({type:"text",value:"\n"});let j={type:"element",tagName:"li",properties:f,children:g};return a.patch(b,j),a.applyData(b,j)},list:function(a,b){let c={},d=a.all(b),e=-1;for("number"==typeof b.start&&1!==b.start&&(c.start=b.start);++e<d.length;){let a=d[e];if("element"===a.type&&"li"===a.tagName&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){c.className=["contains-task-list"];break}}let f={type:"element",tagName:b.ordered?"ol":"ul",properties:c,children:a.wrap(d,!0)};return a.patch(b,f),a.applyData(b,f)},paragraph:function(a,b){let c={type:"element",tagName:"p",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},root:function(a,b){let c={type:"root",children:a.wrap(a.all(b))};return a.patch(b,c),a.applyData(b,c)},strong:function(a,b){let c={type:"element",tagName:"strong",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},table:function(a,b){let c=a.all(b),d=c.shift(),e=[];if(d){let c={type:"element",tagName:"thead",properties:{},children:a.wrap([d],!0)};a.patch(b.children[0],c),e.push(c)}if(c.length>0){let d={type:"element",tagName:"tbody",properties:{},children:a.wrap(c,!0)},f=aC(b.children[1]),g=aB(b.children[b.children.length-1]);f&&g&&(d.position={start:f,end:g}),e.push(d)}let f={type:"element",tagName:"table",properties:{},children:a.wrap(e,!0)};return a.patch(b,f),a.applyData(b,f)},tableCell:function(a,b){let c={type:"element",tagName:"td",properties:{},children:a.all(b)};return a.patch(b,c),a.applyData(b,c)},tableRow:function(a,b,c){let d=c?c.children:void 0,e=0===(d?d.indexOf(b):1)?"th":"td",f=c&&"table"===c.type?c.align:void 0,g=f?f.length:b.children.length,h=-1,i=[];for(;++h<g;){let c=b.children[h],d={},g=f?f[h]:void 0;g&&(d.align=g);let j={type:"element",tagName:e,properties:d,children:[]};c&&(j.children=a.all(c),a.patch(c,j),j=a.applyData(c,j)),i.push(j)}let j={type:"element",tagName:"tr",properties:{},children:a.wrap(i,!0)};return a.patch(b,j),a.applyData(b,j)},text:function(a,b){let c={type:"text",value:function(a){let b=String(a),c=/\r?\n|\r/g,d=c.exec(b),e=0,f=[];for(;d;)f.push(cx(b.slice(e,d.index),e>0,!0),d[0]),e=d.index+d[0].length,d=c.exec(b);return f.push(cx(b.slice(e),e>0,!1)),f.join("")}(String(b.value))};return a.patch(b,c),a.applyData(b,c)},thematicBreak:function(a,b){let c={type:"element",tagName:"hr",properties:{},children:[]};return a.patch(b,c),a.applyData(b,c)},toml:cz,yaml:cz,definition:cz,footnoteDefinition:cz};function cz(){}let cA={}.hasOwnProperty,cB={};function cC(a,b){a.position&&(b.position=function(a){let b=aC(a),c=aB(a);if(b&&c)return{start:b,end:c}}(a))}function cD(a,b){let c=b;if(a&&a.data){let b=a.data.hName,d=a.data.hChildren,e=a.data.hProperties;"string"==typeof b&&("element"===c.type?c.tagName=b:c={type:"element",tagName:b,properties:{},children:"children"in c?c.children:[c]}),"element"===c.type&&e&&Object.assign(c.properties,cl(e)),"children"in c&&c.children&&null!=d&&(c.children=d)}return c}function cE(a,b){let c=[],d=-1;for(b&&c.push({type:"text",value:"\n"});++d<a.length;)d&&c.push({type:"text",value:"\n"}),c.push(a[d]);return b&&a.length>0&&c.push({type:"text",value:"\n"}),c}function cF(a){let b=0,c=a.charCodeAt(b);for(;9===c||32===c;)b++,c=a.charCodeAt(b);return a.slice(b)}function cG(a,b){let c,d,e,f,g=(c=b||cB,d=new Map,e=new Map,f={all:function(a){let b=[];if("children"in a){let c=a.children,d=-1;for(;++d<c.length;){let e=f.one(c[d],a);if(e){if(d&&"break"===c[d-1].type&&(Array.isArray(e)||"text"!==e.type||(e.value=cF(e.value)),!Array.isArray(e)&&"element"===e.type)){let a=e.children[0];a&&"text"===a.type&&(a.value=cF(a.value))}Array.isArray(e)?b.push(...e):b.push(e)}}}return b},applyData:cD,definitionById:d,footnoteById:e,footnoteCounts:new Map,footnoteOrder:[],handlers:{...cy,...c.handlers},one:function(a,b){let c=a.type,d=f.handlers[c];if(cA.call(f.handlers,c)&&d)return d(f,a,b);if(f.options.passThrough&&f.options.passThrough.includes(c)){if("children"in a){let{children:b,...c}=a,d=cl(c);return d.children=f.all(a),d}return cl(a)}return(f.options.unknownHandler||function(a,b){let c=b.data||{},d="value"in b&&!(cA.call(c,"hProperties")||cA.call(c,"hChildren"))?{type:"text",value:b.value}:{type:"element",tagName:"div",properties:{},children:a.all(b)};return a.patch(b,d),a.applyData(b,d)})(f,a,b)},options:c,patch:cC,wrap:cE},cu(a,function(a){if("definition"===a.type||"footnoteDefinition"===a.type){let b="definition"===a.type?d:e,c=String(a.identifier).toUpperCase();b.has(c)||b.set(c,a)}}),f),h=g.one(a,void 0),i=function(a){let b="string"==typeof a.options.clobberPrefix?a.options.clobberPrefix:"user-content-",c=a.options.footnoteBackContent||cn,d=a.options.footnoteBackLabel||co,e=a.options.footnoteLabel||"Footnotes",f=a.options.footnoteLabelTagName||"h2",g=a.options.footnoteLabelProperties||{className:["sr-only"]},h=[],i=-1;for(;++i<a.footnoteOrder.length;){let e=a.footnoteById.get(a.footnoteOrder[i]);if(!e)continue;let f=a.all(e),g=String(e.identifier).toUpperCase(),j=cm(g.toLowerCase()),k=0,l=[],m=a.footnoteCounts.get(g);for(;void 0!==m&&++k<=m;){l.length>0&&l.push({type:"text",value:" "});let a="string"==typeof c?c:c(i,k);"string"==typeof a&&(a={type:"text",value:a}),l.push({type:"element",tagName:"a",properties:{href:"#"+b+"fnref-"+j+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof d?d:d(i,k),className:["data-footnote-backref"]},children:Array.isArray(a)?a:[a]})}let n=f[f.length-1];if(n&&"element"===n.type&&"p"===n.tagName){let a=n.children[n.children.length-1];a&&"text"===a.type?a.value+=" ":n.children.push({type:"text",value:" "}),n.children.push(...l)}else f.push(...l);let o={type:"element",tagName:"li",properties:{id:b+"fn-"+j},children:a.wrap(f,!0)};a.patch(e,o),h.push(o)}if(0!==h.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:f,properties:{...cl(g),id:"footnote-label"},children:[{type:"text",value:e}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:a.wrap(h,!0)},{type:"text",value:"\n"}]}}(g),j=Array.isArray(h)?{type:"root",children:h}:h||{type:"root",children:[]};return i&&(N("children"in j),j.children.push({type:"text",value:"\n"},i)),j}function cH(a,b){return a&&"run"in a?async function(c,d){let e=cG(c,{file:d,...b});await a.run(e,d)}:function(c,d){return cG(c,{file:d,...a||b})}}function cI(a){if(a)throw a}var cJ=a.i(83230);function cK(a){if("object"!=typeof a||null===a)return!1;let b=Object.getPrototypeOf(a);return(null===b||b===Object.prototype||null===Object.getPrototypeOf(b))&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}var cL=a.i(50227),cL=cL,cM=a.i(59639),cM=cM,cN=a.i(57764),cN=cN;function cO(a){return!!(null!==a&&"object"==typeof a&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&void 0===a.auth)}let cP=["history","path","basename","stem","extname","dirname"];class cQ{constructor(a){let b,c;b=a?cO(a)?{path:a}:"string"==typeof a||function(a){return!!(a&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a)}(a)?{value:a}:a:{},this.cwd="cwd"in b?"":cM.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let d=-1;for(;++d<cP.length;){const a=cP[d];a in b&&void 0!==b[a]&&null!==b[a]&&(this[a]="history"===a?[...b[a]]:b[a])}for(c in b)cP.includes(c)||(this[c]=b[c])}get basename(){return"string"==typeof this.path?cL.default.basename(this.path):void 0}set basename(a){cS(a,"basename"),cR(a,"basename"),this.path=cL.default.join(this.dirname||"",a)}get dirname(){return"string"==typeof this.path?cL.default.dirname(this.path):void 0}set dirname(a){cT(this.basename,"dirname"),this.path=cL.default.join(a||"",this.basename)}get extname(){return"string"==typeof this.path?cL.default.extname(this.path):void 0}set extname(a){if(cR(a,"extname"),cT(this.dirname,"extname"),a){if(46!==a.codePointAt(0))throw Error("`extname` must start with `.`");if(a.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=cL.default.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){cO(a)&&(a=(0,cN.fileURLToPath)(a)),cS(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return"string"==typeof this.path?cL.default.basename(this.path,this.extname):void 0}set stem(a){cS(a,"stem"),cR(a,"stem"),this.path=cL.default.join(this.dirname||"",a+(this.extname||""))}fail(a,b,c){let d=this.message(a,b,c);throw d.fatal=!0,d}info(a,b,c){let d=this.message(a,b,c);return d.fatal=void 0,d}message(a,b,c){let d=new aI(a,b,c);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(a){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(a||void 0).decode(this.value)}}function cR(a,b){if(a&&a.includes(cL.default.sep))throw Error("`"+b+"` cannot be a path: did not expect `"+cL.default.sep+"`")}function cS(a,b){if(!a)throw Error("`"+b+"` cannot be empty")}function cT(a,b){if(!a)throw Error("Setting `"+b+"` requires `path` to be set too")}let cU=function(a){let b=this.constructor.prototype,c=b[a],d=function(){return c.apply(d,arguments)};return Object.setPrototypeOf(d,b),d},cV={}.hasOwnProperty;class cW extends cU{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let a=[],b={run:function(...b){let c=-1,d=b.pop();if("function"!=typeof d)throw TypeError("Expected function as last argument, not "+d);!function e(f,...g){let h=a[++c],i=-1;if(f)return void d(f);for(;++i<b.length;)(null===g[i]||void 0===g[i])&&(g[i]=b[i]);b=g,h?(function(a,b){let c;return function(...b){let f,g=a.length>b.length;g&&b.push(d);try{f=a.apply(this,b)}catch(a){if(g&&c)throw a;return d(a)}g||(f&&f.then&&"function"==typeof f.then?f.then(e,d):f instanceof Error?d(f):e(f))};function d(a,...e){c||(c=!0,b(a,...e))}function e(a){d(null,a)}})(h,e)(...g):d(null,...g)}(null,...b)},use:function(c){if("function"!=typeof c)throw TypeError("Expected `middelware` to be a function, not "+c);return a.push(c),b}};return b}()}copy(){let a=new cW,b=-1;for(;++b<this.attachers.length;){let c=this.attachers[b];a.use(...c)}return a.data((0,cJ.default)(!0,{},this.namespace)),a}data(a,b){return"string"==typeof a?2==arguments.length?(c$("data",this.frozen),this.namespace[a]=b,this):cV.call(this.namespace,a)&&this.namespace[a]||void 0:a?(c$("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[a,...b]=this.attachers[this.freezeIndex];if(!1===b[0])continue;!0===b[0]&&(b[0]=void 0);let c=a.call(this,...b);"function"==typeof c&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(a){this.freeze();let b=c1(a),c=this.parser||this.Parser;return cY("parse",c),c(String(b),b)}process(a,b){let c=this;return this.freeze(),cY("process",this.parser||this.Parser),cZ("process",this.compiler||this.Compiler),b?d(void 0,b):new Promise(d);function d(d,e){let f=c1(a),g=c.parse(f);function h(a,c){a||!c?e(a):d?d(c):(N(b,"`done` is defined if `resolve` is not"),b(void 0,c))}c.run(g,f,function(a,b,d){var e,f;if(a||!b||!d)return h(a);let g=c.stringify(b,d);"string"==typeof(e=g)||(f=e)&&"object"==typeof f&&"byteLength"in f&&"byteOffset"in f?d.value=g:d.result=g,h(a,d)})}}processSync(a){let b,c=!1;return this.freeze(),cY("processSync",this.parser||this.Parser),cZ("processSync",this.compiler||this.Compiler),this.process(a,function(a,d){c=!0,cI(a),b=d}),c0("processSync","process",c),N(b,"we either bailed on an error or have a tree"),b}run(a,b,c){c_(a),this.freeze();let d=this.transformers;return c||"function"!=typeof b||(c=b,b=void 0),c?e(void 0,c):new Promise(e);function e(e,f){N("function"!=typeof b,"`file` can’t be a `done` anymore, we checked");let g=c1(b);d.run(a,g,function(b,d,g){let h=d||a;b?f(b):e?e(h):(N(c,"`done` is defined if `resolve` is not"),c(void 0,h,g))})}}runSync(a,b){let c,d=!1;return this.run(a,b,function(a,b){cI(a),c=b,d=!0}),c0("runSync","run",d),N(c,"we either bailed on an error or have a tree"),c}stringify(a,b){this.freeze();let c=c1(b),d=this.compiler||this.Compiler;return cZ("stringify",d),c_(a),d(a,c)}use(a,...b){let c=this.attachers,d=this.namespace;if(c$("use",this.frozen),null==a);else if("function"==typeof a)g(a,b);else if("object"==typeof a)Array.isArray(a)?f(a):e(a);else throw TypeError("Expected usable value, not `"+a+"`");return this;function e(a){if(!("plugins"in a)&&!("settings"in a))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(a.plugins),a.settings&&(d.settings=(0,cJ.default)(!0,d.settings,a.settings))}function f(a){let b=-1;if(null==a);else if(Array.isArray(a))for(;++b<a.length;)!function(a){if("function"==typeof a)g(a,[]);else if("object"==typeof a)if(Array.isArray(a)){let[b,...c]=a;g(b,c)}else e(a);else throw TypeError("Expected usable value, not `"+a+"`")}(a[b]);else throw TypeError("Expected a list of plugins, not `"+a+"`")}function g(a,b){let d=-1,e=-1;for(;++d<c.length;)if(c[d][0]===a){e=d;break}if(-1===e)c.push([a,...b]);else if(b.length>0){let[d,...f]=b,g=c[e][1];cK(g)&&cK(d)&&(d=(0,cJ.default)(!0,g,d)),c[e]=[a,d,...f]}}}}let cX=new cW().freeze();function cY(a,b){if("function"!=typeof b)throw TypeError("Cannot `"+a+"` without `parser`")}function cZ(a,b){if("function"!=typeof b)throw TypeError("Cannot `"+a+"` without `compiler`")}function c$(a,b){if(b)throw Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function c_(a){if(!cK(a)||"string"!=typeof a.type)throw TypeError("Expected node, got `"+a+"`")}function c0(a,b,c){if(!c)throw Error("`"+a+"` finished async. Use `"+b+"` instead")}function c1(a){var b;return(b=a)&&"object"==typeof b&&"message"in b&&"messages"in b?a:new cQ(a)}let c2=[],c3={allowDangerousHtml:!0},c4=/^(https?|ircs?|mailto|xmpp)$/i,c5=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function c6(a){var c;let d,e,f,g,h,i=(d=(c=a).rehypePlugins||c2,e=c.remarkPlugins||c2,f=c.remarkRehypeOptions?{...c.remarkRehypeOptions,...c3}:c3,cX().use(cd).use(e).use(cH,f).use(d)),j=(g=a.children||"",h=new cQ,"string"==typeof g?h.value=g:O("Unexpected value `"+g+"` for `children` prop, expected `string`"),h);return function(a,c){let d=c.allowedElements,e=c.allowElement,f=c.components,g=c.disallowedElements,h=c.skipHtml,i=c.unwrapDisallowed,j=c.urlTransform||c7;for(let a of c5)Object.hasOwn(c,a.from)&&O("Unexpected `"+a.from+"` prop, "+(a.to?"use `"+a.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+a.id+"> for more info)");return d&&g&&O("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),cu(a,function(a,b,c){if("raw"===a.type&&c&&"number"==typeof b)return h?c.children.splice(b,1):c.children[b]={type:"text",value:a.value},b;if("element"===a.type){let b;for(b in aW)if(Object.hasOwn(aW,b)&&Object.hasOwn(a.properties,b)){let c=a.properties[b],d=aW[b];(null===d||d.includes(a.tagName))&&(a.properties[b]=j(String(c||""),b,a))}}if("element"===a.type){let f=d?!d.includes(a.tagName):!!g&&g.includes(a.tagName);if(!f&&e&&"number"==typeof b&&(f=!e(a,b,c)),f&&c&&"number"==typeof b)return i&&a.children?c.children.splice(b,1,...a.children):c.children.splice(b,1),b}}),function(a,b){var c,d,e,f;let g;if(!b||void 0===b.Fragment)throw TypeError("Expected `Fragment` in options");let h=b.filePath||void 0;if(b.development){if("function"!=typeof b.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");c=h,d=b.jsxDEV,g=function(a,b,e,f){let g=Array.isArray(e.children),h=aC(a);return d(b,e,f,g,{columnNumber:h?h.column-1:void 0,fileName:c,lineNumber:h?h.line:void 0},void 0)}}else{if("function"!=typeof b.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof b.jsxs)throw TypeError("Expected `jsxs` in production options");e=b.jsx,f=b.jsxs,g=function(a,b,c,d){let g=Array.isArray(c.children)?f:e;return d?g(b,c,d):g(b,c)}}let i={Fragment:b.Fragment,ancestors:[],components:b.components||{},create:g,elementAttributeNameCase:b.elementAttributeNameCase||"react",evaluater:b.createEvaluater?b.createEvaluater():void 0,filePath:h,ignoreInvalidStyle:b.ignoreInvalidStyle||!1,passKeys:!1!==b.passKeys,passNode:b.passNode||!1,schema:"svg"===b.space?az:ay,stylePropertyNameCase:b.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==b.tableCellAlignToStyle},j=aP(i,a,void 0);return j&&"string"!=typeof j?j:i.create(a,i.Fragment,{children:j||void 0},void 0)}(a,{Fragment:b.Fragment,components:f,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0})}(i.runSync(i.parse(j),j),a)}function c7(a){let b=a.indexOf(":"),c=a.indexOf("?"),d=a.indexOf("#"),e=a.indexOf("/");return -1===b||-1!==e&&b>e||-1!==c&&b>c||-1!==d&&b>d||c4.test(a.slice(0,b))?a:""}function c8(a,b){let c=String(a);if("string"!=typeof b)throw TypeError("Expected character");let d=0,e=c.indexOf(b);for(;-1!==e;)d++,e=c.indexOf(b,e+b.length);return d}let c9="phrasing",da=["autolink","link","image","label"];function db(a){this.enter({type:"link",title:null,url:"",children:[]},a)}function dc(a){this.config.enter.autolinkProtocol.call(this,a)}function dd(a){this.config.exit.autolinkProtocol.call(this,a)}function de(a){this.config.exit.data.call(this,a);let b=this.stack[this.stack.length-1];N("link"===b.type),b.url="http://"+this.sliceSerialize(a)}function df(a){this.config.exit.autolinkEmail.call(this,a)}function dg(a){this.exit(a)}function dh(a){!function(a,b,c){let d=cp((c||{}).ignore||[]),e=function(a){let b=[];if(!Array.isArray(a))throw TypeError("Expected find and replace tuple or list of tuples");let c=!a[0]||Array.isArray(a[0])?a:[a],d=-1;for(;++d<c.length;){var e;let a=c[d];b.push(["string"==typeof(e=a[0])?RegExp(function(a){if("string"!=typeof a)throw TypeError("Expected a string");return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e,function(a){return"function"==typeof a?a:function(){return a}}(a[1])])}return b}(b),f=-1;for(;++f<e.length;)ct(a,"text",g);function g(a,b){let c,g=-1;for(;++g<b.length;){let a=b[g],e=c?c.children:void 0;if(d(a,e?e.indexOf(a):void 0,c))return;c=a}if(c)return function(a,b){let c=b[b.length-1],d=e[f][0],g=e[f][1],h=0,i=c.children.indexOf(a),j=!1,k=[];d.lastIndex=0;let l=d.exec(a.value);for(;l;){let c=l.index,e={index:l.index,input:l.input,stack:[...b,a]},f=g(...l,e);if("string"==typeof f&&(f=f.length>0?{type:"text",value:f}:void 0),!1===f?d.lastIndex=c+1:(h!==c&&k.push({type:"text",value:a.value.slice(h,c)}),Array.isArray(f)?k.push(...f):f&&k.push(f),h=c+l[0].length,j=!0),!d.global)break;l=d.exec(a.value)}return j?(h<a.value.length&&k.push({type:"text",value:a.value.slice(h)}),c.children.splice(i,1,...k)):k=[a],i+k.length}(a,b)}}(a,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,di],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,dj]],{ignore:["link","linkReference"]})}function di(a,b,c,d,e){let f,g="";if(!dk(e))return!1;if(/^w/i.test(b)&&(c=b+c,b="",g="http://"),(f=c.split(".")).length<2||f[f.length-1]&&(/_/.test(f[f.length-1])||!/[a-zA-Z\d]/.test(f[f.length-1]))||f[f.length-2]&&(/_/.test(f[f.length-2])||!/[a-zA-Z\d]/.test(f[f.length-2])))return!1;let h=function(a){let b=/[!"&'),.:;<>?\]}]+$/.exec(a);if(!b)return[a,void 0];a=a.slice(0,b.index);let c=b[0],d=c.indexOf(")"),e=c8(a,"("),f=c8(a,")");for(;-1!==d&&e>f;)a+=c.slice(0,d+1),d=(c=c.slice(d+1)).indexOf(")"),f++;return[a,c]}(c+d);if(!h[0])return!1;let i={type:"link",title:null,url:g+b+h[0],children:[{type:"text",value:b+h[0]}]};return h[1]?[i,{type:"text",value:h[1]}]:i}function dj(a,b,c,d){return!(!dk(d,!0)||/[-\d_]$/.test(c))&&{type:"link",title:null,url:"mailto:"+b+"@"+c,children:[{type:"text",value:b+"@"+c}]}}function dk(a,b){let c=a.input.charCodeAt(a.index-1);return(0===a.index||be(c)||bd(c))&&(!b||47!==c)}function dl(){this.buffer()}function dm(a){this.enter({type:"footnoteReference",identifier:"",label:""},a)}function dn(){this.buffer()}function dp(a){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},a)}function dq(a){let b=this.resume(),c=this.stack[this.stack.length-1];N("footnoteReference"===c.type),c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),c.label=b}function dr(a){this.exit(a)}function ds(a){let b=this.resume(),c=this.stack[this.stack.length-1];N("footnoteDefinition"===c.type),c.identifier=bP(this.sliceSerialize(a)).toLowerCase(),c.label=b}function dt(a){this.exit(a)}function du(a,b,c,d){let e=c.createTracker(d),f=e.move("[^"),g=c.enter("footnoteReference"),h=c.enter("reference");return f+=e.move(c.safe(c.associationId(a),{after:"]",before:f})),h(),g(),f+=e.move("]")}function dv(a,b,c){return 0===b?a:dw(a,b,c)}function dw(a,b,c){return(c?"":" ")+a}du.peek=function(){return"["};let dx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function dy(a){this.enter({type:"delete",children:[]},a)}function dz(a){this.exit(a)}function dA(a,b,c,d){let e=c.createTracker(d),f=c.enter("strikethrough"),g=e.move("~~");return g+=c.containerPhrasing(a,{...e.current(),before:g,after:"~"}),g+=e.move("~~"),f(),g}function dB(a){return a.length}function dC(a){let b="string"==typeof a?a.codePointAt(0):0;return 67===b||99===b?99:76===b||108===b?108:114*(82===b||114===b)}dA.peek=function(){return"~"};function dD(a,b,c){let d=a.value||"",e="`",f=-1;for(;RegExp("(^|[^`])"+e+"([^`]|$)").test(d);)e+="`";for(/[^ \r\n]/.test(d)&&(/^[ \r\n]/.test(d)&&/[ \r\n]$/.test(d)||/^`|`$/.test(d))&&(d=" "+d+" ");++f<c.unsafe.length;){let a,b=c.unsafe[f],e=c.compilePattern(b);if(b.atBreak)for(;a=e.exec(d);){let b=a.index;10===d.charCodeAt(b)&&13===d.charCodeAt(b-1)&&b--,d=d.slice(0,b)+" "+d.slice(a.index+1)}}return e+d+e}dD.peek=function(){return"`"};cp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let dE=function(a,b,c,d){let e=function(a){let b=a.options.listItemIndent||"one";if("tab"!==b&&"one"!==b&&"mixed"!==b)throw Error("Cannot serialize items with `"+b+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return b}(c),f=c.bulletCurrent||function(a){let b=a.options.bullet||"*";if("*"!==b&&"+"!==b&&"-"!==b)throw Error("Cannot serialize items with `"+b+"` for `options.bullet`, expected `*`, `+`, or `-`");return b}(c);b&&"list"===b.type&&b.ordered&&(f=("number"==typeof b.start&&b.start>-1?b.start:1)+(!1===c.options.incrementListMarker?0:b.children.indexOf(a))+f);let g=f.length+1;("tab"===e||"mixed"===e&&(b&&"list"===b.type&&b.spread||a.spread))&&(g=4*Math.ceil(g/4));let h=c.createTracker(d);h.move(f+" ".repeat(g-f.length)),h.shift(g);let i=c.enter("listItem"),j=c.indentLines(c.containerFlow(a,h.current()),function(a,b,c){return b?(c?"":" ".repeat(g))+a:(c?f:f+" ".repeat(g-f.length))+a});return i(),j};function dF(a){let b=a._align;N(b,"expected `_align` on table"),this.enter({type:"table",align:b.map(function(a){return"none"===a?null:a}),children:[]},a),this.data.inTable=!0}function dG(a){this.exit(a),this.data.inTable=void 0}function dH(a){this.enter({type:"tableRow",children:[]},a)}function dI(a){this.exit(a)}function dJ(a){this.enter({type:"tableCell",children:[]},a)}function dK(a){let b=this.resume();this.data.inTable&&(b=b.replace(/\\([\\|])/g,dL));let c=this.stack[this.stack.length-1];N("inlineCode"===c.type),c.value=b,this.exit(a)}function dL(a,b){return"|"===b?b:a}function dM(a){let b=this.stack[this.stack.length-2];N("listItem"===b.type),b.checked="taskListCheckValueChecked"===a.type}function dN(a){let b=this.stack[this.stack.length-2];if(b&&"listItem"===b.type&&"boolean"==typeof b.checked){let a=this.stack[this.stack.length-1];N("paragraph"===a.type);let c=a.children[0];if(c&&"text"===c.type){let d,e=b.children,f=-1;for(;++f<e.length;){let a=e[f];if("paragraph"===a.type){d=a;break}}d===a&&(c.value=c.value.slice(1),0===c.value.length?a.children.shift():a.position&&c.position&&"number"==typeof c.position.start.offset&&(c.position.start.column++,c.position.start.offset++,a.position.start=Object.assign({},c.position.start)))}}this.exit(a)}function dO(a,b,c,d){let e=a.children[0],f="boolean"==typeof a.checked&&e&&"paragraph"===e.type,g="["+(a.checked?"x":" ")+"] ",h=c.createTracker(d);f&&h.move(g);let i=dE(a,b,c,{...d,...h.current()});return f&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(a){return a+g})),i}let dP={tokenize:function(a,b,c){let d=0;return function b(f){return(87===f||119===f)&&d<3?(d++,a.consume(f),b):46===f&&3===d?(a.consume(f),e):c(f)};function e(a){return null===a?c(a):b(a)}},partial:!0},dQ={tokenize:function(a,b,c){let d,e,f;return g;function g(b){return 46===b||95===b?a.check(dS,i,h)(b):null===b||bb(b)||be(b)||45!==b&&bd(b)?i(b):(f=!0,a.consume(b),g)}function h(b){return 95===b?d=!0:(e=d,d=void 0),a.consume(b),g}function i(a){return e||d||!f?c(a):b(a)}},partial:!0},dR={tokenize:function(a,b){let c=0,d=0;return e;function e(g){return 40===g?(c++,a.consume(g),e):41===g&&d<c?f(g):33===g||34===g||38===g||39===g||41===g||42===g||44===g||46===g||58===g||59===g||60===g||63===g||93===g||95===g||126===g?a.check(dS,b,f)(g):null===g||bb(g)||be(g)?b(g):(a.consume(g),e)}function f(b){return 41===b&&d++,a.consume(b),e}},partial:!0},dS={tokenize:function(a,b,c){return d;function d(g){return 33===g||34===g||39===g||41===g||42===g||44===g||46===g||58===g||59===g||63===g||95===g||126===g?(a.consume(g),d):38===g?(a.consume(g),f):93===g?(a.consume(g),e):60===g||null===g||bb(g)||be(g)?b(g):c(g)}function e(a){return null===a||40===a||91===a||bb(a)||be(a)?b(a):d(a)}function f(b){return a3(b)?function b(e){return 59===e?(a.consume(e),d):a3(e)?(a.consume(e),b):c(e)}(b):c(b)}},partial:!0},dT={tokenize:function(a,b,c){return function(b){return a.consume(b),d};function d(a){return a4(a)?c(a):b(a)}},partial:!0},dU={name:"wwwAutolink",tokenize:function(a,b,c){let d=this;return function(b){return 87!==b&&119!==b||!dZ.call(d,d.previous)||d1(d.events)?c(b):(a.enter("literalAutolink"),a.enter("literalAutolinkWww"),a.check(dP,a.attempt(dQ,a.attempt(dR,e),c),c)(b))};function e(c){return a.exit("literalAutolinkWww"),a.exit("literalAutolink"),b(c)}},previous:dZ},dV={name:"protocolAutolink",tokenize:function(a,b,c){let d=this,e="",f=!1;return function(b){return(72===b||104===b)&&d$.call(d,d.previous)&&!d1(d.events)?(a.enter("literalAutolink"),a.enter("literalAutolinkHttp"),e+=String.fromCodePoint(b),a.consume(b),g):c(b)};function g(b){if(a3(b)&&e.length<5)return e+=String.fromCodePoint(b),a.consume(b),g;if(58===b){let c=e.toLowerCase();if("http"===c||"https"===c)return a.consume(b),h}return c(b)}function h(b){return 47===b?(a.consume(b),f)?i:(f=!0,h):c(b)}function i(b){return null===b||a6(b)||bb(b)||be(b)||bd(b)?c(b):a.attempt(dQ,a.attempt(dR,j),c)(b)}function j(c){return a.exit("literalAutolinkHttp"),a.exit("literalAutolink"),b(c)}},previous:d$},dW={name:"emailAutolink",tokenize:function(a,b,c){let d,e,f=this;return function(b){return!d0(b)||!d_.call(f,f.previous)||d1(f.events)?c(b):(a.enter("literalAutolink"),a.enter("literalAutolinkEmail"),function b(d){return d0(d)?(a.consume(d),b):64===d?(a.consume(d),g):c(d)}(b))};function g(b){return 46===b?a.check(dT,i,h)(b):45===b||95===b||a4(b)?(e=!0,a.consume(b),g):i(b)}function h(b){return a.consume(b),d=!0,g}function i(g){return e&&d&&a3(f.previous)?(a.exit("literalAutolinkEmail"),a.exit("literalAutolink"),b(g)):c(g)}},previous:d_},dX={},dY=48;for(;dY<123;)dX[dY]=dW,58==++dY?dY=65:91===dY&&(dY=97);function dZ(a){return null===a||40===a||42===a||95===a||91===a||93===a||126===a||bb(a)}function d$(a){return!a3(a)}function d_(a){return!(47===a||d0(a))}function d0(a){return 43===a||45===a||46===a||95===a||a4(a)}function d1(a){let b=a.length,c=!1;for(;b--;){let d=a[b][1];if(("labelLink"===d.type||"labelImage"===d.type)&&!d._balanced){c=!0;break}if(d._gfmAutolinkLiteralWalkedInto){c=!1;break}}return a.length>0&&!c&&(a[a.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),c}dX[43]=dW,dX[45]=dW,dX[46]=dW,dX[95]=dW,dX[72]=[dW,dV],dX[104]=[dW,dV],dX[87]=[dW,dU],dX[119]=[dW,dU];let d2={tokenize:function(a,b,c){let d=this;return bg(a,function(a){let e=d.events[d.events.length-1];return e&&"gfmFootnoteDefinitionIndent"===e[1].type&&4===e[2].sliceSerialize(e[1],!0).length?b(a):c(a)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function d3(a,b,c){let d,e=this,f=e.events.length,g=e.parser.gfmFootnotes||(e.parser.gfmFootnotes=[]);for(;f--;){let a=e.events[f][1];if("labelImage"===a.type){d=a;break}if("gfmFootnoteCall"===a.type||"labelLink"===a.type||"label"===a.type||"image"===a.type||"link"===a.type)break}return function(f){if(!d||!d._balanced)return c(f);let h=bP(e.sliceSerialize({start:d.end,end:e.now()}));return 94===h.codePointAt(0)&&g.includes(h.slice(1))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(f),a.exit("gfmFootnoteCallLabelMarker"),b(f)):c(f)}}function d4(a,b){let c=a.length;for(;c--;)if("labelImage"===a[c][1].type&&"enter"===a[c][0]){a[c][1];break}a[c+1][1].type="data",a[c+3][1].type="gfmFootnoteCallLabelMarker";let d={type:"gfmFootnoteCall",start:Object.assign({},a[c+3][1].start),end:Object.assign({},a[a.length-1][1].end)},e={type:"gfmFootnoteCallMarker",start:Object.assign({},a[c+3][1].end),end:Object.assign({},a[c+3][1].end)};e.end.column++,e.end.offset++,e.end._bufferIndex++;let f={type:"gfmFootnoteCallString",start:Object.assign({},e.end),end:Object.assign({},a[a.length-1][1].start)},g={type:"chunkString",contentType:"string",start:Object.assign({},f.start),end:Object.assign({},f.end)},h=[a[c+1],a[c+2],["enter",d,b],a[c+3],a[c+4],["enter",e,b],["exit",e,b],["enter",f,b],["enter",g,b],["exit",g,b],["exit",f,b],a[a.length-2],a[a.length-1],["exit",d,b]];return a.splice(c,a.length-c+1,...h),a}function d5(a,b,c){let d,e=this,f=e.parser.gfmFootnotes||(e.parser.gfmFootnotes=[]),g=0;return function(b){return a.enter("gfmFootnoteCall"),a.enter("gfmFootnoteCallLabelMarker"),a.consume(b),a.exit("gfmFootnoteCallLabelMarker"),h};function h(b){return 94!==b?c(b):(a.enter("gfmFootnoteCallMarker"),a.consume(b),a.exit("gfmFootnoteCallMarker"),a.enter("gfmFootnoteCallString"),a.enter("chunkString").contentType="string",i)}function i(h){if(g>999||93===h&&!d||null===h||91===h||bb(h))return c(h);if(93===h){a.exit("chunkString");let d=a.exit("gfmFootnoteCallString");return f.includes(bP(e.sliceSerialize(d)))?(a.enter("gfmFootnoteCallLabelMarker"),a.consume(h),a.exit("gfmFootnoteCallLabelMarker"),a.exit("gfmFootnoteCall"),b):c(h)}return bb(h)||(d=!0),g++,a.consume(h),92===h?j:i}function j(b){return 91===b||92===b||93===b?(a.consume(b),g++,i):i(b)}}function d6(a,b,c){let d,e,f=this,g=f.parser.gfmFootnotes||(f.parser.gfmFootnotes=[]),h=0;return function(b){return a.enter("gfmFootnoteDefinition")._container=!0,a.enter("gfmFootnoteDefinitionLabel"),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),i};function i(b){return 94===b?(a.enter("gfmFootnoteDefinitionMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionMarker"),a.enter("gfmFootnoteDefinitionLabelString"),a.enter("chunkString").contentType="string",j):c(b)}function j(b){if(h>999||93===b&&!e||null===b||91===b||bb(b))return c(b);if(93===b){a.exit("chunkString");let c=a.exit("gfmFootnoteDefinitionLabelString");return d=bP(f.sliceSerialize(c)),a.enter("gfmFootnoteDefinitionLabelMarker"),a.consume(b),a.exit("gfmFootnoteDefinitionLabelMarker"),a.exit("gfmFootnoteDefinitionLabel"),l}return bb(b)||(e=!0),h++,a.consume(b),92===b?k:j}function k(b){return 91===b||92===b||93===b?(a.consume(b),h++,j):j(b)}function l(b){return 58===b?(a.enter("definitionMarker"),a.consume(b),a.exit("definitionMarker"),g.includes(d)||g.push(d),bg(a,m,"gfmFootnoteDefinitionWhitespace")):c(b)}function m(a){return b(a)}}function d7(a,b,c){return a.check(bk,b,a.attempt(d2,b,c))}function d8(a){a.exit("gfmFootnoteDefinition")}class d9{constructor(){this.map=[]}add(a,b,c){!function(a,b,c,d){let e=0;if(0!==c||0!==d.length){for(;e<a.map.length;){if(a.map[e][0]===b){a.map[e][1]+=c,a.map[e][2].push(...d);return}e+=1}a.map.push([b,c,d])}}(this,a,b,c)}consume(a){if(this.map.sort(function(a,b){return a[0]-b[0]}),0===this.map.length)return;let b=this.map.length,c=[];for(;b>0;)b-=1,c.push(a.slice(this.map[b][0]+this.map[b][1]),this.map[b][2]),a.length=this.map[b][0];c.push(a.slice()),a.length=0;let d=c.pop();for(;d;){for(let b of d)a.push(b);d=c.pop()}this.map.length=0}}function ea(a,b,c){let d,e=this,f=0,g=0;return function(a){let b=e.events.length-1;for(;b>-1;){let a=e.events[b][1].type;if("lineEnding"===a||"linePrefix"===a)b--;else break}let d=b>-1?e.events[b][1].type:null,f="tableHead"===d||"tableRow"===d?s:h;return f===s&&e.parser.lazy[e.now().line]?c(a):f(a)};function h(b){var c;return a.enter("tableHead"),a.enter("tableRow"),124===(c=b)||(d=!0,g+=1),i(c)}function i(b){return null===b?c(b):ba(b)?g>1?(g=0,e.interrupt=!0,a.exit("tableRow"),a.enter("lineEnding"),a.consume(b),a.exit("lineEnding"),l):c(b):bc(b)?bg(a,i,"whitespace")(b):(g+=1,d&&(d=!1,f+=1),124===b)?(a.enter("tableCellDivider"),a.consume(b),a.exit("tableCellDivider"),d=!0,i):(a.enter("data"),j(b))}function j(b){return null===b||124===b||bb(b)?(a.exit("data"),i(b)):(a.consume(b),92===b?k:j)}function k(b){return 92===b||124===b?(a.consume(b),j):j(b)}function l(b){return(e.interrupt=!1,e.parser.lazy[e.now().line])?c(b):(a.enter("tableDelimiterRow"),d=!1,bc(b))?bg(a,m,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):m(b)}function m(b){return 45===b||58===b?o(b):124===b?(d=!0,a.enter("tableCellDivider"),a.consume(b),a.exit("tableCellDivider"),n):c(b)}function n(b){return bc(b)?bg(a,o,"whitespace")(b):o(b)}function o(b){return 58===b?(g+=1,d=!0,a.enter("tableDelimiterMarker"),a.consume(b),a.exit("tableDelimiterMarker"),p):45===b?(g+=1,p(b)):null===b||ba(b)?r(b):c(b)}function p(b){return 45===b?(a.enter("tableDelimiterFiller"),function b(c){return 45===c?(a.consume(c),b):58===c?(d=!0,a.exit("tableDelimiterFiller"),a.enter("tableDelimiterMarker"),a.consume(c),a.exit("tableDelimiterMarker"),q):(a.exit("tableDelimiterFiller"),q(c))}(b)):c(b)}function q(b){return bc(b)?bg(a,r,"whitespace")(b):r(b)}function r(e){if(124===e)return m(e);if(null===e||ba(e))return d&&f===g?(a.exit("tableDelimiterRow"),a.exit("tableHead"),b(e)):c(e);return c(e)}function s(b){return a.enter("tableRow"),t(b)}function t(c){return 124===c?(a.enter("tableCellDivider"),a.consume(c),a.exit("tableCellDivider"),t):null===c||ba(c)?(a.exit("tableRow"),b(c)):bc(c)?bg(a,t,"whitespace")(c):(a.enter("data"),u(c))}function u(b){return null===b||124===b||bb(b)?(a.exit("data"),t(b)):(a.consume(b),92===b?v:u)}function v(b){return 92===b||124===b?(a.consume(b),u):u(b)}}function eb(a,b){let c,d,e,f=-1,g=!0,h=0,i=[0,0,0,0],j=[0,0,0,0],k=!1,l=0,m=new d9;for(;++f<a.length;){let n=a[f],o=n[1];"enter"===n[0]?"tableHead"===o.type?(k=!1,0!==l&&(ed(m,b,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},o.start),end:Object.assign({},o.end)},m.add(f,0,[["enter",c,b]])):"tableRow"===o.type||"tableDelimiterRow"===o.type?(g=!0,e=void 0,i=[0,0,0,0],j=[0,f+1,0,0],k&&(k=!1,d={type:"tableBody",start:Object.assign({},o.start),end:Object.assign({},o.end)},m.add(f,0,[["enter",d,b]])),h="tableDelimiterRow"===o.type?2:d?3:1):h&&("data"===o.type||"tableDelimiterMarker"===o.type||"tableDelimiterFiller"===o.type)?(g=!1,0===j[2]&&(0!==i[1]&&(j[0]=j[1],e=ec(m,b,i,h,void 0,e),i=[0,0,0,0]),j[2]=f)):"tableCellDivider"===o.type&&(g?g=!1:(0!==i[1]&&(j[0]=j[1],e=ec(m,b,i,h,void 0,e)),j=[(i=j)[1],f,0,0])):"tableHead"===o.type?(k=!0,l=f):"tableRow"===o.type||"tableDelimiterRow"===o.type?(l=f,0!==i[1]?(j[0]=j[1],e=ec(m,b,i,h,f,e)):0!==j[1]&&(e=ec(m,b,j,h,f,e)),h=0):h&&("data"===o.type||"tableDelimiterMarker"===o.type||"tableDelimiterFiller"===o.type)&&(j[3]=f)}for(0!==l&&ed(m,b,l,c,d),m.consume(b.events),f=-1;++f<b.events.length;){let a=b.events[f];"enter"===a[0]&&"table"===a[1].type&&(a[1]._align=function(a,b){let c=!1,d=[];for(;b<a.length;){let e=a[b];if(c){if("enter"===e[0])"tableContent"===e[1].type&&d.push("tableDelimiterMarker"===a[b+1][1].type?"left":"none");else if("tableContent"===e[1].type){if("tableDelimiterMarker"===a[b-1][1].type){let a=d.length-1;d[a]="left"===d[a]?"center":"right"}}else if("tableDelimiterRow"===e[1].type)break}else"enter"===e[0]&&"tableDelimiterRow"===e[1].type&&(c=!0);b+=1}return d}(b.events,f))}return a}function ec(a,b,c,d,e,f){0!==c[0]&&(f.end=Object.assign({},ee(b.events,c[0])),a.add(c[0],0,[["exit",f,b]]));let g=ee(b.events,c[1]);if(f={type:1===d?"tableHeader":2===d?"tableDelimiter":"tableData",start:Object.assign({},g),end:Object.assign({},g)},a.add(c[1],0,[["enter",f,b]]),0!==c[2]){let e=ee(b.events,c[2]),f=ee(b.events,c[3]),g={type:"tableContent",start:Object.assign({},e),end:Object.assign({},f)};if(a.add(c[2],0,[["enter",g,b]]),2!==d){let d=b.events[c[2]],e=b.events[c[3]];if(d[1].end=Object.assign({},e[1].end),d[1].type="chunkText",d[1].contentType="text",c[3]>c[2]+1){let b=c[2]+1,d=c[3]-c[2]-1;a.add(b,d,[])}}a.add(c[3]+1,0,[["exit",g,b]])}return void 0!==e&&(f.end=Object.assign({},ee(b.events,e)),a.add(e,0,[["exit",f,b]]),f=void 0),f}function ed(a,b,c,d,e){let f=[],g=ee(b.events,c);e&&(e.end=Object.assign({},g),f.push(["exit",e,b])),d.end=Object.assign({},g),f.push(["exit",d,b]),a.add(c+1,0,f)}function ee(a,b){let c=a[b],d="enter"===c[0]?"start":"end";return c[1][d]}let ef={name:"tasklistCheck",tokenize:function(a,b,c){let d=this;return function(b){return null===d.previous&&d._gfmTasklistFirstContentOfListItem?(a.enter("taskListCheck"),a.enter("taskListCheckMarker"),a.consume(b),a.exit("taskListCheckMarker"),e):c(b)};function e(b){return bb(b)?(a.enter("taskListCheckValueUnchecked"),a.consume(b),a.exit("taskListCheckValueUnchecked"),f):88===b||120===b?(a.enter("taskListCheckValueChecked"),a.consume(b),a.exit("taskListCheckValueChecked"),f):c(b)}function f(b){return 93===b?(a.enter("taskListCheckMarker"),a.consume(b),a.exit("taskListCheckMarker"),a.exit("taskListCheck"),g):c(b)}function g(d){return ba(d)?b(d):bc(d)?a.check({tokenize:eg},b,c)(d):c(d)}}};function eg(a,b,c){return bg(a,function(a){return null===a?c(a):b(a)},"whitespace")}let eh={};function ei(a){let b,c,d,e=a||eh,f=this.data(),g=f.micromarkExtensions||(f.micromarkExtensions=[]),h=f.fromMarkdownExtensions||(f.fromMarkdownExtensions=[]),i=f.toMarkdownExtensions||(f.toMarkdownExtensions=[]);g.push(a2([{text:dX},{document:{91:{name:"gfmFootnoteDefinition",tokenize:d6,continuation:{tokenize:d7},exit:d8}},text:{91:{name:"gfmFootnoteCall",tokenize:d5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d3,resolveTo:d4}}},(b=(e||{}).singleTilde,c={name:"strikethrough",tokenize:function(a,c,d){let e=this.previous,f=this.events,g=0;return function(h){return 126===e&&"characterEscape"!==f[f.length-1][1].type?d(h):(a.enter("strikethroughSequenceTemporary"),function f(h){let i=bx(e);if(126===h)return g>1?d(h):(a.consume(h),g++,f);if(g<2&&!b)return d(h);let j=a.exit("strikethroughSequenceTemporary"),k=bx(h);return j._open=!k||2===k&&!!i,j._close=!i||2===i&&!!k,c(h)}(h))}},resolveAll:function(a,b){let c=-1;for(;++c<a.length;)if("enter"===a[c][0]&&"strikethroughSequenceTemporary"===a[c][1].type&&a[c][1]._close){let d=c;for(;d--;)if("exit"===a[d][0]&&"strikethroughSequenceTemporary"===a[d][1].type&&a[d][1]._open&&a[c][1].end.offset-a[c][1].start.offset==a[d][1].end.offset-a[d][1].start.offset){a[c][1].type="strikethroughSequence",a[d][1].type="strikethroughSequence";let e={type:"strikethrough",start:Object.assign({},a[d][1].start),end:Object.assign({},a[c][1].end)},f={type:"strikethroughText",start:Object.assign({},a[d][1].end),end:Object.assign({},a[c][1].start)},g=[["enter",e,b],["enter",a[d][1],b],["exit",a[d][1],b],["enter",f,b]],h=b.parser.constructs.insideSpan.null;h&&a_(g,g.length,0,by(h,a.slice(d+1,c),b)),a_(g,g.length,0,[["exit",f,b],["enter",a[c][1],b],["exit",a[c][1],b],["exit",e,b]]),a_(a,d-1,c-d+3,g),c=d+g.length-2;break}}for(c=-1;++c<a.length;)"strikethroughSequenceTemporary"===a[c][1].type&&(a[c][1].type="data");return a}},null==b&&(b=!0),{text:{126:c},insideSpan:{null:[c]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:ea,resolveAll:eb}}},{text:{91:ef}}])),h.push([{transforms:[dh],enter:{literalAutolink:db,literalAutolinkEmail:dc,literalAutolinkHttp:dc,literalAutolinkWww:dc},exit:{literalAutolink:dg,literalAutolinkEmail:df,literalAutolinkHttp:dd,literalAutolinkWww:de}},{enter:{gfmFootnoteCallString:dl,gfmFootnoteCall:dm,gfmFootnoteDefinitionLabelString:dn,gfmFootnoteDefinition:dp},exit:{gfmFootnoteCallString:dq,gfmFootnoteCall:dr,gfmFootnoteDefinitionLabelString:ds,gfmFootnoteDefinition:dt}},{canContainEols:["delete"],enter:{strikethrough:dy},exit:{strikethrough:dz}},{enter:{table:dF,tableData:dJ,tableHeader:dJ,tableRow:dH},exit:{codeText:dK,table:dG,tableData:dI,tableHeader:dI,tableRow:dI}},{exit:{taskListCheckValueChecked:dM,taskListCheckValueUnchecked:dM,paragraph:dN}}]),i.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:c9,notInConstruct:da},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:c9,notInConstruct:da},{character:":",before:"[ps]",after:"\\/",inConstruct:c9,notInConstruct:da}]},(d=!1,e&&e.firstLineBlank&&(d=!0),{handlers:{footnoteDefinition:function(a,b,c,e){let f=c.createTracker(e),g=f.move("[^"),h=c.enter("footnoteDefinition"),i=c.enter("label");return g+=f.move(c.safe(c.associationId(a),{before:g,after:"]"})),i(),g+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),g+=f.move((d?"\n":" ")+c.indentLines(c.containerFlow(a,f.current()),d?dw:dv))),h(),g},footnoteReference:du},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dx}],handlers:{delete:dA}},function(a){let b=a||{},c=b.tableCellPadding,d=b.tablePipeAlign,e=b.stringLength,f=c?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(a,b,c){let d=dD(a,b,c);return c.stack.includes("tableCell")&&(d=d.replace(/\|/g,"\\$&")),d},table:function(a,b,c,d){return h(function(a,b,c){let d=a.children,e=-1,f=[],g=b.enter("table");for(;++e<d.length;)f[e]=i(d[e],b,c);return g(),f}(a,c,d),a.align)},tableCell:g,tableRow:function(a,b,c,d){let e=h([i(a,c,d)]);return e.slice(0,e.indexOf("\n"))}}};function g(a,b,c,d){let e=c.enter("tableCell"),g=c.enter("phrasing"),h=c.containerPhrasing(a,{...d,before:f,after:f});return g(),e(),h}function h(a,b){return function(a,b){let c=b||{},d=(c.align||[]).concat(),e=c.stringLength||dB,f=[],g=[],h=[],i=[],j=0,k=-1;for(;++k<a.length;){let b=[],d=[],f=-1;for(a[k].length>j&&(j=a[k].length);++f<a[k].length;){var l;let g=null==(l=a[k][f])?"":String(l);if(!1!==c.alignDelimiters){let a=e(g);d[f]=a,(void 0===i[f]||a>i[f])&&(i[f]=a)}b.push(g)}g[k]=b,h[k]=d}let m=-1;if("object"==typeof d&&"length"in d)for(;++m<j;)f[m]=dC(d[m]);else{let a=dC(d);for(;++m<j;)f[m]=a}m=-1;let n=[],o=[];for(;++m<j;){let a=f[m],b="",d="";99===a?(b=":",d=":"):108===a?b=":":114===a&&(d=":");let e=!1===c.alignDelimiters?1:Math.max(1,i[m]-b.length-d.length),g=b+"-".repeat(e)+d;!1!==c.alignDelimiters&&((e=b.length+e+d.length)>i[m]&&(i[m]=e),o[m]=e),n[m]=g}g.splice(1,0,n),h.splice(1,0,o),k=-1;let p=[];for(;++k<g.length;){let a=g[k],b=h[k];m=-1;let d=[];for(;++m<j;){let e=a[m]||"",g="",h="";if(!1!==c.alignDelimiters){let a=i[m]-(b[m]||0),c=f[m];114===c?g=" ".repeat(a):99===c?a%2?(g=" ".repeat(a/2+.5),h=" ".repeat(a/2-.5)):h=g=" ".repeat(a/2):h=" ".repeat(a)}!1===c.delimiterStart||m||d.push("|"),!1!==c.padding&&(!1!==c.alignDelimiters||""!==e)&&(!1!==c.delimiterStart||m)&&d.push(" "),!1!==c.alignDelimiters&&d.push(g),d.push(e),!1!==c.alignDelimiters&&d.push(h),!1!==c.padding&&d.push(" "),(!1!==c.delimiterEnd||m!==j-1)&&d.push("|")}p.push(!1===c.delimiterEnd?d.join("").replace(/ +$/,""):d.join(""))}return p.join("\n")}(a,{align:b,alignDelimiters:d,padding:c,stringLength:e})}function i(a,b,c){let d=a.children,e=-1,f=[],h=b.enter("tableRow");for(;++e<d.length;)f[e]=g(d[e],a,b,c);return h(),f}}(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dO}}]})}var ej=a.i(33878);function ek(a){let b=new Date(a),c=Math.floor((new Date().getTime()-b.getTime())/1e3);if(c<60)return"just now";let d=Math.floor(c/60);if(d<60)return`${d}m ago`;let e=Math.floor(d/60);if(e<24)return`${e}h ago`;let f=Math.floor(e/24);return f<7?`${f}d ago`:b.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function el(a,b){let c=[];return c.push(`[${m(a.prefix)}] ${a.id}`),b&&c.push(b),c.push(""),c.push(a.description||""),c.join("\n")}let em={elevenLabsVoiceId:"UgBBYS2sOqTuMpoF3BR0",elevenLabsModel:"eleven_flash_v2_5"};function en(){let a={...em};return!!a.elevenLabsApiKey&&a.elevenLabsApiKey.trim().length>0}let eo=new Map;function ep(a){return a.replace(/\s+/g," ").trim().toLowerCase()}let eq=null,er=null,es=null;function et(a){eq&&(eq.playbackRate=a)}function eu(){eq&&(eq.pause(),eq.currentTime=0,eq.onended=null,eq.onerror=null,eq.ontimeupdate=null,eq=null),er&&(URL.revokeObjectURL(er),er=null),es=null}function ev(a,b){es=null;let c=URL.createObjectURL(a);er=c;let d=new Audio(c);eq=d,b("playing"),d.onended=()=>{eu(),b("idle")},d.onerror=()=>{eu(),b("error","Audio playback failed")},d.play()}async function ew(a,b){let c;eu();let d={...em};if(!d.elevenLabsApiKey)return void b("error","No API key configured");let e=d.elevenLabsVoiceId,f=(h=d.elevenLabsModel,`${e}:${h}:${a}`),g=((c=eo.get(f))&&(eo.delete(f),eo.set(f,c)),c);if(g)return void ev(g.blob,b);b("loading");try{var h;let c=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${e}/with-timestamps?output_format=mp3_44100_128`,{method:"POST",headers:{"Content-Type":"application/json","xi-api-key":d.elevenLabsApiKey},body:JSON.stringify({text:a,model_id:d.elevenLabsModel})});if(!c.ok){let a=await c.text().catch(()=>c.statusText);throw Error(`ElevenLabs API error (${c.status}): ${a}`)}let{audio_base64:g,alignment:i}=await c.json(),j=atob(g),k=new Uint8Array(j.length);for(let a=0;a<j.length;a++)k[a]=j.charCodeAt(a);let l=new Blob([k],{type:"audio/mpeg"}),m={blob:l,alignment:{characters:i.characters,characterStartTimesSeconds:i.character_start_times_seconds,characterEndTimesSeconds:i.character_end_times_seconds},strippedText:a};if(eo.size>=10){let a=eo.keys().next().value;a&&eo.delete(a)}eo.set(f,m),ev(l,b)}catch(a){eu(),b("error",a instanceof Error?a.message:"TTS failed")}}async function ex(a,b){eu();let c=function(a){let b=ep(a);if(!b)return null;for(let a of eo.values()){let c=ep(a.strippedText).indexOf(b);if(-1===c)continue;let{strippedText:d,alignment:e}=a,f=[],g=0,h=!1;for(let a=0;a<d.length;a++)/\s/.test(d[a])?(!h&&g>0?(f.push(g),g++):f.push(-1),h=!0):(f.push(g),g++,h=!1);let i=c+b.length-1,j=-1,k=-1;for(let a=0;a<f.length;a++)f[a]===c&&-1===j&&(j=a),f[a]===i&&(k=a);if(-1===j||-1===k)continue;let l=e.characterStartTimesSeconds.length;if(0===l)continue;let m=Math.min(j,l-1),n=Math.min(k,e.characterEndTimesSeconds.length-1);if(!(m<0)&&!(n<0))return{blob:a.blob,startTime:e.characterStartTimesSeconds[m],endTime:e.characterEndTimesSeconds[n]}}return null}(a);if(c){let{blob:a,startTime:d,endTime:e}=c,f=URL.createObjectURL(a);er=f;let g=new Audio(f);eq=g,es=e,g.onended=()=>{eu(),b("idle")},g.onerror=()=>{eu(),b("error","Audio playback failed")},g.ontimeupdate=()=>{null!==es&&g.currentTime>=es&&(eu(),b("idle"))},g.currentTime=d,b("playing"),await g.play();return}await ew(a,b)}function ey(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=window.matchMedia("(max-width: 768px)");b(a.matches);let c=a=>b(a.matches);return a.addEventListener("change",c),()=>a.removeEventListener("change",c)},[]),a}let ez=[{label:"Normal",value:1},{label:"1.25x",value:1.25},{label:"1.5x",value:1.5},{label:"1.75x",value:1.75},{label:"2x",value:2}];function eA({node:a,onClose:d,repoUrl:e,onOpenSettings:f,onNavigate:g,navigationLabel:h}){let[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)("idle"),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(1),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(""),[u,v]=(0,c.useState)(!1),w=(0,c.useRef)(null),x=(0,c.useRef)(null),y=ey(),[z,A]=(0,c.useState)(null),B=(0,c.useRef)(null),C=(0,c.useRef)(!1),D=(0,c.useCallback)((a,b)=>{l(a),b&&n(b)},[]),E=(0,c.useCallback)(()=>{if(!en())return void f?.();let b=(a.description||"").replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/^[-*_]{3,}\s*$/gm,"").replace(/^>\s+/gm,"").replace(/^[\s]*[-*+]\s+/gm,"").replace(/^[\s]*\d+\.\s+/gm,"").replace(/<[^>]+>/g,"").replace(/\n{3,}/g,"\n\n").trim();b&&(n(null),ew(b,D))},[a.description,f,D]),F=(0,c.useCallback)(()=>{eu(),l("idle"),r(!1),v(!1)},[]),G=(0,c.useCallback)(()=>{eq&&!eq.paused&&eq.pause(),l("paused")},[]),H=(0,c.useCallback)(()=>{eq&&eq.paused&&eq.currentTime>0&&eq.play(),l("playing")},[]),I=(0,c.useCallback)(a=>{let b=Math.max(.25,Math.min(4,a));p(b),et(b),r(!1),v(!1)},[]);(0,c.useEffect)(()=>{"playing"===k&&et(o)},[k,o]),(0,c.useEffect)(()=>{if(!q)return;let a=a=>{x.current&&!x.current.contains(a.target)&&w.current&&!w.current.contains(a.target)&&(r(!1),v(!1))},b=setTimeout(()=>window.addEventListener("mousedown",a),50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[q]);let J=(0,c.useCallback)(()=>{setTimeout(()=>{let a=window.getSelection();if(!a||a.isCollapsed)return;let b=a.toString().trim();if(!(b.length<3))try{let c=a.getRangeAt(0).getBoundingClientRect();A({text:b,x:c.left+c.width/2,y:c.top-8})}catch{}},10)},[]);(0,c.useEffect)(()=>{if(y)return;let a=()=>{if(C.current)return;let a=window.getSelection();a&&!a.isCollapsed&&a.toString().trim()||A(null)};return document.addEventListener("selectionchange",a),()=>document.removeEventListener("selectionchange",a)},[y]);let K=(0,c.useCallback)(()=>{if(!z)return;let a=z.text;if(a.trim()){if(!en()){f?.(),A(null);return}C.current=!0,n(null),A(null),ex(a,D),setTimeout(()=>{C.current=!1},100)}},[z,f,D]);return((0,c.useEffect)(()=>()=>{eu(),r(!1),A(null)},[]),(0,c.useEffect)(()=>{let a=a=>{let b=a.target?.tagName;!("INPUT"===b||"TEXTAREA"===b||a.target?.isContentEditable)&&("Escape"===a.key?(a.preventDefault(),d()):"ArrowLeft"===a.key&&g?(a.preventDefault(),g("prev")):"ArrowRight"===a.key&&g&&(a.preventDefault(),g("next")))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d,g]),a.description)?(0,ej.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:d,children:[(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-2xl w-[90vw] max-w-2xl max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600 dark:text-emerald-400 shrink-0",children:a.id}),(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100 truncate",children:a.title})]}),g&&(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,b.jsx)("button",{onClick:()=>g("prev"),className:"p-1 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"Previous (←)",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),h&&(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 font-mono tabular-nums min-w-[3ch] text-center",children:h}),(0,b.jsx)("button",{onClick:()=>g("next"),className:"p-1 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"Next (→)",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,b.jsx)("button",{onClick:()=>{a.description&&navigator.clipboard.writeText(el(a,e)).then(()=>{j(!0),setTimeout(()=>j(!1),1500)})},className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:"Copy description",children:i?(0,b.jsx)("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),"loading"===k?(0,b.jsx)("button",{disabled:!0,className:"p-1 text-zinc-300 cursor-wait",title:"Loading audio...",children:(0,b.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:4}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):"playing"===k?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:G,className:"p-1 text-emerald-500 hover:text-amber-500 hover:bg-amber-50 rounded transition-colors",title:"Pause",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25v13.5m-7.5-13.5v13.5"})})}),(0,b.jsx)("button",{onClick:F,className:"p-1 text-zinc-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Stop",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})})})]}):"paused"===k?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:H,className:"p-1 text-amber-500 hover:text-emerald-500 hover:bg-emerald-50 rounded transition-colors",title:"Resume",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 010 1.972l-11.54 6.347a1.125 1.125 0 01-1.667-.986V5.653z"})})}),(0,b.jsx)("button",{onClick:F,className:"p-1 text-zinc-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",title:"Stop",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})})})]}):(0,b.jsx)("button",{onClick:E,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",title:"Read aloud",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})})}),("playing"===k||"loading"===k||"paused"===k)&&(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("button",{ref:w,onClick:()=>r(a=>!a),className:"px-1.5 py-0.5 text-[11px] font-mono font-medium rounded text-zinc-500 hover:text-zinc-700 hover:bg-zinc-100 transition-colors",title:"Playback speed",children:1===o?"1x":`${o}x`}),q&&(0,b.jsxs)("div",{ref:x,className:"absolute right-0 top-full mt-1 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-lg overflow-hidden z-[110]",style:{minWidth:150},onClick:a=>a.stopPropagation(),children:[ez.map(a=>(0,b.jsxs)("button",{onClick:()=>I(a.value),className:`w-full px-3 py-2 text-xs text-left flex items-center justify-between hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors ${o===a.value?"text-emerald-600 dark:text-emerald-400 font-medium":"text-zinc-700 dark:text-zinc-300"}`,children:[(0,b.jsx)("span",{children:a.label}),o===a.value&&(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})]},a.value)),(0,b.jsx)("div",{className:"border-t border-zinc-100 dark:border-zinc-800"}),u?(0,b.jsxs)("div",{className:"px-3 py-2 flex items-center gap-2",children:[(0,b.jsx)("input",{type:"number",min:.25,max:4,step:.25,value:s,onChange:a=>t(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=parseFloat(s);!isNaN(a)&&a>=.25&&a<=4&&I(a)}"Escape"===a.key&&(v(!1),r(!1))},onBlur:()=>{let a=parseFloat(s);!isNaN(a)&&a>=.25&&a<=4?I(a):v(!1)},autoFocus:!0,className:"w-16 rounded border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-2 py-1 text-xs text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-1 focus:ring-emerald-500"}),(0,b.jsx)("span",{className:"text-[11px] text-zinc-400 dark:text-zinc-400",children:"x"})]}):(0,b.jsxs)("button",{onClick:()=>{v(!0),t(String(o))},className:`w-full px-3 py-2 text-xs text-left flex items-center justify-between hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors ${!ez.some(a=>a.value===o)?"text-emerald-600 dark:text-emerald-400 font-medium":"text-zinc-700 dark:text-zinc-300"}`,children:[(0,b.jsxs)("span",{children:["Custom",ez.some(a=>a.value===o)?"...":` (${o}x)`]}),!ez.some(a=>a.value===o)&&(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})]})]})]}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})]}),m&&(0,b.jsxs)("div",{className:"px-5 py-2 text-xs text-red-500 bg-red-50 dark:bg-red-950 border-b border-red-100 dark:border-red-800 flex items-center justify-between",children:[(0,b.jsx)("span",{children:m}),(0,b.jsx)("button",{onClick:()=>n(null),className:"text-red-400 hover:text-red-600 ml-2",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 custom-scrollbar description-markdown text-sm text-zinc-700 dark:text-zinc-300 leading-relaxed",onMouseUp:y?void 0:J,children:[(0,b.jsx)(c6,{remarkPlugins:[ei],children:a.description}),a.acceptanceCriteria&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"border-t border-zinc-200 dark:border-zinc-700 my-4"}),(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Acceptance Criteria"}),(0,b.jsx)("pre",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800 overflow-x-auto",children:(0,b.jsx)("code",{className:"text-[11px] font-mono text-zinc-600 dark:text-zinc-300 whitespace-pre-wrap break-all",children:a.acceptanceCriteria})})]})]})]}),z&&!y&&(0,b.jsx)("div",{ref:B,className:"fixed z-[110] flex items-center gap-1.5 px-2.5 py-1.5 bg-zinc-800 text-white text-xs rounded-lg shadow-lg select-none",style:{left:z.x,top:z.y,transform:"translate(-50%, -100%)",pointerEvents:"auto"},onMouseDown:a=>a.stopPropagation(),onClick:a=>a.stopPropagation(),children:(0,b.jsxs)("button",{onClick:K,className:"flex items-center gap-1 hover:text-emerald-300 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})}),(0,b.jsx)("span",{children:"Read aloud"})]})})]}),document.body):null}function eB({className:a="w-3 h-3",filled:c=!1}){return c?(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"currentColor",children:(0,b.jsx)("path",{d:"M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z"})}):(0,b.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})})}function eC({node:a,allNodes:d,onNodeNavigate:i,comments:k,onPostComment:l,onDeleteComment:m,onLikeComment:n,onReplyComment:q,isAuthenticated:r,currentDid:s,repoUrls:t,onOpenSettings:u,onProfileClick:v}){var w;let x,y,[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(""),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),J=a=>{A(a.uri),C("")},K=()=>{A(null),C("")},L=async()=>{if(B.trim()&&z&&q){E(!0);try{let a=b=>{for(let c of b){if(c.uri===z)return c;let b=a(c.replies);if(b)return b}},b=k?a(k):void 0;b&&await q(b,B.trim()),A(null),C("")}catch(a){console.error("Failed to post reply:",a)}finally{E(!1)}}};if(!a)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("div",{className:"w-12 h-12 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center mb-4",children:(0,b.jsx)("svg",{className:"w-6 h-6 text-zinc-400 dark:text-zinc-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})})}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 leading-relaxed",children:"Click a node to see details"}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-1",children:"Hover to highlight connections"})]});let M=j[a.issueType]||"📋",N=e[a.status]||e.open,O=f[a.status]||a.status,P=g[a.priority]||`P${a.priority}`,Q=h[a.priority]||"#a1a1aa",R=o[a.prefix]||a.prefix,S=p[a.prefix]||"#a1a1aa",T=t?.[a.prefix],U=a.blockerIds.map(a=>d.find(b=>b.id===a)).filter(Boolean),V=a.dependentIds.map(a=>d.find(b=>b.id===a)).filter(Boolean),W=a=>{try{let b=new Date(a),c=b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),d=b.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!1});return`${c} at ${d}`}catch{return a}};return(0,b.jsxs)("div",{className:"animate-fade-in",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 mb-4",children:[(0,b.jsx)("span",{className:"text-2xl mt-0.5",children:M}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600 dark:text-emerald-400",children:a.id})}),(0,b.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100 mt-1 leading-snug",children:a.title})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[(0,b.jsxs)("span",{className:"status-badge",style:{backgroundColor:N+"18",color:N,border:`1px solid ${N}30`},children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mr-1.5",style:{backgroundColor:N}}),O]}),(0,b.jsx)("span",{className:"status-badge",style:{backgroundColor:Q+"15",color:Q,border:`1px solid ${Q}25`},children:P}),T?(0,b.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"status-badge hover:opacity-80 transition-opacity",style:{backgroundColor:S+"15",color:S,border:`1px solid ${S}25`,textDecoration:"none"},children:[R,(0,b.jsx)("svg",{className:"w-2.5 h-2.5 ml-1 opacity-50",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]}):(0,b.jsx)("span",{className:"status-badge",style:{backgroundColor:S+"15",color:S,border:`1px solid ${S}25`},children:R})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:a.labels.map(a=>(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium bg-zinc-100 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400 border border-zinc-200/60 dark:border-zinc-700/60",children:a},a))}),T&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),T.replace(/^https?:\/\//,"")]})}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[(0,b.jsx)(eE,{label:"Blocks",value:a.blockerCount,color:a.blockerCount>0?"#f59e0b":void 0}),(0,b.jsx)(eE,{label:"Blocked by",value:a.dependentCount,color:a.dependentCount>0?"#ef4444":void 0})]}),(0,b.jsxs)("div",{className:"space-y-1.5 mb-4 text-xs text-zinc-500 dark:text-zinc-400",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Created"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.createdAt)})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Updated"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.updatedAt)})]}),a.closedAt&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Closed"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:W(a.closedAt)})]}),a.closeReason&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Reason"}),(0,b.jsx)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium ml-2 text-right",children:(w=a.closeReason,x=T||"https://github.com/GainForest/heartbeads",1===(y=w.split(/\b([0-9a-f]{7,40})\b/)).length?w:y.map((a,c)=>/^[0-9a-f]{7,40}$/.test(a)?(0,b.jsx)("a",{href:`${x}/commit/${a}`,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 underline decoration-emerald-300 hover:decoration-emerald-500 cursor-pointer transition-colors",children:a},c):(0,b.jsx)("span",{children:a},c)))})]}),(a.createdBy||a.owner||a.assignee)&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Created by"}),(0,b.jsx)("button",{onClick:()=>v?.(a.createdBy||a.owner||a.assignee||""),className:"text-zinc-700 dark:text-zinc-300 font-medium truncate ml-2 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.createdBy||a.owner||a.assignee})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Assignee"}),a.assignee?(0,b.jsx)("button",{onClick:()=>v?.(a.assignee),className:"text-zinc-700 dark:text-zinc-300 font-medium truncate ml-2 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.assignee}):(0,b.jsx)("span",{className:"text-zinc-400 dark:text-zinc-500 italic ml-2",children:"No assignee"})]}),null!=a.estimatedMinutes&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{children:"Estimate"}),(0,b.jsxs)("span",{className:"text-zinc-700 dark:text-zinc-300 font-medium",children:["⏱ ",a.estimatedMinutes,"m"]})]})]}),a.description&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",children:"Description"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>{if(!a.description)return;let b=t?.[a.prefix];navigator.clipboard.writeText(el(a,b)).then(()=>{I(!0),setTimeout(()=>I(!1),1500)})},className:"text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:"Copy description",children:H?(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),(0,b.jsx)("button",{onClick:()=>G(!0),className:"text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:"View in window"})]})]}),(0,b.jsx)("div",{className:"text-xs text-zinc-600 dark:text-zinc-300 leading-relaxed bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 max-h-40 overflow-y-auto custom-scrollbar border border-zinc-100 dark:border-zinc-800 description-markdown",children:(0,b.jsx)(c6,{remarkPlugins:[ei],children:a.description})})]}),F&&a.description&&(0,b.jsx)(eA,{node:a,onClose:()=>G(!1),repoUrl:t?.[a.prefix],onOpenSettings:u}),a.acceptanceCriteria&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Acceptance Criteria"}),(0,b.jsx)("pre",{className:"text-[11px] font-mono bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800 overflow-x-auto whitespace-pre-wrap break-all",children:(0,b.jsx)("code",{children:a.acceptanceCriteria})})]}),U.length>0&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Blocks (",U.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:U.map(a=>(0,b.jsx)(eF,{node:a,onClick:()=>i(a.id)},a.id))})]}),V.length>0&&(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Blocked by (",V.length,")"]}),(0,b.jsx)("div",{className:"space-y-1",children:V.map(a=>(0,b.jsx)(eF,{node:a,onClick:()=>i(a.id)},a.id))})]}),(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2",children:["Comments"," ",k&&k.length>0&&(0,b.jsx)("span",{className:"ml-1 px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:k.length})]}),k&&k.length>0?(0,b.jsx)("div",{className:"space-y-1",children:k.map(a=>(0,b.jsx)(eG,{comment:a,currentDid:s,isAuthenticated:r,onDelete:m,onLike:n,onStartReply:J,replyingToUri:z,replyText:B,onReplyTextChange:C,onSubmitReply:L,onCancelReply:K,isSubmittingReply:D,depth:0},a.uri))}):(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 italic",children:"No comments yet"}),r&&l?(0,b.jsx)(eH,{onSubmit:l}):r?null:(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-2",children:"Sign in to leave a comment"})]})]})}function eD({replyingTo:a,replyText:c,onTextChange:d,onSubmit:e,onCancel:f,isSubmitting:g}){return(0,b.jsxs)("div",{className:"mt-2 ml-4 pl-3 border-l border-emerald-200 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-zinc-400 dark:text-zinc-500",children:[(0,b.jsx)("span",{children:"Replying to"}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-600 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||e()},placeholder:"Write a reply...",disabled:g,autoFocus:!0,className:"flex-1 px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:border-emerald-400 disabled:opacity-50"}),(0,b.jsx)("button",{onClick:e,disabled:!c.trim()||g,className:"px-2 py-1 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:g?"...":"Reply"}),(0,b.jsx)("button",{onClick:f,disabled:g,className:"px-2 py-1 text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 disabled:opacity-50 transition-colors",children:"Cancel"})]})]})}function eE({label:a,value:c,color:d}){return(0,b.jsxs)("div",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg p-3 border border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"text-xl font-bold",style:{color:d||"#3f3f46"},children:c}),(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 uppercase tracking-wider mt-0.5",children:a})]})}function eF({node:a,onClick:c}){let d=e[a.status]||e.open;return(0,b.jsxs)("button",{onClick:c,className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors text-left group border border-transparent hover:border-zinc-200 dark:hover:border-zinc-700",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:d}}),(0,b.jsx)("span",{className:"text-xs font-mono text-emerald-600 dark:text-emerald-400 group-hover:text-emerald-700 dark:group-hover:text-emerald-300 shrink-0",children:a.id}),(0,b.jsx)("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 truncate",children:a.title})]})}function eG({comment:a,currentDid:d,isAuthenticated:e,onDelete:f,onLike:g,onStartReply:h,replyingToUri:i,replyText:j,onReplyTextChange:k,onSubmitReply:l,onCancelReply:m,isSubmittingReply:n,depth:o}){let[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(!1),t=d&&d===a.did,u=!!d&&a.likes.some(a=>a.did===d),v=i===a.uri,w=async()=>{if(f&&!p){q(!0);try{await f(a)}catch(a){console.error("Failed to delete comment:",a)}finally{q(!1)}}},x=async()=>{if(g&&!r){s(!0);try{await g(a)}catch(a){console.error("Failed to toggle like:",a)}finally{s(!1)}}};return(0,b.jsxs)("div",{className:`${o>0?"ml-4 pl-3 border-l border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle||a.did.slice(0,16)+"..."}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 shrink-0",children:ek(a.createdAt)})]}),(0,b.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed whitespace-pre-wrap break-words",children:a.text}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,b.jsxs)("button",{onClick:x,disabled:!e||r,className:`flex items-center gap-0.5 transition-colors ${u?"text-rose-500":"text-zinc-300 hover:text-rose-500"} disabled:opacity-50`,children:[(0,b.jsx)(eB,{className:"w-3 h-3",filled:u}),a.likes.length>0&&(0,b.jsx)("span",{children:a.likes.length})]}),(0,b.jsx)("button",{onClick:()=>h(a),disabled:!e,className:`transition-colors disabled:opacity-50 ${v?"text-emerald-500 dark:text-emerald-400":"text-zinc-300 dark:text-zinc-600 hover:text-zinc-500 dark:hover:text-zinc-400"}`,children:"reply"}),t&&f&&(0,b.jsx)("button",{onClick:w,disabled:p,className:"ml-auto shrink-0 text-zinc-300 dark:text-zinc-600 hover:text-red-400 disabled:opacity-50 transition-colors",children:p?"...":"delete"})]})]}),v&&(0,b.jsx)(eD,{replyingTo:a,replyText:j,onTextChange:k,onSubmit:l,onCancel:m,isSubmitting:n}),a.replies.length>0&&(0,b.jsx)("div",{children:a.replies.map(a=>(0,b.jsx)(eG,{comment:a,currentDid:d,isAuthenticated:e,onDelete:f,onLike:g,onStartReply:h,replyingToUri:i,replyText:j,onReplyTextChange:k,onSubmitReply:l,onCancelReply:m,isSubmittingReply:n,depth:o+1},a.uri))})]})}function eH({onSubmit:a}){let[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(!1),h=async()=>{if(d.trim()&&!f){g(!0);try{await a(d.trim()),e("")}catch(a){console.error("Failed to post comment:",a)}finally{g(!1)}}};return(0,b.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,b.jsx)("textarea",{value:d,onChange:a=>e(a.target.value),placeholder:"Leave a comment...",rows:2,className:"w-full px-2.5 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsx)("button",{onClick:h,disabled:!d.trim()||f,className:"px-3 py-1 text-xs font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:f?"Sending...":"Comment"})]})}var eI=a.i(27833);function eJ({onViewProfile:a}){let{isAuthenticated:d,isLoading:e,session:f,login:g,logout:h}=(0,eI.useAuth)(),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)(""),s=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!k)return;let a=a=>{s.current&&!s.current.contains(a.target)&&l(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[k]);let t=async a=>{if(a.preventDefault(),m.trim()){p(!0),r("");try{await g(m.trim())}catch(a){r(a instanceof Error?a.message:"Login failed"),p(!1)}}},u=async()=>{l(!1),await h()};return e?(0,b.jsx)("div",{className:"w-4 h-4 rounded-full border-2 border-zinc-200 border-t-zinc-400 animate-spin"}):d&&f?(0,b.jsxs)("div",{className:"relative",ref:s,children:[(0,b.jsxs)("button",{onClick:()=>l(a=>!a),className:"flex items-center gap-2 px-3 py-1.5 rounded-full hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:[f.avatar?(0,b.jsx)("img",{src:f.avatar,alt:f.handle,width:24,height:24,className:"rounded-full"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-emerald-100 dark:bg-emerald-950 flex items-center justify-center text-[11px] text-emerald-700 dark:text-emerald-400 font-medium",children:(f.displayName||f.handle).charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-400 max-w-[100px] truncate",children:f.displayName||f.handle})]}),k&&(0,b.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-44 bg-white dark:bg-zinc-900 rounded-xl shadow-xl border border-zinc-100 dark:border-zinc-700 py-2 z-50",children:[(0,b.jsxs)("button",{onClick:()=>{a?(a(f.handle),l(!1)):window.open(f.did?`https://www.impactindexer.org/data?did=${f.did}`:"#","_blank")},className:"block w-full text-left px-3 py-1.5 text-xs text-zinc-400 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors cursor-pointer",children:["@",f.handle]}),(0,b.jsx)("div",{className:"h-px bg-zinc-100 dark:border-zinc-800 my-1"}),(0,b.jsxs)("button",{onClick:u,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"})}),"Sign out"]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>j(!0),className:"px-4 py-1.5 text-sm font-medium text-zinc-600 dark:text-zinc-400 rounded-full hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer whitespace-nowrap",children:"Sign in"}),i&&(0,b.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",onClick:()=>j(!1),children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),(0,b.jsxs)("div",{className:"relative w-full max-w-sm mx-4 bg-white dark:bg-zinc-900 rounded-xl shadow-lg border border-zinc-200 dark:border-zinc-700 p-6",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100 mb-1",children:"Sign in with ATProto"}),(0,b.jsx)("p",{className:"text-sm text-zinc-400 dark:text-zinc-400 mb-5",children:"Enter your Bluesky handle to connect."}),(0,b.jsxs)("form",{onSubmit:t,children:[(0,b.jsx)("label",{htmlFor:"auth-handle",className:"block text-sm text-zinc-600 dark:text-zinc-400 mb-1.5",children:"Handle"}),(0,b.jsx)("input",{id:"auth-handle",type:"text",value:m,onChange:a=>n(a.target.value),placeholder:"alice.bsky.social",disabled:o,autoFocus:!0,className:"w-full px-3 py-2 text-sm bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-lg placeholder:text-zinc-300 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed text-zinc-900 dark:text-zinc-100"}),(0,b.jsx)("p",{className:"text-xs text-zinc-300 dark:text-zinc-500 mt-1.5",children:"Just a username? We'll add .bsky.social for you."}),q&&(0,b.jsx)("p",{className:"text-sm text-red-500 mt-2",children:q}),(0,b.jsxs)("div",{className:"flex gap-2 mt-5",children:[(0,b.jsx)("button",{type:"button",onClick:()=>j(!1),disabled:o,className:"flex-1 px-3 py-2 text-sm text-zinc-600 dark:text-zinc-400 bg-zinc-50 dark:bg-zinc-800 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),(0,b.jsx)("button",{type:"submit",disabled:o||!m.trim(),className:"flex-1 px-3 py-2 text-sm text-white bg-emerald-600 rounded-lg hover:bg-emerald-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Connecting...":"Connect"})]})]})]})]})]})}var eK=a.i(88467);function eL({node:a,x:d,y:e,onClose:f,onSubmit:g,isAuthenticated:h,existingComments:i}){let[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(!1),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[q,r]=(0,c.useState)({x:0,y:0}),[s,t]=(0,c.useState)(!1),u=ey();(0,c.useEffect)(()=>{if(!n.current)return;let a=n.current.getBoundingClientRect(),b=window.innerWidth,c=window.innerHeight,f=d+14,g=e-a.height-14;f+a.width>b-16&&(f=b-a.width-16),f<16&&(f=16),g<16&&(g=e+28),g+a.height>c-16&&(g=c-a.height-16),r({x:f,y:g}),t(!0)},[d,e]),(0,c.useEffect)(()=>{if(h){let a=setTimeout(()=>o.current?.focus(),100);return()=>clearTimeout(a)}},[h]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&f()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[f]),(0,c.useEffect)(()=>{let a=a=>{n.current&&!n.current.contains(a.target)&&f()},b=setTimeout(()=>{window.addEventListener("mousedown",a)},50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[f]);let v=(0,c.useCallback)(async()=>{if(j.trim()&&!l){m(!0);try{await g(j.trim()),k("")}catch(a){console.error("Failed to post comment:",a)}finally{m(!1)}}},[j,l,g]),w=(0,c.useCallback)(a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&(a.preventDefault(),v())},[v]),x=p[a.prefix]||"#a1a1aa",y=i?.length||0,z=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mb-3",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-emerald-600 dark:text-emerald-400",children:a.id}),(0,b.jsx)("h3",{className:"text-sm font-semibold text-zinc-800 dark:text-zinc-200 leading-tight mt-0.5",children:a.title})]}),y>0&&i&&(0,b.jsxs)("div",{className:"mb-3 pb-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-blue-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),(0,b.jsxs)("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",children:[y," comment",1!==y?"s":""]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[i.slice(0,2).map(a=>(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden mt-0.5",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[7px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle}),(0,b.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400 line-clamp-2 leading-tight",children:a.text})]})]},a.uri)),y>2&&(0,b.jsxs)("p",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 italic",children:["+",y-2," more — see detail panel"]})]})]}),h?(0,b.jsxs)("div",{children:[(0,b.jsx)("textarea",{ref:o,value:j,onChange:a=>k(a.target.value),onKeyDown:w,placeholder:"Leave a comment...",rows:3,className:"w-full px-2.5 py-2 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","+Enter to send"]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:f,className:"px-2.5 py-1 text-[11px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:"Cancel"}),(0,b.jsx)("button",{onClick:v,disabled:!j.trim()||l,className:"px-3 py-1 text-[11px] font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsxs)("svg",{className:"w-3 h-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Sending"]}):"Send"})]})]})]}):(0,b.jsxs)("div",{className:"text-center py-3",children:[(0,b.jsx)("svg",{className:"w-5 h-5 text-zinc-300 dark:text-zinc-600 mx-auto mb-1.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:"Sign in to comment"})]})]});return u?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[99] bg-black/20",onClick:f}),(0,b.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-[100] bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl animate-slide-up-sheet",children:[(0,b.jsx)("div",{className:"w-10 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full mx-auto mt-3 mb-1"}),(0,b.jsx)("div",{className:"px-4 pb-6 pt-2",children:z}),(0,b.jsx)("div",{className:"h-[env(safe-area-inset-bottom)]"})]})]}):(0,b.jsxs)("div",{ref:n,style:{position:"fixed",left:q.x,top:q.y,width:320,zIndex:100,opacity:+!!s,transform:s?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease"},className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg overflow-hidden",onContextMenu:a=>a.preventDefault(),children:[(0,b.jsx)("style",{children:`
2
2
  .comment-tooltip-shadow {
3
3
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.08);
4
4
  }
5
- `}),(0,b.jsxs)("div",{className:"comment-tooltip-shadow p-[18px_20px]",children:[(0,b.jsx)("div",{className:"rounded-sm mb-2.5",style:{width:24,height:2,background:x,opacity:.6}}),z]})]})}function eM({node:a,x:d,y:e,onShowDescription:f,onAddComment:g,onClaimTask:h,onUnclaimTask:i,onCollapseEpic:j,onUncollapseEpic:k,onFocusEpic:l,onExitFocusEpic:m,onClose:n}){let o=(0,c.useRef)(null),[p,q]=(0,c.useState)({x:0,y:0}),[r,s]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!o.current)return;let a=o.current.getBoundingClientRect(),b=window.innerWidth,c=window.innerHeight,f=d+4,g=e+4;f+a.width>b-16&&(f=b-a.width-16),f<16&&(f=16),g+a.height>c-16&&(g=c-a.height-16),g<16&&(g=16),q({x:f,y:g}),s(!0)},[d,e]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&n()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]),(0,c.useEffect)(()=>{let a=a=>{o.current&&!o.current.contains(a.target)&&n()},b=setTimeout(()=>window.addEventListener("mousedown",a),50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[n]),(0,b.jsx)("div",{ref:o,style:{position:"fixed",left:p.x,top:p.y,zIndex:100,opacity:+!!r,transform:r?"translateY(0)":"translateY(2px)",transition:"opacity 0.15s ease, transform 0.15s ease"},onContextMenu:a=>a.preventDefault(),children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg overflow-hidden",style:{minWidth:180,boxShadow:"0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.06)"},children:[a.description&&(0,b.jsxs)("button",{onClick:f,className:"w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Show description"]}),(0,b.jsxs)("button",{onClick:g,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${h||i||j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),"Add comment"]}),h&&(0,b.jsxs)("button",{onClick:h,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),"Claim task"]}),i&&(0,b.jsxs)("button",{onClick:i,className:`w-full px-3 py-2.5 text-xs text-red-500 hover:bg-red-50 dark:hover:bg-red-950 flex items-center gap-2 transition-colors${j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-red-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})}),"Unclaim task"]}),j&&(0,b.jsxs)("button",{onClick:j,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),"Collapse epic"]}),k&&(0,b.jsxs)("button",{onClick:k,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Uncollapse epic"]}),l&&(0,b.jsxs)("button",{onClick:l,className:"w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),"Focus on epic"]}),m&&(0,b.jsxs)("button",{onClick:m,className:"w-full px-3 py-2.5 text-xs text-emerald-600 dark:text-emerald-400 hover:bg-emerald-50 dark:hover:bg-emerald-950 flex items-center gap-2 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500 dark:text-emerald-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Show full graph"]})]})})}function eN({node:a,x:d,y:e,prefixColor:f,allNodes:i,theme:j}){let k="dark"===j?{bg:"#18181b",border:"#3f3f46",borderLight:"#27272a",shadow:"rgba(0,0,0,0.3)",text:"#f4f4f5",textMuted:"#a1a1aa",textDim:"#71717a"}:{bg:"#FFFFFF",border:"#E5E7EB",borderLight:"#F3F4F6",shadow:"rgba(0,0,0,0.08)",text:"#131316",textMuted:"#737680",textDim:"#7F818B"},l=(0,c.useRef)(null),[n,o]=(0,c.useState)({x:0,y:0});(0,c.useEffect)(()=>{if(!l.current)return;let a=l.current.getBoundingClientRect(),b=d+14,c=e-a.height-14;b+a.width>window.innerWidth-16&&(b=d-a.width-14),b<16&&(b=16),c<16&&(c=e+14+8),c+a.height>window.innerHeight-16&&(c=window.innerHeight-a.height-16),o({x:b,y:c})},[d,e]);let p=a.dependentIds.map(a=>{let b=i.find(b=>b.id===a);return b?{id:a,title:b.title}:{id:a,title:a}}).filter(Boolean),q=g[a.priority]||`P${a.priority}`,r=h[a.priority]||"#a1a1aa",s={fontSize:10,fontWeight:600,letterSpacing:1.5,textTransform:"uppercase",color:"dark"===j?"#71717a":"#7F818B",marginBottom:3},t={fontSize:12,color:"dark"===j?"#a1a1aa":"#737680",lineHeight:1.45};return(0,b.jsxs)("div",{ref:l,className:"bead-tooltip",style:{position:"fixed",left:n.x,top:n.y,width:280,zIndex:100,pointerEvents:"none",background:k.bg,border:`1px solid ${k.border}`,boxShadow:`0 8px 32px ${k.shadow}, 0 2px 8px ${k.shadow}`,borderRadius:8,padding:"16px 18px",animation:"beadTooltipFade 0.2s ease"},children:[(0,b.jsx)("div",{style:{width:24,height:2,background:f,opacity:.5,marginBottom:8,borderRadius:1}}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:600,color:f,letterSpacing:.5,textTransform:"uppercase"},children:m(a.prefix)}),(0,b.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:k.textDim},children:a.id})]}),(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600,color:k.text,lineHeight:1.25,marginBottom:12,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:a.title}),a.labels.length>0&&(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:10},children:[a.labels.slice(0,3).map(a=>(0,b.jsx)("span",{style:{fontSize:10,fontWeight:500,color:"dark"===j?"#a1a1aa":"#52525b",backgroundColor:"dark"===j?"#27272a":"#f4f4f5",border:"dark"===j?"1px solid #3f3f46":"1px solid #e4e4e7",borderRadius:9999,padding:"1px 7px",lineHeight:"16px"},children:a},a)),a.labels.length>3&&(0,b.jsxs)("span",{style:{fontSize:10,color:"#a1a1aa",lineHeight:"18px"},children:["+",a.labels.length-3," more"]})]}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[null!=a.estimatedMinutes&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Estimate"}),(0,b.jsxs)("div",{style:t,children:["⏱ ",a.estimatedMinutes,"m"]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Created"}),(0,b.jsx)("div",{style:t,children:ek(a.createdAt)})]}),a.owner&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Owner"}),(0,b.jsx)("div",{style:t,children:a.owner})]}),(a.assignee||a.createdBy)&&(0,b.jsxs)("div",{children:[a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:s,children:"Assignee"}),(0,b.jsx)("div",{style:t,children:a.assignee})]}),a.createdBy&&!a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:s,children:"Created by"}),(0,b.jsx)("div",{style:t,children:a.createdBy})]}),a.createdBy&&a.assignee&&a.createdBy!==a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{...s,marginTop:4},children:"Created by"}),(0,b.jsx)("div",{style:t,children:a.createdBy})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Blocked by"}),0===p.length?(0,b.jsx)("div",{style:{...t,color:"#10b981"},children:"None"}):(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:p.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,b.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:k.textDim,flexShrink:0},children:a.id}),(0,b.jsx)("span",{style:{fontSize:12,color:k.textMuted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.title})]},a.id))})]}),(0,b.jsxs)("div",{style:{borderTop:`1px solid ${k.borderLight}`,paddingTop:8},children:[(0,b.jsx)("div",{style:s,children:"Priority"}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:r,flexShrink:0}}),(0,b.jsx)("span",{style:t,children:q})]})]})]})]})}function eO({isOpen:a,onClose:d,allComments:e,onNodeNavigate:f,isAuthenticated:g,currentDid:h,onLikeComment:i,onDeleteComment:j,onReplyComment:k,onPostComment:l,prefixes:m}){let[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(""),v=(a,b)=>{for(let c of a){if(c.uri===b)return c;let a=v(c.replies,b);if(a)return a}return null},w=async()=>{if(!p.trim()||!n||!k)return;let a=v(e,n);if(a){s(!0);try{await k(a,p.trim()),o(null),q("")}catch(a){console.error("Failed to post reply:",a)}finally{s(!1)}}},x=(0,c.useMemo)(()=>{if(!t.trim())return e;let a=RegExp("^"+t.trim().replace(/[.+^()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$","i");return e.filter(b=>a.test(b.nodeId))},[e,t]);return(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"All Comments"}),(t?x.length:e.length)>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:t?x.length:e.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"shrink-0 px-5 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{type:"text",value:t,onChange:a=>u(a.target.value),placeholder:"Filter by target (e.g. beads-map-*)",className:"w-full pl-7 pr-7 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsx)("svg",{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"})}),t&&(0,b.jsx)("button",{onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),m&&m.length>1&&!t&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:m.map(a=>(0,b.jsxs)("button",{onClick:()=>u(a+"-*"),className:"px-1.5 py-0.5 text-[10px] font-mono bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors",children:[a,"-*"]},a))})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-3",children:0===x.length&&t?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsxs)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["No comments matching “",t,"”"]}),(0,b.jsx)("button",{onClick:()=>u(""),className:"text-[10px] text-emerald-600 dark:text-emerald-400 hover:underline mt-1",children:"Clear filter"})]}):0===x.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("svg",{className:"w-8 h-8 text-zinc-200 dark:text-zinc-700 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:"No comments yet"}),(0,b.jsx)("p",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 mt-1",children:"Right-click a node to leave a comment"})]}):(0,b.jsx)("div",{className:"space-y-0",children:x.filter(a=>!a.replyTo).map(a=>(0,b.jsx)(eP,{comment:a,currentDid:h,isAuthenticated:g,onNodeNavigate:f,onLike:i,onDelete:j,onStartReply:a=>o(a.uri),replyingToUri:n,replyText:p,onReplyTextChange:q,onSubmitReply:w,onCancelReply:()=>{o(null),q("")},isSubmittingReply:r,depth:0,prefixes:m},a.uri))})}),(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50",children:[g?(0,b.jsx)(eR,{prefixes:m||[],onSubmit:l}):(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"Sign in to comment"}),(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 mt-2",children:t?(0,b.jsxs)(b.Fragment,{children:[x.length," of ",e.length," comments matching “",t,"”"]}):(0,b.jsxs)(b.Fragment,{children:[e.length," comment",1!==e.length?"s":""," across all issues"]})})]})]})}function eP({comment:a,currentDid:d,isAuthenticated:e,onNodeNavigate:f,onLike:g,onDelete:h,onStartReply:i,replyingToUri:j,replyText:k,onReplyTextChange:l,onSubmitReply:m,onCancelReply:n,isSubmittingReply:o,depth:p,prefixes:q}){let[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(!1),v=d&&d===a.did,w=!!d&&a.likes.some(a=>a.did===d),x=j===a.uri,y=async()=>{if(g&&!r){s(!0);try{await g(a)}catch(a){console.error("Failed to toggle like:",a)}finally{s(!1)}}},z=async()=>{if(h&&!t){u(!0);try{await h(a)}catch(a){console.error("Failed to delete comment:",a)}finally{u(!1)}}};return(0,b.jsxs)("div",{className:`${p>0?"ml-4 pl-3 border-l border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsxs)("div",{className:`py-3 ${0===p?"border-b border-zinc-50 dark:border-zinc-800":""}`,children:[0===p&&(q?.includes(a.nodeId)?(0,b.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 mb-1.5 rounded text-[10px] font-mono bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400",children:["📢 ",a.nodeId]}):(0,b.jsx)("button",{onClick:()=>f(a.nodeId),className:"inline-flex items-center px-1.5 py-0.5 mb-1.5 rounded text-[10px] font-mono bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 hover:bg-emerald-100 dark:hover:bg-emerald-900 transition-colors",children:a.nodeId})),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle||a.did.slice(0,16)+"..."}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 shrink-0",children:ek(a.createdAt)})]}),(0,b.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed whitespace-pre-wrap break-words",children:a.text}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,b.jsxs)("button",{onClick:y,disabled:!e||r,className:`flex items-center gap-0.5 transition-colors ${w?"text-rose-500":"text-zinc-300 dark:text-zinc-600 hover:text-rose-500"} disabled:opacity-50`,children:[(0,b.jsx)(eB,{className:"w-3 h-3",filled:w}),a.likes.length>0&&(0,b.jsx)("span",{children:a.likes.length})]}),(0,b.jsx)("button",{onClick:()=>i(a),disabled:!e,className:`transition-colors disabled:opacity-50 ${x?"text-emerald-500 dark:text-emerald-400":"text-zinc-300 dark:text-zinc-600 hover:text-zinc-500 dark:hover:text-zinc-400"}`,children:"reply"}),v&&h&&(0,b.jsx)("button",{onClick:z,disabled:t,className:"ml-auto text-zinc-300 dark:text-zinc-600 hover:text-red-400 disabled:opacity-50 transition-colors",children:t?"...":"delete"})]})]}),x&&(0,b.jsx)(eQ,{replyingTo:a,replyText:k,onTextChange:l,onSubmit:m,onCancel:n,isSubmitting:o}),a.replies.length>0&&(0,b.jsx)("div",{children:a.replies.map(a=>(0,b.jsx)(eP,{comment:a,currentDid:d,isAuthenticated:e,onNodeNavigate:f,onLike:g,onDelete:h,onStartReply:i,replyingToUri:j,replyText:k,onReplyTextChange:l,onSubmitReply:m,onCancelReply:n,isSubmittingReply:o,depth:p+1,prefixes:q},a.uri))})]})}function eQ({replyingTo:a,replyText:c,onTextChange:d,onSubmit:e,onCancel:f,isSubmitting:g}){return(0,b.jsxs)("div",{className:"mt-2 ml-4 pl-3 border-l border-emerald-200 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-zinc-400 dark:text-zinc-500",children:[(0,b.jsx)("span",{children:"Replying to"}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-600 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||e()},placeholder:"Write a reply...",disabled:g,autoFocus:!0,className:"flex-1 px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:border-emerald-400 disabled:opacity-50"}),(0,b.jsx)("button",{onClick:e,disabled:!c.trim()||g,className:"px-2 py-1 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:g?"...":"Reply"}),(0,b.jsx)("button",{onClick:f,disabled:g,className:"px-2 py-1 text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 disabled:opacity-50 transition-colors",children:"Cancel"})]})]})}function eR({prefixes:a,onSubmit:d}){let[e,f]=(0,c.useState)(""),[g,h]=(0,c.useState)(a[0]||""),[i,j]=(0,c.useState)(!1);(0,c.useEffect)(()=>{1===a.length&&h(a[0])},[a]);let k=async()=>{if(e.trim()&&g&&d){j(!0);try{await d(g,e.trim()),f("")}catch(a){console.error("Failed to post comment:",a)}finally{j(!1)}}};return(0,b.jsxs)("div",{children:[a.length>1&&(0,b.jsx)("select",{value:g,onChange:a=>h(a.target.value),className:"w-full mb-2 px-2 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-white dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300",children:a.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)("textarea",{value:e,onChange:a=>f(a.target.value),onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&(a.preventDefault(),k())},placeholder:"Write a comment...",rows:2,className:"w-full px-2.5 py-2 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-white dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500"}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1.5",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","+Enter to send",a.length<=1&&g&&(0,b.jsxs)(b.Fragment,{children:[" · posting to ",(0,b.jsx)("span",{className:"font-medium text-zinc-400",children:g})]})]}),(0,b.jsx)("button",{onClick:k,disabled:!e.trim()||!g||i,className:"px-3 py-1 text-[11px] font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:i?"Sending...":"Send"})]})]})}function eS({type:a,className:c}){let d=c||"w-3.5 h-3.5 shrink-0";switch(a){case"node-created":return(0,b.jsxs)("svg",{className:`${d} text-emerald-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("line",{x1:"8",y1:"5",x2:"8",y2:"11"}),(0,b.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8"})]});case"node-closed":return(0,b.jsxs)("svg",{className:`${d} text-zinc-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"5.5,8 7.5,10 10.5,6"})]});case"node-status-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M3 8h10M10 5l3 3-3 3"})});case"node-priority-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M8 3v7M5 6l3-3 3 3M4 13h8"})});case"node-title-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M3 4h10M3 8h6M3 12h8"})});case"node-owner-changed":return(0,b.jsxs)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,b.jsx)("path",{d:"M1.5 13c0-2 1.8-3.5 4.5-3.5M10 9l2 2 3-3"})]});case"node-assignee-changed":return(0,b.jsxs)("svg",{className:`${d} text-violet-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,b.jsx)("path",{d:"M1.5 13c0-2 1.8-3.5 4.5-3.5M10 8l2 2 2-2M12 10V5"})]});case"link-added":return(0,b.jsx)("svg",{className:`${d} text-blue-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M6.5 9.5l3-3M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"})});case"link-removed":return(0,b.jsxs)("svg",{className:`${d} text-red-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("path",{d:"M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"}),(0,b.jsx)("line",{x1:"3",y1:"3",x2:"13",y2:"13",strokeWidth:"1.5"})]});case"comment-added":case"reply-added":return(0,b.jsx)("svg",{className:`${d} text-blue-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M2 4.5a1.5 1.5 0 011.5-1.5h9A1.5 1.5 0 0114 4.5v5a1.5 1.5 0 01-1.5 1.5H5L2 14V4.5z"})});case"task-claimed":return(0,b.jsxs)("svg",{className:`${d} text-emerald-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,b.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"})]});case"task-unclaimed":return(0,b.jsxs)("svg",{className:`${d} text-red-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,b.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"}),(0,b.jsx)("line",{x1:"11",y1:"3",x2:"13",y2:"5"})]});case"like-added":return(0,b.jsx)("svg",{className:`${d} text-rose-400`,viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M8 13.7l-.6-.5C4 10.2 2 8.3 2 6a3 3 0 016-1 3 3 0 016 1c0 2.3-2 4.2-5.4 7.2l-.6.5z"})})}}function eT(a){switch(a){case"node-created":case"task-claimed":return"bg-emerald-400";case"node-closed":return"bg-zinc-300";case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":return"bg-amber-400";case"node-assignee-changed":return"bg-violet-400";case"link-added":case"comment-added":case"reply-added":return"bg-blue-400";case"link-removed":case"task-unclaimed":return"bg-red-300";case"like-added":return"bg-rose-300"}}function eU(a){switch(a.type){case"node-created":{let b=a.meta?.issueType||"task";return`created a ${b}`}case"node-closed":return`closed this${a.detail&&"Closed"!==a.detail?` (${a.detail})`:""}`;case"node-status-changed":return a.detail?`changed status ${a.detail}`:"changed status";case"node-priority-changed":return`changed priority ${a.detail||""}`.trim();case"node-title-changed":return"updated the title";case"node-owner-changed":return`changed owner ${a.detail||""}`.trim();case"node-assignee-changed":{let b=a.meta?.to,c=a.meta?.from;if(b&&!c)return`assigned ${b}`;if(!b&&c)return`unassigned ${c}`;if(b)return`reassigned to ${b}`;return"changed assignee"}case"link-added":return`added a dependency on ${a.meta?.target||""}`;case"link-removed":return`removed dependency on ${a.meta?.target||""}`;case"comment-added":return a.detail?`commented: "${a.detail}"`:"commented";case"reply-added":return a.detail?`replied: "${a.detail}"`:"replied";case"task-claimed":return"claimed this task";case"task-unclaimed":return"unclaimed this task";case"like-added":return a.detail||"liked a comment";default:return a.detail||"updated"}}function eV({event:a,onNodeClick:c,onHandleClick:d}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 py-2 px-3 group hover:bg-zinc-50/60 dark:hover:bg-zinc-800/60 transition-colors",children:[(0,b.jsx)("div",{className:`w-1 h-1 rounded-full shrink-0 ${eT(a.type)}`}),(0,b.jsx)(eS,{type:a.type,className:"w-3 h-3 shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 text-[11px] text-zinc-600 dark:text-zinc-400 truncate",children:[a.actor?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>d?.(a.actor.handle),className:"font-medium text-zinc-800 dark:text-zinc-200 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.actor.handle})," "]}):c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"font-medium text-zinc-700 dark:text-zinc-300 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.nodeId})," "]}):null,(0,b.jsx)("span",{className:"text-zinc-500 dark:text-zinc-400",children:eU(a)})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 shrink-0 tabular-nums opacity-0 group-hover:opacity-100 transition-opacity",children:ek(new Date(a.time).toISOString())})]})}function eW({event:a,onNodeClick:c,onHandleClick:d}){return(0,b.jsxs)("div",{className:"flex gap-3 py-3 px-4 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors group",children:[(0,b.jsx)("div",{className:`w-0.5 self-stretch rounded-full shrink-0 ${eT(a.type)}`}),(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:a.actor?.avatar?(0,b.jsx)("img",{src:a.actor.avatar,alt:a.actor.handle,className:"w-7 h-7 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700"}):a.actor?(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:a.actor.handle.charAt(0).toUpperCase()}):(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-50 dark:bg-zinc-800 flex items-center justify-center",children:(0,b.jsx)(eS,{type:a.type,className:"w-3.5 h-3.5"})})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-baseline gap-1.5 text-[12px] leading-snug",children:[a.actor&&(0,b.jsx)("button",{onClick:()=>d?.(a.actor.handle),className:"font-semibold text-zinc-800 dark:text-zinc-200 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.actor.handle}),(0,b.jsx)("span",{className:"text-zinc-500 dark:text-zinc-400",children:eU(a)})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[c&&(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"inline-flex items-center px-1.5 py-0.5 text-[10px] font-mono font-medium text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-950 rounded-md hover:bg-emerald-100 dark:hover:bg-emerald-900 transition-colors",children:a.nodeId}),a.nodeTitle&&(0,b.jsx)("span",{className:"text-[11px] text-zinc-400 dark:text-zinc-500 truncate",children:a.nodeTitle})]})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 shrink-0 tabular-nums mt-0.5",children:ek(new Date(a.time).toISOString())})]})}function eX({event:a,variant:c="compact",onNodeClick:d,onHandleClick:e}){return"compact"===c?(0,b.jsx)(eV,{event:a,onNodeClick:d,onHandleClick:e}):(0,b.jsx)(eW,{event:a,onNodeClick:d,onHandleClick:e})}function eY({events:a,collapsed:c,compact:d,onToggleCollapse:e,onExpandPanel:f,onNodeClick:g,onHandleClick:h}){let i=a.filter(a=>Date.now()-a.time<3e5).length;return c?(0,b.jsxs)("button",{onClick:e,className:"group flex items-center gap-2 px-3 py-2 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-full border border-zinc-200/80 dark:border-zinc-700/80 shadow-sm hover:bg-white dark:hover:bg-zinc-900 hover:shadow-md transition-all",title:"Show activity feed",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500 group-hover:text-emerald-500 dark:group-hover:text-emerald-400 transition-colors",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 group-hover:text-zinc-700 dark:group-hover:text-zinc-200 transition-colors",children:"Activity"}),i>0&&(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-emerald-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center leading-tight",children:i})]}):(0,b.jsxs)("div",{className:`${d?"w-60":"w-72"} bg-white/95 dark:bg-zinc-900/95 backdrop-blur-sm rounded-xl border border-zinc-200/80 dark:border-zinc-700/80 shadow-lg overflow-hidden`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-b border-zinc-100/80 dark:border-zinc-800/80",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-600 dark:text-zinc-400",children:"Live Activity"})]}),(0,b.jsx)("button",{onClick:e,className:"text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors p-1 -mr-0.5 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",title:"Collapse",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})})]}),(0,b.jsx)("div",{className:"py-0.5 max-h-[260px] overflow-y-auto custom-scrollbar",children:0===a.length?(0,b.jsxs)("div",{className:"py-6 text-center",children:[(0,b.jsxs)("svg",{className:"w-5 h-5 text-zinc-200 dark:text-zinc-700 mx-auto mb-1.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("p",{className:"text-[11px] text-zinc-400 dark:text-zinc-500",children:"No activity yet"})]}):a.slice(0,d?3:6).map((a,c)=>(0,b.jsx)("div",{className:0===c?"bg-emerald-50/30 dark:bg-emerald-950/30":"",children:(0,b.jsx)(eX,{event:a,variant:"compact",onNodeClick:g,onHandleClick:h})},a.id))}),a.length>0&&(0,b.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2 border-t border-zinc-100/80 dark:border-zinc-800/80 bg-zinc-50/30 dark:bg-zinc-800/30",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:[a.length," event",1!==a.length?"s":""]}),(0,b.jsxs)("button",{onClick:f,className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors font-medium flex items-center gap-1",children:["See all",(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})]})}function eZ(a,b){let c=new Set(a.map(a=>a.id)),d=[...a];for(let a of b)c.has(a.id)||(c.add(a.id),d.push(a));return d.sort((a,b)=>b.time-a.time),d}let e$=[{key:"issues",label:"Issues",icon:"circle"},{key:"deps",label:"Deps",icon:"link"},{key:"comments",label:"Comments",icon:"chat"},{key:"claims",label:"Claims",icon:"user"},{key:"likes",label:"Likes",icon:"heart"}];function e_(a){let b=new Map,c=[];for(let d of a){let a=function(a){let b=Date.now()-a,c=b/36e5,d=b/864e5;return c<1?"Just now":c<24?"Today":d<2?"Yesterday":d<7?"This week":d<30?"This month":"Older"}(d.time);b.has(a)||(b.set(a,[]),c.push(a)),b.get(a).push(d)}return c.map(a=>({label:a,events:b.get(a)}))}function e0({events:a,isOpen:d,onClose:e,onNodeClick:f,onHandleClick:g}){let[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(new Set(e$.map(a=>a.key))),[l,m]=(0,c.useState)(50);(0,c.useEffect)(()=>{m(50)},[a,j,h]);let n=a=>{k(b=>{let c=new Set(b);return c.has(a)?c.size>1&&c.delete(a):c.add(a),c})},o=(0,c.useMemo)(()=>{let b=a;if(b=b.filter(a=>j.has(function(a){switch(a){case"node-created":case"node-closed":case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":case"node-assignee-changed":return"issues";case"link-added":case"link-removed":return"deps";case"comment-added":case"reply-added":return"comments";case"task-claimed":case"task-unclaimed":return"claims";case"like-added":return"likes"}}(a.type))),h.trim()){let a=h.trim().toLowerCase();b=b.filter(b=>b.nodeId.toLowerCase().includes(a)||b.nodeTitle&&b.nodeTitle.toLowerCase().includes(a)||b.actor?.handle&&b.actor.handle.toLowerCase().includes(a)||b.detail&&b.detail.toLowerCase().includes(a))}return b},[a,j,h]);(0,c.useMemo)(()=>e_(o),[o]);let p=(0,c.useMemo)(()=>o.slice(0,l),[o,l]),q=o.length>l,r=(0,c.useMemo)(()=>e_(p),[p]),s=j.size===e$.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${d?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Activity"}),a.length>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:a.length})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"px-4 pt-3 pb-2 shrink-0",children:(0,b.jsxs)("div",{className:"flex items-center bg-zinc-50/80 dark:bg-zinc-800/80 rounded-full border border-zinc-200/60 dark:border-zinc-700/60 overflow-hidden",children:[(0,b.jsx)("div",{className:"pl-3 pr-1 text-zinc-400 dark:text-zinc-500",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,b.jsx)("input",{type:"text",value:h,onChange:a=>i(a.target.value),placeholder:"Search activity...",className:"flex-1 px-2 py-2 text-xs text-zinc-800 dark:text-zinc-200 bg-transparent outline-none placeholder:text-zinc-400 dark:placeholder:text-zinc-500"}),h&&(0,b.jsx)("button",{onClick:()=>i(""),className:"pr-3 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 px-4 pb-3 shrink-0",children:e$.map(a=>{let c=j.has(a.key);return(0,b.jsx)("button",{onClick:()=>n(a.key),className:`px-2.5 py-1 text-[11px] font-medium rounded-full border transition-all ${c?"bg-emerald-50 dark:bg-emerald-950 text-emerald-700 dark:text-emerald-400 border-emerald-200 dark:border-emerald-800 shadow-sm":"bg-white dark:bg-zinc-900 text-zinc-400 dark:text-zinc-500 border-zinc-200 dark:border-zinc-700 hover:text-zinc-600 dark:hover:text-zinc-300 hover:border-zinc-300 dark:hover:border-zinc-600"}`,children:a.label},a.key)})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar border-t border-zinc-100 dark:border-zinc-800",children:0===o.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("svg",{className:"w-8 h-8 text-zinc-200 dark:text-zinc-700 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:h.trim()?"No activity matching your search":"No activity yet"}),h.trim()&&(0,b.jsx)("button",{onClick:()=>i(""),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 mt-1.5",children:"Clear search"})]}):(0,b.jsxs)(b.Fragment,{children:[r.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"sticky top-0 z-[1] px-4 py-1.5 bg-zinc-50/95 dark:bg-zinc-800/95 backdrop-blur-sm border-b border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:a.label})}),(0,b.jsx)("div",{className:"divide-y divide-zinc-50 dark:divide-zinc-800",children:a.events.map(a=>(0,b.jsx)(eX,{event:a,variant:"full",onNodeClick:f,onHandleClick:g},a.id))})]},a.label)),q&&(0,b.jsx)("div",{className:"flex justify-center py-3 border-t border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsxs)("button",{onClick:()=>m(a=>a+50),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 font-medium px-3 py-1.5 rounded-full hover:bg-emerald-50 dark:hover:bg-emerald-950 transition-colors",children:["Show ",Math.min(50,o.length-l)," more events"]})})]})}),(0,b.jsx)("div",{className:"shrink-0 px-5 py-2.5 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50",children:(0,b.jsxs)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:[q?`${l} of ${o.length} events`:`${o.length} event${1!==o.length?"s":""}`,!s&&" (filtered)",h.trim()&&` matching "${h.trim()}"`]})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transition-transform duration-300 ease-out ${d?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-xl border-t border-zinc-200 dark:border-zinc-700 max-h-[60vh] flex flex-col",children:[(0,b.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Activity"}),a.length>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:a.length})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 px-5 pb-3",children:e$.map(a=>(0,b.jsx)("button",{onClick:()=>n(a.key),className:`px-2.5 py-1 text-[11px] font-medium rounded-full border transition-colors ${j.has(a.key)?"bg-emerald-50 dark:bg-emerald-950 text-emerald-700 dark:text-emerald-400 border-emerald-200 dark:border-emerald-800":"bg-white dark:bg-zinc-900 text-zinc-400 dark:text-zinc-500 border-zinc-200 dark:border-zinc-700"}`,children:a.label},a.key))}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===o.length?(0,b.jsx)("div",{className:"py-8 text-center text-xs text-zinc-400 dark:text-zinc-500",children:"No activity matching filters"}):(0,b.jsxs)(b.Fragment,{children:[r.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"sticky top-0 z-[1] px-5 py-1.5 bg-zinc-50/95 dark:bg-zinc-800/95 backdrop-blur-sm border-b border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:a.label})}),(0,b.jsx)("div",{className:"divide-y divide-zinc-50 dark:divide-zinc-800",children:a.events.map(a=>(0,b.jsx)(eX,{event:a,variant:"full",onNodeClick:f,onHandleClick:g},a.id))})]},a.label)),q&&(0,b.jsx)("div",{className:"flex justify-center py-3 border-t border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsxs)("button",{onClick:()=>m(a=>a+50),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 font-medium px-3 py-1.5 rounded-full hover:bg-emerald-50 dark:hover:bg-emerald-950 transition-colors",children:["Show ",Math.min(50,o.length-l)," more events"]})})]})})]})})]})}let e1=[{target:"graph",title:"The Dependency Graph",description:"Each circle is a task or issue. The flowing particles between them show the direction of dependencies — what needs to happen before something else can start. Bigger circles mean more connections.",padding:0},{target:"layouts",title:"Layout Modes",description:"Switch how the graph is arranged. Force is organic and physics-based. DAG gives you a clean top-down tree. Radial spreads nodes in rings. Cluster groups by project. Spread spaces everything out for screenshots."},{target:"btn-collapse",title:"Collapse / Expand",description:"Group all epic tasks into a single node, or expand them back out. Great for getting a high-level overview of your project when there are many tasks."},{target:"btn-clusters",title:"Cluster Labels",description:"Toggle transparent labels that show project prefixes behind groups of related nodes. Helps you see which project each cluster belongs to at a glance."},{target:"btn-autofit",title:"Auto-fit",description:"When enabled (green), the camera automatically re-centers and zooms to fit all nodes after every update. Turn it off to keep the camera fixed while you explore."},{target:"btn-pulse",title:"Pulse",description:"Highlights the most recently active node with emerald ripples. Useful for spotting which task just changed status or was just created."},{target:"legend-stats",title:"Project Stats",description:"A quick summary of your project: total issues, dependency count, and how many separate projects are tracked. When legend filters are active, these numbers update to reflect only the visible nodes."},{target:"legend-color-mode",title:"Color Mode Selector",description:"Switch what the node fill color represents. Status shows open/closed/blocked. Priority shows urgency. Type highlights epics, tasks, bugs, features, and chores. Owner, Assignee, and Prefix color by person or project. The ring around each node always shows which project it belongs to."},{target:"legend-items",title:"Legend",description:'Shows what each color means for the current color mode. Click any label to filter the graph — only matching nodes will be shown. Click more labels to combine filters (union). Click again to remove a filter, or use "Clear filters" to reset. The colored dots match the node fills in the graph.'},{target:"minimap",title:"Minimap",description:"A bird’s-eye view of your entire graph. Click anywhere to jump there. Drag the edges to resize it."},{target:"overlays",title:"Leaderboard & Activity",description:"These compact overlays live in the top-right corner. The activity feed shows recent changes — tasks created, statuses updated, priorities shifted. The leaderboard ranks contributors by closed issues, created issues, and comments. Click either to expand into a full sidebar."},{target:"graph",title:"Multi-Select & Group Drag",description:"Right-click and drag on the canvas background to draw a selection rectangle around multiple nodes. Shift-click individual nodes to toggle them in/out of the selection. Once selected, drag any selected node to move the entire group together. Press Escape to deselect all.",padding:0},{target:"graph",title:"Quick Navigation Shortcuts",description:"Press Shift+0 to instantly zoom to the most recently edited node (the pulsing one). Press Shift+1 through Shift+9 to jump to a node belonging to the corresponding leaderboard contributor — Shift+1 for #1, Shift+2 for #2, and so on. Great for quickly checking what your top contributors are working on.",padding:0},{target:"auth-section",title:"Sign In & Profiles",description:"Sign in with your Bluesky/ATProto account to comment, claim tasks, and like comments. Click any avatar on the graph to see that person’s profile — their stats, recent activity, and contributions. Click your own handle in the dropdown to view your profile."},{target:"btn-theme",title:"Dark Mode",description:"Toggle between light and dark themes. Your preference is saved and persists across sessions. The entire UI — canvas, panels, tooltips, and overlays — adapts to your chosen theme."},{target:"graph",title:"Interacting with Nodes",description:"Click a node to see its details, labels, assignee, and linked commits. Hover for a quick tooltip. Right-click for actions like viewing descriptions, commenting, claiming tasks, collapsing epics, or focusing on an epic’s subgraph. Avatars on nodes show who claimed or is assigned — hover for details like “einstein.climateai.org claimed beads-map-123”, click to open their profile.",padding:0},{target:"nav-replay",title:"Replay",description:"Step through your project’s history one event at a time. Watch issues appear and change status as they were created. Use the scrubber to jump to any point in time."},{target:"nav-comments",title:"Comments",description:"Opens a sidebar showing all conversations across your beads. See who said what, reply to threads, and like comments — all powered by the AT Protocol."},{target:"nav-activity",title:"Activity",description:'A real-time feed of changes for your local issues. See when tasks are created, statuses change, priorities shift, and dependencies are added. Use "Show more" to page through the full history. During timeline replay, the feed filters to only events up to the current point in time.'},{target:"nav-learn",title:"Learn",description:"Opens the help panel with keyboard shortcuts, feature documentation, and this interactive tutorial. Click it anytime to come back here."}];function e2({step:a,onNext:d,onEnd:e}){let[f,g]=(0,c.useState)(null),h=(0,c.useCallback)(()=>{if(null===a)return void g(null);let b=e1[a];if(!b)return void g(null);let c=document.querySelector(`[data-tutorial="${b.target}"]`);if(c){let a=c.getBoundingClientRect(),d=b.padding??8;g({left:a.left-d,top:a.top-d,width:a.width+2*d,height:a.height+2*d})}else g(null)},[a]);if((0,c.useEffect)(()=>{h();let a=()=>h();window.addEventListener("resize",a);let b=setTimeout(h,150);return()=>{window.removeEventListener("resize",a),clearTimeout(b)}},[h]),null===a)return null;let i=a===e1.length-1;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[55] cursor-pointer",onClick:()=>{i?e():d()},children:(0,b.jsxs)("svg",{className:"absolute inset-0 w-full h-full",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("mask",{id:"tutorial-mask",children:[(0,b.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),f&&(0,b.jsx)("rect",{x:f.left,y:f.top,width:f.width,height:f.height,rx:8,ry:8,fill:"black"})]})}),(0,b.jsx)("rect",{width:"100%",height:"100%",fill:"rgba(0,0,0,0.45)",mask:"url(#tutorial-mask)"})]})}),f&&(0,b.jsx)("div",{className:"fixed rounded-lg ring-2 ring-emerald-400/60 dark:ring-emerald-500/60 animate-pulse z-[56]",style:{left:f.left,top:f.top,width:f.width,height:f.height,pointerEvents:"none"}})]})}let e3="#d20f39",e4="#179299",e5="#fe640b",e6="#1e66f5",e7="#40a02b",e8="#8839ef",e9="#209fb5",fa="#ea76cb";function fb({isOpen:a,onClose:c,tutorialStep:d=null,onStartTutorial:e,onNextStep:f,onPrevStep:g,onEndTutorial:h}){let i=null!==d,j=i?"Tutorial":"Welcome to Heartbeads",k=i?(0,b.jsx)(fc,{step:d,onNext:f,onPrev:g,onEnd:h}):(0,b.jsx)(ff,{onStartTutorial:e});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"} ${i?"z-[60]":"z-30"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:j}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:k})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out ${a?"translate-y-0":"translate-y-full"} ${i?"z-[60]":"z-20"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl border-t border-zinc-200 dark:border-zinc-700 max-h-[70vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:j}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:k})]})})]})}function fc({step:a,onNext:c,onPrev:d,onEnd:e}){let f=e1[a],g=e1.length,h=a===g-1;return(0,b.jsxs)("div",{className:"px-5 py-4 flex flex-col min-h-[300px]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("span",{className:"text-xs font-medium",style:{color:e4},children:[a+1," / ",g]}),(0,b.jsx)("div",{className:"flex gap-1",children:Array.from({length:g}).map((c,d)=>(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full transition-colors",style:{backgroundColor:d===a?e7:d<a?e4:"#dce0e8"}},d))})]}),(0,b.jsx)("h3",{className:"text-base font-semibold text-zinc-900 dark:text-zinc-100 mb-2",children:f.title}),(0,b.jsx)("p",{className:"text-[13px] text-zinc-600 dark:text-zinc-300 leading-relaxed mb-6",children:f.description}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-4 border-t border-zinc-100 dark:border-zinc-800",children:[0===a?(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm font-medium text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:"Skip"}):(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",style:{color:e6},children:"Back"}),(0,b.jsx)("div",{className:"flex-1"}),h?(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Done"}):(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Next"})]})]})}function fd({color:a,children:c}){return(0,b.jsxs)("li",{className:"flex gap-2.5 items-start",children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mt-[6px] shrink-0",style:{backgroundColor:a}}),(0,b.jsx)("span",{children:c})]})}function fe({children:a,color:c}){return(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2 mt-5 first:mt-0",style:{color:c},children:a})}function ff({onStartTutorial:a}){return(0,b.jsxs)("div",{className:"px-5 py-4 text-[13px] text-zinc-600 dark:text-zinc-300 leading-relaxed",children:[a&&(0,b.jsxs)("button",{onClick:a,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 mb-5 text-white text-sm font-medium rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),"Take the guided tour"]}),(0,b.jsx)("p",{className:"text-zinc-900 dark:text-zinc-100 font-medium mb-1",children:"Your command center for AI coding tasks."}),(0,b.jsx)("p",{className:"mb-4 text-zinc-500 dark:text-zinc-400",children:"Heartbeads shows everything your AI agents are working on as a live, interactive graph — tasks, dependencies, who's doing what, and what's blocking progress."}),(0,b.jsx)(fe,{color:e3,children:"The graph"}),(0,b.jsxs)("p",{className:"mb-2",children:["Each ",(0,b.jsx)("strong",{children:"circle"})," is a task. ",(0,b.jsx)("strong",{children:"Flowing particles"})," ","stream between them to show dependency direction."]}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Bigger circles"})," — more connected, more important"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Solid lines + particles"})," — “blocks” (A must finish before B)"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Dashed lines"})," — parent-child grouping"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Colored ring"})," — which project it belongs to"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Avatars"})," — small profile pictures on nodes show who claimed or is assigned to that task"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Labels"})," — tags like “mobile”, “ux”, or “build” shown as pills in node details and hover tooltips"]})]}),(0,b.jsx)(fe,{color:e6,children:"Navigation"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Click"})," a node to open its details"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Hover"})," for a quick summary"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Right-click"})," for actions — descriptions, comments, claims, collapse, or focus on an epic"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Scroll"})," to zoom, ",(0,b.jsx)("strong",{children:"drag"})," to pan"]})]}),(0,b.jsx)(fe,{color:e6,children:"Keyboard shortcuts"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Cmd/Ctrl+F"})," — search by name, ID, owner, or commenter"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Shift+0"})," — zoom to the most recently edited node"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Shift+1-9"})," — zoom to a node from the #1-#9 leaderboard contributor"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Escape"})," — clear search or multi-selection"]})]}),(0,b.jsx)(fe,{color:e4,children:"Layouts"}),(0,b.jsx)("p",{className:"mb-2",children:"Top-left buttons rearrange the graph:"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Force"})," — organic, physics-based"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"DAG"})," — clean top-down tree"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Radial"})," — rings from center outward"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Cluster"})," — grouped by project"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Spread"})," — spaced out for screenshots"]})]}),(0,b.jsx)(fe,{color:e5,children:"Color modes"}),(0,b.jsx)("p",{className:"mb-2",children:"Bottom-right panel — paint nodes by:"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Status"})," — open, in progress, blocked, closed"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Priority"})," — P0 critical to P4 backlog"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Type"})," — epic, task, bug, feature, or chore"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Owner"})," — who created it"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Assignee"})," — who's working on it"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Prefix"})," — which project"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Click to filter"})," — click any legend label to show only matching nodes. Combine multiple for a union view"]})]}),(0,b.jsx)(fe,{color:e8,children:"More"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Collapse/Expand"})," — tidy up epics into single nodes"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Focus on epic"})," — right-click an epic to isolate its subgraph (children + dependencies). Click the banner or right-click again to return"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Clusters"})," — dashed circles grouping projects when zoomed out"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Replay"})," — step through your project's history"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Comments"})," — leave notes on tasks (sign in first)"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Activity feed"})," — compact overlay in top-right and full sidebar. Real-time local changes with pagination. During replay, filters to the current point in time"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Claim tasks"})," — right-click to mark as yours"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Minimap"})," — click to jump, drag edges to resize"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Auto-fit"})," — top-left toggle to lock/unlock automatic camera reframing"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Pulse"})," — the most recently active node pulses with emerald ripples. Toggle it on/off in view controls"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Copy"})," — clipboard icon copies task with project info"]})]}),(0,b.jsx)(fe,{color:e7,children:"Multi-select"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Right-click + drag"})," — draw a rectangle on the canvas background to select multiple nodes"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Shift + click"})," — toggle individual nodes into or out of the selection"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Group drag"})," — drag any selected node to move them all together"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Escape"})," — clear the selection"]})]}),(0,b.jsx)(fe,{color:e9,children:"Leaderboard & Profiles"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Leaderboard"})," — top-right overlay ranking contributors by closed, created, and commented issues. Click “See all” for the full sidebar"]}),(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Profiles"})," — click any avatar on the graph to open their profile panel with stats and recent activity"]}),(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Your profile"})," — click your handle in the sign-in dropdown to see your own stats"]})]}),(0,b.jsx)(fe,{color:fa,children:"Sharing & Settings"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Shareable URLs"})," — the current view state is stored in the URL. Copy it to share a specific node, panel, color mode, or filter with anyone"]}),(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Text-to-speech"})," — open a task description and click the speaker icon to hear it read aloud. Select text for targeted playback. Adjust speed in settings"]}),(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Settings"})," — gear icon for TTS voice, playback speed, and dashboard access controls"]})]}),(0,b.jsx)(fe,{color:e8,children:"Appearance"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Dark mode"})," — click the moon/sun icon in the header to toggle. Your preference is saved to localStorage and persists across sessions"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"System preference"})," — on first visit, heartbeads follows your OS dark/light setting automatically"]})]}),(0,b.jsxs)("div",{className:"mt-5 pt-4 border-t border-zinc-100 dark:border-zinc-800 text-xs text-zinc-400 dark:text-zinc-500",children:["Built with"," ",(0,b.jsx)("a",{href:"https://github.com/GainForest/beads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:e7},children:"beads"})," ","— open-source issue tracking for AI-native development. Heartbeads is built for the GainForest agentic workflow and open-sourced at"," ",(0,b.jsx)("a",{href:"https://github.com/daviddao/heartbeads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:e7},children:"github.com/daviddao/heartbeads"}),"."]})]})}function fg({entries:a,collapsed:c,compact:d,onToggleCollapse:e,onExpandPanel:f,onProfileClick:g}){return c?(0,b.jsxs)("button",{onClick:e,className:"flex items-center gap-2 px-3 py-1.5 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-full border border-zinc-200/80 dark:border-zinc-700/80 shadow-sm hover:shadow-md transition-all cursor-pointer",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-amber-500",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-xs font-medium text-zinc-600 dark:text-zinc-400",children:"Leaderboard"}),a.length>0&&(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}):(0,b.jsxs)("div",{className:`${d?"w-60":"w-72"} max-w-[calc(100vw-2rem)] bg-white/95 dark:bg-zinc-900/95 backdrop-blur-sm rounded-xl border border-zinc-200/80 dark:border-zinc-700/80 shadow-lg overflow-hidden`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-400"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-700 dark:text-zinc-300 uppercase tracking-wider",children:"Leaderboard"})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})})]}),(0,b.jsx)("div",{className:"max-h-[220px] overflow-y-auto",children:a.slice(0,3).map((a,c)=>(0,b.jsxs)("button",{onClick:()=>g(a.handle),className:"flex items-center gap-2.5 w-full px-3 py-2 hover:bg-zinc-50/60 dark:hover:bg-zinc-800/60 transition-colors text-left cursor-pointer",children:[(0,b.jsx)("span",{className:`text-[11px] font-bold tabular-nums w-4 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-6 h-6 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-[10px] font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-[11px] font-medium text-zinc-700 dark:text-zinc-300 truncate",children:a.handle}),(0,b.jsxs)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[a.closedCount," closed · ",a.createdCount," created · ",a.commentCount," comments"]})]})]},a.handle))}),a.length>0&&(0,b.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[a.length," contributors"]}),(0,b.jsx)("button",{onClick:f,className:"text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors cursor-pointer",children:"See all →"})]})]})}function fh({entries:a,isOpen:c,onClose:d,onProfileClick:e}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${c?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-400 uppercase tracking-wider",children:"Leaderboard"}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[a.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>e(a.handle),className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors text-left group cursor-pointer",children:[(0,b.jsx)("span",{className:`text-sm font-bold tabular-nums w-6 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-9 h-9 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-9 h-9 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-sm font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold text-zinc-800 dark:text-zinc-200 truncate group-hover:text-emerald-600 dark:group-hover:text-emerald-400 transition-colors",children:a.handle}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-0.5",children:[(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.closedCount})," closed"]}),(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.createdCount})," created"]}),(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.commentCount})," comments"]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 flex flex-col items-center",children:[(0,b.jsx)("span",{className:"text-lg font-bold text-zinc-700 dark:text-zinc-300",children:a.score}),(0,b.jsx)("span",{className:"text-[9px] text-zinc-400 uppercase",children:"pts"})]})]},a.handle)),0===a.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-zinc-300 dark:text-zinc-500",children:[(0,b.jsx)("svg",{className:"w-10 h-10 mb-3",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-xs",children:"No contributors yet"})]})]}),(0,b.jsx)("div",{className:"px-4 py-2.5 border-t border-zinc-100 dark:border-zinc-800 text-[10px] text-zinc-400",children:"Score = closed×3 + created×1 + comments×1"})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transition-transform duration-300 ease-out ${c?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-xl border-t border-zinc-200 dark:border-zinc-700 max-h-[60vh] flex flex-col",children:[(0,b.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Leaderboard"}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[a.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>e(a.handle),className:"flex items-center gap-2.5 w-full px-4 py-2.5 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors text-left group cursor-pointer",children:[(0,b.jsx)("span",{className:`text-xs font-bold tabular-nums w-5 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-7 h-7 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-xs font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-xs font-semibold text-zinc-800 dark:text-zinc-200 truncate group-hover:text-emerald-600 dark:group-hover:text-emerald-400 transition-colors",children:a.handle}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.closedCount})," closed"]}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.createdCount})," created"]}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.commentCount})," comments"]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 flex flex-col items-center",children:[(0,b.jsx)("span",{className:"text-base font-bold text-zinc-700 dark:text-zinc-300",children:a.score}),(0,b.jsx)("span",{className:"text-[8px] text-zinc-400 dark:text-zinc-400 uppercase",children:"pts"})]})]},a.handle)),0===a.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-zinc-300 dark:text-zinc-500",children:[(0,b.jsx)("svg",{className:"w-8 h-8 mb-2",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-[11px]",children:"No contributors yet"})]})]}),(0,b.jsx)("div",{className:"px-4 py-2 border-t border-zinc-100 dark:border-zinc-800 text-[9px] text-zinc-400 text-center",children:"Score = closed×3 + created×1 + comments×1"})]})})]})}function fi({isOpen:a,onClose:d}){let[e,f]=(0,c.useState)(""),[g,h]=(0,c.useState)(""),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(!1);(0,c.useEffect)(()=>{n(!0)},[]),(0,c.useEffect)(()=>{if(a){let a={...em};f(a.elevenLabsApiKey||""),h(a.elevenLabsVoiceId),j(a.elevenLabsModel),l(!1),fetch("/api/auth").then(a=>a.json()).then(a=>p(!0===a.protected)).catch(()=>p(!1))}},[a]),(0,c.useEffect)(()=>{if(!a)return;let b=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,d]);let q=(0,c.useCallback)(async()=>{try{await fetch("/api/auth",{method:"DELETE"})}catch{}window.location.href="/login"},[]),r=(0,c.useCallback)(()=>{e.trim(),g.trim(),d()},[e,g,i,d]);return a&&m?(0,ej.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.4)",backdropFilter:"blur(4px)"},onClick:d,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-2xl w-[90vw] max-w-md flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Settings"}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"px-5 py-4 space-y-4 overflow-y-auto max-h-[60vh]",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400",children:"Text-to-Speech"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"ElevenLabs API Key"}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{type:k?"text":"password",value:e,onChange:a=>f(a.target.value),placeholder:"sk_...",className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500 pr-10"}),(0,b.jsx)("button",{type:"button",onClick:()=>l(a=>!a),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:k?"Hide key":"Show key",children:k?(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}):(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-400",children:["Get your key at"," ",(0,b.jsx)("a",{href:"https://elevenlabs.io/app/settings/api-keys",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"elevenlabs.io/app/settings"})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"Voice ID"}),(0,b.jsx)("input",{type:"text",value:g,onChange:a=>h(a.target.value),placeholder:"UgBBYS2sOqTuMpoF3BR0",className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500"}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-400",children:["Default: Mark - Natural Conversations. Find voice IDs in the"," ",(0,b.jsx)("a",{href:"https://elevenlabs.io/app/voice-library",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"ElevenLabs Voice Library"}),"."]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"Model"}),(0,b.jsxs)("select",{value:i,onChange:a=>j(a.target.value),className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500",children:[(0,b.jsx)("option",{value:"eleven_flash_v2_5",children:"Flash v2.5 (default, fastest & cheapest)"}),(0,b.jsx)("option",{value:"eleven_turbo_v2_5",children:"Turbo v2.5 (fast, good quality)"}),(0,b.jsx)("option",{value:"eleven_multilingual_v2",children:"Multilingual v2 (highest quality)"})]})]}),(0,b.jsxs)("div",{className:"border-t border-zinc-100 dark:border-zinc-800 pt-4",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400 mb-2",children:"Public API"}),(0,b.jsxs)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed",children:["Heartbeads exposes a read-only REST API for AI agents, CI/CD bots, and integrations."," ",o?"API requests require the dashboard password as a Bearer token. ":"No authentication required. ",(0,b.jsx)("a",{href:"/api/docs",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"View API documentation"})]})]}),o&&(0,b.jsxs)("div",{className:"border-t border-zinc-100 dark:border-zinc-800 pt-4",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400 mb-2",children:"Dashboard Access"}),(0,b.jsxs)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed mb-3",children:["This instance is password-protected. The"," ",(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:"Sign In"})," ","button in the navbar is for"," ",(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:"ATProto/Bluesky"})," ","— used for posting comments, likes, and claiming tasks. The dashboard password controls who can view the graph and access the API."]}),(0,b.jsxs)("button",{onClick:q,type:"button",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-zinc-200 dark:border-zinc-700 text-xs font-medium text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 hover:border-zinc-300 dark:hover:border-zinc-600 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),"Lock dashboard"]})]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-5 py-3.5 border-t border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),(0,b.jsx)("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Save"})]})]})}),document.body):null}function fj({node:a,onShowDescription:d,onAddComment:e,onClaimTask:f,onUnclaimTask:g,onCollapseEpic:h,onUncollapseEpic:i,onFocusEpic:j,onExitFocusEpic:k,onClose:l}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&l()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[l]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[99] bg-black/30",onClick:l}),(0,b.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-[100] bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl max-h-[70vh] overflow-y-auto animate-slide-up-sheet",children:[(0,b.jsx)("div",{className:"w-10 h-1 bg-zinc-300 dark:bg-zinc-700 rounded-full mx-auto mt-3 mb-2"}),(0,b.jsxs)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("span",{className:"text-[11px] font-mono text-zinc-400 dark:text-zinc-400",children:a.id})}),(0,b.jsx)("div",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-300 truncate mt-0.5",children:a.title})]}),(0,b.jsxs)("div",{className:"py-1",children:[d&&(0,b.jsxs)("button",{onClick:d,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Show description"]}),(0,b.jsxs)("button",{onClick:e,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),"Add comment"]}),f&&(0,b.jsxs)("button",{onClick:f,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),"Claim task"]}),g&&(0,b.jsxs)("button",{onClick:g,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-red-500 active:bg-red-50 dark:active:bg-red-950 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-red-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})}),"Unclaim task"]}),h&&(0,b.jsxs)("button",{onClick:h,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),"Collapse epic"]}),i&&(0,b.jsxs)("button",{onClick:i,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Uncollapse epic"]}),j&&(0,b.jsxs)("button",{onClick:j,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),"Focus on epic"]}),k&&(0,b.jsxs)("button",{onClick:k,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-emerald-600 dark:text-emerald-400 active:bg-emerald-50 dark:active:bg-emerald-950 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Show full graph"]})]}),(0,b.jsx)("div",{className:"border-t border-zinc-100 dark:border-zinc-800",children:(0,b.jsx)("button",{onClick:l,className:"w-full py-4 text-sm font-medium text-zinc-400 dark:text-zinc-400 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:"Cancel"})}),(0,b.jsx)("div",{className:"h-[env(safe-area-inset-bottom)]"})]})]})}let fk={assigned:"📋",closed:"✅",commented:"💬",claimed:"🙋",liked:"❤️"},fl={assigned:"Assigned to",closed:"Closed",commented:"Commented on",claimed:"Claimed",liked:"Liked a comment on"};function fm({isOpen:a,onClose:c,profile:d,onNodeNavigate:e}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl dark:shadow-2xl dark:shadow-black/20 z-30 transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider",children:"Profile"}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:d&&(0,b.jsx)(fn,{profile:d,onNodeNavigate:e})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out z-20 ${a?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl border-t border-zinc-200 dark:border-zinc-700 max-h-[70vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider",children:"Profile"}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:d&&(0,b.jsx)(fn,{profile:d,onNodeNavigate:e})})]})})]})}function fn({profile:a,onNodeNavigate:c}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"px-5 pt-4 pb-3 border-b border-zinc-100 dark:border-zinc-800",children:(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-12 h-12 rounded-full object-cover"}):(0,b.jsx)("div",{className:"w-12 h-12 rounded-full bg-zinc-200 dark:bg-zinc-800 flex items-center justify-center text-zinc-500 dark:text-zinc-400 text-lg font-semibold",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:a.handle}),a.lastActiveAt&&(0,b.jsxs)("div",{className:"text-xs text-zinc-400 dark:text-zinc-400",children:["Active ",ek(a.lastActiveAt)]})]})]})}),(0,b.jsx)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(fo,{label:"Assigned",value:a.assignedCount,color:"#1e66f5"}),(0,b.jsx)(fo,{label:"Closed",value:a.closedCount,color:"#40a02b"}),(0,b.jsx)(fo,{label:"Comments",value:a.commentCount,color:"#8839ef"}),(0,b.jsx)(fo,{label:"Likes given",value:a.likeCount,color:"#ea76cb"})]})}),(0,b.jsxs)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Projects"}),0===a.projects.length?(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-400 italic",children:"No projects"}):(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.projects.map(a=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-[11px] font-medium",style:{backgroundColor:a.color+"15",color:a.color,border:`1px solid ${a.color}25`},children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:a.color}}),a.prefixLabel,(0,b.jsxs)("span",{className:"text-zinc-400 font-normal",children:["(",a.count,")"]})]},a.prefix))})]}),(0,b.jsxs)("div",{className:"px-5 py-3",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Recent Activity"}),0===a.recentActivity.length?(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-400 italic",children:"No activity"}):(0,b.jsx)("div",{className:"space-y-2",children:a.recentActivity.map((a,d)=>(0,b.jsxs)("div",{className:"flex items-start gap-2 text-xs",children:[(0,b.jsx)("span",{className:"mt-0.5",children:fk[a.type]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("span",{className:"text-zinc-600 dark:text-zinc-400",children:[fl[a.type]," ",(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"font-mono text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 hover:underline",children:a.nodeId})]}),a.detail&&(0,b.jsx)("p",{className:"text-zinc-400 dark:text-zinc-400 truncate mt-0.5",children:a.detail}),(0,b.jsx)("div",{className:"text-zinc-300 dark:text-zinc-500 mt-0.5",children:ek(a.time)})]})]},d))})]})]})}function fo({label:a,value:c,color:d}){return(0,b.jsxs)("div",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg px-3 py-2",children:[(0,b.jsx)("div",{className:"text-lg font-semibold",style:{color:d},children:c}),(0,b.jsx)("div",{className:"text-[11px] text-zinc-400 dark:text-zinc-400",children:a})]})}let fp=new Map,fq=new Map;async function fr(a){let b=fp.get(a);if(b)return b;let c=fq.get(a);if(c)return c;let d=(async()=>{try{let b=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(a)}`);if(!b.ok)throw Error(`Profile fetch failed: ${b.status}`);let c=await b.json(),d={did:a,handle:c.handle||a,displayName:c.displayName||void 0,avatar:c.avatar||void 0};return fp.set(a,d),d}catch{let b={did:a,handle:a.slice(0,20)+"..."};return fp.set(a,b),b}finally{fq.delete(a)}})();return fq.set(a,d),d}let fs=process.env.INDEXER_URL||"https://hypergoat-app-production.up.railway.app/graphql",ft=`
5
+ `}),(0,b.jsxs)("div",{className:"comment-tooltip-shadow p-[18px_20px]",children:[(0,b.jsx)("div",{className:"rounded-sm mb-2.5",style:{width:24,height:2,background:x,opacity:.6}}),z]})]})}function eM({node:a,x:d,y:e,onShowDescription:f,onAddComment:g,onClaimTask:h,onUnclaimTask:i,onCollapseEpic:j,onUncollapseEpic:k,onFocusEpic:l,onExitFocusEpic:m,onClose:n}){let o=(0,c.useRef)(null),[p,q]=(0,c.useState)({x:0,y:0}),[r,s]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!o.current)return;let a=o.current.getBoundingClientRect(),b=window.innerWidth,c=window.innerHeight,f=d+4,g=e+4;f+a.width>b-16&&(f=b-a.width-16),f<16&&(f=16),g+a.height>c-16&&(g=c-a.height-16),g<16&&(g=16),q({x:f,y:g}),s(!0)},[d,e]),(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&n()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]),(0,c.useEffect)(()=>{let a=a=>{o.current&&!o.current.contains(a.target)&&n()},b=setTimeout(()=>window.addEventListener("mousedown",a),50);return()=>{clearTimeout(b),window.removeEventListener("mousedown",a)}},[n]),(0,b.jsx)("div",{ref:o,style:{position:"fixed",left:p.x,top:p.y,zIndex:100,opacity:+!!r,transform:r?"translateY(0)":"translateY(2px)",transition:"opacity 0.15s ease, transform 0.15s ease"},onContextMenu:a=>a.preventDefault(),children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg overflow-hidden",style:{minWidth:180,boxShadow:"0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.06)"},children:[a.description&&(0,b.jsxs)("button",{onClick:f,className:"w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Show description"]}),(0,b.jsxs)("button",{onClick:g,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${h||i||j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),"Add comment"]}),h&&(0,b.jsxs)("button",{onClick:h,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),"Claim task"]}),i&&(0,b.jsxs)("button",{onClick:i,className:`w-full px-3 py-2.5 text-xs text-red-500 hover:bg-red-50 dark:hover:bg-red-950 flex items-center gap-2 transition-colors${j||k||l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-red-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})}),"Unclaim task"]}),j&&(0,b.jsxs)("button",{onClick:j,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),"Collapse epic"]}),k&&(0,b.jsxs)("button",{onClick:k,className:`w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors${l||m?" border-b border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Uncollapse epic"]}),l&&(0,b.jsxs)("button",{onClick:l,className:"w-full px-3 py-2.5 text-xs text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 flex items-center gap-2 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),"Focus on epic"]}),m&&(0,b.jsxs)("button",{onClick:m,className:"w-full px-3 py-2.5 text-xs text-emerald-600 dark:text-emerald-400 hover:bg-emerald-50 dark:hover:bg-emerald-950 flex items-center gap-2 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500 dark:text-emerald-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Show full graph"]})]})})}function eN({node:a,x:d,y:e,prefixColor:f,allNodes:i,theme:j}){let k="dark"===j?{bg:"#18181b",border:"#3f3f46",borderLight:"#27272a",shadow:"rgba(0,0,0,0.3)",text:"#f4f4f5",textMuted:"#a1a1aa",textDim:"#71717a"}:{bg:"#FFFFFF",border:"#E5E7EB",borderLight:"#F3F4F6",shadow:"rgba(0,0,0,0.08)",text:"#131316",textMuted:"#737680",textDim:"#7F818B"},l=(0,c.useRef)(null),[n,o]=(0,c.useState)({x:0,y:0});(0,c.useEffect)(()=>{if(!l.current)return;let a=l.current.getBoundingClientRect(),b=d+14,c=e-a.height-14;b+a.width>window.innerWidth-16&&(b=d-a.width-14),b<16&&(b=16),c<16&&(c=e+14+8),c+a.height>window.innerHeight-16&&(c=window.innerHeight-a.height-16),o({x:b,y:c})},[d,e]);let p=a.dependentIds.map(a=>{let b=i.find(b=>b.id===a);return b?{id:a,title:b.title}:{id:a,title:a}}).filter(Boolean),q=g[a.priority]||`P${a.priority}`,r=h[a.priority]||"#a1a1aa",s={fontSize:10,fontWeight:600,letterSpacing:1.5,textTransform:"uppercase",color:"dark"===j?"#71717a":"#7F818B",marginBottom:3},t={fontSize:12,color:"dark"===j?"#a1a1aa":"#737680",lineHeight:1.45};return(0,b.jsxs)("div",{ref:l,className:"bead-tooltip",style:{position:"fixed",left:n.x,top:n.y,width:280,zIndex:100,pointerEvents:"none",background:k.bg,border:`1px solid ${k.border}`,boxShadow:`0 8px 32px ${k.shadow}, 0 2px 8px ${k.shadow}`,borderRadius:8,padding:"16px 18px",animation:"beadTooltipFade 0.2s ease"},children:[(0,b.jsx)("div",{style:{width:24,height:2,background:f,opacity:.5,marginBottom:8,borderRadius:1}}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:600,color:f,letterSpacing:.5,textTransform:"uppercase"},children:m(a.prefix)}),(0,b.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:k.textDim},children:a.id})]}),(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600,color:k.text,lineHeight:1.25,marginBottom:12,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:a.title}),a.labels.length>0&&(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:10},children:[a.labels.slice(0,3).map(a=>(0,b.jsx)("span",{style:{fontSize:10,fontWeight:500,color:"dark"===j?"#a1a1aa":"#52525b",backgroundColor:"dark"===j?"#27272a":"#f4f4f5",border:"dark"===j?"1px solid #3f3f46":"1px solid #e4e4e7",borderRadius:9999,padding:"1px 7px",lineHeight:"16px"},children:a},a)),a.labels.length>3&&(0,b.jsxs)("span",{style:{fontSize:10,color:"#a1a1aa",lineHeight:"18px"},children:["+",a.labels.length-3," more"]})]}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[null!=a.estimatedMinutes&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Estimate"}),(0,b.jsxs)("div",{style:t,children:["⏱ ",a.estimatedMinutes,"m"]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Created"}),(0,b.jsx)("div",{style:t,children:ek(a.createdAt)})]}),a.owner&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Owner"}),(0,b.jsx)("div",{style:t,children:a.owner})]}),(a.assignee||a.createdBy)&&(0,b.jsxs)("div",{children:[a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:s,children:"Assignee"}),(0,b.jsx)("div",{style:t,children:a.assignee})]}),a.createdBy&&!a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:s,children:"Created by"}),(0,b.jsx)("div",{style:t,children:a.createdBy})]}),a.createdBy&&a.assignee&&a.createdBy!==a.assignee&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{...s,marginTop:4},children:"Created by"}),(0,b.jsx)("div",{style:t,children:a.createdBy})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:s,children:"Blocked by"}),0===p.length?(0,b.jsx)("div",{style:{...t,color:"#10b981"},children:"None"}):(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:p.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,b.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:k.textDim,flexShrink:0},children:a.id}),(0,b.jsx)("span",{style:{fontSize:12,color:k.textMuted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.title})]},a.id))})]}),(0,b.jsxs)("div",{style:{borderTop:`1px solid ${k.borderLight}`,paddingTop:8},children:[(0,b.jsx)("div",{style:s,children:"Priority"}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:r,flexShrink:0}}),(0,b.jsx)("span",{style:t,children:q})]})]})]})]})}function eO({isOpen:a,onClose:d,allComments:e,onNodeNavigate:f,isAuthenticated:g,currentDid:h,onLikeComment:i,onDeleteComment:j,onReplyComment:k,onPostComment:l,prefixes:m}){let[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(""),v=(a,b)=>{for(let c of a){if(c.uri===b)return c;let a=v(c.replies,b);if(a)return a}return null},w=async()=>{if(!p.trim()||!n||!k)return;let a=v(e,n);if(a){s(!0);try{await k(a,p.trim()),o(null),q("")}catch(a){console.error("Failed to post reply:",a)}finally{s(!1)}}},x=(0,c.useMemo)(()=>{if(!t.trim())return e;let a=RegExp("^"+t.trim().replace(/[.+^()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$","i");return e.filter(b=>a.test(b.nodeId))},[e,t]),y=(0,b.jsxs)("div",{className:"shrink-0 px-5 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{type:"text",value:t,onChange:a=>u(a.target.value),placeholder:"Filter by target (e.g. beads-map-*)",className:"w-full pl-7 pr-7 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-zinc-50 dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,b.jsx)("svg",{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"})}),t&&(0,b.jsx)("button",{onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),m&&m.length>1&&!t&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:m.map(a=>(0,b.jsxs)("button",{onClick:()=>u(a+"-*"),className:"px-1.5 py-0.5 text-[10px] font-mono bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors",children:[a,"-*"]},a))})]}),z=(0,b.jsx)("div",{className:"space-y-0",children:0===x.length&&t?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsxs)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:["No comments matching “",t,"”"]}),(0,b.jsx)("button",{onClick:()=>u(""),className:"text-[10px] text-emerald-600 dark:text-emerald-400 hover:underline mt-1",children:"Clear filter"})]}):0===x.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("svg",{className:"w-8 h-8 text-zinc-200 dark:text-zinc-700 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:"No comments yet"}),(0,b.jsx)("p",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 mt-1",children:"Right-click a node to leave a comment"})]}):(0,b.jsx)(b.Fragment,{children:x.filter(a=>!a.replyTo).map(a=>(0,b.jsx)(eP,{comment:a,currentDid:h,isAuthenticated:g,onNodeNavigate:f,onLike:i,onDelete:j,onStartReply:a=>o(a.uri),replyingToUri:n,replyText:p,onReplyTextChange:q,onSubmitReply:w,onCancelReply:()=>{o(null),q("")},isSubmittingReply:r,depth:0,prefixes:m},a.uri))})}),A=(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50",children:[g?(0,b.jsx)(eR,{prefixes:m||[],onSubmit:l}):(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:"Sign in to comment"}),(0,b.jsx)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 mt-2",children:t?(0,b.jsxs)(b.Fragment,{children:[x.length," of ",e.length," comments matching “",t,"”"]}):(0,b.jsxs)(b.Fragment,{children:[e.length," comment",1!==e.length?"s":""," across all issues"]})})]});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"All Comments"}),(t?x.length:e.length)>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:t?x.length:e.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),y,(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-3",children:z}),A]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out z-20 ${a?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl border-t border-zinc-200 dark:border-zinc-700 max-h-[70vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider",children:"All Comments"}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),y,(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-3",children:z}),A]})})]})}function eP({comment:a,currentDid:d,isAuthenticated:e,onNodeNavigate:f,onLike:g,onDelete:h,onStartReply:i,replyingToUri:j,replyText:k,onReplyTextChange:l,onSubmitReply:m,onCancelReply:n,isSubmittingReply:o,depth:p,prefixes:q}){let[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(!1),v=d&&d===a.did,w=!!d&&a.likes.some(a=>a.did===d),x=j===a.uri,y=async()=>{if(g&&!r){s(!0);try{await g(a)}catch(a){console.error("Failed to toggle like:",a)}finally{s(!1)}}},z=async()=>{if(h&&!t){u(!0);try{await h(a)}catch(a){console.error("Failed to delete comment:",a)}finally{u(!1)}}};return(0,b.jsxs)("div",{className:`${p>0?"ml-4 pl-3 border-l border-zinc-100 dark:border-zinc-800":""}`,children:[(0,b.jsxs)("div",{className:`py-3 ${0===p?"border-b border-zinc-50 dark:border-zinc-800":""}`,children:[0===p&&(q?.includes(a.nodeId)?(0,b.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 mb-1.5 rounded text-[10px] font-mono bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400",children:["📢 ",a.nodeId]}):(0,b.jsx)("button",{onClick:()=>f(a.nodeId),className:"inline-flex items-center px-1.5 py-0.5 mb-1.5 rounded text-[10px] font-mono bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 hover:bg-emerald-100 dark:hover:bg-emerald-900 transition-colors",children:a.nodeId})),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,b.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden",children:a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:"",className:"w-full h-full object-cover"}):(0,b.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400 dark:text-zinc-500",children:(a.handle||a.did).charAt(0).toUpperCase()})}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 dark:text-zinc-400 truncate hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle||a.did.slice(0,16)+"..."}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600 shrink-0",children:ek(a.createdAt)})]}),(0,b.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed whitespace-pre-wrap break-words",children:a.text}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,b.jsxs)("button",{onClick:y,disabled:!e||r,className:`flex items-center gap-0.5 transition-colors ${w?"text-rose-500":"text-zinc-300 dark:text-zinc-600 hover:text-rose-500"} disabled:opacity-50`,children:[(0,b.jsx)(eB,{className:"w-3 h-3",filled:w}),a.likes.length>0&&(0,b.jsx)("span",{children:a.likes.length})]}),(0,b.jsx)("button",{onClick:()=>i(a),disabled:!e,className:`transition-colors disabled:opacity-50 ${x?"text-emerald-500 dark:text-emerald-400":"text-zinc-300 dark:text-zinc-600 hover:text-zinc-500 dark:hover:text-zinc-400"}`,children:"reply"}),v&&h&&(0,b.jsx)("button",{onClick:z,disabled:t,className:"ml-auto text-zinc-300 dark:text-zinc-600 hover:text-red-400 disabled:opacity-50 transition-colors",children:t?"...":"delete"})]})]}),x&&(0,b.jsx)(eQ,{replyingTo:a,replyText:k,onTextChange:l,onSubmit:m,onCancel:n,isSubmitting:o}),a.replies.length>0&&(0,b.jsx)("div",{children:a.replies.map(a=>(0,b.jsx)(eP,{comment:a,currentDid:d,isAuthenticated:e,onNodeNavigate:f,onLike:g,onDelete:h,onStartReply:i,replyingToUri:j,replyText:k,onReplyTextChange:l,onSubmitReply:m,onCancelReply:n,isSubmittingReply:o,depth:p+1,prefixes:q},a.uri))})]})}function eQ({replyingTo:a,replyText:c,onTextChange:d,onSubmit:e,onCancel:f,isSubmitting:g}){return(0,b.jsxs)("div",{className:"mt-2 ml-4 pl-3 border-l border-emerald-200 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-zinc-400 dark:text-zinc-500",children:[(0,b.jsx)("span",{children:"Replying to"}),(0,b.jsx)("a",{href:`https://www.impactindexer.org/data?did=${a.did}`,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-600 dark:text-zinc-400 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.displayName||a.handle})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||e()},placeholder:"Write a reply...",disabled:g,autoFocus:!0,className:"flex-1 px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:border-emerald-400 disabled:opacity-50"}),(0,b.jsx)("button",{onClick:e,disabled:!c.trim()||g,className:"px-2 py-1 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:g?"...":"Reply"}),(0,b.jsx)("button",{onClick:f,disabled:g,className:"px-2 py-1 text-[10px] text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 disabled:opacity-50 transition-colors",children:"Cancel"})]})]})}function eR({prefixes:a,onSubmit:d}){let[e,f]=(0,c.useState)(""),[g,h]=(0,c.useState)(a[0]||""),[i,j]=(0,c.useState)(!1);(0,c.useEffect)(()=>{1===a.length&&h(a[0])},[a]);let k=async()=>{if(e.trim()&&g&&d){j(!0);try{await d(g,e.trim()),f("")}catch(a){console.error("Failed to post comment:",a)}finally{j(!1)}}};return(0,b.jsxs)("div",{children:[a.length>1&&(0,b.jsx)("select",{value:g,onChange:a=>h(a.target.value),className:"w-full mb-2 px-2 py-1.5 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-white dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300",children:a.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)("textarea",{value:e,onChange:a=>f(a.target.value),onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&(a.preventDefault(),k())},placeholder:"Write a comment...",rows:2,className:"w-full px-2.5 py-2 text-xs border border-zinc-200 dark:border-zinc-700 rounded-md bg-white dark:bg-zinc-800 text-zinc-700 dark:text-zinc-300 placeholder-zinc-400 dark:placeholder-zinc-500 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500"}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1.5",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-300 dark:text-zinc-600",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","+Enter to send",a.length<=1&&g&&(0,b.jsxs)(b.Fragment,{children:[" · posting to ",(0,b.jsx)("span",{className:"font-medium text-zinc-400",children:g})]})]}),(0,b.jsx)("button",{onClick:k,disabled:!e.trim()||!g||i,className:"px-3 py-1 text-[11px] font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:i?"Sending...":"Send"})]})]})}function eS({type:a,className:c}){let d=c||"w-3.5 h-3.5 shrink-0";switch(a){case"node-created":return(0,b.jsxs)("svg",{className:`${d} text-emerald-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("line",{x1:"8",y1:"5",x2:"8",y2:"11"}),(0,b.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8"})]});case"node-closed":return(0,b.jsxs)("svg",{className:`${d} text-zinc-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"5.5,8 7.5,10 10.5,6"})]});case"node-status-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M3 8h10M10 5l3 3-3 3"})});case"node-priority-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M8 3v7M5 6l3-3 3 3M4 13h8"})});case"node-title-changed":return(0,b.jsx)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M3 4h10M3 8h6M3 12h8"})});case"node-owner-changed":return(0,b.jsxs)("svg",{className:`${d} text-amber-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,b.jsx)("path",{d:"M1.5 13c0-2 1.8-3.5 4.5-3.5M10 9l2 2 3-3"})]});case"node-assignee-changed":return(0,b.jsxs)("svg",{className:`${d} text-violet-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,b.jsx)("path",{d:"M1.5 13c0-2 1.8-3.5 4.5-3.5M10 8l2 2 2-2M12 10V5"})]});case"link-added":return(0,b.jsx)("svg",{className:`${d} text-blue-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M6.5 9.5l3-3M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"})});case"link-removed":return(0,b.jsxs)("svg",{className:`${d} text-red-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("path",{d:"M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"}),(0,b.jsx)("line",{x1:"3",y1:"3",x2:"13",y2:"13",strokeWidth:"1.5"})]});case"comment-added":case"reply-added":return(0,b.jsx)("svg",{className:`${d} text-blue-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M2 4.5a1.5 1.5 0 011.5-1.5h9A1.5 1.5 0 0114 4.5v5a1.5 1.5 0 01-1.5 1.5H5L2 14V4.5z"})});case"task-claimed":return(0,b.jsxs)("svg",{className:`${d} text-emerald-500`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,b.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"})]});case"task-unclaimed":return(0,b.jsxs)("svg",{className:`${d} text-red-400`,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,b.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"}),(0,b.jsx)("line",{x1:"11",y1:"3",x2:"13",y2:"5"})]});case"like-added":return(0,b.jsx)("svg",{className:`${d} text-rose-400`,viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M8 13.7l-.6-.5C4 10.2 2 8.3 2 6a3 3 0 016-1 3 3 0 016 1c0 2.3-2 4.2-5.4 7.2l-.6.5z"})})}}function eT(a){switch(a){case"node-created":case"task-claimed":return"bg-emerald-400";case"node-closed":return"bg-zinc-300";case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":return"bg-amber-400";case"node-assignee-changed":return"bg-violet-400";case"link-added":case"comment-added":case"reply-added":return"bg-blue-400";case"link-removed":case"task-unclaimed":return"bg-red-300";case"like-added":return"bg-rose-300"}}function eU(a){switch(a.type){case"node-created":{let b=a.meta?.issueType||"task";return`created a ${b}`}case"node-closed":return`closed this${a.detail&&"Closed"!==a.detail?` (${a.detail})`:""}`;case"node-status-changed":return a.detail?`changed status ${a.detail}`:"changed status";case"node-priority-changed":return`changed priority ${a.detail||""}`.trim();case"node-title-changed":return"updated the title";case"node-owner-changed":return`changed owner ${a.detail||""}`.trim();case"node-assignee-changed":{let b=a.meta?.to,c=a.meta?.from;if(b&&!c)return`assigned ${b}`;if(!b&&c)return`unassigned ${c}`;if(b)return`reassigned to ${b}`;return"changed assignee"}case"link-added":return`added a dependency on ${a.meta?.target||""}`;case"link-removed":return`removed dependency on ${a.meta?.target||""}`;case"comment-added":return a.detail?`commented: "${a.detail}"`:"commented";case"reply-added":return a.detail?`replied: "${a.detail}"`:"replied";case"task-claimed":return"claimed this task";case"task-unclaimed":return"unclaimed this task";case"like-added":return a.detail||"liked a comment";default:return a.detail||"updated"}}function eV({event:a,onNodeClick:c,onHandleClick:d}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 py-2 px-3 group hover:bg-zinc-50/60 dark:hover:bg-zinc-800/60 transition-colors",children:[(0,b.jsx)("div",{className:`w-1 h-1 rounded-full shrink-0 ${eT(a.type)}`}),(0,b.jsx)(eS,{type:a.type,className:"w-3 h-3 shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 text-[11px] text-zinc-600 dark:text-zinc-400 truncate",children:[a.actor?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>d?.(a.actor.handle),className:"font-medium text-zinc-800 dark:text-zinc-200 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.actor.handle})," "]}):c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"font-medium text-zinc-700 dark:text-zinc-300 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.nodeId})," "]}):null,(0,b.jsx)("span",{className:"text-zinc-500 dark:text-zinc-400",children:eU(a)})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 shrink-0 tabular-nums opacity-0 group-hover:opacity-100 transition-opacity",children:ek(new Date(a.time).toISOString())})]})}function eW({event:a,onNodeClick:c,onHandleClick:d}){return(0,b.jsxs)("div",{className:"flex gap-3 py-3 px-4 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors group",children:[(0,b.jsx)("div",{className:`w-0.5 self-stretch rounded-full shrink-0 ${eT(a.type)}`}),(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:a.actor?.avatar?(0,b.jsx)("img",{src:a.actor.avatar,alt:a.actor.handle,className:"w-7 h-7 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700"}):a.actor?(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:a.actor.handle.charAt(0).toUpperCase()}):(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-50 dark:bg-zinc-800 flex items-center justify-center",children:(0,b.jsx)(eS,{type:a.type,className:"w-3.5 h-3.5"})})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-baseline gap-1.5 text-[12px] leading-snug",children:[a.actor&&(0,b.jsx)("button",{onClick:()=>d?.(a.actor.handle),className:"font-semibold text-zinc-800 dark:text-zinc-200 hover:text-emerald-600 dark:hover:text-emerald-400 transition-colors",children:a.actor.handle}),(0,b.jsx)("span",{className:"text-zinc-500 dark:text-zinc-400",children:eU(a)})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[c&&(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"inline-flex items-center px-1.5 py-0.5 text-[10px] font-mono font-medium text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-950 rounded-md hover:bg-emerald-100 dark:hover:bg-emerald-900 transition-colors",children:a.nodeId}),a.nodeTitle&&(0,b.jsx)("span",{className:"text-[11px] text-zinc-400 dark:text-zinc-500 truncate",children:a.nodeTitle})]})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500 shrink-0 tabular-nums mt-0.5",children:ek(new Date(a.time).toISOString())})]})}function eX({event:a,variant:c="compact",onNodeClick:d,onHandleClick:e}){return"compact"===c?(0,b.jsx)(eV,{event:a,onNodeClick:d,onHandleClick:e}):(0,b.jsx)(eW,{event:a,onNodeClick:d,onHandleClick:e})}function eY({events:a,collapsed:c,compact:d,onToggleCollapse:e,onExpandPanel:f,onNodeClick:g,onHandleClick:h}){let i=a.filter(a=>Date.now()-a.time<3e5).length;return c?(0,b.jsxs)("button",{onClick:e,className:"group flex items-center gap-2 px-3 py-2 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-full border border-zinc-200/80 dark:border-zinc-700/80 shadow-sm hover:bg-white dark:hover:bg-zinc-900 hover:shadow-md transition-all",title:"Show activity feed",children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5 text-zinc-400 dark:text-zinc-500 group-hover:text-emerald-500 dark:group-hover:text-emerald-400 transition-colors",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"text-xs text-zinc-500 dark:text-zinc-400 group-hover:text-zinc-700 dark:group-hover:text-zinc-200 transition-colors",children:"Activity"}),i>0&&(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-emerald-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center leading-tight",children:i})]}):(0,b.jsxs)("div",{className:`${d?"w-60":"w-72"} bg-white/95 dark:bg-zinc-900/95 backdrop-blur-sm rounded-xl border border-zinc-200/80 dark:border-zinc-700/80 shadow-lg overflow-hidden`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-b border-zinc-100/80 dark:border-zinc-800/80",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-600 dark:text-zinc-400",children:"Live Activity"})]}),(0,b.jsx)("button",{onClick:e,className:"text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors p-1 -mr-0.5 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",title:"Collapse",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})})]}),(0,b.jsx)("div",{className:"py-0.5 max-h-[260px] overflow-y-auto custom-scrollbar",children:0===a.length?(0,b.jsxs)("div",{className:"py-6 text-center",children:[(0,b.jsxs)("svg",{className:"w-5 h-5 text-zinc-200 dark:text-zinc-700 mx-auto mb-1.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("p",{className:"text-[11px] text-zinc-400 dark:text-zinc-500",children:"No activity yet"})]}):a.slice(0,d?3:6).map((a,c)=>(0,b.jsx)("div",{className:0===c?"bg-emerald-50/30 dark:bg-emerald-950/30":"",children:(0,b.jsx)(eX,{event:a,variant:"compact",onNodeClick:g,onHandleClick:h})},a.id))}),a.length>0&&(0,b.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2 border-t border-zinc-100/80 dark:border-zinc-800/80 bg-zinc-50/30 dark:bg-zinc-800/30",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:[a.length," event",1!==a.length?"s":""]}),(0,b.jsxs)("button",{onClick:f,className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors font-medium flex items-center gap-1",children:["See all",(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})]})}function eZ(a,b){let c=new Set(a.map(a=>a.id)),d=[...a];for(let a of b)c.has(a.id)||(c.add(a.id),d.push(a));return d.sort((a,b)=>b.time-a.time),d}let e$=[{key:"issues",label:"Issues",icon:"circle"},{key:"deps",label:"Deps",icon:"link"},{key:"comments",label:"Comments",icon:"chat"},{key:"claims",label:"Claims",icon:"user"},{key:"likes",label:"Likes",icon:"heart"}];function e_(a){let b=new Map,c=[];for(let d of a){let a=function(a){let b=Date.now()-a,c=b/36e5,d=b/864e5;return c<1?"Just now":c<24?"Today":d<2?"Yesterday":d<7?"This week":d<30?"This month":"Older"}(d.time);b.has(a)||(b.set(a,[]),c.push(a)),b.get(a).push(d)}return c.map(a=>({label:a,events:b.get(a)}))}function e0({events:a,isOpen:d,onClose:e,onNodeClick:f,onHandleClick:g}){let[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(new Set(e$.map(a=>a.key))),[l,m]=(0,c.useState)(50);(0,c.useEffect)(()=>{m(50)},[a,j,h]);let n=a=>{k(b=>{let c=new Set(b);return c.has(a)?c.size>1&&c.delete(a):c.add(a),c})},o=(0,c.useMemo)(()=>{let b=a;if(b=b.filter(a=>j.has(function(a){switch(a){case"node-created":case"node-closed":case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":case"node-assignee-changed":return"issues";case"link-added":case"link-removed":return"deps";case"comment-added":case"reply-added":return"comments";case"task-claimed":case"task-unclaimed":return"claims";case"like-added":return"likes"}}(a.type))),h.trim()){let a=h.trim().toLowerCase();b=b.filter(b=>b.nodeId.toLowerCase().includes(a)||b.nodeTitle&&b.nodeTitle.toLowerCase().includes(a)||b.actor?.handle&&b.actor.handle.toLowerCase().includes(a)||b.detail&&b.detail.toLowerCase().includes(a))}return b},[a,j,h]);(0,c.useMemo)(()=>e_(o),[o]);let p=(0,c.useMemo)(()=>o.slice(0,l),[o,l]),q=o.length>l,r=(0,c.useMemo)(()=>e_(p),[p]),s=j.size===e$.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${d?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Activity"}),a.length>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:a.length})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"px-4 pt-3 pb-2 shrink-0",children:(0,b.jsxs)("div",{className:"flex items-center bg-zinc-50/80 dark:bg-zinc-800/80 rounded-full border border-zinc-200/60 dark:border-zinc-700/60 overflow-hidden",children:[(0,b.jsx)("div",{className:"pl-3 pr-1 text-zinc-400 dark:text-zinc-500",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,b.jsx)("input",{type:"text",value:h,onChange:a=>i(a.target.value),placeholder:"Search activity...",className:"flex-1 px-2 py-2 text-xs text-zinc-800 dark:text-zinc-200 bg-transparent outline-none placeholder:text-zinc-400 dark:placeholder:text-zinc-500"}),h&&(0,b.jsx)("button",{onClick:()=>i(""),className:"pr-3 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 px-4 pb-3 shrink-0",children:e$.map(a=>{let c=j.has(a.key);return(0,b.jsx)("button",{onClick:()=>n(a.key),className:`px-2.5 py-1 text-[11px] font-medium rounded-full border transition-all ${c?"bg-emerald-50 dark:bg-emerald-950 text-emerald-700 dark:text-emerald-400 border-emerald-200 dark:border-emerald-800 shadow-sm":"bg-white dark:bg-zinc-900 text-zinc-400 dark:text-zinc-500 border-zinc-200 dark:border-zinc-700 hover:text-zinc-600 dark:hover:text-zinc-300 hover:border-zinc-300 dark:hover:border-zinc-600"}`,children:a.label},a.key)})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar border-t border-zinc-100 dark:border-zinc-800",children:0===o.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,b.jsx)("svg",{className:"w-8 h-8 text-zinc-200 dark:text-zinc-700 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:h.trim()?"No activity matching your search":"No activity yet"}),h.trim()&&(0,b.jsx)("button",{onClick:()=>i(""),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 mt-1.5",children:"Clear search"})]}):(0,b.jsxs)(b.Fragment,{children:[r.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"sticky top-0 z-[1] px-4 py-1.5 bg-zinc-50/95 dark:bg-zinc-800/95 backdrop-blur-sm border-b border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:a.label})}),(0,b.jsx)("div",{className:"divide-y divide-zinc-50 dark:divide-zinc-800",children:a.events.map(a=>(0,b.jsx)(eX,{event:a,variant:"full",onNodeClick:f,onHandleClick:g},a.id))})]},a.label)),q&&(0,b.jsx)("div",{className:"flex justify-center py-3 border-t border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsxs)("button",{onClick:()=>m(a=>a+50),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 font-medium px-3 py-1.5 rounded-full hover:bg-emerald-50 dark:hover:bg-emerald-950 transition-colors",children:["Show ",Math.min(50,o.length-l)," more events"]})})]})}),(0,b.jsx)("div",{className:"shrink-0 px-5 py-2.5 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50",children:(0,b.jsxs)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:[q?`${l} of ${o.length} events`:`${o.length} event${1!==o.length?"s":""}`,!s&&" (filtered)",h.trim()&&` matching "${h.trim()}"`]})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transition-transform duration-300 ease-out ${d?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-xl border-t border-zinc-200 dark:border-zinc-700 max-h-[60vh] flex flex-col",children:[(0,b.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Activity"}),a.length>0&&(0,b.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 rounded-full text-[10px] font-medium",children:a.length})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 px-5 pb-3",children:e$.map(a=>(0,b.jsx)("button",{onClick:()=>n(a.key),className:`px-2.5 py-1 text-[11px] font-medium rounded-full border transition-colors ${j.has(a.key)?"bg-emerald-50 dark:bg-emerald-950 text-emerald-700 dark:text-emerald-400 border-emerald-200 dark:border-emerald-800":"bg-white dark:bg-zinc-900 text-zinc-400 dark:text-zinc-500 border-zinc-200 dark:border-zinc-700"}`,children:a.label},a.key))}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===o.length?(0,b.jsx)("div",{className:"py-8 text-center text-xs text-zinc-400 dark:text-zinc-500",children:"No activity matching filters"}):(0,b.jsxs)(b.Fragment,{children:[r.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"sticky top-0 z-[1] px-5 py-1.5 bg-zinc-50/95 dark:bg-zinc-800/95 backdrop-blur-sm border-b border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:a.label})}),(0,b.jsx)("div",{className:"divide-y divide-zinc-50 dark:divide-zinc-800",children:a.events.map(a=>(0,b.jsx)(eX,{event:a,variant:"full",onNodeClick:f,onHandleClick:g},a.id))})]},a.label)),q&&(0,b.jsx)("div",{className:"flex justify-center py-3 border-t border-zinc-100/60 dark:border-zinc-700/60",children:(0,b.jsxs)("button",{onClick:()=>m(a=>a+50),className:"text-[11px] text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 font-medium px-3 py-1.5 rounded-full hover:bg-emerald-50 dark:hover:bg-emerald-950 transition-colors",children:["Show ",Math.min(50,o.length-l)," more events"]})})]})})]})})]})}let e1=[{target:"graph",title:"The Dependency Graph",description:"Each circle is a task or issue. The flowing particles between them show the direction of dependencies — what needs to happen before something else can start. Bigger circles mean more connections.",padding:0},{target:"layouts",title:"Layout Modes",description:"Switch how the graph is arranged. Force is organic and physics-based. DAG gives you a clean top-down tree. Radial spreads nodes in rings. Cluster groups by project. Spread spaces everything out for screenshots."},{target:"btn-collapse",title:"Collapse / Expand",description:"Group all epic tasks into a single node, or expand them back out. Great for getting a high-level overview of your project when there are many tasks."},{target:"btn-clusters",title:"Cluster Labels",description:"Toggle transparent labels that show project prefixes behind groups of related nodes. Helps you see which project each cluster belongs to at a glance."},{target:"btn-autofit",title:"Auto-fit",description:"When enabled (green), the camera automatically re-centers and zooms to fit all nodes after every update. Turn it off to keep the camera fixed while you explore."},{target:"btn-pulse",title:"Pulse",description:"Highlights the most recently active node with emerald ripples. Useful for spotting which task just changed status or was just created."},{target:"legend-stats",title:"Project Stats",description:"A quick summary of your project: total issues, dependency count, and how many separate projects are tracked. When legend filters are active, these numbers update to reflect only the visible nodes."},{target:"legend-color-mode",title:"Color Mode Selector",description:"Switch what the node fill color represents. Status shows open/closed/blocked. Priority shows urgency. Type highlights epics, tasks, bugs, features, and chores. Owner, Assignee, and Prefix color by person or project. The ring around each node always shows which project it belongs to."},{target:"legend-items",title:"Legend",description:'Shows what each color means for the current color mode. Click any label to filter the graph — only matching nodes will be shown. Click more labels to combine filters (union). Click again to remove a filter, or use "Clear filters" to reset. The colored dots match the node fills in the graph.'},{target:"minimap",title:"Minimap",description:"A bird’s-eye view of your entire graph. Click anywhere to jump there. Drag the edges to resize it."},{target:"overlays",title:"Leaderboard & Activity",description:"These compact overlays live in the top-right corner. The activity feed shows recent changes — tasks created, statuses updated, priorities shifted. The leaderboard ranks contributors by closed issues, created issues, and comments. Click either to expand into a full sidebar."},{target:"graph",title:"Multi-Select & Group Drag",description:"Right-click and drag on the canvas background to draw a selection rectangle around multiple nodes. Shift-click individual nodes to toggle them in/out of the selection. Once selected, drag any selected node to move the entire group together. Press Escape to deselect all.",padding:0},{target:"graph",title:"Quick Navigation Shortcuts",description:"Press Shift+0 to instantly zoom to the most recently edited node (the pulsing one). Press Shift+1 through Shift+9 to jump to a node belonging to the corresponding leaderboard contributor — Shift+1 for #1, Shift+2 for #2, and so on. Great for quickly checking what your top contributors are working on.",padding:0},{target:"auth-section",title:"Sign In & Profiles",description:"Sign in with your Bluesky/ATProto account to comment, claim tasks, and like comments. Click any avatar on the graph to see that person’s profile — their stats, recent activity, and contributions. Click your own handle in the dropdown to view your profile."},{target:"btn-theme",title:"Dark Mode",description:"Toggle between light and dark themes. Your preference is saved and persists across sessions. The entire UI — canvas, panels, tooltips, and overlays — adapts to your chosen theme."},{target:"graph",title:"Interacting with Nodes",description:"Click a node to see its details, labels, assignee, and linked commits. Hover for a quick tooltip. Right-click for actions like viewing descriptions, commenting, claiming tasks, collapsing epics, or focusing on an epic’s subgraph. Avatars on nodes show who claimed or is assigned — hover for details like “einstein.climateai.org claimed beads-map-123”, click to open their profile.",padding:0},{target:"nav-replay",title:"Replay",description:"Step through your project’s history one event at a time. Watch issues appear and change status as they were created. Use the scrubber to jump to any point in time."},{target:"nav-comments",title:"Comments",description:"Opens a sidebar showing all conversations across your beads. See who said what, reply to threads, and like comments — all powered by the AT Protocol."},{target:"nav-activity",title:"Activity",description:'A real-time feed of changes for your local issues. See when tasks are created, statuses change, priorities shift, and dependencies are added. Use "Show more" to page through the full history. During timeline replay, the feed filters to only events up to the current point in time.'},{target:"nav-learn",title:"Learn",description:"Opens the help panel with keyboard shortcuts, feature documentation, and this interactive tutorial. Click it anytime to come back here."}];function e2({step:a,onNext:d,onEnd:e}){let[f,g]=(0,c.useState)(null),h=(0,c.useCallback)(()=>{if(null===a)return void g(null);let b=e1[a];if(!b)return void g(null);let c=document.querySelector(`[data-tutorial="${b.target}"]`);if(c){let a=c.getBoundingClientRect(),d=b.padding??8;g({left:a.left-d,top:a.top-d,width:a.width+2*d,height:a.height+2*d})}else g(null)},[a]);if((0,c.useEffect)(()=>{h();let a=()=>h();window.addEventListener("resize",a);let b=setTimeout(h,150);return()=>{window.removeEventListener("resize",a),clearTimeout(b)}},[h]),null===a)return null;let i=a===e1.length-1;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[55] cursor-pointer",onClick:()=>{i?e():d()},children:(0,b.jsxs)("svg",{className:"absolute inset-0 w-full h-full",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("mask",{id:"tutorial-mask",children:[(0,b.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),f&&(0,b.jsx)("rect",{x:f.left,y:f.top,width:f.width,height:f.height,rx:8,ry:8,fill:"black"})]})}),(0,b.jsx)("rect",{width:"100%",height:"100%",fill:"rgba(0,0,0,0.45)",mask:"url(#tutorial-mask)"})]})}),f&&(0,b.jsx)("div",{className:"fixed rounded-lg ring-2 ring-emerald-400/60 dark:ring-emerald-500/60 animate-pulse z-[56]",style:{left:f.left,top:f.top,width:f.width,height:f.height,pointerEvents:"none"}})]})}let e3="#d20f39",e4="#179299",e5="#fe640b",e6="#1e66f5",e7="#40a02b",e8="#8839ef",e9="#209fb5",fa="#ea76cb";function fb({isOpen:a,onClose:c,tutorialStep:d=null,onStartTutorial:e,onNextStep:f,onPrevStep:g,onEndTutorial:h}){let i=null!==d,j=i?"Tutorial":"Welcome to Heartbeads",k=i?(0,b.jsx)(fc,{step:d,onNext:f,onPrev:g,onEnd:h}):(0,b.jsx)(ff,{onStartTutorial:e});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"} ${i?"z-[60]":"z-30"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:j}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:k})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out ${a?"translate-y-0":"translate-y-full"} ${i?"z-[60]":"z-20"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl border-t border-zinc-200 dark:border-zinc-700 max-h-[70vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:j}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:k})]})})]})}function fc({step:a,onNext:c,onPrev:d,onEnd:e}){let f=e1[a],g=e1.length,h=a===g-1;return(0,b.jsxs)("div",{className:"px-5 py-4 flex flex-col min-h-[300px]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("span",{className:"text-xs font-medium",style:{color:e4},children:[a+1," / ",g]}),(0,b.jsx)("div",{className:"flex gap-1",children:Array.from({length:g}).map((c,d)=>(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full transition-colors",style:{backgroundColor:d===a?e7:d<a?e4:"#dce0e8"}},d))})]}),(0,b.jsx)("h3",{className:"text-base font-semibold text-zinc-900 dark:text-zinc-100 mb-2",children:f.title}),(0,b.jsx)("p",{className:"text-[13px] text-zinc-600 dark:text-zinc-300 leading-relaxed mb-6",children:f.description}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-4 border-t border-zinc-100 dark:border-zinc-800",children:[0===a?(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm font-medium text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:"Skip"}):(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",style:{color:e6},children:"Back"}),(0,b.jsx)("div",{className:"flex-1"}),h?(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Done"}):(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Next"})]})]})}function fd({color:a,children:c}){return(0,b.jsxs)("li",{className:"flex gap-2.5 items-start",children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mt-[6px] shrink-0",style:{backgroundColor:a}}),(0,b.jsx)("span",{children:c})]})}function fe({children:a,color:c}){return(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2 mt-5 first:mt-0",style:{color:c},children:a})}function ff({onStartTutorial:a}){return(0,b.jsxs)("div",{className:"px-5 py-4 text-[13px] text-zinc-600 dark:text-zinc-300 leading-relaxed",children:[a&&(0,b.jsxs)("button",{onClick:a,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 mb-5 text-white text-sm font-medium rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),"Take the guided tour"]}),(0,b.jsx)("p",{className:"text-zinc-900 dark:text-zinc-100 font-medium mb-1",children:"Your command center for AI coding tasks."}),(0,b.jsx)("p",{className:"mb-4 text-zinc-500 dark:text-zinc-400",children:"Heartbeads shows everything your AI agents are working on as a live, interactive graph — tasks, dependencies, who's doing what, and what's blocking progress."}),(0,b.jsx)(fe,{color:e3,children:"The graph"}),(0,b.jsxs)("p",{className:"mb-2",children:["Each ",(0,b.jsx)("strong",{children:"circle"})," is a task. ",(0,b.jsx)("strong",{children:"Flowing particles"})," ","stream between them to show dependency direction."]}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Bigger circles"})," — more connected, more important"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Solid lines + particles"})," — “blocks” (A must finish before B)"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Dashed lines"})," — parent-child grouping"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Colored ring"})," — which project it belongs to"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Avatars"})," — small profile pictures on nodes show who claimed or is assigned to that task"]}),(0,b.jsxs)(fd,{color:e3,children:[(0,b.jsx)("strong",{children:"Labels"})," — tags like “mobile”, “ux”, or “build” shown as pills in node details and hover tooltips"]})]}),(0,b.jsx)(fe,{color:e6,children:"Navigation"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Click"})," a node to open its details"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Hover"})," for a quick summary"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Right-click"})," for actions — descriptions, comments, claims, collapse, or focus on an epic"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Scroll"})," to zoom, ",(0,b.jsx)("strong",{children:"drag"})," to pan"]})]}),(0,b.jsx)(fe,{color:e6,children:"Keyboard shortcuts"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Cmd/Ctrl+F"})," — search by name, ID, owner, or commenter"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Shift+0"})," — zoom to the most recently edited node"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Shift+1-9"})," — zoom to a node from the #1-#9 leaderboard contributor"]}),(0,b.jsxs)(fd,{color:e6,children:[(0,b.jsx)("strong",{children:"Escape"})," — clear search or multi-selection"]})]}),(0,b.jsx)(fe,{color:e4,children:"Layouts"}),(0,b.jsx)("p",{className:"mb-2",children:"Top-left buttons rearrange the graph:"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Force"})," — organic, physics-based"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"DAG"})," — clean top-down tree"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Radial"})," — rings from center outward"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Cluster"})," — grouped by project"]}),(0,b.jsxs)(fd,{color:e4,children:[(0,b.jsx)("strong",{children:"Spread"})," — spaced out for screenshots"]})]}),(0,b.jsx)(fe,{color:e5,children:"Color modes"}),(0,b.jsx)("p",{className:"mb-2",children:"Bottom-right panel — paint nodes by:"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Status"})," — open, in progress, blocked, closed"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Priority"})," — P0 critical to P4 backlog"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Type"})," — epic, task, bug, feature, or chore"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Owner"})," — who created it"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Assignee"})," — who's working on it"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Prefix"})," — which project"]}),(0,b.jsxs)(fd,{color:e5,children:[(0,b.jsx)("strong",{children:"Click to filter"})," — click any legend label to show only matching nodes. Combine multiple for a union view"]})]}),(0,b.jsx)(fe,{color:e8,children:"More"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Collapse/Expand"})," — tidy up epics into single nodes"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Focus on epic"})," — right-click an epic to isolate its subgraph (children + dependencies). Click the banner or right-click again to return"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Clusters"})," — dashed circles grouping projects when zoomed out"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Replay"})," — step through your project's history"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Comments"})," — leave notes on tasks (sign in first)"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Activity feed"})," — compact overlay in top-right and full sidebar. Real-time local changes with pagination. During replay, filters to the current point in time"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Claim tasks"})," — right-click to mark as yours"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Minimap"})," — click to jump, drag edges to resize"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Auto-fit"})," — top-left toggle to lock/unlock automatic camera reframing"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Pulse"})," — the most recently active node pulses with emerald ripples. Toggle it on/off in view controls"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Copy"})," — clipboard icon copies task with project info"]})]}),(0,b.jsx)(fe,{color:e7,children:"Multi-select"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Right-click + drag"})," — draw a rectangle on the canvas background to select multiple nodes"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Shift + click"})," — toggle individual nodes into or out of the selection"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Group drag"})," — drag any selected node to move them all together"]}),(0,b.jsxs)(fd,{color:e7,children:[(0,b.jsx)("strong",{children:"Escape"})," — clear the selection"]})]}),(0,b.jsx)(fe,{color:e9,children:"Leaderboard & Profiles"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Leaderboard"})," — top-right overlay ranking contributors by closed, created, and commented issues. Click “See all” for the full sidebar"]}),(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Profiles"})," — click any avatar on the graph to open their profile panel with stats and recent activity"]}),(0,b.jsxs)(fd,{color:e9,children:[(0,b.jsx)("strong",{children:"Your profile"})," — click your handle in the sign-in dropdown to see your own stats"]})]}),(0,b.jsx)(fe,{color:fa,children:"Sharing & Settings"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Shareable URLs"})," — the current view state is stored in the URL. Copy it to share a specific node, panel, color mode, or filter with anyone"]}),(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Text-to-speech"})," — open a task description and click the speaker icon to hear it read aloud. Select text for targeted playback. Adjust speed in settings"]}),(0,b.jsxs)(fd,{color:fa,children:[(0,b.jsx)("strong",{children:"Settings"})," — gear icon for TTS voice, playback speed, and dashboard access controls"]})]}),(0,b.jsx)(fe,{color:e8,children:"Appearance"}),(0,b.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"Dark mode"})," — click the moon/sun icon in the header to toggle. Your preference is saved to localStorage and persists across sessions"]}),(0,b.jsxs)(fd,{color:e8,children:[(0,b.jsx)("strong",{children:"System preference"})," — on first visit, heartbeads follows your OS dark/light setting automatically"]})]}),(0,b.jsxs)("div",{className:"mt-5 pt-4 border-t border-zinc-100 dark:border-zinc-800 text-xs text-zinc-400 dark:text-zinc-500",children:["Built with"," ",(0,b.jsx)("a",{href:"https://github.com/GainForest/beads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:e7},children:"beads"})," ","— open-source issue tracking for AI-native development. Heartbeads is built for the GainForest agentic workflow and open-sourced at"," ",(0,b.jsx)("a",{href:"https://github.com/daviddao/heartbeads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:e7},children:"github.com/daviddao/heartbeads"}),"."]})]})}function fg({entries:a,collapsed:c,compact:d,onToggleCollapse:e,onExpandPanel:f,onProfileClick:g}){return c?(0,b.jsxs)("button",{onClick:e,className:"flex items-center gap-2 px-3 py-1.5 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-full border border-zinc-200/80 dark:border-zinc-700/80 shadow-sm hover:shadow-md transition-all cursor-pointer",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-amber-500",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-xs font-medium text-zinc-600 dark:text-zinc-400",children:"Leaderboard"}),a.length>0&&(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}):(0,b.jsxs)("div",{className:`${d?"w-60":"w-72"} max-w-[calc(100vw-2rem)] bg-white/95 dark:bg-zinc-900/95 backdrop-blur-sm rounded-xl border border-zinc-200/80 dark:border-zinc-700/80 shadow-lg overflow-hidden`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-400"}),(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-700 dark:text-zinc-300 uppercase tracking-wider",children:"Leaderboard"})]}),(0,b.jsx)("button",{onClick:e,className:"p-1 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})})]}),(0,b.jsx)("div",{className:"max-h-[220px] overflow-y-auto",children:a.slice(0,3).map((a,c)=>(0,b.jsxs)("button",{onClick:()=>g(a.handle),className:"flex items-center gap-2.5 w-full px-3 py-2 hover:bg-zinc-50/60 dark:hover:bg-zinc-800/60 transition-colors text-left cursor-pointer",children:[(0,b.jsx)("span",{className:`text-[11px] font-bold tabular-nums w-4 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-6 h-6 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-[10px] font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-[11px] font-medium text-zinc-700 dark:text-zinc-300 truncate",children:a.handle}),(0,b.jsxs)("div",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[a.closedCount," closed · ",a.createdCount," created · ",a.commentCount," comments"]})]})]},a.handle))}),a.length>0&&(0,b.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[a.length," contributors"]}),(0,b.jsx)("button",{onClick:f,className:"text-[10px] font-medium text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors cursor-pointer",children:"See all →"})]})]})}function fh({entries:a,isOpen:c,onClose:d,onProfileClick:e}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${c?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold text-zinc-400 uppercase tracking-wider",children:"Leaderboard"}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[a.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>e(a.handle),className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors text-left group cursor-pointer",children:[(0,b.jsx)("span",{className:`text-sm font-bold tabular-nums w-6 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-9 h-9 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-9 h-9 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-sm font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold text-zinc-800 dark:text-zinc-200 truncate group-hover:text-emerald-600 dark:group-hover:text-emerald-400 transition-colors",children:a.handle}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-0.5",children:[(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.closedCount})," closed"]}),(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.createdCount})," created"]}),(0,b.jsxs)("span",{className:"text-[11px] text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.commentCount})," comments"]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 flex flex-col items-center",children:[(0,b.jsx)("span",{className:"text-lg font-bold text-zinc-700 dark:text-zinc-300",children:a.score}),(0,b.jsx)("span",{className:"text-[9px] text-zinc-400 uppercase",children:"pts"})]})]},a.handle)),0===a.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-zinc-300 dark:text-zinc-500",children:[(0,b.jsx)("svg",{className:"w-10 h-10 mb-3",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-xs",children:"No contributors yet"})]})]}),(0,b.jsx)("div",{className:"px-4 py-2.5 border-t border-zinc-100 dark:border-zinc-800 text-[10px] text-zinc-400",children:"Score = closed×3 + created×1 + comments×1"})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transition-transform duration-300 ease-out ${c?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-xl border-t border-zinc-200 dark:border-zinc-700 max-h-[60vh] flex flex-col",children:[(0,b.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Leaderboard"}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-white bg-amber-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center",children:a.length})]}),(0,b.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-lg transition-colors cursor-pointer",children:(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[a.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>e(a.handle),className:"flex items-center gap-2.5 w-full px-4 py-2.5 hover:bg-zinc-50/50 dark:hover:bg-zinc-800/50 transition-colors text-left group cursor-pointer",children:[(0,b.jsx)("span",{className:`text-xs font-bold tabular-nums w-5 text-center shrink-0 ${0===c?"text-amber-500":1===c?"text-zinc-400":2===c?"text-amber-700":"text-zinc-300 dark:text-zinc-500"}`,children:c+1}),a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-7 h-7 rounded-full ring-1 ring-zinc-100 dark:ring-zinc-700 shrink-0"}):(0,b.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-xs font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-xs font-semibold text-zinc-800 dark:text-zinc-200 truncate group-hover:text-emerald-600 dark:group-hover:text-emerald-400 transition-colors",children:a.handle}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.closedCount})," closed"]}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.createdCount})," created"]}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-400",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:a.commentCount})," comments"]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 flex flex-col items-center",children:[(0,b.jsx)("span",{className:"text-base font-bold text-zinc-700 dark:text-zinc-300",children:a.score}),(0,b.jsx)("span",{className:"text-[8px] text-zinc-400 dark:text-zinc-400 uppercase",children:"pts"})]})]},a.handle)),0===a.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-zinc-300 dark:text-zinc-500",children:[(0,b.jsx)("svg",{className:"w-8 h-8 mb-2",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",children:(0,b.jsx)("path",{d:"M4 2h8v5a4 4 0 01-8 0V2zM4 4H2a1 1 0 00-1 1v1a2 2 0 002 2h1M12 4h2a1 1 0 011 1v1a2 2 0 01-2 2h-1M6 12h4M8 10v2M5 14h6"})}),(0,b.jsx)("span",{className:"text-[11px]",children:"No contributors yet"})]})]}),(0,b.jsx)("div",{className:"px-4 py-2 border-t border-zinc-100 dark:border-zinc-800 text-[9px] text-zinc-400 text-center",children:"Score = closed×3 + created×1 + comments×1"})]})})]})}function fi({isOpen:a,onClose:d}){let[e,f]=(0,c.useState)(""),[g,h]=(0,c.useState)(""),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(!1);(0,c.useEffect)(()=>{n(!0)},[]),(0,c.useEffect)(()=>{if(a){let a={...em};f(a.elevenLabsApiKey||""),h(a.elevenLabsVoiceId),j(a.elevenLabsModel),l(!1),fetch("/api/auth").then(a=>a.json()).then(a=>p(!0===a.protected)).catch(()=>p(!1))}},[a]),(0,c.useEffect)(()=>{if(!a)return;let b=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,d]);let q=(0,c.useCallback)(async()=>{try{await fetch("/api/auth",{method:"DELETE"})}catch{}window.location.href="/login"},[]),r=(0,c.useCallback)(()=>{e.trim(),g.trim(),d()},[e,g,i,d]);return a&&m?(0,ej.createPortal)((0,b.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.4)",backdropFilter:"blur(4px)"},onClick:d,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-2xl w-[90vw] max-w-md flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Settings"}),(0,b.jsx)("button",{onClick:d,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"px-5 py-4 space-y-4 overflow-y-auto max-h-[60vh]",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400",children:"Text-to-Speech"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"ElevenLabs API Key"}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{type:k?"text":"password",value:e,onChange:a=>f(a.target.value),placeholder:"sk_...",className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500 pr-10"}),(0,b.jsx)("button",{type:"button",onClick:()=>l(a=>!a),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors",title:k?"Hide key":"Show key",children:k?(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}):(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-400",children:["Get your key at"," ",(0,b.jsx)("a",{href:"https://elevenlabs.io/app/settings/api-keys",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"elevenlabs.io/app/settings"})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"Voice ID"}),(0,b.jsx)("input",{type:"text",value:g,onChange:a=>h(a.target.value),placeholder:"UgBBYS2sOqTuMpoF3BR0",className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500"}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-400 dark:text-zinc-400",children:["Default: Mark - Natural Conversations. Find voice IDs in the"," ",(0,b.jsx)("a",{href:"https://elevenlabs.io/app/voice-library",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"ElevenLabs Voice Library"}),"."]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-medium text-zinc-700 dark:text-zinc-300 mb-1",children:"Model"}),(0,b.jsxs)("select",{value:i,onChange:a=>j(a.target.value),className:"w-full rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-500",children:[(0,b.jsx)("option",{value:"eleven_flash_v2_5",children:"Flash v2.5 (default, fastest & cheapest)"}),(0,b.jsx)("option",{value:"eleven_turbo_v2_5",children:"Turbo v2.5 (fast, good quality)"}),(0,b.jsx)("option",{value:"eleven_multilingual_v2",children:"Multilingual v2 (highest quality)"})]})]}),(0,b.jsxs)("div",{className:"border-t border-zinc-100 dark:border-zinc-800 pt-4",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400 mb-2",children:"Public API"}),(0,b.jsxs)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed",children:["Heartbeads exposes a read-only REST API for AI agents, CI/CD bots, and integrations."," ",o?"API requests require the dashboard password as a Bearer token. ":"No authentication required. ",(0,b.jsx)("a",{href:"/api/docs",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-teal-500 hover:text-teal-600",children:"View API documentation"})]})]}),o&&(0,b.jsxs)("div",{className:"border-t border-zinc-100 dark:border-zinc-800 pt-4",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest text-teal-600 dark:text-teal-400 mb-2",children:"Dashboard Access"}),(0,b.jsxs)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed mb-3",children:["This instance is password-protected. The"," ",(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:"Sign In"})," ","button in the navbar is for"," ",(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400",children:"ATProto/Bluesky"})," ","— used for posting comments, likes, and claiming tasks. The dashboard password controls who can view the graph and access the API."]}),(0,b.jsxs)("button",{onClick:q,type:"button",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-zinc-200 dark:border-zinc-700 text-xs font-medium text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 hover:border-zinc-300 dark:hover:border-zinc-600 transition-colors",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),"Lock dashboard"]})]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-5 py-3.5 border-t border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 rounded-lg hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),(0,b.jsx)("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Save"})]})]})}),document.body):null}function fj({node:a,onShowDescription:d,onAddComment:e,onClaimTask:f,onUnclaimTask:g,onCollapseEpic:h,onUncollapseEpic:i,onFocusEpic:j,onExitFocusEpic:k,onClose:l}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&l()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[l]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-[99] bg-black/30",onClick:l}),(0,b.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-[100] bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl max-h-[70vh] overflow-y-auto animate-slide-up-sheet",children:[(0,b.jsx)("div",{className:"w-10 h-1 bg-zinc-300 dark:bg-zinc-700 rounded-full mx-auto mt-3 mb-2"}),(0,b.jsxs)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("span",{className:"text-[11px] font-mono text-zinc-400 dark:text-zinc-400",children:a.id})}),(0,b.jsx)("div",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-300 truncate mt-0.5",children:a.title})]}),(0,b.jsxs)("div",{className:"py-1",children:[d&&(0,b.jsxs)("button",{onClick:d,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Show description"]}),(0,b.jsxs)("button",{onClick:e,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),"Add comment"]}),f&&(0,b.jsxs)("button",{onClick:f,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),"Claim task"]}),g&&(0,b.jsxs)("button",{onClick:g,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-red-500 active:bg-red-50 dark:active:bg-red-950 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-red-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})}),"Unclaim task"]}),h&&(0,b.jsxs)("button",{onClick:h,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),"Collapse epic"]}),i&&(0,b.jsxs)("button",{onClick:i,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Uncollapse epic"]}),j&&(0,b.jsxs)("button",{onClick:j,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 dark:text-zinc-300 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"})}),"Focus on epic"]}),k&&(0,b.jsxs)("button",{onClick:k,className:"w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-emerald-600 dark:text-emerald-400 active:bg-emerald-50 dark:active:bg-emerald-950 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Show full graph"]})]}),(0,b.jsx)("div",{className:"border-t border-zinc-100 dark:border-zinc-800",children:(0,b.jsx)("button",{onClick:l,className:"w-full py-4 text-sm font-medium text-zinc-400 dark:text-zinc-400 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:"Cancel"})}),(0,b.jsx)("div",{className:"h-[env(safe-area-inset-bottom)]"})]})]})}let fk={assigned:"📋",closed:"✅",commented:"💬",claimed:"🙋",liked:"❤️"},fl={assigned:"Assigned to",closed:"Closed",commented:"Commented on",claimed:"Claimed",liked:"Liked a comment on"};function fm({isOpen:a,onClose:c,profile:d,onNodeNavigate:e}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl dark:shadow-2xl dark:shadow-black/20 z-30 transform transition-transform duration-300 ease-out ${a?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider",children:"Profile"}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:d&&(0,b.jsx)(fn,{profile:d,onNodeNavigate:e})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out z-20 ${a?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl border-t border-zinc-200 dark:border-zinc-700 max-h-[70vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 shrink-0",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider",children:"Profile"}),(0,b.jsx)("button",{onClick:c,className:"p-1 text-zinc-400 dark:text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:d&&(0,b.jsx)(fn,{profile:d,onNodeNavigate:e})})]})})]})}function fn({profile:a,onNodeNavigate:c}){let d=0===a.assignedCount&&0===a.closedCount&&0===a.claimedCount&&0===a.commentCount&&0===a.likeCount&&0===a.projects.length&&0===a.recentActivity.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"px-5 pt-4 pb-3 border-b border-zinc-100 dark:border-zinc-800",children:(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[a.avatar?(0,b.jsx)("img",{src:a.avatar,alt:a.handle,className:"w-12 h-12 rounded-full object-cover"}):(0,b.jsx)("div",{className:"w-12 h-12 rounded-full bg-zinc-200 dark:bg-zinc-800 flex items-center justify-center text-zinc-500 dark:text-zinc-400 text-lg font-semibold",children:a.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:a.handle}),a.lastActiveAt&&(0,b.jsxs)("div",{className:"text-xs text-zinc-400 dark:text-zinc-400",children:["Active ",ek(a.lastActiveAt)]})]})]})}),d?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-zinc-400 dark:text-zinc-500",children:"No activity yet"}),(0,b.jsx)("p",{className:"text-xs text-zinc-300 dark:text-zinc-600 mt-1",children:"This user hasn't contributed to any projects yet"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(fo,{label:"Assigned",value:a.assignedCount,color:"#1e66f5"}),(0,b.jsx)(fo,{label:"Closed",value:a.closedCount,color:"#40a02b"}),(0,b.jsx)(fo,{label:"Comments",value:a.commentCount,color:"#8839ef"}),(0,b.jsx)(fo,{label:"Likes given",value:a.likeCount,color:"#ea76cb"})]})}),(0,b.jsxs)("div",{className:"px-5 py-3 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Projects"}),0===a.projects.length?(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-400 italic",children:"No projects"}):(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.projects.map(a=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-[11px] font-medium",style:{backgroundColor:a.color+"15",color:a.color,border:`1px solid ${a.color}25`},children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:a.color}}),a.prefixLabel,(0,b.jsxs)("span",{className:"text-zinc-400 font-normal",children:["(",a.count,")"]})]},a.prefix))})]}),(0,b.jsxs)("div",{className:"px-5 py-3",children:[(0,b.jsx)("h3",{className:"text-[11px] font-semibold text-zinc-400 dark:text-zinc-400 uppercase tracking-wider mb-2",children:"Recent Activity"}),0===a.recentActivity.length?(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-400 italic",children:"No activity"}):(0,b.jsx)("div",{className:"space-y-2",children:a.recentActivity.map((a,d)=>(0,b.jsxs)("div",{className:"flex items-start gap-2 text-xs",children:[(0,b.jsx)("span",{className:"mt-0.5",children:fk[a.type]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("span",{className:"text-zinc-600 dark:text-zinc-400",children:[fl[a.type]," ",(0,b.jsx)("button",{onClick:()=>c(a.nodeId),className:"font-mono text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 hover:underline",children:a.nodeId})]}),a.detail&&(0,b.jsx)("p",{className:"text-zinc-400 dark:text-zinc-400 truncate mt-0.5",children:a.detail}),(0,b.jsx)("div",{className:"text-zinc-300 dark:text-zinc-500 mt-0.5",children:ek(a.time)})]})]},d))})]})]})]})}function fo({label:a,value:c,color:d}){return(0,b.jsxs)("div",{className:"bg-zinc-50 dark:bg-zinc-800 rounded-lg px-3 py-2",children:[(0,b.jsx)("div",{className:"text-lg font-semibold",style:{color:d},children:c}),(0,b.jsx)("div",{className:"text-[11px] text-zinc-400 dark:text-zinc-400",children:a})]})}let fp=new Map,fq=new Map;async function fr(a){let b=fp.get(a);if(b)return b;let c=fq.get(a);if(c)return c;let d=(async()=>{try{let b=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(a)}`);if(!b.ok)throw Error(`Profile fetch failed: ${b.status}`);let c=await b.json(),d={did:a,handle:c.handle||a,displayName:c.displayName||void 0,avatar:c.avatar||void 0};return fp.set(a,d),d}catch{let b={did:a,handle:a.slice(0,20)+"..."};return fp.set(a,b),b}finally{fq.delete(a)}})();return fq.set(a,d),d}let fs=process.env.INDEXER_URL||"https://hypergoat-app-production.up.railway.app/graphql",ft=`
6
6
  query FetchRecords($collection: String!, $first: Int, $after: String) {
7
7
  records(collection: $collection, first: $first, after: $after) {
8
8
  edges {
@@ -21,6 +21,6 @@ module.exports=[6103,(a,b,c)=>{"use strict";var d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\
21
21
  }
22
22
  }
23
23
  }
24
- `;async function fu(a){let b,c=[],d=!0,e=0;for(;d&&e<5;){let f=await fetch(fs,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:ft,variables:{collection:a,first:100,after:b}})});if(!f.ok)throw Error(`Indexer fetch failed: ${f.status}`);let g=await f.json();if(g.errors?.length)throw Error(g.errors[0].message);let h=g.data?.records;if(!h)break;for(let a of h.edges)c.push(a.node);d=h.pageInfo.hasNextPage,b=h.pageInfo.endCursor,e++}return c}async function fv(){let[a,b]=await Promise.all([fu("org.impactindexer.review.comment"),fu("org.impactindexer.review.like")]),c=a.filter(a=>{let b=a.value.subject;return b?.uri&&"string"==typeof b.uri&&b.uri.startsWith("beads:")}),d=new Map;for(let a of b){let b=a.value.subject;if(b?.uri&&"string"==typeof b.uri&&b.uri.startsWith("at://")){let c=d.get(b.uri)||[];c.push(a),d.set(b.uri,c)}}let e=new Set;for(let a of c)e.add(a.did);for(let a of b)e.add(a.did);let f=new Map((await Promise.all([...e].map(a=>fr(a)))).map(a=>[a.did,a])),g=[];for(let a of c){let b=a.value,c=b.subject.uri.replace(/^beads:/,""),e=b.text||"",h=b.createdAt||"",i=b.replyTo||void 0,j=f.get(a.did),k=(d.get(a.uri)||[]).map(a=>{let b=f.get(a.did),c=a.value;return{did:a.did,handle:b?.handle||a.did.slice(0,20)+"...",displayName:b?.displayName,avatar:b?.avatar,createdAt:c.createdAt||"",uri:a.uri,rkey:a.rkey}}),l={did:a.did,handle:j?.handle||a.did.slice(0,20)+"...",displayName:j?.displayName,avatar:j?.avatar,text:e,createdAt:h,uri:a.uri,rkey:a.rkey,nodeId:c,replyTo:i,likes:k,replies:[]};g.push(l)}let h=new Map;for(let a of g)h.set(a.uri,a);let i=[];for(let a of g){if(a.replyTo){let b=h.get(a.replyTo);if(b){b.replies.push(a);continue}}i.push(a)}i.sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime()),!function a(b){for(let c of b)c.replies.sort((a,b)=>new Date(a.createdAt).getTime()-new Date(b.createdAt).getTime()),a(c.replies)}(i);let j=new Map;for(let a of i){let b=j.get(a.nodeId)||[];b.push(a),j.set(a.nodeId,b)}let k=new Map;for(let a of g)k.set(a.nodeId,(k.get(a.nodeId)||0)+1);return{commentsByNode:j,commentedNodeIds:k,allComments:[...g].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime())}}let fw="node",fx="profile",fy="panel";function fz(){return{node:null,profile:null,panel:null,epic:null,color:"status",collapsed:new Set,filters:new Set,selected:new Set,replay:!1}}function fA(a){let b=new URLSearchParams(window.location.search),c=(a,c)=>{c?b.set(a,c):b.delete(a)};"node"in a&&c(fw,a.node),"profile"in a&&c(fx,a.profile),"panel"in a&&c(fy,a.panel),"epic"in a&&c("epic",a.epic),"color"in a&&c("color","status"===a.color?null:a.color),"collapsed"in a&&c("collapsed",a.collapsed&&a.collapsed.size>0?[...a.collapsed].join(","):null),"filters"in a&&c("filters",a.filters&&a.filters.size>0?[...a.filters].join(","):null),"selected"in a&&c("selected",a.selected&&a.selected.size>0?[...a.selected].join(","):null),"replay"in a&&c("replay",a.replay?"1":null),"node"in a&&a.node&&(b.delete(fx),b.delete(fy)),"profile"in a&&a.profile&&(b.delete(fw),b.delete(fy)),"panel"in a&&a.panel&&(b.delete(fw),b.delete(fx));let d=b.toString(),e=d?`?${d}`:window.location.pathname;window.history.replaceState(null,"",e)}function fB({totalSteps:a,currentStep:d,currentTime:e,isPlaying:f,speed:g,onStepChange:h,onPlayPause:i,onSpeedChange:j}){let k=(0,c.useCallback)(a=>{h(Number(a.target.value))},[h]),l=(0,c.useCallback)(()=>{j(1===g?2:2===g?4:1)},[g,j]),m=a>1;return(0,b.jsx)("div",{className:"bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm px-3 py-2 min-w-[280px] max-w-[480px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:i,disabled:!m,className:`shrink-0 w-6 h-6 flex items-center justify-center rounded transition-colors ${f?"text-emerald-500 hover:text-emerald-600":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:f?(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:[(0,b.jsx)("rect",{x:"3",y:"2",width:"3.5",height:"12",rx:"1"}),(0,b.jsx)("rect",{x:"9.5",y:"2",width:"3.5",height:"12",rx:"1"})]}):(0,b.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M4 2l10 6-10 6V2z"})})}),(0,b.jsx)("input",{type:"range",min:0,max:Math.max(a-1,0),value:d,onChange:k,disabled:!m,className:"timeline-slider flex-1 h-4 disabled:opacity-40"}),(0,b.jsxs)("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400 font-medium text-right whitespace-nowrap",children:[(0,b.jsxs)("span",{className:"text-zinc-400 dark:text-zinc-500",children:[d+1,"/",a]})," ",new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),(0,b.jsxs)("button",{onClick:l,className:`shrink-0 px-1.5 py-0.5 text-[10px] font-semibold rounded transition-colors ${g>1?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 border border-zinc-200 dark:border-zinc-700 hover:text-zinc-700 dark:hover:text-zinc-200"}`,children:[g,"x"]})]})})}function fC(a,b,c){let d=Date.now(),e=new Map(a.graphData.nodes.map(a=>[a.id,a])),f=new Set(a.graphData.links.map(q)),g=b.graphData.nodes.map(a=>{let f=e.get(a.id);if(!f){let c=function(a,b,c){for(let d of b){let b="object"==typeof d.source?d.source.id:d.source,e="object"==typeof d.target?d.target.id:d.target;if(b===a&&c.has(e)){let a=c.get(e);if(null!=a.x&&null!=a.y)return{x:a.x,y:a.y}}if(e===a&&c.has(b)){let a=c.get(b);if(null!=a.x&&null!=a.y)return{x:a.x,y:a.y}}}return null}(a.id,b.graphData.links,e);return{...a,_spawnTime:d,x:c?c.x+(Math.random()-.5)*40:void 0,y:c?c.y+(Math.random()-.5)*40:void 0}}let g={...a,x:f.x,y:f.y,fx:f.fx,fy:f.fy};if(c.changedNodes.has(a.id)){let b=c.changedNodes.get(a.id).find(a=>"status"===a.field);b&&(g._changedAt=d,g._prevStatus=b.from)}return g});for(let a of c.removedNodeIds){let b=e.get(a);b&&g.push({...b,_removeTime:d})}let h=b.graphData.links.map(a=>{let b=q(a);return f.has(b)?a:{...a,_spawnTime:d}});for(let b of c.removedLinkKeys){let c=a.graphData.links.find(a=>q(a)===b);c&&h.push({source:"object"==typeof c.source?c.source.id:c.source,target:"object"==typeof c.target?c.target.id:c.target,type:c.type,_removeTime:d})}return{...b,graphData:{nodes:g,links:h}}}let fD={open:"bg-emerald-500",in_progress:"bg-amber-500",blocked:"bg-red-500",deferred:"bg-violet-500",closed:"bg-zinc-400"};function fE(){let a,d,e,f,g,h,i,j,k,l,o,[p,q]=(0,c.useState)(null),[s,t]=(0,c.useState)(!0),[u,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(new Set),[A,B]=(0,c.useState)(new Set),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)("status"),[G,H]=(0,c.useState)(new Set),[I,J]=(0,c.useState)("Beads"),[K,M]=(0,c.useState)(0),[N,O]=(0,c.useState)({}),{isAuthenticated:P,session:Q}=(0,eI.useAuth)(),{theme:R,toggleTheme:S}=function(){let[a,b]=(0,c.useState)("light"),[d,e]=(0,c.useState)(!1);(0,c.useEffect)(()=>{e(!0);let a=localStorage.getItem("heartbeads-theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");b(a),document.documentElement.classList.toggle("dark","dark"===a)},[]);let f=(0,c.useCallback)(a=>{b(a),localStorage.setItem("heartbeads-theme",a),document.documentElement.classList.toggle("dark","dark"===a)},[]),g=(0,c.useCallback)(()=>{f("dark"===a?"light":"dark")},[a,f]);return{theme:a,setTheme:f,toggleTheme:g,mounted:d}}(),{commentsByNode:T,commentedNodeIds:U,allComments:V,refetch:W}=function(){let[a,b]=(0,c.useState)(new Map),[d,e]=(0,c.useState)(new Map),[f,g]=(0,c.useState)([]),[h,i]=(0,c.useState)(!0),[j,k]=(0,c.useState)(null),l=(0,c.useRef)(!1),m=(0,c.useCallback)(async()=>{try{i(!0),k(null);let a=await fv();l.current||(b(a.commentsByNode),e(a.commentedNodeIds),g(a.allComments))}catch(a){if(!l.current){let b=a instanceof Error?a.message:"Failed to fetch comments";console.error("Failed to fetch beads comments:",a),k(b)}}finally{l.current||i(!1)}},[]);return(0,c.useEffect)(()=>(l.current=!1,m(),()=>{l.current=!0}),[m]),{commentsByNode:a,commentedNodeIds:d,allComments:f,isLoading:h,error:j,refetch:m}}(),X=(a=(0,c.useRef)(fz()),d=(0,c.useCallback)(a=>{fA({node:a,profile:null,panel:null})},[]),e=(0,c.useCallback)(a=>{fA({profile:a,node:null,panel:null})},[]),f=(0,c.useCallback)(a=>{fA({panel:a,node:null,profile:null})},[]),g=(0,c.useCallback)(a=>{fA({epic:a})},[]),h=(0,c.useCallback)(a=>{fA({color:a})},[]),i=(0,c.useCallback)(a=>{fA({collapsed:a})},[]),j=(0,c.useCallback)(a=>{fA({filters:a})},[]),k=(0,c.useCallback)(a=>{fA({selected:a})},[]),l=(0,c.useCallback)(a=>{fA({replay:a})},[]),o=(0,c.useCallback)(()=>{window.history.replaceState(null,"",window.location.pathname)},[]),{...(0,c.useMemo)(()=>fz(),[]),initial:a.current,setNode:d,setProfile:e,setPanel:f,setEpic:g,setColor:h,setCollapsed:i,setFilters:j,setSelected:k,setReplay:l,clear:o}),[Y,Z]=(0,c.useState)(new Map),[$,_]=(0,c.useState)(new Set),[aa,ab]=(0,c.useState)(!1),[ac,ad]=(0,c.useState)(0),[ae,af]=(0,c.useState)(!1),[ag,ah]=(0,c.useState)(1),[ai,aj]=(0,c.useState)(null);(0,c.useEffect)(()=>{H(new Set)},[E]);let ak=(0,c.useMemo)(()=>p?new Set(p.graphData.nodes.map(a=>a.id)):new Set,[p]),al=(0,c.useMemo)(()=>{let a=new Map;if(V)for(let b of V){if(!ak.has(b.nodeId)||a.has(b.nodeId)||$.has(b.nodeId))continue;let c=b.text.trim();c.startsWith("@")&&-1===c.indexOf(" ")&&a.set(b.nodeId,{avatar:b.avatar,handle:b.handle,claimedAt:b.createdAt,did:b.did,rkey:b.rkey})}for(let[b,c]of Y)a.has(b)||$.has(b)||a.set(b,c);return a},[V,Y,$,ak]),am=(0,c.useMemo)(()=>{let a=new Map;if(!p||aa&&!ai)return a;let b=new Map;for(let a of aa&&ai?ai.graphData.nodes:p.graphData.nodes)a.assignee&&a.assignee.includes(".")&&(al.has(a.id)||(b.has(a.assignee)||b.set(a.assignee,[]),b.get(a.assignee).push(a)));for(let[c,d]of b){d.sort((a,b)=>{let c=b.updatedAt.localeCompare(a.updatedAt);return 0!==c?c:"closed"!==a.status&&"closed"===b.status?-1:"closed"===a.status&&"closed"!==b.status?1:a.id.localeCompare(b.id)});let b=d[0];a.set(b.id,{handle:c,avatar:void 0,updatedAt:b.updatedAt})}return a},[p,al,aa,ai]),[an,ao]=(0,c.useState)(new Map);(0,c.useEffect)(()=>{if(0===am.size)return;let a=new AbortController,b=[];for(let[,a]of am)an.has(a.handle)||b.push(a.handle);if(0===b.length)return;let c=[];for(let a=0;a<b.length;a+=5)c.push(b.slice(a,a+5));async function d(b){let c=b.map(async b=>{try{let c=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(b)}`,{signal:a.signal});if(!c.ok)return null;let d=await c.json();return{handle:b,avatar:d.avatar}}catch(a){return null}}),d=await Promise.allSettled(c),e=new Map;for(let a of d)"fulfilled"===a.status&&a.value&&a.value.avatar&&e.set(a.value.handle,a.value.avatar);return e}return(async()=>{for(let a of c){let b=await d(a);b.size>0&&ao(a=>new Map([...a,...b]))}})(),()=>a.abort()},[am]);let ap=(0,c.useMemo)(()=>{let a=new Map(am);for(let[b,c]of a){let d=an.get(c.handle);d&&a.set(b,{...c,avatar:d})}return a},[am,an]),aq=(0,c.useMemo)(()=>{if(!p)return[];let a=p.graphData.nodes,b=new Map,c=a=>{if(!a)return null;let c=b.get(a);return c||(c={handle:a,createdCount:0,closedCount:0,commentCount:0},b.set(a,c)),c};for(let b of a){let a=b.createdBy||b.owner||b.assignee;if(a){let b=c(a);b&&b.createdCount++}if("closed"===b.status&&b.assignee){let a=c(b.assignee);a&&a.closedCount++}}if(V){for(let a of V)if(ak.has(a.nodeId)&&!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))){let b=c(a.handle);b&&(b.commentCount++,a.avatar&&!b.avatar&&(b.avatar=a.avatar),a.did&&!b.did&&(b.did=a.did))}}for(let[,a]of ap){let c=b.get(a.handle);c&&a.avatar&&!c.avatar&&(c.avatar=a.avatar)}for(let[a,c]of an){let d=b.get(a);d&&!d.avatar&&(d.avatar=c)}let d=[];for(let a of b.values()){let b=3*a.closedCount+a.createdCount+a.commentCount;b>0&&d.push({...a,score:b})}return d.sort((a,b)=>b.score-a.score),d},[p,V,ap,an,ak]),[ar,as]=(0,c.useState)(!1),[at,au]=(0,c.useState)(null),[av,aw]=(0,c.useState)([]),[ax,ay]=(0,c.useState)(!1),[az,aA]=(0,c.useState)(!0),[aB,aC]=(0,c.useState)(!1),[aD,aE]=(0,c.useState)(null),[aF,aG]=(0,c.useState)(!1),[aH,aI]=(0,c.useState)(!0),aJ=ey(),aK=(0,c.useRef)(!1);(0,c.useEffect)(()=>{aK.current=aJ},[aJ]);let[aL,aM]=(0,c.useState)(!1),[aN,aO]=(0,c.useState)(null);(0,c.useEffect)(()=>{aI(aJ),aA(aJ)},[aJ]),(0,c.useEffect)(()=>{if(!p)return;let a=V?V.filter(a=>ak.has(a.nodeId)):null,b=function(a,b,c){let d=[],e=new Set;function f(a){e.has(a.id)||(e.add(a.id),d.push(a))}for(let b of a){if(b.createdAt){let a=new Date(b.createdAt).getTime();isNaN(a)||f({id:`node-created:${b.id}:${a}`,type:"node-created",time:a,nodeId:b.id,nodeTitle:b.title,actor:b.createdBy?{handle:b.createdBy}:b.owner?{handle:b.owner}:b.assignee?{handle:b.assignee}:void 0,detail:b.issueType,meta:{issueType:b.issueType,prefix:b.prefix}})}if(b.closedAt){let a=new Date(b.closedAt).getTime();isNaN(a)||f({id:`node-closed:${b.id}:${a}`,type:"node-closed",time:a,nodeId:b.id,nodeTitle:b.title,actor:b.owner?{handle:b.owner}:b.createdBy?{handle:b.createdBy}:b.assignee?{handle:b.assignee}:void 0,detail:b.closeReason||"Closed",meta:{prefix:b.prefix}})}}for(let c of b)if(c.createdAt){let b=new Date(c.createdAt).getTime();if(!isNaN(b)){let d="object"==typeof c.source?c.source.id:c.source,e="object"==typeof c.target?c.target.id:c.target,g=a.find(a=>a.id===d);f({id:`link-added:${d}->${e}:${b}`,type:"link-added",time:b,nodeId:d,actor:g?.assignee?{handle:g.assignee}:void 0,detail:`${c.type} ${e}`,meta:{linkType:c.type,target:e}})}}if(c)for(let a of c){let b=new Date(a.createdAt).getTime();if(isNaN(b))continue;let c={handle:a.handle,avatar:a.avatar,did:a.did};for(let d of(f(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")?{id:`task-claimed:${a.nodeId}:${b}`,type:"task-claimed",time:b,nodeId:a.nodeId,actor:c,detail:a.text}:a.replyTo?{id:`reply-added:${a.nodeId}:${a.rkey}`,type:"reply-added",time:b,nodeId:a.nodeId,actor:c,detail:a.text.length>80?a.text.slice(0,80)+"...":a.text}:{id:`comment-added:${a.nodeId}:${a.rkey}`,type:"comment-added",time:b,nodeId:a.nodeId,actor:c,detail:a.text.length>80?a.text.slice(0,80)+"...":a.text}),a.likes)){let b=new Date(d.createdAt).getTime();isNaN(b)||f({id:`like-added:${a.nodeId}:${d.rkey}`,type:"like-added",time:b,nodeId:a.nodeId,actor:{handle:d.handle,avatar:d.avatar,did:d.did},detail:`Liked comment by ${a.handle}`})}}return d.sort((a,b)=>b.time-a.time),d}(p.graphData.nodes,p.graphData.links,a);aw(a=>eZ(a,b))},[p,V,ak]),(0,c.useEffect)(()=>{if(0===av.length)return;let a=new Map;if(V)for(let b of V)for(let c of(b.avatar&&b.handle&&a.set(b.handle,b.avatar),b.likes))c.avatar&&c.handle&&a.set(c.handle,c.avatar);let b=!1,c=new Map;for(let[d,e]of a)an.has(d)||(c.set(d,e),b=!0);let d=new Set;for(let a of av)if(a.actor&&!a.actor.avatar&&a.actor.handle){let b=a.actor.handle;if(an.has(b)||c.has(b))continue;b.includes(".")&&!b.includes("@")&&d.add(b)}if(b&&0===d.size)return void ao(a=>new Map([...a,...c]));if(0===d.size){let a=!1,b=new Map([...an,...c]),d=av.map(c=>{if(c.actor&&!c.actor.avatar&&c.actor.handle){let d=b.get(c.actor.handle);if(d)return a=!0,{...c,actor:{...c.actor,avatar:d}}}return c});a&&aw(d);return}let e=new AbortController,f=[...d];return(async()=>{let a=new Map(c);for(let b=0;b<f.length;b+=5){let c=f.slice(b,b+5).map(async a=>{try{let b=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(a)}`,{signal:e.signal});if(!b.ok)return null;let c=await b.json();return c.avatar?{handle:a,avatar:c.avatar}:null}catch{return null}});for(let b of(await Promise.allSettled(c)))"fulfilled"===b.status&&b.value&&a.set(b.value.handle,b.value.avatar)}a.size>0&&ao(b=>new Map([...b,...a]))})(),()=>e.abort()},[av,an,V]);let[aP,aQ]=(0,c.useState)(null),[aR,aS]=(0,c.useState)(null),[aT,aU]=(0,c.useState)(null),[aV,aW]=(0,c.useState)(!1),[aX,aY]=(0,c.useState)(null),[aZ,a$]=(0,c.useState)(null),[a_,a0]=(0,c.useState)(!1),[a1,a2]=(0,c.useState)(""),[a3,a4]=(0,c.useState)(0),[a5,a6]=(0,c.useState)(!0),[a7,a8]=(0,c.useState)(!0),[a9,ba]=(0,c.useState)(!0),bb=(0,c.useRef)(null),bc=(0,c.useRef)(null),bd=(0,c.useRef)(null),be=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=null,b=null,c=null,d=!0;return!function e(){(a=new EventSource("/api/beads/stream")).onmessage=a=>{if(d)try{let b=JSON.parse(a.data);if(b.error){v(b.error),t(!1);return}let c=bd.current,d=r(c,b);if(!c){bd.current=b,q(b),t(!1);return}if(!d.hasChanges)return;let e=function(a,b){let c=[],d=Date.now(),e=new Map(b.map(a=>[a.id,a]));for(let b of a.addedNodeIds){let a=e.get(b);c.push({id:`node-created:${b}:${d}`,type:"node-created",time:d,nodeId:b,nodeTitle:a?.title,actor:a?.assignee?{handle:a.assignee}:void 0,detail:a?.issueType||"task",meta:a?{issueType:a.issueType,prefix:a.prefix}:void 0})}for(let b of a.removedNodeIds){let a=e.get(b);c.push({id:`node-closed:${b}:${d}`,type:"node-closed",time:d,nodeId:b,actor:a?.assignee?{handle:a.assignee}:void 0,detail:"Removed"})}for(let[b,f]of a.changedNodes){let a=e.get(b);for(let e of f){let f;switch(e.field){case"status":default:f="node-status-changed";break;case"priority":f="node-priority-changed";break;case"title":f="node-title-changed";break;case"owner":f="node-owner-changed";break;case"assignee":f="node-assignee-changed"}c.push({id:`${f}:${b}:${d}:${e.field}`,type:f,time:d,nodeId:b,nodeTitle:a?.title,actor:a?.assignee?{handle:a.assignee}:void 0,detail:`${e.from} \u2192 ${e.to}`,meta:{field:e.field,from:e.from,to:e.to}})}}for(let b of a.addedLinkKeys){let a=b.match(/^(.+)->(.+):(.+)$/);if(a){let[,f,g,h]=a,i=e.get(f);c.push({id:`link-added:${b}:${d}`,type:"link-added",time:d,nodeId:f,actor:i?.assignee?{handle:i.assignee}:void 0,detail:`${h} ${g}`,meta:{linkType:h,target:g}})}}for(let b of a.removedLinkKeys){let a=b.match(/^(.+)->(.+):(.+)$/);if(a){let[,e,f,g]=a;c.push({id:`link-removed:${b}:${d}`,type:"link-removed",time:d,nodeId:e,detail:`${g} ${f}`,meta:{linkType:g,target:f}})}}return c}(d,b.graphData.nodes);e.length>0&&aw(a=>eZ(a,e));let f=fC(c,b,d);bd.current=f,q(f)}catch(a){console.error("Failed to parse SSE message:",a)}},a.onerror=()=>{a?.readyState===EventSource.CLOSED&&(b=setTimeout(e,5e3))},c=setTimeout(()=>{d&&(bd.current||fetch("/api/beads").then(a=>a.json()).then(a=>{d&&!bd.current&&(bd.current=a,q(a),t(!1))}).catch(()=>{}))},5e3)}(),()=>{d=!1,a?.close(),b&&clearTimeout(b),c&&clearTimeout(c)}},[]),(0,c.useEffect)(()=>{fetch("/api/config").then(a=>a.json()).then(a=>{a.name&&J(a.name),a.repoCount&&M(a.repoCount),a.repoUrls&&O(a.repoUrls)}).catch(()=>{})},[]),(0,c.useEffect)(()=>{if(!p||be.current)return;be.current=!0;let a=X.initial;if(a.node){let b=p.graphData.nodes.find(b=>b.id===a.node);b&&x(b)}a.profile&&au(a.profile),"comments"===a.panel&&as(!0),"activity"===a.panel&&ay(!0),"help"===a.panel&&aC(!0),"leaderboard"===a.panel&&aG(!0),a.epic&&D(a.epic),a.color&&"status"!==a.color&&F(a.color),a.collapsed.size>0&&B(a.collapsed),a.filters.size>0&&H(a.filters),a.selected.size>0&&z(a.selected),a.replay&&ab(!0)},[p]),(0,c.useEffect)(()=>{if(!p)return;let a=setTimeout(()=>{let a=Date.now(),b=p.graphData.nodes.filter(b=>!b._removeTime||a-b._removeTime<600),c=p.graphData.links.filter(b=>!b._removeTime||a-b._removeTime<600);(b.length!==p.graphData.nodes.length||c.length!==p.graphData.links.length)&&q(a=>a?{...a,graphData:{nodes:b,links:c}}:a)},700);return()=>clearTimeout(a)},[p]),(0,c.useEffect)(()=>{be.current&&(w?X.setNode(w.id):at?X.setProfile(at):ar?X.setPanel("comments"):ax?X.setPanel("activity"):aB?X.setPanel("help"):aF?X.setPanel("leaderboard"):X.setNode(null))},[w,at,ar,ax,aB,aF]),(0,c.useEffect)(()=>{be.current&&X.setEpic(C)},[C]),(0,c.useEffect)(()=>{be.current&&X.setColor(E)},[E]),(0,c.useEffect)(()=>{be.current&&X.setCollapsed(A)},[A]),(0,c.useEffect)(()=>{be.current&&X.setFilters(G)},[G]),(0,c.useEffect)(()=>{be.current&&X.setSelected(y)},[y]),(0,c.useEffect)(()=>{be.current&&X.setReplay(aa)},[aa]);let bf=(0,c.useMemo)(()=>p?function(a,b){let c=[];for(let b of a){let a=new Date(b.createdAt).getTime();if(isNaN(a)||c.push({time:a,type:"node-created",id:b.id}),b.closedAt){let a=new Date(b.closedAt).getTime();isNaN(a)||c.push({time:a,type:"node-closed",id:b.id})}}c.sort((a,b)=>a.time-b.time);let d=c.length>0?c[0].time:Date.now(),e=c.length>0?c[c.length-1].time:Date.now();return{events:c,minTime:d,maxTime:e}}(p.graphData.nodes,p.graphData.links):null,[p]),bg=(0,c.useMemo)(()=>{if(!aa||!bf)return av;if(-1===ac)return[];if(0===bf.events.length)return av;let a=bf.events[ac];if(!a)return av;let b=a.time;return av.filter(a=>a.time<=b)},[av,aa,bf,ac]),bh=(0,c.useMemo)(()=>{if(!aa||!bf||!ai)return aq;if(-1===ac)return[];if(0===bf.events.length)return aq;let a=bf.events[ac];if(!a)return aq;let b=a.time,c=ai.graphData.nodes,d=new Map,e=a=>{if(!a)return null;let b=d.get(a);return b||(b={handle:a,createdCount:0,closedCount:0,commentCount:0},d.set(a,b)),b};for(let a of c){let b=a.createdBy||a.owner||a.assignee;if(b){let a=e(b);a&&a.createdCount++}if("closed"===a.status&&a.assignee){let b=e(a.assignee);b&&b.closedCount++}}if(V){for(let a of V)if(!(!ak.has(a.nodeId)||new Date(a.createdAt).getTime()>b)&&!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))){let b=e(a.handle);b&&(b.commentCount++,a.avatar&&!b.avatar&&(b.avatar=a.avatar),a.did&&!b.did&&(b.did=a.did))}}for(let[,a]of ap){let b=d.get(a.handle);b&&a.avatar&&!b.avatar&&(b.avatar=a.avatar)}for(let[a,b]of an){let c=d.get(a);c&&!c.avatar&&(c.avatar=b)}let f=[];for(let a of d.values()){let b=3*a.closedCount+a.createdCount+a.commentCount;b>0&&f.push({...a,score:b})}return f.sort((a,b)=>b.score-a.score),f},[aq,aa,bf,ac,ai,V,ap,an,ak]),bi=(0,c.useMemo)(()=>{let a,b;if(!at||!p)return null;let c=aa&&ai?ai.graphData.nodes:p.graphData.nodes,d=aa&&bf&&ac>=0?bf.events[ac]?.time:void 0,e=V?V.filter(a=>ak.has(a.nodeId)):[],f=d?e.filter(a=>new Date(a.createdAt).getTime()<=d):e;if(al){for(let[,c]of al)if(c.handle===at){a=a||c.avatar,b=b||c.did;break}}if(ap){for(let[,b]of ap)if(b.handle===at){a=a||b.avatar;break}}for(let c of f)if(c.handle===at){a=a||c.avatar,b=b||c.did;break}let g=c.filter(a=>a.assignee===at),h=g.length,i=c.filter(a=>"closed"===a.status&&(a.assignee===at||a.createdBy===at)).length,j=0;if(al)for(let[,a]of al)a.handle===at&&j++;let k=f.filter(a=>a.handle===at),l=k.filter(a=>!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))).length,o=0;for(let a of f)for(let b of a.likes)b.handle===at&&o++;let q=new Map;for(let a of c)(a.assignee===at||a.createdBy===at)&&q.set(a.prefix,(q.get(a.prefix)||0)+1);let r=Array.from(q.entries()).sort((a,b)=>b[1]-a[1]).map(([a,b])=>({prefix:a,prefixLabel:m(a),color:n(a),count:b})),s=[];for(let a of g)s.push({type:"assigned",nodeId:a.id,nodeTitle:a.title,time:a.updatedAt});for(let a of c)"closed"===a.status&&a.closedAt&&(a.assignee===at||a.createdBy===at)&&s.push({type:"closed",nodeId:a.id,nodeTitle:a.title,time:a.closedAt});for(let a of k)a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")||s.push({type:"commented",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:a.createdAt,detail:a.text.slice(0,60)+(a.text.length>60?"...":"")});for(let a of f)a.handle===at&&a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")&&s.push({type:"claimed",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:a.createdAt});for(let a of f)for(let b of a.likes)b.handle===at&&s.push({type:"liked",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:b.createdAt});s.sort((a,b)=>new Date(b.time).getTime()-new Date(a.time).getTime());let t=s.slice(0,20),u=t.length>0?t[0].time:void 0;return{handle:at,avatar:a,did:b,assignedCount:h,closedCount:i,claimedCount:j,commentCount:l,likeCount:o,projects:r,recentActivity:t,lastActiveAt:u}},[at,p,al,ap,V,aa,ai,bf,ac,ak]),bj=(0,c.useCallback)(()=>{ab(a=>{let b=!a;return b&&ad(-1),af(!1),aj(null),b})},[]);(0,c.useEffect)(()=>{if(!ae||!aa||!bf)return;let a=setInterval(()=>{ad(a=>{let b=a+1;return b>=bf.events.length?(af(!1),a):b})},2e3/ag);return()=>clearInterval(a)},[ae,aa,ag,bf]),(0,c.useEffect)(()=>{if(!aa||!p||!bf)return;if(-1===ac)return void aj(a=>{let b={...p,graphData:{nodes:[],links:[]}};if(!a)return b;let c=r(a,b);return c.hasChanges?fC(a,b,c):a});if(0===bf.events.length)return;let a=bf.events[ac];if(!a)return;let b=function(a,b,c){let d=new Set,e=[];for(let b of a){let a=new Date(b.createdAt).getTime();if(isNaN(a)||a>c)continue;d.add(b.id);let f=b.status;if(b.closedAt){let a=new Date(b.closedAt).getTime();!isNaN(a)&&a<=c?f="closed":"closed"===b.status&&(f="open")}f!==b.status?e.push({...b,status:f}):e.push(b)}let f=[];for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;d.has(b)&&d.has(c)&&f.push({...a,source:b,target:c})}return{nodes:e,links:f}}(p.graphData.nodes,p.graphData.links,a.time),c={...p,graphData:{nodes:b.nodes,links:b.links}};aj(a=>{if(!a)return c;let b=r(a,c);return b.hasChanges?fC(a,c,b):a})},[aa,p,bf,ac]);let bk=(0,c.useCallback)((a,b)=>{if(b?.shiftKey){z(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c}),x(null);return}x(b=>b?.id===a.id?null:a),z(new Set),as(!1),ay(!1),aC(!1),au(null),aG(!1),aE(null),aM(!1),aO(null)},[]),bl=(0,c.useCallback)((a,b,c)=>{aK.current||a$(a?{node:a,x:b,y:c}:null)},[]),bm=(0,c.useCallback)(a=>{au(a.handle),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null),aY(null)},[]),bn=(0,c.useCallback)(a=>{B(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),bo=(0,c.useMemo)(()=>{if(!p)return new Set;let{nodes:a,links:b}=p.graphData,c=new Set;for(let a of b)if("parent-child"===a.type){let b="object"==typeof a.source?a.source.id:a.source;c.add(b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.add(a)}return c},[p]),bp=(0,c.useCallback)(()=>{B(new Set(bo))},[bo]),bq=(0,c.useCallback)(()=>{B(new Set)},[]),br=(0,c.useCallback)(a=>{D(a)},[]),bs=(0,c.useCallback)(()=>{D(null)},[]),bt=(0,c.useCallback)(()=>{aC(!0),x(null),as(!1),ay(!1),aG(!1),aE(0)},[]),bu=(0,c.useCallback)(()=>{aE(a=>null===a?null:a>=e1.length-1?a:a+1)},[]),bv=(0,c.useCallback)(()=>{aE(a=>null===a||a<=0?a:a-1)},[]),bw=(0,c.useCallback)(()=>{aE(null)},[]),bx=(0,c.useCallback)(()=>{x(null),z(new Set),aQ(null),aS(null),aO(null),au(null),aG(!1)},[]),by=(0,c.useCallback)((a,b)=>{aK.current||(aS(null),a$(null),a.description||P||"epic"===a.issueType?aQ({node:a,x:b.clientX,y:b.clientY}):aS({node:a,x:b.clientX,y:b.clientY}))},[P]),bz=(0,c.useCallback)(a=>{aS(null),a$(null),aO({node:a})},[]),bA=(0,c.useCallback)(async(a,b)=>{let c=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{$type:"org.impactindexer.review.comment",subject:{uri:`beads:${a}`,type:"record"},text:b,createdAt:new Date().toISOString()}})});if(!c.ok)throw Error((await c.json()).error||"Failed to post comment");await W()},[W]),bB=(0,c.useCallback)(async a=>{if(!Q?.handle)return;let b=Q.avatar;if(!b&&Q.did)try{let a=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(Q.did)}`);a.ok&&(b=(await a.json()).avatar)}catch{}Z(c=>{let d=new Map(c);return d.set(a,{avatar:b,claimedAt:new Date().toISOString(),handle:Q.handle}),d}),await bA(a,`@${Q.handle}`),setTimeout(()=>W(),3e3)},[Q?.handle,Q?.did,Q?.avatar,bA,W]),bC=(0,c.useCallback)(async a=>{let b=await fetch(`/api/records?collection=${encodeURIComponent("org.impactindexer.review.comment")}&rkey=${encodeURIComponent(a.rkey)}`,{method:"DELETE"});if(!b.ok)throw Error((await b.json()).error||"Failed to delete comment");await W()},[W]),bD=(0,c.useCallback)(async a=>{let b=al.get(a);b&&(_(b=>new Set(b).add(a)),Z(b=>{let c=new Map(b);return c.delete(a),c}),b.rkey?(await bC({rkey:b.rkey}),_(b=>{let c=new Set(b);return c.delete(a),c})):setTimeout(async()=>{await W(),_(b=>{let c=new Set(b);return c.delete(a),c})},3e3))},[al,bC,W]),bE=(0,c.useCallback)(async a=>{let b=a.likes.find(a=>a.did===Q?.did);if(b){let a=await fetch(`/api/records?collection=${encodeURIComponent("org.impactindexer.review.like")}&rkey=${encodeURIComponent(b.rkey)}`,{method:"DELETE"});if(!a.ok)throw Error((await a.json()).error||"Failed to unlike")}else{let b=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.like",record:{subject:{uri:a.uri,type:"record"},createdAt:new Date().toISOString()}})});if(!b.ok)throw Error((await b.json()).error||"Failed to like")}await W()},[Q?.did,W]),bF=(0,c.useCallback)(async(a,b)=>{let c=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{subject:{uri:`beads:${a.nodeId}`,type:"record"},text:b,replyTo:a.uri,createdAt:new Date().toISOString()}})});if(!c.ok)throw Error((await c.json()).error||"Failed to post reply");await W()},[W]),bG=(0,c.useCallback)(a=>{if(!p)return;let b=p.graphData.nodes.find(b=>b.id===a);b&&x(b)},[p]),bH=(0,c.useMemo)(()=>{let a=new Map;if(!V)return a;let b=new Map;for(let a of V)b.has(a.nodeId)||b.set(a.nodeId,new Set),b.get(a.nodeId).add(a.handle),a.displayName&&b.get(a.nodeId).add(a.displayName);for(let[c,d]of b)a.set(c,Array.from(d).join(" "));return a},[V]),bI=(0,c.useMemo)(()=>{if(!p||!a1.trim())return[];let a=a1.toLowerCase();return p.graphData.nodes.filter(b=>{let c=bH.get(b.id)||"";return`${b.id} ${b.title} ${b.prefix} ${b.owner||""} ${b.assignee||""} ${b.createdBy||""} ${c}`.toLowerCase().includes(a)}).slice(0,8)},[a1,p,bH]);(0,c.useEffect)(()=>{a4(0)},[a1]);let bJ=(0,c.useCallback)(a=>{bb.current?.focusNode(a),a0(!1),a2(""),a4(0)},[]),bK=(0,c.useCallback)(a=>{for(let[b,c]of al)if(c.handle===a)return b;for(let[b,c]of ap)if(c.handle===a)return b;if(p){let b=p.graphData.nodes.filter(b=>b.assignee===a&&"closed"!==b.status).sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt));if(b.length>0)return b[0].id}return null},[al,ap,p]);(0,c.useEffect)(()=>{let a=a=>{let b=a.target?.tagName;if("INPUT"===b||"TEXTAREA"===b||a.target?.isContentEditable)return;if((a.ctrlKey||a.metaKey)&&"f"===a.key&&(a.preventDefault(),a0(!0),setTimeout(()=>bc.current?.focus(),50)),"Escape"===a.key&&a_&&(a0(!1),a2(""),a4(0)),a.shiftKey&&"Digit0"===a.code){a.preventDefault();let b=bg.length>0?bg[0].nodeId:null;if(b&&p){let a=p.graphData.nodes.find(a=>a.id===b);a&&bb.current?.focusNode(a)}}let c=a.code.match(/^Digit([1-9])$/);if(a.shiftKey&&c){a.preventDefault();let b=bh[parseInt(c[1],10)-1];if(!b||!p)return;let d=bK(b.handle);if(d){let a=p.graphData.nodes.find(a=>a.id===d);a&&bb.current?.focusNode(a)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[a_,bg,p,bh,bK]);let bL=(0,c.useCallback)(a=>{"ArrowDown"===a.key?(a.preventDefault(),a4(a=>Math.min(a+1,bI.length-1))):"ArrowUp"===a.key?(a.preventDefault(),a4(a=>Math.max(a-1,0))):"Enter"===a.key&&bI.length>0&&(a.preventDefault(),bJ(bI[a3]))},[bI,a3,bJ]);return s?(0,b.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center bg-white dark:bg-zinc-900 text-zinc-800 dark:text-zinc-200 px-6 select-none",children:[(0,b.jsxs)("div",{className:"relative w-full max-w-sm mb-8",children:[(0,b.jsx)("svg",{viewBox:"0 0 400 40",fill:"none",className:"w-full text-zinc-200 dark:text-zinc-700","aria-hidden":"true",children:(0,b.jsx)("line",{x1:"0",y1:"20",x2:"400",y2:"20",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"4 6",opacity:"0.6"})}),(0,b.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,b.jsx)("div",{className:"bg-white dark:bg-zinc-900 px-4",children:(0,b.jsx)(eK.BeadsLogo,{className:"w-10 h-10 text-emerald-500"})})})]}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 font-light animate-fade-in",children:"Warming up the heartbeat..."}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-1.5 animate-fade-in",style:{animationDelay:"0.1s"},children:"Discovering issues and mapping dependencies"})]}):u?(0,b.jsx)("div",{className:"h-screen flex items-center justify-center bg-white",children:(0,b.jsxs)("div",{className:"max-w-sm text-center",children:[(0,b.jsx)("div",{className:"w-14 h-14 mx-auto mb-4 bg-red-50 rounded-full flex items-center justify-center",children:(0,b.jsx)("svg",{className:"w-7 h-7 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,b.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 mb-1",children:"Unable to load data"}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 mb-4",children:u}),(0,b.jsxs)("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white text-sm rounded-lg hover:bg-emerald-700 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]})]})}):p?(0,b.jsxs)("div",{className:"h-screen flex flex-col overflow-hidden bg-white dark:bg-black",children:[(0,b.jsx)("header",{className:"sticky top-0 z-50 shrink-0 bg-white/95 dark:bg-black/95 backdrop-blur-sm border-b border-zinc-200/80 dark:border-zinc-800/80",children:(0,b.jsxs)("div",{className:"px-3 sm:px-6 h-14 flex items-center",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 shrink-0 group",children:[(0,b.jsx)(eK.BeadsLogo,{className:"w-8 h-8 text-emerald-500 transition-transform group-hover:scale-105"}),(0,b.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,b.jsx)("h1",{className:"text-[15px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:I}),(0,b.jsx)("span",{className:"font-normal text-zinc-400 text-[15px] hidden sm:inline",children:"Heartbeads"}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 bg-zinc-100 dark:bg-zinc-800 rounded-full px-1.5 py-0.5 font-medium hidden sm:inline",children:["v","0.6.2"]})]})]}),(0,b.jsx)("div",{className:"flex-1 flex justify-center px-2 sm:px-4",children:(0,b.jsx)("div",{className:"relative w-full max-w-md","data-tutorial":"search",children:a_?(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center bg-white dark:bg-zinc-900 rounded-full border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden",children:[(0,b.jsx)("div",{className:"pl-3 pr-1 text-zinc-400 dark:text-zinc-500",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,b.jsx)("input",{ref:bc,type:"text",value:a1,onChange:a=>a2(a.target.value),onKeyDown:bL,placeholder:"Search issues...",className:"flex-1 px-2 py-1.5 text-xs text-zinc-800 dark:text-zinc-200 bg-transparent outline-none placeholder:text-zinc-400 dark:placeholder:text-zinc-500",autoFocus:!0}),(0,b.jsx)("button",{onClick:()=>{a0(!1),a2(""),a4(0)},className:"px-2 py-1.5 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a1.trim()&&(0,b.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white dark:bg-zinc-900 rounded-xl border border-zinc-100 dark:border-zinc-800 shadow-xl overflow-hidden max-h-72 overflow-y-auto z-50",children:[0===bI.length?(0,b.jsx)("div",{className:"px-3 py-3 text-xs text-zinc-400 dark:text-zinc-500 text-center",children:"No matching issues"}):bI.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>bJ(a),onMouseEnter:()=>a4(c),className:`w-full text-left px-3 py-2 text-xs transition-colors flex items-start gap-2.5 ${c===a3?"bg-emerald-50 dark:bg-emerald-950":"hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("div",{className:"shrink-0 mt-1",children:(0,b.jsx)("div",{className:`w-2 h-2 rounded-full ${fD[a.status]||"bg-zinc-400"}`})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400 shrink-0",children:a.id}),a.priority<=1&&(0,b.jsx)("span",{className:"text-[10px]",children:0===a.priority?"🔥🔥":"🔥"})]}),(0,b.jsx)("div",{className:"text-zinc-400 dark:text-zinc-500 truncate mt-0.5",children:a.title})]}),(0,b.jsx)("span",{className:"shrink-0 text-[10px] text-zinc-400 dark:text-zinc-500 bg-zinc-100 dark:bg-zinc-800 rounded px-1 py-0.5 mt-0.5",children:a.prefix})]},a.id)),bI.length>0&&(0,b.jsxs)("div",{className:"px-3 py-1.5 text-[10px] text-zinc-400 dark:text-zinc-500 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50 flex items-center justify-between",children:[(0,b.jsxs)("span",{children:[bI.length," result",1!==bI.length?"s":""]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"px-1 py-0.5 bg-white dark:bg-zinc-800 rounded border border-zinc-200 dark:border-zinc-700 text-[9px] font-mono",children:"Enter"})," ","to focus"]})]})]})]}):(0,b.jsxs)("button",{onClick:()=>{a0(!0),setTimeout(()=>bc.current?.focus(),50)},className:"w-full flex items-center gap-2 px-3.5 py-1.5 text-sm text-zinc-400 rounded-full bg-zinc-50/80 dark:bg-zinc-800/80 border border-zinc-200/60 dark:border-zinc-700/60 hover:text-zinc-500 dark:hover:text-zinc-300 hover:border-zinc-300 dark:hover:border-zinc-600 hover:bg-zinc-100/50 dark:hover:bg-zinc-700/50 transition-all",title:"Search issues (Ctrl+F)",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,b.jsx)("span",{className:"flex-1 text-left",children:"Search issues..."}),(0,b.jsxs)("kbd",{className:"hidden sm:inline-block px-1 py-0.5 bg-zinc-100 dark:bg-zinc-700 rounded border border-zinc-200 dark:border-zinc-600 text-[9px] font-mono text-zinc-400 dark:text-zinc-500",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","F"]})]})})}),(0,b.jsx)("button",{onClick:()=>aM(!0),className:"md:hidden p-2 text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-200 dark:hover:bg-zinc-800 rounded-full transition-colors shrink-0","aria-label":"Open menu",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}),(0,b.jsxs)("div",{className:"hidden md:flex items-center gap-1 shrink-0","data-tutorial":"nav-pills",children:[(0,b.jsxs)("button",{onClick:bj,"data-tutorial":"nav-replay",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${aa?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Replay"})]}),(0,b.jsxs)("button",{onClick:()=>{as(a=>!a),ar||(x(null),ay(!1),aC(!1),au(null),aG(!1),aE(null))},"data-tutorial":"nav-comments",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${ar?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Comments"})]}),(0,b.jsxs)("button",{onClick:()=>{ay(a=>!a),ax||(x(null),as(!1),aC(!1),au(null),aG(!1),aE(null))},"data-tutorial":"nav-activity",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${ax?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Activity"})]}),(0,b.jsxs)("button",{onClick:()=>{aC(a=>!a),aB||(x(null),as(!1),ay(!1),au(null),aG(!1))},"data-tutorial":"nav-learn",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${aB?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Learn"})]}),(0,b.jsx)("div",{className:"w-px h-5 bg-zinc-200 dark:bg-zinc-700 mx-2"}),(0,b.jsxs)("span",{"data-tutorial":"auth-section",className:"flex items-center",children:[(0,b.jsx)("button",{onClick:()=>aW(!0),className:"p-1.5 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"Settings",children:(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 010 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,b.jsx)("button",{onClick:S,className:"p-1.5 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"dark"===R?"Switch to light mode":"Switch to dark mode","data-tutorial":"btn-theme",children:"dark"===R?(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"})}):(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})})}),(0,b.jsx)(eJ,{onViewProfile:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null)}})]})]})]})}),aL&&(0,b.jsxs)("div",{className:"md:hidden fixed inset-0 z-[60]",children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-[2px]",onClick:()=>aM(!1)}),(0,b.jsxs)("div",{className:"absolute top-0 right-0 h-full w-72 bg-white dark:bg-zinc-900 shadow-2xl flex flex-col animate-slide-in-right",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-700 dark:text-zinc-100",children:"Menu"}),(0,b.jsx)("button",{onClick:()=>aM(!1),className:"p-1.5 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("nav",{className:"flex-1 overflow-y-auto py-2",children:[(0,b.jsxs)("button",{onClick:()=>{bj(),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${aa?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),"Replay"]}),(0,b.jsxs)("button",{onClick:()=>{as(a=>!a),ar||(x(null),ay(!1),aC(!1),aG(!1),aE(null)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${ar?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),"Comments"]}),(0,b.jsxs)("button",{onClick:()=>{ay(a=>!a),ax||(x(null),as(!1),aC(!1),aG(!1),aE(null)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${ax?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),"Activity"]}),(0,b.jsxs)("button",{onClick:()=>{aC(a=>!a),aB||(x(null),as(!1),ay(!1),aG(!1)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${aB?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),"Learn"]}),(0,b.jsx)("div",{className:"h-px bg-zinc-100 dark:bg-zinc-800 mx-4 my-2"}),(0,b.jsxs)("button",{onClick:()=>{aW(!0),aM(!1)},className:"w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:[(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 010 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),"Settings"]}),(0,b.jsx)("div",{className:"px-5 py-3.5",children:(0,b.jsx)(eJ,{onViewProfile:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null),aM(!1)}})})]})]})]}),(0,b.jsxs)("div",{className:"flex-1 flex overflow-hidden relative",children:[(0,b.jsxs)("div",{className:"flex-1 relative bg-zinc-50/50 dark:bg-black",children:[(0,b.jsx)("div",{className:"absolute inset-0 opacity-[0.03] dark:opacity-[0.06]",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,b.jsx)(L,{ref:bb,nodes:aa&&ai?ai.graphData.nodes:p.graphData.nodes,links:aa&&ai?ai.graphData.links:p.graphData.links,selectedNode:w,selectedNodeIds:y,onSelectedNodeIdsChange:z,onNodeClick:bk,onNodeHover:bl,onBackgroundClick:bx,onNodeRightClick:by,commentedNodeIds:U,claimedNodeAvatars:al,assigneeNodeAvatars:ap,onAvatarHover:aY,onAvatarClick:bm,timelineActive:aa,stats:p.stats,sidebarOpen:!!w||ar||ax||aB||!!at||aF,collapsedEpicIds:A,onCollapseAll:bp,onExpandAll:bq,focusedEpicId:C,onExitFocusedEpic:bs,colorMode:E,onColorModeChange:F,activeLegendFilters:G,onToggleLegendFilter:a=>H(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c}),onClearLegendFilters:()=>H(new Set),autoFit:a5,onAutoFitToggle:()=>a6(a=>!a),pulseNodeId:bg.length>0?bg[0].nodeId:null,showPulse:a7,onShowPulseToggle:()=>a8(a=>!a),showParticles:a9,onShowParticlesToggle:()=>ba(a=>!a),isMobile:aJ,onNodeDoubleTap:bz,theme:R}),aa&&bf&&bf.events.length>0&&(0,b.jsx)("div",{className:"absolute bottom-4 z-10 transition-[right] duration-300 ease-out",style:{right:w||ar||ax?"calc(360px + 1rem)":"1rem"},children:(0,b.jsx)(fB,{totalSteps:bf.events.length,currentStep:Math.max(ac,0),currentTime:ac>=0?bf.events[ac]?.time??bf.minTime:bf.minTime,isPlaying:ae,speed:ag,onStepChange:ad,onPlayPause:()=>af(a=>!a),onSpeedChange:ah})}),!w&&!ar&&!ax&&!aB&&!at&&!aF&&(0,b.jsxs)("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10 flex flex-col items-end gap-2","data-tutorial":"overlays",children:[(0,b.jsx)(eY,{events:bg,collapsed:az,compact:aJ,onToggleCollapse:()=>aA(a=>!a),onExpandPanel:()=>{ay(!0),x(null),as(!1),aC(!1),aG(!1)},onNodeClick:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&bJ(b)},onHandleClick:a=>{au(a),x(null),as(!1),aC(!1),aG(!1)}}),(0,b.jsx)(fg,{entries:bh,collapsed:aH,compact:aJ,onToggleCollapse:()=>aI(a=>!a),onExpandPanel:()=>{aG(!0),x(null),as(!1),ay(!1),aC(!1),au(null)},onProfileClick:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1);let b=bK(a);b&&bb.current?.zoomToNode(b)}})]}),aP&&(0,b.jsx)(eM,{node:aP.node,x:aP.x,y:aP.y,onShowDescription:()=>{aU(aP.node),aQ(null)},onAddComment:()=>{aS({node:aP.node,x:aP.x,y:aP.y}),aQ(null)},onClaimTask:P&&!al.has(aP.node.id)?()=>{bB(aP.node.id),aQ(null)}:void 0,onUnclaimTask:(()=>{if(!P)return;let a=al.get(aP.node.id);if(a&&(a.did===Q?.did||!a.did))return()=>{bD(aP.node.id),aQ(null)}})(),onCollapseEpic:"epic"!==aP.node.issueType||A.has(aP.node.id)?void 0:()=>{bn(aP.node.id),aQ(null)},onUncollapseEpic:"epic"===aP.node.issueType&&A.has(aP.node.id)?()=>{bn(aP.node.id),aQ(null)}:void 0,onFocusEpic:"epic"!==aP.node.issueType||C?void 0:()=>{br(aP.node.id),aQ(null)},onExitFocusEpic:"epic"===aP.node.issueType&&C===aP.node.id?()=>{bs(),aQ(null)}:void 0,onClose:()=>aQ(null)}),aN&&(0,b.jsx)(fj,{node:aN.node,onShowDescription:aN.node.description?()=>{aU(aN.node),aO(null)}:void 0,onAddComment:()=>{aS({node:aN.node,x:window.innerWidth/2,y:window.innerHeight/2}),aO(null)},onClaimTask:P&&!al.has(aN.node.id)?()=>{bB(aN.node.id),aO(null)}:void 0,onUnclaimTask:(()=>{if(!P)return;let a=al.get(aN.node.id);if(a&&(a.did===Q?.did||!a.did))return()=>{bD(aN.node.id),aO(null)}})(),onCollapseEpic:"epic"!==aN.node.issueType||A.has(aN.node.id)?void 0:()=>{bn(aN.node.id),aO(null)},onUncollapseEpic:"epic"===aN.node.issueType&&A.has(aN.node.id)?()=>{bn(aN.node.id),aO(null)}:void 0,onFocusEpic:"epic"!==aN.node.issueType||C?void 0:()=>{br(aN.node.id),aO(null)},onExitFocusEpic:"epic"===aN.node.issueType&&C===aN.node.id?()=>{bs(),aO(null)}:void 0,onClose:()=>aO(null)}),aR&&(0,b.jsx)(eL,{node:aR.node,x:aR.x,y:aR.y,onClose:()=>aS(null),onSubmit:async a=>{await bA(aR.node.id,a),aS(null)},isAuthenticated:P,existingComments:T.get(aR.node.id)}),aT&&(0,b.jsx)(eA,{node:aT,onClose:()=>aU(null),repoUrl:N[aT.prefix],onOpenSettings:()=>aW(!0)}),(0,b.jsx)(fi,{isOpen:aV,onClose:()=>aW(!1)}),aZ&&!aX&&!aJ&&(0,b.jsx)(eN,{node:aZ.node,x:aZ.x,y:aZ.y,prefixColor:n(aZ.node.prefix),allNodes:aa&&ai?ai.graphData.nodes:p.graphData.nodes,theme:R}),aX&&!aJ&&(0,b.jsx)("div",{style:{position:"fixed",left:aX.x+12,top:aX.y-8,zIndex:90,pointerEvents:"none"},children:(0,b.jsxs)("div",{className:"flex items-center gap-2 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-lg px-2.5 py-2",children:[aX.avatar?(0,b.jsx)("img",{src:aX.avatar,alt:"",className:"w-6 h-6 rounded-full shrink-0"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-zinc-200 dark:bg-zinc-700 flex items-center justify-center text-[10px] font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:aX.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("span",{className:"text-xs text-zinc-700 dark:text-zinc-300 whitespace-nowrap",children:[(0,b.jsx)("span",{className:"font-semibold text-zinc-800 dark:text-zinc-200",children:aX.handle})," ",aX.isAssignee?aX.nodeClosed?"closed":"is assigned to":aX.nodeClosed?"closed":"claimed"," ",(0,b.jsx)("span",{className:"font-mono text-emerald-700 dark:text-emerald-400",children:aX.nodeId})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:ek(aX.claimedAt)})]})]})})]}),(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${w?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Node Detail"}),(0,b.jsx)("button",{onClick:()=>{x(null)},className:"p-1 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 dark:hover:bg-zinc-800 transition-colors rounded-full hover:bg-zinc-100",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-4 space-y-5",children:(0,b.jsx)(eC,{node:w,allNodes:p.graphData.nodes,onNodeNavigate:bG,comments:w?T.get(w.id):void 0,onPostComment:w?a=>bA(w.id,a):void 0,onDeleteComment:bC,onLikeComment:bE,onReplyComment:bF,isAuthenticated:P,currentDid:Q?.did,repoUrls:N,onOpenSettings:()=>aW(!0),onProfileClick:a=>{au(a),x(null)}})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transform transition-transform duration-300 ease-out ${w?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl border-t border-zinc-200 dark:border-zinc-700 shadow-lg max-h-[60vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 flex items-center justify-between px-4 pt-3 pb-2",children:[(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full mx-auto"}),(0,b.jsx)("button",{onClick:()=>x(null),className:"absolute right-3 top-3 p-1 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-4 pb-6 space-y-4",children:(0,b.jsx)(eC,{node:w,allNodes:p.graphData.nodes,onNodeNavigate:bG,comments:w?T.get(w.id):void 0,onPostComment:w?a=>bA(w.id,a):void 0,onDeleteComment:bC,onLikeComment:bE,onReplyComment:bF,isAuthenticated:P,currentDid:Q?.did,repoUrls:N,onOpenSettings:()=>aW(!0),onProfileClick:a=>{au(a),x(null)}})})]})}),(0,b.jsx)(eO,{isOpen:ar,onClose:()=>as(!1),allComments:V.filter(a=>ak.has(a.nodeId)),onNodeNavigate:a=>{bG(a),as(!1)},isAuthenticated:P,currentDid:Q?.did,onLikeComment:bE,onDeleteComment:bC,onReplyComment:bF,onPostComment:bA,prefixes:p?.stats?.prefixes||[]}),(0,b.jsx)(e0,{events:bg,isOpen:ax,onClose:()=>ay(!1),onNodeClick:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&(bJ(b),ay(!1))},onHandleClick:a=>{au(a),ay(!1),x(null),as(!1),aC(!1),aG(!1)}}),(0,b.jsx)(fh,{entries:bh,isOpen:aF,onClose:()=>aG(!1),onProfileClick:a=>{au(a),aG(!1),x(null),as(!1),ay(!1),aC(!1);let b=bK(a);b&&bb.current?.zoomToNode(b)}}),(0,b.jsx)(fb,{isOpen:aB,onClose:()=>{aC(!1),aE(null)},tutorialStep:aD,onStartTutorial:bt,onNextStep:bu,onPrevStep:bv,onEndTutorial:bw}),(0,b.jsx)(fm,{isOpen:!!at,onClose:()=>au(null),profile:bi,onNodeNavigate:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&(au(null),bk(b),bb.current?.focusNode(b))}})]}),(0,b.jsx)(e2,{step:aD,onNext:bu,onPrev:bv,onEnd:bw})]}):null}a.s(["default",()=>fE],60350)}];
24
+ `;async function fu(a){let b,c=[],d=!0,e=0;for(;d&&e<5;){let f=await fetch(fs,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:ft,variables:{collection:a,first:100,after:b}})});if(!f.ok)throw Error(`Indexer fetch failed: ${f.status}`);let g=await f.json();if(g.errors?.length)throw Error(g.errors[0].message);let h=g.data?.records;if(!h)break;for(let a of h.edges)c.push(a.node);d=h.pageInfo.hasNextPage,b=h.pageInfo.endCursor,e++}return c}async function fv(){let[a,b]=await Promise.all([fu("org.impactindexer.review.comment"),fu("org.impactindexer.review.like")]),c=a.filter(a=>{let b=a.value.subject;return b?.uri&&"string"==typeof b.uri&&b.uri.startsWith("beads:")}),d=new Map;for(let a of b){let b=a.value.subject;if(b?.uri&&"string"==typeof b.uri&&b.uri.startsWith("at://")){let c=d.get(b.uri)||[];c.push(a),d.set(b.uri,c)}}let e=new Set;for(let a of c)e.add(a.did);for(let a of b)e.add(a.did);let f=new Map((await Promise.all([...e].map(a=>fr(a)))).map(a=>[a.did,a])),g=[];for(let a of c){let b=a.value,c=b.subject.uri.replace(/^beads:/,""),e=b.text||"",h=b.createdAt||"",i=b.replyTo||void 0,j=f.get(a.did),k=(d.get(a.uri)||[]).map(a=>{let b=f.get(a.did),c=a.value;return{did:a.did,handle:b?.handle||a.did.slice(0,20)+"...",displayName:b?.displayName,avatar:b?.avatar,createdAt:c.createdAt||"",uri:a.uri,rkey:a.rkey}}),l={did:a.did,handle:j?.handle||a.did.slice(0,20)+"...",displayName:j?.displayName,avatar:j?.avatar,text:e,createdAt:h,uri:a.uri,rkey:a.rkey,nodeId:c,replyTo:i,likes:k,replies:[]};g.push(l)}let h=new Map;for(let a of g)h.set(a.uri,a);let i=[];for(let a of g){if(a.replyTo){let b=h.get(a.replyTo);if(b){b.replies.push(a);continue}}i.push(a)}i.sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime()),!function a(b){for(let c of b)c.replies.sort((a,b)=>new Date(a.createdAt).getTime()-new Date(b.createdAt).getTime()),a(c.replies)}(i);let j=new Map;for(let a of i){let b=j.get(a.nodeId)||[];b.push(a),j.set(a.nodeId,b)}let k=new Map;for(let a of g)k.set(a.nodeId,(k.get(a.nodeId)||0)+1);return{commentsByNode:j,commentedNodeIds:k,allComments:[...g].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime())}}let fw="node",fx="profile",fy="panel";function fz(){return{node:null,profile:null,panel:null,epic:null,color:"status",collapsed:new Set,filters:new Set,selected:new Set,replay:!1}}function fA(a){let b=new URLSearchParams(window.location.search),c=(a,c)=>{c?b.set(a,c):b.delete(a)};"node"in a&&c(fw,a.node),"profile"in a&&c(fx,a.profile),"panel"in a&&c(fy,a.panel),"epic"in a&&c("epic",a.epic),"color"in a&&c("color","status"===a.color?null:a.color),"collapsed"in a&&c("collapsed",a.collapsed&&a.collapsed.size>0?[...a.collapsed].join(","):null),"filters"in a&&c("filters",a.filters&&a.filters.size>0?[...a.filters].join(","):null),"selected"in a&&c("selected",a.selected&&a.selected.size>0?[...a.selected].join(","):null),"replay"in a&&c("replay",a.replay?"1":null),"node"in a&&a.node&&(b.delete(fx),b.delete(fy)),"profile"in a&&a.profile&&(b.delete(fw),b.delete(fy)),"panel"in a&&a.panel&&(b.delete(fw),b.delete(fx));let d=b.toString(),e=d?`?${d}`:window.location.pathname;window.history.replaceState(null,"",e)}function fB({totalSteps:a,currentStep:d,currentTime:e,isPlaying:f,speed:g,onStepChange:h,onPlayPause:i,onSpeedChange:j}){let k=(0,c.useCallback)(a=>{h(Number(a.target.value))},[h]),l=(0,c.useCallback)(()=>{j(1===g?2:2===g?4:1)},[g,j]),m=a>1;return(0,b.jsx)("div",{className:"bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg border border-zinc-200 dark:border-zinc-700 shadow-sm px-3 py-2 min-w-[280px] max-w-[480px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:i,disabled:!m,className:`shrink-0 w-6 h-6 flex items-center justify-center rounded transition-colors ${f?"text-emerald-500 hover:text-emerald-600":"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:f?(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:[(0,b.jsx)("rect",{x:"3",y:"2",width:"3.5",height:"12",rx:"1"}),(0,b.jsx)("rect",{x:"9.5",y:"2",width:"3.5",height:"12",rx:"1"})]}):(0,b.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,b.jsx)("path",{d:"M4 2l10 6-10 6V2z"})})}),(0,b.jsx)("input",{type:"range",min:0,max:Math.max(a-1,0),value:d,onChange:k,disabled:!m,className:"timeline-slider flex-1 h-4 disabled:opacity-40"}),(0,b.jsxs)("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400 font-medium text-right whitespace-nowrap",children:[(0,b.jsxs)("span",{className:"text-zinc-400 dark:text-zinc-500",children:[d+1,"/",a]})," ",new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),(0,b.jsxs)("button",{onClick:l,className:`shrink-0 px-1.5 py-0.5 text-[10px] font-semibold rounded transition-colors ${g>1?"bg-emerald-500 text-white":"text-zinc-500 dark:text-zinc-400 border border-zinc-200 dark:border-zinc-700 hover:text-zinc-700 dark:hover:text-zinc-200"}`,children:[g,"x"]})]})})}function fC(a,b,c){let d=Date.now(),e=new Map(a.graphData.nodes.map(a=>[a.id,a])),f=new Set(a.graphData.links.map(q)),g=b.graphData.nodes.map(a=>{let f=e.get(a.id);if(!f){let c=function(a,b,c){for(let d of b){let b="object"==typeof d.source?d.source.id:d.source,e="object"==typeof d.target?d.target.id:d.target;if(b===a&&c.has(e)){let a=c.get(e);if(null!=a.x&&null!=a.y)return{x:a.x,y:a.y}}if(e===a&&c.has(b)){let a=c.get(b);if(null!=a.x&&null!=a.y)return{x:a.x,y:a.y}}}return null}(a.id,b.graphData.links,e);return{...a,_spawnTime:d,x:c?c.x+(Math.random()-.5)*40:void 0,y:c?c.y+(Math.random()-.5)*40:void 0}}let g={...a,x:f.x,y:f.y,fx:f.fx,fy:f.fy};if(c.changedNodes.has(a.id)){let b=c.changedNodes.get(a.id).find(a=>"status"===a.field);b&&(g._changedAt=d,g._prevStatus=b.from)}return g});for(let a of c.removedNodeIds){let b=e.get(a);b&&g.push({...b,_removeTime:d})}let h=b.graphData.links.map(a=>{let b=q(a);return f.has(b)?a:{...a,_spawnTime:d}});for(let b of c.removedLinkKeys){let c=a.graphData.links.find(a=>q(a)===b);c&&h.push({source:"object"==typeof c.source?c.source.id:c.source,target:"object"==typeof c.target?c.target.id:c.target,type:c.type,_removeTime:d})}return{...b,graphData:{nodes:g,links:h}}}let fD={open:"bg-emerald-500",in_progress:"bg-amber-500",blocked:"bg-red-500",deferred:"bg-violet-500",closed:"bg-zinc-400"};function fE(){let a,d,e,f,g,h,i,j,k,l,o,[p,q]=(0,c.useState)(null),[s,t]=(0,c.useState)(!0),[u,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(new Set),[A,B]=(0,c.useState)(new Set),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)("status"),[G,H]=(0,c.useState)(new Set),[I,J]=(0,c.useState)("Beads"),[K,M]=(0,c.useState)(0),[N,O]=(0,c.useState)({}),{isAuthenticated:P,session:Q}=(0,eI.useAuth)(),{theme:R,toggleTheme:S}=function(){let[a,b]=(0,c.useState)("light"),[d,e]=(0,c.useState)(!1);(0,c.useEffect)(()=>{e(!0);let a=localStorage.getItem("heartbeads-theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");b(a),document.documentElement.classList.toggle("dark","dark"===a)},[]);let f=(0,c.useCallback)(a=>{b(a),localStorage.setItem("heartbeads-theme",a),document.documentElement.classList.toggle("dark","dark"===a)},[]),g=(0,c.useCallback)(()=>{f("dark"===a?"light":"dark")},[a,f]);return{theme:a,setTheme:f,toggleTheme:g,mounted:d}}(),{commentsByNode:T,commentedNodeIds:U,allComments:V,refetch:W}=function(){let[a,b]=(0,c.useState)(new Map),[d,e]=(0,c.useState)(new Map),[f,g]=(0,c.useState)([]),[h,i]=(0,c.useState)(!0),[j,k]=(0,c.useState)(null),l=(0,c.useRef)(!1),m=(0,c.useCallback)(async()=>{try{i(!0),k(null);let a=await fv();l.current||(b(a.commentsByNode),e(a.commentedNodeIds),g(a.allComments))}catch(a){if(!l.current){let b=a instanceof Error?a.message:"Failed to fetch comments";console.error("Failed to fetch beads comments:",a),k(b)}}finally{l.current||i(!1)}},[]);return(0,c.useEffect)(()=>(l.current=!1,m(),()=>{l.current=!0}),[m]),{commentsByNode:a,commentedNodeIds:d,allComments:f,isLoading:h,error:j,refetch:m}}(),X=(a=(0,c.useRef)(fz()),d=(0,c.useCallback)(a=>{fA({node:a,profile:null,panel:null})},[]),e=(0,c.useCallback)(a=>{fA({profile:a,node:null,panel:null})},[]),f=(0,c.useCallback)(a=>{fA({panel:a,node:null,profile:null})},[]),g=(0,c.useCallback)(a=>{fA({epic:a})},[]),h=(0,c.useCallback)(a=>{fA({color:a})},[]),i=(0,c.useCallback)(a=>{fA({collapsed:a})},[]),j=(0,c.useCallback)(a=>{fA({filters:a})},[]),k=(0,c.useCallback)(a=>{fA({selected:a})},[]),l=(0,c.useCallback)(a=>{fA({replay:a})},[]),o=(0,c.useCallback)(()=>{window.history.replaceState(null,"",window.location.pathname)},[]),{...(0,c.useMemo)(()=>fz(),[]),initial:a.current,setNode:d,setProfile:e,setPanel:f,setEpic:g,setColor:h,setCollapsed:i,setFilters:j,setSelected:k,setReplay:l,clear:o}),[Y,Z]=(0,c.useState)(new Map),[$,_]=(0,c.useState)(new Set),[aa,ab]=(0,c.useState)(!1),[ac,ad]=(0,c.useState)(0),[ae,af]=(0,c.useState)(!1),[ag,ah]=(0,c.useState)(1),[ai,aj]=(0,c.useState)(null);(0,c.useEffect)(()=>{H(new Set)},[E]);let ak=(0,c.useMemo)(()=>p?new Set(p.graphData.nodes.map(a=>a.id)):new Set,[p]),al=(0,c.useMemo)(()=>{let a=new Map;if(V)for(let b of V){if(!ak.has(b.nodeId)||a.has(b.nodeId)||$.has(b.nodeId))continue;let c=b.text.trim();c.startsWith("@")&&-1===c.indexOf(" ")&&a.set(b.nodeId,{avatar:b.avatar,handle:b.handle,claimedAt:b.createdAt,did:b.did,rkey:b.rkey})}for(let[b,c]of Y)a.has(b)||$.has(b)||a.set(b,c);return a},[V,Y,$,ak]),am=(0,c.useMemo)(()=>{let a=new Map;if(!p||aa&&!ai)return a;let b=new Map;for(let a of aa&&ai?ai.graphData.nodes:p.graphData.nodes)a.assignee&&a.assignee.includes(".")&&(al.has(a.id)||(b.has(a.assignee)||b.set(a.assignee,[]),b.get(a.assignee).push(a)));for(let[c,d]of b){d.sort((a,b)=>{let c=b.updatedAt.localeCompare(a.updatedAt);return 0!==c?c:"closed"!==a.status&&"closed"===b.status?-1:"closed"===a.status&&"closed"!==b.status?1:a.id.localeCompare(b.id)});let b=d[0];a.set(b.id,{handle:c,avatar:void 0,updatedAt:b.updatedAt})}return a},[p,al,aa,ai]),[an,ao]=(0,c.useState)(new Map);(0,c.useEffect)(()=>{if(0===am.size)return;let a=new AbortController,b=[];for(let[,a]of am)an.has(a.handle)||b.push(a.handle);if(0===b.length)return;let c=[];for(let a=0;a<b.length;a+=5)c.push(b.slice(a,a+5));async function d(b){let c=b.map(async b=>{try{let c=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(b)}`,{signal:a.signal});if(!c.ok)return null;let d=await c.json();return{handle:b,avatar:d.avatar}}catch(a){return null}}),d=await Promise.allSettled(c),e=new Map;for(let a of d)"fulfilled"===a.status&&a.value&&a.value.avatar&&e.set(a.value.handle,a.value.avatar);return e}return(async()=>{for(let a of c){let b=await d(a);b.size>0&&ao(a=>new Map([...a,...b]))}})(),()=>a.abort()},[am]);let ap=(0,c.useMemo)(()=>{let a=new Map(am);for(let[b,c]of a){let d=an.get(c.handle);d&&a.set(b,{...c,avatar:d})}return a},[am,an]),aq=(0,c.useMemo)(()=>{if(!p)return[];let a=p.graphData.nodes,b=new Map,c=a=>{if(!a)return null;let c=b.get(a);return c||(c={handle:a,createdCount:0,closedCount:0,commentCount:0},b.set(a,c)),c};for(let b of a){let a=b.createdBy||b.owner||b.assignee;if(a){let b=c(a);b&&b.createdCount++}if("closed"===b.status&&b.assignee){let a=c(b.assignee);a&&a.closedCount++}}if(V){for(let a of V)if(ak.has(a.nodeId)&&!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))){let b=c(a.handle);b&&(b.commentCount++,a.avatar&&!b.avatar&&(b.avatar=a.avatar),a.did&&!b.did&&(b.did=a.did))}}for(let[,a]of ap){let c=b.get(a.handle);c&&a.avatar&&!c.avatar&&(c.avatar=a.avatar)}for(let[a,c]of an){let d=b.get(a);d&&!d.avatar&&(d.avatar=c)}let d=[];for(let a of b.values()){let b=3*a.closedCount+a.createdCount+a.commentCount;b>0&&d.push({...a,score:b})}return d.sort((a,b)=>b.score-a.score),d},[p,V,ap,an,ak]),[ar,as]=(0,c.useState)(!1),[at,au]=(0,c.useState)(null),[av,aw]=(0,c.useState)([]),[ax,ay]=(0,c.useState)(!1),[az,aA]=(0,c.useState)(!0),[aB,aC]=(0,c.useState)(!1),[aD,aE]=(0,c.useState)(null),[aF,aG]=(0,c.useState)(!1),[aH,aI]=(0,c.useState)(!0),aJ=ey(),aK=(0,c.useRef)(!1);(0,c.useEffect)(()=>{aK.current=aJ},[aJ]);let[aL,aM]=(0,c.useState)(!1),[aN,aO]=(0,c.useState)(null);(0,c.useEffect)(()=>{aI(aJ),aA(aJ)},[aJ]),(0,c.useEffect)(()=>{if(!p)return;let a=V?V.filter(a=>ak.has(a.nodeId)):null,b=function(a,b,c){let d=[],e=new Set;function f(a){e.has(a.id)||(e.add(a.id),d.push(a))}for(let b of a){if(b.createdAt){let a=new Date(b.createdAt).getTime();isNaN(a)||f({id:`node-created:${b.id}:${a}`,type:"node-created",time:a,nodeId:b.id,nodeTitle:b.title,actor:b.createdBy?{handle:b.createdBy}:b.owner?{handle:b.owner}:b.assignee?{handle:b.assignee}:void 0,detail:b.issueType,meta:{issueType:b.issueType,prefix:b.prefix}})}if(b.closedAt){let a=new Date(b.closedAt).getTime();isNaN(a)||f({id:`node-closed:${b.id}:${a}`,type:"node-closed",time:a,nodeId:b.id,nodeTitle:b.title,actor:b.owner?{handle:b.owner}:b.createdBy?{handle:b.createdBy}:b.assignee?{handle:b.assignee}:void 0,detail:b.closeReason||"Closed",meta:{prefix:b.prefix}})}}for(let c of b)if(c.createdAt){let b=new Date(c.createdAt).getTime();if(!isNaN(b)){let d="object"==typeof c.source?c.source.id:c.source,e="object"==typeof c.target?c.target.id:c.target,g=a.find(a=>a.id===d);f({id:`link-added:${d}->${e}:${b}`,type:"link-added",time:b,nodeId:d,actor:g?.assignee?{handle:g.assignee}:void 0,detail:`${c.type} ${e}`,meta:{linkType:c.type,target:e}})}}if(c)for(let a of c){let b=new Date(a.createdAt).getTime();if(isNaN(b))continue;let c={handle:a.handle,avatar:a.avatar,did:a.did};for(let d of(f(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")?{id:`task-claimed:${a.nodeId}:${b}`,type:"task-claimed",time:b,nodeId:a.nodeId,actor:c,detail:a.text}:a.replyTo?{id:`reply-added:${a.nodeId}:${a.rkey}`,type:"reply-added",time:b,nodeId:a.nodeId,actor:c,detail:a.text.length>80?a.text.slice(0,80)+"...":a.text}:{id:`comment-added:${a.nodeId}:${a.rkey}`,type:"comment-added",time:b,nodeId:a.nodeId,actor:c,detail:a.text.length>80?a.text.slice(0,80)+"...":a.text}),a.likes)){let b=new Date(d.createdAt).getTime();isNaN(b)||f({id:`like-added:${a.nodeId}:${d.rkey}`,type:"like-added",time:b,nodeId:a.nodeId,actor:{handle:d.handle,avatar:d.avatar,did:d.did},detail:`Liked comment by ${a.handle}`})}}return d.sort((a,b)=>b.time-a.time),d}(p.graphData.nodes,p.graphData.links,a);aw(a=>eZ(a,b))},[p,V,ak]),(0,c.useEffect)(()=>{if(0===av.length)return;let a=new Map;if(V)for(let b of V)for(let c of(b.avatar&&b.handle&&a.set(b.handle,b.avatar),b.likes))c.avatar&&c.handle&&a.set(c.handle,c.avatar);let b=!1,c=new Map;for(let[d,e]of a)an.has(d)||(c.set(d,e),b=!0);let d=new Set;for(let a of av)if(a.actor&&!a.actor.avatar&&a.actor.handle){let b=a.actor.handle;if(an.has(b)||c.has(b))continue;b.includes(".")&&!b.includes("@")&&d.add(b)}if(b&&0===d.size)return void ao(a=>new Map([...a,...c]));if(0===d.size){let a=!1,b=new Map([...an,...c]),d=av.map(c=>{if(c.actor&&!c.actor.avatar&&c.actor.handle){let d=b.get(c.actor.handle);if(d)return a=!0,{...c,actor:{...c.actor,avatar:d}}}return c});a&&aw(d);return}let e=new AbortController,f=[...d];return(async()=>{let a=new Map(c);for(let b=0;b<f.length;b+=5){let c=f.slice(b,b+5).map(async a=>{try{let b=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(a)}`,{signal:e.signal});if(!b.ok)return null;let c=await b.json();return c.avatar?{handle:a,avatar:c.avatar}:null}catch{return null}});for(let b of(await Promise.allSettled(c)))"fulfilled"===b.status&&b.value&&a.set(b.value.handle,b.value.avatar)}a.size>0&&ao(b=>new Map([...b,...a]))})(),()=>e.abort()},[av,an,V]);let[aP,aQ]=(0,c.useState)(null),[aR,aS]=(0,c.useState)(null),[aT,aU]=(0,c.useState)(null),aV=(0,c.useMemo)(()=>{if(!aT||!p)return[];let a=aT.id,b=p.graphData.nodes,c=p.graphData.links,d=a=>"string"==typeof a?a:a?.id,e=new Map,f=new Map;for(let a of c){if(a._removeTime)continue;let b=d(a.source),c=d(a.target);b&&c&&(e.has(b)||e.set(b,new Set),e.has(c)||e.set(c,new Set),e.get(b).add(c),e.get(c).add(b),f.has(c)||f.set(c,new Set),f.get(c).add(b))}let g=new Set,h=[a];for(g.add(a);h.length>0;){let a=h.shift();for(let b of e.get(a)||[])g.has(b)||(g.add(b),h.push(b))}if(g.size<=1)return[];let i=(a,b)=>{let c=a.split("."),d=b.split(".");if(c[0]!==d[0])return a.localeCompare(b);for(let a=1;a<Math.max(c.length,d.length);a++){let b=a<c.length?parseInt(c[a],10):-1,e=a<d.length?parseInt(d[a],10):-1;if(b!==e)return b-e}return 0},j=new Map;for(let a of g)j.set(a,0);for(let a of g)for(let b of f.get(a)||[])g.has(b)&&j.set(a,(j.get(a)||0)+1);let k=new Map;for(let a of g)for(let b of f.get(a)||[])g.has(b)&&(k.has(b)||k.set(b,new Set),k.get(b).add(a));let l=[],m=Array.from(g).filter(a=>0===(j.get(a)||0)).sort(i);for(;m.length>0;){let a=m.shift();for(let b of(l.push(a),k.get(a)||[])){let a=(j.get(b)||1)-1;if(j.set(b,a),0===a){let a=m.findIndex(a=>i(a,b)>0);-1===a?m.push(b):m.splice(a,0,b)}}}if(l.length<g.size){let a=new Set(l),b=Array.from(g).filter(b=>!a.has(b)).sort(i);l.push(...b)}let n=new Map(b.map(a=>[a.id,a]));return l.map(a=>n.get(a)).filter(a=>null!=a&&!!a.description)},[aT,p]),aW=(0,c.useCallback)(a=>{let b;if(!aT||aV.length<=1)return;let c=aV.findIndex(a=>a.id===aT.id);-1!==c&&(b="next"===a?(c+1)%aV.length:(c-1+aV.length)%aV.length,aU(aV[b]))},[aT,aV]),aX=(0,c.useMemo)(()=>{if(!aT||aV.length<=1)return;let a=aV.findIndex(a=>a.id===aT.id);if(-1!==a)return`${a+1}/${aV.length}`},[aT,aV]),[aY,aZ]=(0,c.useState)(!1),[a$,a_]=(0,c.useState)(null),[a0,a1]=(0,c.useState)(null),[a2,a3]=(0,c.useState)(!1),[a4,a5]=(0,c.useState)(""),[a6,a7]=(0,c.useState)(0),[a8,a9]=(0,c.useState)(!0),[ba,bb]=(0,c.useState)(!0),[bc,bd]=(0,c.useState)(!0),be=(0,c.useRef)(null),bf=(0,c.useRef)(null),bg=(0,c.useRef)(null),bh=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=null,b=null,c=null,d=!0;return!function e(){(a=new EventSource("/api/beads/stream")).onmessage=a=>{if(d)try{let b=JSON.parse(a.data);if(b.error){v(b.error),t(!1);return}let c=bg.current,d=r(c,b);if(!c){bg.current=b,q(b),t(!1);return}if(!d.hasChanges)return;let e=function(a,b){let c=[],d=Date.now(),e=new Map(b.map(a=>[a.id,a]));for(let b of a.addedNodeIds){let a=e.get(b);c.push({id:`node-created:${b}:${d}`,type:"node-created",time:d,nodeId:b,nodeTitle:a?.title,actor:a?.assignee?{handle:a.assignee}:void 0,detail:a?.issueType||"task",meta:a?{issueType:a.issueType,prefix:a.prefix}:void 0})}for(let b of a.removedNodeIds){let a=e.get(b);c.push({id:`node-closed:${b}:${d}`,type:"node-closed",time:d,nodeId:b,actor:a?.assignee?{handle:a.assignee}:void 0,detail:"Removed"})}for(let[b,f]of a.changedNodes){let a=e.get(b);for(let e of f){let f;switch(e.field){case"status":default:f="node-status-changed";break;case"priority":f="node-priority-changed";break;case"title":f="node-title-changed";break;case"owner":f="node-owner-changed";break;case"assignee":f="node-assignee-changed"}c.push({id:`${f}:${b}:${d}:${e.field}`,type:f,time:d,nodeId:b,nodeTitle:a?.title,actor:a?.assignee?{handle:a.assignee}:void 0,detail:`${e.from} \u2192 ${e.to}`,meta:{field:e.field,from:e.from,to:e.to}})}}for(let b of a.addedLinkKeys){let a=b.match(/^(.+)->(.+):(.+)$/);if(a){let[,f,g,h]=a,i=e.get(f);c.push({id:`link-added:${b}:${d}`,type:"link-added",time:d,nodeId:f,actor:i?.assignee?{handle:i.assignee}:void 0,detail:`${h} ${g}`,meta:{linkType:h,target:g}})}}for(let b of a.removedLinkKeys){let a=b.match(/^(.+)->(.+):(.+)$/);if(a){let[,e,f,g]=a;c.push({id:`link-removed:${b}:${d}`,type:"link-removed",time:d,nodeId:e,detail:`${g} ${f}`,meta:{linkType:g,target:f}})}}return c}(d,b.graphData.nodes);e.length>0&&aw(a=>eZ(a,e));let f=fC(c,b,d);bg.current=f,q(f)}catch(a){console.error("Failed to parse SSE message:",a)}},a.onerror=()=>{a?.readyState===EventSource.CLOSED&&(b=setTimeout(e,5e3))},c=setTimeout(()=>{d&&(bg.current||fetch("/api/beads").then(a=>a.json()).then(a=>{d&&!bg.current&&(bg.current=a,q(a),t(!1))}).catch(()=>{}))},5e3)}(),()=>{d=!1,a?.close(),b&&clearTimeout(b),c&&clearTimeout(c)}},[]),(0,c.useEffect)(()=>{fetch("/api/config").then(a=>a.json()).then(a=>{a.name&&J(a.name),a.repoCount&&M(a.repoCount),a.repoUrls&&O(a.repoUrls)}).catch(()=>{})},[]),(0,c.useEffect)(()=>{if(!p||bh.current)return;bh.current=!0;let a=X.initial;if(a.node){let b=p.graphData.nodes.find(b=>b.id===a.node);b&&x(b)}a.profile&&au(a.profile),"comments"===a.panel&&as(!0),"activity"===a.panel&&ay(!0),"help"===a.panel&&aC(!0),"leaderboard"===a.panel&&aG(!0),a.epic&&D(a.epic),a.color&&"status"!==a.color&&F(a.color),a.collapsed.size>0&&B(a.collapsed),a.filters.size>0&&H(a.filters),a.selected.size>0&&z(a.selected),a.replay&&ab(!0)},[p]),(0,c.useEffect)(()=>{if(!p)return;let a=setTimeout(()=>{let a=Date.now(),b=p.graphData.nodes.filter(b=>!b._removeTime||a-b._removeTime<600),c=p.graphData.links.filter(b=>!b._removeTime||a-b._removeTime<600);(b.length!==p.graphData.nodes.length||c.length!==p.graphData.links.length)&&q(a=>a?{...a,graphData:{nodes:b,links:c}}:a)},700);return()=>clearTimeout(a)},[p]),(0,c.useEffect)(()=>{bh.current&&(w?X.setNode(w.id):at?X.setProfile(at):ar?X.setPanel("comments"):ax?X.setPanel("activity"):aB?X.setPanel("help"):aF?X.setPanel("leaderboard"):X.setNode(null))},[w,at,ar,ax,aB,aF]),(0,c.useEffect)(()=>{bh.current&&X.setEpic(C)},[C]),(0,c.useEffect)(()=>{bh.current&&X.setColor(E)},[E]),(0,c.useEffect)(()=>{bh.current&&X.setCollapsed(A)},[A]),(0,c.useEffect)(()=>{bh.current&&X.setFilters(G)},[G]),(0,c.useEffect)(()=>{bh.current&&X.setSelected(y)},[y]),(0,c.useEffect)(()=>{bh.current&&X.setReplay(aa)},[aa]);let bi=(0,c.useMemo)(()=>p?function(a,b){let c=[];for(let b of a){let a=new Date(b.createdAt).getTime();if(isNaN(a)||c.push({time:a,type:"node-created",id:b.id}),b.closedAt){let a=new Date(b.closedAt).getTime();isNaN(a)||c.push({time:a,type:"node-closed",id:b.id})}}c.sort((a,b)=>a.time-b.time);let d=c.length>0?c[0].time:Date.now(),e=c.length>0?c[c.length-1].time:Date.now();return{events:c,minTime:d,maxTime:e}}(p.graphData.nodes,p.graphData.links):null,[p]),bj=(0,c.useMemo)(()=>{if(!aa||!bi)return av;if(-1===ac)return[];if(0===bi.events.length)return av;let a=bi.events[ac];if(!a)return av;let b=a.time;return av.filter(a=>a.time<=b)},[av,aa,bi,ac]),bk=(0,c.useMemo)(()=>{if(!aa||!bi||!ai)return aq;if(-1===ac)return[];if(0===bi.events.length)return aq;let a=bi.events[ac];if(!a)return aq;let b=a.time,c=ai.graphData.nodes,d=new Map,e=a=>{if(!a)return null;let b=d.get(a);return b||(b={handle:a,createdCount:0,closedCount:0,commentCount:0},d.set(a,b)),b};for(let a of c){let b=a.createdBy||a.owner||a.assignee;if(b){let a=e(b);a&&a.createdCount++}if("closed"===a.status&&a.assignee){let b=e(a.assignee);b&&b.closedCount++}}if(V){for(let a of V)if(!(!ak.has(a.nodeId)||new Date(a.createdAt).getTime()>b)&&!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))){let b=e(a.handle);b&&(b.commentCount++,a.avatar&&!b.avatar&&(b.avatar=a.avatar),a.did&&!b.did&&(b.did=a.did))}}for(let[,a]of ap){let b=d.get(a.handle);b&&a.avatar&&!b.avatar&&(b.avatar=a.avatar)}for(let[a,b]of an){let c=d.get(a);c&&!c.avatar&&(c.avatar=b)}let f=[];for(let a of d.values()){let b=3*a.closedCount+a.createdCount+a.commentCount;b>0&&f.push({...a,score:b})}return f.sort((a,b)=>b.score-a.score),f},[aq,aa,bi,ac,ai,V,ap,an,ak]),bl=(0,c.useMemo)(()=>{let a,b;if(!at||!p)return null;let c=aa&&ai?ai.graphData.nodes:p.graphData.nodes,d=aa&&bi&&ac>=0?bi.events[ac]?.time:void 0,e=V?V.filter(a=>ak.has(a.nodeId)):[],f=d?e.filter(a=>new Date(a.createdAt).getTime()<=d):e;if(al){for(let[,c]of al)if(c.handle===at){a=a||c.avatar,b=b||c.did;break}}if(ap){for(let[,b]of ap)if(b.handle===at){a=a||b.avatar;break}}for(let c of f)if(c.handle===at){a=a||c.avatar,b=b||c.did;break}let g=c.filter(a=>a.assignee===at),h=g.length,i=c.filter(a=>"closed"===a.status&&(a.assignee===at||a.createdBy===at)).length,j=0;if(al)for(let[,a]of al)a.handle===at&&j++;let k=f.filter(a=>a.handle===at),l=k.filter(a=>!(a.text.startsWith("@")&&-1===a.text.trim().indexOf(" "))).length,o=0;for(let a of f)for(let b of a.likes)b.handle===at&&o++;let q=new Map;for(let a of c)(a.assignee===at||a.createdBy===at)&&q.set(a.prefix,(q.get(a.prefix)||0)+1);let r=Array.from(q.entries()).sort((a,b)=>b[1]-a[1]).map(([a,b])=>({prefix:a,prefixLabel:m(a),color:n(a),count:b})),s=[];for(let a of g)s.push({type:"assigned",nodeId:a.id,nodeTitle:a.title,time:a.updatedAt});for(let a of c)"closed"===a.status&&a.closedAt&&(a.assignee===at||a.createdBy===at)&&s.push({type:"closed",nodeId:a.id,nodeTitle:a.title,time:a.closedAt});for(let a of k)a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")||s.push({type:"commented",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:a.createdAt,detail:a.text.slice(0,60)+(a.text.length>60?"...":"")});for(let a of f)a.handle===at&&a.text.startsWith("@")&&-1===a.text.trim().indexOf(" ")&&s.push({type:"claimed",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:a.createdAt});for(let a of f)for(let b of a.likes)b.handle===at&&s.push({type:"liked",nodeId:a.nodeId,nodeTitle:c.find(b=>b.id===a.nodeId)?.title||a.nodeId,time:b.createdAt});s.sort((a,b)=>new Date(b.time).getTime()-new Date(a.time).getTime());let t=s.slice(0,20),u=t.length>0?t[0].time:void 0;return{handle:at,avatar:a,did:b,assignedCount:h,closedCount:i,claimedCount:j,commentCount:l,likeCount:o,projects:r,recentActivity:t,lastActiveAt:u}},[at,p,al,ap,V,aa,ai,bi,ac,ak]),bm=(0,c.useCallback)(()=>{ab(a=>{let b=!a;return b&&ad(-1),af(!1),aj(null),b})},[]);(0,c.useEffect)(()=>{if(!ae||!aa||!bi)return;let a=setInterval(()=>{ad(a=>{let b=a+1;return b>=bi.events.length?(af(!1),a):b})},2e3/ag);return()=>clearInterval(a)},[ae,aa,ag,bi]),(0,c.useEffect)(()=>{if(!aa||!p||!bi)return;if(-1===ac)return void aj(a=>{let b={...p,graphData:{nodes:[],links:[]}};if(!a)return b;let c=r(a,b);return c.hasChanges?fC(a,b,c):a});if(0===bi.events.length)return;let a=bi.events[ac];if(!a)return;let b=function(a,b,c){let d=new Set,e=[];for(let b of a){let a=new Date(b.createdAt).getTime();if(isNaN(a)||a>c)continue;d.add(b.id);let f=b.status;if(b.closedAt){let a=new Date(b.closedAt).getTime();!isNaN(a)&&a<=c?f="closed":"closed"===b.status&&(f="open")}f!==b.status?e.push({...b,status:f}):e.push(b)}let f=[];for(let a of b){let b="object"==typeof a.source?a.source.id:a.source,c="object"==typeof a.target?a.target.id:a.target;d.has(b)&&d.has(c)&&f.push({...a,source:b,target:c})}return{nodes:e,links:f}}(p.graphData.nodes,p.graphData.links,a.time),c={...p,graphData:{nodes:b.nodes,links:b.links}};aj(a=>{if(!a)return c;let b=r(a,c);return b.hasChanges?fC(a,c,b):a})},[aa,p,bi,ac]);let bn=(0,c.useCallback)((a,b)=>{if((b?.metaKey||b?.ctrlKey)&&a.description){aU(a),as(!1),au(null);return}if(b?.shiftKey){z(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c}),x(null);return}x(b=>b?.id===a.id?null:a),z(new Set),as(!1),ay(!1),aC(!1),au(null),aG(!1),aE(null),aM(!1),aO(null)},[]),bo=(0,c.useCallback)((a,b,c)=>{aK.current||a1(a?{node:a,x:b,y:c}:null)},[]),bp=(0,c.useCallback)(a=>{au(a.handle),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null),a_(null)},[]),bq=(0,c.useCallback)(a=>{B(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),br=(0,c.useMemo)(()=>{if(!p)return new Set;let{nodes:a,links:b}=p.graphData,c=new Set;for(let a of b)if("parent-child"===a.type){let b="object"==typeof a.source?a.source.id:a.source;c.add(b)}let d=new Set(a.map(a=>a.id));for(let b of a)if(b.id.includes(".")){let a=b.id.split(".")[0];d.has(a)&&c.add(a)}return c},[p]),bs=(0,c.useCallback)(()=>{B(new Set(br))},[br]),bt=(0,c.useCallback)(()=>{B(new Set)},[]),bu=(0,c.useCallback)(a=>{D(a)},[]),bv=(0,c.useCallback)(()=>{D(null)},[]),bw=(0,c.useCallback)(()=>{aC(!0),x(null),as(!1),ay(!1),aG(!1),aE(0)},[]),bx=(0,c.useCallback)(()=>{aE(a=>null===a?null:a>=e1.length-1?a:a+1)},[]),by=(0,c.useCallback)(()=>{aE(a=>null===a||a<=0?a:a-1)},[]),bz=(0,c.useCallback)(()=>{aE(null)},[]),bA=(0,c.useCallback)(()=>{x(null),z(new Set),aQ(null),aS(null),aO(null),au(null),aG(!1)},[]),bB=(0,c.useCallback)((a,b)=>{aK.current||(aS(null),a1(null),a.description||P||"epic"===a.issueType?aQ({node:a,x:b.clientX,y:b.clientY}):aS({node:a,x:b.clientX,y:b.clientY}))},[P]),bC=(0,c.useCallback)(a=>{aS(null),a1(null),aO({node:a})},[]),bD=(0,c.useCallback)(async(a,b)=>{let c=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{$type:"org.impactindexer.review.comment",subject:{uri:`beads:${a}`,type:"record"},text:b,createdAt:new Date().toISOString()}})});if(!c.ok)throw Error((await c.json()).error||"Failed to post comment");await W()},[W]),bE=(0,c.useCallback)(async a=>{if(!Q?.handle)return;let b=Q.avatar;if(!b&&Q.did)try{let a=await fetch(`https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(Q.did)}`);a.ok&&(b=(await a.json()).avatar)}catch{}Z(c=>{let d=new Map(c);return d.set(a,{avatar:b,claimedAt:new Date().toISOString(),handle:Q.handle}),d}),await bD(a,`@${Q.handle}`),setTimeout(()=>W(),3e3)},[Q?.handle,Q?.did,Q?.avatar,bD,W]),bF=(0,c.useCallback)(async a=>{let b=await fetch(`/api/records?collection=${encodeURIComponent("org.impactindexer.review.comment")}&rkey=${encodeURIComponent(a.rkey)}`,{method:"DELETE"});if(!b.ok)throw Error((await b.json()).error||"Failed to delete comment");await W()},[W]),bG=(0,c.useCallback)(async a=>{let b=al.get(a);b&&(_(b=>new Set(b).add(a)),Z(b=>{let c=new Map(b);return c.delete(a),c}),b.rkey?(await bF({rkey:b.rkey}),_(b=>{let c=new Set(b);return c.delete(a),c})):setTimeout(async()=>{await W(),_(b=>{let c=new Set(b);return c.delete(a),c})},3e3))},[al,bF,W]),bH=(0,c.useCallback)(async a=>{let b=a.likes.find(a=>a.did===Q?.did);if(b){let a=await fetch(`/api/records?collection=${encodeURIComponent("org.impactindexer.review.like")}&rkey=${encodeURIComponent(b.rkey)}`,{method:"DELETE"});if(!a.ok)throw Error((await a.json()).error||"Failed to unlike")}else{let b=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.like",record:{subject:{uri:a.uri,type:"record"},createdAt:new Date().toISOString()}})});if(!b.ok)throw Error((await b.json()).error||"Failed to like")}await W()},[Q?.did,W]),bI=(0,c.useCallback)(async(a,b)=>{let c=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{subject:{uri:`beads:${a.nodeId}`,type:"record"},text:b,replyTo:a.uri,createdAt:new Date().toISOString()}})});if(!c.ok)throw Error((await c.json()).error||"Failed to post reply");await W()},[W]),bJ=(0,c.useCallback)(a=>{if(!p)return;let b=p.graphData.nodes.find(b=>b.id===a);b&&x(b)},[p]),bK=(0,c.useMemo)(()=>{let a=new Map;if(!V)return a;let b=new Map;for(let a of V)b.has(a.nodeId)||b.set(a.nodeId,new Set),b.get(a.nodeId).add(a.handle),a.displayName&&b.get(a.nodeId).add(a.displayName);for(let[c,d]of b)a.set(c,Array.from(d).join(" "));return a},[V]),bL=(0,c.useMemo)(()=>{if(!p||!a4.trim())return[];let a=a4.toLowerCase();return p.graphData.nodes.filter(b=>{let c=bK.get(b.id)||"";return`${b.id} ${b.title} ${b.prefix} ${b.owner||""} ${b.assignee||""} ${b.createdBy||""} ${c}`.toLowerCase().includes(a)}).slice(0,8)},[a4,p,bK]);(0,c.useEffect)(()=>{a7(0)},[a4]);let bM=(0,c.useCallback)(a=>{be.current?.focusNode(a),a3(!1),a5(""),a7(0)},[]),bN=(0,c.useCallback)(a=>{for(let[b,c]of al)if(c.handle===a)return b;for(let[b,c]of ap)if(c.handle===a)return b;if(p){let b=p.graphData.nodes.filter(b=>b.assignee===a&&"closed"!==b.status).sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt));if(b.length>0)return b[0].id}return null},[al,ap,p]);(0,c.useEffect)(()=>{let a=a=>{let b=a.target?.tagName;if("INPUT"===b||"TEXTAREA"===b||a.target?.isContentEditable)return;if((a.ctrlKey||a.metaKey)&&"f"===a.key&&(a.preventDefault(),a3(!0),setTimeout(()=>bf.current?.focus(),50)),"Escape"===a.key&&a2&&(a3(!1),a5(""),a7(0)),a.shiftKey&&"Digit0"===a.code){a.preventDefault();let b=bj.length>0?bj[0].nodeId:null;if(b&&p){let a=p.graphData.nodes.find(a=>a.id===b);a&&be.current?.focusNode(a)}}let c=a.code.match(/^Digit([1-9])$/);if(a.shiftKey&&c){a.preventDefault();let b=bk[parseInt(c[1],10)-1];if(!b||!p)return;let d=bN(b.handle);if(d){let a=p.graphData.nodes.find(a=>a.id===d);a&&be.current?.focusNode(a)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[a2,bj,p,bk,bN]);let bO=(0,c.useCallback)(a=>{"ArrowDown"===a.key?(a.preventDefault(),a7(a=>Math.min(a+1,bL.length-1))):"ArrowUp"===a.key?(a.preventDefault(),a7(a=>Math.max(a-1,0))):"Enter"===a.key&&bL.length>0&&(a.preventDefault(),bM(bL[a6]))},[bL,a6,bM]);return s?(0,b.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center bg-white dark:bg-zinc-900 text-zinc-800 dark:text-zinc-200 px-6 select-none",children:[(0,b.jsxs)("div",{className:"relative w-full max-w-sm mb-8",children:[(0,b.jsx)("svg",{viewBox:"0 0 400 40",fill:"none",className:"w-full text-zinc-200 dark:text-zinc-700","aria-hidden":"true",children:(0,b.jsx)("line",{x1:"0",y1:"20",x2:"400",y2:"20",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:"4 6",opacity:"0.6"})}),(0,b.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,b.jsx)("div",{className:"bg-white dark:bg-zinc-900 px-4",children:(0,b.jsx)(eK.BeadsLogo,{className:"w-10 h-10 text-emerald-500"})})})]}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 font-light animate-fade-in",children:"Warming up the heartbeat..."}),(0,b.jsx)("p",{className:"text-xs text-zinc-400 dark:text-zinc-500 mt-1.5 animate-fade-in",style:{animationDelay:"0.1s"},children:"Discovering issues and mapping dependencies"})]}):u?(0,b.jsx)("div",{className:"h-screen flex items-center justify-center bg-white",children:(0,b.jsxs)("div",{className:"max-w-sm text-center",children:[(0,b.jsx)("div",{className:"w-14 h-14 mx-auto mb-4 bg-red-50 rounded-full flex items-center justify-center",children:(0,b.jsx)("svg",{className:"w-7 h-7 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,b.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 mb-1",children:"Unable to load data"}),(0,b.jsx)("p",{className:"text-sm text-zinc-500 mb-4",children:u}),(0,b.jsxs)("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white text-sm rounded-lg hover:bg-emerald-700 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]})]})}):p?(0,b.jsxs)("div",{className:"h-screen flex flex-col overflow-hidden bg-white dark:bg-black",children:[(0,b.jsx)("header",{className:"sticky top-0 z-50 shrink-0 bg-white/95 dark:bg-black/95 backdrop-blur-sm border-b border-zinc-200/80 dark:border-zinc-800/80",children:(0,b.jsxs)("div",{className:"px-3 sm:px-6 h-14 flex items-center",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 shrink-0 group",children:[(0,b.jsx)(eK.BeadsLogo,{className:"w-8 h-8 text-emerald-500 transition-transform group-hover:scale-105"}),(0,b.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,b.jsx)("h1",{className:"text-[15px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:I}),(0,b.jsx)("span",{className:"font-normal text-zinc-400 text-[15px] hidden sm:inline",children:"Heartbeads"}),(0,b.jsxs)("span",{className:"text-[10px] text-zinc-400 bg-zinc-100 dark:bg-zinc-800 rounded-full px-1.5 py-0.5 font-medium hidden sm:inline",children:["v","0.6.4"]})]})]}),(0,b.jsx)("div",{className:"flex-1 flex justify-center px-2 sm:px-4",children:(0,b.jsx)("div",{className:"relative w-full max-w-md","data-tutorial":"search",children:a2?(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center bg-white dark:bg-zinc-900 rounded-full border border-zinc-200 dark:border-zinc-700 shadow-sm overflow-hidden",children:[(0,b.jsx)("div",{className:"pl-3 pr-1 text-zinc-400 dark:text-zinc-500",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,b.jsx)("input",{ref:bf,type:"text",value:a4,onChange:a=>a5(a.target.value),onKeyDown:bO,placeholder:"Search issues...",className:"flex-1 px-2 py-1.5 text-xs text-zinc-800 dark:text-zinc-200 bg-transparent outline-none placeholder:text-zinc-400 dark:placeholder:text-zinc-500",autoFocus:!0}),(0,b.jsx)("button",{onClick:()=>{a3(!1),a5(""),a7(0)},className:"px-2 py-1.5 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300",children:(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a4.trim()&&(0,b.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white dark:bg-zinc-900 rounded-xl border border-zinc-100 dark:border-zinc-800 shadow-xl overflow-hidden max-h-72 overflow-y-auto z-50",children:[0===bL.length?(0,b.jsx)("div",{className:"px-3 py-3 text-xs text-zinc-400 dark:text-zinc-500 text-center",children:"No matching issues"}):bL.map((a,c)=>(0,b.jsxs)("button",{onClick:()=>bM(a),onMouseEnter:()=>a7(c),className:`w-full text-left px-3 py-2 text-xs transition-colors flex items-start gap-2.5 ${c===a6?"bg-emerald-50 dark:bg-emerald-950":"hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("div",{className:"shrink-0 mt-1",children:(0,b.jsx)("div",{className:`w-2 h-2 rounded-full ${fD[a.status]||"bg-zinc-400"}`})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("span",{className:"font-medium text-zinc-600 dark:text-zinc-400 shrink-0",children:a.id}),a.priority<=1&&(0,b.jsx)("span",{className:"text-[10px]",children:0===a.priority?"🔥🔥":"🔥"})]}),(0,b.jsx)("div",{className:"text-zinc-400 dark:text-zinc-500 truncate mt-0.5",children:a.title})]}),(0,b.jsx)("span",{className:"shrink-0 text-[10px] text-zinc-400 dark:text-zinc-500 bg-zinc-100 dark:bg-zinc-800 rounded px-1 py-0.5 mt-0.5",children:a.prefix})]},a.id)),bL.length>0&&(0,b.jsxs)("div",{className:"px-3 py-1.5 text-[10px] text-zinc-400 dark:text-zinc-500 border-t border-zinc-100 dark:border-zinc-800 bg-zinc-50/50 dark:bg-zinc-800/50 flex items-center justify-between",children:[(0,b.jsxs)("span",{children:[bL.length," result",1!==bL.length?"s":""]}),(0,b.jsxs)("span",{children:[(0,b.jsx)("kbd",{className:"px-1 py-0.5 bg-white dark:bg-zinc-800 rounded border border-zinc-200 dark:border-zinc-700 text-[9px] font-mono",children:"Enter"})," ","to focus"]})]})]})]}):(0,b.jsxs)("button",{onClick:()=>{a3(!0),setTimeout(()=>bf.current?.focus(),50)},className:"w-full flex items-center gap-2 px-3.5 py-1.5 text-sm text-zinc-400 rounded-full bg-zinc-50/80 dark:bg-zinc-800/80 border border-zinc-200/60 dark:border-zinc-700/60 hover:text-zinc-500 dark:hover:text-zinc-300 hover:border-zinc-300 dark:hover:border-zinc-600 hover:bg-zinc-100/50 dark:hover:bg-zinc-700/50 transition-all",title:"Search issues (Ctrl+F)",children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,b.jsx)("span",{className:"flex-1 text-left",children:"Search issues..."}),(0,b.jsxs)("kbd",{className:"hidden sm:inline-block px-1 py-0.5 bg-zinc-100 dark:bg-zinc-700 rounded border border-zinc-200 dark:border-zinc-600 text-[9px] font-mono text-zinc-400 dark:text-zinc-500",children:["u">typeof navigator&&navigator.platform?.includes("Mac")?"⌘":"Ctrl","F"]})]})})}),(0,b.jsx)("button",{onClick:()=>aM(!0),className:"md:hidden p-2 text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-200 dark:hover:bg-zinc-800 rounded-full transition-colors shrink-0","aria-label":"Open menu",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}),(0,b.jsxs)("div",{className:"hidden md:flex items-center gap-1 shrink-0","data-tutorial":"nav-pills",children:[(0,b.jsxs)("button",{onClick:bm,"data-tutorial":"nav-replay",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${aa?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Replay"})]}),(0,b.jsxs)("button",{onClick:()=>{as(a=>!a),ar||(x(null),ay(!1),aC(!1),au(null),aG(!1),aE(null))},"data-tutorial":"nav-comments",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${ar?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Comments"})]}),(0,b.jsxs)("button",{onClick:()=>{ay(a=>!a),ax||(x(null),as(!1),aC(!1),au(null),aG(!1),aE(null))},"data-tutorial":"nav-activity",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${ax?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Activity"})]}),(0,b.jsxs)("button",{onClick:()=>{aC(a=>!a),aB||(x(null),as(!1),ay(!1),au(null),aG(!1))},"data-tutorial":"nav-learn",className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ${aB?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50 dark:text-zinc-400 dark:hover:text-zinc-100 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Learn"})]}),(0,b.jsx)("div",{className:"w-px h-5 bg-zinc-200 dark:bg-zinc-700 mx-2"}),(0,b.jsxs)("span",{"data-tutorial":"auth-section",className:"flex items-center",children:[(0,b.jsx)("button",{onClick:()=>aZ(!0),className:"p-1.5 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"Settings",children:(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 010 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,b.jsx)("button",{onClick:S,className:"p-1.5 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",title:"dark"===R?"Switch to light mode":"Switch to dark mode","data-tutorial":"btn-theme",children:"dark"===R?(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"})}):(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})})}),(0,b.jsx)(eJ,{onViewProfile:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null)}})]})]})]})}),aL&&(0,b.jsxs)("div",{className:"md:hidden fixed inset-0 z-[60]",children:[(0,b.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-[2px]",onClick:()=>aM(!1)}),(0,b.jsxs)("div",{className:"absolute top-0 right-0 h-full w-72 bg-white dark:bg-zinc-900 shadow-2xl flex flex-col animate-slide-in-right",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-100 dark:border-zinc-800",children:[(0,b.jsx)("span",{className:"text-sm font-semibold text-zinc-700 dark:text-zinc-100",children:"Menu"}),(0,b.jsx)("button",{onClick:()=>aM(!1),className:"p-1.5 text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("nav",{className:"flex-1 overflow-y-auto py-2",children:[(0,b.jsxs)("button",{onClick:()=>{bm(),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${aa?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),"Replay"]}),(0,b.jsxs)("button",{onClick:()=>{as(a=>!a),ar||(x(null),ay(!1),aC(!1),aG(!1),aE(null)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${ar?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),"Comments"]}),(0,b.jsxs)("button",{onClick:()=>{ay(a=>!a),ax||(x(null),as(!1),aC(!1),aG(!1),aE(null)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${ax?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,b.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,b.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),"Activity"]}),(0,b.jsxs)("button",{onClick:()=>{aC(a=>!a),aB||(x(null),as(!1),ay(!1),aG(!1)),aM(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium transition-colors ${aB?"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,children:[(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),"Learn"]}),(0,b.jsx)("div",{className:"h-px bg-zinc-100 dark:bg-zinc-800 mx-4 my-2"}),(0,b.jsxs)("button",{onClick:()=>{aZ(!0),aM(!1)},className:"w-full flex items-center gap-3 px-5 py-3.5 text-sm font-medium text-zinc-600 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors",children:[(0,b.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 010 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),"Settings"]}),(0,b.jsx)("div",{className:"px-5 py-3.5",children:(0,b.jsx)(eJ,{onViewProfile:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1),aE(null),aM(!1)}})})]})]})]}),(0,b.jsxs)("div",{className:"flex-1 flex overflow-hidden relative",children:[(0,b.jsxs)("div",{className:"flex-1 relative bg-zinc-50/50 dark:bg-black",children:[(0,b.jsx)("div",{className:"absolute inset-0 opacity-[0.03] dark:opacity-[0.06]",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,b.jsx)(L,{ref:be,nodes:aa&&ai?ai.graphData.nodes:p.graphData.nodes,links:aa&&ai?ai.graphData.links:p.graphData.links,selectedNode:w,selectedNodeIds:y,onSelectedNodeIdsChange:z,onNodeClick:bn,onNodeHover:bo,onBackgroundClick:bA,onNodeRightClick:bB,commentedNodeIds:U,claimedNodeAvatars:al,assigneeNodeAvatars:ap,onAvatarHover:a_,onAvatarClick:bp,timelineActive:aa,stats:p.stats,sidebarOpen:!!w||ar||ax||aB||!!at||aF,collapsedEpicIds:A,onCollapseAll:bs,onExpandAll:bt,focusedEpicId:C,onExitFocusedEpic:bv,colorMode:E,onColorModeChange:F,activeLegendFilters:G,onToggleLegendFilter:a=>H(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c}),onClearLegendFilters:()=>H(new Set),autoFit:a8,onAutoFitToggle:()=>a9(a=>!a),pulseNodeId:bj.length>0?bj[0].nodeId:null,showPulse:ba,onShowPulseToggle:()=>bb(a=>!a),showParticles:bc,onShowParticlesToggle:()=>bd(a=>!a),isMobile:aJ,onNodeDoubleTap:bC,theme:R}),aa&&bi&&bi.events.length>0&&(0,b.jsx)("div",{className:"absolute bottom-4 z-10 transition-[right] duration-300 ease-out",style:{right:w||ar||ax?"calc(360px + 1rem)":"1rem"},children:(0,b.jsx)(fB,{totalSteps:bi.events.length,currentStep:Math.max(ac,0),currentTime:ac>=0?bi.events[ac]?.time??bi.minTime:bi.minTime,isPlaying:ae,speed:ag,onStepChange:ad,onPlayPause:()=>af(a=>!a),onSpeedChange:ah})}),!w&&!ar&&!ax&&!aB&&!at&&!aF&&(0,b.jsxs)("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10 flex flex-col items-end gap-2","data-tutorial":"overlays",children:[(0,b.jsx)(eY,{events:bj,collapsed:az,compact:aJ,onToggleCollapse:()=>aA(a=>!a),onExpandPanel:()=>{ay(!0),x(null),as(!1),aC(!1),aG(!1)},onNodeClick:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&bM(b)},onHandleClick:a=>{au(a),x(null),as(!1),aC(!1),aG(!1)}}),(0,b.jsx)(fg,{entries:bk,collapsed:aH,compact:aJ,onToggleCollapse:()=>aI(a=>!a),onExpandPanel:()=>{aG(!0),x(null),as(!1),ay(!1),aC(!1),au(null)},onProfileClick:a=>{au(a),x(null),as(!1),ay(!1),aC(!1),aG(!1);let b=bN(a);b&&be.current?.zoomToNode(b)}})]}),aP&&(0,b.jsx)(eM,{node:aP.node,x:aP.x,y:aP.y,onShowDescription:()=>{aU(aP.node),aQ(null)},onAddComment:()=>{aS({node:aP.node,x:aP.x,y:aP.y}),aQ(null)},onClaimTask:P&&!al.has(aP.node.id)?()=>{bE(aP.node.id),aQ(null)}:void 0,onUnclaimTask:(()=>{if(!P)return;let a=al.get(aP.node.id);if(a&&(a.did===Q?.did||!a.did))return()=>{bG(aP.node.id),aQ(null)}})(),onCollapseEpic:"epic"!==aP.node.issueType||A.has(aP.node.id)?void 0:()=>{bq(aP.node.id),aQ(null)},onUncollapseEpic:"epic"===aP.node.issueType&&A.has(aP.node.id)?()=>{bq(aP.node.id),aQ(null)}:void 0,onFocusEpic:"epic"!==aP.node.issueType||C?void 0:()=>{bu(aP.node.id),aQ(null)},onExitFocusEpic:"epic"===aP.node.issueType&&C===aP.node.id?()=>{bv(),aQ(null)}:void 0,onClose:()=>aQ(null)}),aN&&(0,b.jsx)(fj,{node:aN.node,onShowDescription:aN.node.description?()=>{aU(aN.node),aO(null)}:void 0,onAddComment:()=>{aS({node:aN.node,x:window.innerWidth/2,y:window.innerHeight/2}),aO(null)},onClaimTask:P&&!al.has(aN.node.id)?()=>{bE(aN.node.id),aO(null)}:void 0,onUnclaimTask:(()=>{if(!P)return;let a=al.get(aN.node.id);if(a&&(a.did===Q?.did||!a.did))return()=>{bG(aN.node.id),aO(null)}})(),onCollapseEpic:"epic"!==aN.node.issueType||A.has(aN.node.id)?void 0:()=>{bq(aN.node.id),aO(null)},onUncollapseEpic:"epic"===aN.node.issueType&&A.has(aN.node.id)?()=>{bq(aN.node.id),aO(null)}:void 0,onFocusEpic:"epic"!==aN.node.issueType||C?void 0:()=>{bu(aN.node.id),aO(null)},onExitFocusEpic:"epic"===aN.node.issueType&&C===aN.node.id?()=>{bv(),aO(null)}:void 0,onClose:()=>aO(null)}),aR&&(0,b.jsx)(eL,{node:aR.node,x:aR.x,y:aR.y,onClose:()=>aS(null),onSubmit:async a=>{await bD(aR.node.id,a),aS(null)},isAuthenticated:P,existingComments:T.get(aR.node.id)}),aT&&(0,b.jsx)(eA,{node:aT,onClose:()=>aU(null),repoUrl:N[aT.prefix],onOpenSettings:()=>aZ(!0),onNavigate:aV.length>1?aW:void 0,navigationLabel:aX}),(0,b.jsx)(fi,{isOpen:aY,onClose:()=>aZ(!1)}),a0&&!a$&&!aJ&&(0,b.jsx)(eN,{node:a0.node,x:a0.x,y:a0.y,prefixColor:n(a0.node.prefix),allNodes:aa&&ai?ai.graphData.nodes:p.graphData.nodes,theme:R}),a$&&!aJ&&(0,b.jsx)("div",{style:{position:"fixed",left:a$.x+12,top:a$.y-8,zIndex:90,pointerEvents:"none"},children:(0,b.jsxs)("div",{className:"flex items-center gap-2 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded-lg shadow-lg px-2.5 py-2",children:[a$.avatar?(0,b.jsx)("img",{src:a$.avatar,alt:"",className:"w-6 h-6 rounded-full shrink-0"}):(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-zinc-200 dark:bg-zinc-700 flex items-center justify-center text-[10px] font-medium text-zinc-500 dark:text-zinc-400 shrink-0",children:a$.handle.charAt(0).toUpperCase()}),(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("span",{className:"text-xs text-zinc-700 dark:text-zinc-300 whitespace-nowrap",children:[(0,b.jsx)("span",{className:"font-semibold text-zinc-800 dark:text-zinc-200",children:a$.handle})," ",a$.isAssignee?a$.nodeClosed?"closed":"is assigned to":a$.nodeClosed?"closed":"claimed"," ",(0,b.jsx)("span",{className:"font-mono text-emerald-700 dark:text-emerald-400",children:a$.nodeId})]}),(0,b.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:ek(a$.claimedAt)})]})]})})]}),(0,b.jsxs)("aside",{className:`hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white dark:bg-zinc-900 border-l border-zinc-200 dark:border-zinc-700 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ${w?"translate-x-0":"translate-x-full"}`,children:[(0,b.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 dark:border-zinc-800 flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Node Detail"}),(0,b.jsx)("button",{onClick:()=>{x(null)},className:"p-1 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 dark:hover:bg-zinc-800 transition-colors rounded-full hover:bg-zinc-100",children:(0,b.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-4 space-y-5",children:(0,b.jsx)(eC,{node:w,allNodes:p.graphData.nodes,onNodeNavigate:bJ,comments:w?T.get(w.id):void 0,onPostComment:w?a=>bD(w.id,a):void 0,onDeleteComment:bF,onLikeComment:bH,onReplyComment:bI,isAuthenticated:P,currentDid:Q?.did,repoUrls:N,onOpenSettings:()=>aZ(!0),onProfileClick:a=>{au(a),x(null)}})})]}),(0,b.jsx)("div",{className:`md:hidden fixed inset-x-0 bottom-0 z-20 transform transition-transform duration-300 ease-out ${w?"translate-y-0":"translate-y-full"}`,children:(0,b.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-t-2xl border-t border-zinc-200 dark:border-zinc-700 shadow-lg max-h-[60vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 flex items-center justify-between px-4 pt-3 pb-2",children:[(0,b.jsx)("div",{className:"w-8 h-1 bg-zinc-300 dark:bg-zinc-600 rounded-full mx-auto"}),(0,b.jsx)("button",{onClick:()=>x(null),className:"absolute right-3 top-3 p-1 text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300 dark:hover:bg-zinc-800",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-4 pb-6 space-y-4",children:(0,b.jsx)(eC,{node:w,allNodes:p.graphData.nodes,onNodeNavigate:bJ,comments:w?T.get(w.id):void 0,onPostComment:w?a=>bD(w.id,a):void 0,onDeleteComment:bF,onLikeComment:bH,onReplyComment:bI,isAuthenticated:P,currentDid:Q?.did,repoUrls:N,onOpenSettings:()=>aZ(!0),onProfileClick:a=>{au(a),x(null)}})})]})}),(0,b.jsx)(eO,{isOpen:ar,onClose:()=>as(!1),allComments:V.filter(a=>ak.has(a.nodeId)),onNodeNavigate:a=>{bJ(a),as(!1)},isAuthenticated:P,currentDid:Q?.did,onLikeComment:bH,onDeleteComment:bF,onReplyComment:bI,onPostComment:bD,prefixes:p?.stats?.prefixes||[]}),(0,b.jsx)(e0,{events:bj,isOpen:ax,onClose:()=>ay(!1),onNodeClick:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&(bM(b),ay(!1))},onHandleClick:a=>{au(a),ay(!1),x(null),as(!1),aC(!1),aG(!1)}}),(0,b.jsx)(fh,{entries:bk,isOpen:aF,onClose:()=>aG(!1),onProfileClick:a=>{au(a),aG(!1),x(null),as(!1),ay(!1),aC(!1);let b=bN(a);b&&be.current?.zoomToNode(b)}}),(0,b.jsx)(fb,{isOpen:aB,onClose:()=>{aC(!1),aE(null)},tutorialStep:aD,onStartTutorial:bw,onNextStep:bx,onPrevStep:by,onEndTutorial:bz}),(0,b.jsx)(fm,{isOpen:!!at,onClose:()=>au(null),profile:bl,onNodeNavigate:a=>{let b=p?.graphData.nodes.find(b=>b.id===a);b&&(au(null),bn(b),be.current?.focusNode(b))}})]}),(0,b.jsx)(e2,{step:aD,onNext:bx,onPrev:by,onEnd:bz})]}):null}a.s(["default",()=>fE],60350)}];
25
25
 
26
26
  //# sourceMappingURL=%5Broot-of-the-server%5D__04e6e565._.js.map