@codeyam/codeyam-cli 0.1.0-staging.c1c8678 → 0.1.0-staging.c5503ac

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/analyzer-template/.build-info.json +6 -6
  2. package/analyzer-template/log.txt +3 -3
  3. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +179 -0
  4. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -0
  5. package/codeyam-cli/src/utils/backgroundServer.js +0 -10
  6. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  7. package/codeyam-cli/src/utils/npmVersionCheck.js +76 -0
  8. package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -0
  9. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js +66 -0
  10. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js.map +1 -0
  11. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-jNYXRRNI.js +1 -0
  12. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-BLlhOa3C.js → EntityItem-bwuHPyTa.js} +1 -1
  13. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-De5b5pC7.js → EntityTypeBadge-CvzqMxcu.js} +1 -1
  14. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CzdG5I7z.js → EntityTypeIcon-BH0XDim7.js} +1 -1
  15. package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-Bclf8Hka.js → InlineSpinner-EhOseatT.js} +1 -1
  16. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-Ce-byqKl.js → InteractivePreview-yjIHlOGa.js} +2 -2
  17. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-DEMHrl7v.js → LibraryFunctionPreview-Cq5o8jL4.js} +1 -1
  18. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B1LNGboS.js → LoadingDots-BvMu2i-g.js} +1 -1
  19. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-B0Ll1DjK.js → LogViewer-kgBTLoJD.js} +1 -1
  20. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-CVOvmCKb.js → ReportIssueModal-BzPgx-xO.js} +1 -1
  21. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-L0DWHa_L.js → SafeScreenshot-CwZrv-Ok.js} +1 -1
  22. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-D54Mmpwi.js → ScenarioViewer-BX2Ny2Qj.js} +1 -1
  23. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-C7PFQfXy.js → TruncatedFilePath-CDpEprKa.js} +1 -1
  24. package/codeyam-cli/src/webserver/build/client/assets/{_index-CKTtYlBU.js → _index-BRx8ZGZo.js} +1 -1
  25. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-CdziRIWU.js → activity.(_tab)-4S4yPfFw.js} +1 -1
  26. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-CPXtdaWm.js → agent-transcripts-DHKuQSmR.js} +1 -1
  27. package/codeyam-cli/src/webserver/build/client/assets/{book-open-Ch8b7GyQ.js → book-open-D4IPYH_y.js} +1 -1
  28. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-vJHJExlT.js → chevron-down-CG65viiV.js} +1 -1
  29. package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-BEyX4X6_.js → chunk-JZWAC4HX-DB3aFuEO.js} +11 -11
  30. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-rwynPZTW.js → circle-check-igfMr5DY.js} +1 -1
  31. package/codeyam-cli/src/webserver/build/client/assets/{copy-BBSpeBYf.js → copy-Coc4o_8c.js} +1 -1
  32. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-DHVDauuc.js → createLucideIcon-D1zB-pYc.js} +1 -1
  33. package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-B9_ZqelV.js → dev.empty-JTAjQ54M.js} +1 -1
  34. package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-B0h9AqE6.js +23 -0
  35. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-Cfw__yQa.js → entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js} +1 -1
  36. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-BIDUUrI3.js → entity._sha_.create-scenario-CtYowLOt.js} +1 -1
  37. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-BEqewwtZ.js → entity._sha_.edit._scenarioId-PePWg17F.js} +1 -1
  38. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-Dxqz8ygt.js → entry.client-I-Wo99C_.js} +1 -1
  39. package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-CYnF5KWN.js → fileTableUtils-9sMMAiWJ.js} +1 -1
  40. package/codeyam-cli/src/webserver/build/client/assets/{files-B_dAq2PQ.js → files-Co65J0s3.js} +1 -1
  41. package/codeyam-cli/src/webserver/build/client/assets/{git-BHPqH3Ch.js → git-BdHOxVfg.js} +1 -1
  42. package/codeyam-cli/src/webserver/build/client/assets/globals-CCgBKWy4.css +1 -0
  43. package/codeyam-cli/src/webserver/build/client/assets/{index-viijWaN6.js → index-CUM5iXwc.js} +1 -1
  44. package/codeyam-cli/src/webserver/build/client/assets/{index-DgAAopZk.js → index-_417gcQW.js} +1 -1
  45. package/codeyam-cli/src/webserver/build/client/assets/{labs-ChoAe3xq.js → labs-BK0C1H1T.js} +1 -1
  46. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-LGi2eKI5.js → loader-circle-TzRHMVog.js} +1 -1
  47. package/codeyam-cli/src/webserver/build/client/assets/{manifest-87493a32.js → manifest-7d29f0c4.js} +1 -1
  48. package/codeyam-cli/src/webserver/build/client/assets/memory-CzZySbBE.js +78 -0
  49. package/codeyam-cli/src/webserver/build/client/assets/{pause-DxJFmMsK.js → pause-hjzB7t2z.js} +1 -1
  50. package/codeyam-cli/src/webserver/build/client/assets/root-COPwrT8R.js +62 -0
  51. package/codeyam-cli/src/webserver/build/client/assets/{search-Cu3QE9E5.js → search-DcAwD_Ln.js} +1 -1
  52. package/codeyam-cli/src/webserver/build/client/assets/{settings-KH9TdArD.js → settings-CclxrcPK.js} +1 -1
  53. package/codeyam-cli/src/webserver/build/client/assets/{simulations-D9Fkx0-d.js → simulations-DVNJVQgD.js} +1 -1
  54. package/codeyam-cli/src/webserver/build/client/assets/{terminal-dAhIBEcd.js → terminal-DbEAHMbA.js} +1 -1
  55. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-C4CYTEeP.js → triangle-alert-CAD5b1o_.js} +1 -1
  56. package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-CLPnITMB.js → useCustomSizes-BqgrAzs3.js} +1 -1
  57. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-DmGI38Et.js → useLastLogLine-DAFqfEDH.js} +1 -1
  58. package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-BK0S88PB.js → useReportContext-DZlYx2c4.js} +1 -1
  59. package/codeyam-cli/src/webserver/build/client/assets/{useToast-CJ-JqR0l.js → useToast-ihdMtlf6.js} +1 -1
  60. package/codeyam-cli/src/webserver/build/server/assets/{index-CkkmL6r5.js → index-ChT1lWao.js} +1 -1
  61. package/codeyam-cli/src/webserver/build/server/assets/{server-build-iBGjHYtO.js → server-build-CtNSi7yC.js} +63 -63
  62. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  63. package/codeyam-cli/src/webserver/build-info.json +5 -5
  64. package/codeyam-cli/templates/rules-instructions.md +1 -1
  65. package/package.json +1 -1
  66. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-D9i_zSlY.js +0 -1
  67. package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-BOPComvD.js +0 -16
  68. package/codeyam-cli/src/webserver/build/client/assets/globals-BJGhRykz.css +0 -1
  69. package/codeyam-cli/src/webserver/build/client/assets/memory-D9eA6kTo.js +0 -78
  70. package/codeyam-cli/src/webserver/build/client/assets/root-C3r0p_7H.js +0 -62
