fleetlens 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/build-manifest.json +3 -3
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
- package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/page.js +3 -3
- package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page.js +3 -3
- package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/page.js +1 -1
- package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page.js +3 -2
- package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/usage/page.js +1 -1
- package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0op9af~._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00z7zlm._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__05lbtny._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ms7h0~._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__08cr2u9._.js → [root-of-the-server]__0p~g4m6._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wvzyl7._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_09n75_5._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_0ph19-k._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/_0u29mdd._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0xies90._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_06j3c.0._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_analytics_0k4dgst.js +1 -1
- package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next/static/chunks/03.mv4y4.w-vb.js +6 -0
- package/app/apps/web/.next/static/chunks/08983lz4~hffx.js +6 -0
- package/app/apps/web/.next/static/chunks/0fc6dk2qtokwh.js +1 -0
- package/app/apps/web/.next/static/chunks/0p1lpoh02zh8h.js +10 -0
- package/app/apps/web/.next/static/chunks/{03fw7f2obcvq~.js → 14q3xsfpkvuef.js} +2 -2
- package/app/apps/web/app/layout.tsx +2 -0
- package/app/apps/web/app/projects/[slug]/page.tsx +2 -0
- package/app/apps/web/app/sessions/[id]/page.tsx +27 -1
- package/app/apps/web/app/sessions/[id]/session-view.tsx +372 -793
- package/app/apps/web/app/sessions/[id]/team-tab/adapter.ts +633 -0
- package/app/apps/web/app/sessions/[id]/team-tab/format.ts +20 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-minimap.tsx +682 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-tab-client.tsx +78 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-table.tsx +796 -0
- package/app/apps/web/app/sessions/[id]/team-tab/turn-drawer.tsx +805 -0
- package/app/apps/web/app/sessions/[id]/tool-cards.tsx +461 -0
- package/app/apps/web/app/sessions/[id]/turn-steps.tsx +306 -0
- package/app/apps/web/app/sessions/sessions-grid.tsx +36 -5
- package/app/apps/web/components/live-sessions-widget.tsx +20 -6
- package/app/apps/web/components/team-badge.tsx +90 -0
- package/app/apps/web/package.json +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/dist/daemon-worker.js +74 -21
- package/dist/index.js +93 -23
- package/package.json +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0b..h_8._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0cdd~8n._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~a~v00._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/_0zv~jv-._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/_12dtryh._.js +0 -12
- package/app/apps/web/.next/static/chunks/07oyxajlp3dvb.js +0 -6
- package/app/apps/web/.next/static/chunks/0a24elrqoqqep.js +0 -10
- package/app/apps/web/.next/static/chunks/0i4zodv86~~~i.js +0 -1
- package/app/apps/web/.next/static/chunks/0rbm60-qyshdm.js +0 -6
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26568,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,o=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g;function d(e){return e?e.replace(c,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,c=1;function f(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");c=~r?e.length-r:c+e.length}function p(){var e={line:n,column:c};return function(t){return t.position=new h(e),m(o),t}}function h(e){this.start=e,this.end={line:n,column:c},this.source=t.source}function g(r){var i=Error(t.source+":"+n+":"+c+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=c,i.source=e,t.silent);else throw i}function m(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return c+=2,f(r),e=e.slice(n),c+=2,t({type:"comment",comment:r})}}h.prototype.content=e,m(o);var v,b=[];for(x(b);v=function(){var e=p(),t=m(l);if(t){if(y(),!m(a))return g("property missing ':'");var n=m(s),i=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return m(u),i}}();)!1!==v&&(b.push(v),x(b));return b}},70454,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;o?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(26568))},65185,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,o=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},u=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||o.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,u):e.replace(l,u)).replace(i,s))}},15511,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(70454)),i=e.r(65185);function o(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}o.default=o,t.exports=o},4100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(l)return l(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,o,l,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(t=arguments[f],null!=t)for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(o=a(i)))?(o?(o=!1,l=r&&a(r)?r:[]):l=r&&s(r)?r:{},u(d,{name:n,newValue:e(h,l,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},90603,e=>{"use strict";var t=e.i(18050),n=e.i(22016),r=e.i(71645),i=e.i(75254);let o=(0,i.default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var l=e.i(64659),a=e.i(63059);let s=(0,i.default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var u=e.i(3116);let c=(0,i.default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),d=(0,i.default)("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]),f=(0,i.default)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),p=(0,i.default)("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);var h=e.i(95116),g=e.i(37727);function m(){}function x(){}let y=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b={};function k(e,t){return((t||b).jsx?v:y).test(e)}let w=/[ \t\n\f\r]/g;function j(e){return""===e.replace(w,"")}class S{constructor(e,t){this.attribute=t,this.property=e}}S.prototype.attribute="",S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property="",S.prototype.spaceSeparated=!1,S.prototype.space=void 0;let M=0,C=A(),T=A(),z=A(),I=A(),E=A(),F=A(),L=A();function A(){return 2**++M}e.s(["boolean",0,C,"booleanish",0,T,"commaOrSpaceSeparated",0,L,"commaSeparated",0,F,"number",0,I,"overloadedBoolean",0,z,"spaceSeparated",0,E],744);var R=e.i(744);let P=Object.keys(R);class D extends S{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<P.length;){const e=P[i];!function(e,t,n){n&&(e[t]=n)}(this,P[i],(n&R[e])===R[e])}}}function O(e){return e.toLowerCase()}D.prototype.defined=!0;let B=/[A-Z]/g,W=/-[a-z]/g,$=/^data[-\w.:]+$/i;function N(e){return"-"+e.toLowerCase()}function _(e){return e.charAt(1).toUpperCase()}let H={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 U{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function q(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new U(n,r,t)}function V(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let o=new D(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[O(r)]=r,n[O(o.attribute)]=r}return new U(t,n,e.space)}U.prototype.normal={},U.prototype.property={},U.prototype.space=void 0;let X=V({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:E,ariaCurrent:null,ariaDescribedBy:E,ariaDetails:null,ariaDisabled:T,ariaDropEffect:E,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:E,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:E,ariaLevel:I,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:E,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:E,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:T,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function G(e,t){return t in e?e[t]:t}function Y(e,t){return G(e,t.toLowerCase())}let J=V({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:F,acceptCharset:E,accessKey:E,action:null,allow:null,allowFullScreen:C,allowPaymentRequest:C,allowUserMedia:C,alt:null,as:null,async:C,autoCapitalize:null,autoComplete:E,autoFocus:C,autoPlay:C,blocking:E,capture:null,charSet:null,checked:C,cite:null,className:E,cols:I,colSpan:null,content:null,contentEditable:T,controls:C,controlsList:E,coords:I|F,crossOrigin:null,data:null,dateTime:null,decoding:null,default:C,defer:C,dir:null,dirName:null,disabled:C,download:z,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:C,formTarget:null,headers:E,height:I,hidden:z,high:I,href:null,hrefLang:null,htmlFor:E,httpEquiv:E,id:null,imageSizes:null,imageSrcSet:null,inert:C,inputMode:null,integrity:null,is:null,isMap:C,itemId:null,itemProp:E,itemRef:E,itemScope:C,itemType:E,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:C,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:C,muted:C,name:null,nonce:null,noModule:C,noValidate:C,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:C,optimum:I,pattern:null,ping:E,placeholder:null,playsInline:C,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:C,referrerPolicy:null,rel:E,required:C,reversed:C,rows:I,rowSpan:I,sandbox:E,scope:null,scoped:C,seamless:C,selected:C,shadowRootClonable:C,shadowRootDelegatesFocus:C,shadowRootMode:null,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:C,useMap:null,value:T,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:E,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:C,declare:C,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:C,noHref:C,noShade:C,noWrap:C,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:C,disableRemotePlayback:C,prefix:null,property:null,results:I,security:null,unselectable:null},space:"html",transform:Y}),K=V({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:L,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:E,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:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:C,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,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:F,g2:F,glyphName:F,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:L,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,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:I,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:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:E,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:L,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:L,rev:L,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:L,requiredFeatures:L,requiredFonts:L,requiredFormats:L,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:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:L,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:L,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:L,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:G}),Q=V({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Z=V({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Y}),ee=V({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),et=q([X,J,Q,Z,ee],"html"),en=q([X,K,Q,Z,ee],"svg");var er=e.i(15511);let ei=el("end"),eo=el("start");function el(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ea(e){return e&&"object"==typeof e?"position"in e||"type"in e?eu(e.position):"start"in e||"end"in e?eu(e):"line"in e||"column"in e?es(e):"":""}function es(e){return ec(e&&e.line)+":"+ec(e&&e.column)}function eu(e){return es(e&&e.start)+"-"+es(e&&e.end)}function ec(e){return e&&"number"==typeof e?e:1}class ed extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=ea(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ed.prototype.file="",ed.prototype.name="",ed.prototype.reason="",ed.prototype.message="",ed.prototype.stack="",ed.prototype.column=void 0,ed.prototype.line=void 0,ed.prototype.ancestors=void 0,ed.prototype.cause=void 0,ed.prototype.fatal=void 0,ed.prototype.place=void 0,ed.prototype.ruleId=void 0,ed.prototype.source=void 0;let ef={}.hasOwnProperty,ep=new Map,eh=/[A-Z]/g,eg=new Set(["table","tbody","thead","tfoot","tr"]),em=new Set(["td","th"]),ex="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ey(e,t,n){var r,i,o,l,a,s,u,c,d;let f,p,h,g,x,y,v,b,k,w,M;return"element"===t.type?(r=e,i=t,o=n,p=f=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===f.space&&(r.schema=en),r.ancestors.push(i),h=ew(r,i.tagName,!1),g=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&ef.call(t.properties,r)){let o=function(e,t,n){let r=function(e,t){let n=O(t),r=t,i=S;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&$.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(W,_);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!W.test(e)){let n=e.replace(B,N);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=D}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,er.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new ed("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=ex+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)ef.call(e,t)&&(n[function(e){let t=e.replace(eh,eS);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?H[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(o){let[r,l]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof l&&em.has(t.tagName)?n=l:i[r]=l}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),x=ek(r,i),eg.has(i.tagName)&&(x=x.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&j(e.value):j(e))})),ev(r,g,h,i),eb(g,x),r.ancestors.pop(),r.schema=f,r.create(i,h,g,o)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return m("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}ej(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(l=e,a=t,s=n,v=y=l.schema,"svg"===a.name&&"html"===y.space&&(l.schema=en),l.ancestors.push(a),b=null===a.name?l.Fragment:ew(l,a.name,!0),k=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];m("ExpressionStatement"===t.type);let i=t.expression;m("ObjectExpression"===i.type);let o=i.properties[0];m("SpreadElement"===o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ej(e,t.position);else{let i,o=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];m("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else ej(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(l,a),w=ek(l,a),ev(l,k,b,a),eb(k,w),l.ancestors.pop(),l.schema=y,l.create(a,b,k,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ej(e,t.position)}(e,t):"root"===t.type?(u=e,c=t,d=n,eb(M={},ek(u,c)),u.create(c,u.Fragment,M,d)):"text"===t.type?t.value:void 0}function ev(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function eb(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ek(e,t){let n=[],r=-1,i=e.passKeys?new Map:ep;for(;++r<t.children.length;){let o,l=t.children[r];if(e.passKeys){let e="element"===l.type?l.tagName:"mdxJsxFlowElement"===l.type||"mdxJsxTextElement"===l.type?l.name:void 0;if(e){let t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}let a=ey(e,l,o);void 0!==a&&n.push(a)}return n}function ew(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=k(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}m(e,"always a result"),r=e}else r=k(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return ef.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ej(e)}function ej(e,t){let n=new ed("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ex+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eS(e){return"-"+e.toLowerCase()}let eM={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"]},eC={};function eT(e,t){let n=t||eC;return ez(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ez(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eI(e.children,t,n)}return Array.isArray(e)?eI(e,t,n):""}function eI(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ez(e[i],t,n);return r.join("")}function eE(e,t,n,r){let i,o=e.length,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)(i=r.slice(l,l+1e4)).unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function eF(e,t){return e.length>0?(eE(e,e.length,0,t),e):t}let eL={}.hasOwnProperty;function eA(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(eL.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(r in o){eL.call(i,r)||(i[r]=[]);let e=o[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eE(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eR=eV(/[A-Za-z]/),eP=eV(/[\dA-Za-z]/),eD=eV(/[#-'*+\--9=?A-Z^-~]/);function eO(e){return null!==e&&(e<32||127===e)}let eB=eV(/\d/),eW=eV(/[\dA-Fa-f]/),e$=eV(/[!-/:-@[-`{-~]/);function eN(e){return null!==e&&e<-2}function e_(e){return null!==e&&(e<0||32===e)}function eH(e){return -2===e||-1===e||32===e}let eU=eV(/\p{P}|\p{S}/u),eq=eV(/\s/);function eV(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eX(e,t,n,r){let i=r?r-1:1/0,o=0;return function(r){return eH(r)?(e.enter(n),function r(l){return eH(l)&&o++<i?(e.consume(l),r):(e.exit(n),t(l))}(r)):t(r)}}let eG={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eX(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eN(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eY={tokenize:function(e){let t,n,r,i=this,o=[],l=0;return a;function a(t){if(l<o.length){let n=o[l];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(l++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&x();let r=i.events.length,o=r;for(;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}m(l);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return eE(i.events,o+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(l===o.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(eJ,c,d)(n)}function c(e){return t&&x(),m(l),f(e)}function d(e){return i.parser.lazy[i.now().line]=l!==o.length,r=i.now().offset,h(e)}function f(t){return i.containerState={},e.attempt(eJ,p,h)(t)}function p(e){return l++,o.push([i.currentConstruct,i.containerState]),f(e)}function h(r){if(null===r){t&&x(),m(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){g(e.exit("chunkFlow"),!0),m(0),e.consume(n);return}return eN(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function g(e,o){let a=i.sliceStream(e);if(o&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,o=t.events.length;for(;o--;)if(t.events[o][1].start.offset<r&&(!t.events[o][1].end||t.events[o][1].end.offset>r))return;let a=i.events.length,s=a;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(m(l),o=a;o<i.events.length;)i.events[o][1].end={...n},o++;eE(i.events,s+1,0,i.events.slice(a)),i.events.length=o}}function m(t){let n=o.length;for(;n-- >t;){let t=o[n];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function x(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},eJ={tokenize:function(e,t,n){return eX(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eK={partial:!0,tokenize:function(e,t,n){return function(t){return eH(t)?eX(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eN(e)?t(e):n(e)}}};class eQ{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eZ(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eZ(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eZ(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);eZ(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eZ(this.left,t.reverse())}}}function eZ(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function e0(e){let t,n,r,i,o,l,a,s={},u=-1,c=new eQ(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(l=t[1]._tokenizer.events).length&&"lineEndingBlank"===l[r][1].type&&(r+=2),r<l.length&&"content"===l[r][1].type))for(;++r<l.length&&"content"!==l[r][1].type;)"chunkText"===l[r][1].type&&(l[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],o=e.get(t)[2],l=t-1,a=[],s=i._tokenizer;!s&&(s=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let u=s.events,c=[],d={},f=-1,p=i,h=0,g=0,m=[0];for(;p;){for(;e.get(++l)[1]!==p;);a.push(l),!p._tokenizer&&(n=o.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++f<u.length;)"exit"===u[f][0]&&"enter"===u[f-1][0]&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(g=f+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),f=m.length;f--;){let t=u.slice(m[f],m[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)d[h+c[f][0]]=h+c[f][1],h+=c[f][1]-c[f][0]-1;return d}(c,u)),u=s[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(o=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,o))}}return eE(e,0,1/0,c.slice(0)),!a}let e1={resolve:function(e){return e0(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):eN(t)?e.check(e2,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e2={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eX(e,i,"linePrefix")};function i(i){if(null===i||eN(i))return n(i);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},e4={tokenize:function(e){let t=this,n=e.attempt(eK,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eX(e,e.attempt(this.parser.constructs.flow,r,e.attempt(e1,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},e6={resolveAll:e9()},e5=e8("string"),e3=e8("text");function e8(e){return{resolveAll:e9("text"===e?e7:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,o,l);return o;function o(e){return s(e)?i(e):l(e)}function l(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function e9(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function e7(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],o=t.sliceStream(i),l=o.length,a=-1,s=0;for(;l--;){let e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let o={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...o.start},i.start.offset===i.end.offset?Object.assign(i,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function te(e){return null===e||e_(e)||eq(e)?1:eU(e)?2:void 0}function tt(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}let tn={name:"attention",resolveAll:function(e,t){let n,r,i,o,l,a,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[c][1].start};tr(d,-a),tr(f,a),o={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[n][1].end={...o.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eF(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eF(s,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),s=eF(s,tt(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=eF(s,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=eF(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eE(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=te(i);return function(l){return n=l,e.enter("attentionSequence"),function l(a){if(a===n)return e.consume(a),l;let s=e.exit("attentionSequence"),u=te(a),c=!u||2===u&&o||r.includes(a),d=!o||2===o&&u||r.includes(i);return s._open=!!(42===n?c:c&&(o||!d)),s._close=!!(42===n?d:d&&(u||!c)),t(a)}(l)}}};function tr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let ti={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eH(t)?eX(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(ti,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return eH(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},to={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return e$(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tl=document.createElement("i");function ta(e){let t="&"+e+";";tl.innerHTML=t;let n=tl.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let ts={name:"characterReference",tokenize:function(e,t,n){let r,i,o=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=eP,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=eW,u):(e.enter("characterReferenceValue"),r=7,i=eB,u(t))}function u(a){if(59===a&&l){let r=e.exit("characterReferenceValue");return i!==eP||ta(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<r?(e.consume(a),u):n(a)}}},tu={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tc={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l};function l(t){return e.enter("codeFencedFence"),eH(t)?eX(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o>=a?(e.exit("codeFencedFenceSequence"),eH(i)?eX(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||eN(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},l=0,a=0;return function(t){var o;let u;return o=t,l=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=o,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),eH(i)?eX(e,s,"whitespace")(i):s(i))}(o)};function s(o){return null===o||eN(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(tu,c,h)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eN(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):eH(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eX(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(o))}function u(t){return null===t||eN(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eN(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(o,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return l>0&&eH(t)?eX(e,p,"linePrefix",l+1)(t):p(t)}function p(t){return null===t||eN(t)?e.check(tu,c,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eN(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},td={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eX(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?o(n):eN(n)?e.attempt(tf,t,o)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eN(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function o(n){return e.exit("codeIndented"),t(n)}}},tf={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eN(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eX(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):eN(e)?i(e):n(e)}}};function tp(e,t,n,r,i,o,l,a,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||eO(t)?n(t):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||eN(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(i){return!c&&(null===i||41===i||e_(i))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,h):41===i?(e.consume(i),c--,h):null===i||32===i||40===i||eO(i)?n(i):(e.consume(i),92===i?g:h)}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function th(e,t,n,r,i,o){let l,a=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(d){return s>999||null===d||91===d||93===d&&!l||94===d&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):eN(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||eN(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),l||(l=!eH(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function tg(e,t,n,r,i,o){let l;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),l=40===t?41:t,a):n(t)};function a(n){return n===l?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),s(n))}function s(t){return t===l?(e.exit(o),a(l)):null===t?n(t):eN(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eX(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===l||null===t||eN(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===l||92===t?(e.consume(t),u):u(t)}}function tm(e,t){let n;return function r(i){return eN(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):eH(i)?eX(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function tx(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let ty={partial:!0,tokenize:function(e,t,n){return function(t){return e_(t)?tm(e,r)(t):n(t)};function r(t){return tg(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return eH(t)?eX(e,o,"whitespace")(t):o(t)}function o(e){return null===e||eN(e)?t(e):n(e)}}},tv=["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"],tb=["pre","script","style","textarea"],tk={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eK,t,n)}}},tw={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eN(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tj={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eE(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=l);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return o=eF(o=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+a+3)),o=eF(o,[["enter",c,t]]),o=eF(o,tt(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),o=eF(o,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),o=eF(o,e.slice(i+1)),o=eF(o,[["exit",s,t]]),eE(e,r,e.length,o),e},tokenize:function(e,t,n){let r,i,o=this,l=o.events.length;for(;l--;)if(("labelImage"===o.events[l][1].type||"labelLink"===o.events[l][1].type)&&!o.events[l][1]._balanced){r=o.events[l][1];break}return function(t){return r?r._inactive?c(t):(i=o.parser.defined.includes(tx(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(tS,u,i?u:c)(t):91===t?e.attempt(tM,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(tC,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},tS={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return e_(t)?tm(e,i)(t):i(t)}function i(t){return 41===t?u(t):tp(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return e_(t)?tm(e,a)(t):u(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?tg(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return e_(t)?tm(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tM={tokenize:function(e,t,n){let r=this;return function(t){return th.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(tx(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},tC={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tT={name:"labelStartImage",resolveAll:tj.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tz={name:"labelStartLink",resolveAll:tj.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tI={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eX(e,t,"linePrefix")}}},tE={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(o){var l;return e.enter("thematicBreak"),r=l=o,function o(l){return l===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),eH(n)?eX(e,o,"whitespace")(n):o(n))}(l)):i>=3&&(null===l||eN(l))?(e.exit("thematicBreak"),t(l)):n(l)}(l)}}},tF={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eK,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eX(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eH(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tA,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,eX(e,e.attempt(tF,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,l=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eB(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(tE,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eB(i)&&++l<10?(e.consume(i),t):(!r.interrupt||l<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eK,r.interrupt?n:s,e.attempt(tL,c,u))}function s(e){return r.containerState.initialBlankLine=!0,o++,c(e)}function u(t){return eH(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tL={partial:!0,tokenize:function(e,t,n){let r=this;return eX(e,function(e){let i=r.events[r.events.length-1];return!eH(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tA={partial:!0,tokenize:function(e,t,n){let r=this;return eX(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tR={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);let l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",l,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var l;let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,l=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eH(n)?eX(e,o,"lineSuffix")(n):o(n))}(l)):n(t)};function o(r){return null===r||eN(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,th.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function o(t){return(r=tx(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return e_(t)?tm(e,a)(t):a(t)}function a(t){return tp(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(ty,u,u)(t)}function u(t){return eH(t)?eX(e,c,"whitespace")(t):c(t)}function c(o){return null===o||eN(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}}},"disable",0,{null:[]},"document",0,{42:tF,43:tF,45:tF,48:tF,49:tF,50:tF,51:tF,52:tF,53:tF,54:tF,55:tF,56:tF,57:tF,62:ti},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},eE(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var o;return e.enter("atxHeading"),o=i,e.enter("atxHeadingSequence"),function i(o){return 35===o&&r++<6?(e.consume(o),i):null===o||e_(o)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eN(r)?(e.exit("atxHeading"),t(r)):eH(r)?eX(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||e_(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(o)):n(o)}(o)}}},42:tE,45:[tR,tE],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,o,l,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(l){return 33===l?(e.consume(l),c):47===l?(e.consume(l),i=!0,p):63===l?(e.consume(l),r=3,s.interrupt?t:L):eR(l)?(e.consume(l),o=String.fromCharCode(l),h):n(l)}function c(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,l=0,f):eR(i)?(e.consume(i),r=4,s.interrupt?t:L):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:L):n(r)}function f(r){let i="CDATA[";return r===i.charCodeAt(l++)?(e.consume(r),l===i.length)?s.interrupt?t:S:f:n(r)}function p(t){return eR(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||e_(l)){let a=47===l,u=o.toLowerCase();return!a&&!i&&tb.includes(u)?(r=1,s.interrupt?t(l):S(l)):tv.includes(o.toLowerCase())?(r=6,a)?(e.consume(l),g):s.interrupt?t(l):S(l):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(l):i?function t(n){return eH(n)?(e.consume(n),t):w(n)}(l):m(l))}return 45===l||eP(l)?(e.consume(l),o+=String.fromCharCode(l),h):n(l)}function g(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function m(t){return 47===t?(e.consume(t),w):58===t||95===t||eR(t)?(e.consume(t),x):eH(t)?(e.consume(t),m):w(t)}function x(t){return 45===t||46===t||58===t||95===t||eP(t)?(e.consume(t),x):y(t)}function y(t){return 61===t?(e.consume(t),v):eH(t)?(e.consume(t),y):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,b):eH(t)?(e.consume(t),v):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||e_(n)?y(n):(e.consume(n),t)}(t)}function b(t){return t===a?(e.consume(t),a=null,k):null===t||eN(t)?n(t):(e.consume(t),b)}function k(e){return 47===e||62===e||eH(e)?m(e):n(e)}function w(t){return 62===t?(e.consume(t),j):n(t)}function j(t){return null===t||eN(t)?S(t):eH(t)?(e.consume(t),j):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),z):60===t&&1===r?(e.consume(t),I):62===t&&4===r?(e.consume(t),A):63===t&&3===r?(e.consume(t),L):93===t&&5===r?(e.consume(t),F):eN(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(tk,R,M)(t)):null===t||eN(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),S)}function M(t){return e.check(tw,C,R)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return null===t||eN(t)?M(t):(e.enter("htmlFlowData"),S(t))}function z(t){return 45===t?(e.consume(t),L):S(t)}function I(t){return 47===t?(e.consume(t),o="",E):S(t)}function E(t){if(62===t){let n=o.toLowerCase();return tb.includes(n)?(e.consume(t),A):S(t)}return eR(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),E):S(t)}function F(t){return 93===t?(e.consume(t),L):S(t)}function L(t){return 62===t?(e.consume(t),A):45===t&&2===r?(e.consume(t),L):S(t)}function A(t){return null===t||eN(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),A)}function R(n){return e.exit("htmlFlow"),t(n)}}},61:tR,95:tE,96:tc,126:tc},"flowInitial",0,{[-2]:td,[-1]:td,32:td},"insideSpan",0,{null:[tn,e6]},"string",0,{38:ts,92:to},"text",0,{[-5]:tI,[-4]:tI,[-3]:tI,33:tT,38:ts,42:tn,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return eR(t)?(e.consume(t),o):64===t?n(t):a(t)}function o(t){return 43===t||45===t||46===t||eP(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,l):(43===n||45===n||46===n||eP(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||eO(r)?n(r):(e.consume(r),l)}function a(t){return 64===t?(e.consume(t),s):eD(t)?(e.consume(t),a):n(t)}function s(i){return eP(i)?function i(o){return 46===o?(e.consume(o),r=0,s):62===o?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(o){if((45===o||eP(o))&&r++<63){let n=45===o?t:i;return e.consume(o),n}return n(o)}(o)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,o,l=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),y):eR(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):eR(t)?(e.consume(t),x):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):eN(t)?(o=c,E(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?I(e):45===e?d(e):c(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),g):eN(t)?(o=h,E(t)):(e.consume(t),h)}function g(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?I(t):93===t?(e.consume(t),m):h(t)}function x(t){return null===t||62===t?I(t):eN(t)?(o=x,E(t)):(e.consume(t),x)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):eN(t)?(o=y,E(t)):(e.consume(t),y)}function v(e){return 62===e?I(e):y(e)}function b(t){return eR(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||eP(t)?(e.consume(t),k):function t(n){return eN(n)?(o=t,E(n)):eH(n)?(e.consume(n),t):I(n)}(t)}function w(t){return 45===t||eP(t)?(e.consume(t),w):47===t||62===t||e_(t)?j(t):n(t)}function j(t){return 47===t?(e.consume(t),I):58===t||95===t||eR(t)?(e.consume(t),S):eN(t)?(o=j,E(t)):eH(t)?(e.consume(t),j):I(t)}function S(t){return 45===t||46===t||58===t||95===t||eP(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),M):eN(n)?(o=t,E(n)):eH(n)?(e.consume(n),t):j(n)}(t)}function M(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,C):eN(t)?(o=M,E(t)):eH(t)?(e.consume(t),M):(e.consume(t),T)}function C(t){return t===r?(e.consume(t),r=void 0,z):null===t?n(t):eN(t)?(o=C,E(t)):(e.consume(t),C)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||e_(t)?j(t):(e.consume(t),T)}function z(e){return 47===e||62===e||e_(e)?j(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function E(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),F}function F(t){return eH(t)?eX(e,L,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),o(t)}}}],91:tz,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eN(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},to],93:tj,95:tn,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),o++,t):(e.exit("codeTextSequence"),l(n))}(t)};function l(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),l):96===s?(i=e.enter("codeTextSequence"),r=0,function n(l){return 96===l?(e.consume(l),r++,n):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(l)):(i.type="codeTextData",a(l))}(s)):eN(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eN(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),a)}}}}],4127);var tP=e.i(4127);let tD=/[\0\t\n\r]/g;function tO(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tW(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tO(n.slice(t?2:1),t?16:10)}return ta(n)||e}let t$={}.hasOwnProperty;function tN(e){return{line:e.line,column:e.column,offset:e.offset}}function t_(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function tH(e){let t=this;t.parser=function(n){var r,i;let o,l,a,s;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(m,i),htmlFlowData:u,htmlText:r(m,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tO(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=ta(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=tN(e.end)},codeFenced:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.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 e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:l(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tx(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(d),hardBreakTrailing:l(d),htmlFlow:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tB,tW),n.identifier=tx(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tN(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),c.call(this,e))},link:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tx(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(t$.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},l={stack:[r],tokenStack:[],config:t,enter:o,exit:a,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,o,l,a=t-1,s=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||l||s||o||(o=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(i=void 0;l--;){let t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=l}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,o=void 0,l=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];t$.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},l),e[c][1])}if(l.tokenStack.length>0){let e=l.tokenStack[l.tokenStack.length-1];(e[1]||t_).call(l,void 0,e[0])}for(r.position={start:tN(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tN(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tN(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||t_).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): it’s not open");n.position.end=tN(e.end)}function s(){return eT(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tN(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tN(e.end)}function d(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function m(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!e0(e););return e}((function(e){let t={constructs:eA([tP,...(e||{}).extensions||[]]),content:n(eG),defined:[],document:n(eY),flow:n(e4),lazy:{},string:n(e5),text:n(e3)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],l=[],a=[],s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){eN(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:h(p,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,m()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let o,l=e[r];if("string"==typeof l)o=l;else switch(l){case -5:o="\r";break;case -4:o="\n";break;case -3:o="\r\n";break;case -2:o=t?" ":" ";break;case -1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(l)}n=-2===l,i.push(o)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(l=eF(l,e),function(){let e;for(;r._index<l.length;){let n=l[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==l[l.length-1])?[]:(g(t,0),u.events=tt(o,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,l)];else{if(n=e.slice(r,o),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}l>0&&n.push(e[o].slice(0,l))}return n}(l,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function p(e,t){t.restore()}function h(e,t){return function(n,i,o){var l;let c,d,p,h;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):(l=n,function(e){let t=null!==e&&l[e],n=null!==e&&l.null;return g([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function g(e){return(c=e,d=0,0===e.length)?o:x(e[d])}function x(e){return function(n){let i,o,l,c,d;return(i=f(),o=u.previous,l=u.currentConstruct,c=u.events.length,d=Array.from(a),h={from:c,restore:function(){r=i,u.previous=o,u.currentConstruct=l,u.events.length=c,a=d,m()}},p=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,y,v)(n)}}function y(t){return e(p,h),i}function v(e){return(h.restore(),++d<c.length)?x(c[d]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&eE(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function m(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((l=1,a="",s=!0,function(e,t,n){let r,i,u,c,d,f=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,a="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(tD.lastIndex=u,c=(r=tD.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(c),!r){a=e.slice(u);break}if(10===d&&u===c&&o)f.push(-3),o=void 0;else switch(o&&(f.push(-5),o=void 0),u<c&&(f.push(e.slice(u,c)),l+=c-u),d){case 0:f.push(65533),l++;break;case 9:for(i=4*Math.ceil(l/4),f.push(-2);l++<i;)f.push(-1);break;case 10:f.push(-4),l=1;break;default:o=!0,l=1}u=c+1}return n&&(o&&f.push(-5),a&&f.push(a),f.push(null)),f})(n,r,!0))))}}let tU="object"==typeof self?self:globalThis,tq=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[o,l]=e[i];switch(o){case 0:case -1:return n(l,i);case 1:{let e=n([],i);for(let t of l)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),i);case 4:{let{source:e,flags:t}=l;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of l)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of l)e.add(r(t));return e}case 7:{let{name:e,message:t}=l;return n(new tU[e](t),i)}case 8:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{let{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new tU[o](l),i)})(0)},{toString:tV}={},{keys:tX}=Object,tG=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tV.call(e).slice(8,-1);switch(n){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,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tY=([e,t])=>0===e&&("function"===t||"symbol"===t),tJ=(e,{json:t,lossy:n}={})=>{var r,i,o;let l,a,s=[];return(r=!(t||n),i=!!t,o=new Map,l=(e,t)=>{let n=s.push(e)-1;return o.set(t,n),n},a=e=>{if(o.has(e))return o.get(e);let[t,n]=tG(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return l([-1],e)}return l([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),l([n,[...t]],e)}let r=[],i=l([t,r],e);for(let t of e)r.push(a(t));return i}case 2:{if(n)switch(n){case"BigInt":return l([n,e.toString()],e);case"Boolean":case"Number":case"String":return l([n,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let o=[],s=l([t,o],e);for(let t of tX(e))(r||!tY(tG(e[t])))&&o.push([a(t),a(e[t])]);return s}case 3:return l([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return l([t,{source:n,flags:r}],e)}case 5:{let n=[],i=l([t,n],e);for(let[t,i]of e)(r||!(tY(tG(t))||tY(tG(i))))&&n.push([a(t),a(i)]);return i}case 6:{let n=[],i=l([t,n],e);for(let t of e)(r||!tY(tG(t)))&&n.push(a(t));return i}}let{message:s}=e;return l([t,{name:n,message:s}],e)})(e),s},tK="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tq(tJ(e,t)):structuredClone(e):(e,t)=>tq(tJ(e,t));function tQ(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),l="";if(37===o&&eP(e.charCodeAt(n+1))&&eP(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(l=String.fromCharCode(o,t),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function tZ(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function t0(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let t1=function(e){var t,n;if(null==e)return t4;if("function"==typeof e)return t2(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=t1(e[n]);return t2(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t2(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t2(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t2(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function t4(){return!0}let t6=[];function t5(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let o=t1(i),l=r?-1:1;(function e(i,a,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,d,f,p=t6;if((!t||o(i,a,s[s.length-1]||void 0))&&!1===(p=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?t6:[u])[0])return p;if("children"in i&&i.children&&i.children&&"skip"!==p[0])for(d=(r?i.children.length:-1)+l,f=s.concat(i);d>-1&&d<i.children.length;){if(!1===(c=e(i.children[d],d,f)())[0])return c;d="number"==typeof c[1]?c[1]:d+l}return p}})(e,void 0,[])()}function t3(e,t,n,r){let i,o,l;"function"==typeof t&&"function"!=typeof n?(o=void 0,l=t,i=n):(o=t,l=n,i=r),t5(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},i)}function t8(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});let l=i[i.length-1];return l&&"text"===l.type?l.value+=r:i.push({type:"text",value:r}),i}function t9(e){let t=e.spread;return null==t?e.children.length>1:t}function t7(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let ne={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o={type:"element",tagName:"pre",properties:{},children:[o=e.applyData(t,o)]},e.patch(t,o),o},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=tQ(i.toLowerCase()),l=e.footnoteOrder.indexOf(i),a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=l+1,a+=1,e.footnoteCounts.set(i,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);let i={src:tQ(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){let n={src:tQ(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);let i={href:tQ(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){let n={href:tQ(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=t9(n[r])}return t}(n):t9(t),o={},l=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?l.push(e):l.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=eo(t.children[1]),l=ei(t.children[t.children.length-1]);o&&l&&(r.position={start:o,end:l}),i.push(r)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,l=o?o.length:t.children.length,a=-1,s=[];for(;++a<l;){let n=t.children[a],r={},l=o?o[a]:void 0;l&&(r.align=l);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];for(;r;)o.push(t7(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(t7(t.slice(i),i>0,!1)),o.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:nt,yaml:nt,definition:nt,footnoteDefinition:nt};function nt(){}let nn={}.hasOwnProperty,nr={};function ni(e,t){e.position&&(t.position=function(e){let t=eo(e),n=ei(e);if(t&&n)return{start:t,end:n}}(e))}function no(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,tK(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nl(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function na(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ns(e,t){let n,r,i,o,l=(n=t||nr,r=new Map,i=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=na(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=na(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:no,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ne,...n.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(nn.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tK(n);return r.children=o.all(e),r}return tK(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(nn.call(n,"hProperties")||nn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:n,patch:ni,wrap:nl},t3(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),a=l.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tZ,r=e.options.footnoteBackLabel||t0,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let o=e.all(i),l=String(i.identifier).toUpperCase(),u=tQ(l.toLowerCase()),c=0,d=[],f=e.footnoteCounts.get(l);for(;void 0!==f&&++c<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(o,!0)};e.patch(i,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...tK(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(l),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&(m("children"in u),u.children.push({type:"text",value:"\n"},s)),u}function nu(e,t){return e&&"run"in e?async function(n,r){let i=ns(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ns(n,{file:r,...e||t})}}function nc(e){if(e)throw e}var nd=e.i(4100);function nf(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let np=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nx(e);let r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let l=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else l<0&&(n=!0,l=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(i=o):(a=-1,i=l));return r===i?i=l:i<0&&(i=e.length),e.slice(r,i)},nh=function(e){let t;if(nx(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},ng=function(e){let t;nx(e);let n=e.length,r=-1,i=0,o=-1,l=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==l&&(l=1):o>-1&&(l=-1)}return o<0||r<0||0===l||1===l&&o===r-1&&o===i+1?"":e.slice(o,r)},nm=function(...e){var t;let n,r,i,o=-1;for(;++o<e.length;)nx(e[o]),e[o]&&(i=void 0===i?e[o]:i+"/"+e[o]);return void 0===i?".":(nx(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",o=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(l===s-1||1===a);else if(l!==s-1&&2===a){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),l=s,a=0;continue}}else if(i.length>0){i="",o=0,l=s,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(l+1,s):i=e.slice(l+1,s),o=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nx(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function ny(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let nv=["history","path","basename","stem","extname","dirname"];class nb{constructor(e){let t,n;t=e?ny(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nv.length;){const e=nv[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)nv.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?np(this.path):void 0}set basename(e){nw(e,"basename"),nk(e,"basename"),this.path=nm(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?nh(this.path):void 0}set dirname(e){nj(this.basename,"dirname"),this.path=nm(e||"",this.basename)}get extname(){return"string"==typeof this.path?ng(this.path):void 0}set extname(e){if(nk(e,"extname"),nj(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nm(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ny(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!ny(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),nw(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?np(this.path,this.extname):void 0}set stem(e){nw(e,"stem"),nk(e,"stem"),this.path=nm(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ed(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nk(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function nw(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nj(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nS=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nM={}.hasOwnProperty;class nC extends nS{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 e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(o,...l){let a=e[++n],s=-1;if(o)return void r(o);for(;++s<t.length;)(null===l[s]||void 0===l[s])&&(l[s]=t[s]);t=l,a?(function(e,t){let n;return function(...t){let o,l=e.length>t.length;l&&t.push(r);try{o=e.apply(this,t)}catch(e){if(l&&n)throw e;return r(e)}l||(o&&o.then&&"function"==typeof o.then?o.then(i,r):o instanceof Error?r(o):i(o))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...l):r(null,...l)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new nC,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,nd.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(nE("data",this.frozen),this.namespace[e]=t,this):nM.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nE("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nA(e),n=this.parser||this.Parser;return nz("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nz("process",this.parser||this.Parser),nI("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let o=nA(e),l=n.parse(o);function a(e,n){e||!n?i(e):r?r(n):(m(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(l,o,function(e,t,r){var i,o;if(e||!t||!r)return a(e);let l=n.stringify(t,r);"string"==typeof(i=l)||(o=i)&&"object"==typeof o&&"byteLength"in o&&"byteOffset"in o?r.value=l:r.result=l,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nz("processSync",this.parser||this.Parser),nI("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,nc(e),t=r}),nL("processSync","process",n),m(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nF(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){m("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let l=nA(t);r.run(e,l,function(t,r,l){let a=r||e;t?o(t):i?i(a):(m(n,"`done` is defined if `resolve` is not"),n(void 0,a,l))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){nc(e),n=t,r=!0}),nL("runSync","run",r),m(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=nA(t),r=this.compiler||this.Compiler;return nI("stringify",r),nF(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nE("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else if("object"==typeof e)Array.isArray(e)?o(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))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");o(e.plugins),e.settings&&(r.settings=(0,nd.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)l(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;l(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,l=n[i][1];nf(l)&&nf(r)&&(r=(0,nd.default)(!0,l,r)),n[i]=[e,r,...o]}}}}let nT=new nC().freeze();function nz(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nI(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function nE(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nF(e){if(!nf(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nL(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nA(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new nb(e)}let nR=[],nP={allowDangerousHtml:!0},nD=/^(https?|ircs?|mailto|xmpp)$/i,nO=[{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 nB(e){var n;let r,i,o,l,a,s=(r=(n=e).rehypePlugins||nR,i=n.remarkPlugins||nR,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...nP}:nP,nT().use(tH).use(i).use(nu,o).use(r)),u=(l=e.children||"",a=new nb,"string"==typeof l?a.value=l:x("Unexpected value `"+l+"` for `children` prop, expected `string`"),a);return function(e,n){let r=n.allowedElements,i=n.allowElement,o=n.components,l=n.disallowedElements,a=n.skipHtml,s=n.unwrapDisallowed,u=n.urlTransform||nW;for(let e of nO)Object.hasOwn(n,e.from)&&x("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&l&&x("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),t3(e,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return a?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in eM)if(Object.hasOwn(eM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eM[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&i&&"number"==typeof t&&(o=!i(e,t,n)),o&&n&&"number"==typeof t)return s&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){var n,r,i,o;let l;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,l=function(e,t,i,o){let l=Array.isArray(i.children),a=eo(e);return r(t,i,o,l,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,o=t.jsxs,l=function(e,t,n,r){let l=Array.isArray(n.children)?o:i;return r?l(t,n,r):l(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?en:et,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=ey(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:t.Fragment,components:o,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0})}(s.runSync(s.parse(u),u),e)}function nW(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||nD.test(e.slice(0,t))?e:""}function n$(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let nN="phrasing",n_=["autolink","link","image","label"];function nH(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nU(e){this.config.enter.autolinkProtocol.call(this,e)}function nq(e){this.config.exit.autolinkProtocol.call(this,e)}function nV(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];m("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function nX(e){this.config.exit.autolinkEmail.call(this,e)}function nG(e){this.exit(e)}function nY(e){!function(e,t,n){let r=t1((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),o=-1;for(;++o<i.length;)t5(e,"text",l);function l(e,t){let n,l=-1;for(;++l<t.length;){let e=t[l],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[o][0],l=i[o][1],a=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},o=l(...d,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(o)?c.push(...o):o&&c.push(o),a=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nJ],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nK]],{ignore:["link","linkReference"]})}function nJ(e,t,n,r,i){let o,l="";if(!nQ(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",l="http://"),(o=n.split(".")).length<2||o[o.length-1]&&(/_/.test(o[o.length-1])||!/[a-zA-Z\d]/.test(o[o.length-1]))||o[o.length-2]&&(/_/.test(o[o.length-2])||!/[a-zA-Z\d]/.test(o[o.length-2])))return!1;let a=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=n$(e,"("),o=n$(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function nK(e,t,n,r){return!(!nQ(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nQ(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||eq(n)||eU(n))&&(!t||47!==n)}function nZ(){this.buffer()}function n0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n1(){this.buffer()}function n2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function n4(e){let t=this.resume(),n=this.stack[this.stack.length-1];m("footnoteReference"===n.type),n.identifier=tx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n6(e){this.exit(e)}function n5(e){let t=this.resume(),n=this.stack[this.stack.length-1];m("footnoteDefinition"===n.type),n.identifier=tx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n3(e){this.exit(e)}function n8(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]")}function n9(e,t,n){return 0===t?e:n7(e,t,n)}function n7(e,t,n){return(n?"":" ")+e}n8.peek=function(){return"["};let re=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function rt(e){this.enter({type:"delete",children:[]},e)}function rn(e){this.exit(e)}function rr(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function ri(e){return e.length}function ro(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}rr.peek=function(){return"~"};function rl(e,t,n){let r=e.value||"",i="`",o=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let e,t=n.unsafe[o],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}rl.peek=function(){return"`"};t1(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let ra=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),o=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let l=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));let a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(l))+e:(n?o:o+" ".repeat(l-o.length))+e});return s(),u};function rs(e){let t=e._align;m(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ru(e){this.exit(e),this.data.inTable=void 0}function rc(e){this.enter({type:"tableRow",children:[]},e)}function rd(e){this.exit(e)}function rf(e){this.enter({type:"tableCell",children:[]},e)}function rp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rh));let n=this.stack[this.stack.length-1];m("inlineCode"===n.type),n.value=t,this.exit(e)}function rh(e,t){return"|"===t?t:e}function rg(e){let t=this.stack[this.stack.length-2];m("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function rm(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];m("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,o=-1;for(;++o<i.length;){let e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rx(e,t,n,r){let i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=ra(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}let ry={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},rv={tokenize:function(e,t,n){let r,i,o;return l;function l(t){return 46===t||95===t?e.check(rk,s,a)(t):null===t||e_(t)||eq(t)||45!==t&&eU(t)?s(t):(o=!0,e.consume(t),l)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),l}function s(e){return i||r||!o?n(e):t(e)}},partial:!0},rb={tokenize:function(e,t){let n=0,r=0;return i;function i(l){return 40===l?(n++,e.consume(l),i):41===l&&r<n?o(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?e.check(rk,t,o)(l):null===l||e_(l)||eq(l)?t(l):(e.consume(l),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},rk={tokenize:function(e,t,n){return r;function r(l){return 33===l||34===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||63===l||95===l||126===l?(e.consume(l),r):38===l?(e.consume(l),o):93===l?(e.consume(l),i):60===l||null===l||e_(l)||eq(l)?t(l):n(l)}function i(e){return null===e||40===e||91===e||e_(e)||eq(e)?t(e):r(e)}function o(t){return eR(t)?function t(i){return 59===i?(e.consume(i),r):eR(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},rw={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return eP(e)?n(e):t(e)}},partial:!0},rj={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!rz.call(r,r.previous)||rL(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ry,e.attempt(rv,e.attempt(rb,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rz},rS={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",o=!1;return function(t){return(72===t||104===t)&&rI.call(r,r.previous)&&!rL(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),l):n(t)};function l(t){if(eR(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),l;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),o)?s:(o=!0,a):n(t)}function s(t){return null===t||eO(t)||e_(t)||eq(t)||eU(t)?n(t):e.attempt(rv,e.attempt(rb,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:rI},rM={name:"emailAutolink",tokenize:function(e,t,n){let r,i,o=this;return function(t){return!rF(t)||!rE.call(o,o.previous)||rL(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return rF(r)?(e.consume(r),t):64===r?(e.consume(r),l):n(r)}(t))};function l(t){return 46===t?e.check(rw,s,a)(t):45===t||95===t||eP(t)?(i=!0,e.consume(t),l):s(t)}function a(t){return e.consume(t),r=!0,l}function s(l){return i&&r&&eR(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(l)):n(l)}},previous:rE},rC={},rT=48;for(;rT<123;)rC[rT]=rM,58==++rT?rT=65:91===rT&&(rT=97);function rz(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||e_(e)}function rI(e){return!eR(e)}function rE(e){return!(47===e||rF(e))}function rF(e){return 43===e||45===e||46===e||95===e||eP(e)}function rL(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}rC[43]=rM,rC[45]=rM,rC[46]=rM,rC[95]=rM,rC[72]=[rM,rS],rC[104]=[rM,rS],rC[87]=[rM,rj],rC[119]=[rM,rj];let rA={tokenize:function(e,t,n){let r=this;return eX(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rR(e,t,n){let r,i=this,o=i.events.length,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;o--;){let e=i.events[o][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!r||!r._balanced)return n(o);let a=tx(i.sliceSerialize({start:r.end,end:i.now()}));return 94===a.codePointAt(0)&&l.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function rP(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function rD(e,t,n){let r,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(l>999||93===a&&!r||null===a||91===a||e_(a))return n(a);if(93===a){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return o.includes(tx(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return e_(a)||(r=!0),l++,e.consume(a),92===a?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}}function rO(e,t,n){let r,i,o=this,l=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(a>999||93===t&&!i||null===t||91===t||e_(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=tx(o.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return e_(t)||(i=!0),a++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l.includes(r)||l.push(r),eX(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function rB(e,t,n){return e.check(eK,t,e.attempt(rA,t,n))}function rW(e){e.exit("gfmFootnoteDefinition")}class r${constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function rN(e,t,n){let r,i=this,o=0,l=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?y:a;return o===y&&i.parser.lazy[i.now().line]?n(e):o(e)};function a(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,l+=1),s(n)}function s(t){return null===t?n(t):eN(t)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):eH(t)?eX(e,s,"whitespace")(t):(l+=1,r&&(r=!1,o+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||e_(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,eH(t))?eX(e,f,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}function f(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return eH(t)?eX(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(l+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(l+=1,g(t)):null===t||eN(t)?x(t):n(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(n))}(t)):n(t)}function m(t){return eH(t)?eX(e,x,"whitespace")(t):x(t)}function x(i){if(124===i)return f(i);if(null===i||eN(i))return r&&o===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function y(t){return e.enter("tableRow"),v(t)}function v(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),v):null===n||eN(n)?(e.exit("tableRow"),t(n)):eH(n)?eX(e,v,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||e_(t)?(e.exit("data"),v(t)):(e.consume(t),92===t?k:b)}function k(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function r_(e,t){let n,r,i,o=-1,l=!0,a=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f=new r$;for(;++o<e.length;){let p=e[o],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(rU(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(l=!0,i=void 0,s=[0,0,0,0],u=[0,o+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(o,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(l=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=rH(f,t,s,a,void 0,i),s=[0,0,0,0]),u[2]=o)):"tableCellDivider"===h.type&&(l?l=!1:(0!==s[1]&&(u[0]=u[1],i=rH(f,t,s,a,void 0,i)),u=[(s=u)[1],o,0,0])):"tableHead"===h.type?(c=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==s[1]?(u[0]=u[1],i=rH(f,t,s,a,o,i)):0!==u[1]&&(i=rH(f,t,u,a,o,i)),a=0):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=o)}for(0!==d&&rU(f,t,d,n,r),f.consume(t.events),o=-1;++o<t.events.length;){let e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,o))}return e}function rH(e,t,n,r,i,o){0!==n[0]&&(o.end=Object.assign({},rq(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let l=rq(t.events,n[1]);if(o={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){let i=rq(t.events,n[2]),o=rq(t.events,n[3]),l={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==i&&(o.end=Object.assign({},rq(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function rU(e,t,n,r,i){let o=[],l=rq(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function rq(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let rV={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return e_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return eN(r)?t(r):eH(r)?e.check({tokenize:rX},t,n)(r):n(r)}}};function rX(e,t,n){return eX(e,function(e){return null===e?n(e):t(e)},"whitespace")}let rG={};function rY(e){let t,n,r,i=e||rG,o=this.data(),l=o.micromarkExtensions||(o.micromarkExtensions=[]),a=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),s=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);l.push(eA([{text:rC},{document:{91:{name:"gfmFootnoteDefinition",tokenize:rO,continuation:{tokenize:rB},exit:rW}},text:{91:{name:"gfmFootnoteCall",tokenize:rD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rR,resolveTo:rP}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,o=this.events,l=0;return function(a){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(a):(e.enter("strikethroughSequenceTemporary"),function o(a){let s=te(i);if(126===a)return l>1?r(a):(e.consume(a),l++,o);if(l<2&&!t)return r(a);let u=e.exit("strikethroughSequenceTemporary"),c=te(a);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(a)}(a))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&eE(l,l.length,0,tt(a,e.slice(r+1,n),t)),eE(l,l.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eE(e,r-1,n-r+3,l),n=r+l.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:rN,resolveAll:r_}}},{text:{91:rV}}])),a.push([{transforms:[nY],enter:{literalAutolink:nH,literalAutolinkEmail:nU,literalAutolinkHttp:nU,literalAutolinkWww:nU},exit:{literalAutolink:nG,literalAutolinkEmail:nX,literalAutolinkHttp:nq,literalAutolinkWww:nV}},{enter:{gfmFootnoteCallString:nZ,gfmFootnoteCall:n0,gfmFootnoteDefinitionLabelString:n1,gfmFootnoteDefinition:n2},exit:{gfmFootnoteCallString:n4,gfmFootnoteCall:n6,gfmFootnoteDefinitionLabelString:n5,gfmFootnoteDefinition:n3}},{canContainEols:["delete"],enter:{strikethrough:rt},exit:{strikethrough:rn}},{enter:{table:rs,tableData:rf,tableHeader:rf,tableRow:rc},exit:{codeText:rp,table:ru,tableData:rd,tableHeader:rd,tableRow:rd}},{exit:{taskListCheckValueChecked:rg,taskListCheckValueUnchecked:rg,paragraph:rm}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nN,notInConstruct:n_},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nN,notInConstruct:n_},{character:":",before:"[ps]",after:"\\/",inConstruct:nN,notInConstruct:n_}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let o=n.createTracker(i),l=o.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]"})),s(),l+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),l+=o.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,o.current()),r?n7:n9))),a(),l},footnoteReference:n8},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:re}],handlers:{delete:rr}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";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(e,t,n){let r=rl(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){let r=e.children,i=-1,o=[],l=t.enter("table");for(;++i<r.length;)o[i]=s(r[i],t,n);return l(),o}(e,n,r),e.align)},tableCell:l,tableRow:function(e,t,n,r){let i=a([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function l(e,t,n,r){let i=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:o,after:o});return l(),i(),a}function a(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ri,o=[],l=[],a=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],o=-1;for(e[c].length>u&&(u=e[c].length);++o<e[c].length;){var d;let l=null==(d=e[c][o])?"":String(d);if(!1!==n.alignDelimiters){let e=i(l);r[o]=e,(void 0===s[o]||e>s[o])&&(s[o]=e)}t.push(l)}l[c]=t,a[c]=r}let f=-1;if("object"==typeof r&&"length"in r)for(;++f<u;)o[f]=ro(r[f]);else{let e=ro(r);for(;++f<u;)o[f]=e}f=-1;let p=[],h=[];for(;++f<u;){let e=o[f],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-r.length),l=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[f]&&(s[f]=i),h[f]=i),p[f]=l}l.splice(1,0,p),a.splice(1,0,h),c=-1;let g=[];for(;++c<l.length;){let e=l[c],t=a[c];f=-1;let r=[];for(;++f<u;){let i=e[f]||"",l="",a="";if(!1!==n.alignDelimiters){let e=s[f]-(t[f]||0),n=o[f];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):a=l=" ".repeat(e/2):a=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||f)&&r.push(" "),!1!==n.alignDelimiters&&r.push(l),r.push(i),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||f!==u-1)&&r.push("|")}g.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,o=[],a=t.enter("tableRow");for(;++i<r.length;)o[i]=l(r[i],e,t,n);return a(),o}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rx}}]})}function rJ(e){return"tool-group"===e.kind?e.events[0].index:e.event.index}let rK=/\[request interrupted|interrupted by user/i,rQ=/rate.?limit|overloaded_error|api error|Error sending message/i,rZ=/^Base directory for this skill:/,r0=/<command-name>(\/[^<\s]+)<\/command-name>(?:[\s\S]*?<command-args>([\s\S]*?)<\/command-args>)?/,r1=/<task-notification>/;function r2(e){for(let t of e)if(t?.type==="text")return t.text}var r4=e.i(98572),r6=e.i(56324),r5=e.i(52535);let r3=(0,i.default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),r8=(0,i.default)("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),r9=(0,i.default)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),r7=(0,i.default)("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),ie=(0,i.default)("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),it=(0,i.default)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),ir=(0,i.default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ii=[{label:"Identify errors",icon:(0,t.jsx)(r3,{size:13}),prompt:"Find all errors, exceptions, rate limits, or failed operations in this session. For each, explain what happened and what triggered it."},{label:"Analyze performance",icon:(0,t.jsx)(r8,{size:13}),prompt:"Analyze the performance of this session — tool execution frequency, token efficiency, cache hit ratio, and any bottlenecks. Include specific numbers."},{label:"Trace conversation flow",icon:(0,t.jsx)(ie,{size:13}),prompt:"Trace the conversation logic: what was the user trying to accomplish, what decisions did the agent make at each key point, and how did the approach evolve?"},{label:"Suggest improvements",icon:(0,t.jsx)(r9,{size:13}),prompt:"Based on this session, suggest concrete improvements to the prompting strategy, tool usage patterns, or workflow. Be specific about what to change and why."}];function io({onClick:e}){return(0,t.jsxs)("button",{type:"button",onClick:e,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",border:"1px solid var(--af-accent)",borderRadius:7,background:"var(--af-accent-subtle)",color:"var(--af-accent)",fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.12s"},onMouseEnter:e=>{e.currentTarget.style.background="var(--af-accent)",e.currentTarget.style.color="#fff"},onMouseLeave:e=>{e.currentTarget.style.background="var(--af-accent-subtle)",e.currentTarget.style.color="var(--af-accent)"},children:[(0,t.jsx)(r7,{size:13}),"Ask Claude"]})}function il({sessionId:e,onClose:n}){let[i,o]=(0,r.useState)([]),[l,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(""),c=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useCallback)(async t=>{if(l)return;let n={role:"user",text:t};o(e=>[...e,n]),u(""),a(!0);let r="";o(e=>[...e,{role:"assistant",text:""}]);let i=new AbortController;c.current=i;try{let n=await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,question:t}),signal:i.signal});if(!n.ok||!n.body){let e=await n.text();r=`Error: ${e}`,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",text:r},t}),a(!1);return}let l=n.body.getReader(),s=new TextDecoder,u="";for(;;){let{done:e,value:t}=await l.read();if(e)break;let n=(u+=s.decode(t,{stream:!0})).split("\n");for(let e of(u=n.pop(),n)){if(!e.startsWith("data: "))continue;let t=e.slice(6).trim();if(t)try{let e=JSON.parse(t);"delta"===e.type&&e.text?(r+=e.text,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",text:r},t}),requestAnimationFrame(()=>{d.current?.scrollTo({top:d.current.scrollHeight})})):"error"===e.type&&(r+=`
|
|
2
|
+
|
|
3
|
+
**Error:** ${e.message}`,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",text:r},t}))}catch{}}}}catch(e){"AbortError"!==e.name&&(r+=`
|
|
4
|
+
|
|
5
|
+
**Error:** ${e.message}`,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",text:r},t}))}finally{a(!1),c.current=null}},[e,l]);return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:10,background:"var(--af-surface)",flexShrink:0},children:[(0,t.jsx)(r7,{size:16,color:"var(--af-accent)"}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",flex:1},children:"Ask Claude"}),(0,t.jsx)("button",{onClick:n,style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-tertiary)",padding:4,borderRadius:4},children:(0,t.jsx)(g.X,{size:16})})]}),(0,t.jsxs)("div",{ref:d,style:{flex:1,overflowY:"auto",padding:"14px 20px",display:"flex",flexDirection:"column",gap:14},children:[0===i.length&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:13,color:"var(--af-text-secondary)",marginBottom:16,lineHeight:1.5},children:"Ask Claude to analyze this session. Pick a quick action or type your own question."}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:ii.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>f(e.prompt),disabled:l,style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",border:"1px solid var(--af-border-subtle)",borderRadius:8,background:"var(--af-surface-hover)",color:"var(--af-text)",fontSize:12.5,fontWeight:500,cursor:l?"wait":"pointer",textAlign:"left",transition:"all 0.12s",fontFamily:"inherit"},onMouseEnter:e=>{l||(e.currentTarget.style.borderColor="var(--af-accent)",e.currentTarget.style.background="var(--af-accent-subtle)")},onMouseLeave:e=>{e.currentTarget.style.borderColor="var(--af-border-subtle)",e.currentTarget.style.background="var(--af-surface-hover)"},children:[(0,t.jsx)("span",{style:{color:"var(--af-accent)",flexShrink:0},children:e.icon}),e.label]},e.label))})]}),i.map((e,n)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{style:{fontSize:12,color:"var(--af-text-secondary)",padding:"8px 12px",background:"var(--af-border-subtle)",borderRadius:8,lineHeight:1.45},children:e.text.length>200?e.text.slice(0,80)+"…":e.text}):(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:13,lineHeight:1.55},children:e.text?(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:e.text}):(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--af-text-tertiary)",fontSize:12,padding:"8px 0"},children:[(0,t.jsx)(ir,{size:14,style:{animation:"spin 1s linear infinite"}}),"Thinking…",(0,t.jsx)("style",{children:"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"})]})})},n))]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=s.trim();t&&f(t)},style:{padding:"12px 16px",borderTop:"1px solid var(--af-border-subtle)",display:"flex",gap:8,flexShrink:0,background:"var(--af-surface)"},children:[(0,t.jsx)("input",{type:"text",value:s,onChange:e=>u(e.target.value),placeholder:"Ask about this session…",disabled:l,style:{flex:1,fontSize:13}}),(0,t.jsx)("button",{type:"submit",disabled:l||!s.trim(),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:8,border:"none",background:l||!s.trim()?"var(--af-border-subtle)":"var(--af-accent)",color:l||!s.trim()?"var(--af-text-tertiary)":"#fff",cursor:l||!s.trim()?"not-allowed":"pointer",transition:"all 0.12s",flexShrink:0},children:(0,t.jsx)(it,{size:15})})]})]})}var ia=e.i(25063);let is=(0,i.default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);function iu({isLive:e}){let[n,i]=(0,r.useState)(e),[o,l]=(0,r.useState)(!1),a=(0,r.useRef)(null),s=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(a.current=document.querySelector("main"),e&&a.current){let e=setTimeout(()=>{s.current=!1,a.current?.scrollTo({top:a.current.scrollHeight,behavior:"smooth"})},300);return()=>clearTimeout(e)}},[e]),(0,r.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight<80;l(t),n&&!t&&s.current&&i(!1),s.current=!0};return t(),e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)},[n]),(0,r.useEffect)(()=>{if(!n)return;let e=a.current;if(!e)return;let t=new MutationObserver(()=>{s.current=!1,e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return t.observe(e,{childList:!0,subtree:!0}),s.current=!1,e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),()=>t.disconnect()},[n]);let u=(0,r.useCallback)(()=>{let e=a.current;e&&(s.current=!1,e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),i(!0))},[]),c=(0,r.useCallback)(()=>{i(!1)},[]);return e?(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsxs)("div",{style:{position:"fixed",bottom:16,left:"50%",transform:"translateX(-50%)",zIndex:40,display:"flex",alignItems:"center",gap:8,padding:"8px 18px",background:"var(--af-surface-elevated)",border:"1px solid var(--af-accent)",borderRadius:100,fontSize:12,fontWeight:500,color:"var(--af-accent)",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",cursor:"pointer"},onClick:c,title:"Click to stop following",children:[(0,t.jsx)(is,{size:13,style:{animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"Following live",(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",marginLeft:4},children:"click to stop"}),(0,t.jsx)("style",{children:`
|
|
6
|
+
@keyframes cs-live-pulse {
|
|
7
|
+
0%, 100% { opacity: 1; }
|
|
8
|
+
50% { opacity: 0.4; }
|
|
9
|
+
}
|
|
10
|
+
`})]}),!n&&!o&&(0,t.jsxs)("button",{type:"button",onClick:u,style:{position:"fixed",bottom:24,right:32,zIndex:40,display:"flex",alignItems:"center",gap:6,padding:"10px 18px",background:"var(--af-accent)",color:"#fff",border:"none",borderRadius:100,fontSize:12,fontWeight:600,cursor:"pointer",boxShadow:"0 4px 16px rgba(45, 212, 191, 0.3)",transition:"all 0.15s"},onMouseEnter:e=>{e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 6px 24px rgba(45, 212, 191, 0.4)"},onMouseLeave:e=>{e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 4px 16px rgba(45, 212, 191, 0.3)"},children:[(0,t.jsx)(ia.ArrowDown,{size:14}),"Jump to latest"]})]}):null}let ic=(0,i.default)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);function id(e,t){if(0===e.length)return 0;if(t<=e[0].tsMs)return e[0].yPx;if(t>=e[e.length-1].tsMs)return e[e.length-1].yPx;let n=0,r=e.length-1;for(;r-n>1;){let i=n+r>>1;e[i].tsMs<=t?n=i:r=i}let i=e[n],o=e[r];if(o.tsMs===i.tsMs)return i.yPx;let l=(t-i.tsMs)/(o.tsMs-i.tsMs);return i.yPx+l*(o.yPx-i.yPx)}function ip(e){switch(e.kind){case"idle-notification":return`${e.teammateId} is idle / available`;case"shutdown-request":return`${e.teammateId} requesting shutdown`;case"shutdown-approved":return`${e.teammateId} shutdown approved`;case"teammate-terminated":return`${e.teammateId} has shut down`;case"task-assignment":return`task assigned to ${e.teammateId}`;default:return e.body.length>120?e.body.slice(0,120)+"…":e.body}}function ih({data:e,onPlayheadChange:i,onVisibleTrackIdsChange:o,scrollTarget:l,onTurnClick:a}){let s=(0,r.useRef)(""),u=(0,r.useRef)(null),[c,d]=(0,r.useState)(new Set),f=(0,r.useCallback)(e=>{d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),p=(0,r.useRef)(0),h=(0,r.useRef)(0),g=(0,r.useRef)(0),m=(0,r.useRef)(0),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!l||!u.current)return;let t=u.current,n=Math.max(0,id(e.yAnchors,l.tsMs)-32-12),r=t.scrollLeft;if(l.trackId){let n=e.tracks.findIndex(e=>e.id===l.trackId);n>0&&(r=Math.max(0,80+241*n-t.clientWidth/2+120))}x.current=r,t.scrollTo({top:n,left:r,behavior:"smooth"})},[l,e.yAnchors,e.tracks]);let y=(0,r.useCallback)(()=>{let t;if(!u.current)return;let n=u.current,r=n.scrollTop,l=n.scrollLeft,a=r-p.current,c=l-h.current;p.current=r,h.current=l,0!==c&&(null!==x.current&&2>Math.abs(l-x.current)?x.current=null:g.current=Date.now());let d=e.yAnchors;if(0===d.length)return void i(null);let f=0,y=d.length-1;for(;y-f>1;){let e=f+y>>1;d[e].yPx<=r?f=e:y=e}let v=d[f],b=d[y];if(b.yPx===v.yPx)t=v.tsMs;else{let e=(r-v.yPx)/(b.yPx-v.yPx);t=v.tsMs+e*(b.tsMs-v.tsMs)}i(t);let k=n.clientWidth,w=l+322,j=l+k,S=[];for(let t=1;t<e.tracks.length;t++){let e=80+241*t;S.push({trackIdx:t,start:e,end:e+240})}let M=e=>{let t=(e.start+e.end)/2;return t>=w&&t<=j},C=S.filter(M),T=C.map(t=>e.tracks[t.trackIdx].id),z=T.join(",");if(z!==s.current&&(s.current=z,o(T)),0===a)return;let I=Date.now();if(I-g.current<800||I-m.current<1200||e.tracks.length<=1||0===C.length)return;let E=n=>{let r=e.tracks[n].turns;if(0===r.length)return!1;let i=0,o=r.length-1;for(;i<=o;){let e=i+o>>1,n=r[e];if(n.endMs<t)i=e+1;else{if(!(n.startMs>t))return!0;o=e-1}}return!1};if(C.some(e=>E(e.trackIdx)))return;let F=-1;for(let e of S)if(!M(e)&&E(e.trackIdx)){F=e.trackIdx;break}if(F<0)return;let L=Math.max(0,80+241*F-322-8);m.current=I,x.current=L,n.scrollLeft=L},[e.tracks,e.yAnchors,i,o]),v=`80px repeat(${e.tracks.length}, minmax(240px, 1fr))`;return(0,t.jsx)("div",{ref:u,onScroll:y,"data-team-scroll":"",style:{position:"relative",flex:1,minHeight:400,overflowY:"auto",overflowX:"auto",scrollBehavior:"smooth",border:"1px solid var(--af-border-subtle)",borderRadius:6,background:"var(--af-surface-elevated)"},children:(0,t.jsxs)("div",{style:{position:"relative",width:80+241*e.tracks.length,minWidth:"100%",height:e.totalHeightPx+72},children:[(0,t.jsxs)("div",{style:{position:"sticky",top:0,display:"grid",gridTemplateColumns:v,gap:1,background:"var(--af-surface-hover)",borderBottom:"1px solid var(--af-border-subtle)",zIndex:5,height:32},children:[(0,t.jsx)("div",{style:{padding:8,fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",textTransform:"uppercase",position:"sticky",left:0,zIndex:7,background:"var(--af-surface-hover)",borderRight:"1px solid var(--af-border-subtle)"},children:"Time"}),e.tracks.map((e,r)=>(0,t.jsxs)(n.default,{href:`/sessions/${e.id}`,style:{padding:8,fontSize:11,fontWeight:e.isLead?700:600,color:e.color,fontFamily:"ui-monospace, monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:"none",display:"flex",alignItems:"center",gap:4,...0===r&&{position:"sticky",left:81,zIndex:6,background:"var(--af-surface-hover)",borderRight:"1px solid var(--af-border-subtle)"}},title:`${e.label} — open session`,children:[(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:e.isLead?"LEAD":e.label}),(0,t.jsx)(ic,{size:10,style:{opacity:.6,flexShrink:0}})]},e.id))]}),(0,t.jsxs)("div",{style:{position:"relative",display:"grid",gridTemplateColumns:v,gap:1},children:[(0,t.jsx)("div",{style:{position:"sticky",left:0,zIndex:4,background:"var(--af-surface-elevated)",height:e.totalHeightPx+20,borderRight:"1px solid var(--af-border-subtle)"},children:e.timeTicks.map((e,n)=>(0,t.jsx)("div",{title:ix(e.tsMs),style:{position:"absolute",top:e.yPx,left:0,right:0,fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",paddingLeft:6,paddingTop:2,borderTop:"1px solid var(--af-border-subtle)"},children:e.label},n))}),e.tracks.map((n,r)=>(0,t.jsxs)("div",{style:{position:0===r?"sticky":"relative",...0===r&&{left:81,zIndex:3,background:"var(--af-surface-elevated)"},height:e.totalHeightPx+20,borderRight:"1px solid var(--af-border-subtle)"},children:[n.turns.map(r=>{let i=id(e.yAnchors,r.startMs),o=Math.max(40,id(e.yAnchors,r.endMs)-i-4);return(0,t.jsx)(ig,{turn:r,track:n,top:i,height:o,onClick:()=>a(r),isExpanded:c.has(r.id),onToggleExpand:()=>f(r.id)},r.id)}),n.turns.slice(1).map((r,i)=>{let o=n.turns[i],l=r.startMs-o.endMs;if(l<=0||e.idleBands.some(e=>e.startMs<=o.endMs&&e.endMs>=r.startMs))return null;let a=id(e.yAnchors,o.endMs),s=id(e.yAnchors,r.startMs)-a;return s<=40?null:(0,t.jsx)("div",{title:`${ix(o.endMs)} → ${ix(r.startMs)}`,style:{position:"absolute",top:a+2,left:8,right:8,height:s-4,pointerEvents:"none",zIndex:0},children:(0,t.jsxs)("span",{style:{position:"sticky",top:38,display:"inline-block",fontSize:10,fontStyle:"italic",fontFamily:"ui-monospace, monospace",color:"var(--af-text-tertiary)"},children:["idle ",(0,r6.formatGap)(l)]})},`idle-${o.id}-${r.id}`)})]},n.id)),e.idleBands.map((e,n)=>(0,t.jsx)(im,{band:e},n))]})]})})}function ig({turn:e,track:n,top:i,height:o,onClick:l,isExpanded:a,onToggleExpand:s}){let[u,c]=(0,r.useState)(!1),d=e.megaRow.summary,f=(0,r6.formatGap)(e.durationMs),p=e.userPrompt&&"event"in e.userPrompt?e.userPrompt.event.teammateMessage:void 0,h=e.userPrompt&&"user"===e.userPrompt.kind?e.userPrompt.displayPreview??e.userPrompt.event.preview??"":"",g=p?`FROM ${p.teammateId}`:"HUMAN",m=p?ip(p):h,x=d.firstAgentPreview??"",y=d.finalAgentPreview??"",v=!!y&&y!==x,b=d.toolNames.slice(0,5);return(0,t.jsx)("div",{onClick:l,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),style:{position:"absolute",top:i+2,left:4,right:4,height:a?"auto":o,minHeight:a?Math.max(o,160):void 0,background:u?"var(--af-surface-hover)":"var(--af-surface)",borderLeft:`3px solid ${n.color}`,border:"1px solid var(--af-border-subtle)",borderLeftWidth:3,borderRadius:4,padding:"6px 8px",fontSize:10,lineHeight:1.3,overflow:"visible",clipPath:a?"none":"inset(0)",boxSizing:"border-box",cursor:"pointer",outline:a||u?`1px solid ${n.color}`:"none",boxShadow:a?"0 4px 16px rgba(0,0,0,0.18)":void 0,zIndex:a?5:void 0,transition:"background 0.1s ease"},children:(0,t.jsxs)("div",{style:{position:"sticky",top:40,display:"flex",flexDirection:"column",gap:4},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",flexShrink:0},children:[(0,t.jsxs)("span",{children:[d.agentMessages," msg · ",d.toolCalls," tools",d.errors>0?` \xb7 ${d.errors} err`:""]}),(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)("span",{children:f}),(0,t.jsx)("button",{"data-turn-toggle":!0,"aria-label":a?"Collapse":"Expand",onClick:e=>{e.stopPropagation(),s()},style:{background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",width:16,height:16,borderRadius:2,fontSize:9,lineHeight:1,cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},children:a?"▲":"▼"})]})]}),m&&(0,t.jsxs)("div",{style:{flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:8,color:p?"var(--af-text-tertiary)":n.color,fontWeight:600,letterSpacing:"0.05em",fontStyle:p?"italic":void 0},children:g}),(0,t.jsx)("div",{style:{color:p?"var(--af-text-tertiary)":"var(--af-text)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:m})]}),x&&(0,t.jsxs)("div",{style:{flexShrink:0,minHeight:0},children:[(0,t.jsx)("div",{style:{fontSize:8,color:n.color,fontWeight:600,letterSpacing:"0.05em"},children:"AGENT"}),(0,t.jsx)("div",{style:a?{color:"var(--af-text)",whiteSpace:"pre-wrap",wordBreak:"break-word"}:{color:"var(--af-text)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:x})]}),b.length>0&&(0,t.jsx)("div",{style:{display:"flex",gap:3,flexWrap:"wrap",flexShrink:0},children:b.map(e=>(0,t.jsxs)("span",{style:{fontSize:8,padding:"1px 5px",background:"var(--af-surface-hover)",borderRadius:2,color:"var(--af-text-tertiary)"},children:[e.name,e.count>1?` \xd7${e.count}`:""]},e.name))}),v&&(a||o>120)&&(0,t.jsxs)("div",{style:{flexShrink:0,minHeight:0},children:[(0,t.jsx)("div",{style:{fontSize:8,color:n.color,fontWeight:600,letterSpacing:"0.05em"},children:"RESULT"}),(0,t.jsx)("div",{style:a?{color:"var(--af-text)",whiteSpace:"pre-wrap",wordBreak:"break-word"}:{color:"var(--af-text)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:y})]}),!h&&!x&&(0,t.jsx)("div",{style:{color:"var(--af-text-tertiary)",fontStyle:"italic"},children:"(no preview)"})]})})}function im({band:e}){return(0,t.jsx)("div",{title:`${ix(e.startMs)} → ${ix(e.endMs)}`,style:{position:"absolute",top:e.yPx,left:0,right:0,height:e.heightPx,background:"repeating-linear-gradient(135deg, var(--af-surface) 0, var(--af-surface) 6px, var(--af-surface-hover) 6px, var(--af-surface-hover) 12px)",borderTop:"1px solid var(--af-border-subtle)",borderBottom:"1px solid var(--af-border-subtle)",zIndex:4,pointerEvents:"none"},children:(0,t.jsxs)("div",{style:{position:"sticky",left:"50%",top:0,height:"100%",width:"fit-content",transform:"translateX(-50%)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",textTransform:"uppercase",letterSpacing:"0.05em",whiteSpace:"nowrap",padding:"0 8px",background:"var(--af-surface-elevated)",borderRadius:3},children:[(0,r6.formatGap)(e.durationMs)," idle"]})})}function ix(e){return new Date(e).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}let iy={user:{label:"User",bg:"rgba(201, 112, 112, 0.18)",fg:"#8B3A3A",mini:"#C97070"},agent:{label:"Agent",bg:"rgba(92, 132, 195, 0.18)",fg:"#2E4A7A",mini:"#5C84C3"},"tool-group":{label:"Tool",bg:"rgba(138, 133, 128, 0.16)",fg:"#44403C",mini:"#8A8580"},interrupt:{label:"Interrupt",bg:"rgba(217, 119, 6, 0.14)",fg:"#78350F",mini:"#D97706"},model:{label:"Model",bg:"rgba(168, 85, 247, 0.12)",fg:"#581C87",mini:"#A855F7"},error:{label:"Error",bg:"rgba(197, 48, 48, 0.18)",fg:"#8B1818",mini:"#C53030"},"task-notification":{label:"Task",bg:"rgba(100, 116, 139, 0.12)",fg:"#475569",mini:"#64748B"}};function iv(e){switch(e.kind){case"user":return e.displayPreview??e.event.preview;case"agent":return e.event.preview;case"tool-group":return ib(e.toolNames);case"interrupt":return"Interrupted";case"model":var t;return(t=e.event.usage)?`${t.input} input \xb7 ${t.output} output \xb7 ${t.cacheRead} cache read \xb7 ${t.cacheWrite} cache write`:"0 input · 0 output · 0 cache read · 0 cache write";case"error":return e.message;case"task-notification":{let t="success"===e.status?"✓":"failed"===e.status?"✗":"running"===e.status?"…":"•";return`${t} ${e.summary}`}}}function ib(e){let t=e.slice(0,4),n=e.length-4,r=t.map(e=>{let t=ik(e.name);return e.count>1?`${t} \xd7${e.count}`:t});return n>0&&r.push(`+${n} more`),r.join(" · ")}function ik(e){let t=e.match(/^mcp__(?:plugin_)?([^_]+)_(?:\1_)?(.+)$/);if(t)return`${t[1]}.${t[2]}`;let n=e.match(/^mcp__claude_ai_([^_]+)__(.+)$/);return n?`${n[1].toLowerCase()}.${n[2]}`:e}function iw({rows:e,onStepClick:n,showAll:r}){let i=r?e.length:12,o=Math.max(0,e.length-i),l=o>0?e.slice(-i):e,a=o>0?e.length-l.length:0;return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2,paddingLeft:2,borderLeft:"1px solid var(--af-border-subtle)",paddingBlock:2},children:[o>0&&(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontStyle:"italic",paddingLeft:12,paddingBottom:2},children:[o," earlier step",1===o?"":"s"," …"]}),l.map((e,r)=>{let i=a+r;return(0,t.jsx)(ij,{row:e,onClick:n?()=>n(e,i):void 0},r)})]})}function ij({row:e,onClick:n}){let r=iy[e.kind],i="user"===e.kind&&e.event.teammateMessage?"Team Lead":r.label,o=iv(e),l=!!n;return(0,t.jsxs)("div",{role:l?"button":void 0,tabIndex:l?0:void 0,onClick:n,onKeyDown:l?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),n?.())}:void 0,style:{display:"grid",gridTemplateColumns:"46px 1fr",columnGap:8,fontSize:12,lineHeight:1.45,color:"error"===e.kind?"var(--af-danger)":"var(--af-text-secondary)",cursor:l?"pointer":void 0,borderRadius:l?3:void 0,padding:l?"2px 4px":void 0,transition:l?"background 0.1s ease":void 0},onMouseEnter:l?e=>{e.currentTarget.style.background="var(--af-surface-hover)"}:void 0,onMouseLeave:l?e=>{e.currentTarget.style.background=""}:void 0,children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,background:r.bg,color:r.fg,padding:"1px 6px",borderRadius:3,textAlign:"center",justifySelf:"start",maxWidth:"100%"},children:i}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:"tool-group"===e.kind?(0,t.jsxs)("span",{children:[e.toolNames.slice(0,4).map((e,n)=>(0,t.jsxs)("span",{children:[n>0&&(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",margin:"0 5px"},children:"·"}),(0,t.jsx)("b",{style:{fontWeight:600},children:ik(e.name)}),e.count>1&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginLeft:3},children:["×",e.count]})]},e.name)),e.toolNames.length>4&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",marginLeft:6,fontSize:10},children:["+",e.toolNames.length-4]})]}):o})]})}function iS({path:e}){let n,r,i,{dir:o,file:l}=(r=(n=e.split("/"))[n.length-1]??e,{dir:((i=n.slice(0,-1).filter(Boolean)).length>3?"…/"+i.slice(-3).join("/"):i.join("/"))||"",file:r});return(0,t.jsxs)("code",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text)"},children:[o&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)"},children:[o,"/"]}),(0,t.jsx)("b",{style:{fontWeight:600},children:l})]})}function iM({icon:e,label:n,children:r}){return(0,t.jsxs)("div",{style:{border:"1px solid var(--af-border-subtle)",borderRadius:8,background:"var(--background)",overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"8px 12px",display:"flex",alignItems:"center",gap:8,borderBottom:r?"1px solid var(--af-border-subtle)":"none",fontSize:12,color:"var(--af-text-secondary)"},children:[(0,t.jsx)("span",{style:{fontSize:13},children:e}),(0,t.jsx)("span",{children:n})]}),r]})}function iC({text:e,maxHeight:n=280}){return(0,t.jsx)("pre",{style:{margin:0,padding:"10px 12px",fontFamily:"var(--font-mono)",fontSize:11.5,lineHeight:1.55,color:"var(--af-text)",whiteSpace:"pre",overflow:"auto",maxHeight:n},children:e})}function iT({oldText:e,newText:n}){let r=e.split("\n"),i=n.split("\n");return(0,t.jsxs)("pre",{style:{margin:0,padding:"10px 12px",fontFamily:"var(--font-mono)",fontSize:11.5,lineHeight:1.55,whiteSpace:"pre",overflow:"auto",maxHeight:320},children:[r.map((e,n)=>(0,t.jsxs)("div",{style:{background:"rgba(220, 38, 38, 0.08)",color:"#991B1B",padding:"0 4px",borderLeft:"3px solid #DC2626"},children:[(0,t.jsx)("span",{style:{opacity:.6,userSelect:"none"},children:"− "}),e||" "]},`o${n}`)),i.map((e,n)=>(0,t.jsxs)("div",{style:{background:"rgba(5, 150, 105, 0.08)",color:"#065F46",padding:"0 4px",borderLeft:"3px solid #059669"},children:[(0,t.jsx)("span",{style:{opacity:.6,userSelect:"none"},children:"+ "}),e||" "]},`n${n}`))]})}function iz({name:e,input:n}){let r=n??{},i=e=>"string"==typeof r[e]?r[e]:void 0,o=e=>"number"==typeof r[e]?r[e]:void 0;if("Write"===e){let e=i("file_path")??"",n=i("content")??"";return(0,t.jsx)(iM,{icon:"📝",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Write"})," ",(0,t.jsx)(iS,{path:e})]}),children:(0,t.jsx)(iC,{text:n})})}if("Edit"===e){let e=i("file_path")??"",n=i("old_string")??"",o=i("new_string")??"",l=!0===r.replace_all;return(0,t.jsx)(iM,{icon:"✏️",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Edit"})," ",(0,t.jsx)(iS,{path:e}),l&&(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-warning)",background:"var(--af-warning-subtle)",padding:"1px 6px",borderRadius:10},children:"replace all"})]}),children:(0,t.jsx)(iT,{oldText:n,newText:o})})}if("Read"===e){let e=i("file_path")??"",n=o("offset"),r=o("limit"),l=void 0!==n||void 0!==r?` \xb7 lines ${n??1}${void 0!==r?`–${(n??0)+r}`:"…"}`:"";return(0,t.jsx)(iM,{icon:"📖",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Read"})," ",(0,t.jsx)(iS,{path:e}),(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:l})]})})}if("Bash"===e){let e=i("command")??"",n=i("description"),o=!0===r.run_in_background;return(0,t.jsx)(iM,{icon:"⚡",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Bash"}),n&&(0,t.jsx)("span",{style:{color:"var(--af-text)",fontStyle:"italic"},children:n}),o&&(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-info)",background:"var(--af-info-subtle)",padding:"1px 6px",borderRadius:10},children:"background"})]}),children:(0,t.jsx)(iC,{text:e,maxHeight:220})})}if("Grep"===e){let e=i("pattern")??"",n=i("path"),r=i("glob"),o=i("type"),l=i("output_mode");return(0,t.jsx)(iM,{icon:"🔍",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Grep"})," ",(0,t.jsx)("code",{style:{background:"var(--af-border-subtle)",padding:"1px 6px",borderRadius:4,fontFamily:"var(--font-mono)",fontSize:11},children:e}),n&&(0,t.jsxs)(t.Fragment,{children:[" in ",(0,t.jsx)(iS,{path:n})]}),(r||o||l)&&(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,marginLeft:6},children:[r&&`glob=${r}`,o&&`type=${o}`,l&&`mode=${l}`].filter(Boolean).join(" · ")})]})})}if("Glob"===e){let e=i("pattern")??"",n=i("path");return(0,t.jsx)(iM,{icon:"📁",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"Glob"})," ",(0,t.jsx)("code",{style:{background:"var(--af-border-subtle)",padding:"1px 6px",borderRadius:4,fontFamily:"var(--font-mono)",fontSize:11},children:e}),n&&(0,t.jsxs)(t.Fragment,{children:[" in ",(0,t.jsx)(iS,{path:n})]})]})})}if("Skill"===e){let e=i("skill")??"",n=i("args");return(0,t.jsx)(iM,{icon:"🧩",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("b",{children:["/",e]}),n&&(0,t.jsx)("span",{style:{color:"var(--af-text-secondary)"},children:n})]})})}if("ToolSearch"===e){let e=i("query")??"",n=o("max_results");return(0,t.jsx)(iM,{icon:"🔎",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:"ToolSearch"})," ",(0,t.jsx)("code",{style:{background:"var(--af-border-subtle)",padding:"1px 6px",borderRadius:4,fontFamily:"var(--font-mono)",fontSize:11},children:e}),void 0!==n&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11},children:["max=",n]})]})})}if("TodoWrite"===e){let e=Array.isArray(r.todos)?r.todos:[];return(0,t.jsx)(iM,{icon:"✅",label:(0,t.jsxs)("b",{children:["TodoWrite · ",e.length," items"]}),children:(0,t.jsx)("div",{style:{padding:"10px 12px",fontSize:12},children:e.map((e,n)=>{let r=String(e.status??"pending"),i="string"==typeof e.content?e.content:"string"==typeof e.activeForm?e.activeForm:"";return(0,t.jsxs)("div",{style:{display:"flex",gap:8,padding:"2px 0",opacity:"completed"===r?.6:1,textDecoration:"completed"===r?"line-through":"none"},children:[(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"completed"===r?"✔":"in_progress"===r?"◐":"○"}),(0,t.jsx)("span",{children:i})]},n)})})})}if(e.startsWith("mcp__")){let r=ik(e);return(0,t.jsx)(iM,{icon:"🔌",label:(0,t.jsx)("b",{children:r}),children:(0,t.jsx)(iC,{text:JSON.stringify(n,null,2),maxHeight:200})})}return(0,t.jsx)(iM,{icon:"🔧",label:(0,t.jsx)("b",{children:e}),children:(0,t.jsx)(iC,{text:JSON.stringify(n,null,2),maxHeight:220})})}function iI({turn:e,trackLabel:n,trackColor:i,onClose:o}){let[l,a]=(0,r.useState)({page:"turn"});if((0,r.useEffect)(()=>{a({page:"turn"})},[e?.id]),(0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&("step"===l.page?a({page:"turn"}):o())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,o,l.page]),!e)return null;let s=new Date(e.startMs).toLocaleString(),u=new Date(e.endMs).toLocaleTimeString(),c=(0,r6.formatGap)(e.durationMs);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:o,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",zIndex:1e3}}),(0,t.jsxs)("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:620,maxWidth:"96vw",background:"var(--af-surface-elevated)",borderLeft:"1px solid var(--af-border-subtle)",zIndex:1001,display:"flex",flexDirection:"column",fontSize:12,color:"var(--af-text)"},children:[(0,t.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,flexShrink:0},children:["step"===l.page?(0,t.jsx)("button",{onClick:()=>a({page:"turn"}),style:{background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",padding:"4px 10px",borderRadius:4,cursor:"pointer",fontSize:11,fontFamily:"ui-monospace, monospace"},children:"← Back to turn"}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:i,letterSpacing:"0.08em",fontFamily:"ui-monospace, monospace"},children:n}),(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",marginTop:2},children:[s," → ",u," · ",c]})]}),(0,t.jsx)("button",{onClick:o,"aria-label":"Close",style:{background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",width:28,height:28,borderRadius:4,cursor:"pointer",fontSize:14,lineHeight:1,flexShrink:0},children:"×"})]}),(0,t.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"14px 18px"},children:"turn"===l.page?(0,t.jsx)(iE,{turn:e.megaRow,userRow:e.userPrompt,color:i,onStepClick:(e,t)=>a({page:"step",row:e,index:t})}):(0,t.jsx)(iD,{row:l.row,color:i})})]})]})}function iE({turn:e,userRow:n,color:r,onStepClick:i}){let o,l,a,s=e.summary,u=s.firstAgentIndex??-1,c=s.finalAgentIndex??-1,d=u>=0?e.rows[u]:void 0,f=c>=0&&c!==u?e.rows[c]:void 0,p=e.rows.filter((e,t)=>t!==u&&(!f||t!==c));return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[n&&"user"===n.kind&&(l=(o=n.event.teammateMessage)?`From ${o.teammateId}`:"Human",a=o?o.body:n.displayPreview??n.event.preview??"",(0,t.jsx)(iF,{label:l,color:o?"var(--af-text-tertiary)":r,text:a})),d&&"agent"===d.kind&&(0,t.jsx)(iA,{label:"First message",color:r,row:d}),(0,t.jsx)(iP,{summary:s,rows:e.rows,durationMs:e.durationMs}),p.length>0&&(0,t.jsx)(iL,{color:r,rows:p,onStepClick:i}),f&&"agent"===f.kind&&(0,t.jsx)(iA,{label:"Conclusion",color:r,row:f,arrow:!0})]})}function iF({label:e,color:n,text:i}){let[o,s]=(0,r.useState)(!1);return(0,t.jsxs)("div",{onClick:()=>s(e=>!e),style:{padding:"8px 12px",borderRadius:6,background:o?"var(--af-surface-hover)":"transparent",border:`1px solid ${o?"var(--af-border-subtle)":"transparent"}`,cursor:"pointer",transition:"all 0.12s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600,fontFamily:"ui-monospace, monospace"},children:[o?(0,t.jsx)(l.ChevronDown,{size:11}):(0,t.jsx)(a.ChevronRight,{size:11}),(0,t.jsx)("span",{style:{color:n},children:e})]}),o?(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:13,marginTop:6},children:(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:i})}):(0,t.jsx)("div",{style:{marginTop:4,fontSize:13,lineHeight:1.45,color:"var(--af-text)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:i})]})}function iL({color:e,rows:n,onStepClick:i}){let[o,a]=(0,r.useState)(!1),s=n.length-12;return(0,t.jsxs)("div",{children:[(0,t.jsx)(iR,{color:e,children:"STEPS"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(iw,{rows:n,onStepClick:i,showAll:o})}),s>0&&!o&&(0,t.jsxs)("button",{onClick:()=>a(!0),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",padding:"6px 10px",marginTop:6,background:"var(--af-surface-hover)",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,fontWeight:500,color:"var(--af-text-secondary)",fontFamily:"inherit",cursor:"pointer"},children:[(0,t.jsx)(l.ChevronDown,{size:12}),"Show all ",n.length," steps"]})]})}function iA({label:e,color:n,row:i,arrow:o}){let[s,u]=(0,r.useState)(!1);return(0,t.jsxs)("div",{onClick:()=>u(e=>!e),style:{padding:"8px 12px",borderRadius:6,background:s?"var(--af-surface-hover)":"transparent",border:`1px solid ${s?"var(--af-border-subtle)":"transparent"}`,cursor:"pointer",transition:"all 0.12s",borderTop:o&&!s?"1px dashed var(--af-border-subtle)":void 0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600,fontFamily:"ui-monospace, monospace"},children:[s?(0,t.jsx)(l.ChevronDown,{size:11}):(0,t.jsx)(a.ChevronRight,{size:11}),(0,t.jsx)("span",{style:{color:n},children:e})]}),s?(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:13,marginTop:6,color:"var(--af-text)",lineHeight:1.5},children:i.event.blocks.filter(e=>"text"===e.type).map((e,n)=>(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:e.text},n))}):(0,t.jsxs)("div",{style:{marginTop:4,display:"flex",gap:6,alignItems:"flex-start",fontSize:13,lineHeight:1.45,color:"var(--af-text)"},children:[o&&(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",marginTop:1,fontSize:11},children:"→"}),(0,t.jsx)("span",{style:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},children:i.event.preview})]})]})}function iR({children:e,color:n}){return(0,t.jsx)("div",{style:{fontSize:9,color:n,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",fontFamily:"ui-monospace, monospace"},children:e})}function iP({summary:e,rows:n,durationMs:r}){let i=0,o=0,l=0,a=0,s=0,u=0,c=0;for(let e of n)if("tool-group"===e.kind)for(let t of e.events)switch(t.toolName??""){case"Edit":i++;break;case"Write":o++;break;case"Read":l++;break;case"Bash":a++;break;case"Grep":case"Glob":s++;break;case"Agent":u++;break;default:c++}let d=[];if(i+o>0){let e=i+o;d.push(`Edited ${e} file${1===e?"":"s"}`)}return l>0&&d.push(`read ${l} file${1===l?"":"s"}`),a>0&&d.push(`${a} command${1===a?"":"s"}`),s>0&&d.push(`${s} search${1===s?"":"es"}`),u>0&&d.push(`${u} sub-agent${1===u?"":"s"}`),c>0&&0===d.length&&d.push(`${c} tool call${1===c?"":"s"}`),0===d.length&&e.agentMessages>0&&d.push(`${e.agentMessages} message${1===e.agentMessages?"":"s"}`),(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.5,fontFamily:"ui-monospace, monospace"},children:[d.join(", "),e.errors>0&&(0,t.jsxs)("span",{style:{color:"var(--af-danger)"},children:[d.length>0?", ":"",e.errors," error",1===e.errors?"":"s"]}),void 0!==r&&r>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.5,marginLeft:6},children:"·"}),(0,t.jsx)("span",{style:{marginLeft:6},children:(0,r6.formatGap)(r)})]})]})}function iD({row:e,color:n}){if("user"===e.kind)return(0,t.jsx)(iO,{label:"HUMAN",color:n,body:e.displayPreview??e.event.preview??""});if("agent"===e.kind){let r=function(e){if(!e)return"";let t=[];for(let n of e)"text"===n.type&&"string"==typeof n.text&&t.push(n.text);return t.join("\n\n")}(e.event.blocks)||e.event.preview||"";return(0,t.jsx)(iO,{label:"AGENT",color:n,body:r})}if("tool-group"===e.kind){let n=e.toolNames.slice(0,4).map(e=>{let t=ik(e.name);return e.count>1?`${t} \xd7${e.count}`:t}).join(" · "),r=e.toolNames.length>4?` +${e.toolNames.length-4}`:"";return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:"rgba(138, 133, 128, 0.16)",color:"#44403C"},children:"Tool"}),(0,t.jsxs)("span",{style:{fontSize:12,color:"var(--af-text-secondary)",fontWeight:500},children:["Tool use · ",n,r]})]}),e.events.map((e,n)=>{let r=(e.blocks??[]).find(e=>"tool_use"===e.type);if(!r)return null;let i=r.name??"?",o=r.input??{};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",marginBottom:4},children:["#",n+1]}),(0,t.jsx)(iz,{name:i,input:o})]},n)})]})}return"interrupt"===e.kind?(0,t.jsx)(iO,{label:"INTERRUPT",color:"#f85149",body:e.event.preview??"[interrupted]"}):"error"===e.kind?(0,t.jsx)(iO,{label:"ERROR",color:"#f85149",body:e.message}):"model"===e.kind?(0,t.jsx)(iO,{label:"MODEL CHANGE",color:n,body:e.event.preview??""}):"task-notification"===e.kind?(0,t.jsx)(iO,{label:`TASK ${e.status.toUpperCase()}`,color:n,body:e.summary}):null}function iO({label:e,color:n,body:r}){return(0,t.jsxs)("div",{style:{padding:"10px 12px",background:"var(--af-surface-hover)",borderLeft:`3px solid ${n}`,borderRadius:4,marginBottom:6},children:[(0,t.jsx)("div",{style:{fontSize:9,color:n,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:4,fontFamily:"ui-monospace, monospace"},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:12,color:"var(--af-text)",lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r})]})}function iB({initial:e,teamName:n,playheadMs:i,onPlayheadChange:o,onVisibleTrackIdsChange:l,seekTarget:a}){let[s,u]=(0,r.useState)(null),c=s?e.tracks.find(e=>e.id===s.trackId):null;return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:16,height:"calc(100vh - 200px)",minHeight:600},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)("h2",{style:{fontSize:14,fontWeight:600,margin:0},children:["Team: ",n]}),(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:[e.tracks.length," agent",1===e.tracks.length?"":"s"]})]}),(0,t.jsx)(ih,{data:e,onPlayheadChange:o,onVisibleTrackIdsChange:l,scrollTarget:a,onTurnClick:u}),(0,t.jsx)(iI,{turn:s,trackLabel:c?c.isLead?"LEAD":c.label:"",trackColor:c?.color??"#888",onClose:()=>u(null)})]})}let iW=(0,i.default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function i$({data:e,playheadMs:i,onSeek:o,expanded:l,onToggleExpanded:s,visibleTrackIds:u}){let c,[d,f]=(0,r.useState)(null),p=e.tracks.length>4,h=e.dayPages??null,[g,m]=(0,r.useState)(0);(0,r.useEffect)(()=>{if(!h||null==i)return;let e=h.findIndex(e=>i>=e.startMs&&i<=e.endMs);-1!==e&&e!==g&&m(e)},[h,i,g]);let x=h?Math.min(Math.max(0,g),h.length-1):0,y=h?h[x]:null,v=y?y.xAnchors:e.xAnchors,b=y?y.minimapIdleBands:e.minimapIdleBands,k=y?y.startMs:e.firstEventMs,w=y?y.endMs:e.lastEventMs;if(l||!p)c=new Set(e.tracks.map(e=>e.id));else{let t=e.tracks[0],n=e.tracks.slice(1);c=new Set(u.length>0?n.filter(e=>u.includes(e.id)).slice(0,3).map(e=>e.id):n.slice(0,3).map(e=>e.id)),t&&c.add(t.id)}let j=e.tracks.length-c.size,S=e=>(function(e,t){if(0===e.length)return 0;if(t<=e[0].tsMs)return e[0].xFrac;if(t>=e[e.length-1].tsMs)return e[e.length-1].xFrac;let n=0,r=e.length-1;for(;r-n>1;){let i=n+r>>1;e[i].tsMs<=t?n=i:r=i}let i=e[n],o=e[r];if(o.tsMs===i.tsMs)return i.xFrac;let l=(t-i.tsMs)/(o.tsMs-i.tsMs);return i.xFrac+l*(o.xFrac-i.xFrac)})(v,e),M=null!=i&&i>=k&&i<=w?Math.max(0,Math.min(1,S(i))):null;return(0,t.jsxs)("div",{style:{position:"sticky",top:0,zIndex:10,background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:6,padding:8,marginBottom:8},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"ui-monospace, monospace",marginBottom:6,paddingLeft:100,gap:8},children:[(0,t.jsx)("span",{children:iH(k,e.multiDay)}),h&&h.length>1&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:10,fontWeight:600,color:"var(--af-text-secondary)"},children:[(0,t.jsx)("button",{onClick:()=>m(e=>Math.max(0,e-1)),disabled:0===x,"aria-label":"Previous day",style:i_(0===x),children:(0,t.jsx)(iW,{size:11})}),(0,t.jsxs)("span",{style:{minWidth:64,textAlign:"center",fontFamily:"ui-monospace, monospace"},children:[y?.label??""," ",(0,t.jsxs)("span",{style:{opacity:.55},children:["(",x+1,"/",h.length,")"]})]}),(0,t.jsx)("button",{onClick:()=>m(e=>Math.min(h.length-1,e+1)),disabled:x===h.length-1,"aria-label":"Next day",style:i_(x===h.length-1),children:(0,t.jsx)(a.ChevronRight,{size:11})})]}),(0,t.jsx)("span",{children:iH(w,e.multiDay)})]}),(0,t.jsxs)("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[b.map((e,n)=>(0,t.jsx)(iU,{band:e},n)),e.tracks.map(e=>{let r=c.has(e.id);return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,maxHeight:24*!!r,opacity:+!!r,marginBottom:2*!!r,overflow:"hidden",transition:"max-height 280ms ease, opacity 280ms ease, margin-bottom 280ms ease",pointerEvents:r?"auto":"none"},children:[(0,t.jsx)(n.default,{href:`/sessions/${e.id}`,style:{width:94,fontSize:10,fontFamily:"ui-monospace, monospace",color:e.color,fontWeight:e.isLead?700:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:"none"},title:`${e.label} — open session`,children:e.isLead?"LEAD":e.label}),(0,t.jsxs)("div",{style:{flex:1,position:"relative",height:24,background:"var(--af-surface-hover)",borderRadius:3,overflow:"hidden",cursor:"pointer",padding:"3px 2px",boxSizing:"border-box"},onClick:t=>{let n;return n=t.currentTarget.getBoundingClientRect(),void o(function(e,t){if(0===e.length)return 0;if(t<=e[0].xFrac)return e[0].tsMs;if(t>=e[e.length-1].xFrac)return e[e.length-1].tsMs;let n=0,r=e.length-1;for(;r-n>1;){let i=n+r>>1;e[i].xFrac<=t?n=i:r=i}let i=e[n],o=e[r];if(o.xFrac===i.xFrac)return i.tsMs;let l=(t-i.xFrac)/(o.xFrac-i.xFrac);return i.tsMs+l*(o.tsMs-i.tsMs)}(v,Math.min(1,Math.max(0,t.clientX-n.left)/Math.max(1,n.width))),e.id)},children:[e.turns.map(n=>{let r=n.endMs<k||n.startMs>w?null:{id:n.id,startMs:Math.max(n.startMs,k),endMs:Math.min(n.endMs,w),original:n};if(!r)return null;let i=S(r.startMs),o=Math.max(.4,(S(r.endMs)-i)*100);return(0,t.jsx)("div",{style:{position:"absolute",left:`calc(${100*i}% + 1px)`,top:3,width:`calc(${o}% - 2px)`,minWidth:4,height:14,background:e.color,opacity:.88,borderRadius:3,border:`1px solid ${e.color}`,boxSizing:"border-box"},onMouseEnter:t=>f({turn:r.original,track:e,clientX:t.clientX,clientY:t.clientY}),onMouseMove:e=>f(t=>t&&t.turn.id===n.id?{...t,clientX:e.clientX,clientY:e.clientY}:t),onMouseLeave:()=>f(null)},n.id)}),e.subagents.map((n,r)=>{if(null==n.startMs)return null;let i=n.startMs+(n.durationMs??0);if(i<k||n.startMs>w)return null;let o=Math.max(n.startMs,k),l=Math.min(i,w),a=S(o),s=Math.max(.2,(S(l)-a)*100)||.4;return(0,t.jsx)("div",{style:{position:"absolute",left:`${100*a}%`,bottom:2,width:`${s}%`,height:3,background:e.color,opacity:.5,borderRadius:1},title:`subagent: ${n.agentType}`},r)})]})]},e.id)})]}),p&&(0,t.jsx)("div",{style:{marginTop:6,paddingLeft:106,display:"flex"},children:(0,t.jsx)("button",{onClick:s,style:{background:"var(--af-surface-hover)",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",fontSize:10,fontFamily:"ui-monospace, monospace",padding:"2px 8px",borderRadius:10,cursor:"pointer",lineHeight:1.4},children:l?"Show fewer":`+ ${j} more agent${1===j?"":"s"} — show all`})}),null!=M&&(0,t.jsx)("div",{style:{position:"absolute",top:24,bottom:8,left:106,right:8,pointerEvents:"none"},children:(0,t.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:`${100*M}%`,width:1,background:"var(--af-text)",opacity:.7}})}),d&&(0,t.jsx)(iN,{hover:d,multiDay:e.multiDay})]})}function iN({hover:e,multiDay:n}){let{turn:r,track:i}=e,o=r.megaRow.summary,l=r.userPrompt&&"event"in r.userPrompt?r.userPrompt.event.teammateMessage:void 0,a=l?`FROM ${l.teammateId}`:"HUMAN",s=l?ip(l):r.userPrompt&&"user"===r.userPrompt.kind?r.userPrompt.displayPreview??r.userPrompt.event.preview??"":"",u=o.firstAgentPreview??"",c=o.finalAgentPreview??"",d=c&&c!==u,f=o.toolNames.slice(0,4),p=Math.min(window.innerWidth-360,e.clientX+12),h=Math.max(8,e.clientY-12);return(0,t.jsxs)("div",{style:{position:"fixed",left:p,top:h,width:340,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderLeft:`3px solid ${i.color}`,borderRadius:4,padding:"8px 10px",fontSize:10,lineHeight:1.4,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:100,pointerEvents:"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontFamily:"ui-monospace, monospace",color:i.color,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:4},children:[(0,t.jsx)("span",{children:i.isLead?"LEAD":i.label}),(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontWeight:500},children:[iH(r.startMs,n)," → ",iH(r.endMs,n)," · ",(0,r6.formatGap)(r.durationMs)]})]}),(0,t.jsxs)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",marginBottom:6},children:[o.agentMessages," msg · ",o.toolCalls," tools",o.errors>0?` \xb7 ${o.errors} err`:""]}),s&&(0,t.jsxs)("div",{style:{marginBottom:5},children:[(0,t.jsx)("div",{style:{fontSize:8,color:l?"var(--af-text-tertiary)":i.color,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:1,fontStyle:l?"italic":void 0},children:a}),(0,t.jsx)("div",{style:{color:l?"var(--af-text-tertiary)":"var(--af-text)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:s})]}),u&&(0,t.jsxs)("div",{style:{marginBottom:5},children:[(0,t.jsx)("div",{style:{fontSize:8,color:i.color,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:1},children:"AGENT"}),(0,t.jsx)("div",{style:{color:"var(--af-text)",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},children:u})]}),f.length>0&&(0,t.jsx)("div",{style:{display:"flex",gap:3,flexWrap:"wrap",marginBottom:5*!!d},children:f.map(e=>(0,t.jsxs)("span",{style:{fontSize:8,padding:"1px 5px",background:"var(--af-surface-hover)",borderRadius:2,color:"var(--af-text-tertiary)"},children:[e.name,e.count>1?` \xd7${e.count}`:""]},e.name))}),d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:8,color:i.color,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:1},children:"RESULT"}),(0,t.jsx)("div",{style:{color:"var(--af-text)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:c})]})]})}function i_(e){return{background:"transparent",border:"1px solid var(--af-border-subtle)",color:e?"var(--af-text-tertiary)":"var(--af-text-secondary)",width:18,height:18,borderRadius:3,display:"flex",alignItems:"center",justifyContent:"center",cursor:e?"default":"pointer",opacity:e?.4:1,padding:0}}function iH(e,t){let n=new Date(e);if(!t)return n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});let r=n.toLocaleDateString([],{month:"short",day:"numeric"}),i=n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return`${r} ${i}`}function iU({band:e}){let[n,i]=(0,r.useState)(!1),o=100*e.xFracStart,l=Math.max(.5,(e.xFracEnd-e.xFracStart)*100);return(0,t.jsx)("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{position:"absolute",top:0,bottom:0,left:`calc(100px + ${o}% * (100% - 100px) / 100%)`,width:`calc(${l}% * (100% - 100px) / 100%)`,background:"repeating-linear-gradient(135deg, transparent 0, transparent 4px, var(--af-border-subtle) 4px, var(--af-border-subtle) 6px)",zIndex:1,cursor:"help"},children:n&&(0,t.jsxs)("div",{style:{position:"absolute",left:"50%",bottom:"calc(100% + 6px)",transform:"translateX(-50%)",background:"#0F172A",color:"#F1F5F9",borderRadius:8,padding:"6px 10px",fontSize:11,pointerEvents:"none",boxShadow:"0 4px 16px rgba(15,23,42,0.22)",zIndex:20,whiteSpace:"nowrap"},children:[(0,t.jsx)("div",{style:{fontWeight:600,marginBottom:1},children:"Idle"}),(0,t.jsx)("div",{style:{opacity:.78,fontFamily:"ui-monospace, monospace",fontSize:10},children:e.label})]})})}let iq=[{value:"turns",label:"Turns"},{value:"meaningful",label:"All actions"},{value:"all",label:"All events"},{value:"user",label:"User only"},{value:"agent",label:"Agent only"},{value:"tool-group",label:"Tool only"},{value:"error",label:"Errors only"}],iV=["transcript","team","debug"];function iX({icon:e,value:n,mono:r,truncate:i}){return(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,color:"var(--af-text-secondary)",maxWidth:i?260:void 0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e&&(0,t.jsx)("span",{style:{display:"inline-flex",color:"var(--af-text-tertiary)"},children:e}),(0,t.jsx)("span",{style:{fontFamily:r?"var(--font-mono)":"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]})}function iG(){return(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,opacity:.6},children:"·"})}function iY({usage:e}){let[n,i]=(0,r.useState)(!1),o=e??{input:0,output:0,cacheRead:0,cacheWrite:0},l=o.input+o.cacheRead+o.cacheWrite,a=l>0?Math.round(o.cacheRead/l*100):0,s=o.cacheRead+o.cacheWrite;return(0,t.jsxs)("span",{style:{position:"relative",display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"var(--af-text-secondary)",cursor:"default",fontFamily:"var(--font-mono)"},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,t.jsxs)("span",{children:[(0,r6.formatTokens)(o.input),(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",margin:"0 3px"},children:"in"}),(0,r6.formatTokens)(o.output),(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",marginLeft:3},children:"out"})]}),s>0&&(0,t.jsxs)("span",{style:{fontSize:10.5,color:"var(--af-text-tertiary)",paddingLeft:6,borderLeft:"1px solid var(--af-border-subtle)"},children:["+",(0,r6.formatTokens)(s)," cached"]}),n&&(0,t.jsxs)(iJ,{style:{bottom:"calc(100% + 6px)",left:0,minWidth:240},children:[(0,t.jsx)(iK,{label:"Input (fresh)",value:o.input.toLocaleString()}),(0,t.jsx)(iK,{label:"Output",value:o.output.toLocaleString()}),(0,t.jsx)(iK,{label:"Cache read",value:`${o.cacheRead.toLocaleString()} (${a}%)`}),(0,t.jsx)(iK,{label:"Cache write",value:o.cacheWrite.toLocaleString()}),(0,t.jsx)("div",{style:{marginTop:6,paddingTop:6,borderTop:"1px solid rgba(241,245,249,0.12)",opacity:.65,fontSize:10,whiteSpace:"normal",lineHeight:1.4},children:"Cache reads are cumulative across all API requests and billed at ~10% of regular input."})]})]})}function iJ({children:e,style:n}){return(0,t.jsx)("div",{style:{position:"absolute",zIndex:100,background:"#1A1A1A",color:"#F5F1EC",borderRadius:8,padding:"10px 12px",fontSize:11,fontFamily:"var(--font-mono)",lineHeight:1.5,boxShadow:"0 4px 20px rgba(0,0,0,0.18)",pointerEvents:"none",whiteSpace:"nowrap",...n},children:e})}function iK({label:e,value:n}){return(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[(0,t.jsx)("span",{style:{opacity:.7},children:e}),(0,t.jsx)("span",{children:n})]})}let iQ={user:1,agent:1,interrupt:1,error:1,"tool-group":1,model:1,"task-notification":1};function iZ({displayRows:e,durationMs:n,selectedIndex:i,onSelect:o,headerOffset:l,subagents:a,collapsed:s,selectedSubagentId:u,onSelectSubagent:c,prMarkers:d}){let[f,p]=(0,r.useState)(null),[h,g]=(0,r.useState)(null),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=m.current?.closest("main");if(!e)return;let t=`-${l}px 0px -${Math.max(0,e.clientHeight-l-12)}px 0px`,n=new Set,r=new IntersectionObserver(e=>{for(let t of e){let e=t.target;t.isIntersecting?n.add(e):n.delete(e)}(()=>{if(0===n.size)return g(null);let e=null,t=1/0;for(let r of n){let n=r.offsetTop;n<t&&(t=n,e=r)}if(!e)return g(null);let r=Number(e.getAttribute("data-sl-toffset"));g(Number.isNaN(r)?null:r)})()},{root:e,rootMargin:t,threshold:0});for(let t of e.querySelectorAll("[data-sl-row-index]"))r.observe(t);return()=>r.disconnect()},[e.length,l]);let x=Math.max(n,1),y=(0,r.useMemo)(()=>{let t=[],n=[];for(let t of e)if("turn-expanded-header"!==t.kind&&"turn-expanded-footer"!==t.kind)if("turn-collapsed"===t.kind){if(void 0===t.turn.tOffsetMs)continue;n.push({kind:"turn",turn:t.turn,start:t.turn.tOffsetMs,gapMs:t.turn.rows[0]?.gapMs??0})}else{if(void 0===t.row.tOffsetMs)continue;n.push({kind:"row",row:t.row,start:t.row.tOffsetMs,gapMs:t.row.gapMs??0})}for(let e=0;e<n.length;e++){let r=n[e],i=n[e+1],o=r.start;if("row"===r.kind&&"user"===r.row.kind&&r.gapMs>2e3&&t.length>0&&t.push({kind:"idle",start:Math.max(0,o-r.gapMs),end:o,durationMs:r.gapMs}),"turn"===r.kind){let e=o+(r.turn.durationMs??0),n=i?.start,l=void 0!==n?Math.min(e,n):e;t.push({kind:"turn",turn:r.turn,primaryIndex:r.turn.firstPrimaryIndex,start:o,end:Math.max(l,o+1)})}else{let e=i?.start??Math.min(o+800,x);t.push({kind:"row",row:r.row,primaryIndex:rJ(r.row),start:o,end:e})}}if(t.length<=600)return t;let r=Math.ceil(t.length/600),i=[];for(let e=0;e<t.length;e+=r){let n=t[e],o=t[Math.min(e+r-1,t.length-1)];"idle"===n.kind?i.push({kind:"idle",start:n.start,end:o.end,durationMs:o.end-n.start}):"turn"===n.kind?i.push({kind:"turn",turn:n.turn,primaryIndex:n.primaryIndex,start:n.start,end:o.end}):i.push({kind:"row",row:n.row,primaryIndex:n.primaryIndex,start:n.start,end:o.end})}return i},[e,x]),v=(0,r.useMemo)(()=>{if(0===y.length)return[];let e=y.map(e=>(e.end-e.start)/x*1400).map(e=>Math.max(e,12)),t=1400/e.reduce((e,t)=>e+t,0),n=[],r=0;for(let i of e){let e=i*t;n.push({x:r,w:e}),r+=e}return n},[y,x]),b=e=>{if(0===y.length)return 0;if(e<=y[0].start)return v[0]?.x??0;for(let t=0;t<y.length;t++){let n=y[t],r=v[t];if(r){if(e<n.start)return r.x;if(e<=n.end){let t=n.end-n.start,i=t>0?(e-n.start)/t:0;return r.x+i*r.w}}}let t=v[v.length-1];return t?t.x+t.w:1400},{laneOf:k,laneCount:w}=(0,r.useMemo)(()=>{if(!a||0===a.length)return{laneOf:new Map,laneCount:0};let e=[...a].sort((e,t)=>(e.startTOffsetMs??0)-(t.startTOffsetMs??0)),t=[],n=new Map;for(let r of e){let e=r.startTOffsetMs??0,i=r.endTOffsetMs??e+1,o=-1;for(let n=0;n<t.length;n++)if(t[n]<=e){o=n;break}-1===o&&(o=t.length,t.push(0)),t[o]=i,n.set(r.agentId,o)}return{laneOf:n,laneCount:t.length}},[a]),j=28+(w>0?6+(w>0?11*w:0):0);return(0,t.jsxs)("div",{ref:m,style:{padding:"8px 10px",position:"relative",background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderRadius:8,marginTop:2},onMouseLeave:()=>p(null),children:[(0,t.jsxs)("svg",{viewBox:`0 0 1400 ${j}`,preserveAspectRatio:"none",style:{width:"100%",height:j,display:"block",overflow:"visible"},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("pattern",{id:"stripes",patternUnits:"userSpaceOnUse",width:"6",height:"6",patternTransform:"rotate(45)",children:[(0,t.jsx)("rect",{width:"6",height:"6",fill:"rgba(120, 115, 108, 0.04)"}),(0,t.jsx)("line",{x1:"0",y1:"0",x2:"0",y2:"6",stroke:"rgba(120, 115, 108, 0.28)",strokeWidth:"2"})]})}),y.map((e,n)=>{let r,l,a=v[n];if(!a)return null;let s=a.x,u=a.w;if("idle"===e.kind){let r=Math.max(u-3,6);return(0,t.jsx)("rect",{x:s+1.5,y:4,width:r,height:20,fill:"url(#stripes)",stroke:"rgba(120, 115, 108, 0.35)",strokeWidth:"0.6",rx:"3",onMouseEnter:t=>p({clientX:t.clientX,idleMs:e.durationMs})},`idle-${n}`)}let c="turn"===e.kind?"agent":e.row.kind,d=iy[c],f=22*iQ[c],h=3+(22-f)/2,g=i===e.primaryIndex;return"row"===e.kind&&("error"===e.row.kind||"interrupt"===e.row.kind)?(r=Math.min(Math.max(u-3,2),5),l=s+Math.max((u-r)/2,1.5)):(r=Math.max(u-3,6),l=s+1.5),(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:l,y:h,width:r,height:f,fill:d.mini,rx:"3",style:{cursor:"pointer"},onClick:()=>o(e.primaryIndex),onMouseEnter:t=>"turn"===e.kind?p({clientX:t.clientX,turn:e.turn}):p({clientX:t.clientX,row:e.row})}),g&&(0,t.jsx)("rect",{x:l-2.5,y:h-2.5,width:r+5,height:f+5,fill:"none",stroke:"#5C84C3",strokeWidth:"2",rx:"5",pointerEvents:"none"})]},`seg-${e.primaryIndex}-${n}`)}),w>0&&a&&(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:0,x2:1400,y1:31,y2:31,stroke:"var(--af-border-subtle)",strokeWidth:"0.6",strokeDasharray:"2 4"}),a.map(e=>{let n=k.get(e.agentId)??0;if(void 0===e.startTOffsetMs||void 0===e.endTOffsetMs)return null;let r=b(e.startTOffsetMs),i=Math.max(b(e.endTOffsetMs)-r,8),o=34+11*n,l=i0(e.agentType,e.runInBackground),a=u===e.agentId;return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:r,y:o,width:i,height:9,fill:l,stroke:e.runInBackground?"#fff":"transparent",strokeWidth:.5*!!e.runInBackground,strokeDasharray:e.runInBackground?"1.5 1.5":void 0,rx:"2",style:{cursor:"pointer"},onMouseEnter:t=>p({clientX:t.clientX,subagent:e}),onClick:()=>c?.(a?null:e.agentId)}),a&&(0,t.jsx)("rect",{x:r-2,y:o-2,width:i+4,height:13,fill:"none",stroke:"var(--af-accent)",strokeWidth:"1.5",rx:"4",pointerEvents:"none"})]},e.agentId)})]}),d?.map((e,n)=>{if(void 0===e.tOffsetMs)return null;let r=b(e.tOffsetMs);return(0,t.jsxs)("g",{style:{cursor:"pointer"},onMouseEnter:t=>p({clientX:t.clientX,pr:e}),children:[(0,t.jsx)("line",{x1:r,x2:r,y1:0,y2:j,stroke:"#8b5cf6",strokeWidth:"1.5",strokeDasharray:"4 3",opacity:"0.7"}),(0,t.jsx)("rect",{x:r-8,y:0,width:16,height:j,fill:"transparent"}),(0,t.jsx)("polygon",{points:`${r},9 ${r+5},14 ${r},19 ${r-5},14`,fill:"#8b5cf6",stroke:"var(--af-surface)",strokeWidth:"1.5"})]},`pr-${n}`)}),null!==h&&(0,t.jsx)("line",{x1:b(h),x2:b(h),y1:0,y2:j,stroke:"#0F172A",strokeWidth:"1.25",strokeDasharray:"2 2",opacity:"0.65"})]}),f&&(0,t.jsx)(i1,{containerRef:m,clientX:f.clientX,row:f.row,turn:f.turn,idleMs:f.idleMs,subagent:f.subagent,pr:f.pr}),w>0&&a&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:6,fontSize:10,color:"var(--af-text-tertiary)"},children:[(0,t.jsx)("span",{style:{fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Sub-agents"}),(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[a.length," run",1===a.length?"":"s"]}),(0,t.jsxs)("span",{style:{marginLeft:8,display:"flex",gap:8,flexWrap:"wrap"},children:[Array.from(new Set(a.map(e=>e.agentType))).map(e=>(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:2,background:i0(e,!1)}}),e]},e)),a.some(e=>e.runInBackground)&&(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:2,background:"transparent",border:"1px dashed var(--af-text-secondary)"}}),"background"]})]})]})]})}function i0(e,t){let[n,r]={"general-purpose":["#5C84C3","#7BA3DC"],Explore:["#A855F7","#C57BFF"],Plan:["#F59E0B","#FFBD3D"],"code-reviewer":["#34D399","#5EE5B0"],"playwright-qa-verifier":["#22D3EE","#67E8F9"],"claude-code-guide":["#EC4899","#F472B6"]}[e]??["#8A8580","#A8A19A"];return t?r:n}function i1({containerRef:e,clientX:n,row:r,turn:i,idleMs:o,subagent:l,pr:a}){let s=e.current?.getBoundingClientRect(),u={top:"calc(100% + 8px)",left:Math.min(Math.max((s?n-s.left:0)-140,8),(s?.width??1400)-300)};if(l){let e=(0,r6.formatOffset)(l.startTOffsetMs),n=(0,r6.formatOffset)(l.endTOffsetMs),r=void 0!==l.durationMs?(0,r6.formatGap)(l.durationMs):"",i=l.totalUsage.input+l.totalUsage.cacheRead+l.totalUsage.cacheWrite;return(0,t.jsxs)("div",{style:{position:"absolute",...u,zIndex:100,background:"#0F172A",color:"#F1F5F9",borderRadius:10,padding:"12px 14px",fontSize:11,pointerEvents:"none",boxShadow:"0 6px 24px rgba(15,23,42,0.22)",maxWidth:440,minWidth:280,lineHeight:1.45},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:4,background:i0(l.agentType,l.runInBackground),color:"#fff"},children:l.agentType}),l.runInBackground&&(0,t.jsx)("span",{style:{fontSize:9,fontWeight:600,padding:"1px 6px",borderRadius:3,background:"rgba(251, 191, 36, 0.18)",color:"#FBBF24",textTransform:"uppercase",letterSpacing:"0.04em"},children:"background"}),(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,opacity:.7,marginLeft:"auto"},children:[e," → ",n," · ",r]})]}),(0,t.jsx)("div",{style:{fontWeight:500,marginBottom:6},children:l.description}),(0,t.jsxs)("div",{style:{fontSize:10,opacity:.65,display:"flex",gap:8,paddingTop:6,borderTop:"1px solid rgba(241,245,249,0.08)"},children:[(0,t.jsxs)("span",{children:[l.eventCount," events"]}),(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)"},children:[(0,r6.formatTokens)(i),"/",(0,r6.formatTokens)(l.totalUsage.output)," tok"]})]}),l.finalPreview&&(0,t.jsxs)("div",{style:{marginTop:6,opacity:.78,fontStyle:"italic",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:["→ ",l.finalPreview]})]})}if(a){let e=a.title?`PR${a.prNumber?` #${a.prNumber}`:""}: ${a.title}`:a.prNumber?`PR #${a.prNumber}`:"PR created";return(0,t.jsxs)("div",{style:{position:"absolute",...u,zIndex:100,background:"#0F172A",color:"#F1F5F9",borderRadius:10,padding:"10px 14px",fontSize:11,pointerEvents:"none",boxShadow:"0 6px 24px rgba(15,23,42,0.22)",maxWidth:360,minWidth:200,lineHeight:1.45},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:4,background:"#8b5cf6",color:"#fff"},children:"PR"}),void 0!==a.tOffsetMs&&(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,opacity:.7},children:["at ",(0,r6.formatOffset)(a.tOffsetMs)]})]}),(0,t.jsx)("div",{style:{fontWeight:500},children:e})]})}if(void 0!==o)return(0,t.jsxs)("div",{style:{position:"absolute",...u,zIndex:100,background:"#0F172A",color:"#F1F5F9",borderRadius:10,padding:"8px 12px",fontSize:11,pointerEvents:"none",boxShadow:"0 6px 24px rgba(15,23,42,0.22)"},children:[(0,t.jsx)("div",{style:{fontWeight:600,marginBottom:2},children:"Session idle"}),(0,t.jsx)("div",{style:{opacity:.78,fontFamily:"var(--font-mono)"},children:(0,r6.formatGap)(o)})]});if(i){let e=iy.agent,n=i.summary,r=void 0!==i.durationMs?(0,r6.formatGap)(i.durationMs):"",o=(0,r6.formatOffset)(i.tOffsetMs),l=void 0!==i.tOffsetMs&&void 0!==i.durationMs?(0,r6.formatOffset)(i.tOffsetMs+i.durationMs):void 0,a=n.firstAgentPreview&&n.finalAgentPreview&&n.firstAgentPreview!==n.finalAgentPreview,s=n.toolNames.slice(0,3).map(e=>e.count>1?`${ik(e.name)} \xd7${e.count}`:ik(e.name)).join(" · ");return(0,t.jsxs)("div",{style:{position:"absolute",...u,zIndex:100,background:"#0F172A",color:"#F1F5F9",borderRadius:10,padding:"12px 14px",fontSize:11,pointerEvents:"none",boxShadow:"0 6px 24px rgba(15,23,42,0.22)",maxWidth:440,minWidth:280,lineHeight:1.45},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:4,background:e.mini,color:"#fff"},children:"Turn"}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,opacity:.7},children:l?`${o} → ${l}`:o}),r&&(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,opacity:.55},children:["· ",r]})]}),n.firstAgentPreview&&(0,t.jsx)("div",{style:{opacity:.95,fontWeight:500,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",marginBottom:6},children:n.firstAgentPreview}),(0,t.jsxs)("div",{style:{fontSize:10,opacity:.65,marginBottom:6*!!a,borderTop:n.firstAgentPreview?"1px solid rgba(241,245,249,0.08)":void 0,paddingTop:6*!!n.firstAgentPreview},children:[n.agentMessages," msg · ",n.toolCalls," tools",n.errors>0?` \xb7 ${n.errors} err`:"",s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.5,margin:"0 4px"},children:"·"}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)"},children:s}),n.toolNames.length>3&&(0,t.jsxs)("span",{style:{opacity:.65},children:[" +",n.toolNames.length-3]})]})]}),a&&n.finalAgentPreview&&(0,t.jsxs)("div",{style:{opacity:.92,display:"flex",gap:6,alignItems:"flex-start",borderTop:"1px solid rgba(241,245,249,0.08)",paddingTop:6},children:[(0,t.jsx)("span",{style:{opacity:.5},children:"→"}),(0,t.jsx)("span",{style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:n.finalAgentPreview})]})]})}if(!r)return null;let c=iy[r.kind],d=iv(r);return(0,t.jsxs)("div",{style:{position:"absolute",...u,zIndex:100,background:"#0F172A",color:"#F1F5F9",borderRadius:10,padding:"10px 14px",fontSize:11,pointerEvents:"none",boxShadow:"0 6px 24px rgba(15,23,42,0.22)",maxWidth:360,minWidth:220},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:4,background:c.mini,color:"#fff"},children:c.label}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,opacity:.65},children:(0,r6.formatOffset)(r.tOffsetMs)})]}),(0,t.jsx)("div",{style:{lineHeight:1.45,opacity:.92,display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},children:d})]})}function i2({displayRows:e,rowRefs:n,selectedIndex:r,onSelect:i,onToggleTurn:o,stickyOffset:l,isSessionLive:a,team:s}){let u=-1;if(a){for(let t=e.length-1;t>=0;t--)if("turn-collapsed"===e[t].kind){u=t;break}}let c=[];for(let a=0;a<e.length;a++){let d=e[a];if("turn-collapsed"===d.kind){let e=d.turn.firstPrimaryIndex;c.push((0,t.jsx)(i6,{turn:d.turn,stickyOffset:l,onClick:()=>o(e),inProgress:a===u,team:s,refCb:t=>{n.current[e]=t}},`turn-${e}`));continue}if("turn-expanded-header"===d.kind){c.push((0,t.jsx)(i8,{turn:d.turn,onClick:()=>o(d.turn.firstPrimaryIndex)},`turnhead-${d.turn.firstPrimaryIndex}`));continue}if("turn-expanded-footer"===d.kind){c.push((0,t.jsx)(i9,{turn:d.turn,onClick:()=>o(d.turn.firstPrimaryIndex)},`turnfoot-${d.turn.firstPrimaryIndex}`));continue}let f=d.row,p=f.gapMs??0;"user"===f.kind&&p>2e3&&!d.indented&&c.push((0,t.jsx)(i4,{gapMs:p},`idle-${rJ(f)}`));let h=rJ(f);c.push((0,t.jsx)(i7,{row:f,selected:r===h,onSelect:()=>i(h),stickyOffset:l,indented:d.indented,refCb:e=>{n.current[h]=e}},`row-${h}`))}return(0,t.jsx)("div",{children:c})}function i4({gapMs:e}){return(0,t.jsxs)("div",{style:{margin:"8px 0",padding:"6px 12px",textAlign:"center",background:"repeating-linear-gradient(135deg, rgba(107,101,96,0.04) 0px, rgba(107,101,96,0.04) 6px, rgba(107,101,96,0.12) 6px, rgba(107,101,96,0.12) 12px)",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-tertiary)",letterSpacing:"0.02em"},children:["Session idle · ",(0,r6.formatGap)(e)]})}function i6({turn:e,onClick:n,refCb:i,stickyOffset:o,inProgress:a,team:s}){let u=iy.agent,c=e.summary,d=c.totalTokens.input>0||c.totalTokens.output>0,f=c.firstAgentIndex??-1,p=c.finalAgentIndex??-1,h=f>=0?e.rows[f]:void 0,g=p>=0&&p!==f?e.rows[p]:void 0,m=e.rows.filter((e,t)=>t!==f&&(!g||t!==p)),[x,y]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),k=e=>e.stopPropagation();return(0,t.jsxs)("div",{ref:i,"data-sl-row-index":e.firstPrimaryIndex,"data-sl-toffset":e.tOffsetMs??0,style:{display:"grid",gridTemplateColumns:"20px 84px 1fr auto auto",columnGap:12,alignItems:"start",padding:"14px 12px 0 12px",borderBottom:"1px solid var(--af-border-subtle)",transition:"background 0.08s",scrollMarginTop:o},children:[(0,t.jsx)("span",{}),(0,t.jsx)("span",{style:{justifySelf:"start",fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:u.bg,color:u.fg,marginTop:2},children:"Agent"}),(0,t.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:10,paddingBottom:10},children:[h&&(0,t.jsx)(i5,{label:"First message",row:h,expanded:x,onToggle:e=>{k(e),y(e=>!e)}}),(0,t.jsx)("div",{onClick:k,children:(0,t.jsx)(i3,{summary:c,durationMs:e.durationMs,rows:e.rows,team:s})}),m.length>0&&(0,t.jsx)("div",{onClick:k,children:(0,t.jsx)(iw,{rows:m})}),a&&g?(0,t.jsx)(i5,{label:`In progress \xb7 ${e.rows.length} step${1===e.rows.length?"":"s"} so far`,labelPrefix:(0,t.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),row:g,expanded:v,onToggle:e=>{k(e),b(e=>!e)},arrow:!0}):g?(0,t.jsx)(i5,{label:"Conclusion",row:g,expanded:v,onToggle:e=>{k(e),b(e=>!e)},arrow:!0}):null,(0,t.jsxs)("button",{type:"button",onClick:e=>{k(e),n()},style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",padding:"7px 10px",marginTop:4,background:"var(--af-surface-hover)",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,fontWeight:500,color:"var(--af-text-secondary)",fontFamily:"inherit",cursor:"pointer",transition:"all 0.1s"},onMouseEnter:e=>{e.currentTarget.style.background="var(--af-surface-elevated)",e.currentTarget.style.color="var(--af-text)"},onMouseLeave:e=>{e.currentTarget.style.background="var(--af-surface-hover)",e.currentTarget.style.color="var(--af-text-secondary)"},children:[(0,t.jsx)(l.ChevronDown,{size:13}),"Show all ",e.rows.length," step",1===e.rows.length?"":"s"]})]}),(0,t.jsx)("span",{style:{marginTop:3},children:d&&(0,t.jsx)(on,{usage:c.totalTokens})}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",marginTop:3,minWidth:64,textAlign:"right"},children:(0,r6.formatOffset)(e.tOffsetMs)})]})}function i5({label:e,labelPrefix:n,row:r,expanded:i,onToggle:o,arrow:s}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",flexDirection:"column",gap:4,padding:"6px 10px",borderRadius:6,background:i?"var(--af-surface-hover)":"transparent",border:i?"1px solid var(--af-border-subtle)":"1px solid transparent",cursor:"pointer",transition:"all 0.12s",borderTop:s&&!i?"1px dashed var(--af-border-subtle)":void 0},onMouseEnter:e=>{i||(e.currentTarget.style.background="var(--af-surface-hover)")},onMouseLeave:e=>{i||(e.currentTarget.style.background="transparent")},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.04em",fontWeight:600},children:[n,i?(0,t.jsx)(l.ChevronDown,{size:11}):(0,t.jsx)(a.ChevronRight,{size:11}),e]}),i?(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:13},children:r.event.blocks.filter(e=>"text"===e.type).map((e,n)=>(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:e.text},n))}):(0,t.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start",fontSize:13,lineHeight:1.45,color:"var(--af-text)",fontWeight:500},children:[s&&(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,marginTop:1},children:"→"}),(0,t.jsx)("span",{style:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:r.event.preview})]})]})}function i3({summary:e,durationMs:i,rows:o,team:l}){let a,s,u=0,c=0,d=0,f=0,p=0,h=0,g=0,m=0,x=[];for(let e of o)if("tool-group"===e.kind)for(let t of e.events){let e=t.toolName??"",n=t.blocks.find(e=>e&&"tool_use"===e.type)?.input,r="string"==typeof n?.file_path?n.file_path:void 0;switch(e){case"Edit":u++,r&&(s=r);break;case"Write":c++,r&&(s=r);break;case"Read":d++,r&&(s=r);break;case"Bash":f++;break;case"Grep":p++;break;case"Glob":h++;break;case"Agent":{g++;let e="string"==typeof n?.name?n.name:void 0;e&&x.push(e);break}default:m++}}let y=[];if(u>0||c>0){let e=u+c;y.push((0,t.jsx)("span",{children:(0,t.jsxs)("b",{style:{fontWeight:600},children:["Edited ",e," file",1===e?"":"s"]})},"edit"))}if(d>0&&y.push((0,t.jsxs)("span",{children:["read ",(0,t.jsx)("b",{style:{fontWeight:600},children:d})," file",1===d?"":"s"]},"read")),f>0&&y.push((0,t.jsxs)("span",{children:["ran ",(0,t.jsx)("b",{style:{fontWeight:600},children:f})," command",1===f?"":"s"]},"bash")),p+h>0){let e=p+h;y.push((0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{fontWeight:600},children:e})," search",1===e?"":"es"]},"search"))}if(g>0){let e=l?new Map(l.tracks.filter(e=>!e.isLead).map(e=>[e.label,e.id])):null;x.length>0&&e&&e.size>0?y.push((0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,flexWrap:"wrap"},children:["dispatched"," ",x.map((r,i)=>{let o=e.get(r);return o?(0,t.jsx)(n.default,{href:`/sessions/${o}`,style:{fontSize:10,padding:"1px 7px",background:"var(--af-surface-hover)",border:"1px solid var(--af-border-subtle)",borderRadius:10,color:"var(--af-text-secondary)",textDecoration:"none",fontWeight:600},children:r},i):(0,t.jsx)("span",{style:{fontSize:10,padding:"1px 7px",background:"var(--af-surface-hover)",borderRadius:10,color:"var(--af-text-tertiary)"},children:r},i)})]},"agent")):y.push((0,t.jsxs)("span",{children:["dispatched ",(0,t.jsx)("b",{style:{fontWeight:600},children:g})," sub-agent",1===g?"":"s"]},"agent"))}m>0&&0===y.length&&y.push((0,t.jsxs)("span",{children:[(0,t.jsx)("b",{style:{fontWeight:600},children:m})," tool call",1===m?"":"s"]},"other")),0===y.length&&e.agentMessages>0&&y.push((0,t.jsxs)("span",{children:[e.agentMessages," message",1===e.agentMessages?"":"s"]},"msgs"));let v=s?(a=s.split("/")).length>3?"…/"+a.slice(-3).join("/"):s:void 0;return(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.6},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap"},children:[y.map((e,n)=>(0,t.jsxs)(r.default.Fragment,{children:[n>0&&(0,t.jsx)("span",{style:{opacity:.5},children:", "}),e]},n)),e.errors>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.5},children:", "}),(0,t.jsxs)("span",{style:{color:"var(--af-danger)"},children:[e.errors," error",1===e.errors?"":"s"]})]}),void 0!==i&&i>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.5,marginLeft:4},children:"·"}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10},children:(0,r6.formatGap)(i)})]})]}),v&&(0,t.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:1,opacity:.75},title:s,children:["└ ",v]})]})}function i8({turn:e,onClick:n}){let r=e.summary;return(0,t.jsxs)("div",{onClick:n,style:{display:"flex",alignItems:"center",gap:8,padding:"6px 12px 6px 18px",marginLeft:12,borderLeft:"2px solid var(--af-accent)",borderBottom:"1px dashed var(--af-border-subtle)",fontSize:11,color:"var(--af-text-tertiary)",cursor:"pointer",background:"rgba(92, 132, 195, 0.04)"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(92, 132, 195, 0.10)",e.currentTarget.style.color="var(--af-text-secondary)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(92, 132, 195, 0.04)",e.currentTarget.style.color="var(--af-text-tertiary)"},children:[(0,t.jsx)(l.ChevronDown,{size:13}),(0,t.jsxs)("span",{children:["Hide turn · ",r.agentMessages," message",1===r.agentMessages?"":"s"," · ",r.toolCalls," tool",1===r.toolCalls?"":"s",void 0!==e.durationMs?` \xb7 ${(0,r6.formatGap)(e.durationMs)}`:""]})]})}function i9({turn:e,onClick:n}){let r=e.summary;return(0,t.jsxs)("div",{onClick:n,style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px 7px 18px",marginLeft:12,marginBottom:8,borderLeft:"2px solid var(--af-accent)",borderTop:"1px dashed var(--af-border-subtle)",borderBottomLeftRadius:6,borderBottomRightRadius:6,fontSize:11,color:"var(--af-text-tertiary)",cursor:"pointer",background:"rgba(92, 132, 195, 0.04)"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(92, 132, 195, 0.10)",e.currentTarget.style.color="var(--af-text-secondary)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(92, 132, 195, 0.04)",e.currentTarget.style.color="var(--af-text-tertiary)"},children:[(0,t.jsx)(s,{size:13}),(0,t.jsxs)("span",{children:["Collapse turn · ",r.agentMessages," message",1===r.agentMessages?"":"s"," · ",r.toolCalls," ","tool",1===r.toolCalls?"":"s",void 0!==e.durationMs?` \xb7 ${(0,r6.formatGap)(e.durationMs)}`:""]})]})}function i7({row:e,selected:n,onSelect:r,refCb:i,stickyOffset:o,indented:l}){let a=iy[e.kind],s=("tool-group"===e.kind?e.events[0]:e.event).usage,u="agent"===e.kind&&s&&(s.input>0||s.output>0),c="user"===e.kind&&e.event.teammateMessage?"Team Lead":a.label,d=iv(e);return(0,t.jsxs)("div",{ref:i,onClick:r,"data-sl-row-index":"tool-group"===e.kind?e.events[0].index:e.event.index,"data-sl-toffset":e.tOffsetMs??0,style:{display:"grid",gridTemplateColumns:"20px 84px 1fr auto auto",gap:14,alignItems:"center",padding:"11px 12px",paddingLeft:l?28:12,borderBottom:"1px solid var(--af-border-subtle)",borderLeft:l?"2px solid var(--af-accent)":"2px solid transparent",marginLeft:12*!!l,cursor:"pointer",background:n?"var(--af-accent-subtle)":l?"rgba(92, 132, 195, 0.03)":"transparent",transition:"background 0.08s",scrollMarginTop:o},onMouseEnter:e=>{n||(e.currentTarget.style.background="var(--af-surface-hover)")},onMouseLeave:e=>{n||(e.currentTarget.style.background="transparent")},children:[(0,t.jsx)("span",{}),(0,t.jsx)("span",{style:{justifySelf:"start",fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:a.bg,color:a.fg},children:c}),(0,t.jsxs)("span",{style:{fontSize:13,color:"error"===e.kind?"var(--af-danger)":"var(--af-text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:8},children:["tool-group"===e.kind&&(0,t.jsx)(h.Wrench,{size:13,style:{color:"var(--af-text-tertiary)",flexShrink:0}}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:"tool-group"===e.kind?(0,t.jsx)(oe,{toolNames:e.toolNames,count:e.count}):d})]}),u&&s?(0,t.jsx)(ot,{usage:s}):(0,t.jsx)("span",{}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",minWidth:64,textAlign:"right"},children:(0,r6.formatOffset)(e.tOffsetMs)})]})}function oe({toolNames:e,count:n}){let r=e.slice(0,4),i=e.length-4;return(0,t.jsxs)("span",{children:[r.map((e,n)=>(0,t.jsxs)("span",{children:[n>0&&(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",margin:"0 6px"},children:"·"}),(0,t.jsx)("b",{children:ik(e.name)}),e.count>1&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontWeight:400,marginLeft:4,fontFamily:"var(--font-mono)",fontSize:11},children:["×",e.count]})]},e.name)),i>0&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",marginLeft:8,fontSize:11},children:["+",i," more"]}),n>3&&(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",marginLeft:10,fontSize:11,fontFamily:"var(--font-mono)"},children:["(",n," calls)"]})]})}function ot({usage:e}){let[n,i]=(0,r.useState)(!1),o=e.input+e.cacheRead+e.cacheWrite,l=o>0?Math.round(e.cacheRead/o*100):0;return(0,t.jsxs)("span",{style:{position:"relative",fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-secondary)",display:"inline-flex",alignItems:"center",gap:4,whiteSpace:"nowrap"},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,t.jsx)("span",{style:{opacity:.6},children:"▤"}),(0,r6.formatTokens)(o)," / ",(0,r6.formatTokens)(e.output),n&&(0,t.jsxs)(iJ,{style:{right:0,top:"calc(100% + 6px)",minWidth:180},children:[(0,t.jsx)(iK,{label:"Input",value:e.input.toLocaleString()}),(0,t.jsx)(iK,{label:"Cache read",value:`${e.cacheRead.toLocaleString()} (${l}%)`}),(0,t.jsx)(iK,{label:"Cache write",value:e.cacheWrite.toLocaleString()}),(0,t.jsx)(iK,{label:"Output",value:e.output.toLocaleString()})]})]})}function on({usage:e}){let[n,i]=(0,r.useState)(!1),o=e.input+e.cacheRead+e.cacheWrite,l=o>0?Math.round(e.cacheRead/o*100):0;return(0,t.jsxs)("span",{style:{position:"relative",fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",display:"inline-flex",alignItems:"center",gap:4,whiteSpace:"nowrap",cursor:"default"},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,t.jsx)("span",{style:{opacity:.6},children:"▤"}),(0,r6.formatTokens)(e.input)," / ",(0,r6.formatTokens)(e.output),n&&(0,t.jsxs)(iJ,{style:{right:0,top:"calc(100% + 6px)",minWidth:220},children:[(0,t.jsx)(iK,{label:"Input (fresh)",value:e.input.toLocaleString()}),(0,t.jsx)(iK,{label:"Output",value:e.output.toLocaleString()}),(0,t.jsx)(iK,{label:"Cache read",value:`${e.cacheRead.toLocaleString()} (${l}%)`}),(0,t.jsx)(iK,{label:"Cache write",value:e.cacheWrite.toLocaleString()}),(0,t.jsx)("div",{style:{marginTop:6,paddingTop:6,borderTop:"1px solid rgba(241,245,249,0.12)",opacity:.65,fontSize:10,whiteSpace:"normal",lineHeight:1.4},children:"Cumulative across all requests in this turn."})]})]})}function or({events:e}){return(0,t.jsx)("div",{style:{padding:"8px 0"},children:e.map(e=>(0,t.jsxs)("details",{style:{borderBottom:"1px solid var(--af-border-subtle)",padding:"8px 12px"},children:[(0,t.jsxs)("summary",{style:{cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:12,color:"var(--af-text-secondary)"},children:["#",e.index," · ",e.rawType,e.attachmentType?`/${e.attachmentType}`:""," · ",e.timestamp??"(no ts)"]}),(0,t.jsx)("pre",{style:{marginTop:8,padding:12,background:"var(--background)",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,overflow:"auto",maxHeight:400,color:"var(--af-text-secondary)"},children:JSON.stringify({type:e.rawType,index:e.index,uuid:e.uuid,parentUuid:e.parentUuid,timestamp:e.timestamp,role:e.role,messageId:e.messageId,stopReason:e.stopReason,model:e.model,requestId:e.requestId,toolName:e.toolName,toolUseId:e.toolUseId,attachmentType:e.attachmentType,usage:e.usage,blocks:e.blocks},null,2)})]},e.index))})}function oi({subagent:e,onClose:n,onJumpToParent:r}){let i=i0(e.agentType,e.runInBackground),o=(0,r6.formatOffset)(e.startTOffsetMs),l=(0,r6.formatOffset)(e.endTOffsetMs),a=void 0!==e.durationMs?(0,r6.formatGap)(e.durationMs):"—",s=e.totalUsage.input+e.totalUsage.cacheRead+e.totalUsage.cacheWrite,u=s>0?Math.round(e.totalUsage.cacheRead/s*100):0;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:10,background:"var(--af-surface)",position:"sticky",top:0,zIndex:1,flexWrap:"wrap"},children:[(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:i,color:"#fff"},children:e.agentType}),e.runInBackground&&(0,t.jsx)("span",{style:{fontSize:9,fontWeight:600,padding:"2px 8px",borderRadius:4,background:"var(--af-warning-subtle)",color:"var(--af-warning)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"background"}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e.description,children:e.description}),(0,t.jsx)("button",{onClick:n,style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-tertiary)",padding:4,borderRadius:4},"aria-label":"Close",children:(0,t.jsx)(g.X,{size:16})})]}),(0,t.jsxs)("div",{style:{padding:"10px 20px",fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",borderBottom:"1px solid var(--af-border-subtle)",display:"grid",gridTemplateColumns:"auto 1fr",columnGap:10,rowGap:3},children:[(0,t.jsx)("span",{style:{opacity:.7},children:"range"}),(0,t.jsxs)("span",{style:{color:"var(--af-text-secondary)"},children:[o," → ",l]}),(0,t.jsx)("span",{style:{opacity:.7},children:"duration"}),(0,t.jsx)("span",{style:{color:"var(--af-text-secondary)"},children:a}),e.model&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.7},children:"model"}),(0,t.jsx)("span",{style:{color:"var(--af-text-secondary)"},children:e.model})]}),e.parentToolUseId&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{opacity:.7},children:"parent"}),(0,t.jsxs)("span",{style:{color:"var(--af-text-secondary)"},children:[e.parentToolUseId.slice(0,24),"…"]})]})]}),(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:10},children:[(0,t.jsx)(oo,{label:"Events",value:String(e.eventCount)}),(0,t.jsx)(oo,{label:"Messages",value:String(e.assistantMessageCount??0)}),(0,t.jsx)(oo,{label:"Tool calls",value:String(e.toolCallCount??0)})]}),(0,t.jsxs)("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--af-border-subtle)",fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)",display:"flex",flexDirection:"column",gap:3},children:[(0,t.jsx)(ol,{label:"Input (fresh)",value:e.totalUsage.input}),(0,t.jsx)(ol,{label:"Output",value:e.totalUsage.output}),(0,t.jsx)(ol,{label:"Cache read",value:e.totalUsage.cacheRead,suffix:` (${u}%)`}),(0,t.jsx)(ol,{label:"Cache write",value:e.totalUsage.cacheWrite})]}),e.toolCalls&&e.toolCalls.length>0&&(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--af-text-tertiary)",marginBottom:8},children:"Tools used"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.toolCalls.map(e=>(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:11,padding:"2px 8px",borderRadius:4,background:"var(--af-border-subtle)",color:"var(--af-text)",fontFamily:"var(--font-mono)"},children:[(0,t.jsx)("b",{style:{fontWeight:600},children:ik(e.name)}),(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)"},children:["×",e.count]})]},e.name))})]}),e.prompt&&(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--af-text-tertiary)"},children:"Prompt"}),e.parentToolUseId&&(0,t.jsx)("button",{type:"button",onClick:r,style:{fontSize:10,color:"var(--af-accent)",background:"transparent",border:"none",cursor:"pointer",padding:0},children:"Jump to parent →"})]}),(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:12.5},children:(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:e.prompt})})]}),e.finalText&&(0,t.jsxs)("div",{style:{padding:"14px 20px"},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--af-text-tertiary)",marginBottom:8},children:"Final result"}),(0,t.jsx)("div",{className:"sl-prose",style:{fontSize:13},children:(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline"}})},children:e.finalText})})]})]})}function oo({label:e,value:n}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.04em",fontWeight:600},children:e}),(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700,fontFamily:"var(--font-mono)",color:"var(--af-text)",marginTop:2},children:n})]})}function ol({label:e,value:n,suffix:r}){return(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[(0,t.jsx)("span",{style:{opacity:.7},children:e}),(0,t.jsxs)("span",{children:[n.toLocaleString(),r&&(0,t.jsx)("span",{style:{opacity:.65},children:r})]})]})}function oa({event:e,row:n,onClose:i}){let[o,l]=(0,r.useState)(!1),a=iy[n?.kind??"agent"],s=function(e,t){if(e)switch(e.kind){case"user":case"agent":return"Message";case"tool-group":return`Tool use \xb7 ${ib(e.toolNames)}`;case"interrupt":return"Interrupted";case"model":return"Model (zero-usage)";case"error":return"API error";case"task-notification":return`Background task \xb7 ${e.status}`}return t.rawType}(n,e),u=!!e.usage&&(e.usage.input>0||e.usage.output>0);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:10,background:"var(--af-surface)",position:"sticky",top:0,zIndex:1},children:[(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:a.bg,color:a.fg},children:a.label}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)"},children:s}),(0,t.jsx)("button",{onClick:i,style:{marginLeft:"auto",background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-tertiary)",padding:4,borderRadius:4},children:(0,t.jsx)(g.X,{size:16})})]}),(0,t.jsxs)("div",{style:{padding:"8px 20px",fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("span",{children:(0,r6.formatOffset)(e.tOffsetMs)}),void 0!==e.gapMs&&e.gapMs>0&&(0,t.jsxs)("span",{children:["· ",(0,r6.formatGap)(e.gapMs)]}),u&&e.usage&&(0,t.jsxs)("span",{style:{color:"var(--af-text-secondary)"},children:["· ",(0,r6.formatTokens)(e.usage.input+e.usage.cacheRead+e.usage.cacheWrite),"/",(0,r6.formatTokens)(e.usage.output)," tokens"]}),(0,t.jsx)("button",{onClick:()=>l(e=>!e),style:{marginLeft:"auto",background:"transparent",border:"none",fontSize:10,color:"var(--af-text-tertiary)",cursor:"pointer",padding:0,fontFamily:"inherit",textDecoration:"underline",textUnderlineOffset:2},children:o?"hide details":"details"})]}),o&&(0,t.jsxs)("div",{style:{padding:"10px 20px 14px",borderBottom:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)",display:"flex",flexDirection:"column",gap:4},children:[e.model&&(0,t.jsxs)("div",{children:["model: ",e.model]}),e.requestId&&(0,t.jsxs)("div",{children:["request: ",e.requestId]}),e.messageId&&(0,t.jsxs)("div",{children:["message: ",e.messageId]}),e.stopReason&&(0,t.jsxs)("div",{children:["stop_reason: ",e.stopReason]}),e.usage&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{marginTop:6,opacity:.7},children:"tokens"}),(0,t.jsxs)("div",{children:[" input: ",e.usage.input.toLocaleString()]}),(0,t.jsxs)("div",{children:[" output: ",e.usage.output.toLocaleString()]}),(0,t.jsxs)("div",{children:[" cache read: ",e.usage.cacheRead.toLocaleString()]}),(0,t.jsxs)("div",{children:[" ","cache write: ",e.usage.cacheWrite.toLocaleString()]})]})]}),(0,t.jsx)("div",{style:{padding:"18px 22px"},children:(0,t.jsx)(os,{event:e,row:n})})]})}function os({event:e,row:n}){if(n?.kind==="user"&&n.displayBlocks)return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.displayBlocks.map((e,n)=>(0,t.jsx)(ou,{block:e},n))});if(n?.kind==="task-notification"){let e="success"===n.status?"var(--af-success)":"failed"===n.status?"var(--af-danger)":"var(--af-text-secondary)";return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8},children:(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:4,background:"success"===n.status?"var(--af-success-subtle)":"failed"===n.status?"var(--af-danger-subtle)":"var(--af-border-subtle)",color:e,textTransform:"uppercase",letterSpacing:"0.03em"},children:n.status})}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text)"},children:n.summary}),(n.taskId||n.toolUseId||n.outputFile)&&(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)",display:"flex",flexDirection:"column",gap:4,paddingTop:10,borderTop:"1px solid var(--af-border-subtle)"},children:[n.taskId&&(0,t.jsxs)("div",{children:["task id: ",n.taskId]}),n.toolUseId&&(0,t.jsxs)("div",{children:["tool use: ",n.toolUseId.slice(0,24),"…"]}),n.outputFile&&(0,t.jsxs)("div",{style:{wordBreak:"break-all"},children:["output: ",n.outputFile]})]})]})}return n?.kind==="tool-group"&&n.count>1?(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:14},children:n.events.map((e,n)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",marginBottom:4,fontFamily:"var(--font-mono)"},children:["#",n+1," · ",(0,r6.formatOffset)(e.tOffsetMs)," · ",e.toolUseId?.slice(0,14),"…"]}),e.blocks.map((e,n)=>(0,t.jsx)(ou,{block:e},n))]},e.index))}):n?.kind==="agent"&&n.groupedEvents.length>1?(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.groupedEvents.flatMap((e,n)=>e.blocks.map((e,r)=>(0,t.jsx)(ou,{block:e},`${n}-${r}`)))}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.blocks.map((e,n)=>(0,t.jsx)(ou,{block:e},n))})}function ou({block:e}){if("text"===e.type)return(0,t.jsx)("div",{className:"sl-prose",children:(0,t.jsx)(nB,{remarkPlugins:[rY],components:{a:e=>(0,t.jsx)("a",{...e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--af-accent)",textDecoration:"underline",textUnderlineOffset:2}})},children:e.text})});if("thinking"===e.type)return(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{style:{cursor:"pointer",fontSize:11,color:"var(--af-text-tertiary)",marginBottom:6},children:["Thinking · ",e.thinking.length," chars"]}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"var(--af-text-secondary)",whiteSpace:"pre-wrap",fontStyle:"italic",borderLeft:"3px solid var(--af-border-subtle)",paddingLeft:12,marginTop:6},children:e.thinking})]});if("tool_use"===e.type)return(0,t.jsx)(iz,{name:e.name,input:e.input});if("tool_result"===e.type){let n="string"==typeof e.content?e.content:JSON.stringify(e.content,null,2);return(0,t.jsx)("pre",{style:{fontSize:12,padding:12,background:"var(--background)",border:"1px solid var(--af-border-subtle)",borderRadius:6,overflow:"auto",whiteSpace:"pre-wrap",color:"var(--af-text)",fontFamily:"var(--font-mono)",maxHeight:500},children:n})}return null}e.s(["SessionView",0,function({session:e,team:i,teamLead:l}){let a,h=()=>{let e=window.location.hash.replace("#","");return iV.includes(e)?e:"transcript"},[g,m]=(0,r.useState)(h),x=e=>{m(e),window.history.replaceState(null,"",`#${e}`)};(0,r.useEffect)(()=>{m(h())},[e.sessionId]),(0,r.useEffect)(()=>{let e=()=>{let e=window.location.hash.replace("#","");iV.includes(e)&&m(e)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let[y,v]=(0,r.useState)(null),[b,k]=(0,r.useState)(null),[w,j]=(0,r.useState)([]),[S,M]=(0,r.useState)(!1),[C,T]=(0,r.useState)("turns"),[z,I]=(0,r.useState)(null),[E,F]=(0,r.useState)(null),[L,A]=(0,r.useState)(!1),[R,P]=(0,r.useState)(new Set),[D,O]=(0,r.useState)(0),B=(0,r.useRef)({}),W=(0,r.useRef)(null),[$,N]=(0,r.useState)(310);(0,r.useEffect)(()=>{let e=W.current;if(!e)return;let t=()=>N(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let[_,H]=(0,r.useState)(!1),U=(0,r.useRef)(0);(0,r.useEffect)(()=>{let e=W.current;if(!e)return;let t=e.closest("main");if(!t)return;let n=("team"===g?document.querySelector("[data-team-scroll]"):null)??t,r=n.scrollTop,i=!1,o=0,l=()=>{if(o=0,i||Date.now()-U.current<2e3)return;let e=n.scrollTop,t=e-r;r=e,H(n=>n&&t<0?(i=!0,setTimeout(()=>{i=!1},300),!1):!n&&t>0&&e>150?(i=!0,setTimeout(()=>{i=!1},300),!0):n)},a=()=>{o||(o=requestAnimationFrame(l))};return n.addEventListener("scroll",a,{passive:!0}),()=>{n.removeEventListener("scroll",a),o&&cancelAnimationFrame(o)}},[g]),(0,r.useEffect)(()=>{if(null===z)return;let e=B.current[z];e&&e.scrollIntoView({block:"start",behavior:"auto"})},[D,z]);let{events:q,durationMs:V,totalUsage:X,model:G,eventCount:Y,projectName:J}=e,K=e.airTimeMs??V,Q=e.isTeamLead,Z=(0,r.useMemo)(()=>Q?q.filter(e=>e.teammateMessage).length:0,[q,Q]),ee=(0,r.useMemo)(()=>0===Z?q:q.filter(e=>!e.teammateMessage),[q,Z]),et=(()=>{if(!e.lastTimestamp)return!1;let t=Date.parse(e.lastTimestamp);return!Number.isNaN(t)&&Date.now()-t<45e3})(),en=(0,r.useMemo)(()=>(0,r4.detectPrMarkers)(e),[e]),er=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){if(!n.messageId)continue;let e=t.get(n.messageId)??[];e.push(n),t.set(n.messageId,e)}let n=e.filter(e=>{if("system"===e.role||"meta"===e.role||"tool-result"===e.role||"agent-thinking"===e.role)return!1;if("user"===e.role){let t=r2(e.blocks)??"";if(rZ.test(t))return!1}return!0}),r=[];for(let e=0;e<n.length;e++){let i=n[e];if("tool-call"===i.role){let t=e;for(;e+1<n.length&&"tool-call"===n[e+1].role;)e++;let i=n.slice(t,e+1),o=[],l=new Map;for(let e of i){let t=e.toolName??"tool";l.has(t)||o.push(t),l.set(t,(l.get(t)??0)+1)}let a=o.map(e=>({name:e,count:l.get(e)??1}));r.push({kind:"tool-group",toolNames:a,count:i.length,events:i,tOffsetMs:i[0].tOffsetMs,gapMs:i[0].gapMs});continue}if("user"===i.role){let e=r2(i.blocks)??"",t=function(e){if(!r1.test(e))return null;let t=t=>{let n=e.match(RegExp(`<${t}>([\\s\\S]*?)<\\/${t}>`));return n?n[1].trim():void 0},n=(t("status")??"").toLowerCase(),r="unknown";return"success"===n||"ok"===n||"done"===n||"completed"===n?r="success":"failed"===n||"error"===n||"fail"===n?r="failed":("running"===n||"in_progress"===n)&&(r="running"),{status:r,summary:t("summary")??"Background task notification",taskId:t("task-id"),toolUseId:t("tool-use-id"),outputFile:t("output-file")}}(e);if(t){r.push({kind:"task-notification",event:i,status:t.status,summary:t.summary,taskId:t.taskId,toolUseId:t.toolUseId,outputFile:t.outputFile,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}if(rK.test(e)){r.push({kind:"interrupt",event:i,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}let n=e.match(r0);if(n){let e=n[1],t=(n[2]??"").trim(),o=t?`${e} ${t}`:e;r.push({kind:"user",event:i,displayPreview:o,displayBlocks:[{type:"text",text:o}],tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}r.push({kind:"user",event:i,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}if("agent"===i.role){let e=r2(i.blocks)??"";if(function(e){if(!e.usage)return!1;let t=e.usage;return 0===t.input&&0===t.output&&0===t.cacheRead&&0===t.cacheWrite}(i)){r.push({kind:"model",event:i,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs}),rQ.test(e)&&e.length<500&&r.push({kind:"error",event:i,message:e,tOffsetMs:i.tOffsetMs,gapMs:0});continue}if(rQ.test(e)&&e.length<500){r.push({kind:"error",event:i,message:e,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}let n=i.messageId?t.get(i.messageId)??[i]:[i];r.push({kind:"agent",event:i,groupedEvents:n,tOffsetMs:i.tOffsetMs,gapMs:i.gapMs});continue}}return r})(ee),[ee]),ei=(0,r.useMemo)(()=>(function(e){let t=[],n=[],r=()=>{let e,r;if(0===n.length)return;let i=0,o=0,l=0,a=new Map,s=new Set,u={input:0,output:0,cacheRead:0,cacheWrite:0};for(let t=0;t<n.length;t++){let r=n[t];if("agent"===r.kind){i++,void 0===e&&(e=t);let n=r.event.messageId,o=r.event.usage;n&&!s.has(n)&&o&&(s.add(n),u.input+=o.input,u.output+=o.output,u.cacheRead+=o.cacheRead,u.cacheWrite+=o.cacheWrite)}else if("tool-group"===r.kind)for(let e of(o+=r.count,r.toolNames))a.set(e.name,(a.get(e.name)??0)+e.count);else"error"===r.kind&&l++}for(let e=n.length-1;e>=0;e--){if("agent"!==n[e].kind)continue;let t=n[e-1];if(t?.kind!=="task-notification"){r=e;break}}if(void 0===r){for(let e=n.length-1;e>=0;e--)if("agent"===n[e].kind){r=e;break}}let c=void 0!==e&&"agent"===n[e].kind?n[e].event.preview:void 0,d=void 0!==r&&"agent"===n[r].kind?n[r].event.preview:void 0,f=Array.from(a.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({name:e,count:t})),p=n[0],h=n[n.length-1],g=p.tOffsetMs,m=h.tOffsetMs;t.push({kind:"turn",rows:n,firstPrimaryIndex:rJ(p),tOffsetMs:g,durationMs:void 0!==g&&void 0!==m?m-g:void 0,summary:{agentMessages:i,toolCalls:o,errors:l,firstAgentPreview:c,finalAgentPreview:d,firstAgentIndex:e,finalAgentIndex:r,toolNames:f,totalTokens:u}}),n=[]};for(let i of e)"user"===i.kind||"interrupt"===i.kind?(r(),t.push(i)):n.push(i);return r(),t})(er),[er]),eo=(0,r.useMemo)(()=>{let e=new Map;for(let t of ei)if("turn"===t.kind)for(let n of t.rows)e.set(rJ(n),t.firstPrimaryIndex);return e},[ei]),el=(0,r.useMemo)(()=>"turns"===C?function(e,t){let n=[];for(let r of e)if("turn"===r.kind)if(t.has(r.firstPrimaryIndex)){for(let e of(n.push({kind:"turn-expanded-header",turn:r}),r.rows))n.push({kind:"presentation",row:e,indented:!0});n.push({kind:"turn-expanded-footer",turn:r})}else n.push({kind:"turn-collapsed",turn:r});else n.push({kind:"presentation",row:r});return n}(ei,R):"all"===C?(function(e){let t=[];for(let n of e){let e;switch(n.role){case"user":e="user";break;case"agent":case"agent-thinking":e="agent";break;case"tool-call":case"tool-result":e="tool-group";break;case"system":case"meta":e="model"}"tool-group"===e?t.push({kind:"tool-group",toolNames:[{name:n.toolName??n.rawType,count:1}],count:1,events:[n],tOffsetMs:n.tOffsetMs,gapMs:n.gapMs}):"agent"===e?t.push({kind:"agent",event:n,groupedEvents:[n],tOffsetMs:n.tOffsetMs,gapMs:n.gapMs}):"user"===e?t.push({kind:"user",event:n,tOffsetMs:n.tOffsetMs,gapMs:n.gapMs}):t.push({kind:"model",event:n,tOffsetMs:n.tOffsetMs,gapMs:n.gapMs})}return t})(ee).map(e=>({kind:"presentation",row:e})):"meaningful"===C?er.map(e=>({kind:"presentation",row:e})):er.filter(e=>"agent"===C?"agent"===e.kind:"tool-group"===C?"tool-group"===e.kind:e.kind===C).map(e=>({kind:"presentation",row:e})),[C,ei,R,er,ee]),ea=null!==z?ee.find(e=>e.index===z)??null:null,es=null!==z?er.find(e=>rJ(e)===z)??null:null;function eu(e){if("turns"===C){let t=eo.get(e);void 0===t||R.has(t)||P(e=>new Set(e).add(t))}I(e),O(e=>e+1)}return X.input,X.cacheRead,X.cacheWrite,(0,t.jsxs)("div",{style:{padding:0},children:[(0,t.jsxs)("div",{ref:W,style:{position:"sticky",top:0,zIndex:30,background:"var(--background)",borderBottom:"1px solid var(--af-border-subtle)",padding:"18px 40px 0"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:6},children:[(0,t.jsxs)("div",{style:{fontSize:12,color:"var(--af-text-tertiary)",whiteSpace:"nowrap"},children:[(0,t.jsxs)(n.default,{href:"/sessions",style:{color:"var(--af-text-tertiary)",textDecoration:"none",display:"inline-flex",alignItems:"center",gap:4},children:[(0,t.jsx)(o,{size:12})," Sessions"]}),(0,t.jsx)("span",{style:{margin:"0 8px"},children:"/"}),(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)"},children:["sesn_",(0,r6.shortId)(e.id)]}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{margin:"0 8px"},children:"·"}),(0,t.jsxs)(n.default,{href:`/sessions/${l.leadSessionId}#team`,style:{color:"var(--af-accent)",textDecoration:"none",display:"inline-flex",alignItems:"center",gap:4,fontWeight:500},title:`View team lead for ${l.teamName}`,children:[l.agentName," in ",l.teamName," ↗"]})]})]}),(0,t.jsxs)("div",{className:"af-tabs",style:{flexShrink:0,marginLeft:"auto"},children:[(0,t.jsx)("button",{className:`af-tab-btn ${"transcript"===g?"active":""}`,onClick:()=>x("transcript"),children:"Transcript"}),i&&(0,t.jsx)("button",{className:`af-tab-btn ${"team"===g?"active":""}`,onClick:()=>x("team"),children:"Team"}),(0,t.jsx)("button",{className:`af-tab-btn ${"debug"===g?"active":""}`,onClick:()=>x("debug"),children:"Debug"})]}),(0,t.jsx)("button",{onClick:()=>{H(e=>!e),U.current=Date.now()},title:_?"Show session details":"Hide session details",style:{background:"var(--af-surface-hover)",border:"1px solid var(--af-border-subtle)",borderRadius:4,width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"var(--af-text-secondary)",flexShrink:0,transition:"transform 0.2s ease",transform:_?"rotate(180deg)":"rotate(0deg)"},children:(0,t.jsx)(s,{size:14})})]}),(0,t.jsxs)("div",{style:{maxHeight:500*!_,opacity:+!_,overflow:"hidden",transition:"max-height 0.24s ease, opacity 0.18s ease, margin-bottom 0.24s ease",marginBottom:0,pointerEvents:_?"none":"auto"},children:[(0,t.jsxs)("div",{className:"flex items-baseline",style:{gap:10,marginBottom:10,flexWrap:"wrap"},children:[(0,t.jsxs)("h1",{style:{fontSize:20,fontWeight:700,letterSpacing:"-0.01em",fontFamily:"var(--font-mono)",margin:0,lineHeight:1.2},children:["sesn_",e.id.replace(/-/g,"").slice(0,22)]}),(0,t.jsx)(r5.LiveBadge,{mtimeIso:e.lastTimestamp,size:"md"}),(0,t.jsx)("span",{style:{fontSize:10.5,padding:"2px 9px",borderRadius:100,background:"var(--af-border-subtle)",color:"var(--af-text-secondary)",fontWeight:500,position:"relative",top:-1},children:"running"===e.status?"Running":"Idle"}),(0,t.jsx)(iG,{}),G&&(0,t.jsx)(iX,{icon:(0,t.jsx)(d,{size:12}),value:G,mono:!0}),(0,t.jsx)(iG,{}),(0,t.jsx)(iX,{icon:(0,t.jsx)(f,{size:12}),value:J,truncate:!0}),(0,t.jsx)(iG,{}),void 0!==K&&(0,t.jsx)(iX,{icon:(0,t.jsx)(u.Clock,{size:12}),value:function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return`${n}m ${t%60}s`}(K)}),(0,t.jsx)(iG,{}),(0,t.jsx)(iY,{usage:X}),(0,t.jsx)(iG,{}),(0,t.jsx)(iX,{value:`${Y} events`}),en.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(iG,{}),(0,t.jsx)(iX,{icon:(0,t.jsx)(p,{size:12}),value:1===en.length?en[0].title?`PR${en[0].prNumber?` #${en[0].prNumber}`:""}: ${en[0].title}`:en[0].prNumber?`PR #${en[0].prNumber}`:"1 PR shipped":`${en.length} PRs shipped`,truncate:!0})]}),(0,t.jsx)("span",{style:{marginLeft:"auto"},children:e.firstTimestamp&&(0,t.jsx)("span",{style:{fontSize:11.5,color:"var(--af-text-tertiary)"},suppressHydrationWarning:!0,children:(0,r6.formatRelative)(e.firstTimestamp)})})]}),(0,t.jsxs)("div",{className:"flex items-center",style:{gap:14,paddingBottom:8},children:[(0,t.jsx)("select",{value:C,onChange:e=>T(e.target.value),className:"sl-compact-select",children:iq.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,t.jsx)("span",{style:{marginLeft:"auto",fontSize:12,color:"var(--af-text-tertiary)"},children:"turns"===C?`${ei.filter(e=>"turn"===e.kind).length} turns \xb7 ${er.length} actions`:"meaningful"===C?`${er.length} rows (of ${ee.length} raw events)`:`${el.length} rows`}),(0,t.jsxs)("button",{title:"Copy all",style:{background:"transparent",border:"none",color:"var(--af-text-secondary)",fontSize:12,cursor:"pointer",display:"inline-flex",alignItems:"center",gap:6},onClick:()=>{let e=er.map(e=>`[${e.kind}] ${iv(e)}`).join("\n");navigator.clipboard?.writeText(e)},children:[(0,t.jsx)(c,{size:12})," Copy all"]}),(0,t.jsx)(io,{onClick:()=>{A(e=>!e),I(null),F(null)}})]})]}),(0,t.jsx)("div",{style:{paddingBottom:10*!!_,transition:"padding-bottom 0.2s ease"},children:"team"===g&&i?(0,t.jsx)(i$,{data:i,playheadMs:y,onSeek:(e,t)=>{k({tsMs:e,trackId:t}),S&&M(!1)},expanded:S,onToggleExpanded:()=>M(e=>!e),visibleTrackIds:w}):(0,t.jsx)(iZ,{displayRows:el,durationMs:V??0,selectedIndex:z,onSelect:eu,headerOffset:$,subagents:e.subagents,collapsed:_,prMarkers:en,selectedSubagentId:E,onSelectSubagent:e=>{F(e),e&&I(null)}})})]}),(0,t.jsx)("div",{style:{padding:"0 40px",paddingRight:ea?484:40,paddingTop:8,transition:"padding-right 0.15s ease"},children:"team"===g&&i?(0,t.jsx)(iB,{initial:i,teamName:i.teamName,playheadMs:y,onPlayheadChange:v,onVisibleTrackIdsChange:j,seekTarget:b}):"transcript"===g?(0,t.jsxs)(t.Fragment,{children:[Z>0&&(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary, #888)",background:"var(--af-surface-subtle, rgba(255,255,255,0.04))",border:"1px solid var(--af-border-subtle, rgba(255,255,255,0.08))",borderRadius:6,padding:"6px 10px",marginBottom:8},children:[Z," inbound team message",1===Z?"":"s"," hidden —"," ",(0,t.jsx)("button",{onClick:()=>x("team"),style:{background:"none",border:"none",color:"var(--af-accent)",cursor:"pointer",padding:0,font:"inherit",textDecoration:"underline"},children:"open the Team tab"})," ","to see them."]}),(0,t.jsx)(i2,{displayRows:el,rowRefs:B,selectedIndex:z,onSelect:I,onToggleTurn:function(e){P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},stickyOffset:$+16,isSessionLive:et,team:i})]}):(0,t.jsx)(or,{events:q})}),ea&&(0,t.jsx)("aside",{style:{position:"fixed",top:$,right:0,bottom:0,width:460,borderLeft:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",overflowY:"auto",zIndex:25,boxShadow:"-8px 0 24px rgba(15, 23, 42, 0.05)"},children:(0,t.jsx)(oa,{event:ea,row:es,onClose:()=>I(null)})}),(a=E?e.subagents?.find(e=>e.agentId===E):void 0)?(0,t.jsx)("aside",{style:{position:"fixed",top:$,right:0,bottom:0,width:460,borderLeft:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",overflowY:"auto",zIndex:26,boxShadow:"-8px 0 24px rgba(15, 23, 42, 0.08)"},children:(0,t.jsx)(oi,{subagent:a,onClose:()=>F(null),onJumpToParent:()=>{if(!a.parentToolUseId)return;let e=q.find(e=>e.blocks.some(e=>e?.type==="tool_use"&&"Agent"===e.name&&e.id===a.parentToolUseId));e&&(F(null),eu(e.index))}})}):null,L&&(0,t.jsx)("aside",{style:{position:"fixed",top:$,right:0,bottom:0,width:460,borderLeft:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",zIndex:27,boxShadow:"-8px 0 24px rgba(15, 23, 42, 0.08)",display:"flex",flexDirection:"column"},children:(0,t.jsx)(il,{sessionId:e.id,onClose:()=>A(!1)})}),(0,t.jsx)(iu,{isLive:et})]})}],90603)}]);
|