@@ -1,78 +0,0 @@
1
- import{H as Gn,j as u,r as R,w as oi,u as ui,c as ci,f as hi,L as fi}from"./chunk-JZWAC4HX-BEyX4X6_.js";import{u as pi}from"./useReportContext-BK0S88PB.js";import{c as ke}from"./createLucideIcon-DHVDauuc.js";import{T as Xn,C as Dt}from"./terminal-dAhIBEcd.js";import{a as vt,C as Je}from"./copy-BBSpeBYf.js";import{s as zt,h as mi,f as di,a as xi,b as gi,d as _t,C as yi}from"./CopyButton-D9i_zSlY.js";import{S as Jn}from"./search-Cu3QE9E5.js";import{F as Nt,P as bi}from"./pause-DxJFmMsK.js";import{C as ki}from"./chevron-down-vJHJExlT.js";import{B as wi}from"./book-open-Ch8b7GyQ.js";/**
2
- * @license lucide-react v0.556.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Ci=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ji=ke("eye",Ci);/**
7
- * @license lucide-react v0.556.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const vi=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Ni=ke("folder-tree",vi);/**
12
- * @license lucide-react v0.556.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Si=[["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"}]],Kn=ke("folder",Si);/**
17
- * @license lucide-react v0.556.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Ei=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],St=ke("info",Ei);/**
22
- * @license lucide-react v0.556.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Ai=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ii=ke("pencil",Ai);/**
27
- * @license lucide-react v0.556.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Ti=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Mt=ke("plus",Ti);/**
32
- * @license lucide-react v0.556.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const Fi=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Pi=ke("trash-2",Fi);/**
37
- * @license lucide-react v0.556.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const Ri=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bt=ke("x",Ri),Li={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"};const Di=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_i={};function on(e,n){return(_i.jsx?zi:Di).test(e)}const Mi=/[ \t\n\f\r]/g;function Bi(e){return typeof e=="object"?e.type==="text"?un(e.value):!1:un(e)}function un(e){return e.replace(Mi,"")===""}var Se={},ot,cn;function Oi(){if(cn)return ot;cn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
42
- `,o="/",f="*",h="",m="comment",p="declaration";function x(C,y){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];y=y||{};var j=1,N=1;function L(A){var S=A.match(n);S&&(j+=S.length);var M=A.lastIndexOf(c);N=~M?A.length-M:N+A.length}function T(){var A={line:j,column:N};return function(S){return S.position=new w(A),O(),S}}function w(A){this.start=A,this.end={line:j,column:N},this.source=y.source}w.prototype.content=C;function _(A){var S=new Error(y.source+":"+j+":"+N+": "+A);if(S.reason=A,S.filename=y.source,S.line=j,S.column=N,S.source=C,!y.silent)throw S}function H(A){var S=A.exec(C);if(S){var M=S[0];return L(M),C=C.slice(M.length),S}}function O(){H(t)}function k(A){var S;for(A=A||[];S=F();)S!==!1&&A.push(S);return A}function F(){var A=T();if(!(o!=C.charAt(0)||f!=C.charAt(1))){for(var S=2;h!=C.charAt(S)&&(f!=C.charAt(S)||o!=C.charAt(S+1));)++S;if(S+=2,h===C.charAt(S-1))return _("End of comment missing");var M=C.slice(2,S-2);return N+=2,L(M),C=C.slice(S),N+=2,A({type:m,comment:M})}}function P(){var A=T(),S=H(r);if(S){if(F(),!H(i))return _("property missing ':'");var M=H(l),q=A({type:p,property:b(S[0].replace(e,h)),value:M?b(M[0].replace(e,h)):h});return H(s),q}}function E(){var A=[];k(A);for(var S;S=P();)S!==!1&&(A.push(S),k(A));return A}return O(),E()}function b(C){return C?C.replace(a,h):h}return ot=x,ot}var hn;function $i(){if(hn)return Se;hn=1;var e=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.default=t;const n=e(Oi());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const s=(0,n.default)(r),a=typeof i=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:o,value:f}=c;a?i(o,f,c):f&&(l=l||{},l[o]=f)}),l}return Se}var Re={},fn;function Hi(){if(fn)return Re;fn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(o){return!o||t.test(o)||e.test(o)},s=function(o,f){return f.toUpperCase()},a=function(o,f){return"".concat(f,"-")},c=function(o,f){return f===void 0&&(f={}),l(o)?o:(o=o.toLowerCase(),f.reactCompat?o=o.replace(i,a):o=o.replace(r,a),o.replace(n,s))};return Re.camelCase=c,Re}var Le,pn;function Vi(){if(pn)return Le;pn=1;var e=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e($i()),t=Hi();function r(i,l){var s={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(s[(0,t.camelCase)(a,l)]=c)}),s}return r.default=r,Le=r,Le}var qi=Vi();const Wi=Gn(qi),Zn=er("end"),Ot=er("start");function er(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ui(e){const n=Ot(e),t=Zn(e);if(n&&t)return{start:n,end:t}}function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?mn(e.position):"start"in e||"end"in e?mn(e):"line"in e||"column"in e?Et(e):""}function Et(e){return dn(e&&e.line)+":"+dn(e&&e.column)}function mn(e){return Et(e&&e.start)+"-"+Et(e&&e.end)}function dn(e){return e&&typeof e=="number"?e:1}class re extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},s=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(s=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=_e(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=s&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}re.prototype.file="";re.prototype.name="";re.prototype.reason="";re.prototype.message="";re.prototype.stack="";re.prototype.column=void 0;re.prototype.line=void 0;re.prototype.ancestors=void 0;re.prototype.cause=void 0;re.prototype.fatal=void 0;re.prototype.place=void 0;re.prototype.ruleId=void 0;re.prototype.source=void 0;const $t={}.hasOwnProperty,Yi=new Map,Qi=/[A-Z]/g,Gi=new Set(["table","tbody","thead","tfoot","tr"]),Xi=new Set(["td","th"]),tr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ji(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ss(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=is(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?zt:mi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=nr(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function nr(e,n,t){if(n.type==="element")return Ki(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Zi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ts(e,n,t);if(n.type==="mdxjsEsm")return es(e,n);if(n.type==="root")return ns(e,n,t);if(n.type==="text")return rs(e,n)}function Ki(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=zt,e.schema=i),e.ancestors.push(n);const l=ir(e,n.tagName,!1),s=ls(e,n);let a=Vt(e,n);return Gi.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Bi(c):!0})),rr(e,s,l,n),Ht(s,a),e.ancestors.pop(),e.schema=r,e.create(n,l,s,t)}function Zi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}$e(e,n.position)}function es(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);$e(e,n.position)}function ts(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=zt,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:ir(e,n.name,!0),s=as(e,n),a=Vt(e,n);return rr(e,s,l,n),Ht(s,a),e.ancestors.pop(),e.schema=r,e.create(n,l,s,t)}function ns(e,n,t){const r={};return Ht(r,Vt(e,n)),e.create(n,e.Fragment,r,t)}function rs(e,n){return n.value}function rr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Ht(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function is(e,n,t){return r;function r(i,l,s,a){const o=Array.isArray(s.children)?t:n;return a?o(l,s,a):o(l,s)}}function ss(e,n){return t;function t(r,i,l,s){const a=Array.isArray(l.children),c=Ot(r);return n(i,l,s,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ls(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&$t.call(n.properties,i)){const l=os(e,i,n.properties[i]);if(l){const[s,a]=l;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Xi.has(n.tagName)?r=a:t[s]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function as(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const s=l.expression;s.type;const a=s.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else $e(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else $e(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Vt(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Yi;for(;++r<n.children.length;){const l=n.children[r];let s;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const o=i.get(c)||0;s=c+"-"+o,i.set(c,o+1)}}const a=nr(e,l,s);a!==void 0&&t.push(a)}return t}function os(e,n,t){const r=di(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?xi(t):gi(t)),r.property==="style"){let i=typeof t=="object"?t:us(e,String(t));return e.stylePropertyNameCase==="css"&&(i=cs(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Li[r.property]||r.property:r.attribute,t]}}function us(e,n){try{return Wi(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new re("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=tr+"#cannot-parse-style-attribute",i}}function ir(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,s;for(;++l<i.length;){const a=on(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=s}else r=on(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return $t.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);$e(e)}function $e(e,n){const t=new re("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=tr+"#cannot-handle-mdx-estrees-without-createevaluater",t}function cs(e){const n={};let t;for(t in e)$t.call(e,t)&&(n[hs(t)]=e[t]);return n}function hs(e){let n=e.replace(Qi,fs);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function fs(e){return"-"+e.toLowerCase()}const ut={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"]},ps={};function qt(e,n){const t=ps,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return sr(e,r,i)}function sr(e,n,t){if(ms(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xn(e.children,n,t)}return Array.isArray(e)?xn(e,n,t):""}function xn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=sr(e[i],n,t);return r.join("")}function ms(e){return!!(e&&typeof e=="object")}function ue(e,n,t,r){const i=e.length;let l=0,s;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);l<r.length;)s=r.slice(l,l+1e4),s.unshift(n,0),e.splice(...s),l+=1e4,n+=1e4}function ce(e,n){return e.length>0?(ue(e,e.length,0,n),e):n}const gn={}.hasOwnProperty;function lr(e){const n={};let t=-1;for(;++t<e.length;)ds(n,e[t]);return n}function ds(e,n){let t;for(t in n){const i=(gn.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let s;if(l)for(s in l){gn.call(i,s)||(i[s]=[]);const a=l[s];xs(i[s],Array.isArray(a)?a:a?[a]:[])}}}function xs(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ue(e,0,0,r)}function ar(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const se=we(/[A-Za-z]/),ne=we(/[\dA-Za-z]/),gs=we(/[#-'*+\--9=?A-Z^-~]/);function Ke(e){return e!==null&&(e<32||e===127)}const At=we(/\d/),ys=we(/[\dA-Fa-f]/),bs=we(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function V(e){return e===-2||e===-1||e===32}const nt=we(new RegExp("\\p{P}|\\p{S}","u")),ve=we(/\s/);function we(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Te(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let s="";if(l===37&&ne(e.charCodeAt(t+1))&&ne(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(s=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(s=String.fromCharCode(l,a),i=1):s="�"}else s=String.fromCharCode(l);s&&(n.push(e.slice(r,t),encodeURIComponent(s)),r=t+i+1,s=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return s;function s(c){return V(c)?(e.enter(t),a(c)):n(c)}function a(c){return V(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const ks={tokenize:ws};function ws(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),s)}}const Cs={tokenize:js},yn={tokenize:vs};function js(e){const n=this,t=[];let r=0,i,l,s;return a;function a(N){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,c,o)(N)}return o(N)}function c(N){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&j();const L=n.events.length;let T=L,w;for(;T--;)if(n.events[T][0]==="exit"&&n.events[T][1].type==="chunkFlow"){w=n.events[T][1].end;break}y(r);let _=L;for(;_<n.events.length;)n.events[_][1].end={...w},_++;return ue(n.events,T+1,0,n.events.slice(L)),n.events.length=_,o(N)}return a(N)}function o(N){if(r===t.length){if(!i)return m(N);if(i.currentConstruct&&i.currentConstruct.concrete)return x(N);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(yn,f,h)(N)}function f(N){return i&&j(),y(r),m(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,x(N)}function m(N){return n.containerState={},e.attempt(yn,p,x)(N)}function p(N){return r++,t.push([n.currentConstruct,n.containerState]),m(N)}function x(N){if(N===null){i&&j(),y(0),e.consume(N);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),b(N)}function b(N){if(N===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(N);return}return D(N)?(e.consume(N),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(N),b)}function C(N,L){const T=n.sliceStream(N);if(L&&T.push(null),N.previous=l,l&&(l.next=N),l=N,i.defineSkip(N.start),i.write(T),n.parser.lazy[N.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const _=n.events.length;let H=_,O,k;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){if(O){k=n.events[H][1].end;break}O=!0}for(y(r),w=_;w<n.events.length;)n.events[w][1].end={...k},w++;ue(n.events,H+1,0,n.events.slice(_)),n.events.length=w}}function y(N){let L=t.length;for(;L-- >N;){const T=t[L];n.containerState=T[1],T[0].exit.call(n,e)}t.length=N}function j(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function vs(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ie(e){if(e===null||Q(e)||ve(e))return 1;if(nt(e))return 2}function rt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const It={name:"attention",resolveAll:Ns,tokenize:Ss};function Ns(e,n){let t=-1,r,i,l,s,a,c,o,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[t][1].start};bn(h,-c),bn(m,c),s={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[t][1].start={...a.end},o=[],e[r][1].end.offset-e[r][1].start.offset&&(o=ce(o,[["enter",e[r][1],n],["exit",e[r][1],n]])),o=ce(o,[["enter",i,n],["enter",s,n],["exit",s,n],["enter",l,n]]),o=ce(o,rt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),o=ce(o,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,o=ce(o,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,ue(e,r-1,t-r+3,o),t=r+o.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Ss(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ie(r);let l;return s;function s(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const o=e.exit("attentionSequence"),f=Ie(c),h=!f||f===2&&i||t.includes(c),m=!i||i===2&&f||t.includes(r);return o._open=!!(l===42?h:h&&(i||!m)),o._close=!!(l===42?m:m&&(f||!h)),n(c)}}function bn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Es={name:"autolink",tokenize:As};function As(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return se(p)?(e.consume(p),s):p===64?t(p):o(p)}function s(p){return p===43||p===45||p===46||ne(p)?(r=1,a(p)):o(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ne(p))&&r++<32?(e.consume(p),a):(r=0,o(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||Ke(p)?t(p):(e.consume(p),c)}function o(p){return p===64?(e.consume(p),f):gs(p)?(e.consume(p),o):t(p)}function f(p){return ne(p)?h(p):t(p)}function h(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):m(p)}function m(p){if((p===45||ne(p))&&r++<63){const x=p===45?m:h;return e.consume(p),x}return t(p)}}const Ve={partial:!0,tokenize:Is};function Is(e,n,t){return r;function r(l){return V(l)?U(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||D(l)?n(l):t(l)}}const or={continuation:{tokenize:Fs},exit:Ps,name:"blockQuote",tokenize:Ts};function Ts(e,n,t){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),l}return t(s)}function l(s){return V(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(s))}}function Fs(e,n,t){const r=this;return i;function i(s){return V(s)?U(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):l(s)}function l(s){return e.attempt(or,n,t)(s)}}function Ps(e){e.exit("blockQuote")}const ur={name:"characterEscape",tokenize:Rs};function Rs(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return bs(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const cr={name:"characterReference",tokenize:Ls};function Ls(e,n,t){const r=this;let i=0,l,s;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),o):(e.enter("characterReferenceValue"),l=31,s=ne,f(h))}function o(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,s=ys,f):(e.enter("characterReferenceValue"),l=7,s=At,f(h))}function f(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return s===ne&&!_t(r.sliceSerialize(m))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return s(h)&&i++<l?(e.consume(h),f):t(h)}}const kn={partial:!0,tokenize:zs},wn={concrete:!0,name:"codeFenced",tokenize:Ds};function Ds(e,n,t){const r=this,i={partial:!0,tokenize:T};let l=0,s=0,a;return c;function c(w){return o(w)}function o(w){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(s++,e.consume(w),f):s<3?t(w):(e.exit("codeFencedFenceSequence"),V(w)?U(e,h,"whitespace")(w):h(w))}function h(w){return w===null||D(w)?(e.exit("codeFencedFence"),r.interrupt?n(w):e.check(kn,b,L)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(w)):V(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(w)):w===96&&w===a?t(w):(e.consume(w),m)}function p(w){return w===null||D(w)?h(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(w)):w===96&&w===a?t(w):(e.consume(w),x)}function b(w){return e.attempt(i,L,C)(w)}function C(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return l>0&&V(w)?U(e,j,"linePrefix",l+1)(w):j(w)}function j(w){return w===null||D(w)?e.check(kn,b,L)(w):(e.enter("codeFlowValue"),N(w))}function N(w){return w===null||D(w)?(e.exit("codeFlowValue"),j(w)):(e.consume(w),N)}function L(w){return e.exit("codeFenced"),n(w)}function T(w,_,H){let O=0;return k;function k(S){return w.enter("lineEnding"),w.consume(S),w.exit("lineEnding"),F}function F(S){return w.enter("codeFencedFence"),V(S)?U(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):P(S)}function P(S){return S===a?(w.enter("codeFencedFenceSequence"),E(S)):H(S)}function E(S){return S===a?(O++,w.consume(S),E):O>=s?(w.exit("codeFencedFenceSequence"),V(S)?U(w,A,"whitespace")(S):A(S)):H(S)}function A(S){return S===null||D(S)?(w.exit("codeFencedFence"),_(S)):H(S)}}}function zs(e,n,t){const r=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l)}function l(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}const ct={name:"codeIndented",tokenize:Ms},_s={partial:!0,tokenize:Bs};function Ms(e,n,t){const r=this;return i;function i(o){return e.enter("codeIndented"),U(e,l,"linePrefix",5)(o)}function l(o){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(o):t(o)}function s(o){return o===null?c(o):D(o)?e.attempt(_s,s,c)(o):(e.enter("codeFlowValue"),a(o))}function a(o){return o===null||D(o)?(e.exit("codeFlowValue"),s(o)):(e.consume(o),a)}function c(o){return e.exit("codeIndented"),n(o)}}function Bs(e,n,t){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):D(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):U(e,l,"linePrefix",5)(s)}function l(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(s):D(s)?i(s):t(s)}}const Os={name:"codeText",previous:Hs,resolve:$s,tokenize:Vs};function $s(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Hs(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vs(e,n,t){let r=0,i,l;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(l=e.enter("codeTextSequence"),i=0,f(h)):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),o(h))}function o(h){return h===null||h===32||h===96||D(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),o)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(l.type="codeTextData",o(h))}}class qs{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&De(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),De(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),De(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);De(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);De(this.left,t.reverse())}}}function De(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function hr(e){const n={};let t=-1,r,i,l,s,a,c,o;const f=new qs(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Ws(f,t)),t=n[t],o=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(s=f.get(l),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=l);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return ue(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!o}function Ws(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,c=[],o={};let f,h,m=-1,p=t,x=0,b=0;const C=[b];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(b=m+1,C.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),m=C.length;m--;){const y=a.slice(C[m],C[m+1]),j=l.pop();c.push([j,j+y.length-1]),e.splice(j,2,y)}for(c.reverse(),m=-1;++m<c.length;)o[x+c[m][0]]=x+c[m][1],x+=c[m][1]-c[m][0]-1;return o}const Us={resolve:Qs,tokenize:Gs},Ys={partial:!0,tokenize:Xs};function Qs(e){return hr(e),e}function Gs(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):D(a)?e.check(Ys,s,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function s(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Xs(e,n,t){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,l,"linePrefix")}function l(s){if(s===null||D(s))return t(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function fr(e,n,t,r,i,l,s,a,c){const o=c||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(y),e.exit(l),m):y===null||y===32||y===41||Ke(y)?t(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),m(y)):y===null||y===60||D(y)?t(y):(e.consume(y),y===92?x:p)}function x(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!f&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),n(y)):f<o&&y===40?(e.consume(y),f++,b):y===41?(e.consume(y),f--,b):y===null||y===32||y===40||Ke(y)?t(y):(e.consume(y),y===92?C:b)}function C(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function pr(e,n,t,r,i,l){const s=this;let a=0,c;return o;function o(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),c||(c=!V(p)),p===92?m:h)}function m(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function mr(e,n,t,r,i,l){let s;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,c):t(m)}function c(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),n):(e.enter(l),o(m))}function o(m){return m===s?(e.exit(l),c(s)):m===null?t(m):D(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),U(e,o,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===s||m===null||D(m)?(e.exit("chunkString"),o(m)):(e.consume(m),m===92?h:f)}function h(m){return m===s||m===92?(e.consume(m),f):f(m)}}function Me(e,n){let t;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):V(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Js={name:"definition",tokenize:Zs},Ks={partial:!0,tokenize:el};function Zs(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),s(p)}function s(p){return pr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return Q(p)?Me(e,o)(p):o(p)}function o(p){return fr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ks,h,h)(p)}function h(p){return V(p)?U(e,m,"whitespace")(p):m(p)}function m(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function el(e,n,t){return r;function r(a){return Q(a)?Me(e,i)(a):t(a)}function i(a){return mr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return V(a)?U(e,s,"whitespace")(a):s(a)}function s(a){return a===null||D(a)?n(a):t(a)}}const tl={name:"hardBreakEscape",tokenize:nl};function nl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return D(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const rl={name:"headingAtx",resolve:il,tokenize:sl};function il(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ue(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function sl(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Q(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||D(f)?(e.exit("atxHeading"),n(f)):V(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),o(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function o(f){return f===null||f===35||Q(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),o)}}const ll=["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"],Cn=["pre","script","style","textarea"],al={concrete:!0,name:"htmlFlow",resolveTo:cl,tokenize:hl},ol={partial:!0,tokenize:pl},ul={partial:!0,tokenize:fl};function cl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function hl(e,n,t){const r=this;let i,l,s,a,c;return o;function o(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),h}function h(d){return d===33?(e.consume(d),m):d===47?(e.consume(d),l=!0,b):d===63?(e.consume(d),i=3,r.interrupt?n:g):se(d)?(e.consume(d),s=String.fromCharCode(d),C):t(d)}function m(d){return d===45?(e.consume(d),i=2,p):d===91?(e.consume(d),i=5,a=0,x):se(d)?(e.consume(d),i=4,r.interrupt?n:g):t(d)}function p(d){return d===45?(e.consume(d),r.interrupt?n:g):t(d)}function x(d){const Z="CDATA[";return d===Z.charCodeAt(a++)?(e.consume(d),a===Z.length?r.interrupt?n:P:x):t(d)}function b(d){return se(d)?(e.consume(d),s=String.fromCharCode(d),C):t(d)}function C(d){if(d===null||d===47||d===62||Q(d)){const Z=d===47,le=s.toLowerCase();return!Z&&!l&&Cn.includes(le)?(i=1,r.interrupt?n(d):P(d)):ll.includes(s.toLowerCase())?(i=6,Z?(e.consume(d),y):r.interrupt?n(d):P(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):l?j(d):N(d))}return d===45||ne(d)?(e.consume(d),s+=String.fromCharCode(d),C):t(d)}function y(d){return d===62?(e.consume(d),r.interrupt?n:P):t(d)}function j(d){return V(d)?(e.consume(d),j):k(d)}function N(d){return d===47?(e.consume(d),k):d===58||d===95||se(d)?(e.consume(d),L):V(d)?(e.consume(d),N):k(d)}function L(d){return d===45||d===46||d===58||d===95||ne(d)?(e.consume(d),L):T(d)}function T(d){return d===61?(e.consume(d),w):V(d)?(e.consume(d),T):N(d)}function w(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),c=d,_):V(d)?(e.consume(d),w):H(d)}function _(d){return d===c?(e.consume(d),c=null,O):d===null||D(d)?t(d):(e.consume(d),_)}function H(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Q(d)?T(d):(e.consume(d),H)}function O(d){return d===47||d===62||V(d)?N(d):t(d)}function k(d){return d===62?(e.consume(d),F):t(d)}function F(d){return d===null||D(d)?P(d):V(d)?(e.consume(d),F):t(d)}function P(d){return d===45&&i===2?(e.consume(d),M):d===60&&i===1?(e.consume(d),q):d===62&&i===4?(e.consume(d),te):d===63&&i===3?(e.consume(d),g):d===93&&i===5?(e.consume(d),J):D(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ol,K,E)(d)):d===null||D(d)?(e.exit("htmlFlowData"),E(d)):(e.consume(d),P)}function E(d){return e.check(ul,A,K)(d)}function A(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),S}function S(d){return d===null||D(d)?E(d):(e.enter("htmlFlowData"),P(d))}function M(d){return d===45?(e.consume(d),g):P(d)}function q(d){return d===47?(e.consume(d),s="",X):P(d)}function X(d){if(d===62){const Z=s.toLowerCase();return Cn.includes(Z)?(e.consume(d),te):P(d)}return se(d)&&s.length<8?(e.consume(d),s+=String.fromCharCode(d),X):P(d)}function J(d){return d===93?(e.consume(d),g):P(d)}function g(d){return d===62?(e.consume(d),te):d===45&&i===2?(e.consume(d),g):P(d)}function te(d){return d===null||D(d)?(e.exit("htmlFlowData"),K(d)):(e.consume(d),te)}function K(d){return e.exit("htmlFlow"),n(d)}}function fl(e,n,t){const r=this;return i;function i(s){return D(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):t(s)}function l(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}function pl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ve,n,t)}}const ml={name:"htmlText",tokenize:dl};function dl(e,n,t){const r=this;let i,l,s;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),o):g===47?(e.consume(g),T):g===63?(e.consume(g),N):se(g)?(e.consume(g),H):t(g)}function o(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,x):se(g)?(e.consume(g),j):t(g)}function f(g){return g===45?(e.consume(g),p):t(g)}function h(g){return g===null?t(g):g===45?(e.consume(g),m):D(g)?(s=h,q(g)):(e.consume(g),h)}function m(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?M(g):g===45?m(g):h(g)}function x(g){const te="CDATA[";return g===te.charCodeAt(l++)?(e.consume(g),l===te.length?b:x):t(g)}function b(g){return g===null?t(g):g===93?(e.consume(g),C):D(g)?(s=b,q(g)):(e.consume(g),b)}function C(g){return g===93?(e.consume(g),y):b(g)}function y(g){return g===62?M(g):g===93?(e.consume(g),y):b(g)}function j(g){return g===null||g===62?M(g):D(g)?(s=j,q(g)):(e.consume(g),j)}function N(g){return g===null?t(g):g===63?(e.consume(g),L):D(g)?(s=N,q(g)):(e.consume(g),N)}function L(g){return g===62?M(g):N(g)}function T(g){return se(g)?(e.consume(g),w):t(g)}function w(g){return g===45||ne(g)?(e.consume(g),w):_(g)}function _(g){return D(g)?(s=_,q(g)):V(g)?(e.consume(g),_):M(g)}function H(g){return g===45||ne(g)?(e.consume(g),H):g===47||g===62||Q(g)?O(g):t(g)}function O(g){return g===47?(e.consume(g),M):g===58||g===95||se(g)?(e.consume(g),k):D(g)?(s=O,q(g)):V(g)?(e.consume(g),O):M(g)}function k(g){return g===45||g===46||g===58||g===95||ne(g)?(e.consume(g),k):F(g)}function F(g){return g===61?(e.consume(g),P):D(g)?(s=F,q(g)):V(g)?(e.consume(g),F):O(g)}function P(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,E):D(g)?(s=P,q(g)):V(g)?(e.consume(g),P):(e.consume(g),A)}function E(g){return g===i?(e.consume(g),i=void 0,S):g===null?t(g):D(g)?(s=E,q(g)):(e.consume(g),E)}function A(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||Q(g)?O(g):(e.consume(g),A)}function S(g){return g===47||g===62||Q(g)?O(g):t(g)}function M(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function q(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),X}function X(g){return V(g)?U(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):J(g)}function J(g){return e.enter("htmlTextData"),s(g)}}const Wt={name:"labelEnd",resolveAll:bl,resolveTo:kl,tokenize:wl},xl={tokenize:Cl},gl={tokenize:jl},yl={tokenize:vl};function bl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ue(e,0,e.length,t),e}function kl(e,n){let t=e.length,r=0,i,l,s,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},o={type:"label",start:{...e[l][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",c,n],["enter",o,n]],a=ce(a,e.slice(l+1,l+r+3)),a=ce(a,[["enter",f,n]]),a=ce(a,rt(n.parser.constructs.insideSpan.null,e.slice(l+r+4,s-3),n)),a=ce(a,[["exit",f,n],e[s-2],e[s-1],["exit",o,n]]),a=ce(a,e.slice(s+1)),a=ce(a,[["exit",c,n]]),ue(e,l,e.length,a),e}function wl(e,n,t){const r=this;let i=r.events.length,l,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(m){return l?l._inactive?h(m):(s=r.parser.defined.includes(fe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):t(m)}function c(m){return m===40?e.attempt(xl,f,s?f:h)(m):m===91?e.attempt(gl,f,s?o:h)(m):s?f(m):h(m)}function o(m){return e.attempt(yl,f,h)(m)}function f(m){return n(m)}function h(m){return l._balanced=!0,t(m)}}function Cl(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Q(h)?Me(e,l)(h):l(h)}function l(h){return h===41?f(h):fr(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return Q(h)?Me(e,c)(h):f(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?mr(e,o,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function o(h){return Q(h)?Me(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function jl(e,n,t){const r=this;return i;function i(a){return pr.call(r,e,l,s,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function s(a){return t(a)}}function vl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const Nl={name:"labelStartImage",resolveAll:Wt.resolveAll,tokenize:Sl};function Sl(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):t(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const El={name:"labelStartLink",resolveAll:Wt.resolveAll,tokenize:Al};function Al(e,n,t){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const ht={name:"lineEnding",tokenize:Il};function Il(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}const Xe={name:"thematicBreak",tokenize:Tl};function Tl(e,n,t){let r=0,i;return l;function l(o){return e.enter("thematicBreak"),s(o)}function s(o){return i=o,a(o)}function a(o){return o===i?(e.enter("thematicBreakSequence"),c(o)):r>=3&&(o===null||D(o))?(e.exit("thematicBreak"),n(o)):t(o)}function c(o){return o===i?(e.consume(o),r++,c):(e.exit("thematicBreakSequence"),V(o)?U(e,a,"whitespace")(o):a(o))}}const ae={continuation:{tokenize:Ll},exit:zl,name:"list",tokenize:Rl},Fl={partial:!0,tokenize:_l},Pl={partial:!0,tokenize:Dl};function Rl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:At(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xe,t,o)(p):o(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return At(p)&&++s<10?(e.consume(p),c):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),o(p)):t(p)}function o(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ve,r.interrupt?t:f,e.attempt(Fl,m,h))}function f(p){return r.containerState.initialBlankLine=!0,l++,m(p)}function h(p){return V(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):t(p)}function m(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Ll(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ve,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!V(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Pl,n,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ae,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Dl(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(l):t(l)}}function zl(e){e.exit(this.containerState.type)}function _l(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const s=r.events[r.events.length-1];return!V(l)&&s&&s[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const jn={name:"setextUnderline",resolveTo:Ml,tokenize:Bl};function Ml(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",s,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=s,e.push(["exit",s,n]),e}function Bl(e,n,t){const r=this;let i;return l;function l(o){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=o,s(o)):t(o)}function s(o){return e.enter("setextHeadingLineSequence"),a(o)}function a(o){return o===i?(e.consume(o),a):(e.exit("setextHeadingLineSequence"),V(o)?U(e,c,"lineSuffix")(o):c(o))}function c(o){return o===null||D(o)?(e.exit("setextHeadingLine"),n(o)):t(o)}}const Ol={tokenize:$l};function $l(e){const n=this,t=e.attempt(Ve,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Us,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Hl={resolveAll:xr()},Vl=dr("string"),ql=dr("text");function dr(e){return{resolveAll:xr(e==="text"?Wl:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,s,a);return s;function s(f){return o(f)?l(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),c}function c(f){return o(f)?(t.exit("data"),l(f)):(t.consume(f),c)}function o(f){if(f===null)return!0;const h=i[f];let m=-1;if(h)for(;++m<h.length;){const p=h[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function xr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Wl(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,s=-1,a=0,c;for(;l--;){const o=i[l];if(typeof o=="string"){for(s=o.length;o.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(o===-2)c=!0,a++;else if(o!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const o={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(t,0,["enter",o,n],["exit",o,n]),t+=2)}t++}return e}const Ul={42:ae,43:ae,45:ae,48:ae,49:ae,50:ae,51:ae,52:ae,53:ae,54:ae,55:ae,56:ae,57:ae,62:or},Yl={91:Js},Ql={[-2]:ct,[-1]:ct,32:ct},Gl={35:rl,42:Xe,45:[jn,Xe],60:al,61:jn,95:Xe,96:wn,126:wn},Xl={38:cr,92:ur},Jl={[-5]:ht,[-4]:ht,[-3]:ht,33:Nl,38:cr,42:It,60:[Es,ml],91:El,92:[tl,ur],93:Wt,95:It,96:Os},Kl={null:[It,Hl]},Zl={null:[42,95]},ea={null:[]},ta=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Zl,contentInitial:Yl,disable:ea,document:Ul,flow:Gl,flowInitial:Ql,insideSpan:Kl,string:Xl,text:Jl},Symbol.toStringTag,{value:"Module"}));function na(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let s=[],a=[];const c={attempt:_(T),check:_(w),consume:j,enter:N,exit:L,interrupt:_(w,{interrupt:!0})},o={code:null,containerState:{},defineSkip:b,events:[],now:x,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:h};let f=n.tokenize.call(o,c);return n.resolveAll&&l.push(n),o;function h(F){return s=ce(s,F),C(),s[s.length-1]!==null?[]:(H(n,0),o.events=rt(l,o.events,o),o.events)}function m(F,P){return ia(p(F),P)}function p(F){return ra(s,F)}function x(){const{_bufferIndex:F,_index:P,line:E,column:A,offset:S}=r;return{_bufferIndex:F,_index:P,line:E,column:A,offset:S}}function b(F){i[F.line]=F.column,k()}function C(){let F;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(F){f=f(F)}function j(F){D(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,k()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),o.previous=F}function N(F,P){const E=P||{};return E.type=F,E.start=x(),o.events.push(["enter",E,o]),a.push(E),E}function L(F){const P=a.pop();return P.end=x(),o.events.push(["exit",P,o]),P}function T(F,P){H(F,P.from)}function w(F,P){P.restore()}function _(F,P){return E;function E(A,S,M){let q,X,J,g;return Array.isArray(A)?K(A):"tokenize"in A?K([A]):te(A);function te(ee){return z;function z($){const G=$!==null&&ee[$],ie=$!==null&&ee.null,pe=[...Array.isArray(G)?G:G?[G]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return K(pe)($)}}function K(ee){return q=ee,X=0,ee.length===0?M:d(ee[X])}function d(ee){return z;function z($){return g=O(),J=ee,ee.partial||(o.currentConstruct=ee),ee.name&&o.parser.constructs.disable.null.includes(ee.name)?le():ee.tokenize.call(P?Object.assign(Object.create(o),P):o,c,Z,le)($)}}function Z(ee){return F(J,g),S}function le(ee){return g.restore(),++X<q.length?d(q[X]):M}}}function H(F,P){F.resolveAll&&!l.includes(F)&&l.push(F),F.resolve&&ue(o.events,P,o.events.length-P,F.resolve(o.events.slice(P),o)),F.resolveTo&&(o.events=F.resolveTo(o.events,o))}function O(){const F=x(),P=o.previous,E=o.currentConstruct,A=o.events.length,S=Array.from(a);return{from:A,restore:M};function M(){r=F,o.previous=P,o.currentConstruct=E,o.events.length=A,a=S,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ra(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let s;if(t===i)s=[e[t].slice(r,l)];else{if(s=e.slice(t,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}l>0&&s.push(e[i].slice(0,l))}return s}function ia(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let s;if(typeof l=="string")s=l;else switch(l){case-5:{s="\r";break}case-4:{s=`
43
- `;break}case-3:{s=`\r
44
- `;break}case-2:{s=n?" ":" ";break}case-1:{if(!n&&i)continue;s=" ";break}default:s=String.fromCharCode(l)}i=l===-2,r.push(s)}return r.join("")}function sa(e){const r={constructs:lr([ta,...(e||{}).extensions||[]]),content:i(ks),defined:[],document:i(Cs),flow:i(Ol),lazy:{},string:i(Vl),text:i(ql)};return r;function i(l){return s;function s(a){return na(r,l,a)}}}function la(e){for(;!hr(e););return e}const vn=/[\0\t\n\r]/g;function aa(){let e=1,n="",t=!0,r;return i;function i(l,s,a){const c=[];let o,f,h,m,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(s||void 0).decode(l)),h=0,n="",t&&(l.charCodeAt(0)===65279&&h++,t=void 0);h<l.length;){if(vn.lastIndex=h,o=vn.exec(l),m=o&&o.index!==void 0?o.index:l.length,p=l.charCodeAt(m),!o){n=l.slice(h);break}if(p===10&&h===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<m&&(c.push(l.slice(h,m)),e+=m-h),p){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=m+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const oa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ua(e){return e.replace(oa,ca)}function ca(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return ar(t.slice(l?2:1),l?16:10)}return _t(t)||e}const gr={}.hasOwnProperty;function ha(e,n,t){return typeof n!="string"&&(t=n,n=void 0),fa(t)(la(sa(t).document().write(aa()(e,n,!0))))}function fa(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(ln),autolinkProtocol:O,autolinkEmail:O,atxHeading:l(nn),blockQuote:l(ie),characterEscape:O,characterReference:O,codeFenced:l(pe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(pe,s),codeText:l(Zr,s),codeTextData:O,data:O,codeFlowValue:O,definition:l(ei),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(ti),hardBreakEscape:l(rn),hardBreakTrailing:l(rn),htmlFlow:l(sn,s),htmlFlowData:O,htmlText:l(sn,s),htmlTextData:O,image:l(ni),label:s,link:l(ln),listItem:l(ri),listItemValue:m,listOrdered:l(an,h),listUnordered:l(an),paragraph:l(ii),reference:d,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(nn),strong:l(si),thematicBreak:l(ai)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:G,autolinkProtocol:$,blockQuote:c(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ee,characterReference:z,codeFenced:c(C),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:k,codeIndented:c(y),codeText:c(S),codeTextData:k,data:k,definition:c(),definitionDestinationString:L,definitionLabelString:j,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(E),htmlFlowData:k,htmlText:c(A),htmlTextData:k,image:c(q),label:J,labelText:X,lineEnding:F,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Z,resourceDestinationString:g,resourceTitleString:te,resource:K,setextHeading:c(H),setextHeadingLineSequence:_,setextHeadingText:w,strong:c(),thematicBreak:c()}};yr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(v){let I={type:"root",children:[]};const B={stack:[I],tokenStack:[],config:n,enter:a,exit:o,buffer:s,resume:f,data:t},W=[];let Y=-1;for(;++Y<v.length;)if(v[Y][1].type==="listOrdered"||v[Y][1].type==="listUnordered")if(v[Y][0]==="enter")W.push(Y);else{const he=W.pop();Y=i(v,he,Y)}for(Y=-1;++Y<v.length;){const he=n[v[Y][0]];gr.call(he,v[Y][1].type)&&he[v[Y][1].type].call(Object.assign({sliceSerialize:v[Y][2].sliceSerialize},B),v[Y][1])}if(B.tokenStack.length>0){const he=B.tokenStack[B.tokenStack.length-1];(he[1]||Nn).call(B,void 0,he[0])}for(I.position={start:be(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:be(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<n.transforms.length;)I=n.transforms[Y](I)||I;return I}function i(v,I,B){let W=I-1,Y=-1,he=!1,Ce,xe,Fe,Pe;for(;++W<=B;){const oe=v[W];switch(oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{oe[0]==="enter"?Y++:Y--,Pe=void 0;break}case"lineEndingBlank":{oe[0]==="enter"&&(Ce&&!Pe&&!Y&&!Fe&&(Fe=W),Pe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pe=void 0}if(!Y&&oe[0]==="enter"&&oe[1].type==="listItemPrefix"||Y===-1&&oe[0]==="exit"&&(oe[1].type==="listUnordered"||oe[1].type==="listOrdered")){if(Ce){let Ne=W;for(xe=void 0;Ne--;){const ge=v[Ne];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;xe&&(v[xe][1].type="lineEndingBlank",he=!0),ge[1].type="lineEnding",xe=Ne}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}Fe&&(!xe||Fe<xe)&&(Ce._spread=!0),Ce.end=Object.assign({},xe?v[xe][1].start:oe[1].end),v.splice(xe||W,0,["exit",Ce,oe[2]]),W++,B++}if(oe[1].type==="listItemPrefix"){const Ne={type:"listItem",_spread:!1,start:Object.assign({},oe[1].start),end:void 0};Ce=Ne,v.splice(W,0,["enter",Ne,oe[2]]),W++,B++,Fe=void 0,Pe=!0}}}return v[I][1]._spread=he,B}function l(v,I){return B;function B(W){a.call(this,v(W),W),I&&I.call(this,W)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,I,B){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([I,B||void 0]),v.position={start:be(I.start),end:void 0}}function c(v){return I;function I(B){v&&v.call(this,B),o.call(this,B)}}function o(v,I){const B=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==v.type&&(I?I.call(this,v,W[0]):(W[1]||Nn).call(this,v,W[0]));else throw new Error("Cannot close `"+v.type+"` ("+_e({start:v.start,end:v.end})+"): it’s not open");B.position.end=be(v.end)}function f(){return qt(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(v){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function p(){const v=this.resume(),I=this.stack[this.stack.length-1];I.lang=v}function x(){const v=this.resume(),I=this.stack[this.stack.length-1];I.meta=v}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v.replace(/(\r?\n|\r)$/g,"")}function j(v){const I=this.resume(),B=this.stack[this.stack.length-1];B.label=I,B.identifier=fe(this.sliceSerialize(v)).toLowerCase()}function N(){const v=this.resume(),I=this.stack[this.stack.length-1];I.title=v}function L(){const v=this.resume(),I=this.stack[this.stack.length-1];I.url=v}function T(v){const I=this.stack[this.stack.length-1];if(!I.depth){const B=this.sliceSerialize(v).length;I.depth=B}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function _(v){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function O(v){const B=this.stack[this.stack.length-1].children;let W=B[B.length-1];(!W||W.type!=="text")&&(W=li(),W.position={start:be(v.start),end:void 0},B.push(W)),this.stack.push(W)}function k(v){const I=this.stack.pop();I.value+=this.sliceSerialize(v),I.position.end=be(v.end)}function F(v){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const B=I.children[I.children.length-1];B.position.end=be(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(O.call(this,v),k.call(this,v))}function P(){this.data.atHardBreak=!0}function E(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function A(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function S(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function M(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=I,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function q(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=I,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function X(v){const I=this.sliceSerialize(v),B=this.stack[this.stack.length-2];B.label=ua(I),B.identifier=fe(I).toLowerCase()}function J(){const v=this.stack[this.stack.length-1],I=this.resume(),B=this.stack[this.stack.length-1];if(this.data.inReference=!0,B.type==="link"){const W=v.children;B.children=W}else B.alt=I}function g(){const v=this.resume(),I=this.stack[this.stack.length-1];I.url=v}function te(){const v=this.resume(),I=this.stack[this.stack.length-1];I.title=v}function K(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function Z(v){const I=this.resume(),B=this.stack[this.stack.length-1];B.label=I,B.identifier=fe(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function le(v){this.data.characterReferenceType=v.type}function ee(v){const I=this.sliceSerialize(v),B=this.data.characterReferenceType;let W;B?(W=ar(I,B==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=_t(I);const Y=this.stack[this.stack.length-1];Y.value+=W}function z(v){const I=this.stack.pop();I.position.end=be(v.end)}function $(v){k.call(this,v);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(v)}function G(v){k.call(this,v);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(v)}function ie(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function Zr(){return{type:"inlineCode",value:""}}function ei(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ti(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function rn(){return{type:"break"}}function sn(){return{type:"html",value:""}}function ni(){return{type:"image",title:null,url:"",alt:null}}function ln(){return{type:"link",title:null,url:"",children:[]}}function an(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function ri(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function ii(){return{type:"paragraph",children:[]}}function si(){return{type:"strong",children:[]}}function li(){return{type:"text",value:""}}function ai(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function yr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?yr(e,r):pa(e,r)}}function pa(e,n){let t;for(t in n)if(gr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Nn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+_e({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+_e({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+_e({start:n.start,end:n.end})+") is still open")}function ma(e){const n=this;n.parser=t;function t(r){return ha(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function da(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function xa(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
45
- `}]}function ga(e,n){const t=n.value?n.value+`
46
- `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function ya(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ba(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ka(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Te(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=l+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(n,c);const o={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,o),e.applyData(n,o)}function wa(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ca(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function br(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function ja(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return br(e,n);const i={src:Te(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function va(e,n){const t={src:Te(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Na(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Sa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return br(e,n);const i={href:Te(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Ea(e,n){const t={href:Te(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Aa(e,n,t){const r=e.all(n),i=t?Ia(t):kr(n),l={},s=[];if(typeof n.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
47
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
48
- `});const o={type:"element",tagName:"li",properties:l,children:s};return e.patch(n,o),e.applyData(n,o)}function Ia(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=kr(t[r])}return n}function kr(e){const n=e.spread;return n??e.children.length>1}function Ta(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function Fa(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Pa(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Ra(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function La(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],s),i.push(s)}if(t.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Ot(n.children[1]),c=Zn(n.children[n.children.length-1]);a&&c&&(s.position={start:a,end:c}),i.push(s)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function Da(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,a=s?s.length:n.children.length;let c=-1;const o=[];for(;++c<a;){const h=n.children[c],m={},p=s?s[c]:void 0;p&&(m.align=p);let x={type:"element",tagName:l,properties:m,children:[]};h&&(x.children=e.all(h),e.patch(h,x),x=e.applyData(h,x)),o.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(n,f),e.applyData(n,f)}function za(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Sn=9,En=32;function _a(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(An(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(An(n.slice(i),i>0,!1)),l.join("")}function An(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===Sn||l===En;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===Sn||l===En;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ma(e,n){const t={type:"text",value:_a(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Ba(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Oa={blockquote:da,break:xa,code:ga,delete:ya,emphasis:ba,footnoteReference:ka,heading:wa,html:Ca,imageReference:ja,image:va,inlineCode:Na,linkReference:Sa,link:Ea,listItem:Aa,list:Ta,paragraph:Fa,root:Pa,strong:Ra,table:La,tableCell:za,tableRow:Da,text:Ma,thematicBreak:Ba,toml:We,yaml:We,definition:We,footnoteDefinition:We};function We(){}const wr=-1,it=0,Be=1,Ze=2,Ut=3,Yt=4,Qt=5,Gt=6,Cr=7,jr=8,In=typeof self=="object"?self:globalThis,$a=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,s]=n[i];switch(l){case it:case wr:return t(s,i);case Be:{const a=t([],i);for(const c of s)a.push(r(c));return a}case Ze:{const a=t({},i);for(const[c,o]of s)a[r(c)]=r(o);return a}case Ut:return t(new Date(s),i);case Yt:{const{source:a,flags:c}=s;return t(new RegExp(a,c),i)}case Qt:{const a=t(new Map,i);for(const[c,o]of s)a.set(r(c),r(o));return a}case Gt:{const a=t(new Set,i);for(const c of s)a.add(r(c));return a}case Cr:{const{name:a,message:c}=s;return t(new In[a](c),i)}case jr:return t(BigInt(s),i);case"BigInt":return t(Object(BigInt(s)),i);case"ArrayBuffer":return t(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return t(new DataView(a),s)}}return t(new In[l](s),i)};return r},Tn=e=>$a(new Map,e)(0),Ee="",{toString:Ha}={},{keys:Va}=Object,ze=e=>{const n=typeof e;if(n!=="object"||!e)return[it,n];const t=Ha.call(e).slice(8,-1);switch(t){case"Array":return[Be,Ee];case"Object":return[Ze,Ee];case"Date":return[Ut,Ee];case"RegExp":return[Yt,Ee];case"Map":return[Qt,Ee];case"Set":return[Gt,Ee];case"DataView":return[Be,t]}return t.includes("Array")?[Be,t]:t.includes("Error")?[Cr,t]:[Ze,t]},Ue=([e,n])=>e===it&&(n==="function"||n==="symbol"),qa=(e,n,t,r)=>{const i=(s,a)=>{const c=r.push(s)-1;return t.set(a,c),c},l=s=>{if(t.has(s))return t.get(s);let[a,c]=ze(s);switch(a){case it:{let f=s;switch(c){case"bigint":a=jr,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([wr],s)}return i([a,f],s)}case Be:{if(c){let m=s;return c==="DataView"?m=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(s)),i([c,[...m]],s)}const f=[],h=i([a,f],s);for(const m of s)f.push(l(m));return h}case Ze:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(n&&"toJSON"in s)return l(s.toJSON());const f=[],h=i([a,f],s);for(const m of Va(s))(e||!Ue(ze(s[m])))&&f.push([l(m),l(s[m])]);return h}case Ut:return i([a,s.toISOString()],s);case Yt:{const{source:f,flags:h}=s;return i([a,{source:f,flags:h}],s)}case Qt:{const f=[],h=i([a,f],s);for(const[m,p]of s)(e||!(Ue(ze(m))||Ue(ze(p))))&&f.push([l(m),l(p)]);return h}case Gt:{const f=[],h=i([a,f],s);for(const m of s)(e||!Ue(ze(m)))&&f.push(l(m));return h}}const{message:o}=s;return i([a,{name:c,message:o}],s)};return l},Fn=(e,{json:n,lossy:t}={})=>{const r=[];return qa(!(n||t),!!n,new Map,r)(e),r},et=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Tn(Fn(e,n)):structuredClone(e):(e,n)=>Tn(Fn(e,n));function Wa(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ua(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Ya(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Wa,r=e.options.footnoteBackLabel||Ua,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[c]);if(!o)continue;const f=e.all(o),h=String(o.identifier).toUpperCase(),m=Te(h.toLowerCase());let p=0;const x=[],b=e.footnoteCounts.get(h);for(;b!==void 0&&++p<=b;){x.length>0&&x.push({type:"text",value:" "});let j=typeof t=="string"?t:t(c,p);typeof j=="string"&&(j={type:"text",value:j}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const j=C.children[C.children.length-1];j&&j.type==="text"?j.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...x)}else f.push(...x);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(f,!0)};e.patch(o,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...et(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
49
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
50
- `}]}}const st=(function(e){if(e==null)return Ja;if(typeof e=="function")return lt(e);if(typeof e=="object")return Array.isArray(e)?Qa(e):Ga(e);if(typeof e=="string")return Xa(e);throw new Error("Expected function, string, or object as test")});function Qa(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=st(e[t]);return lt(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function Ga(e){const n=e;return lt(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function Xa(e){return lt(n);function n(t){return t&&t.type===e}}function lt(e){return n;function n(t,r,i){return!!(Ka(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Ja(){return!0}function Ka(e){return e!==null&&typeof e=="object"&&"type"in e}const vr=[],Za=!0,Tt=!1,eo="skip";function Nr(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=st(i),s=r?-1:1;a(e,void 0,[])();function a(c,o,f){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=vr,x,b,C;if((!n||l(c,o,f[f.length-1]||void 0))&&(p=to(t(c,f)),p[0]===Tt))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==eo)for(b=(r?y.children.length:-1)+s,C=f.concat(y);b>-1&&b<y.children.length;){const j=y.children[b];if(x=a(j,b,C)(),x[0]===Tt)return x;b=typeof x[1]=="number"?x[1]:b+s}}return p}}}function to(e){return Array.isArray(e)?e:typeof e=="number"?[Za,e]:e==null?vr:[e]}function Xt(e,n,t,r){let i,l,s;typeof n=="function"&&typeof t!="function"?(l=void 0,s=n,i=t):(l=n,s=t,i=r),Nr(e,l,a,i);function a(c,o){const f=o[o.length-1],h=f?f.children.indexOf(c):void 0;return s(c,h,f)}}const Ft={}.hasOwnProperty,no={};function ro(e,n){const t=n||no,r=new Map,i=new Map,l=new Map,s={...Oa,...t.handlers},a={all:o,applyData:so,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:s,one:c,options:t,patch:io,wrap:ao};return Xt(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();h.has(m)||h.set(m,f)}}),a;function c(f,h){const m=f.type,p=a.handlers[m];if(Ft.call(a.handlers,m)&&p)return p(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in f){const{children:b,...C}=f,y=et(C);return y.children=a.all(f),y}return et(f)}return(a.options.unknownHandler||lo)(a,f,h)}function o(f){const h=[];if("children"in f){const m=f.children;let p=-1;for(;++p<m.length;){const x=a.one(m[p],f);if(x){if(p&&m[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Pn(x.value)),!Array.isArray(x)&&x.type==="element")){const b=x.children[0];b&&b.type==="text"&&(b.value=Pn(b.value))}Array.isArray(x)?h.push(...x):h.push(x)}}}return h}}function io(e,n){e.position&&(n.position=Ui(e))}function so(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const s="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:s}}t.type==="element"&&l&&Object.assign(t.properties,et(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function lo(e,n){const t=n.data||{},r="value"in n&&!(Ft.call(t,"hProperties")||Ft.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function ao(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
51
- `});++r<e.length;)r&&t.push({type:"text",value:`
52
- `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
53
- `}),t}function Pn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Rn(e,n){const t=ro(e,n),r=t.one(e,void 0),i=Ya(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
54
- `},i),l}function oo(e,n){return e&&"run"in e?async function(t,r){const i=Rn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Rn(t,{file:r,...e||n})}}function Ln(e){if(e)throw e}var ft,Dn;function uo(){if(Dn)return ft;Dn=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(o){return typeof Array.isArray=="function"?Array.isArray(o):n.call(o)==="[object Array]"},l=function(o){if(!o||n.call(o)!=="[object Object]")return!1;var f=e.call(o,"constructor"),h=o.constructor&&o.constructor.prototype&&e.call(o.constructor.prototype,"isPrototypeOf");if(o.constructor&&!f&&!h)return!1;var m;for(m in o);return typeof m>"u"||e.call(o,m)},s=function(o,f){t&&f.name==="__proto__"?t(o,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):o[f.name]=f.newValue},a=function(o,f){if(f==="__proto__")if(e.call(o,f)){if(r)return r(o,f).value}else return;return o[f]};return ft=function c(){var o,f,h,m,p,x,b=arguments[0],C=1,y=arguments.length,j=!1;for(typeof b=="boolean"&&(j=b,b=arguments[1]||{},C=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});C<y;++C)if(o=arguments[C],o!=null)for(f in o)h=a(b,f),m=a(o,f),b!==m&&(j&&m&&(l(m)||(p=i(m)))?(p?(p=!1,x=h&&i(h)?h:[]):x=h&&l(h)?h:{},s(b,{name:f,newValue:c(j,x,m)})):typeof m<"u"&&s(b,{name:f,newValue:m}));return b},ft}var co=uo();const pt=Gn(co);function Pt(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ho(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...o){const f=e[++l];let h=-1;if(c){s(c);return}for(;++h<i.length;)(o[h]===null||o[h]===void 0)&&(o[h]=i[h]);i=o,f?fo(f,a)(...o):s(null,...o)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function fo(e,n){let t;return r;function r(...s){const a=e.length>s.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(o){const f=o;if(a&&t)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(s,...a){t||(t=!0,n(s,...a))}function l(s){i(null,s)}}const me={basename:po,dirname:mo,extname:xo,join:go,sep:"/"};function po(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');qe(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else s<0&&(l=!0,s=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function mo(e){if(qe(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function xo(e){qe(e);let n=e.length,t=-1,r=0,i=-1,l=0,s;for(;n--;){const a=e.codePointAt(n);if(a===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function go(...e){let n=-1,t;for(;++n<e.length;)qe(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":yo(t)}function yo(e){qe(e);const n=e.codePointAt(0)===47;let t=bo(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function bo(e,n){let t="",r=0,i=-1,l=0,s=-1,a,c;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||l===1))if(i!==s-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=s,l=0;continue}}else if(t.length>0){t="",r=0,i=s,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,s):t=e.slice(i+1,s),r=s-i-1;i=s,l=0}else a===46&&l>-1?l++:l=-1}return t}function qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ko={cwd:wo};function wo(){return"/"}function Rt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Co(e){if(typeof e=="string")e=new URL(e);else if(!Rt(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return jo(e)}function jo(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const mt=["history","path","basename","stem","extname","dirname"];class Sr{constructor(n){let t;n?Rt(n)?t={path:n}:typeof n=="string"||vo(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":ko.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mt.length;){const l=mt[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)mt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?me.basename(this.path):void 0}set basename(n){xt(n,"basename"),dt(n,"basename"),this.path=me.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?me.dirname(this.path):void 0}set dirname(n){zn(this.basename,"dirname"),this.path=me.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?me.extname(this.path):void 0}set extname(n){if(dt(n,"extname"),zn(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=me.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Rt(n)&&(n=Co(n)),xt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?me.basename(this.path,this.extname):void 0}set stem(n){xt(n,"stem"),dt(n,"stem"),this.path=me.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new re(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function dt(e,n){if(e&&e.includes(me.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+me.sep+"`")}function xt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function zn(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function vo(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const No=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),So={}.hasOwnProperty;class Jt extends No{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=ho()}copy(){const n=new Jt;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(pt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(bt("data",this.frozen),this.namespace[n]=t,this):So.call(this.namespace,n)&&this.namespace[n]||void 0:n?(bt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ye(n),r=this.parser||this.Parser;return gt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),gt("process",this.parser||this.Parser),yt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,s){const a=Ye(n),c=r.parse(a);r.run(c,a,function(f,h,m){if(f||!h||!m)return o(f);const p=h,x=r.stringify(p,m);Io(x)?m.value=x:m.result=x,o(f,m)});function o(f,h){f||!h?s(f):l?l(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),gt("processSync",this.parser||this.Parser),yt("processSync",this.compiler||this.Compiler),this.process(n,i),Mn("processSync","process",t),r;function i(l,s){t=!0,Ln(l),r=s}}run(n,t,r){_n(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(s,a){const c=Ye(t);i.run(n,c,o);function o(f,h,m){const p=h||n;f?a(f):s?s(p):r(void 0,p,m)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Mn("runSync","run",r),i;function l(s,a){Ln(s),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ye(t),i=this.compiler||this.Compiler;return yt("stringify",i),_n(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(bt("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(o){if(typeof o=="function")c(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[f,...h]=o;c(f,h)}else s(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function s(o){if(!("plugins"in o)&&!("settings"in o))throw new 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");a(o.plugins),o.settings&&(i.settings=pt(!0,i.settings,o.settings))}function a(o){let f=-1;if(o!=null)if(Array.isArray(o))for(;++f<o.length;){const h=o[f];l(h)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function c(o,f){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===o){m=h;break}if(m===-1)r.push([o,...f]);else if(f.length>0){let[p,...x]=f;const b=r[m][1];Pt(b)&&Pt(p)&&(p=pt(!0,b,p)),r[m]=[o,p,...x]}}}}const Eo=new Jt().freeze();function gt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _n(e){if(!Pt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mn(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ye(e){return Ao(e)?e:new Sr(e)}function Ao(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Io(e){return typeof e=="string"||To(e)}function To(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Fo="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Bn=[],On={allowDangerousHtml:!0},Po=/^(https?|ircs?|mailto|xmpp)$/i,Ro=[{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 Lo(e){const n=Do(e),t=zo(e);return _o(n.runSync(n.parse(t),t),e)}function Do(e){const n=e.rehypePlugins||Bn,t=e.remarkPlugins||Bn,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...On}:On;return Eo().use(ma).use(t).use(oo,r).use(n)}function zo(e){const n=e.children||"",t=new Sr;return typeof n=="string"&&(t.value=n),t}function _o(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,s=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||Mo;for(const f of Ro)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Fo+f.id,void 0);return Xt(e,o),Ji(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function o(f,h,m){if(f.type==="raw"&&m&&typeof h=="number")return s?m.children.splice(h,1):m.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in ut)if(Object.hasOwn(ut,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],b=ut[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=c(String(x||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,m)),p&&m&&typeof h=="number")return a&&f.children?m.children.splice(h,1,...f.children):m.children.splice(h,1),h}}}function Mo(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Po.test(e.slice(0,n))?e:""}function $n(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Bo(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Oo(e,n,t){const i=st((t||{}).ignore||[]),l=$o(n);let s=-1;for(;++s<l.length;)Nr(e,"text",a);function a(o,f){let h=-1,m;for(;++h<f.length;){const p=f[h],x=m?m.children:void 0;if(i(p,x?x.indexOf(p):void 0,m))return;m=p}if(m)return c(o,f)}function c(o,f){const h=f[f.length-1],m=l[s][0],p=l[s][1];let x=0;const C=h.children.indexOf(o);let y=!1,j=[];m.lastIndex=0;let N=m.exec(o.value);for(;N;){const L=N.index,T={index:N.index,input:N.input,stack:[...f,o]};let w=p(...N,T);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?m.lastIndex=L+1:(x!==L&&j.push({type:"text",value:o.value.slice(x,L)}),Array.isArray(w)?j.push(...w):w&&j.push(w),x=L+N[0].length,y=!0),!m.global)break;N=m.exec(o.value)}return y?(x<o.value.length&&j.push({type:"text",value:o.value.slice(x)}),h.children.splice(C,1,...j)):j=[o],C+j.length}}function $o(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Ho(i[0]),Vo(i[1])])}return n}function Ho(e){return typeof e=="string"?new RegExp(Bo(e),"g"):e}function Vo(e){return typeof e=="function"?e:function(){return e}}const kt="phrasing",wt=["autolink","link","image","label"];function qo(){return{transforms:[Jo],enter:{literalAutolink:Uo,literalAutolinkEmail:Ct,literalAutolinkHttp:Ct,literalAutolinkWww:Ct},exit:{literalAutolink:Xo,literalAutolinkEmail:Go,literalAutolinkHttp:Yo,literalAutolinkWww:Qo}}}function Wo(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:kt,notInConstruct:wt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:kt,notInConstruct:wt},{character:":",before:"[ps]",after:"\\/",inConstruct:kt,notInConstruct:wt}]}}function Uo(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ct(e){this.config.enter.autolinkProtocol.call(this,e)}function Yo(e){this.config.exit.autolinkProtocol.call(this,e)}function Qo(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Go(e){this.config.exit.autolinkEmail.call(this,e)}function Xo(e){this.exit(e)}function Jo(e){Oo(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ko],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Zo]],{ignore:["link","linkReference"]})}function Ko(e,n,t,r,i){let l="";if(!Er(i)||(/^w/i.test(n)&&(t=n+t,n="",l="http://"),!eu(t)))return!1;const s=tu(t+r);if(!s[0])return!1;const a={type:"link",title:null,url:l+n+s[0],children:[{type:"text",value:n+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Zo(e,n,t,r){return!Er(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function eu(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function tu(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=$n(e,"(");let l=$n(e,")");for(;r!==-1&&i>l;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),l++;return[e,t]}function Er(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||ve(t)||nt(t))&&(!n||t!==47)}Ar.peek=cu;function nu(){this.buffer()}function ru(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iu(){this.buffer()}function su(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=fe(this.sliceSerialize(e)).toLowerCase(),t.label=n}function au(e){this.exit(e)}function ou(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=fe(this.sliceSerialize(e)).toLowerCase(),t.label=n}function uu(e){this.exit(e)}function cu(){return"["}function Ar(e,n,t,r){const i=t.createTracker(r);let l=i.move("[^");const s=t.enter("footnoteReference"),a=t.enter("reference");return l+=i.move(t.safe(t.associationId(e),{after:"]",before:l})),a(),s(),l+=i.move("]"),l}function hu(){return{enter:{gfmFootnoteCallString:nu,gfmFootnoteCall:ru,gfmFootnoteDefinitionLabelString:iu,gfmFootnoteDefinition:su},exit:{gfmFootnoteCallString:lu,gfmFootnoteCall:au,gfmFootnoteDefinitionLabelString:ou,gfmFootnoteDefinition:uu}}}function fu(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Ar},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,l,s){const a=l.createTracker(s);let c=a.move("[^");const o=l.enter("footnoteDefinition"),f=l.enter("label");return c+=a.move(l.safe(l.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((n?`
55
- `:" ")+l.indentLines(l.containerFlow(r,a.current()),n?Ir:pu))),o(),c}}function pu(e,n,t){return n===0?e:Ir(e,n,t)}function Ir(e,n,t){return(t?"":" ")+e}const mu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tr.peek=bu;function du(){return{canContainEols:["delete"],enter:{strikethrough:gu},exit:{strikethrough:yu}}}function xu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mu}],handlers:{delete:Tr}}}function gu(e){this.enter({type:"delete",children:[]},e)}function yu(e){this.exit(e)}function Tr(e,n,t,r){const i=t.createTracker(r),l=t.enter("strikethrough");let s=i.move("~~");return s+=t.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),l(),s}function bu(){return"~"}function ku(e){return e.length}function wu(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||ku,l=[],s=[],a=[],c=[];let o=0,f=-1;for(;++f<e.length;){const b=[],C=[];let y=-1;for(e[f].length>o&&(o=e[f].length);++y<e[f].length;){const j=Cu(e[f][y]);if(t.alignDelimiters!==!1){const N=i(j);C[y]=N,(c[y]===void 0||N>c[y])&&(c[y]=N)}b.push(j)}s[f]=b,a[f]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<o;)l[h]=Hn(r[h]);else{const b=Hn(r);for(;++h<o;)l[h]=b}h=-1;const m=[],p=[];for(;++h<o;){const b=l[h];let C="",y="";b===99?(C=":",y=":"):b===108?C=":":b===114&&(y=":");let j=t.alignDelimiters===!1?1:Math.max(1,c[h]-C.length-y.length);const N=C+"-".repeat(j)+y;t.alignDelimiters!==!1&&(j=C.length+j+y.length,j>c[h]&&(c[h]=j),p[h]=j),m[h]=N}s.splice(1,0,m),a.splice(1,0,p),f=-1;const x=[];for(;++f<s.length;){const b=s[f],C=a[f];h=-1;const y=[];for(;++h<o;){const j=b[h]||"";let N="",L="";if(t.alignDelimiters!==!1){const T=c[h]-(C[h]||0),w=l[h];w===114?N=" ".repeat(T):w===99?T%2?(N=" ".repeat(T/2+.5),L=" ".repeat(T/2-.5)):(N=" ".repeat(T/2),L=N):L=" ".repeat(T)}t.delimiterStart!==!1&&!h&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&j==="")&&(t.delimiterStart!==!1||h)&&y.push(" "),t.alignDelimiters!==!1&&y.push(N),y.push(j),t.alignDelimiters!==!1&&y.push(L),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||h!==o-1)&&y.push("|")}x.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return x.join(`
56
- `)}function Cu(e){return e==null?"":String(e)}function Hn(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function ju(e,n,t,r){const i=t.enter("blockquote"),l=t.createTracker(r);l.move("> "),l.shift(2);const s=t.indentLines(t.containerFlow(e,l.current()),vu);return i(),s}function vu(e,n,t){return">"+(t?"":" ")+e}function Nu(e,n){return Vn(e,n.inConstruct,!0)&&!Vn(e,n.notInConstruct,!1)}function Vn(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function qn(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
57
- `&&Nu(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
58
- `}function Su(e,n){const t=String(e);let r=t.indexOf(n),i=r,l=0,s=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>s&&(s=l):l=1,i=r+n.length,r=t.indexOf(n,i);return s}function Eu(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Au(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Iu(e,n,t,r){const i=Au(t),l=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Eu(e,t)){const h=t.enter("codeIndented"),m=t.indentLines(l,Tu);return h(),m}const a=t.createTracker(r),c=i.repeat(Math.max(Su(l,i)+1,3)),o=t.enter("codeFenced");let f=a.move(c);if(e.lang){const h=t.enter(`codeFencedLang${s}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${s}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
59
- `,encode:["`"],...a.current()})),h()}return f+=a.move(`
60
- `),l&&(f+=a.move(l+`
61
- `)),f+=a.move(c),o(),f}function Tu(e,n,t){return(t?"":" ")+e}function Kt(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Fu(e,n,t,r){const i=Kt(t),l=i==='"'?"Quote":"Apostrophe",s=t.enter("definition");let a=t.enter("label");const c=t.createTracker(r);let o=c.move("[");return o+=c.move(t.safe(t.associationId(e),{before:o,after:"]",...c.current()})),o+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),o+=c.move("<"),o+=c.move(t.safe(e.url,{before:o,after:">",...c.current()})),o+=c.move(">")):(a=t.enter("destinationRaw"),o+=c.move(t.safe(e.url,{before:o,after:e.title?" ":`
62
- `,...c.current()}))),a(),e.title&&(a=t.enter(`title${l}`),o+=c.move(" "+i),o+=c.move(t.safe(e.title,{before:o,after:i,...c.current()})),o+=c.move(i),a()),s(),o}function Pu(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function He(e){return"&#x"+e.toString(16).toUpperCase()+";"}function tt(e,n,t){const r=Ie(e),i=Ie(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fr.peek=Ru;function Fr(e,n,t,r){const i=Pu(t),l=t.enter("emphasis"),s=t.createTracker(r),a=s.move(i);let c=s.move(t.containerPhrasing(e,{after:i,before:a,...s.current()}));const o=c.charCodeAt(0),f=tt(r.before.charCodeAt(r.before.length-1),o,i);f.inside&&(c=He(o)+c.slice(1));const h=c.charCodeAt(c.length-1),m=tt(r.after.charCodeAt(0),h,i);m.inside&&(c=c.slice(0,-1)+He(h));const p=s.move(i);return l(),t.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},a+c+p}function Ru(e,n,t){return t.options.emphasis||"*"}function Lu(e,n){let t=!1;return Xt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Tt}),!!((!e.depth||e.depth<3)&&qt(e)&&(n.options.setext||t))}function Du(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),l=t.createTracker(r);if(Lu(e,t)){const f=t.enter("headingSetext"),h=t.enter("phrasing"),m=t.containerPhrasing(e,{...l.current(),before:`
63
- `,after:`
64
- `});return h(),f(),m+`
65
- `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
66
- `))+1))}const s="#".repeat(i),a=t.enter("headingAtx"),c=t.enter("phrasing");l.move(s+" ");let o=t.containerPhrasing(e,{before:"# ",after:`
67
- `,...l.current()});return/^[\t ]/.test(o)&&(o=He(o.charCodeAt(0))+o.slice(1)),o=o?s+" "+o:s,t.options.closeAtx&&(o+=" "+s),c(),a(),o}Pr.peek=zu;function Pr(e){return e.value||""}function zu(){return"<"}Rr.peek=_u;function Rr(e,n,t,r){const i=Kt(t),l=i==='"'?"Quote":"Apostrophe",s=t.enter("image");let a=t.enter("label");const c=t.createTracker(r);let o=c.move("![");return o+=c.move(t.safe(e.alt,{before:o,after:"]",...c.current()})),o+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),o+=c.move("<"),o+=c.move(t.safe(e.url,{before:o,after:">",...c.current()})),o+=c.move(">")):(a=t.enter("destinationRaw"),o+=c.move(t.safe(e.url,{before:o,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=t.enter(`title${l}`),o+=c.move(" "+i),o+=c.move(t.safe(e.title,{before:o,after:i,...c.current()})),o+=c.move(i),a()),o+=c.move(")"),s(),o}function _u(){return"!"}Lr.peek=Mu;function Lr(e,n,t,r){const i=e.referenceType,l=t.enter("imageReference");let s=t.enter("label");const a=t.createTracker(r);let c=a.move("![");const o=t.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(o+"]["),s();const f=t.stack;t.stack=[],s=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return s(),t.stack=f,l(),i==="full"||!o||o!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Mu(){return"!"}Dr.peek=Bu;function Dr(e,n,t){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<t.unsafe.length;){const s=t.unsafe[l],a=t.compilePattern(s);let c;if(s.atBreak)for(;c=a.exec(r);){let o=c.index;r.charCodeAt(o)===10&&r.charCodeAt(o-1)===13&&o--,r=r.slice(0,o)+" "+r.slice(c.index+1)}}return i+r+i}function Bu(){return"`"}function zr(e,n){const t=qt(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}_r.peek=Ou;function _r(e,n,t,r){const i=Kt(t),l=i==='"'?"Quote":"Apostrophe",s=t.createTracker(r);let a,c;if(zr(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let h=s.move("<");return h+=s.move(t.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),a(),t.stack=f,h}a=t.enter("link"),c=t.enter("label");let o=s.move("[");return o+=s.move(t.containerPhrasing(e,{before:o,after:"](",...s.current()})),o+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),o+=s.move("<"),o+=s.move(t.safe(e.url,{before:o,after:">",...s.current()})),o+=s.move(">")):(c=t.enter("destinationRaw"),o+=s.move(t.safe(e.url,{before:o,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=t.enter(`title${l}`),o+=s.move(" "+i),o+=s.move(t.safe(e.title,{before:o,after:i,...s.current()})),o+=s.move(i),c()),o+=s.move(")"),a(),o}function Ou(e,n,t){return zr(e,t)?"<":"["}Mr.peek=$u;function Mr(e,n,t,r){const i=e.referenceType,l=t.enter("linkReference");let s=t.enter("label");const a=t.createTracker(r);let c=a.move("[");const o=t.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(o+"]["),s();const f=t.stack;t.stack=[],s=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return s(),t.stack=f,l(),i==="full"||!o||o!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function $u(){return"["}function Zt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Hu(e){const n=Zt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Vu(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Br(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function qu(e,n,t,r){const i=t.enter("list"),l=t.bulletCurrent;let s=e.ordered?Vu(t):Zt(t);const a=e.ordered?s==="."?")":".":Hu(t);let c=n&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),Br(t)===s&&f){let h=-1;for(;++h<e.children.length;){const m=e.children[h];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=a),t.bulletCurrent=s;const o=t.containerFlow(e,r);return t.bulletLastUsed=s,t.bulletCurrent=l,i(),o}function Wu(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Uu(e,n,t,r){const i=Wu(t);let l=t.bulletCurrent||Zt(t);n&&n.type==="list"&&n.ordered&&(l=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+l);let s=l.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=t.createTracker(r);a.move(l+" ".repeat(s-l.length)),a.shift(s);const c=t.enter("listItem"),o=t.indentLines(t.containerFlow(e,a.current()),f);return c(),o;function f(h,m,p){return m?(p?"":" ".repeat(s))+h:(p?l:l+" ".repeat(s-l.length))+h}}function Yu(e,n,t,r){const i=t.enter("paragraph"),l=t.enter("phrasing"),s=t.containerPhrasing(e,r);return l(),i(),s}const Qu=st(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gu(e,n,t,r){return(e.children.some(function(s){return Qu(s)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Xu(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Or.peek=Ju;function Or(e,n,t,r){const i=Xu(t),l=t.enter("strong"),s=t.createTracker(r),a=s.move(i+i);let c=s.move(t.containerPhrasing(e,{after:i,before:a,...s.current()}));const o=c.charCodeAt(0),f=tt(r.before.charCodeAt(r.before.length-1),o,i);f.inside&&(c=He(o)+c.slice(1));const h=c.charCodeAt(c.length-1),m=tt(r.after.charCodeAt(0),h,i);m.inside&&(c=c.slice(0,-1)+He(h));const p=s.move(i+i);return l(),t.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},a+c+p}function Ju(e,n,t){return t.options.strong||"*"}function Ku(e,n,t,r){return t.safe(e.value,r)}function Zu(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function ec(e,n,t){const r=(Br(t)+(t.options.ruleSpaces?" ":"")).repeat(Zu(t));return t.options.ruleSpaces?r.slice(0,-1):r}const $r={blockquote:ju,break:qn,code:Iu,definition:Fu,emphasis:Fr,hardBreak:qn,heading:Du,html:Pr,image:Rr,imageReference:Lr,inlineCode:Dr,link:_r,linkReference:Mr,list:qu,listItem:Uu,paragraph:Yu,root:Gu,strong:Or,text:Ku,thematicBreak:ec};function tc(){return{enter:{table:nc,tableData:Wn,tableHeader:Wn,tableRow:ic},exit:{codeText:sc,table:rc,tableData:jt,tableHeader:jt,tableRow:jt}}}function nc(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function rc(e){this.exit(e),this.data.inTable=void 0}function ic(e){this.enter({type:"tableRow",children:[]},e)}function jt(e){this.exit(e)}function Wn(e){this.enter({type:"tableCell",children:[]},e)}function sc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,lc));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function lc(e,n){return n==="|"?n:e}function ac(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,l=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
68
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:s,tableCell:c,tableRow:a}};function s(p,x,b,C){return o(f(p,b,C),p.align)}function a(p,x,b,C){const y=h(p,b,C),j=o([y]);return j.slice(0,j.indexOf(`
69
- `))}function c(p,x,b,C){const y=b.enter("tableCell"),j=b.enter("phrasing"),N=b.containerPhrasing(p,{...C,before:l,after:l});return j(),y(),N}function o(p,x){return wu(p,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(p,x,b){const C=p.children;let y=-1;const j=[],N=x.enter("table");for(;++y<C.length;)j[y]=h(C[y],x,b);return N(),j}function h(p,x,b){const C=p.children;let y=-1;const j=[],N=x.enter("tableRow");for(;++y<C.length;)j[y]=c(C[y],p,x,b);return N(),j}function m(p,x,b){let C=$r.inlineCode(p,x,b);return b.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function oc(){return{exit:{taskListCheckValueChecked:Un,taskListCheckValueUnchecked:Un,paragraph:cc}}}function uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hc}}}function Un(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function cc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let l=-1,s;for(;++l<i.length;){const a=i[l];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hc(e,n,t,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);l&&a.move(s);let c=$r.listItem(e,n,t,{...r,...a.current()});return l&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,o)),c;function o(f){return f+s}}function fc(){return[qo(),hu(),du(),tc(),oc()]}function pc(e){return{extensions:[Wo(),fu(e),xu(),ac(e),uc()]}}const mc={tokenize:kc,partial:!0},Hr={tokenize:wc,partial:!0},Vr={tokenize:Cc,partial:!0},qr={tokenize:jc,partial:!0},dc={tokenize:vc,partial:!0},Wr={name:"wwwAutolink",tokenize:yc,previous:Yr},Ur={name:"protocolAutolink",tokenize:bc,previous:Qr},ye={name:"emailAutolink",tokenize:gc,previous:Gr},de={};function xc(){return{text:de}}let je=48;for(;je<123;)de[je]=ye,je++,je===58?je=65:je===91&&(je=97);de[43]=ye;de[45]=ye;de[46]=ye;de[95]=ye;de[72]=[ye,Ur];de[104]=[ye,Ur];de[87]=[ye,Wr];de[119]=[ye,Wr];function gc(e,n,t){const r=this;let i,l;return s;function s(h){return!Lt(h)||!Gr.call(r,r.previous)||en(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Lt(h)?(e.consume(h),a):h===64?(e.consume(h),c):t(h)}function c(h){return h===46?e.check(dc,f,o)(h):h===45||h===95||ne(h)?(l=!0,e.consume(h),c):f(h)}function o(h){return e.consume(h),i=!0,c}function f(h){return l&&i&&se(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function yc(e,n,t){const r=this;return i;function i(s){return s!==87&&s!==119||!Yr.call(r,r.previous)||en(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mc,e.attempt(Hr,e.attempt(Vr,l),t),t)(s))}function l(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(s)}}function bc(e,n,t){const r=this;let i="",l=!1;return s;function s(h){return(h===72||h===104)&&Qr.call(r,r.previous)&&!en(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):t(h)}function a(h){if(se(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(h),c}return t(h)}function c(h){return h===47?(e.consume(h),l?o:(l=!0,c)):t(h)}function o(h){return h===null||Ke(h)||Q(h)||ve(h)||nt(h)?t(h):e.attempt(Hr,e.attempt(Vr,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function kc(e,n,t){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),l):t(s)}function l(s){return s===null?t(s):n(s)}}function wc(e,n,t){let r,i,l;return s;function s(o){return o===46||o===95?e.check(qr,c,a)(o):o===null||Q(o)||ve(o)||o!==45&&nt(o)?c(o):(l=!0,e.consume(o),s)}function a(o){return o===95?r=!0:(i=r,r=void 0),e.consume(o),s}function c(o){return i||r||!l?t(o):n(o)}}function Cc(e,n){let t=0,r=0;return i;function i(s){return s===40?(t++,e.consume(s),i):s===41&&r<t?l(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(qr,n,l)(s):s===null||Q(s)||ve(s)?n(s):(e.consume(s),i)}function l(s){return s===41&&r++,e.consume(s),i}}function jc(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),l):a===93?(e.consume(a),i):a===60||a===null||Q(a)||ve(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||Q(a)||ve(a)?n(a):r(a)}function l(a){return se(a)?s(a):t(a)}function s(a){return a===59?(e.consume(a),r):se(a)?(e.consume(a),s):t(a)}}function vc(e,n,t){return r;function r(l){return e.consume(l),i}function i(l){return ne(l)?t(l):n(l)}}function Yr(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Q(e)}function Qr(e){return!se(e)}function Gr(e){return!(e===47||Lt(e))}function Lt(e){return e===43||e===45||e===46||e===95||ne(e)}function en(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Nc={tokenize:Rc,partial:!0};function Sc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tc,continuation:{tokenize:Fc},exit:Pc}},text:{91:{name:"gfmFootnoteCall",tokenize:Ic},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ec,resolveTo:Ac}}}}function Ec(e,n,t){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!s||!s._balanced)return t(c);const o=fe(r.sliceSerialize({start:s.end,end:r.now()}));return o.codePointAt(0)!==94||!l.includes(o.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Ac(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",l,n],["enter",s,n],["exit",s,n],["exit",l,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Ic(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,s;return a;function a(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",o)}function o(h){if(l>999||h===93&&!s||h===null||h===91||Q(h))return t(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Q(h)||(s=!0),l++,e.consume(h),h===92?f:o}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,o):o(h)}}function Tc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,s=0,a;return c;function c(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),o}function o(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(x)}function f(x){if(s>999||x===93&&!a||x===null||x===91||Q(x))return t(x);if(x===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return l=fe(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Q(x)||(a=!0),s++,e.consume(x),x===92?h:f}function h(x){return x===91||x===92||x===93?(e.consume(x),s++,f):f(x)}function m(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(l)||i.push(l),U(e,p,"gfmFootnoteDefinitionWhitespace")):t(x)}function p(x){return n(x)}}function Fc(e,n,t){return e.check(Ve,n,e.attempt(Nc,n,t))}function Pc(e){e.exit("gfmFootnoteDefinition")}function Rc(e,n,t){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?n(l):t(l)}}function Lc(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let o=c;for(;o--;)if(s[o][0]==="exit"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[o][1].end.offset-s[o][1].start.offset){s[c][1].type="strikethroughSequence",s[o][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[o][1].start),end:Object.assign({},s[c][1].end)},h={type:"strikethroughText",start:Object.assign({},s[o][1].end),end:Object.assign({},s[c][1].start)},m=[["enter",f,a],["enter",s[o][1],a],["exit",s[o][1],a],["enter",h,a]],p=a.parser.constructs.insideSpan.null;p&&ue(m,m.length,0,rt(p,s.slice(o+1,c),a)),ue(m,m.length,0,[["exit",h,a],["enter",s[c][1],a],["exit",s[c][1],a],["exit",f,a]]),ue(s,o-1,c-o+3,m),c=o+m.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function l(s,a,c){const o=this.previous,f=this.events;let h=0;return m;function m(x){return o===126&&f[f.length-1][1].type!=="characterEscape"?c(x):(s.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const b=Ie(o);if(x===126)return h>1?c(x):(s.consume(x),h++,p);if(h<2&&!t)return c(x);const C=s.exit("strikethroughSequenceTemporary"),y=Ie(x);return C._open=!y||y===2&&!!b,C._close=!b||b===2&&!!y,a(x)}}}class Dc{constructor(){this.map=[]}add(n,t,r){zc(this,n,t,r)}consume(n){if(this.map.sort(function(l,s){return l[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const l of i)n.push(l);i=r.pop()}this.map.length=0}}function zc(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function _c(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Mc(){return{flow:{null:{name:"table",tokenize:Bc,resolveAll:Oc}}}}function Bc(e,n,t){const r=this;let i=0,l=0,s;return a;function a(k){let F=r.events.length-1;for(;F>-1;){const A=r.events[F][1].type;if(A==="lineEnding"||A==="linePrefix")F--;else break}const P=F>-1?r.events[F][1].type:null,E=P==="tableHead"||P==="tableRow"?w:c;return E===w&&r.parser.lazy[r.now().line]?t(k):E(k)}function c(k){return e.enter("tableHead"),e.enter("tableRow"),o(k)}function o(k){return k===124||(s=!0,l+=1),f(k)}function f(k){return k===null?t(k):D(k)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):t(k):V(k)?U(e,f,"whitespace")(k):(l+=1,s&&(s=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),h(k)))}function h(k){return k===null||k===124||Q(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?m:h)}function m(k){return k===92||k===124?(e.consume(k),h):h(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(k):(e.enter("tableDelimiterRow"),s=!1,V(k)?U(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):x(k))}function x(k){return k===45||k===58?C(k):k===124?(s=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):T(k)}function b(k){return V(k)?U(e,C,"whitespace")(k):C(k)}function C(k){return k===58?(l+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(l+=1,y(k)):k===null||D(k)?L(k):T(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),j(k)):T(k)}function j(k){return k===45?(e.consume(k),j):k===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(k))}function N(k){return V(k)?U(e,L,"whitespace")(k):L(k)}function L(k){return k===124?x(k):k===null||D(k)?!s||i!==l?T(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(k)):T(k)}function T(k){return t(k)}function w(k){return e.enter("tableRow"),_(k)}function _(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),_):k===null||D(k)?(e.exit("tableRow"),n(k)):V(k)?U(e,_,"whitespace")(k):(e.enter("data"),H(k))}function H(k){return k===null||k===124||Q(k)?(e.exit("data"),_(k)):(e.consume(k),k===92?O:H)}function O(k){return k===92||k===124?(e.consume(k),H):H(k)}}function Oc(e,n){let t=-1,r=!0,i=0,l=[0,0,0,0],s=[0,0,0,0],a=!1,c=0,o,f,h;const m=new Dc;for(;++t<e.length;){const p=e[t],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,c!==0&&(Yn(m,n,c,o,f),f=void 0,c=0),o={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(t,0,[["enter",o,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,h=void 0,l=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(t,0,[["enter",f,n]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(l[1]!==0&&(s[0]=s[1],h=Qe(m,n,l,i,void 0,h),l=[0,0,0,0]),s[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(s[0]=s[1],h=Qe(m,n,l,i,void 0,h)),l=s,s=[l[1],t,0,0])):x.type==="tableHead"?(a=!0,c=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=t,l[1]!==0?(s[0]=s[1],h=Qe(m,n,l,i,t,h)):s[1]!==0&&(h=Qe(m,n,s,i,t,h)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(s[3]=t)}for(c!==0&&Yn(m,n,c,o,f),m.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=_c(n.events,t))}return e}function Qe(e,n,t,r,i,l){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(l.end=Object.assign({},Ae(n.events,t[0])),e.add(t[0],0,[["exit",l,n]]));const c=Ae(n.events,t[1]);if(l={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(t[1],0,[["enter",l,n]]),t[2]!==0){const o=Ae(n.events,t[2]),f=Ae(n.events,t[3]),h={type:a,start:Object.assign({},o),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){const m=n.events[t[2]],p=n.events[t[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",t[3]>t[2]+1){const x=t[2]+1,b=t[3]-t[2]-1;e.add(x,b,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(l.end=Object.assign({},Ae(n.events,i)),e.add(i,0,[["exit",l,n]]),l=void 0),l}function Yn(e,n,t,r,i){const l=[],s=Ae(n.events,t);i&&(i.end=Object.assign({},s),l.push(["exit",i,n])),r.end=Object.assign({},s),l.push(["exit",r,n]),e.add(t+1,0,l)}function Ae(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const $c={name:"tasklistCheck",tokenize:Vc};function Hc(){return{text:{91:$c}}}function Vc(e,n,t){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),l)}function l(c){return Q(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):t(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(c)}function a(c){return D(c)?n(c):V(c)?e.check({tokenize:qc},n,t)(c):t(c)}}function qc(e,n,t){return U(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Wc(e){return lr([xc(),Sc(),Lc(e),Mc(),Hc()])}const Uc={};function Yc(e){const n=this,t=e||Uc,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Wc(t)),l.push(fc()),s.push(pc(t))}function Xr({content:e,className:n}){const t=e.trim().replace(/^#+ .+$/m,"").trim();return u.jsx(Lo,{remarkPlugins:[Yc],components:{h1:({children:r})=>u.jsx("h1",{className:"text-lg font-bold text-gray-900 mb-3 mt-6 first:mt-0 pb-1 border-b border-gray-200",children:r}),h2:({children:r})=>u.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-2 mt-5 first:mt-0",children:r}),h3:({children:r})=>u.jsx("h3",{className:"text-sm font-semibold text-gray-800 mb-2 mt-4 first:mt-0",children:r}),p:({children:r})=>u.jsx("p",{className:"text-sm text-gray-700 mb-3 leading-relaxed",children:r}),ul:({children:r})=>u.jsx("ul",{className:"list-disc ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),ol:({children:r})=>u.jsx("ol",{className:"list-decimal ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),li:({children:r})=>u.jsx("li",{className:"leading-relaxed",children:r}),code:({children:r,className:i})=>(i==null?void 0:i.includes("language-"))?u.jsx("pre",{className:"bg-gray-100 rounded p-3 text-xs font-mono overflow-x-auto mb-3",children:u.jsx("code",{children:r})}):u.jsx("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs font-mono text-gray-800",children:r}),pre:({children:r})=>u.jsx(u.Fragment,{children:r}),strong:({children:r})=>u.jsx("strong",{className:"font-semibold text-gray-900",children:r}),blockquote:({children:r})=>u.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:r}),table:({children:r})=>u.jsx("div",{className:"overflow-x-auto mb-3",children:u.jsx("table",{className:"min-w-full text-sm border-collapse border border-gray-200",children:r})}),thead:({children:r})=>u.jsx("thead",{className:"bg-gray-50",children:r}),th:({children:r})=>u.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold text-gray-900",children:r}),td:({children:r})=>u.jsx("td",{className:"border border-gray-200 px-3 py-2 text-gray-700",children:r}),a:({children:r,href:i})=>u.jsx("a",{href:i,className:"text-[#005C75] hover:underline",target:"_blank",rel:"noopener noreferrer",children:r})},children:t})}function Jr(e){const n={name:"root",path:"",memories:[],children:new Map};for(const t of e){const r=t.filePath.split("/");r.pop();let i=n,l="";for(const s of r)l=l?`${l}/${s}`:s,i.children.has(s)||i.children.set(s,{name:s,path:l,memories:[],children:new Map}),i=i.children.get(s);r.length===0?n.memories.push(t):i.memories.push(t)}return n}function Kr(e){let n=e.memories.length;for(const t of e.children.values())n+=Kr(t);return n}function at(e,n){var r;const t=e.match(/^#+ (.+)$/m);return t?t[1]:((r=n.split("/").pop())==null?void 0:r.replace(".md",""))||n}function Oe(e){return Math.round(e/3.5)}function tn(e){const n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString()){const c=t.getTime()-n.getTime(),o=Math.floor(c/(1e3*60*60));return o<1?"Just now":o===1?"1h ago":`${o}h ago`}const i=n.toLocaleDateString("en-US",{month:"short"}),l=n.getDate(),s=n.getFullYear(),a=t.getFullYear();return s===a?`${i} ${l}`:`${i} ${l}, ${s}`}function Qc({rule:e,onEdit:n,onDelete:t,onView:r,isReviewed:i,onToggleReviewed:l,changeType:s,isUncommitted:a,changeDate:c,diff:o,isFadingOut:f,showLeftBorder:h}){const[m,p]=R.useState(!1),[x,b]=R.useState(!1),C=R.useMemo(()=>at(e.body,e.filePath),[e.body,e.filePath]),y=Oe(e.body.length),j=m?"#3e3e3e":a?"#d97706":"#c7c7c7",N=`rounded-lg border overflow-hidden transition-all ease-in-out ${a?"bg-amber-50 border-amber-300":"bg-white border-gray-200"}`,L={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return u.jsxs("div",{className:N,style:L,children:[u.jsx("div",{className:`p-4 cursor-pointer ${a?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>r?r(e):p(!m),children:u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:m?"rotate(90deg)":"none",transition:"transform 0.2s"},children:u.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:j})})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("h3",{style:{fontSize:"14px",lineHeight:"18px",fontWeight:500,color:a?"#78350f":"#000"},children:C}),s&&u.jsx("span",{className:`px-2 py-0.5 rounded uppercase font-medium tracking-wider ${s==="deleted"?"bg-red-100 text-red-700":""}`,style:{fontSize:"10px",...s==="added"&&{backgroundColor:"#CBF3FA",color:"#005C75"},...s==="modified"&&{backgroundColor:"#FFE8C1",color:"#C67E06"}},children:s}),a&&u.jsx("span",{className:"px-2 py-0.5 bg-amber-200 text-amber-800 rounded font-medium uppercase tracking-wider",style:{fontSize:"10px"},children:"Uncommitted"}),u.jsxs("span",{className:"text-xs text-gray-400",children:["~",y.toLocaleString()," tokens"]})]}),u.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-500 flex-wrap",children:e.frontmatter.paths&&e.frontmatter.paths.length>0&&u.jsxs(u.Fragment,{children:[e.frontmatter.paths.slice(0,2).map((T,w)=>u.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:T},w)),e.frontmatter.paths.length>2&&u.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:["+",e.frontmatter.paths.length-2," more"]})]})})]})]}),u.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c&&u.jsx("span",{className:"text-xs text-gray-400",children:tn(c)}),l&&u.jsx("button",{onClick:T=>{T.stopPropagation(),l(e.filePath,e.lastModified,i??!1)},className:`w-5 h-5 rounded-full border-2 flex items-center justify-center cursor-pointer transition-colors ${i?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,title:i?"Mark as unreviewed":"Mark as reviewed",children:i&&u.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:u.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}),m&&u.jsxs("div",{className:`border-t ${a?"border-amber-200":"border-gray-100"}`,children:[u.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${a?"bg-amber-50":"bg-white"}`,children:[u.jsx("div",{className:"flex items-center gap-2",children:s==="modified"&&o&&u.jsxs("button",{onClick:T=>{T.stopPropagation(),b(!x)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${x?a?"bg-amber-200 text-amber-900":"bg-gray-200 text-gray-900":a?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[u.jsx(Xn,{className:"w-3 h-3"}),x?"Hide Diff":"Show Diff"]})}),s!=="deleted"&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:T=>{T.stopPropagation(),n(e)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${a?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[u.jsx(Ii,{className:"w-3 h-3"}),"Edit"]}),u.jsxs("button",{onClick:T=>{T.stopPropagation(),t(e)},className:"flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer text-red-600 hover:text-red-800 hover:bg-red-100",children:[u.jsx(Pi,{className:"w-3 h-3"}),"Delete"]})]})]}),x&&o&&u.jsx("pre",{className:"mx-4 mb-4 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:o.split(`
70
- `).map((T,w)=>{let _="";return T.startsWith("+")&&!T.startsWith("+++")?_="text-green-400":T.startsWith("-")&&!T.startsWith("---")?_="text-red-400":T.startsWith("@@")&&(_="text-cyan-400"),u.jsx("div",{className:_,children:T},w)})}),u.jsxs("div",{className:"mx-4 mb-3",children:[u.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Edit with Claude:"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:["Claude, can you help me edit this rule: `",e.filePath,"`"]}),u.jsx(yi,{content:`Claude, can you help me edit this rule: \`${e.filePath}\``,icon:!0,iconSize:14,className:"p-1 text-gray-400 hover:text-gray-600 rounded transition-colors"})]})]}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&u.jsxs("div",{className:"mx-4 mb-3",children:[u.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Applies to paths:"}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.frontmatter.paths.map((T,w)=>u.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:T},w))})]}),!x&&u.jsx("div",{className:"mx-4 mb-4 p-4 rounded border max-h-[500px] overflow-auto bg-white border-gray-200",children:u.jsx(Xr,{content:e.body})})]})]})}function Gc(){return new Date().toISOString().split(".")[0]+"",`---
71
- paths:
72
- - '**/*.ts'
73
- ---
74
-
75
- ## Title
76
-
77
- Description here.
78
- `}function Xc({rule:e,onSave:n,onCancel:t}){const[r,i]=R.useState(e?`.claude/rules/${e.filePath}`:""),[l,s]=R.useState((e==null?void 0:e.content)||Gc()),[a,c]=R.useState(!!e),o=!e;return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("h3",{className:"text-lg font-semibold",style:{fontFamily:"Sora"},children:e?"Edit Rule":"Create New Rule"}),u.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:u.jsx(Bt,{className:"w-5 h-5"})})]}),o&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Xn,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),u.jsx("p",{className:"text-sm text-[#0369a1] mb-2",children:"Run this command in Claude Code to create a properly formatted rule with the right file location and paths:"}),u.jsx("code",{className:"block bg-white px-3 py-2 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"})]})]})}),u.jsxs("button",{onClick:()=>c(!a),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[u.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:a?"rotate(90deg)":"none",transition:"transform 0.2s"},children:u.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:a?"#3e3e3e":"#c7c7c7"})})}),"Or create manually"]})]}),(a||!o)&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:"text",value:r,onChange:f=>i(f.target.value),placeholder:"e.g., src/webserver/architecture.md",className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm",disabled:!!e}),u.jsx("button",{onClick:()=>{navigator.clipboard.writeText(r)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy path",children:u.jsx(vt,{className:"w-4 h-4"})})]})]}),e&&u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ask Claude for help editing:"}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:"text",value:`Claude, can you help me edit the rule: \`${r}\``,readOnly:!0,className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md bg-gray-50 font-mono text-sm text-gray-600"}),u.jsx("button",{onClick:()=>{navigator.clipboard.writeText(`Claude, can you help me edit the rule: \`${r}\``)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy prompt",children:u.jsx(vt,{className:"w-4 h-4"})})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),u.jsx("textarea",{value:l,onChange:f=>s(f.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm bg-gray-900 text-gray-100 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-gray-800 [&::-webkit-scrollbar-thumb]:bg-gray-600 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-gray-500 [&::-webkit-resizer]:bg-gray-700"})]}),u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx("button",{onClick:t,className:"px-4 py-2 text-[#001f3f] hover:text-[#001530] rounded-md cursor-pointer font-mono uppercase text-xs font-semibold",children:"Cancel"}),u.jsx("button",{onClick:()=>n(r.replace(/^\.claude\/rules\//,""),l),disabled:!r.trim()||!l.trim(),className:"px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer font-mono uppercase text-xs font-semibold",children:"Save"})]})]})]})}function Jc({memories:e,selectedPath:n,onSelectPath:t,expandedFolders:r,onToggleFolder:i}){const l=R.useMemo(()=>Jr(e),[e]),s=(o,f,h)=>{if(o.target.closest(".chevron-toggle")){h&&i(f||"root");return}const p=f||null;t(n===p?null:p),h&&!r.has(f||"root")&&i(f||"root")},a=o=>{t(n===o?null:o)},c=(o,f=0)=>{const h=r.has(o.path||"root"),m=Kr(o),p=o.children.size>0,x=o.name==="root"?"(root)":o.name,b=o.memories.length>0||p,C=o.path||"",y=n===C||n===null&&C==="";return u.jsxs("div",{children:[u.jsxs("div",{className:`flex items-center gap-2 py-2.5 cursor-pointer rounded px-2 relative ${y?"bg-[#E0E9EC]":"hover:bg-gray-100"}`,style:{paddingLeft:`${f*12+8}px`},onClick:j=>s(j,o.path,b),children:[b&&u.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:j=>{j.stopPropagation(),i(o.path||"root")},children:u.jsx(Dt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!b&&u.jsx("div",{className:"w-3"}),u.jsx(Kn,{className:"w-3.5 h-3.5 text-[#005C75]"}),u.jsx("span",{className:`text-xs font-mono font-semibold ${y?"text-[#005C75]":""}`,style:{color:"#005C75"},children:x}),u.jsxs("span",{className:"text-xs ml-auto",style:{color:"#005C75"},children:[m," rules"]})]}),h&&u.jsxs("div",{className:"relative",children:[(o.memories.length>0||p)&&u.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:`${f*12+8+6}px`}}),o.memories.length>0&&u.jsx("div",{style:{paddingLeft:`${(f+1)*12+8}px`},children:o.memories.map(j=>{var L;const N=n===j.filePath;return u.jsx("div",{className:`flex items-center gap-2 py-1 px-2 text-sm rounded cursor-pointer relative ${N?"bg-[#E0E9EC] text-[#005C75]":"text-gray-600 hover:bg-gray-50"}`,onClick:()=>a(j.filePath),children:u.jsx("span",{className:"text-xs",children:(L=j.filePath.split("/").pop())==null?void 0:L.replace(".md","")})},j.filePath)})}),p&&u.jsx("div",{children:Array.from(o.children.values()).sort((j,N)=>j.name.localeCompare(N.name)).map(j=>c(j,f+1))})]})]},o.path||"root")};return u.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-8",children:c(l)})}function Kc({memories:e,onEdit:n,onDelete:t,expandedFolders:r,onToggleFolder:i,reviewedStatus:l,onMarkReviewed:s,onMarkUnreviewed:a,onViewRule:c}){const[o,f]=R.useState({});R.useEffect(()=>{f({})},[l]);const h=R.useMemo(()=>({...l,...o}),[l,o]),m=R.useMemo(()=>Jr(e),[e]),p=(b,C,y)=>{f(j=>({...j,[b]:!y})),y?a(b):s(b,C)},x=(b,C=0)=>{const y=r.has(b.path||"root"),j=b.children.size>0,N=b.name==="root"?"root":b.name,L=b.memories.length>0||j;return u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 py-2 cursor-pointer hover:bg-gray-50 rounded px-2 mb-2",style:{backgroundColor:"rgba(224, 233, 236, 0.5)"},onClick:()=>L&&i(b.path||"root"),children:[L&&u.jsx(Dt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!L&&u.jsx("div",{className:"w-4"}),u.jsx(Kn,{className:"w-4 h-4 text-[#005C75]"}),u.jsx("span",{className:"text-sm font-mono font-semibold",style:{color:"#001f3f"},children:N})]}),y&&u.jsxs("div",{className:"ml-10 space-y-4 relative",children:[(b.memories.length>0||j)&&u.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),b.memories.length>0&&u.jsx("div",{className:"space-y-2",children:b.memories.map(T=>u.jsx(Qc,{rule:T,onEdit:n,onDelete:t,onView:c,isReviewed:h[T.filePath]??!1,onToggleReviewed:p},T.filePath))}),j&&u.jsx("div",{className:"space-y-4",children:Array.from(b.children.values()).sort((T,w)=>T.name.localeCompare(w.name)).map(T=>x(T,C+1))})]})]},b.path||"root")};return u.jsx("div",{children:x(m)})}function Zc({memories:e,reviewedStatus:n,onViewRule:t}){const[r,i]=R.useState("unreviewed"),[l,s]=R.useState(new Map),a=R.useRef(n),c=R.useRef([]);R.useEffect(()=>()=>{c.current.forEach(clearTimeout)},[]),R.useEffect(()=>{const m=a.current,p=[];for(const[x,b]of Object.entries(n))b&&!m[x]&&p.push(x);a.current=n,p.length!==0&&(s(x=>{const b=new Map(x);return p.forEach(C=>b.set(C,"approved")),b}),c.current.push(setTimeout(()=>{s(x=>{const b=new Map(x);return p.forEach(C=>b.set(C,"fading")),b})},1500)),c.current.push(setTimeout(()=>{s(x=>{const b=new Map(x);return p.forEach(C=>b.delete(C)),b})},2500)))},[n]);const o=R.useMemo(()=>[...e].sort((m,p)=>new Date(p.lastModified).getTime()-new Date(m.lastModified).getTime()),[e]),f=R.useMemo(()=>o.filter(m=>!n[m.filePath]).length,[o,n]),h=R.useMemo(()=>r==="unreviewed"?o.filter(m=>!n[m.filePath]||l.has(m.filePath)):o,[o,r,n,l]);return u.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden flex flex-col",children:[u.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[u.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:u.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Recently Changed Rules"})}),u.jsx("div",{className:"flex-1"}),u.jsxs("button",{onClick:()=>i("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[u.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r==="unreviewed"?"#005C75":"#d1d5db"}}),u.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:r==="unreviewed"?600:400,color:r==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",f,")"]})]}),u.jsxs("button",{onClick:()=>i("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[u.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r==="all"?"#005C75":"#d1d5db"}}),u.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:r==="all"?600:400,color:r==="all"?"#005C75":"#626262"},children:["All (",o.length,")"]})]})]}),u.jsxs("div",{className:"grid grid-cols-[1fr_80px_100px] px-5 py-2 border-b border-gray-100",children:[u.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Rule"}),u.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium text-center",children:"Changed At"}),u.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium text-center flex items-center justify-center gap-1 whitespace-nowrap",children:["✓ Reviewed",u.jsxs("span",{className:"relative group",children:[u.jsx(St,{className:"w-3 h-3 text-gray-300 cursor-help"}),u.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Showing which rules have been reviewed and approved. Click a rule to view it and approve it"})]})]})]}),u.jsx("div",{className:"flex-1 overflow-y-auto",children:h.slice(0,8).map(m=>{const p=n[m.filePath]??!1,x=l.get(m.filePath),b=at(m.body,m.filePath);return u.jsx("div",{className:`border-b border-gray-50 transition-all ${x==="fading"?"duration-1000":"duration-300"}`,style:{opacity:x==="fading"?0:1},children:u.jsxs("div",{className:`grid grid-cols-[1fr_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${x==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>t(m),children:[u.jsx("div",{className:"flex items-center gap-2 min-w-0",children:u.jsx("span",{className:"text-sm text-gray-900 truncate",children:b})}),u.jsx("span",{className:"text-xs text-gray-500 text-center",children:tn(m.lastModified)}),u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors duration-300 ${p?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:p&&u.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:u.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})},m.filePath)})}),h.length===0&&r==="unreviewed"&&u.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"}),h.length>0&&h.length<6&&u.jsx("div",{className:"h-[60px] flex-shrink-0",style:{backgroundColor:"#F0F0F0"}})]})}function eh({refreshKey:e,reviewedStatus:n,memories:t,onViewRule:r}){const[i,l]=R.useState("unreviewed"),[s,a]=R.useState(null),[c,o]=R.useState(""),[f,h]=R.useState(0),[m,p]=R.useState(!1),[x,b]=R.useState(null),C=R.useRef(null),y=R.useRef(null),[j,N]=R.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[L,T]=R.useState(!0);R.useEffect(()=>{(async()=>{T(!0);try{const S=await(await fetch("/api/memory?action=audit")).json();N({topPaths:S.topPaths||[],totalFilesWithCoverage:S.totalFilesWithCoverage||0,allSourceFiles:S.allSourceFiles||[]})}catch(A){console.error("Failed to load audit data:",A)}finally{T(!1)}})()},[e]);const w=R.useMemo(()=>i==="all"?j.topPaths:j.topPaths.filter(E=>E.matchingRules.some(A=>!n[A.filePath])),[j.topPaths,i,n]);R.useMemo(()=>j.topPaths.filter(E=>E.matchingRules.some(A=>!n[A.filePath])).length,[j.topPaths,n]);const _=E=>E.split("/").pop()||E,H=R.useMemo(()=>{const E=new Map;for(const A of j.topPaths)E.set(A.filePath,A);return E},[j.topPaths]),O=R.useMemo(()=>{if(!c.trim())return[];const E=c.toLowerCase(),A=[],S=[];for(const M of j.allSourceFiles){const q=M.toLowerCase();if(!q.includes(E))continue;const X=H.get(M)||{filePath:M,matchingRules:[],totalTextLength:0};q.startsWith(E)?A.push(X):S.push(X)}return A.sort((M,q)=>M.filePath.localeCompare(q.filePath)),S.sort((M,q)=>M.filePath.localeCompare(q.filePath)),[...A,...S].slice(0,8)},[c,j.allSourceFiles,H]),k=R.useCallback(E=>{var A;b(E),a(E.filePath),o(E.filePath),p(!1),(A=C.current)==null||A.blur()},[]),F=R.useCallback(()=>{var E;o(""),b(null),a(null),(E=C.current)==null||E.focus()},[]),P=R.useCallback(E=>{var A;!m||O.length===0||(E.key==="ArrowDown"?(E.preventDefault(),h(S=>Math.min(S+1,O.length-1))):E.key==="ArrowUp"?(E.preventDefault(),h(S=>Math.max(S-1,0))):E.key==="Enter"?(E.preventDefault(),k(O[f])):E.key==="Escape"&&(p(!1),(A=C.current)==null||A.blur()))},[m,O,f,k]);return R.useEffect(()=>{h(0)},[O]),u.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[u.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[u.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:u.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),u.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[u.jsx(Jn,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),u.jsx("input",{ref:C,type:"text",value:c,onChange:E=>{o(E.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:P,placeholder:"Search files...",className:`w-full pl-8 ${c?"pr-7":"pr-3"} py-1 text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-1 focus:ring-[#005C75] focus:border-[#005C75] bg-gray-50`}),c&&u.jsx("button",{type:"button",onMouseDown:E=>{E.preventDefault(),F()},className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center text-gray-400 hover:text-gray-600 cursor-pointer",children:u.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:u.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),m&&O.length>0&&u.jsx("div",{ref:y,className:"absolute left-0 top-full mt-0.5 bg-white border border-gray-200 rounded-md shadow-lg z-10 max-h-75 overflow-y-auto min-w-75 max-w-120",children:O.map((E,A)=>u.jsxs("div",{onMouseDown:S=>{S.preventDefault(),k(E)},onMouseEnter:()=>h(A),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${A===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[u.jsx(Nt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),u.jsx("span",{className:"text-gray-700 truncate",title:E.filePath,children:(()=>{const S=E.filePath.toLowerCase().indexOf(c.toLowerCase());if(S===-1)return E.filePath;const M=E.filePath.slice(0,S),q=E.filePath.slice(S,S+c.length),X=E.filePath.slice(S+c.length);return u.jsxs(u.Fragment,{children:[M,u.jsx("span",{className:"font-semibold text-[#005C75]",children:q}),X]})})()}),u.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[E.matchingRules.length," rule",E.matchingRules.length!==1?"s":""]})]},E.filePath))})]}),u.jsx("div",{className:"flex-1"}),u.jsxs("button",{onClick:()=>l("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[u.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),u.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),u.jsxs("button",{onClick:()=>l("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[u.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),u.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),u.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[u.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),u.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Rules",u.jsxs("span",{className:"relative group",children:[u.jsx(St,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),u.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-48 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Number of rules not yet reviewed for this file / Total number of rules that apply to this file"})]})]}),u.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Tokens",u.jsxs("span",{className:"relative group",children:[u.jsx(St,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),u.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Estimated tokens from unreviewed rules / Total number of tokens from all rules that apply to this file"})]})]})]}),L&&u.jsx("div",{className:"px-5 py-6",children:u.jsxs("div",{className:"animate-pulse space-y-3",children:[u.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),u.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),u.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!L&&(w.length>0||x)&&u.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(x?[x,...w.filter(A=>A.filePath!==x.filePath)].slice(0,8):w.slice(0,8)).map((E,A)=>{const S=E.matchingRules.length,M=E.matchingRules.filter(K=>!n[K.filePath]),q=M.length,X=M.reduce((K,d)=>K+d.bodyLength,0),J=q>0,g=s===E.filePath,te=(x==null?void 0:x.filePath)===E.filePath;return u.jsxs("div",{children:[u.jsxs("div",{onClick:()=>a(g?null:E.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${te?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g?u.jsx(ki,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):u.jsx(Dt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),u.jsx(Nt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),u.jsx("span",{className:"text-sm text-gray-900 truncate",title:E.filePath,children:te?E.filePath:_(E.filePath)})]}),u.jsxs("span",{className:"text-sm text-center",children:[u.jsx("span",{className:J?"font-semibold text-[#1A5276]":"text-gray-400",children:q}),u.jsx("span",{className:"text-gray-300",children:" / "}),u.jsx("span",{className:"text-gray-500",children:S})]}),u.jsxs("span",{className:"text-sm text-center",children:[u.jsx("span",{className:J?"font-semibold text-[#1A5276]":"text-gray-400",children:Oe(X).toLocaleString()}),u.jsx("span",{className:"text-gray-300",children:" / "}),u.jsx("span",{className:"text-gray-500",children:Oe(E.totalTextLength).toLocaleString()})]})]}),g&&u.jsx("div",{className:"bg-gray-50 border-b border-gray-100",children:E.matchingRules.map(K=>{const d=t.find(le=>le.filePath===K.filePath),Z=n[K.filePath]??!1;return u.jsxs("div",{onClick:le=>{le.stopPropagation(),d&&r(d)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[u.jsx(wi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),u.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:d?at(d.body,d.filePath):K.filePath}),u.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Oe(K.bodyLength).toLocaleString()," ","tokens"]}),u.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${Z?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:Z&&u.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:u.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},K.filePath)})})]},E.filePath)})}),!L&&w.length===0&&u.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:i==="unreviewed"?"No files have unreviewed rules":"No files have rule coverage yet"})]})}function th({rule:e,changeInfo:n,isReviewed:t,onApprove:r,onEdit:i,onDelete:l,onClose:s}){const a=at(e.body,e.filePath),c=Oe(e.body.length),o=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,m]=R.useState(!1);return R.useEffect(()=>{const p=x=>{x.key==="Escape"&&s()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[s]),u.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:s,children:u.jsxs("div",{className:"rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",style:{backgroundColor:"#F8F7F6"},onClick:p=>p.stopPropagation(),children:[u.jsx("div",{className:"px-6 pt-5 pb-4",children:u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[u.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:a}),n&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:tn(n.date)}),u.jsx("span",{className:`flex-shrink-0 text-[11px] uppercase font-semibold tracking-wider ${n.changeType==="added"?"text-green-600":n.changeType==="modified"?"text-orange-600":"text-red-600"}`,children:n.changeType})]})]}),o&&u.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[u.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),u.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:o})]}),u.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[u.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),u.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),u.jsx("button",{onClick:()=>{navigator.clipboard.writeText(f),m(!0),setTimeout(()=>m(!1),2e3)},className:"p-0.5 rounded text-gray-400 hover:text-gray-600 cursor-pointer transition-colors",title:"Copy file path",children:h?u.jsx(Je,{className:"w-3 h-3 text-green-500"}):u.jsx(vt,{className:"w-3 h-3"})})]}),u.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),u.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[u.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer transition-colors ${t?"bg-green-600 text-white":"border border-green-600 text-green-700 hover:bg-green-50"}`,children:[u.jsx(Je,{className:"w-3.5 h-3.5"}),t?"Approved":"Approve"]}),u.jsx("button",{onClick:i,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-gray-300 text-gray-600 hover:bg-gray-50 transition-colors",children:"Edit"}),u.jsx("button",{onClick:l,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-red-300 text-red-600 hover:bg-red-50 transition-colors",children:"Delete"}),u.jsx("button",{onClick:s,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:u.jsx(Bt,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&u.jsxs("div",{className:"px-6 pb-4",children:[u.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),u.jsx("div",{className:"bg-white rounded-lg p-4 space-y-2.5",style:{border:"1px solid #E6E6E6"},children:e.frontmatter.paths.map((p,x)=>{const b=p.split("/"),C=b.pop()||p,y=b.length>0?b.join("/")+"/":"";return u.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[u.jsx(Nt,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),u.jsxs("span",{children:[y&&u.jsx("span",{className:"text-gray-500",children:y}),u.jsx("span",{className:"font-bold text-gray-900",children:C})]})]},x)})})]}),u.jsxs("div",{className:"px-6 pb-6",children:[u.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),u.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:u.jsx(Xr,{content:e.body})})]})]})})}function nh(){return u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),u.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),u.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),u.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),u.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),u.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),u.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),u.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),u.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),u.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),u.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),u.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),u.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),u.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),u.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),u.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),u.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),u.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),u.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),u.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),u.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),u.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),u.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),u.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),u.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),u.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),u.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),u.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),u.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function rh(){return u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),u.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),u.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),u.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),u.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),u.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),u.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),u.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),u.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),u.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),u.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),u.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),u.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),u.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),u.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),u.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),u.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),u.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),u.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),u.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),u.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),u.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),u.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function ih(){return u.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:u.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),u.jsx("p",{className:"text-[15px] text-gray-500 leading-relaxed max-w-2xl mx-auto",children:"CodeYam Memory generates path-scoped Claude Rules that load automatically when Claude works on matching files. These rules capture any confusion, architectural decisions, and tribal knowledge from your as you work with Claude, ensuring sessions become more efficient and aligned with your codebase over time."})]}),u.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[u.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),u.jsxs("ol",{className:"space-y-5",children:[u.jsxs("li",{className:"flex gap-3 items-start",children:[u.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"1"}),u.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),u.jsxs("li",{className:"flex gap-3 items-start",children:[u.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"2"}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[u.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),u.jsx(Qn,{value:"/codeyam-memory"})]}),u.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),u.jsxs("li",{className:"flex gap-3 items-start",children:[u.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"3"}),u.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Confirm or refine the confusion patterns Claude discovers in your git history"})]}),u.jsxs("li",{className:"flex gap-3 items-start",children:[u.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"4"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Review generated rules here, in the dashboard"}),u.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"Come back to this page to review, edit, and approve the rules Claude creates."})]})]})]})]}),u.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[u.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-start gap-4 relative",children:[u.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:u.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[u.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),u.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),u.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),u.jsxs("div",{className:"flex items-start gap-4 relative",children:[u.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:u.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),u.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"No manual steps needed — Claude picks up relevant rules based on the files it touches."})]})]}),u.jsxs("div",{className:"flex items-start gap-4 relative",children:[u.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:u.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),u.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"A git hook runs automatically to update rules when related code changes and looks for any new patterns of confusion in work sessions."})]})]})]})]})]}),u.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[u.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),u.jsx(Qn,{value:"/codeyam-memory"}),u.jsx("span",{className:"text-white text-[15px] font-medium",children:"in your terminal to get started"})]})]})})}function Qn({value:e}){const[n,t]=R.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3)};return u.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-[13px] font-mono cursor-pointer border-0",style:{backgroundColor:"#2C3E50",color:"#E0E0E0"},title:"Copy to clipboard",children:[e,n?u.jsx(Je,{className:"w-3.5 h-3.5 text-green-400"}):u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[u.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),u.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function Ge({label:e,count:n,icon:t,bgColor:r,iconBgColor:i,textColor:l}){return u.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:t}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:l},children:n}),u.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:l},children:e})]})]})})}function sh({searchFilter:e,onSearchChange:n,onCreateNew:t,onLearnMore:r,reviewCounts:i}){return u.jsxs("div",{className:"mb-8",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[u.jsx(nh,{}),u.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),u.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",u.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Jn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),u.jsx("input",{type:"text",value:e,onChange:l=>n(l.target.value),placeholder:"Search rules...",className:"w-64 pl-10 pr-4 py-2 border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent text-sm"})]}),u.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[u.jsx(Mt,{className:"w-4 h-4"}),"New Rule"]})]})]}),u.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[u.jsx(Ge,{label:"Total Rules",count:i.total,icon:u.jsx(rh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),u.jsx(Ge,{label:"Unreviewed",count:i.unreviewed,icon:u.jsx(ji,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),u.jsx(Ge,{label:"Reviewed",count:i.reviewed,icon:u.jsx(Je,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),u.jsx(Ge,{label:"Stale",count:i.stale,icon:u.jsx(bi,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function lh({onClose:e,onCreateNew:n}){return u.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:u.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:t=>t.stopPropagation(),children:[u.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:u.jsx(Bt,{className:"w-6 h-6"})}),u.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),u.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),u.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[u.jsxs("p",{children:["Claude Rules are a component of"," ",u.jsx("a",{href:"https://code.claude.com/docs/en/memory#modular-rules-with-claude%2Frules%2F",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Memory Management in Claude Code"}),'. The text of each rule is passed into the context window when working on the specific files described in the "paths" frontmatter field of the rule.']}),u.jsx("p",{children:"This allows you to provide context that is surgically specific to certain files in your codebase. They are a powerful tool but are harder to write and maintain than CLAUDE.md files."}),u.jsx("p",{children:"CodeYam Memory helps write and maintain Claude Rules. Hooks ensure that rules are reviewed and added during Claude Code working sessions. The CodeYam CLI Dashboard provides a page dedicated to Memory where you can view, edit, create, delete, and review Claude Rules."})]}),u.jsx("div",{className:"flex justify-center",children:u.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-5 py-2.5 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[u.jsx(Mt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function ah({rule:e,onConfirm:n,onCancel:t}){return u.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:u.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[u.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),u.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",u.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),u.jsx("button",{onClick:()=>n(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const yh=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],bh=oi(function(){const{memories:n,reviewedStatus:t,memoryInitialized:r,error:i}=ui(),l=ci(),s=hi(),[a,c]=R.useState(""),[o,f]=R.useState(null),[h,m]=R.useState(new Set(["root"])),[p,x]=R.useState(null),[b,C]=R.useState(!1),[y,j]=R.useState(null),[N,L]=R.useState(0),[T,w]=R.useState(!1),[_,H]=R.useState(null),[O,k]=R.useState(null),[F,P]=R.useState({}),E=z=>{m($=>{const G=new Set($);return G.has(z)?G.delete(z):G.add(z),G})};pi({source:"memory-page"});const A=R.useMemo(()=>({...t,...F}),[t,F]),S=R.useRef(l.state);R.useEffect(()=>{const z=S.current==="loading"||S.current==="submitting",$=l.state==="idle";z&&$&&l.data&&(s.revalidate(),x(null),C(!1),L(G=>G+1)),S.current=l.state},[l.state,l.data,s]),R.useEffect(()=>{P(z=>{const $={};for(const[G,ie]of Object.entries(z))t[G]!==ie&&($[G]=ie);return Object.keys($).length===Object.keys(z).length?z:$})},[t]);const M=(z,$)=>{P(G=>({...G,[z]:!0})),l.submit({action:"mark-reviewed",filePath:z,lastModified:$},{method:"POST",action:"/api/memory",encType:"application/json"})},q=z=>{P($=>({...$,[z]:!1})),l.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},X=(z,$)=>{H(z),k($??null)},J=R.useMemo(()=>{let z=n;if(a.trim()){const $=a.toLowerCase();z=z.filter(G=>{var pe;return(((pe=G.filePath.split("/").pop())==null?void 0:pe.replace(".md",""))||"").toLowerCase().includes($)||G.body.toLowerCase().includes($)})}return z},[n,a]),g=R.useMemo(()=>o?J.some($=>$.filePath===o)?J.filter($=>$.filePath===o):J.filter($=>$.filePath.startsWith(o+"/")||$.filePath===o):J,[J,o]),te=(z,$)=>{const G=p?"update":"create";l.submit({action:G,filePath:z,content:$},{method:"POST",action:"/api/memory",encType:"application/json"})},K=z=>{l.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},d=R.useMemo(()=>{const z=n.filter($=>A[$.filePath]).length;return{total:n.length,reviewed:z,unreviewed:n.length-z,stale:0}},[n,A]),Z=R.useMemo(()=>{const z=new Set(["root"]);for(const $ of J){const G=$.filePath.split("/");G.pop();let ie="";for(const pe of G)ie=ie?`${ie}/${pe}`:pe,z.add(ie)}return z},[J]),le=Z.size===h.size&&[...Z].every(z=>h.has(z)),ee=()=>{m(le?new Set(["root"]):new Set(Z))};return i?u.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:u.jsxs("div",{className:"px-12 py-6 font-sans",children:[u.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),u.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?u.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:u.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[u.jsx(sh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>w(!0),reviewCounts:d}),(b||p)&&u.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),x(null)},children:u.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:u.jsx(Xc,{rule:p,onSave:te,onCancel:()=>{C(!1),x(null)}})})}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[u.jsx(Zc,{memories:J,reviewedStatus:A,onViewRule:X}),u.jsx(eh,{onEditRule:x,onDeleteRule:j,refreshKey:N,reviewedStatus:A,onMarkReviewed:M,onMarkUnreviewed:q,memories:n,onViewRule:X})]}),u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),u.jsx("div",{className:"flex items-center gap-4",children:Z.size>1&&u.jsx("button",{onClick:ee,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:le?"Collapse All":"Expand All"})})]}),u.jsxs("div",{className:"flex gap-6",children:[u.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:u.jsx(Jc,{memories:J,selectedPath:o,onSelectPath:f,expandedFolders:h,onToggleFolder:E})}),u.jsx("div",{className:"flex-1 min-w-0",children:n.length===0?u.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[u.jsx(Ni,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),u.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",u.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),u.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[u.jsx(Mt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):u.jsxs("div",{children:[o&&u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",u.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:o||"(root)"}),u.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),u.jsx(Kc,{memories:g,onEdit:x,onDelete:j,expandedFolders:h,onToggleFolder:E,reviewedStatus:A,onMarkReviewed:M,onMarkUnreviewed:q,onViewRule:X})]})})]}),u.jsx("div",{className:"mt-8 mb-8",children:u.jsx(fi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("polyline",{points:"4 17 10 11 4 5"}),u.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),u.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),_&&!p&&(()=>{const z=n.find($=>$.filePath===_.filePath)??_;return u.jsx(th,{rule:z,changeInfo:O??void 0,isReviewed:A[z.filePath]??!1,onApprove:()=>{A[z.filePath]??!1?q(z.filePath):M(z.filePath,z.lastModified),H(null)},onEdit:()=>{x(z)},onDelete:()=>{j(z),H(null)},onClose:()=>H(null)})})(),T&&u.jsx(lh,{onClose:()=>w(!1),onCreateNew:()=>{w(!1),C(!0)}}),y&&u.jsx(ah,{rule:y,onConfirm:K,onCancel:()=>j(null)})]})}):u.jsx(ih,{})});export{bh as default,yh as meta};