@codeyam/codeyam-cli 0.1.5 → 0.1.6

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 (105) hide show
  1. package/analyzer-template/.build-info.json +7 -7
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +2 -2
  4. package/analyzer-template/packages/ai/package.json +1 -1
  5. package/analyzer-template/packages/ai/src/lib/completionCall.ts +102 -113
  6. package/analyzer-template/packages/aws/package.json +1 -1
  7. package/codeyam-cli/src/cli.js +5 -11
  8. package/codeyam-cli/src/cli.js.map +1 -1
  9. package/codeyam-cli/src/utils/install-skills.js +4 -4
  10. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  11. package/codeyam-cli/src/utils/requireSimulations.js +1 -1
  12. package/codeyam-cli/src/utils/requireSimulations.js.map +1 -1
  13. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +5 -6
  14. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -1
  15. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +2 -5
  16. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -1
  17. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
  18. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
  19. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +11 -18
  20. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -1
  21. package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
  22. package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
  23. package/codeyam-cli/src/utils/rules/sourceFiles.js +2 -6
  24. package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -1
  25. package/codeyam-cli/src/utils/simulationGateMiddleware.js +63 -42
  26. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  27. package/codeyam-cli/src/webserver/app/routes/api.agent-transcripts.js +486 -0
  28. package/codeyam-cli/src/webserver/app/routes/api.agent-transcripts.js.map +1 -0
  29. package/codeyam-cli/src/webserver/backgroundServer.js +10 -0
  30. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  31. package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-jNYXRRNI.js → CopyButton-CtmbP4Gl.js} +1 -1
  32. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-bwuHPyTa.js → EntityItem-DlMph_Hm.js} +1 -1
  33. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CvzqMxcu.js → EntityTypeBadge-B-0PjGOU.js} +1 -1
  34. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-BH0XDim7.js → EntityTypeIcon-DN9eiJAO.js} +1 -1
  35. package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-EhOseatT.js → InlineSpinner-C1rIyZdV.js} +1 -1
  36. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-yjIHlOGa.js → InteractivePreview-rE_fI2h2.js} +2 -2
  37. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-Cq5o8jL4.js → LibraryFunctionPreview-CnatsCw2.js} +1 -1
  38. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BvMu2i-g.js → LoadingDots-CSP6DZrh.js} +1 -1
  39. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-kgBTLoJD.js → LogViewer-CMK8Q7yk.js} +1 -1
  40. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-BzPgx-xO.js → ReportIssueModal-TCV_HBjy.js} +1 -1
  41. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CwZrv-Ok.js → SafeScreenshot-CG2uh31y.js} +1 -1
  42. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-BX2Ny2Qj.js → ScenarioViewer-CU_TDYd8.js} +1 -1
  43. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-CDpEprKa.js → TruncatedFilePath-D7IoaWUW.js} +1 -1
  44. package/codeyam-cli/src/webserver/build/client/assets/{_index-BRx8ZGZo.js → _index-B8z7mjR-.js} +1 -1
  45. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-4S4yPfFw.js → activity.(_tab)-DZu78RI1.js} +1 -1
  46. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DxCa1oBt.js +23 -0
  47. package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
  48. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D4IPYH_y.js → book-open-Bp5FLkd4.js} +1 -1
  49. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-CG65viiV.js → chevron-down-DQJA9f4o.js} +1 -1
  50. package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-DB3aFuEO.js → chunk-JZWAC4HX-7VptmeIr.js} +1 -1
  51. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-igfMr5DY.js → circle-check-B6C4LY9o.js} +1 -1
  52. package/codeyam-cli/src/webserver/build/client/assets/{copy-Coc4o_8c.js → copy-6nzYCu0G.js} +1 -1
  53. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D1zB-pYc.js → createLucideIcon-D-QUFOwe.js} +1 -1
  54. package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-JTAjQ54M.js → dev.empty-DmzSmblj.js} +1 -1
  55. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-B0h9AqE6.js → entity._sha._--zvFJ4OH.js} +1 -1
  56. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js → entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js} +1 -1
  57. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-CtYowLOt.js → entity._sha_.create-scenario-BVgNO76F.js} +1 -1
  58. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-PePWg17F.js → entity._sha_.edit._scenarioId-C7ysA4Jq.js} +1 -1
  59. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-I-Wo99C_.js → entry.client-CU6EUArK.js} +1 -1
  60. package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-9sMMAiWJ.js → fileTableUtils-EWpfFU4X.js} +1 -1
  61. package/codeyam-cli/src/webserver/build/client/assets/{files-Co65J0s3.js → files-CrxAoWIL.js} +1 -1
  62. package/codeyam-cli/src/webserver/build/client/assets/{git-BdHOxVfg.js → git-BldHtKeW.js} +1 -1
  63. package/codeyam-cli/src/webserver/build/client/assets/{index-CUM5iXwc.js → index-7-1FmlHo.js} +1 -1
  64. package/codeyam-cli/src/webserver/build/client/assets/{index-_417gcQW.js → index-DuYcwYp_.js} +1 -1
  65. package/codeyam-cli/src/webserver/build/client/assets/{labs-DAvt-sy-.js → labs-CPPVOSWB.js} +1 -1
  66. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-TzRHMVog.js → loader-circle-BnDcD54R.js} +1 -1
  67. package/codeyam-cli/src/webserver/build/client/assets/manifest-c1fc3656.js +1 -0
  68. package/codeyam-cli/src/webserver/build/client/assets/{memory-bAp4y2hv.js → memory-CfpYxpNu.js} +19 -18
  69. package/codeyam-cli/src/webserver/build/client/assets/{pause-hjzB7t2z.js → pause-DhQX2g22.js} +1 -1
  70. package/codeyam-cli/src/webserver/build/client/assets/{root-DoB3B10-.js → root-CAAbm4U5.js} +1 -1
  71. package/codeyam-cli/src/webserver/build/client/assets/{search-DcAwD_Ln.js → search-DborVoKD.js} +1 -1
  72. package/codeyam-cli/src/webserver/build/client/assets/{settings-CclxrcPK.js → settings-BpLDWmGh.js} +1 -1
  73. package/codeyam-cli/src/webserver/build/client/assets/{simulations-DVNJVQgD.js → simulations-BtrtCYJg.js} +1 -1
  74. package/codeyam-cli/src/webserver/build/client/assets/{terminal-DbEAHMbA.js → terminal-Bs4NC-VZ.js} +1 -1
  75. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CAD5b1o_.js → triangle-alert-DTf3Jojp.js} +1 -1
  76. package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-BqgrAzs3.js → useCustomSizes-D_bDZyDU.js} +1 -1
  77. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-DAFqfEDH.js → useLastLogLine-DZp6rrQD.js} +1 -1
  78. package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DZlYx2c4.js → useReportContext-BsQb6rFd.js} +1 -1
  79. package/codeyam-cli/src/webserver/build/client/assets/{useToast-ihdMtlf6.js → useToast-BOur3mUv.js} +1 -1
  80. package/codeyam-cli/src/webserver/build/server/assets/{index-C_nP9_jr.js → index-B8A_aaGG.js} +1 -1
  81. package/codeyam-cli/src/webserver/build/server/assets/server-build-69rRZnZo.js +286 -0
  82. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  83. package/codeyam-cli/src/webserver/build-info.json +5 -5
  84. package/codeyam-cli/templates/codeyam-new-rule.md +0 -2
  85. package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
  86. package/codeyam-cli/templates/prompts/conversation-guidance.txt +32 -0
  87. package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
  88. package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
  89. package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
  90. package/codeyam-cli/templates/rules-instructions.md +33 -88
  91. package/package.json +1 -1
  92. package/packages/ai/src/lib/completionCall.js +0 -5
  93. package/packages/ai/src/lib/completionCall.js.map +1 -1
  94. package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -120
  95. package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
  96. package/codeyam-cli/src/commands/list.js +0 -31
  97. package/codeyam-cli/src/commands/list.js.map +0 -1
  98. package/codeyam-cli/src/commands/webapp-info.js +0 -146
  99. package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
  100. package/codeyam-cli/src/utils/universal-mocks.js +0 -152
  101. package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
  102. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DHKuQSmR.js +0 -17
  103. package/codeyam-cli/src/webserver/build/client/assets/manifest-e24d6600.js +0 -1
  104. package/codeyam-cli/src/webserver/build/server/assets/server-build-BEaMCeTu.js +0 -273
  105. package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
@@ -1,4 +1,4 @@
1
- import{H as xr,j as s,r as I,w as zi,u as _i,c as Oi,f as Bi,L as $i}from"./chunk-JZWAC4HX-DB3aFuEO.js";import{u as Hi}from"./useReportContext-DZlYx2c4.js";import{c as Ne}from"./createLucideIcon-D1zB-pYc.js";import{T as yr,C as Gt}from"./terminal-DbEAHMbA.js";import{C as Te,a as ze}from"./copy-Coc4o_8c.js";import{C as Vi}from"./CopyButton-jNYXRRNI.js";import{C as zt}from"./chevron-down-CG65viiV.js";import{S as br}from"./search-DcAwD_Ln.js";import{F as _t,P as Ui}from"./pause-hjzB7t2z.js";import{B as qi}from"./book-open-D4IPYH_y.js";/**
1
+ import{H as xr,j as s,r as I,w as zi,u as _i,c as Oi,f as Bi,L as $i}from"./chunk-JZWAC4HX-7VptmeIr.js";import{u as Hi}from"./useReportContext-BsQb6rFd.js";import{c as Ne}from"./createLucideIcon-D-QUFOwe.js";import{T as yr,C as Jt}from"./terminal-Bs4NC-VZ.js";import{C as Te,a as ze}from"./copy-6nzYCu0G.js";import{C as Vi}from"./CopyButton-CtmbP4Gl.js";import{C as _t}from"./chevron-down-DQJA9f4o.js";import{S as br}from"./search-DborVoKD.js";import{F as Ot,P as Ui}from"./pause-DhQX2g22.js";import{B as qi}from"./book-open-Bp5FLkd4.js";/**
2
2
  * @license lucide-react v0.556.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -18,7 +18,7 @@ import{H as xr,j as s,r as I,w as zi,u as _i,c as Oi,f as Bi,L as $i}from"./chun
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Gi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ot=Ne("info",Gi);/**
21
+ */const Gi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Bt=Ne("info",Gi);/**
22
22
  * @license lucide-react v0.556.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
@@ -28,7 +28,7 @@ import{H as xr,j as s,r as I,w as zi,u as _i,c as Oi,f as Bi,L as $i}from"./chun
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const el=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Jt=Ne("plus",el);/**
31
+ */const el=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zt=Ne("plus",el);/**
32
32
  * @license lucide-react v0.556.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
@@ -38,36 +38,36 @@ import{H as xr,j as s,r as I,w as zi,u as _i,c as Oi,f as Bi,L as $i}from"./chun
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const rl=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],et=Ne("x",rl);function il(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ll=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ol=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,al={};function jn(e,n){return(al.jsx?ol:ll).test(e)}const sl=/[ \t\n\f\r]/g;function ul(e){return typeof e=="object"?e.type==="text"?Sn(e.value):!1:Sn(e)}function Sn(e){return e.replace(sl,"")===""}class tt{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}tt.prototype.normal={};tt.prototype.property={};tt.prototype.space=void 0;function wr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new tt(t,r,n)}function Bt(e){return e.toLowerCase()}class fe{constructor(n,t){this.attribute=t,this.property=n}}fe.prototype.attribute="";fe.prototype.booleanish=!1;fe.prototype.boolean=!1;fe.prototype.commaOrSpaceSeparated=!1;fe.prototype.commaSeparated=!1;fe.prototype.defined=!1;fe.prototype.mustUseProperty=!1;fe.prototype.number=!1;fe.prototype.overloadedBoolean=!1;fe.prototype.property="";fe.prototype.spaceSeparated=!1;fe.prototype.space=void 0;let cl=0;const V=Fe(),ie=Fe(),$t=Fe(),E=Fe(),te=Fe(),_e=Fe(),de=Fe();function Fe(){return 2**++cl}const Ht=Object.freeze(Object.defineProperty({__proto__:null,boolean:V,booleanish:ie,commaOrSpaceSeparated:de,commaSeparated:_e,number:E,overloadedBoolean:$t,spaceSeparated:te},Symbol.toStringTag,{value:"Module"})),kt=Object.keys(Ht);class Zt extends fe{constructor(n,t,r,i){let o=-1;if(super(n,t),Nn(this,"space",i),typeof r=="number")for(;++o<kt.length;){const l=kt[o];Nn(this,kt[o],(r&Ht[l])===Ht[l])}}}Zt.prototype.defined=!0;function Nn(e,n,t){t&&(e[n]=t)}function Be(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new Zt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Bt(r)]=r,t[Bt(o.attribute)]=r}return new tt(n,t,e.space)}const Cr=Be({properties:{ariaActiveDescendant:null,ariaAtomic:ie,ariaAutoComplete:null,ariaBusy:ie,ariaChecked:ie,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:ie,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:ie,ariaFlowTo:te,ariaGrabbed:ie,ariaHasPopup:null,ariaHidden:ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:E,ariaLive:null,ariaModal:ie,ariaMultiLine:ie,ariaMultiSelectable:ie,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:ie,ariaReadOnly:ie,ariaRelevant:null,ariaRequired:ie,ariaRoleDescription:te,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:ie,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function vr(e,n){return n in e?e[n]:n}function jr(e,n){return vr(e,n.toLowerCase())}const hl=Be({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_e,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:te,autoFocus:V,autoPlay:V,blocking:te,capture:null,charSet:null,checked:V,cite:null,className:te,cols:E,colSpan:null,content:null,contentEditable:ie,controls:V,controlsList:te,coords:E|_e,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:$t,draggable:ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:te,height:E,hidden:$t,high:E,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:te,itemRef:te,itemScope:V,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:E,pattern:null,ping:te,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:te,required:V,reversed:V,rows:E,rowSpan:E,sandbox:te,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:ie,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:ie,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:jr}),fl=Be({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:de,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_e,g2:_e,glyphName:_e,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:de,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:de,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:de,rev:de,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:de,requiredFeatures:de,requiredFonts:de,requiredFormats:de,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:de,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:de,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:de,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vr}),Sr=Be({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Nr=Be({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Er=Be({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),pl={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"},dl=/[A-Z]/g,En=/-[a-z]/g,ml=/^data[-\w.:]+$/i;function gl(e,n){const t=Bt(n);let r=n,i=fe;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ml.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(En,yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!En.test(o)){let l=o.replace(dl,xl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Zt}return new i(r,n)}function xl(e){return"-"+e.toLowerCase()}function yl(e){return e.charAt(1).toUpperCase()}const bl=wr([Cr,hl,Sr,Nr,Er],"html"),en=wr([Cr,fl,Sr,Nr,Er],"svg");function kl(e){return e.join(" ").trim()}var Re={},wt,Pn;function wl(){if(Pn)return wt;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
42
- `,u="/",f="*",h="",d="comment",p="declaration";function x(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var S=1,N=1;function A(L){var C=L.match(n);C&&(S+=C.length);var M=L.lastIndexOf(c);N=~M?L.length-M:N+L.length}function P(){var L={line:S,column:N};return function(C){return C.position=new b(L),q(),C}}function b(L){this.start=L,this.end={line:S,column:N},this.source=y.source}b.prototype.content=v;function D(L){var C=new Error(y.source+":"+S+":"+N+": "+L);if(C.reason=L,C.filename=y.source,C.line=S,C.column=N,C.source=v,!y.silent)throw C}function _(L){var C=L.exec(v);if(C){var M=C[0];return A(M),v=v.slice(M.length),C}}function q(){_(t)}function w(L){var C;for(L=L||[];C=F();)C!==!1&&L.push(C);return L}function F(){var L=P();if(!(u!=v.charAt(0)||f!=v.charAt(1))){for(var C=2;h!=v.charAt(C)&&(f!=v.charAt(C)||u!=v.charAt(C+1));)++C;if(C+=2,h===v.charAt(C-1))return D("End of comment missing");var M=v.slice(2,C-2);return N+=2,A(M),v=v.slice(C),N+=2,L({type:d,comment:M})}}function R(){var L=P(),C=_(r);if(C){if(F(),!_(i))return D("property missing ':'");var M=_(o),B=L({type:p,property:k(C[0].replace(e,h)),value:M?k(M[0].replace(e,h)):h});return _(l),B}}function Y(){var L=[];w(L);for(var C;C=R();)C!==!1&&(L.push(C),w(L));return L}return q(),Y()}function k(v){return v?v.replace(a,h):h}return wt=x,wt}var An;function Cl(){if(An)return Re;An=1;var e=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.default=t;const n=e(wl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.default)(r),a=typeof i=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:f}=c;a?i(u,f,c):f&&(o=o||{},o[u]=f)}),o}return Re}var Ue={},Tn;function vl(){if(Tn)return Ue;Tn=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},c=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,l))};return Ue.camelCase=c,Ue}var qe,In;function jl(){if(In)return qe;In=1;var e=qe&&qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Cl()),t=vl();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(l[(0,t.camelCase)(a,o)]=c)}),l}return r.default=r,qe=r,qe}var Sl=jl();const Nl=xr(Sl),Pr=Ar("end"),tn=Ar("start");function Ar(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 El(e){const n=tn(e),t=Pr(e);if(n&&t)return{start:n,end:t}}function Qe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Vt(e):""}function Vt(e){return Dn(e&&e.line)+":"+Dn(e&&e.column)}function Fn(e){return Vt(e&&e.start)+"-"+Vt(e&&e.end)}function Dn(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.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=Qe(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const nn={}.hasOwnProperty,Pl=new Map,Al=/[A-Z]/g,Tl=new Set(["table","tbody","thead","tfoot","tr"]),Il=new Set(["td","th"]),Tr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fl(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=Bl(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=Ol(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"?en:bl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Ir(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ir(e,n,t){if(n.type==="element")return Dl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Rl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ml(e,n,t);if(n.type==="mdxjsEsm")return Ll(e,n);if(n.type==="root")return zl(e,n,t);if(n.type==="text")return _l(e,n)}function Dl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=en,e.schema=i),e.ancestors.push(n);const o=Dr(e,n.tagName,!1),l=$l(e,n);let a=ln(e,n);return Tl.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!ul(c):!0})),Fr(e,l,o,n),rn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function Rl(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)}Je(e,n.position)}function Ll(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Je(e,n.position)}function Ml(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=en,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Dr(e,n.name,!0),l=Hl(e,n),a=ln(e,n);return Fr(e,l,o,n),rn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function zl(e,n,t){const r={};return rn(r,ln(e,n)),e.create(n,e.Fragment,r,t)}function _l(e,n){return n.value}function Fr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function rn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ol(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function Bl(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),c=tn(r);return n(i,o,l,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $l(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&nn.call(n.properties,i)){const o=Vl(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Il.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Hl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Je(e,n.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else Je(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function ln(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Pl;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;l=c+"-"+u,i.set(c,u+1)}}const a=Ir(e,o,l);a!==void 0&&t.push(a)}return t}function Vl(e,n,t){const r=gl(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?il(t):kl(t)),r.property==="style"){let i=typeof t=="object"?t:Ul(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ql(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pl[r.property]||r.property:r.attribute,t]}}function Ul(e,n){try{return Nl(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ae("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 Dr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=jn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=jn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return nn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Je(e)}function Je(e,n){const t=new ae("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 ql(e){const n={};let t;for(t in e)nn.call(e,t)&&(n[Wl(t)]=e[t]);return n}function Wl(e){let n=e.replace(Al,Yl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Yl(e){return"-"+e.toLowerCase()}const Ct={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"]},Ql={};function on(e,n){const t=Ql,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Rr(e,r,i)}function Rr(e,n,t){if(Xl(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 Rn(e.children,n,t)}return Array.isArray(e)?Rn(e,n,t):""}function Rn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Rr(e[i],n,t);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const Ln=document.createElement("i");function an(e){const n="&"+e+";";Ln.innerHTML=n;const t=Ln.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function me(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ge(e,n){return e.length>0?(me(e,e.length,0,n),e):n}const Mn={}.hasOwnProperty;function Lr(e){const n={};let t=-1;for(;++t<e.length;)Kl(n,e[t]);return n}function Kl(e,n){let t;for(t in n){const i=(Mn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Mn.call(i,l)||(i[l]=[]);const a=o[l];Gl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Gl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);me(e,0,0,r)}function Mr(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 ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ee(/[A-Za-z]/),oe=Ee(/[\dA-Za-z]/),Jl=Ee(/[#-'*+\--9=?A-Z^-~]/);function ct(e){return e!==null&&(e<32||e===127)}const Ut=Ee(/\d/),Zl=Ee(/[\dA-Fa-f]/),eo=Ee(/[!-/:-@[-`{-~]/);function O(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}const dt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Ie=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function $e(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&oe(e.charCodeAt(t+1))&&oe(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(c){return U(c)?(e.enter(t),a(c)):n(c)}function a(c){return U(c)&&o++<i?(e.consume(c),a):(e.exit(t),n(c))}}const to={tokenize:no};function no(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"),Q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return O(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ro={tokenize:io},zn={tokenize:lo};function io(e){const n=this,t=[];let r=0,i,o,l;return a;function a(N){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,c,u)(N)}return u(N)}function c(N){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&S();const A=n.events.length;let P=A,b;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){b=n.events[P][1].end;break}y(r);let D=A;for(;D<n.events.length;)n.events[D][1].end={...b},D++;return me(n.events,P+1,0,n.events.slice(A)),n.events.length=D,u(N)}return a(N)}function u(N){if(r===t.length){if(!i)return d(N);if(i.currentConstruct&&i.currentConstruct.concrete)return x(N);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(zn,f,h)(N)}function f(N){return i&&S(),y(r),d(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,x(N)}function d(N){return n.containerState={},e.attempt(zn,p,x)(N)}function p(N){return r++,t.push([n.currentConstruct,n.containerState]),d(N)}function x(N){if(N===null){i&&S(),y(0),e.consume(N);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),k(N)}function k(N){if(N===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(N);return}return O(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(N),k)}function v(N,A){const P=n.sliceStream(N);if(A&&P.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(P),n.parser.lazy[N.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const D=n.events.length;let _=D,q,w;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(q){w=n.events[_][1].end;break}q=!0}for(y(r),b=D;b<n.events.length;)n.events[b][1].end={...w},b++;me(n.events,_+1,0,n.events.slice(D)),n.events.length=b}}function y(N){let A=t.length;for(;A-- >N;){const P=t[A];n.containerState=P[1],P[0].exit.call(n,e)}t.length=N}function S(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function lo(e,n,t){return Q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oe(e){if(e===null||Z(e)||Ie(e))return 1;if(dt(e))return 2}function mt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const qt={name:"attention",resolveAll:oo,tokenize:ao};function oo(e,n){let t=-1,r,i,o,l,a,c,u,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},d={...e[t][1].start};_n(h,-c),_n(d,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ge(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ge(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=ge(u,mt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ge(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=ge(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,me(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function ao(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let o;return l;function l(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const u=e.exit("attentionSequence"),f=Oe(c),h=!f||f===2&&i||t.includes(c),d=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?h:h&&(i||!d)),u._close=!!(o===42?d:d&&(f||!h)),n(c)}}function _n(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const so={name:"autolink",tokenize:uo};function uo(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"),o}function o(p){return ce(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||oe(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||oe(p))&&r++<32?(e.consume(p),a):(r=0,u(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||ct(p)?t(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),f):Jl(p)?(e.consume(p),u):t(p)}function f(p){return oe(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):d(p)}function d(p){if((p===45||oe(p))&&r++<63){const x=p===45?d:h;return e.consume(p),x}return t(p)}}const nt={partial:!0,tokenize:co};function co(e,n,t){return r;function r(o){return U(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?n(o):t(o)}}const zr={continuation:{tokenize:fo},exit:po,name:"blockQuote",tokenize:ho};function ho(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function fo(e,n,t){const r=this;return i;function i(l){return U(l)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(zr,n,t)(l)}}function po(e){e.exit("blockQuote")}const _r={name:"characterEscape",tokenize:mo};function mo(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return eo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Or={name:"characterReference",tokenize:go};function go(e,n,t){const r=this;let i=0,o,l;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"),u):(e.enter("characterReferenceValue"),o=31,l=oe,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Zl,f):(e.enter("characterReferenceValue"),o=7,l=Ut,f(h))}function f(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return l===oe&&!an(r.sliceSerialize(d))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(h)&&i++<o?(e.consume(h),f):t(h)}}const On={partial:!0,tokenize:yo},Bn={concrete:!0,name:"codeFenced",tokenize:xo};function xo(e,n,t){const r=this,i={partial:!0,tokenize:P};let o=0,l=0,a;return c;function c(b){return u(b)}function u(b){const D=r.events[r.events.length-1];return o=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),U(b)?Q(e,h,"whitespace")(b):h(b))}function h(b){return b===null||O(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(On,k,A)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(b)):U(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),d)}function p(b){return b===null||O(b)?h(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(b)):b===96&&b===a?t(b):(e.consume(b),x)}function k(b){return e.attempt(i,A,v)(b)}function v(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&U(b)?Q(e,S,"linePrefix",o+1)(b):S(b)}function S(b){return b===null||O(b)?e.check(On,k,A)(b):(e.enter("codeFlowValue"),N(b))}function N(b){return b===null||O(b)?(e.exit("codeFlowValue"),S(b)):(e.consume(b),N)}function A(b){return e.exit("codeFenced"),n(b)}function P(b,D,_){let q=0;return w;function w(C){return b.enter("lineEnding"),b.consume(C),b.exit("lineEnding"),F}function F(C){return b.enter("codeFencedFence"),U(C)?Q(b,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):R(C)}function R(C){return C===a?(b.enter("codeFencedFenceSequence"),Y(C)):_(C)}function Y(C){return C===a?(q++,b.consume(C),Y):q>=l?(b.exit("codeFencedFenceSequence"),U(C)?Q(b,L,"whitespace")(C):L(C)):_(C)}function L(C){return C===null||O(C)?(b.exit("codeFencedFence"),D(C)):_(C)}}}function yo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const vt={name:"codeIndented",tokenize:ko},bo={partial:!0,tokenize:wo};function ko(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?c(u):O(u)?e.attempt(bo,l,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||O(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function wo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):O(l)?i(l):t(l)}}const Co={name:"codeText",previous:jo,resolve:vo,tokenize:So};function vo(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 jo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function So(e,n,t){let r=0,i,o;return l;function l(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?(o=e.enter("codeTextSequence"),i=0,f(h)):O(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||O(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(o.type="codeTextData",u(h))}}class No{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&We(this.left,r),o.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),We(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),We(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);We(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);We(this.left,t.reverse())}}}function We(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 Br(e){const n={};let t=-1,r,i,o,l,a,c,u;const f=new No(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,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Eo(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[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 me(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Eo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,c=[],u={};let f,h,d=-1,p=t,x=0,k=0;const v=[k];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(k=d+1,v.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),d=v.length;d--;){const y=a.slice(v[d],v[d+1]),S=o.pop();c.push([S,S+y.length-1]),e.splice(S,2,y)}for(c.reverse(),d=-1;++d<c.length;)u[x+c[d][0]]=x+c[d][1],x+=c[d][1]-c[d][0]-1;return u}const Po={resolve:To,tokenize:Io},Ao={partial:!0,tokenize:Fo};function To(e){return Br(e),e}function Io(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?o(a):O(a)?e.check(Ao,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Fo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||O(l))return t(l);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(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function $r(e,n,t,r,i,o,l,a,c){const u=c||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),d):y===null||y===32||y===41||ct(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(y))}function d(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),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),d(y)):y===null||y===60||O(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 k(y){return!f&&(y===null||y===41||Z(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||ct(y)?t(y):(e.consume(y),y===92?v:k)}function v(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Hr(e,n,t,r,i,o){const l=this;let a=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):O(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||O(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),c||(c=!U(p)),p===92?d:h)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function Vr(e,n,t,r,i,o){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,c):t(d)}function c(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),c(l)):d===null?t(d):O(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||O(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?h:f)}function h(d){return d===l||d===92?(e.consume(d),f):f(d)}}function Xe(e,n){let t;return r;function r(i){return O(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):U(i)?Q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Do={name:"definition",tokenize:Lo},Ro={partial:!0,tokenize:Mo};function Lo(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Hr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ye(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 Z(p)?Xe(e,u)(p):u(p)}function u(p){return $r(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ro,h,h)(p)}function h(p){return U(p)?Q(e,d,"whitespace")(p):d(p)}function d(p){return p===null||O(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Mo(e,n,t){return r;function r(a){return Z(a)?Xe(e,i)(a):t(a)}function i(a){return Vr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return U(a)?Q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||O(a)?n(a):t(a)}}const zo={name:"hardBreakEscape",tokenize:_o};function _o(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return O(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const Oo={name:"headingAtx",resolve:Bo,tokenize:$o};function Bo(e,n){let t=e.length-2,r=3,i,o;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},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},me(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function $o(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||O(f)?(e.exit("atxHeading"),n(f)):U(f)?Q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Ho=["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"],$n=["pre","script","style","textarea"],Vo={concrete:!0,name:"htmlFlow",resolveTo:Wo,tokenize:Yo},Uo={partial:!0,tokenize:Xo},qo={partial:!0,tokenize:Qo};function Wo(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 Yo(e,n,t){const r=this;let i,o,l,a,c;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),h}function h(g){return g===33?(e.consume(g),d):g===47?(e.consume(g),o=!0,k):g===63?(e.consume(g),i=3,r.interrupt?n:m):ce(g)?(e.consume(g),l=String.fromCharCode(g),v):t(g)}function d(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,x):ce(g)?(e.consume(g),i=4,r.interrupt?n:m):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:m):t(g)}function x(g){const G="CDATA[";return g===G.charCodeAt(a++)?(e.consume(g),a===G.length?r.interrupt?n:R:x):t(g)}function k(g){return ce(g)?(e.consume(g),l=String.fromCharCode(g),v):t(g)}function v(g){if(g===null||g===47||g===62||Z(g)){const G=g===47,re=l.toLowerCase();return!G&&!o&&$n.includes(re)?(i=1,r.interrupt?n(g):R(g)):Ho.includes(l.toLowerCase())?(i=6,G?(e.consume(g),y):r.interrupt?n(g):R(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):o?S(g):N(g))}return g===45||oe(g)?(e.consume(g),l+=String.fromCharCode(g),v):t(g)}function y(g){return g===62?(e.consume(g),r.interrupt?n:R):t(g)}function S(g){return U(g)?(e.consume(g),S):w(g)}function N(g){return g===47?(e.consume(g),w):g===58||g===95||ce(g)?(e.consume(g),A):U(g)?(e.consume(g),N):w(g)}function A(g){return g===45||g===46||g===58||g===95||oe(g)?(e.consume(g),A):P(g)}function P(g){return g===61?(e.consume(g),b):U(g)?(e.consume(g),P):N(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),c=g,D):U(g)?(e.consume(g),b):_(g)}function D(g){return g===c?(e.consume(g),c=null,q):g===null||O(g)?t(g):(e.consume(g),D)}function _(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Z(g)?P(g):(e.consume(g),_)}function q(g){return g===47||g===62||U(g)?N(g):t(g)}function w(g){return g===62?(e.consume(g),F):t(g)}function F(g){return g===null||O(g)?R(g):U(g)?(e.consume(g),F):t(g)}function R(g){return g===45&&i===2?(e.consume(g),M):g===60&&i===1?(e.consume(g),B):g===62&&i===4?(e.consume(g),le):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),X):O(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Uo,se,Y)(g)):g===null||O(g)?(e.exit("htmlFlowData"),Y(g)):(e.consume(g),R)}function Y(g){return e.check(qo,L,se)(g)}function L(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),C}function C(g){return g===null||O(g)?Y(g):(e.enter("htmlFlowData"),R(g))}function M(g){return g===45?(e.consume(g),m):R(g)}function B(g){return g===47?(e.consume(g),l="",K):R(g)}function K(g){if(g===62){const G=l.toLowerCase();return $n.includes(G)?(e.consume(g),le):R(g)}return ce(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),K):R(g)}function X(g){return g===93?(e.consume(g),m):R(g)}function m(g){return g===62?(e.consume(g),le):g===45&&i===2?(e.consume(g),m):R(g)}function le(g){return g===null||O(g)?(e.exit("htmlFlowData"),se(g)):(e.consume(g),le)}function se(g){return e.exit("htmlFlow"),n(g)}}function Qo(e,n,t){const r=this;return i;function i(l){return O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Xo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(nt,n,t)}}const Ko={name:"htmlText",tokenize:Go};function Go(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),P):m===63?(e.consume(m),N):ce(m)?(e.consume(m),_):t(m)}function u(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,x):ce(m)?(e.consume(m),S):t(m)}function f(m){return m===45?(e.consume(m),p):t(m)}function h(m){return m===null?t(m):m===45?(e.consume(m),d):O(m)?(l=h,B(m)):(e.consume(m),h)}function d(m){return m===45?(e.consume(m),p):h(m)}function p(m){return m===62?M(m):m===45?d(m):h(m)}function x(m){const le="CDATA[";return m===le.charCodeAt(o++)?(e.consume(m),o===le.length?k:x):t(m)}function k(m){return m===null?t(m):m===93?(e.consume(m),v):O(m)?(l=k,B(m)):(e.consume(m),k)}function v(m){return m===93?(e.consume(m),y):k(m)}function y(m){return m===62?M(m):m===93?(e.consume(m),y):k(m)}function S(m){return m===null||m===62?M(m):O(m)?(l=S,B(m)):(e.consume(m),S)}function N(m){return m===null?t(m):m===63?(e.consume(m),A):O(m)?(l=N,B(m)):(e.consume(m),N)}function A(m){return m===62?M(m):N(m)}function P(m){return ce(m)?(e.consume(m),b):t(m)}function b(m){return m===45||oe(m)?(e.consume(m),b):D(m)}function D(m){return O(m)?(l=D,B(m)):U(m)?(e.consume(m),D):M(m)}function _(m){return m===45||oe(m)?(e.consume(m),_):m===47||m===62||Z(m)?q(m):t(m)}function q(m){return m===47?(e.consume(m),M):m===58||m===95||ce(m)?(e.consume(m),w):O(m)?(l=q,B(m)):U(m)?(e.consume(m),q):M(m)}function w(m){return m===45||m===46||m===58||m===95||oe(m)?(e.consume(m),w):F(m)}function F(m){return m===61?(e.consume(m),R):O(m)?(l=F,B(m)):U(m)?(e.consume(m),F):q(m)}function R(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,Y):O(m)?(l=R,B(m)):U(m)?(e.consume(m),R):(e.consume(m),L)}function Y(m){return m===i?(e.consume(m),i=void 0,C):m===null?t(m):O(m)?(l=Y,B(m)):(e.consume(m),Y)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||Z(m)?q(m):(e.consume(m),L)}function C(m){return m===47||m===62||Z(m)?q(m):t(m)}function M(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function B(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),K}function K(m){return U(m)?Q(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):X(m)}function X(m){return e.enter("htmlTextData"),l(m)}}const sn={name:"labelEnd",resolveAll:ta,resolveTo:na,tokenize:ra},Jo={tokenize:ia},Zo={tokenize:la},ea={tokenize:oa};function ta(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&&me(e,0,e.length,t),e}function na(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",c,n],["enter",u,n]],a=ge(a,e.slice(o+1,o+r+3)),a=ge(a,[["enter",f,n]]),a=ge(a,mt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=ge(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=ge(a,e.slice(l+1)),a=ge(a,[["exit",c,n]]),me(e,o,e.length,a),e}function ra(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(d){return o?o._inactive?h(d):(l=r.parser.defined.includes(ye(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):t(d)}function c(d){return d===40?e.attempt(Jo,f,l?f:h)(d):d===91?e.attempt(Zo,f,l?u:h)(d):l?f(d):h(d)}function u(d){return e.attempt(ea,f,h)(d)}function f(d){return n(d)}function h(d){return o._balanced=!0,t(d)}}function ia(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 Z(h)?Xe(e,o)(h):o(h)}function o(h){return h===41?f(h):$r(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return Z(h)?Xe(e,c)(h):f(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?Vr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Z(h)?Xe(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 la(e,n,t){const r=this;return i;function i(a){return Hr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function oa(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const aa={name:"labelStartImage",resolveAll:sn.resolveAll,tokenize:sa};function sa(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const ua={name:"labelStartLink",resolveAll:sn.resolveAll,tokenize:ca};function ca(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const jt={name:"lineEnding",tokenize:ha};function ha(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,n,"linePrefix")}}const ut={name:"thematicBreak",tokenize:fa};function fa(e,n,t){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||O(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),U(u)?Q(e,a,"whitespace")(u):a(u))}}const he={continuation:{tokenize:ga},exit:ya,name:"list",tokenize:ma},pa={partial:!0,tokenize:ba},da={partial:!0,tokenize:xa};function ma(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=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:Ut(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(ut,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return Ut(p)&&++l<10?(e.consume(p),c):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(nt,r.interrupt?t:f,e.attempt(pa,d,h))}function f(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function h(p){return U(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ga(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(nt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!U(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(da,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(he,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xa(e,n,t){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function ya(e){e.exit(this.containerState.type)}function ba(e,n,t){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!U(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const Hn={name:"setextUnderline",resolveTo:ka,tokenize:wa};function ka(e,n){let t=e.length,r,i,o;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),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function wa(e,n,t){const r=this;let i;return o;function o(u){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=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),U(u)?Q(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||O(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Ca={tokenize:va};function va(e){const n=this,t=e.attempt(nt,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Po,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ja={resolveAll:qr()},Sa=Ur("string"),Na=Ur("text");function Ur(e){return{resolveAll:qr(e==="text"?Ea:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(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 u(f)?(t.exit("data"),o(f)):(t.consume(f),c)}function u(f){if(f===null)return!0;const h=i[f];let d=-1;if(h)for(;++d<h.length;){const p=h[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function qr(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ea(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 o=i.length,l=-1,a=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)c=!0,a++;else if(u!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Pa={42:he,43:he,45:he,48:he,49:he,50:he,51:he,52:he,53:he,54:he,55:he,56:he,57:he,62:zr},Aa={91:Do},Ta={[-2]:vt,[-1]:vt,32:vt},Ia={35:Oo,42:ut,45:[Hn,ut],60:Vo,61:Hn,95:ut,96:Bn,126:Bn},Fa={38:Or,92:_r},Da={[-5]:jt,[-4]:jt,[-3]:jt,33:aa,38:Or,42:qt,60:[so,Ko],91:ua,92:[zo,_r],93:sn,95:qt,96:Co},Ra={null:[qt,ja]},La={null:[42,95]},Ma={null:[]},za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:La,contentInitial:Aa,disable:Ma,document:Pa,flow:Ia,flowInitial:Ta,insideSpan:Ra,string:Fa,text:Da},Symbol.toStringTag,{value:"Module"}));function _a(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={},o=[];let l=[],a=[];const c={attempt:D(P),check:D(b),consume:S,enter:N,exit:A,interrupt:D(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:h};let f=n.tokenize.call(u,c);return n.resolveAll&&o.push(n),u;function h(F){return l=ge(l,F),v(),l[l.length-1]!==null?[]:(_(n,0),u.events=mt(o,u.events,u),u.events)}function d(F,R){return Ba(p(F),R)}function p(F){return Oa(l,F)}function x(){const{_bufferIndex:F,_index:R,line:Y,column:L,offset:C}=r;return{_bufferIndex:F,_index:R,line:Y,column:L,offset:C}}function k(F){i[F.line]=F.column,w()}function v(){let F;for(;r._index<l.length;){const R=l[r._index];if(typeof R=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<R.length;)y(R.charCodeAt(r._bufferIndex));else y(R)}}function y(F){f=f(F)}function S(F){O(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,w()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function N(F,R){const Y=R||{};return Y.type=F,Y.start=x(),u.events.push(["enter",Y,u]),a.push(Y),Y}function A(F){const R=a.pop();return R.end=x(),u.events.push(["exit",R,u]),R}function P(F,R){_(F,R.from)}function b(F,R){R.restore()}function D(F,R){return Y;function Y(L,C,M){let B,K,X,m;return Array.isArray(L)?se(L):"tokenize"in L?se([L]):le(L);function le(ne){return z;function z(H){const ee=H!==null&&ne[H],ue=H!==null&&ne.null,be=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return se(be)(H)}}function se(ne){return B=ne,K=0,ne.length===0?M:g(ne[K])}function g(ne){return z;function z(H){return m=q(),X=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?re():ne.tokenize.call(R?Object.assign(Object.create(u),R):u,c,G,re)(H)}}function G(ne){return F(X,m),C}function re(ne){return m.restore(),++K<B.length?g(B[K]):M}}}function _(F,R){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&me(u.events,R,u.events.length-R,F.resolve(u.events.slice(R),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function q(){const F=x(),R=u.previous,Y=u.currentConstruct,L=u.events.length,C=Array.from(a);return{from:L,restore:M};function M(){r=F,u.previous=R,u.currentConstruct=Y,u.events.length=L,a=C,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Oa(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ba(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
41
+ */const rl=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],et=Ne("x",rl);function il(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ll=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ol=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,al={};function jn(e,n){return(al.jsx?ol:ll).test(e)}const sl=/[ \t\n\f\r]/g;function ul(e){return typeof e=="object"?e.type==="text"?Sn(e.value):!1:Sn(e)}function Sn(e){return e.replace(sl,"")===""}class tt{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}tt.prototype.normal={};tt.prototype.property={};tt.prototype.space=void 0;function wr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new tt(t,r,n)}function $t(e){return e.toLowerCase()}class fe{constructor(n,t){this.attribute=t,this.property=n}}fe.prototype.attribute="";fe.prototype.booleanish=!1;fe.prototype.boolean=!1;fe.prototype.commaOrSpaceSeparated=!1;fe.prototype.commaSeparated=!1;fe.prototype.defined=!1;fe.prototype.mustUseProperty=!1;fe.prototype.number=!1;fe.prototype.overloadedBoolean=!1;fe.prototype.property="";fe.prototype.spaceSeparated=!1;fe.prototype.space=void 0;let cl=0;const V=Fe(),ie=Fe(),Ht=Fe(),E=Fe(),te=Fe(),_e=Fe(),de=Fe();function Fe(){return 2**++cl}const Vt=Object.freeze(Object.defineProperty({__proto__:null,boolean:V,booleanish:ie,commaOrSpaceSeparated:de,commaSeparated:_e,number:E,overloadedBoolean:Ht,spaceSeparated:te},Symbol.toStringTag,{value:"Module"})),wt=Object.keys(Vt);class en extends fe{constructor(n,t,r,i){let o=-1;if(super(n,t),Nn(this,"space",i),typeof r=="number")for(;++o<wt.length;){const l=wt[o];Nn(this,wt[o],(r&Vt[l])===Vt[l])}}}en.prototype.defined=!0;function Nn(e,n,t){t&&(e[n]=t)}function Be(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new en(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[$t(r)]=r,t[$t(o.attribute)]=r}return new tt(n,t,e.space)}const Cr=Be({properties:{ariaActiveDescendant:null,ariaAtomic:ie,ariaAutoComplete:null,ariaBusy:ie,ariaChecked:ie,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:ie,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:ie,ariaFlowTo:te,ariaGrabbed:ie,ariaHasPopup:null,ariaHidden:ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:E,ariaLive:null,ariaModal:ie,ariaMultiLine:ie,ariaMultiSelectable:ie,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:ie,ariaReadOnly:ie,ariaRelevant:null,ariaRequired:ie,ariaRoleDescription:te,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:ie,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function vr(e,n){return n in e?e[n]:n}function jr(e,n){return vr(e,n.toLowerCase())}const hl=Be({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_e,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:te,autoFocus:V,autoPlay:V,blocking:te,capture:null,charSet:null,checked:V,cite:null,className:te,cols:E,colSpan:null,content:null,contentEditable:ie,controls:V,controlsList:te,coords:E|_e,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Ht,draggable:ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:te,height:E,hidden:Ht,high:E,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:te,itemRef:te,itemScope:V,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:E,pattern:null,ping:te,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:te,required:V,reversed:V,rows:E,rowSpan:E,sandbox:te,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:ie,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:ie,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:jr}),fl=Be({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:de,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_e,g2:_e,glyphName:_e,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:de,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:de,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:de,rev:de,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:de,requiredFeatures:de,requiredFonts:de,requiredFormats:de,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:de,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:de,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:de,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vr}),Sr=Be({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Nr=Be({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Er=Be({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),pl={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"},dl=/[A-Z]/g,En=/-[a-z]/g,ml=/^data[-\w.:]+$/i;function gl(e,n){const t=$t(n);let r=n,i=fe;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ml.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(En,yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!En.test(o)){let l=o.replace(dl,xl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=en}return new i(r,n)}function xl(e){return"-"+e.toLowerCase()}function yl(e){return e.charAt(1).toUpperCase()}const bl=wr([Cr,hl,Sr,Nr,Er],"html"),tn=wr([Cr,fl,Sr,Nr,Er],"svg");function kl(e){return e.join(" ").trim()}var Re={},Ct,Pn;function wl(){if(Pn)return Ct;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
42
+ `,u="/",f="*",h="",d="comment",p="declaration";function x(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var j=1,N=1;function A(L){var C=L.match(n);C&&(j+=C.length);var M=L.lastIndexOf(c);N=~M?L.length-M:N+L.length}function P(){var L={line:j,column:N};return function(C){return C.position=new k(L),q(),C}}function k(L){this.start=L,this.end={line:j,column:N},this.source=y.source}k.prototype.content=v;function D(L){var C=new Error(y.source+":"+j+":"+N+": "+L);if(C.reason=L,C.filename=y.source,C.line=j,C.column=N,C.source=v,!y.silent)throw C}function _(L){var C=L.exec(v);if(C){var M=C[0];return A(M),v=v.slice(M.length),C}}function q(){_(t)}function w(L){var C;for(L=L||[];C=F();)C!==!1&&L.push(C);return L}function F(){var L=P();if(!(u!=v.charAt(0)||f!=v.charAt(1))){for(var C=2;h!=v.charAt(C)&&(f!=v.charAt(C)||u!=v.charAt(C+1));)++C;if(C+=2,h===v.charAt(C-1))return D("End of comment missing");var M=v.slice(2,C-2);return N+=2,A(M),v=v.slice(C),N+=2,L({type:d,comment:M})}}function R(){var L=P(),C=_(r);if(C){if(F(),!_(i))return D("property missing ':'");var M=_(o),B=L({type:p,property:b(C[0].replace(e,h)),value:M?b(M[0].replace(e,h)):h});return _(l),B}}function Y(){var L=[];w(L);for(var C;C=R();)C!==!1&&(L.push(C),w(L));return L}return q(),Y()}function b(v){return v?v.replace(a,h):h}return Ct=x,Ct}var An;function Cl(){if(An)return Re;An=1;var e=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.default=t;const n=e(wl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.default)(r),a=typeof i=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:f}=c;a?i(u,f,c):f&&(o=o||{},o[u]=f)}),o}return Re}var Ue={},Tn;function vl(){if(Tn)return Ue;Tn=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},c=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,l))};return Ue.camelCase=c,Ue}var qe,In;function jl(){if(In)return qe;In=1;var e=qe&&qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Cl()),t=vl();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(l[(0,t.camelCase)(a,o)]=c)}),l}return r.default=r,qe=r,qe}var Sl=jl();const Nl=xr(Sl),Pr=Ar("end"),nn=Ar("start");function Ar(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 El(e){const n=nn(e),t=Pr(e);if(n&&t)return{start:n,end:t}}function Qe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Ut(e):""}function Ut(e){return Dn(e&&e.line)+":"+Dn(e&&e.column)}function Fn(e){return Ut(e&&e.start)+"-"+Ut(e&&e.end)}function Dn(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.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=Qe(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const rn={}.hasOwnProperty,Pl=new Map,Al=/[A-Z]/g,Tl=new Set(["table","tbody","thead","tfoot","tr"]),Il=new Set(["td","th"]),Tr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fl(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=Bl(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=Ol(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"?tn:bl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Ir(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ir(e,n,t){if(n.type==="element")return Dl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Rl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ml(e,n,t);if(n.type==="mdxjsEsm")return Ll(e,n);if(n.type==="root")return zl(e,n,t);if(n.type==="text")return _l(e,n)}function Dl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(n);const o=Dr(e,n.tagName,!1),l=$l(e,n);let a=on(e,n);return Tl.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!ul(c):!0})),Fr(e,l,o,n),ln(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function Rl(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)}Je(e,n.position)}function Ll(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Je(e,n.position)}function Ml(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Dr(e,n.name,!0),l=Hl(e,n),a=on(e,n);return Fr(e,l,o,n),ln(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function zl(e,n,t){const r={};return ln(r,on(e,n)),e.create(n,e.Fragment,r,t)}function _l(e,n){return n.value}function Fr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function ln(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ol(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function Bl(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),c=nn(r);return n(i,o,l,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $l(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&rn.call(n.properties,i)){const o=Vl(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Il.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Hl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Je(e,n.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else Je(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function on(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Pl;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;l=c+"-"+u,i.set(c,u+1)}}const a=Ir(e,o,l);a!==void 0&&t.push(a)}return t}function Vl(e,n,t){const r=gl(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?il(t):kl(t)),r.property==="style"){let i=typeof t=="object"?t:Ul(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ql(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pl[r.property]||r.property:r.attribute,t]}}function Ul(e,n){try{return Nl(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ae("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 Dr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=jn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=jn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return rn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Je(e)}function Je(e,n){const t=new ae("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 ql(e){const n={};let t;for(t in e)rn.call(e,t)&&(n[Wl(t)]=e[t]);return n}function Wl(e){let n=e.replace(Al,Yl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Yl(e){return"-"+e.toLowerCase()}const vt={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"]},Ql={};function an(e,n){const t=Ql,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Rr(e,r,i)}function Rr(e,n,t){if(Xl(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 Rn(e.children,n,t)}return Array.isArray(e)?Rn(e,n,t):""}function Rn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Rr(e[i],n,t);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const Ln=document.createElement("i");function sn(e){const n="&"+e+";";Ln.innerHTML=n;const t=Ln.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function me(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ge(e,n){return e.length>0?(me(e,e.length,0,n),e):n}const Mn={}.hasOwnProperty;function Lr(e){const n={};let t=-1;for(;++t<e.length;)Kl(n,e[t]);return n}function Kl(e,n){let t;for(t in n){const i=(Mn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Mn.call(i,l)||(i[l]=[]);const a=o[l];Gl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Gl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);me(e,0,0,r)}function Mr(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 ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ee(/[A-Za-z]/),oe=Ee(/[\dA-Za-z]/),Jl=Ee(/[#-'*+\--9=?A-Z^-~]/);function ct(e){return e!==null&&(e<32||e===127)}const qt=Ee(/\d/),Zl=Ee(/[\dA-Fa-f]/),eo=Ee(/[!-/:-@[-`{-~]/);function O(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}const mt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Ie=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function $e(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&oe(e.charCodeAt(t+1))&&oe(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(c){return U(c)?(e.enter(t),a(c)):n(c)}function a(c){return U(c)&&o++<i?(e.consume(c),a):(e.exit(t),n(c))}}const to={tokenize:no};function no(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"),Q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return O(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ro={tokenize:io},zn={tokenize:lo};function io(e){const n=this,t=[];let r=0,i,o,l;return a;function a(N){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,c,u)(N)}return u(N)}function c(N){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&j();const A=n.events.length;let P=A,k;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){k=n.events[P][1].end;break}y(r);let D=A;for(;D<n.events.length;)n.events[D][1].end={...k},D++;return me(n.events,P+1,0,n.events.slice(A)),n.events.length=D,u(N)}return a(N)}function u(N){if(r===t.length){if(!i)return d(N);if(i.currentConstruct&&i.currentConstruct.concrete)return x(N);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(zn,f,h)(N)}function f(N){return i&&j(),y(r),d(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,x(N)}function d(N){return n.containerState={},e.attempt(zn,p,x)(N)}function p(N){return r++,t.push([n.currentConstruct,n.containerState]),d(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:o}),b(N)}function b(N){if(N===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(N);return}return O(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(N),b)}function v(N,A){const P=n.sliceStream(N);if(A&&P.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(P),n.parser.lazy[N.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const D=n.events.length;let _=D,q,w;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(q){w=n.events[_][1].end;break}q=!0}for(y(r),k=D;k<n.events.length;)n.events[k][1].end={...w},k++;me(n.events,_+1,0,n.events.slice(D)),n.events.length=k}}function y(N){let A=t.length;for(;A-- >N;){const P=t[A];n.containerState=P[1],P[0].exit.call(n,e)}t.length=N}function j(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function lo(e,n,t){return Q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oe(e){if(e===null||Z(e)||Ie(e))return 1;if(mt(e))return 2}function gt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Wt={name:"attention",resolveAll:oo,tokenize:ao};function oo(e,n){let t=-1,r,i,o,l,a,c,u,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},d={...e[t][1].start};_n(h,-c),_n(d,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ge(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ge(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=ge(u,gt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ge(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=ge(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,me(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function ao(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let o;return l;function l(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const u=e.exit("attentionSequence"),f=Oe(c),h=!f||f===2&&i||t.includes(c),d=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?h:h&&(i||!d)),u._close=!!(o===42?d:d&&(f||!h)),n(c)}}function _n(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const so={name:"autolink",tokenize:uo};function uo(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"),o}function o(p){return ce(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||oe(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||oe(p))&&r++<32?(e.consume(p),a):(r=0,u(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||ct(p)?t(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),f):Jl(p)?(e.consume(p),u):t(p)}function f(p){return oe(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):d(p)}function d(p){if((p===45||oe(p))&&r++<63){const x=p===45?d:h;return e.consume(p),x}return t(p)}}const nt={partial:!0,tokenize:co};function co(e,n,t){return r;function r(o){return U(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?n(o):t(o)}}const zr={continuation:{tokenize:fo},exit:po,name:"blockQuote",tokenize:ho};function ho(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function fo(e,n,t){const r=this;return i;function i(l){return U(l)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(zr,n,t)(l)}}function po(e){e.exit("blockQuote")}const _r={name:"characterEscape",tokenize:mo};function mo(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return eo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Or={name:"characterReference",tokenize:go};function go(e,n,t){const r=this;let i=0,o,l;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"),u):(e.enter("characterReferenceValue"),o=31,l=oe,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Zl,f):(e.enter("characterReferenceValue"),o=7,l=qt,f(h))}function f(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return l===oe&&!sn(r.sliceSerialize(d))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(h)&&i++<o?(e.consume(h),f):t(h)}}const On={partial:!0,tokenize:yo},Bn={concrete:!0,name:"codeFenced",tokenize:xo};function xo(e,n,t){const r=this,i={partial:!0,tokenize:P};let o=0,l=0,a;return c;function c(k){return u(k)}function u(k){const D=r.events[r.events.length-1];return o=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===a?(l++,e.consume(k),f):l<3?t(k):(e.exit("codeFencedFenceSequence"),U(k)?Q(e,h,"whitespace")(k):h(k))}function h(k){return k===null||O(k)?(e.exit("codeFencedFence"),r.interrupt?n(k):e.check(On,b,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===null||O(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):U(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(k)):k===96&&k===a?t(k):(e.consume(k),d)}function p(k){return k===null||O(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||O(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===a?t(k):(e.consume(k),x)}function b(k){return e.attempt(i,A,v)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),y}function y(k){return o>0&&U(k)?Q(e,j,"linePrefix",o+1)(k):j(k)}function j(k){return k===null||O(k)?e.check(On,b,A)(k):(e.enter("codeFlowValue"),N(k))}function N(k){return k===null||O(k)?(e.exit("codeFlowValue"),j(k)):(e.consume(k),N)}function A(k){return e.exit("codeFenced"),n(k)}function P(k,D,_){let q=0;return w;function w(C){return k.enter("lineEnding"),k.consume(C),k.exit("lineEnding"),F}function F(C){return k.enter("codeFencedFence"),U(C)?Q(k,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):R(C)}function R(C){return C===a?(k.enter("codeFencedFenceSequence"),Y(C)):_(C)}function Y(C){return C===a?(q++,k.consume(C),Y):q>=l?(k.exit("codeFencedFenceSequence"),U(C)?Q(k,L,"whitespace")(C):L(C)):_(C)}function L(C){return C===null||O(C)?(k.exit("codeFencedFence"),D(C)):_(C)}}}function yo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const jt={name:"codeIndented",tokenize:ko},bo={partial:!0,tokenize:wo};function ko(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?c(u):O(u)?e.attempt(bo,l,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||O(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function wo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):O(l)?i(l):t(l)}}const Co={name:"codeText",previous:jo,resolve:vo,tokenize:So};function vo(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 jo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function So(e,n,t){let r=0,i,o;return l;function l(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?(o=e.enter("codeTextSequence"),i=0,f(h)):O(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||O(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(o.type="codeTextData",u(h))}}class No{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&We(this.left,r),o.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),We(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),We(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);We(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);We(this.left,t.reverse())}}}function We(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 Br(e){const n={};let t=-1,r,i,o,l,a,c,u;const f=new No(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,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Eo(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[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 me(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Eo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,c=[],u={};let f,h,d=-1,p=t,x=0,b=0;const v=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(b=d+1,v.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),d=v.length;d--;){const y=a.slice(v[d],v[d+1]),j=o.pop();c.push([j,j+y.length-1]),e.splice(j,2,y)}for(c.reverse(),d=-1;++d<c.length;)u[x+c[d][0]]=x+c[d][1],x+=c[d][1]-c[d][0]-1;return u}const Po={resolve:To,tokenize:Io},Ao={partial:!0,tokenize:Fo};function To(e){return Br(e),e}function Io(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?o(a):O(a)?e.check(Ao,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Fo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||O(l))return t(l);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(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function $r(e,n,t,r,i,o,l,a,c){const u=c||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),d):y===null||y===32||y===41||ct(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function d(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),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),d(y)):y===null||y===60||O(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||Z(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,b):y===41?(e.consume(y),f--,b):y===null||y===32||y===40||ct(y)?t(y):(e.consume(y),y===92?v:b)}function v(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function Hr(e,n,t,r,i,o){const l=this;let a=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):O(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||O(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),c||(c=!U(p)),p===92?d:h)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function Vr(e,n,t,r,i,o){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,c):t(d)}function c(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),c(l)):d===null?t(d):O(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||O(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?h:f)}function h(d){return d===l||d===92?(e.consume(d),f):f(d)}}function Xe(e,n){let t;return r;function r(i){return O(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):U(i)?Q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Do={name:"definition",tokenize:Lo},Ro={partial:!0,tokenize:Mo};function Lo(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Hr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ye(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 Z(p)?Xe(e,u)(p):u(p)}function u(p){return $r(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ro,h,h)(p)}function h(p){return U(p)?Q(e,d,"whitespace")(p):d(p)}function d(p){return p===null||O(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Mo(e,n,t){return r;function r(a){return Z(a)?Xe(e,i)(a):t(a)}function i(a){return Vr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return U(a)?Q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||O(a)?n(a):t(a)}}const zo={name:"hardBreakEscape",tokenize:_o};function _o(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return O(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const Oo={name:"headingAtx",resolve:Bo,tokenize:$o};function Bo(e,n){let t=e.length-2,r=3,i,o;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},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},me(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function $o(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||O(f)?(e.exit("atxHeading"),n(f)):U(f)?Q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Ho=["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"],$n=["pre","script","style","textarea"],Vo={concrete:!0,name:"htmlFlow",resolveTo:Wo,tokenize:Yo},Uo={partial:!0,tokenize:Xo},qo={partial:!0,tokenize:Qo};function Wo(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 Yo(e,n,t){const r=this;let i,o,l,a,c;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),h}function h(g){return g===33?(e.consume(g),d):g===47?(e.consume(g),o=!0,b):g===63?(e.consume(g),i=3,r.interrupt?n:m):ce(g)?(e.consume(g),l=String.fromCharCode(g),v):t(g)}function d(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,x):ce(g)?(e.consume(g),i=4,r.interrupt?n:m):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:m):t(g)}function x(g){const G="CDATA[";return g===G.charCodeAt(a++)?(e.consume(g),a===G.length?r.interrupt?n:R:x):t(g)}function b(g){return ce(g)?(e.consume(g),l=String.fromCharCode(g),v):t(g)}function v(g){if(g===null||g===47||g===62||Z(g)){const G=g===47,re=l.toLowerCase();return!G&&!o&&$n.includes(re)?(i=1,r.interrupt?n(g):R(g)):Ho.includes(l.toLowerCase())?(i=6,G?(e.consume(g),y):r.interrupt?n(g):R(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):o?j(g):N(g))}return g===45||oe(g)?(e.consume(g),l+=String.fromCharCode(g),v):t(g)}function y(g){return g===62?(e.consume(g),r.interrupt?n:R):t(g)}function j(g){return U(g)?(e.consume(g),j):w(g)}function N(g){return g===47?(e.consume(g),w):g===58||g===95||ce(g)?(e.consume(g),A):U(g)?(e.consume(g),N):w(g)}function A(g){return g===45||g===46||g===58||g===95||oe(g)?(e.consume(g),A):P(g)}function P(g){return g===61?(e.consume(g),k):U(g)?(e.consume(g),P):N(g)}function k(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),c=g,D):U(g)?(e.consume(g),k):_(g)}function D(g){return g===c?(e.consume(g),c=null,q):g===null||O(g)?t(g):(e.consume(g),D)}function _(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Z(g)?P(g):(e.consume(g),_)}function q(g){return g===47||g===62||U(g)?N(g):t(g)}function w(g){return g===62?(e.consume(g),F):t(g)}function F(g){return g===null||O(g)?R(g):U(g)?(e.consume(g),F):t(g)}function R(g){return g===45&&i===2?(e.consume(g),M):g===60&&i===1?(e.consume(g),B):g===62&&i===4?(e.consume(g),le):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),X):O(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Uo,se,Y)(g)):g===null||O(g)?(e.exit("htmlFlowData"),Y(g)):(e.consume(g),R)}function Y(g){return e.check(qo,L,se)(g)}function L(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),C}function C(g){return g===null||O(g)?Y(g):(e.enter("htmlFlowData"),R(g))}function M(g){return g===45?(e.consume(g),m):R(g)}function B(g){return g===47?(e.consume(g),l="",K):R(g)}function K(g){if(g===62){const G=l.toLowerCase();return $n.includes(G)?(e.consume(g),le):R(g)}return ce(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),K):R(g)}function X(g){return g===93?(e.consume(g),m):R(g)}function m(g){return g===62?(e.consume(g),le):g===45&&i===2?(e.consume(g),m):R(g)}function le(g){return g===null||O(g)?(e.exit("htmlFlowData"),se(g)):(e.consume(g),le)}function se(g){return e.exit("htmlFlow"),n(g)}}function Qo(e,n,t){const r=this;return i;function i(l){return O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Xo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(nt,n,t)}}const Ko={name:"htmlText",tokenize:Go};function Go(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),P):m===63?(e.consume(m),N):ce(m)?(e.consume(m),_):t(m)}function u(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,x):ce(m)?(e.consume(m),j):t(m)}function f(m){return m===45?(e.consume(m),p):t(m)}function h(m){return m===null?t(m):m===45?(e.consume(m),d):O(m)?(l=h,B(m)):(e.consume(m),h)}function d(m){return m===45?(e.consume(m),p):h(m)}function p(m){return m===62?M(m):m===45?d(m):h(m)}function x(m){const le="CDATA[";return m===le.charCodeAt(o++)?(e.consume(m),o===le.length?b:x):t(m)}function b(m){return m===null?t(m):m===93?(e.consume(m),v):O(m)?(l=b,B(m)):(e.consume(m),b)}function v(m){return m===93?(e.consume(m),y):b(m)}function y(m){return m===62?M(m):m===93?(e.consume(m),y):b(m)}function j(m){return m===null||m===62?M(m):O(m)?(l=j,B(m)):(e.consume(m),j)}function N(m){return m===null?t(m):m===63?(e.consume(m),A):O(m)?(l=N,B(m)):(e.consume(m),N)}function A(m){return m===62?M(m):N(m)}function P(m){return ce(m)?(e.consume(m),k):t(m)}function k(m){return m===45||oe(m)?(e.consume(m),k):D(m)}function D(m){return O(m)?(l=D,B(m)):U(m)?(e.consume(m),D):M(m)}function _(m){return m===45||oe(m)?(e.consume(m),_):m===47||m===62||Z(m)?q(m):t(m)}function q(m){return m===47?(e.consume(m),M):m===58||m===95||ce(m)?(e.consume(m),w):O(m)?(l=q,B(m)):U(m)?(e.consume(m),q):M(m)}function w(m){return m===45||m===46||m===58||m===95||oe(m)?(e.consume(m),w):F(m)}function F(m){return m===61?(e.consume(m),R):O(m)?(l=F,B(m)):U(m)?(e.consume(m),F):q(m)}function R(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,Y):O(m)?(l=R,B(m)):U(m)?(e.consume(m),R):(e.consume(m),L)}function Y(m){return m===i?(e.consume(m),i=void 0,C):m===null?t(m):O(m)?(l=Y,B(m)):(e.consume(m),Y)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||Z(m)?q(m):(e.consume(m),L)}function C(m){return m===47||m===62||Z(m)?q(m):t(m)}function M(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function B(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),K}function K(m){return U(m)?Q(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):X(m)}function X(m){return e.enter("htmlTextData"),l(m)}}const un={name:"labelEnd",resolveAll:ta,resolveTo:na,tokenize:ra},Jo={tokenize:ia},Zo={tokenize:la},ea={tokenize:oa};function ta(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&&me(e,0,e.length,t),e}function na(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",c,n],["enter",u,n]],a=ge(a,e.slice(o+1,o+r+3)),a=ge(a,[["enter",f,n]]),a=ge(a,gt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=ge(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=ge(a,e.slice(l+1)),a=ge(a,[["exit",c,n]]),me(e,o,e.length,a),e}function ra(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(d){return o?o._inactive?h(d):(l=r.parser.defined.includes(ye(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):t(d)}function c(d){return d===40?e.attempt(Jo,f,l?f:h)(d):d===91?e.attempt(Zo,f,l?u:h)(d):l?f(d):h(d)}function u(d){return e.attempt(ea,f,h)(d)}function f(d){return n(d)}function h(d){return o._balanced=!0,t(d)}}function ia(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 Z(h)?Xe(e,o)(h):o(h)}function o(h){return h===41?f(h):$r(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return Z(h)?Xe(e,c)(h):f(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?Vr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Z(h)?Xe(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 la(e,n,t){const r=this;return i;function i(a){return Hr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function oa(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const aa={name:"labelStartImage",resolveAll:un.resolveAll,tokenize:sa};function sa(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const ua={name:"labelStartLink",resolveAll:un.resolveAll,tokenize:ca};function ca(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const St={name:"lineEnding",tokenize:ha};function ha(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,n,"linePrefix")}}const ut={name:"thematicBreak",tokenize:fa};function fa(e,n,t){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||O(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),U(u)?Q(e,a,"whitespace")(u):a(u))}}const he={continuation:{tokenize:ga},exit:ya,name:"list",tokenize:ma},pa={partial:!0,tokenize:ba},da={partial:!0,tokenize:xa};function ma(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=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:qt(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(ut,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return qt(p)&&++l<10?(e.consume(p),c):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(nt,r.interrupt?t:f,e.attempt(pa,d,h))}function f(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function h(p){return U(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ga(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(nt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!U(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(da,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(he,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xa(e,n,t){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function ya(e){e.exit(this.containerState.type)}function ba(e,n,t){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!U(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const Hn={name:"setextUnderline",resolveTo:ka,tokenize:wa};function ka(e,n){let t=e.length,r,i,o;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),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function wa(e,n,t){const r=this;let i;return o;function o(u){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=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),U(u)?Q(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||O(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Ca={tokenize:va};function va(e){const n=this,t=e.attempt(nt,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Po,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ja={resolveAll:qr()},Sa=Ur("string"),Na=Ur("text");function Ur(e){return{resolveAll:qr(e==="text"?Ea:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(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 u(f)?(t.exit("data"),o(f)):(t.consume(f),c)}function u(f){if(f===null)return!0;const h=i[f];let d=-1;if(h)for(;++d<h.length;){const p=h[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function qr(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ea(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 o=i.length,l=-1,a=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)c=!0,a++;else if(u!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Pa={42:he,43:he,45:he,48:he,49:he,50:he,51:he,52:he,53:he,54:he,55:he,56:he,57:he,62:zr},Aa={91:Do},Ta={[-2]:jt,[-1]:jt,32:jt},Ia={35:Oo,42:ut,45:[Hn,ut],60:Vo,61:Hn,95:ut,96:Bn,126:Bn},Fa={38:Or,92:_r},Da={[-5]:St,[-4]:St,[-3]:St,33:aa,38:Or,42:Wt,60:[so,Ko],91:ua,92:[zo,_r],93:un,95:Wt,96:Co},Ra={null:[Wt,ja]},La={null:[42,95]},Ma={null:[]},za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:La,contentInitial:Aa,disable:Ma,document:Pa,flow:Ia,flowInitial:Ta,insideSpan:Ra,string:Fa,text:Da},Symbol.toStringTag,{value:"Module"}));function _a(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={},o=[];let l=[],a=[];const c={attempt:D(P),check:D(k),consume:j,enter:N,exit:A,interrupt:D(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:x,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:h};let f=n.tokenize.call(u,c);return n.resolveAll&&o.push(n),u;function h(F){return l=ge(l,F),v(),l[l.length-1]!==null?[]:(_(n,0),u.events=gt(o,u.events,u),u.events)}function d(F,R){return Ba(p(F),R)}function p(F){return Oa(l,F)}function x(){const{_bufferIndex:F,_index:R,line:Y,column:L,offset:C}=r;return{_bufferIndex:F,_index:R,line:Y,column:L,offset:C}}function b(F){i[F.line]=F.column,w()}function v(){let F;for(;r._index<l.length;){const R=l[r._index];if(typeof R=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<R.length;)y(R.charCodeAt(r._bufferIndex));else y(R)}}function y(F){f=f(F)}function j(F){O(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,w()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function N(F,R){const Y=R||{};return Y.type=F,Y.start=x(),u.events.push(["enter",Y,u]),a.push(Y),Y}function A(F){const R=a.pop();return R.end=x(),u.events.push(["exit",R,u]),R}function P(F,R){_(F,R.from)}function k(F,R){R.restore()}function D(F,R){return Y;function Y(L,C,M){let B,K,X,m;return Array.isArray(L)?se(L):"tokenize"in L?se([L]):le(L);function le(ne){return z;function z(H){const ee=H!==null&&ne[H],ue=H!==null&&ne.null,be=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return se(be)(H)}}function se(ne){return B=ne,K=0,ne.length===0?M:g(ne[K])}function g(ne){return z;function z(H){return m=q(),X=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?re():ne.tokenize.call(R?Object.assign(Object.create(u),R):u,c,G,re)(H)}}function G(ne){return F(X,m),C}function re(ne){return m.restore(),++K<B.length?g(B[K]):M}}}function _(F,R){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&me(u.events,R,u.events.length-R,F.resolve(u.events.slice(R),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function q(){const F=x(),R=u.previous,Y=u.currentConstruct,L=u.events.length,C=Array.from(a);return{from:L,restore:M};function M(){r=F,u.previous=R,u.currentConstruct=Y,u.events.length=L,a=C,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Oa(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ba(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
43
43
  `;break}case-3:{l=`\r
44
- `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function $a(e){const r={constructs:Lr([za,...(e||{}).extensions||[]]),content:i(to),defined:[],document:i(ro),flow:i(Ca),lazy:{},string:i(Sa),text:i(Na)};return r;function i(o){return l;function l(a){return _a(r,o,a)}}}function Ha(e){for(;!Br(e););return e}const Vn=/[\0\t\n\r]/g;function Va(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const c=[];let u,f,h,d,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Vn.lastIndex=h,u=Vn.exec(o),d=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(d),!u){n=o.slice(h);break}if(p===10&&h===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<d&&(c.push(o.slice(h,d)),e+=d-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=d+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const Ua=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qa(e){return e.replace(Ua,Wa)}function Wa(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Mr(t.slice(o?2:1),o?16:10)}return an(t)||e}const Wr={}.hasOwnProperty;function Ya(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Qa(t)(Ha($a(t).document().write(Va()(e,n,!0))))}function Qa(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Cn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(bn),blockQuote:o(ue),characterEscape:q,characterReference:q,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Pi,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(Ai),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ti),hardBreakEscape:o(kn),hardBreakTrailing:o(kn),htmlFlow:o(wn,l),htmlFlowData:q,htmlText:o(wn,l),htmlTextData:q,image:o(Ii),label:l,link:o(Cn),listItem:o(Fi),listItemValue:d,listOrdered:o(vn,h),listUnordered:o(vn),paragraph:o(Di),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(bn),strong:o(Ri),thematicBreak:o(Mi)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:ee,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ne,characterReference:z,codeFenced:c(v),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:w,codeIndented:c(y),codeText:c(C),codeTextData:w,data:w,definition:c(),definitionDestinationString:A,definitionLabelString:S,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(Y),htmlFlowData:w,htmlText:c(L),htmlTextData:w,image:c(B),label:X,labelText:K,lineEnding:F,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:m,resourceTitleString:le,resource:se,setextHeading:c(_),setextHeadingLineSequence:D,setextHeadingText:b,strong:c(),thematicBreak:c()}};Yr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(j){let T={type:"root",children:[]};const $={stack:[T],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},W=[];let J=-1;for(;++J<j.length;)if(j[J][1].type==="listOrdered"||j[J][1].type==="listUnordered")if(j[J][0]==="enter")W.push(J);else{const xe=W.pop();J=i(j,xe,J)}for(J=-1;++J<j.length;){const xe=n[j[J][0]];Wr.call(xe,j[J][1].type)&&xe[j[J][1].type].call(Object.assign({sliceSerialize:j[J][2].sliceSerialize},$),j[J][1])}if($.tokenStack.length>0){const xe=$.tokenStack[$.tokenStack.length-1];(xe[1]||Un).call($,void 0,xe[0])}for(T.position={start:Se(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:Se(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<n.transforms.length;)T=n.transforms[J](T)||T;return T}function i(j,T,$){let W=T-1,J=-1,xe=!1,Pe,Ce,He,Ve;for(;++W<=$;){const pe=j[W];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?J++:J--,Ve=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(Pe&&!Ve&&!J&&!He&&(He=W),Ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ve=void 0}if(!J&&pe[0]==="enter"&&pe[1].type==="listItemPrefix"||J===-1&&pe[0]==="exit"&&(pe[1].type==="listUnordered"||pe[1].type==="listOrdered")){if(Pe){let De=W;for(Ce=void 0;De--;){const ve=j[De];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;Ce&&(j[Ce][1].type="lineEndingBlank",xe=!0),ve[1].type="lineEnding",Ce=De}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}He&&(!Ce||He<Ce)&&(Pe._spread=!0),Pe.end=Object.assign({},Ce?j[Ce][1].start:pe[1].end),j.splice(Ce||W,0,["exit",Pe,pe[2]]),W++,$++}if(pe[1].type==="listItemPrefix"){const De={type:"listItem",_spread:!1,start:Object.assign({},pe[1].start),end:void 0};Pe=De,j.splice(W,0,["enter",De,pe[2]]),W++,$++,He=void 0,Ve=!0}}}return j[T][1]._spread=xe,$}function o(j,T){return $;function $(W){a.call(this,j(W),W),T&&T.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(j,T,$){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([T,$||void 0]),j.position={start:Se(T.start),end:void 0}}function c(j){return T;function T($){j&&j.call(this,$),u.call(this,$)}}function u(j,T){const $=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==j.type&&(T?T.call(this,j,W[0]):(W[1]||Un).call(this,j,W[0]));else throw new Error("Cannot close `"+j.type+"` ("+Qe({start:j.start,end:j.end})+"): it’s not open");$.position.end=Se(j.end)}function f(){return on(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(j){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function p(){const j=this.resume(),T=this.stack[this.stack.length-1];T.lang=j}function x(){const j=this.resume(),T=this.stack[this.stack.length-1];T.meta=j}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const j=this.resume(),T=this.stack[this.stack.length-1];T.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const j=this.resume(),T=this.stack[this.stack.length-1];T.value=j.replace(/(\r?\n|\r)$/g,"")}function S(j){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(j)).toLowerCase()}function N(){const j=this.resume(),T=this.stack[this.stack.length-1];T.title=j}function A(){const j=this.resume(),T=this.stack[this.stack.length-1];T.url=j}function P(j){const T=this.stack[this.stack.length-1];if(!T.depth){const $=this.sliceSerialize(j).length;T.depth=$}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function D(j){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function q(j){const $=this.stack[this.stack.length-1].children;let W=$[$.length-1];(!W||W.type!=="text")&&(W=Li(),W.position={start:Se(j.start),end:void 0},$.push(W)),this.stack.push(W)}function w(j){const T=this.stack.pop();T.value+=this.sliceSerialize(j),T.position.end=Se(j.end)}function F(j){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=T.children[T.children.length-1];$.position.end=Se(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(T.type)&&(q.call(this,j),w.call(this,j))}function R(){this.data.atHardBreak=!0}function Y(){const j=this.resume(),T=this.stack[this.stack.length-1];T.value=j}function L(){const j=this.resume(),T=this.stack[this.stack.length-1];T.value=j}function C(){const j=this.resume(),T=this.stack[this.stack.length-1];T.value=j}function M(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=T,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function B(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=T,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function K(j){const T=this.sliceSerialize(j),$=this.stack[this.stack.length-2];$.label=qa(T),$.identifier=ye(T).toLowerCase()}function X(){const j=this.stack[this.stack.length-1],T=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const W=j.children;$.children=W}else $.alt=T}function m(){const j=this.resume(),T=this.stack[this.stack.length-1];T.url=j}function le(){const j=this.resume(),T=this.stack[this.stack.length-1];T.title=j}function se(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function G(j){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function re(j){this.data.characterReferenceType=j.type}function ne(j){const T=this.sliceSerialize(j),$=this.data.characterReferenceType;let W;$?(W=Mr(T,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=an(T);const J=this.stack[this.stack.length-1];J.value+=W}function z(j){const T=this.stack.pop();T.position.end=Se(j.end)}function H(j){w.call(this,j);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(j)}function ee(j){w.call(this,j);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(j)}function ue(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Pi(){return{type:"inlineCode",value:""}}function Ai(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function bn(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function wn(){return{type:"html",value:""}}function Ii(){return{type:"image",title:null,url:"",alt:null}}function Cn(){return{type:"link",title:null,url:"",children:[]}}function vn(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function Fi(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function Di(){return{type:"paragraph",children:[]}}function Ri(){return{type:"strong",children:[]}}function Li(){return{type:"text",value:""}}function Mi(){return{type:"thematicBreak"}}}function Se(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):Xa(e,r)}}function Xa(e,n){let t;for(t in n)if(Wr.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 Un(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Qe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Qe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Qe({start:n.start,end:n.end})+") is still open")}function Ka(e){const n=this;n.parser=t;function t(r){return Ya(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ga(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 Ja(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
44
+ `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function $a(e){const r={constructs:Lr([za,...(e||{}).extensions||[]]),content:i(to),defined:[],document:i(ro),flow:i(Ca),lazy:{},string:i(Sa),text:i(Na)};return r;function i(o){return l;function l(a){return _a(r,o,a)}}}function Ha(e){for(;!Br(e););return e}const Vn=/[\0\t\n\r]/g;function Va(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const c=[];let u,f,h,d,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Vn.lastIndex=h,u=Vn.exec(o),d=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(d),!u){n=o.slice(h);break}if(p===10&&h===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<d&&(c.push(o.slice(h,d)),e+=d-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=d+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const Ua=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qa(e){return e.replace(Ua,Wa)}function Wa(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Mr(t.slice(o?2:1),o?16:10)}return sn(t)||e}const Wr={}.hasOwnProperty;function Ya(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Qa(t)(Ha($a(t).document().write(Va()(e,n,!0))))}function Qa(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Cn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(bn),blockQuote:o(ue),characterEscape:q,characterReference:q,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Pi,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(Ai),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ti),hardBreakEscape:o(kn),hardBreakTrailing:o(kn),htmlFlow:o(wn,l),htmlFlowData:q,htmlText:o(wn,l),htmlTextData:q,image:o(Ii),label:l,link:o(Cn),listItem:o(Fi),listItemValue:d,listOrdered:o(vn,h),listUnordered:o(vn),paragraph:o(Di),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(bn),strong:o(Ri),thematicBreak:o(Mi)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:ee,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ne,characterReference:z,codeFenced:c(v),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:w,codeIndented:c(y),codeText:c(C),codeTextData:w,data:w,definition:c(),definitionDestinationString:A,definitionLabelString:j,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(Y),htmlFlowData:w,htmlText:c(L),htmlTextData:w,image:c(B),label:X,labelText:K,lineEnding:F,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:m,resourceTitleString:le,resource:se,setextHeading:c(_),setextHeadingLineSequence:D,setextHeadingText:k,strong:c(),thematicBreak:c()}};Yr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let T={type:"root",children:[]};const $={stack:[T],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},W=[];let J=-1;for(;++J<S.length;)if(S[J][1].type==="listOrdered"||S[J][1].type==="listUnordered")if(S[J][0]==="enter")W.push(J);else{const xe=W.pop();J=i(S,xe,J)}for(J=-1;++J<S.length;){const xe=n[S[J][0]];Wr.call(xe,S[J][1].type)&&xe[S[J][1].type].call(Object.assign({sliceSerialize:S[J][2].sliceSerialize},$),S[J][1])}if($.tokenStack.length>0){const xe=$.tokenStack[$.tokenStack.length-1];(xe[1]||Un).call($,void 0,xe[0])}for(T.position={start:Se(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Se(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<n.transforms.length;)T=n.transforms[J](T)||T;return T}function i(S,T,$){let W=T-1,J=-1,xe=!1,Pe,Ce,He,Ve;for(;++W<=$;){const pe=S[W];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?J++:J--,Ve=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(Pe&&!Ve&&!J&&!He&&(He=W),Ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ve=void 0}if(!J&&pe[0]==="enter"&&pe[1].type==="listItemPrefix"||J===-1&&pe[0]==="exit"&&(pe[1].type==="listUnordered"||pe[1].type==="listOrdered")){if(Pe){let De=W;for(Ce=void 0;De--;){const ve=S[De];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;Ce&&(S[Ce][1].type="lineEndingBlank",xe=!0),ve[1].type="lineEnding",Ce=De}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}He&&(!Ce||He<Ce)&&(Pe._spread=!0),Pe.end=Object.assign({},Ce?S[Ce][1].start:pe[1].end),S.splice(Ce||W,0,["exit",Pe,pe[2]]),W++,$++}if(pe[1].type==="listItemPrefix"){const De={type:"listItem",_spread:!1,start:Object.assign({},pe[1].start),end:void 0};Pe=De,S.splice(W,0,["enter",De,pe[2]]),W++,$++,He=void 0,Ve=!0}}}return S[T][1]._spread=xe,$}function o(S,T){return $;function $(W){a.call(this,S(W),W),T&&T.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(S,T,$){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([T,$||void 0]),S.position={start:Se(T.start),end:void 0}}function c(S){return T;function T($){S&&S.call(this,$),u.call(this,$)}}function u(S,T){const $=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(T?T.call(this,S,W[0]):(W[1]||Un).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+Qe({start:S.start,end:S.end})+"): it’s not open");$.position.end=Se(S.end)}function f(){return an(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(S){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function p(){const S=this.resume(),T=this.stack[this.stack.length-1];T.lang=S}function x(){const S=this.resume(),T=this.stack[this.stack.length-1];T.meta=S}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/(\r?\n|\r)$/g,"")}function j(S){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(S)).toLowerCase()}function N(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function A(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function P(S){const T=this.stack[this.stack.length-1];if(!T.depth){const $=this.sliceSerialize(S).length;T.depth=$}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function D(S){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function q(S){const $=this.stack[this.stack.length-1].children;let W=$[$.length-1];(!W||W.type!=="text")&&(W=Li(),W.position={start:Se(S.start),end:void 0},$.push(W)),this.stack.push(W)}function w(S){const T=this.stack.pop();T.value+=this.sliceSerialize(S),T.position.end=Se(S.end)}function F(S){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=T.children[T.children.length-1];$.position.end=Se(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(T.type)&&(q.call(this,S),w.call(this,S))}function R(){this.data.atHardBreak=!0}function Y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function L(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function C(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function M(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function B(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function K(S){const T=this.sliceSerialize(S),$=this.stack[this.stack.length-2];$.label=qa(T),$.identifier=ye(T).toLowerCase()}function X(){const S=this.stack[this.stack.length-1],T=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const W=S.children;$.children=W}else $.alt=T}function m(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function le(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function se(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function G(S){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function re(S){this.data.characterReferenceType=S.type}function ne(S){const T=this.sliceSerialize(S),$=this.data.characterReferenceType;let W;$?(W=Mr(T,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=sn(T);const J=this.stack[this.stack.length-1];J.value+=W}function z(S){const T=this.stack.pop();T.position.end=Se(S.end)}function H(S){w.call(this,S);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(S)}function ee(S){w.call(this,S);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(S)}function ue(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Pi(){return{type:"inlineCode",value:""}}function Ai(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function bn(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function wn(){return{type:"html",value:""}}function Ii(){return{type:"image",title:null,url:"",alt:null}}function Cn(){return{type:"link",title:null,url:"",children:[]}}function vn(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function Fi(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Di(){return{type:"paragraph",children:[]}}function Ri(){return{type:"strong",children:[]}}function Li(){return{type:"text",value:""}}function Mi(){return{type:"thematicBreak"}}}function Se(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):Xa(e,r)}}function Xa(e,n){let t;for(t in n)if(Wr.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 Un(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Qe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Qe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Qe({start:n.start,end:n.end})+") is still open")}function Ka(e){const n=this;n.parser=t;function t(r){return Ya(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ga(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 Ja(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
45
45
  `}]}function Za(e,n){const t=n.value?n.value+`
46
46
  `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function es(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ts(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ns(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=$e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+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(l)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function rs(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 is(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Qr(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),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function ls(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Qr(e,n);const i={src:$e(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function os(e,n){const t={src:$e(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 as(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 ss(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Qr(e,n);const i={href:$e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function us(e,n){const t={href:$e(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 cs(e,n,t){const r=e.all(n),i=t?hs(t):Xr(n),o={},l=[];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:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
47
47
  `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
48
- `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,u),e.applyData(n,u)}function hs(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=Xr(t[r])}return n}function Xr(e){const n=e.spread;return n??e.children.length>1}function fs(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 l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function ps(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ds(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ms(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function gs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=tn(n.children[1]),c=Pr(n.children[n.children.length-1]);a&&c&&(l.position={start:a,end:c}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function xs(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let c=-1;const u=[];for(;++c<a;){const h=n.children[c],d={},p=l?l[c]:void 0;p&&(d.align=p);let x={type:"element",tagName:o,properties:d,children:[]};h&&(x.children=e.all(h),e.patch(h,x),x=e.applyData(h,x)),u.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function ys(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const qn=9,Wn=32;function bs(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(Yn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(Yn(n.slice(i),i>0,!1)),o.join("")}function Yn(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===qn||o===Wn;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===qn||o===Wn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ks(e,n){const t={type:"text",value:bs(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ws(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Cs={blockquote:Ga,break:Ja,code:Za,delete:es,emphasis:ts,footnoteReference:ns,heading:rs,html:is,imageReference:ls,image:os,inlineCode:as,linkReference:ss,link:us,listItem:cs,list:fs,paragraph:ps,root:ds,strong:ms,table:gs,tableCell:ys,tableRow:xs,text:ks,thematicBreak:ws,toml:it,yaml:it,definition:it,footnoteDefinition:it};function it(){}const Kr=-1,gt=0,Ke=1,ht=2,un=3,cn=4,hn=5,fn=6,Gr=7,Jr=8,Qn=typeof self=="object"?self:globalThis,vs=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case gt:case Kr:return t(l,i);case Ke:{const a=t([],i);for(const c of l)a.push(r(c));return a}case ht:{const a=t({},i);for(const[c,u]of l)a[r(c)]=r(u);return a}case un:return t(new Date(l),i);case cn:{const{source:a,flags:c}=l;return t(new RegExp(a,c),i)}case hn:{const a=t(new Map,i);for(const[c,u]of l)a.set(r(c),r(u));return a}case fn:{const a=t(new Set,i);for(const c of l)a.add(r(c));return a}case Gr:{const{name:a,message:c}=l;return t(new Qn[a](c),i)}case Jr:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new Qn[o](l),i)};return r},Xn=e=>vs(new Map,e)(0),Le="",{toString:js}={},{keys:Ss}=Object,Ye=e=>{const n=typeof e;if(n!=="object"||!e)return[gt,n];const t=js.call(e).slice(8,-1);switch(t){case"Array":return[Ke,Le];case"Object":return[ht,Le];case"Date":return[un,Le];case"RegExp":return[cn,Le];case"Map":return[hn,Le];case"Set":return[fn,Le];case"DataView":return[Ke,t]}return t.includes("Array")?[Ke,t]:t.includes("Error")?[Gr,t]:[ht,t]},lt=([e,n])=>e===gt&&(n==="function"||n==="symbol"),Ns=(e,n,t,r)=>{const i=(l,a)=>{const c=r.push(l)-1;return t.set(a,c),c},o=l=>{if(t.has(l))return t.get(l);let[a,c]=Ye(l);switch(a){case gt:{let f=l;switch(c){case"bigint":a=Jr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Kr],l)}return i([a,f],l)}case Ke:{if(c){let d=l;return c==="DataView"?d=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(l)),i([c,[...d]],l)}const f=[],h=i([a,f],l);for(const d of l)f.push(o(d));return h}case ht:{if(c)switch(c){case"BigInt":return i([c,l.toString()],l);case"Boolean":case"Number":case"String":return i([c,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const f=[],h=i([a,f],l);for(const d of Ss(l))(e||!lt(Ye(l[d])))&&f.push([o(d),o(l[d])]);return h}case un:return i([a,l.toISOString()],l);case cn:{const{source:f,flags:h}=l;return i([a,{source:f,flags:h}],l)}case hn:{const f=[],h=i([a,f],l);for(const[d,p]of l)(e||!(lt(Ye(d))||lt(Ye(p))))&&f.push([o(d),o(p)]);return h}case fn:{const f=[],h=i([a,f],l);for(const d of l)(e||!lt(Ye(d)))&&f.push(o(d));return h}}const{message:u}=l;return i([a,{name:c,message:u}],l)};return o},Kn=(e,{json:n,lossy:t}={})=>{const r=[];return Ns(!(n||t),!!n,new Map,r)(e),r},ft=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Xn(Kn(e,n)):structuredClone(e):(e,n)=>Xn(Kn(e,n));function Es(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 Ps(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function As(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Es,r=e.options.footnoteBackLabel||Ps,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),d=$e(h.toLowerCase());let p=0;const x=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++p<=k;){x.length>0&&x.push({type:"text",value:" "});let S=typeof t=="string"?t:t(c,p);typeof S=="string"&&(S={type:"text",value:S}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const v=f[f.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const S=v.children[v.children.length-1];S&&S.type==="text"?S.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else f.push(...x);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ft(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
48
+ `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,u),e.applyData(n,u)}function hs(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=Xr(t[r])}return n}function Xr(e){const n=e.spread;return n??e.children.length>1}function fs(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 l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function ps(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ds(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ms(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function gs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=nn(n.children[1]),c=Pr(n.children[n.children.length-1]);a&&c&&(l.position={start:a,end:c}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function xs(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let c=-1;const u=[];for(;++c<a;){const h=n.children[c],d={},p=l?l[c]:void 0;p&&(d.align=p);let x={type:"element",tagName:o,properties:d,children:[]};h&&(x.children=e.all(h),e.patch(h,x),x=e.applyData(h,x)),u.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function ys(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const qn=9,Wn=32;function bs(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(Yn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(Yn(n.slice(i),i>0,!1)),o.join("")}function Yn(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===qn||o===Wn;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===qn||o===Wn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ks(e,n){const t={type:"text",value:bs(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ws(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Cs={blockquote:Ga,break:Ja,code:Za,delete:es,emphasis:ts,footnoteReference:ns,heading:rs,html:is,imageReference:ls,image:os,inlineCode:as,linkReference:ss,link:us,listItem:cs,list:fs,paragraph:ps,root:ds,strong:ms,table:gs,tableCell:ys,tableRow:xs,text:ks,thematicBreak:ws,toml:it,yaml:it,definition:it,footnoteDefinition:it};function it(){}const Kr=-1,xt=0,Ke=1,ht=2,cn=3,hn=4,fn=5,pn=6,Gr=7,Jr=8,Qn=typeof self=="object"?self:globalThis,vs=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case xt:case Kr:return t(l,i);case Ke:{const a=t([],i);for(const c of l)a.push(r(c));return a}case ht:{const a=t({},i);for(const[c,u]of l)a[r(c)]=r(u);return a}case cn:return t(new Date(l),i);case hn:{const{source:a,flags:c}=l;return t(new RegExp(a,c),i)}case fn:{const a=t(new Map,i);for(const[c,u]of l)a.set(r(c),r(u));return a}case pn:{const a=t(new Set,i);for(const c of l)a.add(r(c));return a}case Gr:{const{name:a,message:c}=l;return t(new Qn[a](c),i)}case Jr:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new Qn[o](l),i)};return r},Xn=e=>vs(new Map,e)(0),Le="",{toString:js}={},{keys:Ss}=Object,Ye=e=>{const n=typeof e;if(n!=="object"||!e)return[xt,n];const t=js.call(e).slice(8,-1);switch(t){case"Array":return[Ke,Le];case"Object":return[ht,Le];case"Date":return[cn,Le];case"RegExp":return[hn,Le];case"Map":return[fn,Le];case"Set":return[pn,Le];case"DataView":return[Ke,t]}return t.includes("Array")?[Ke,t]:t.includes("Error")?[Gr,t]:[ht,t]},lt=([e,n])=>e===xt&&(n==="function"||n==="symbol"),Ns=(e,n,t,r)=>{const i=(l,a)=>{const c=r.push(l)-1;return t.set(a,c),c},o=l=>{if(t.has(l))return t.get(l);let[a,c]=Ye(l);switch(a){case xt:{let f=l;switch(c){case"bigint":a=Jr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Kr],l)}return i([a,f],l)}case Ke:{if(c){let d=l;return c==="DataView"?d=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(l)),i([c,[...d]],l)}const f=[],h=i([a,f],l);for(const d of l)f.push(o(d));return h}case ht:{if(c)switch(c){case"BigInt":return i([c,l.toString()],l);case"Boolean":case"Number":case"String":return i([c,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const f=[],h=i([a,f],l);for(const d of Ss(l))(e||!lt(Ye(l[d])))&&f.push([o(d),o(l[d])]);return h}case cn:return i([a,l.toISOString()],l);case hn:{const{source:f,flags:h}=l;return i([a,{source:f,flags:h}],l)}case fn:{const f=[],h=i([a,f],l);for(const[d,p]of l)(e||!(lt(Ye(d))||lt(Ye(p))))&&f.push([o(d),o(p)]);return h}case pn:{const f=[],h=i([a,f],l);for(const d of l)(e||!lt(Ye(d)))&&f.push(o(d));return h}}const{message:u}=l;return i([a,{name:c,message:u}],l)};return o},Kn=(e,{json:n,lossy:t}={})=>{const r=[];return Ns(!(n||t),!!n,new Map,r)(e),r},ft=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Xn(Kn(e,n)):structuredClone(e):(e,n)=>Xn(Kn(e,n));function Es(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 Ps(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function As(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Es,r=e.options.footnoteBackLabel||Ps,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),d=$e(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-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const v=f[f.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const j=v.children[v.children.length-1];j&&j.type==="text"?j.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else f.push(...x);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ft(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
49
49
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
50
- `}]}}const xt=(function(e){if(e==null)return Ds;if(typeof e=="function")return yt(e);if(typeof e=="object")return Array.isArray(e)?Ts(e):Is(e);if(typeof e=="string")return Fs(e);throw new Error("Expected function, string, or object as test")});function Ts(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=xt(e[t]);return yt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Is(e){const n=e;return yt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Fs(e){return yt(n);function n(t){return t&&t.type===e}}function yt(e){return n;function n(t,r,i){return!!(Rs(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Ds(){return!0}function Rs(e){return e!==null&&typeof e=="object"&&"type"in e}const Zr=[],Ls=!0,Wt=!1,Ms="skip";function ei(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=xt(i),l=r?-1:1;a(e,void 0,[])();function a(c,u,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(d,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Zr,x,k,v;if((!n||o(c,u,f[f.length-1]||void 0))&&(p=zs(t(c,f)),p[0]===Wt))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==Ms)for(k=(r?y.children.length:-1)+l,v=f.concat(y);k>-1&&k<y.children.length;){const S=y.children[k];if(x=a(S,k,v)(),x[0]===Wt)return x;k=typeof x[1]=="number"?x[1]:k+l}}return p}}}function zs(e){return Array.isArray(e)?e:typeof e=="number"?[Ls,e]:e==null?Zr:[e]}function pn(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),ei(e,o,a,i);function a(c,u){const f=u[u.length-1],h=f?f.children.indexOf(c):void 0;return l(c,h,f)}}const Yt={}.hasOwnProperty,_s={};function Os(e,n){const t=n||_s,r=new Map,i=new Map,o=new Map,l={...Cs,...t.handlers},a={all:u,applyData:$s,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:t,patch:Bs,wrap:Vs};return pn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();h.has(d)||h.set(d,f)}}),a;function c(f,h){const d=f.type,p=a.handlers[d];if(Yt.call(a.handlers,d)&&p)return p(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in f){const{children:k,...v}=f,y=ft(v);return y.children=a.all(f),y}return ft(f)}return(a.options.unknownHandler||Hs)(a,f,h)}function u(f){const h=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const x=a.one(d[p],f);if(x){if(p&&d[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Gn(x.value)),!Array.isArray(x)&&x.type==="element")){const k=x.children[0];k&&k.type==="text"&&(k.value=Gn(k.value))}Array.isArray(x)?h.push(...x):h.push(x)}}}return h}}function Bs(e,n){e.position&&(n.position=El(e))}function $s(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,ft(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Hs(e,n){const t=n.data||{},r="value"in n&&!(Yt.call(t,"hProperties")||Yt.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 Vs(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
50
+ `}]}}const yt=(function(e){if(e==null)return Ds;if(typeof e=="function")return bt(e);if(typeof e=="object")return Array.isArray(e)?Ts(e):Is(e);if(typeof e=="string")return Fs(e);throw new Error("Expected function, string, or object as test")});function Ts(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=yt(e[t]);return bt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Is(e){const n=e;return bt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Fs(e){return bt(n);function n(t){return t&&t.type===e}}function bt(e){return n;function n(t,r,i){return!!(Rs(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Ds(){return!0}function Rs(e){return e!==null&&typeof e=="object"&&"type"in e}const Zr=[],Ls=!0,Yt=!1,Ms="skip";function ei(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=yt(i),l=r?-1:1;a(e,void 0,[])();function a(c,u,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(d,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Zr,x,b,v;if((!n||o(c,u,f[f.length-1]||void 0))&&(p=zs(t(c,f)),p[0]===Yt))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==Ms)for(b=(r?y.children.length:-1)+l,v=f.concat(y);b>-1&&b<y.children.length;){const j=y.children[b];if(x=a(j,b,v)(),x[0]===Yt)return x;b=typeof x[1]=="number"?x[1]:b+l}}return p}}}function zs(e){return Array.isArray(e)?e:typeof e=="number"?[Ls,e]:e==null?Zr:[e]}function dn(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),ei(e,o,a,i);function a(c,u){const f=u[u.length-1],h=f?f.children.indexOf(c):void 0;return l(c,h,f)}}const Qt={}.hasOwnProperty,_s={};function Os(e,n){const t=n||_s,r=new Map,i=new Map,o=new Map,l={...Cs,...t.handlers},a={all:u,applyData:$s,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:t,patch:Bs,wrap:Vs};return dn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();h.has(d)||h.set(d,f)}}),a;function c(f,h){const d=f.type,p=a.handlers[d];if(Qt.call(a.handlers,d)&&p)return p(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in f){const{children:b,...v}=f,y=ft(v);return y.children=a.all(f),y}return ft(f)}return(a.options.unknownHandler||Hs)(a,f,h)}function u(f){const h=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const x=a.one(d[p],f);if(x){if(p&&d[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Gn(x.value)),!Array.isArray(x)&&x.type==="element")){const b=x.children[0];b&&b.type==="text"&&(b.value=Gn(b.value))}Array.isArray(x)?h.push(...x):h.push(x)}}}return h}}function Bs(e,n){e.position&&(n.position=El(e))}function $s(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,ft(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Hs(e,n){const t=n.data||{},r="value"in n&&!(Qt.call(t,"hProperties")||Qt.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 Vs(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
51
51
  `});++r<e.length;)r&&t.push({type:"text",value:`
52
52
  `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
53
53
  `}),t}function Gn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Jn(e,n){const t=Os(e,n),r=t.one(e,void 0),i=As(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
54
- `},i),o}function Us(e,n){return e&&"run"in e?async function(t,r){const i=Jn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Jn(t,{file:r,...e||n})}}function Zn(e){if(e)throw e}var St,er;function qs(){if(er)return St;er=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return St=function c(){var u,f,h,d,p,x,k=arguments[0],v=1,y=arguments.length,S=!1;for(typeof k=="boolean"&&(S=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});v<y;++v)if(u=arguments[v],u!=null)for(f in u)h=a(k,f),d=a(u,f),k!==d&&(S&&d&&(o(d)||(p=i(d)))?(p?(p=!1,x=h&&i(h)?h:[]):x=h&&o(h)?h:{},l(k,{name:f,newValue:c(S,x,d)})):typeof d<"u"&&l(k,{name:f,newValue:d}));return k},St}var Ws=qs();const Nt=xr(Ws);function Qt(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 Ys(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(c,...u){const f=e[++o];let h=-1;if(c){l(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Qs(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Qs(e,n){let t;return r;function r(...l){const a=e.length>l.length;let c;a&&l.push(i);try{c=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ke={basename:Xs,dirname:Ks,extname:Gs,join:Js,sep:"/"};function Xs(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');rt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Ks(e){if(rt(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 Gs(e){rt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Js(...e){let n=-1,t;for(;++n<e.length;)rt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Zs(t)}function Zs(e){rt(e);const n=e.codePointAt(0)===47;let t=eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function eu(e,n){let t="",r=0,i=-1,o=0,l=-1,a,c;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===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=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function rt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tu={cwd:nu};function nu(){return"/"}function Xt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ru(e){if(typeof e=="string")e=new URL(e);else if(!Xt(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 iu(e)}function iu(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 Et=["history","path","basename","stem","extname","dirname"];class ti{constructor(n){let t;n?Xt(n)?t={path:n}:typeof n=="string"||lu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Et.length;){const o=Et[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Et.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(n){At(n,"basename"),Pt(n,"basename"),this.path=ke.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(n){tr(this.basename,"dirname"),this.path=ke.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(n){if(Pt(n,"extname"),tr(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=ke.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Xt(n)&&(n=ru(n)),At(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(n){At(n,"stem"),Pt(n,"stem"),this.path=ke.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 ae(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 Pt(e,n){if(e&&e.includes(ke.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ke.sep+"`")}function At(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function tr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ou=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),au={}.hasOwnProperty;class dn extends ou{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=Ys()}copy(){const n=new dn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Nt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Ft("data",this.frozen),this.namespace[n]=t,this):au.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ft("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=ot(n),r=this.parser||this.Parser;return Tt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Tt("process",this.parser||this.Parser),It("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=ot(n),c=r.parse(a);r.run(c,a,function(f,h,d){if(f||!h||!d)return u(f);const p=h,x=r.stringify(p,d);cu(x)?d.value=x:d.result=x,u(f,d)});function u(f,h){f||!h?l(f):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),Tt("processSync",this.parser||this.Parser),It("processSync",this.compiler||this.Compiler),this.process(n,i),rr("processSync","process",t),r;function i(o,l){t=!0,Zn(o),r=l}}run(n,t,r){nr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const c=ot(t);i.run(n,c,u);function u(f,h,d){const p=h||n;f?a(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),rr("runSync","run",r),i;function o(l,a){Zn(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=ot(t),i=this.compiler||this.Compiler;return It("stringify",i),nr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Ft("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;c(f,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=Nt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===u){d=h;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...x]=f;const k=r[d][1];Qt(k)&&Qt(p)&&(p=Nt(!0,k,p)),r[d]=[u,p,...x]}}}}const su=new dn().freeze();function Tt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function It(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ft(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 nr(e){if(!Qt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ot(e){return uu(e)?e:new ti(e)}function uu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cu(e){return typeof e=="string"||hu(e)}function hu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ir=[],lr={allowDangerousHtml:!0},pu=/^(https?|ircs?|mailto|xmpp)$/i,du=[{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 mu(e){const n=gu(e),t=xu(e);return yu(n.runSync(n.parse(t),t),e)}function gu(e){const n=e.rehypePlugins||ir,t=e.remarkPlugins||ir,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lr}:lr;return su().use(Ka).use(t).use(Us,r).use(n)}function xu(e){const n=e.children||"",t=new ti;return typeof n=="string"&&(t.value=n),t}function yu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||bu;for(const f of du)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+fu+f.id,void 0);return pn(e,u),Fl(e,{Fragment:s.Fragment,components:i,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(f,h,d){if(f.type==="raw"&&d&&typeof h=="number")return l?d.children.splice(h,1):d.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in Ct)if(Object.hasOwn(Ct,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],k=Ct[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=c(String(x||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,d)),p&&d&&typeof h=="number")return a&&f.children?d.children.splice(h,1,...f.children):d.children.splice(h,1),h}}}function bu(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||pu.test(e.slice(0,n))?e:""}function or(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 ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wu(e,n,t){const i=xt((t||{}).ignore||[]),o=Cu(n);let l=-1;for(;++l<o.length;)ei(e,"text",a);function a(u,f){let h=-1,d;for(;++h<f.length;){const p=f[h],x=d?d.children:void 0;if(i(p,x?x.indexOf(p):void 0,d))return;d=p}if(d)return c(u,f)}function c(u,f){const h=f[f.length-1],d=o[l][0],p=o[l][1];let x=0;const v=h.children.indexOf(u);let y=!1,S=[];d.lastIndex=0;let N=d.exec(u.value);for(;N;){const A=N.index,P={index:N.index,input:N.input,stack:[...f,u]};let b=p(...N,P);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?d.lastIndex=A+1:(x!==A&&S.push({type:"text",value:u.value.slice(x,A)}),Array.isArray(b)?S.push(...b):b&&S.push(b),x=A+N[0].length,y=!0),!d.global)break;N=d.exec(u.value)}return y?(x<u.value.length&&S.push({type:"text",value:u.value.slice(x)}),h.children.splice(v,1,...S)):S=[u],v+S.length}}function Cu(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([vu(i[0]),ju(i[1])])}return n}function vu(e){return typeof e=="string"?new RegExp(ku(e),"g"):e}function ju(e){return typeof e=="function"?e:function(){return e}}const Dt="phrasing",Rt=["autolink","link","image","label"];function Su(){return{transforms:[Fu],enter:{literalAutolink:Eu,literalAutolinkEmail:Lt,literalAutolinkHttp:Lt,literalAutolinkWww:Lt},exit:{literalAutolink:Iu,literalAutolinkEmail:Tu,literalAutolinkHttp:Pu,literalAutolinkWww:Au}}}function Nu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Rt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Rt},{character:":",before:"[ps]",after:"\\/",inConstruct:Dt,notInConstruct:Rt}]}}function Eu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lt(e){this.config.enter.autolinkProtocol.call(this,e)}function Pu(e){this.config.exit.autolinkProtocol.call(this,e)}function Au(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 Tu(e){this.config.exit.autolinkEmail.call(this,e)}function Iu(e){this.exit(e)}function Fu(e){wu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Du],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ru]],{ignore:["link","linkReference"]})}function Du(e,n,t,r,i){let o="";if(!ni(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Lu(t)))return!1;const l=Mu(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Ru(e,n,t,r){return!ni(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Lu(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 Mu(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=or(e,"(");let o=or(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function ni(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ie(t)||dt(t))&&(!n||t!==47)}ri.peek=qu;function zu(){this.buffer()}function _u(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ou(){this.buffer()}function Bu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $u(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hu(e){this.exit(e)}function Vu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Uu(e){this.exit(e)}function qu(){return"["}function ri(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Wu(){return{enter:{gfmFootnoteCallString:zu,gfmFootnoteCall:_u,gfmFootnoteDefinitionLabelString:Ou,gfmFootnoteDefinition:Bu},exit:{gfmFootnoteCallString:$u,gfmFootnoteCall:Hu,gfmFootnoteDefinitionLabelString:Vu,gfmFootnoteDefinition:Uu}}}function Yu(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ri},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let c=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return c+=a.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((n?`
55
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?ii:Qu))),u(),c}}function Qu(e,n,t){return n===0?e:ii(e,n,t)}function ii(e,n,t){return(t?"":" ")+e}const Xu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];li.peek=ec;function Ku(){return{canContainEols:["delete"],enter:{strikethrough:Ju},exit:{strikethrough:Zu}}}function Gu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xu}],handlers:{delete:li}}}function Ju(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function li(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function ec(){return"~"}function tc(e){return e.length}function nc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||tc,o=[],l=[],a=[],c=[];let u=0,f=-1;for(;++f<e.length;){const k=[],v=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const S=rc(e[f][y]);if(t.alignDelimiters!==!1){const N=i(S);v[y]=N,(c[y]===void 0||N>c[y])&&(c[y]=N)}k.push(S)}l[f]=k,a[f]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=ar(r[h]);else{const k=ar(r);for(;++h<u;)o[h]=k}h=-1;const d=[],p=[];for(;++h<u;){const k=o[h];let v="",y="";k===99?(v=":",y=":"):k===108?v=":":k===114&&(y=":");let S=t.alignDelimiters===!1?1:Math.max(1,c[h]-v.length-y.length);const N=v+"-".repeat(S)+y;t.alignDelimiters!==!1&&(S=v.length+S+y.length,S>c[h]&&(c[h]=S),p[h]=S),d[h]=N}l.splice(1,0,d),a.splice(1,0,p),f=-1;const x=[];for(;++f<l.length;){const k=l[f],v=a[f];h=-1;const y=[];for(;++h<u;){const S=k[h]||"";let N="",A="";if(t.alignDelimiters!==!1){const P=c[h]-(v[h]||0),b=o[h];b===114?N=" ".repeat(P):b===99?P%2?(N=" ".repeat(P/2+.5),A=" ".repeat(P/2-.5)):(N=" ".repeat(P/2),A=N):A=" ".repeat(P)}t.delimiterStart!==!1&&!h&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&S==="")&&(t.delimiterStart!==!1||h)&&y.push(" "),t.alignDelimiters!==!1&&y.push(N),y.push(S),t.alignDelimiters!==!1&&y.push(A),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||h!==u-1)&&y.push("|")}x.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return x.join(`
54
+ `},i),o}function Us(e,n){return e&&"run"in e?async function(t,r){const i=Jn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Jn(t,{file:r,...e||n})}}function Zn(e){if(e)throw e}var Nt,er;function qs(){if(er)return Nt;er=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Nt=function c(){var u,f,h,d,p,x,b=arguments[0],v=1,y=arguments.length,j=!1;for(typeof b=="boolean"&&(j=b,b=arguments[1]||{},v=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});v<y;++v)if(u=arguments[v],u!=null)for(f in u)h=a(b,f),d=a(u,f),b!==d&&(j&&d&&(o(d)||(p=i(d)))?(p?(p=!1,x=h&&i(h)?h:[]):x=h&&o(h)?h:{},l(b,{name:f,newValue:c(j,x,d)})):typeof d<"u"&&l(b,{name:f,newValue:d}));return b},Nt}var Ws=qs();const Et=xr(Ws);function Xt(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 Ys(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(c,...u){const f=e[++o];let h=-1;if(c){l(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Qs(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Qs(e,n){let t;return r;function r(...l){const a=e.length>l.length;let c;a&&l.push(i);try{c=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ke={basename:Xs,dirname:Ks,extname:Gs,join:Js,sep:"/"};function Xs(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');rt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Ks(e){if(rt(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 Gs(e){rt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Js(...e){let n=-1,t;for(;++n<e.length;)rt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Zs(t)}function Zs(e){rt(e);const n=e.codePointAt(0)===47;let t=eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function eu(e,n){let t="",r=0,i=-1,o=0,l=-1,a,c;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===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=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function rt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tu={cwd:nu};function nu(){return"/"}function Kt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ru(e){if(typeof e=="string")e=new URL(e);else if(!Kt(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 iu(e)}function iu(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 Pt=["history","path","basename","stem","extname","dirname"];class ti{constructor(n){let t;n?Kt(n)?t={path:n}:typeof n=="string"||lu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pt.length;){const o=Pt[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Pt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(n){Tt(n,"basename"),At(n,"basename"),this.path=ke.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(n){tr(this.basename,"dirname"),this.path=ke.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(n){if(At(n,"extname"),tr(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=ke.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Kt(n)&&(n=ru(n)),Tt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(n){Tt(n,"stem"),At(n,"stem"),this.path=ke.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 ae(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 At(e,n){if(e&&e.includes(ke.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ke.sep+"`")}function Tt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function tr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ou=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),au={}.hasOwnProperty;class mn extends ou{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=Ys()}copy(){const n=new mn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Et(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Dt("data",this.frozen),this.namespace[n]=t,this):au.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Dt("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=ot(n),r=this.parser||this.Parser;return It("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),It("process",this.parser||this.Parser),Ft("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=ot(n),c=r.parse(a);r.run(c,a,function(f,h,d){if(f||!h||!d)return u(f);const p=h,x=r.stringify(p,d);cu(x)?d.value=x:d.result=x,u(f,d)});function u(f,h){f||!h?l(f):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),It("processSync",this.parser||this.Parser),Ft("processSync",this.compiler||this.Compiler),this.process(n,i),rr("processSync","process",t),r;function i(o,l){t=!0,Zn(o),r=l}}run(n,t,r){nr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const c=ot(t);i.run(n,c,u);function u(f,h,d){const p=h||n;f?a(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),rr("runSync","run",r),i;function o(l,a){Zn(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=ot(t),i=this.compiler||this.Compiler;return Ft("stringify",i),nr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Dt("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;c(f,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=Et(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===u){d=h;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...x]=f;const b=r[d][1];Xt(b)&&Xt(p)&&(p=Et(!0,b,p)),r[d]=[u,p,...x]}}}}const su=new mn().freeze();function It(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ft(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dt(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 nr(e){if(!Xt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ot(e){return uu(e)?e:new ti(e)}function uu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cu(e){return typeof e=="string"||hu(e)}function hu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ir=[],lr={allowDangerousHtml:!0},pu=/^(https?|ircs?|mailto|xmpp)$/i,du=[{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 mu(e){const n=gu(e),t=xu(e);return yu(n.runSync(n.parse(t),t),e)}function gu(e){const n=e.rehypePlugins||ir,t=e.remarkPlugins||ir,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lr}:lr;return su().use(Ka).use(t).use(Us,r).use(n)}function xu(e){const n=e.children||"",t=new ti;return typeof n=="string"&&(t.value=n),t}function yu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||bu;for(const f of du)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+fu+f.id,void 0);return dn(e,u),Fl(e,{Fragment:s.Fragment,components:i,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(f,h,d){if(f.type==="raw"&&d&&typeof h=="number")return l?d.children.splice(h,1):d.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in vt)if(Object.hasOwn(vt,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],b=vt[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):o?o.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,d)),p&&d&&typeof h=="number")return a&&f.children?d.children.splice(h,1,...f.children):d.children.splice(h,1),h}}}function bu(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||pu.test(e.slice(0,n))?e:""}function or(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 ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wu(e,n,t){const i=yt((t||{}).ignore||[]),o=Cu(n);let l=-1;for(;++l<o.length;)ei(e,"text",a);function a(u,f){let h=-1,d;for(;++h<f.length;){const p=f[h],x=d?d.children:void 0;if(i(p,x?x.indexOf(p):void 0,d))return;d=p}if(d)return c(u,f)}function c(u,f){const h=f[f.length-1],d=o[l][0],p=o[l][1];let x=0;const v=h.children.indexOf(u);let y=!1,j=[];d.lastIndex=0;let N=d.exec(u.value);for(;N;){const A=N.index,P={index:N.index,input:N.input,stack:[...f,u]};let k=p(...N,P);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?d.lastIndex=A+1:(x!==A&&j.push({type:"text",value:u.value.slice(x,A)}),Array.isArray(k)?j.push(...k):k&&j.push(k),x=A+N[0].length,y=!0),!d.global)break;N=d.exec(u.value)}return y?(x<u.value.length&&j.push({type:"text",value:u.value.slice(x)}),h.children.splice(v,1,...j)):j=[u],v+j.length}}function Cu(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([vu(i[0]),ju(i[1])])}return n}function vu(e){return typeof e=="string"?new RegExp(ku(e),"g"):e}function ju(e){return typeof e=="function"?e:function(){return e}}const Rt="phrasing",Lt=["autolink","link","image","label"];function Su(){return{transforms:[Fu],enter:{literalAutolink:Eu,literalAutolinkEmail:Mt,literalAutolinkHttp:Mt,literalAutolinkWww:Mt},exit:{literalAutolink:Iu,literalAutolinkEmail:Tu,literalAutolinkHttp:Pu,literalAutolinkWww:Au}}}function Nu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rt,notInConstruct:Lt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rt,notInConstruct:Lt},{character:":",before:"[ps]",after:"\\/",inConstruct:Rt,notInConstruct:Lt}]}}function Eu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mt(e){this.config.enter.autolinkProtocol.call(this,e)}function Pu(e){this.config.exit.autolinkProtocol.call(this,e)}function Au(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 Tu(e){this.config.exit.autolinkEmail.call(this,e)}function Iu(e){this.exit(e)}function Fu(e){wu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Du],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ru]],{ignore:["link","linkReference"]})}function Du(e,n,t,r,i){let o="";if(!ni(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Lu(t)))return!1;const l=Mu(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Ru(e,n,t,r){return!ni(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Lu(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 Mu(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=or(e,"(");let o=or(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function ni(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ie(t)||mt(t))&&(!n||t!==47)}ri.peek=qu;function zu(){this.buffer()}function _u(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ou(){this.buffer()}function Bu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $u(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hu(e){this.exit(e)}function Vu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Uu(e){this.exit(e)}function qu(){return"["}function ri(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Wu(){return{enter:{gfmFootnoteCallString:zu,gfmFootnoteCall:_u,gfmFootnoteDefinitionLabelString:Ou,gfmFootnoteDefinition:Bu},exit:{gfmFootnoteCallString:$u,gfmFootnoteCall:Hu,gfmFootnoteDefinitionLabelString:Vu,gfmFootnoteDefinition:Uu}}}function Yu(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ri},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let c=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return c+=a.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((n?`
55
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?ii:Qu))),u(),c}}function Qu(e,n,t){return n===0?e:ii(e,n,t)}function ii(e,n,t){return(t?"":" ")+e}const Xu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];li.peek=ec;function Ku(){return{canContainEols:["delete"],enter:{strikethrough:Ju},exit:{strikethrough:Zu}}}function Gu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xu}],handlers:{delete:li}}}function Ju(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function li(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function ec(){return"~"}function tc(e){return e.length}function nc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||tc,o=[],l=[],a=[],c=[];let u=0,f=-1;for(;++f<e.length;){const b=[],v=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const j=rc(e[f][y]);if(t.alignDelimiters!==!1){const N=i(j);v[y]=N,(c[y]===void 0||N>c[y])&&(c[y]=N)}b.push(j)}l[f]=b,a[f]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=ar(r[h]);else{const b=ar(r);for(;++h<u;)o[h]=b}h=-1;const d=[],p=[];for(;++h<u;){const b=o[h];let v="",y="";b===99?(v=":",y=":"):b===108?v=":":b===114&&(y=":");let j=t.alignDelimiters===!1?1:Math.max(1,c[h]-v.length-y.length);const N=v+"-".repeat(j)+y;t.alignDelimiters!==!1&&(j=v.length+j+y.length,j>c[h]&&(c[h]=j),p[h]=j),d[h]=N}l.splice(1,0,d),a.splice(1,0,p),f=-1;const x=[];for(;++f<l.length;){const b=l[f],v=a[f];h=-1;const y=[];for(;++h<u;){const j=b[h]||"";let N="",A="";if(t.alignDelimiters!==!1){const P=c[h]-(v[h]||0),k=o[h];k===114?N=" ".repeat(P):k===99?P%2?(N=" ".repeat(P/2+.5),A=" ".repeat(P/2-.5)):(N=" ".repeat(P/2),A=N):A=" ".repeat(P)}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(A),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||h!==u-1)&&y.push("|")}x.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return x.join(`
56
56
  `)}function rc(e){return e==null?"":String(e)}function ar(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 ic(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),lc);return i(),l}function lc(e,n,t){return">"+(t?"":" ")+e}function oc(e,n){return sr(e,n.inConstruct,!0)&&!sr(e,n.notInConstruct,!1)}function sr(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 ur(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
57
57
  `&&oc(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
58
58
  `}function ac(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function sc(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 uc(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 cc(e,n,t,r){const i=uc(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(sc(e,t)){const h=t.enter("codeIndented"),d=t.indentLines(o,hc);return h(),d}const a=t.createTracker(r),c=i.repeat(Math.max(ac(o,i)+1,3)),u=t.enter("codeFenced");let f=a.move(c);if(e.lang){const h=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
59
59
  `,encode:["`"],...a.current()})),h()}return f+=a.move(`
60
60
  `),o&&(f+=a.move(o+`
61
- `)),f+=a.move(c),u(),f}function hc(e,n,t){return(t?"":" ")+e}function mn(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 fc(e,n,t,r){const i=mn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":`
62
- `,...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),l(),u}function pc(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 Ze(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pt(e,n,t){const r=Oe(e),i=Oe(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}}oi.peek=dc;function oi(e,n,t,r){const i=pc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function dc(e,n,t){return t.options.emphasis||"*"}function mc(e,n){let t=!1;return pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Wt}),!!((!e.depth||e.depth<3)&&on(e)&&(n.options.setext||t))}function gc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(mc(e,t)){const f=t.enter("headingSetext"),h=t.enter("phrasing"),d=t.containerPhrasing(e,{...o.current(),before:`
61
+ `)),f+=a.move(c),u(),f}function hc(e,n,t){return(t?"":" ")+e}function gn(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 fc(e,n,t,r){const i=gn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":`
62
+ `,...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),l(),u}function pc(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 Ze(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pt(e,n,t){const r=Oe(e),i=Oe(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}}oi.peek=dc;function oi(e,n,t,r){const i=pc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function dc(e,n,t){return t.options.emphasis||"*"}function mc(e,n){let t=!1;return dn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Yt}),!!((!e.depth||e.depth<3)&&an(e)&&(n.options.setext||t))}function gc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(mc(e,t)){const f=t.enter("headingSetext"),h=t.enter("phrasing"),d=t.containerPhrasing(e,{...o.current(),before:`
63
63
  `,after:`
64
64
  `});return h(),f(),d+`
65
65
  `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
66
66
  `))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),c=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
67
- `,...o.current()});return/^[\t ]/.test(u)&&(u=Ze(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),c(),a(),u}ai.peek=xc;function ai(e){return e.value||""}function xc(){return"<"}si.peek=yc;function si(e,n,t,r){const i=mn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),u+=c.move(")"),l(),u}function yc(){return"!"}ui.peek=bc;function ui(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");const u=t.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function bc(){return"!"}ci.peek=kc;function ci(e,n,t){let r=e.value||"",i="`",o=-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+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let c;if(l.atBreak)for(;c=a.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function kc(){return"`"}function hi(e,n){const t=on(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))}fi.peek=wc;function fi(e,n,t,r){const i=mn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,c;if(hi(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let h=l.move("<");return h+=l.move(t.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),a(),t.stack=f,h}a=t.enter("link"),c=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),c()),u+=l.move(")"),a(),u}function wc(e,n,t){return hi(e,t)?"<":"["}pi.peek=Cc;function pi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Cc(){return"["}function gn(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 vc(e){const n=gn(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 jc(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 di(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 Sc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?jc(t):gn(t);const a=e.ordered?l==="."?")":".":vc(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&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),di(t)===l&&f){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function Nc(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 Ec(e,n,t,r){const i=Nc(t);let o=t.bulletCurrent||gn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return c(),u;function f(h,d,p){return d?(p?"":" ".repeat(l))+h:(p?o:o+" ".repeat(l-o.length))+h}}function Pc(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const Ac=xt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,n,t,r){return(e.children.some(function(l){return Ac(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Ic(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}mi.peek=Fc;function mi(e,n,t,r){const i=Ic(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function Fc(e,n,t){return t.options.strong||"*"}function Dc(e,n,t,r){return t.safe(e.value,r)}function Rc(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 Lc(e,n,t){const r=(di(t)+(t.options.ruleSpaces?" ":"")).repeat(Rc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const gi={blockquote:ic,break:ur,code:cc,definition:fc,emphasis:oi,hardBreak:ur,heading:gc,html:ai,image:si,imageReference:ui,inlineCode:ci,link:fi,linkReference:pi,list:Sc,listItem:Ec,paragraph:Pc,root:Tc,strong:mi,text:Dc,thematicBreak:Lc};function Mc(){return{enter:{table:zc,tableData:cr,tableHeader:cr,tableRow:Oc},exit:{codeText:Bc,table:_c,tableData:Mt,tableHeader:Mt,tableRow:Mt}}}function zc(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 _c(e){this.exit(e),this.data.inTable=void 0}function Oc(e){this.enter({type:"tableRow",children:[]},e)}function Mt(e){this.exit(e)}function cr(e){this.enter({type:"tableCell",children:[]},e)}function Bc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,$c));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function $c(e,n){return n==="|"?n:e}function Hc(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=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:d,table:l,tableCell:c,tableRow:a}};function l(p,x,k,v){return u(f(p,k,v),p.align)}function a(p,x,k,v){const y=h(p,k,v),S=u([y]);return S.slice(0,S.indexOf(`
69
- `))}function c(p,x,k,v){const y=k.enter("tableCell"),S=k.enter("phrasing"),N=k.containerPhrasing(p,{...v,before:o,after:o});return S(),y(),N}function u(p,x){return nc(p,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(p,x,k){const v=p.children;let y=-1;const S=[],N=x.enter("table");for(;++y<v.length;)S[y]=h(v[y],x,k);return N(),S}function h(p,x,k){const v=p.children;let y=-1;const S=[],N=x.enter("tableRow");for(;++y<v.length;)S[y]=c(v[y],p,x,k);return N(),S}function d(p,x,k){let v=gi.inlineCode(p,x,k);return k.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Vc(){return{exit:{taskListCheckValueChecked:hr,taskListCheckValueUnchecked:hr,paragraph:qc}}}function Uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wc}}}function hr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function qc(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 o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===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 Wc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let c=gi.listItem(e,n,t,{...r,...a.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+l}}function Yc(){return[Su(),Wu(),Ku(),Mc(),Vc()]}function Qc(e){return{extensions:[Nu(),Yu(e),Gu(),Hc(e),Uc()]}}const Xc={tokenize:th,partial:!0},xi={tokenize:nh,partial:!0},yi={tokenize:rh,partial:!0},bi={tokenize:ih,partial:!0},Kc={tokenize:lh,partial:!0},ki={name:"wwwAutolink",tokenize:Zc,previous:Ci},wi={name:"protocolAutolink",tokenize:eh,previous:vi},je={name:"emailAutolink",tokenize:Jc,previous:ji},we={};function Gc(){return{text:we}}let Ae=48;for(;Ae<123;)we[Ae]=je,Ae++,Ae===58?Ae=65:Ae===91&&(Ae=97);we[43]=je;we[45]=je;we[46]=je;we[95]=je;we[72]=[je,wi];we[104]=[je,wi];we[87]=[je,ki];we[119]=[je,ki];function Jc(e,n,t){const r=this;let i,o;return l;function l(h){return!Kt(h)||!ji.call(r,r.previous)||xn(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Kt(h)?(e.consume(h),a):h===64?(e.consume(h),c):t(h)}function c(h){return h===46?e.check(Kc,f,u)(h):h===45||h===95||oe(h)?(o=!0,e.consume(h),c):f(h)}function u(h){return e.consume(h),i=!0,c}function f(h){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function Zc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Ci.call(r,r.previous)||xn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xc,e.attempt(xi,e.attempt(yi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function eh(e,n,t){const r=this;let i="",o=!1;return l;function l(h){return(h===72||h===104)&&vi.call(r,r.previous)&&!xn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):t(h)}function a(h){if(ce(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(h),c}return t(h)}function c(h){return h===47?(e.consume(h),o?u:(o=!0,c)):t(h)}function u(h){return h===null||ct(h)||Z(h)||Ie(h)||dt(h)?t(h):e.attempt(xi,e.attempt(yi,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function th(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function nh(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(bi,c,a)(u):u===null||Z(u)||Ie(u)||u!==45&&dt(u)?c(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function c(u){return i||r||!o?t(u):n(u)}}function rh(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(bi,n,o)(l):l===null||Z(l)||Ie(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ih(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),o):a===93?(e.consume(a),i):a===60||a===null||Z(a)||Ie(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||Z(a)||Ie(a)?n(a):r(a)}function o(a){return ce(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):ce(a)?(e.consume(a),l):t(a)}}function lh(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return oe(o)?t(o):n(o)}}function Ci(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function vi(e){return!ce(e)}function ji(e){return!(e===47||Kt(e))}function Kt(e){return e===43||e===45||e===46||e===95||oe(e)}function xn(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 oh={tokenize:dh,partial:!0};function ah(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hh,continuation:{tokenize:fh},exit:ph}},text:{91:{name:"gfmFootnoteCall",tokenize:ch},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sh,resolveTo:uh}}}}function sh(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){l=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(!l||!l._balanced)return t(c);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function uh(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 o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function ch(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;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",u)}function u(h){if(o>999||h===93&&!l||h===null||h===91||Z(h))return t(h);if(h===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ye(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Z(h)||(l=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function hh(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=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"),u}function u(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(l>999||x===93&&!a||x===null||x===91||Z(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=ye(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Z(x)||(a=!0),l++,e.consume(x),x===92?h:f}function h(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}function d(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):t(x)}function p(x){return n(x)}}function fh(e,n,t){return e.check(nt,n,e.attempt(oh,n,t))}function ph(e){e.exit("gfmFootnoteDefinition")}function dh(e,n,t){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function mh(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let c=-1;for(;++c<l.length;)if(l[c][0]==="enter"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._close){let u=c;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[c][1].end.offset-l[c][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[c][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[c][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[c][1].start)},d=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",h,a]],p=a.parser.constructs.insideSpan.null;p&&me(d,d.length,0,mt(p,l.slice(u+1,c),a)),me(d,d.length,0,[["exit",h,a],["enter",l[c][1],a],["exit",l[c][1],a],["exit",f,a]]),me(l,u-1,c-u+3,d),c=u+d.length-2;break}}for(c=-1;++c<l.length;)l[c][1].type==="strikethroughSequenceTemporary"&&(l[c][1].type="data");return l}function o(l,a,c){const u=this.previous,f=this.events;let h=0;return d;function d(x){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(x):(l.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const k=Oe(u);if(x===126)return h>1?c(x):(l.consume(x),h++,p);if(h<2&&!t)return c(x);const v=l.exit("strikethroughSequenceTemporary"),y=Oe(x);return v._open=!y||y===2&&!!k,v._close=!k||k===2&&!!y,a(x)}}}class gh{constructor(){this.map=[]}add(n,t,r){xh(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[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 o of i)n.push(o);i=r.pop()}this.map.length=0}}function xh(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 yh(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 o=r.length-1;r[o]=r[o]==="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 bh(){return{flow:{null:{name:"table",tokenize:kh,resolveAll:wh}}}}function kh(e,n,t){const r=this;let i=0,o=0,l;return a;function a(w){let F=r.events.length-1;for(;F>-1;){const L=r.events[F][1].type;if(L==="lineEnding"||L==="linePrefix")F--;else break}const R=F>-1?r.events[F][1].type:null,Y=R==="tableHead"||R==="tableRow"?b:c;return Y===b&&r.parser.lazy[r.now().line]?t(w):Y(w)}function c(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(l=!0,o+=1),f(w)}function f(w){return w===null?t(w):O(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):t(w):U(w)?Q(e,f,"whitespace")(w):(o+=1,l&&(l=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Z(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?d:h)}function d(w){return w===92||w===124?(e.consume(w),h):h(w)}function p(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(w):(e.enter("tableDelimiterRow"),l=!1,U(w)?Q(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):x(w))}function x(w){return w===45||w===58?v(w):w===124?(l=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),k):P(w)}function k(w){return U(w)?Q(e,v,"whitespace")(w):v(w)}function v(w){return w===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(o+=1,y(w)):w===null||O(w)?A(w):P(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),S(w)):P(w)}function S(w){return w===45?(e.consume(w),S):w===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(w))}function N(w){return U(w)?Q(e,A,"whitespace")(w):A(w)}function A(w){return w===124?x(w):w===null||O(w)?!l||i!==o?P(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(w)):P(w)}function P(w){return t(w)}function b(w){return e.enter("tableRow"),D(w)}function D(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),D):w===null||O(w)?(e.exit("tableRow"),n(w)):U(w)?Q(e,D,"whitespace")(w):(e.enter("data"),_(w))}function _(w){return w===null||w===124||Z(w)?(e.exit("data"),D(w)):(e.consume(w),w===92?q:_)}function q(w){return w===92||w===124?(e.consume(w),_):_(w)}}function wh(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,c=0,u,f,h;const d=new gh;for(;++t<e.length;){const p=e[t],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,c!==0&&(fr(d,n,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.add(t,0,[["enter",u,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.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,l[2]===0&&(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h),o=[0,0,0,0]),l[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h)),o=l,l=[o[1],t,0,0])):x.type==="tableHead"?(a=!0,c=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=t,o[1]!==0?(l[0]=l[1],h=at(d,n,o,i,t,h)):l[1]!==0&&(h=at(d,n,l,i,t,h)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=t)}for(c!==0&&fr(d,n,c,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yh(n.events,t))}return e}function at(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Me(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const c=Me(n.events,t[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Me(n.events,t[2]),f=Me(n.events,t[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",t[3]>t[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},Me(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function fr(e,n,t,r,i){const o=[],l=Me(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Me(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Ch={name:"tasklistCheck",tokenize:jh};function vh(){return{text:{91:Ch}}}function jh(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"),o)}function o(c){return Z(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(c)}function a(c){return O(c)?n(c):U(c)?e.check({tokenize:Sh},n,t)(c):t(c)}}function Sh(e,n,t){return Q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Nh(e){return Lr([Gc(),ah(),mh(e),bh(),vh()])}const Eh={};function Ph(e){const n=this,t=e||Eh,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nh(t)),o.push(Yc()),l.push(Qc(t))}function Si({content:e,className:n}){const t=e.trim().replace(/^#+ .+$/m,"").trim();return s.jsx(mu,{remarkPlugins:[Ph],components:{h1:({children:r})=>s.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})=>s.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-2 mt-5 first:mt-0",children:r}),h3:({children:r})=>s.jsx("h3",{className:"text-sm font-semibold text-gray-800 mb-2 mt-4 first:mt-0",children:r}),p:({children:r})=>s.jsx("p",{className:"text-sm text-gray-700 mb-3 leading-relaxed",children:r}),ul:({children:r})=>s.jsx("ul",{className:"list-disc ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),ol:({children:r})=>s.jsx("ol",{className:"list-decimal ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),li:({children:r})=>s.jsx("li",{className:"leading-relaxed",children:r}),code:({children:r,className:i})=>(i==null?void 0:i.includes("language-"))?s.jsx("pre",{className:"bg-gray-100 rounded p-3 text-xs font-mono overflow-x-auto mb-3",children:s.jsx("code",{children:r})}):s.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})=>s.jsx(s.Fragment,{children:r}),strong:({children:r})=>s.jsx("strong",{className:"font-semibold text-gray-900",children:r}),blockquote:({children:r})=>s.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:r}),table:({children:r})=>s.jsx("div",{className:"overflow-x-auto mb-3",children:s.jsx("table",{className:"min-w-full text-sm border-collapse border border-gray-200",children:r})}),thead:({children:r})=>s.jsx("thead",{className:"bg-gray-50",children:r}),th:({children:r})=>s.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold text-gray-900",children:r}),td:({children:r})=>s.jsx("td",{className:"border border-gray-200 px-3 py-2 text-gray-700",children:r}),a:({children:r,href:i})=>s.jsx("a",{href:i,className:"text-[#005C75] hover:underline",target:"_blank",rel:"noopener noreferrer",children:r})},children:t})}function Ni(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,o="";for(const l of r)o=o?`${o}/${l}`:l,i.children.has(l)||i.children.set(l,{name:l,path:o,memories:[],children:new Map}),i=i.children.get(l);r.length===0?n.memories.push(t):i.memories.push(t)}return n}function Ei(e){let n=e.memories.length;for(const t of e.children.values())n+=Ei(t);return n}function bt(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 Ge(e){return Math.round(e/3.5)}function yn(e){const n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString()){const c=t.getTime()-n.getTime(),u=Math.floor(c/(1e3*60*60));return u<1?"Just now":u===1?"1h ago":`${u}h ago`}const i=n.toLocaleDateString("en-US",{month:"short"}),o=n.getDate(),l=n.getFullYear(),a=t.getFullYear();return l===a?`${i} ${o}`:`${i} ${o}, ${l}`}function Ah({rule:e,onEdit:n,onDelete:t,onView:r,isReviewed:i,onToggleReviewed:o,changeType:l,isUncommitted:a,changeDate:c,diff:u,isFadingOut:f,showLeftBorder:h}){const[d,p]=I.useState(!1),[x,k]=I.useState(!1),v=I.useMemo(()=>bt(e.body,e.filePath),[e.body,e.filePath]),y=Ge(e.body.length),S=d?"#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"}`,A={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return s.jsxs("div",{className:N,style:A,children:[s.jsx("div",{className:`p-4 cursor-pointer ${a?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>r?r(e):p(!d),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:d?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:S})})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h3",{style:{fontSize:"14px",lineHeight:"18px",fontWeight:500,color:a?"#78350f":"#000"},children:v}),l&&s.jsx("span",{className:`px-2 py-0.5 rounded uppercase font-medium tracking-wider ${l==="deleted"?"bg-red-100 text-red-700":""}`,style:{fontSize:"10px",...l==="added"&&{backgroundColor:"#CBF3FA",color:"#005C75"},...l==="modified"&&{backgroundColor:"#FFE8C1",color:"#C67E06"}},children:l}),a&&s.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"}),s.jsxs("span",{className:"text-xs text-gray-400",children:["~",y.toLocaleString()," tokens"]})]}),s.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-500 flex-wrap",children:e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs(s.Fragment,{children:[e.frontmatter.paths.slice(0,2).map((P,b)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:P},b)),e.frontmatter.paths.length>2&&s.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:["+",e.frontmatter.paths.length-2," more"]})]})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c&&s.jsx("span",{className:"text-xs text-gray-400",children:yn(c)}),o&&s.jsx("button",{onClick:P=>{P.stopPropagation(),o(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&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}),d&&s.jsxs("div",{className:`border-t ${a?"border-amber-200":"border-gray-100"}`,children:[s.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${a?"bg-amber-50":"bg-white"}`,children:[s.jsx("div",{className:"flex items-center gap-2",children:l==="modified"&&u&&s.jsxs("button",{onClick:P=>{P.stopPropagation(),k(!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:[s.jsx(yr,{className:"w-3 h-3"}),x?"Hide Diff":"Show Diff"]})}),l!=="deleted"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:P=>{P.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:[s.jsx(Zi,{className:"w-3 h-3"}),"Edit"]}),s.jsxs("button",{onClick:P=>{P.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:[s.jsx(nl,{className:"w-3 h-3"}),"Delete"]})]})]}),x&&u&&s.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:u.split(`
70
- `).map((P,b)=>{let D="";return P.startsWith("+")&&!P.startsWith("+++")?D="text-green-400":P.startsWith("-")&&!P.startsWith("---")?D="text-red-400":P.startsWith("@@")&&(D="text-cyan-400"),s.jsx("div",{className:D,children:P},b)})}),s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Edit with Claude:"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.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,"`"]}),s.jsx(Vi,{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&&s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Applies to paths:"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.frontmatter.paths.map((P,b)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:P},b))})]}),!x&&s.jsx("div",{className:"mx-4 mb-4 p-4 rounded border max-h-[500px] overflow-auto bg-white border-gray-200",children:s.jsx(Si,{content:e.body})})]})]})}function Th(){return new Date().toISOString().split(".")[0]+"",`---
67
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=Ze(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),c(),a(),u}ai.peek=xc;function ai(e){return e.value||""}function xc(){return"<"}si.peek=yc;function si(e,n,t,r){const i=gn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),u+=c.move(")"),l(),u}function yc(){return"!"}ui.peek=bc;function ui(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");const u=t.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function bc(){return"!"}ci.peek=kc;function ci(e,n,t){let r=e.value||"",i="`",o=-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+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let c;if(l.atBreak)for(;c=a.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function kc(){return"`"}function hi(e,n){const t=an(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))}fi.peek=wc;function fi(e,n,t,r){const i=gn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,c;if(hi(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let h=l.move("<");return h+=l.move(t.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),a(),t.stack=f,h}a=t.enter("link"),c=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),c()),u+=l.move(")"),a(),u}function wc(e,n,t){return hi(e,t)?"<":"["}pi.peek=Cc;function pi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Cc(){return"["}function xn(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 vc(e){const n=xn(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 jc(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 di(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 Sc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?jc(t):xn(t);const a=e.ordered?l==="."?")":".":vc(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&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),di(t)===l&&f){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function Nc(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 Ec(e,n,t,r){const i=Nc(t);let o=t.bulletCurrent||xn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return c(),u;function f(h,d,p){return d?(p?"":" ".repeat(l))+h:(p?o:o+" ".repeat(l-o.length))+h}}function Pc(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const Ac=yt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,n,t,r){return(e.children.some(function(l){return Ac(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Ic(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}mi.peek=Fc;function mi(e,n,t,r){const i=Ic(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function Fc(e,n,t){return t.options.strong||"*"}function Dc(e,n,t,r){return t.safe(e.value,r)}function Rc(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 Lc(e,n,t){const r=(di(t)+(t.options.ruleSpaces?" ":"")).repeat(Rc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const gi={blockquote:ic,break:ur,code:cc,definition:fc,emphasis:oi,hardBreak:ur,heading:gc,html:ai,image:si,imageReference:ui,inlineCode:ci,link:fi,linkReference:pi,list:Sc,listItem:Ec,paragraph:Pc,root:Tc,strong:mi,text:Dc,thematicBreak:Lc};function Mc(){return{enter:{table:zc,tableData:cr,tableHeader:cr,tableRow:Oc},exit:{codeText:Bc,table:_c,tableData:zt,tableHeader:zt,tableRow:zt}}}function zc(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 _c(e){this.exit(e),this.data.inTable=void 0}function Oc(e){this.enter({type:"tableRow",children:[]},e)}function zt(e){this.exit(e)}function cr(e){this.enter({type:"tableCell",children:[]},e)}function Bc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,$c));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function $c(e,n){return n==="|"?n:e}function Hc(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=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:d,table:l,tableCell:c,tableRow:a}};function l(p,x,b,v){return u(f(p,b,v),p.align)}function a(p,x,b,v){const y=h(p,b,v),j=u([y]);return j.slice(0,j.indexOf(`
69
+ `))}function c(p,x,b,v){const y=b.enter("tableCell"),j=b.enter("phrasing"),N=b.containerPhrasing(p,{...v,before:o,after:o});return j(),y(),N}function u(p,x){return nc(p,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(p,x,b){const v=p.children;let y=-1;const j=[],N=x.enter("table");for(;++y<v.length;)j[y]=h(v[y],x,b);return N(),j}function h(p,x,b){const v=p.children;let y=-1;const j=[],N=x.enter("tableRow");for(;++y<v.length;)j[y]=c(v[y],p,x,b);return N(),j}function d(p,x,b){let v=gi.inlineCode(p,x,b);return b.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Vc(){return{exit:{taskListCheckValueChecked:hr,taskListCheckValueUnchecked:hr,paragraph:qc}}}function Uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wc}}}function hr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function qc(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 o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===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 Wc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let c=gi.listItem(e,n,t,{...r,...a.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+l}}function Yc(){return[Su(),Wu(),Ku(),Mc(),Vc()]}function Qc(e){return{extensions:[Nu(),Yu(e),Gu(),Hc(e),Uc()]}}const Xc={tokenize:th,partial:!0},xi={tokenize:nh,partial:!0},yi={tokenize:rh,partial:!0},bi={tokenize:ih,partial:!0},Kc={tokenize:lh,partial:!0},ki={name:"wwwAutolink",tokenize:Zc,previous:Ci},wi={name:"protocolAutolink",tokenize:eh,previous:vi},je={name:"emailAutolink",tokenize:Jc,previous:ji},we={};function Gc(){return{text:we}}let Ae=48;for(;Ae<123;)we[Ae]=je,Ae++,Ae===58?Ae=65:Ae===91&&(Ae=97);we[43]=je;we[45]=je;we[46]=je;we[95]=je;we[72]=[je,wi];we[104]=[je,wi];we[87]=[je,ki];we[119]=[je,ki];function Jc(e,n,t){const r=this;let i,o;return l;function l(h){return!Gt(h)||!ji.call(r,r.previous)||yn(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Gt(h)?(e.consume(h),a):h===64?(e.consume(h),c):t(h)}function c(h){return h===46?e.check(Kc,f,u)(h):h===45||h===95||oe(h)?(o=!0,e.consume(h),c):f(h)}function u(h){return e.consume(h),i=!0,c}function f(h){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function Zc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Ci.call(r,r.previous)||yn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xc,e.attempt(xi,e.attempt(yi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function eh(e,n,t){const r=this;let i="",o=!1;return l;function l(h){return(h===72||h===104)&&vi.call(r,r.previous)&&!yn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):t(h)}function a(h){if(ce(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(h),c}return t(h)}function c(h){return h===47?(e.consume(h),o?u:(o=!0,c)):t(h)}function u(h){return h===null||ct(h)||Z(h)||Ie(h)||mt(h)?t(h):e.attempt(xi,e.attempt(yi,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function th(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function nh(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(bi,c,a)(u):u===null||Z(u)||Ie(u)||u!==45&&mt(u)?c(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function c(u){return i||r||!o?t(u):n(u)}}function rh(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(bi,n,o)(l):l===null||Z(l)||Ie(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ih(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),o):a===93?(e.consume(a),i):a===60||a===null||Z(a)||Ie(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||Z(a)||Ie(a)?n(a):r(a)}function o(a){return ce(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):ce(a)?(e.consume(a),l):t(a)}}function lh(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return oe(o)?t(o):n(o)}}function Ci(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function vi(e){return!ce(e)}function ji(e){return!(e===47||Gt(e))}function Gt(e){return e===43||e===45||e===46||e===95||oe(e)}function yn(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 oh={tokenize:dh,partial:!0};function ah(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hh,continuation:{tokenize:fh},exit:ph}},text:{91:{name:"gfmFootnoteCall",tokenize:ch},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sh,resolveTo:uh}}}}function sh(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){l=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(!l||!l._balanced)return t(c);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function uh(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 o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function ch(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;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",u)}function u(h){if(o>999||h===93&&!l||h===null||h===91||Z(h))return t(h);if(h===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ye(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Z(h)||(l=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function hh(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=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"),u}function u(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(l>999||x===93&&!a||x===null||x===91||Z(x))return t(x);if(x===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=ye(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Z(x)||(a=!0),l++,e.consume(x),x===92?h:f}function h(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}function d(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):t(x)}function p(x){return n(x)}}function fh(e,n,t){return e.check(nt,n,e.attempt(oh,n,t))}function ph(e){e.exit("gfmFootnoteDefinition")}function dh(e,n,t){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function mh(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let c=-1;for(;++c<l.length;)if(l[c][0]==="enter"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._close){let u=c;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[c][1].end.offset-l[c][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[c][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[c][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[c][1].start)},d=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",h,a]],p=a.parser.constructs.insideSpan.null;p&&me(d,d.length,0,gt(p,l.slice(u+1,c),a)),me(d,d.length,0,[["exit",h,a],["enter",l[c][1],a],["exit",l[c][1],a],["exit",f,a]]),me(l,u-1,c-u+3,d),c=u+d.length-2;break}}for(c=-1;++c<l.length;)l[c][1].type==="strikethroughSequenceTemporary"&&(l[c][1].type="data");return l}function o(l,a,c){const u=this.previous,f=this.events;let h=0;return d;function d(x){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(x):(l.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const b=Oe(u);if(x===126)return h>1?c(x):(l.consume(x),h++,p);if(h<2&&!t)return c(x);const v=l.exit("strikethroughSequenceTemporary"),y=Oe(x);return v._open=!y||y===2&&!!b,v._close=!b||b===2&&!!y,a(x)}}}class gh{constructor(){this.map=[]}add(n,t,r){xh(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[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 o of i)n.push(o);i=r.pop()}this.map.length=0}}function xh(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 yh(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 o=r.length-1;r[o]=r[o]==="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 bh(){return{flow:{null:{name:"table",tokenize:kh,resolveAll:wh}}}}function kh(e,n,t){const r=this;let i=0,o=0,l;return a;function a(w){let F=r.events.length-1;for(;F>-1;){const L=r.events[F][1].type;if(L==="lineEnding"||L==="linePrefix")F--;else break}const R=F>-1?r.events[F][1].type:null,Y=R==="tableHead"||R==="tableRow"?k:c;return Y===k&&r.parser.lazy[r.now().line]?t(w):Y(w)}function c(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(l=!0,o+=1),f(w)}function f(w){return w===null?t(w):O(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):t(w):U(w)?Q(e,f,"whitespace")(w):(o+=1,l&&(l=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Z(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?d:h)}function d(w){return w===92||w===124?(e.consume(w),h):h(w)}function p(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(w):(e.enter("tableDelimiterRow"),l=!1,U(w)?Q(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):x(w))}function x(w){return w===45||w===58?v(w):w===124?(l=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),b):P(w)}function b(w){return U(w)?Q(e,v,"whitespace")(w):v(w)}function v(w){return w===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(o+=1,y(w)):w===null||O(w)?A(w):P(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),j(w)):P(w)}function j(w){return w===45?(e.consume(w),j):w===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(w))}function N(w){return U(w)?Q(e,A,"whitespace")(w):A(w)}function A(w){return w===124?x(w):w===null||O(w)?!l||i!==o?P(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(w)):P(w)}function P(w){return t(w)}function k(w){return e.enter("tableRow"),D(w)}function D(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),D):w===null||O(w)?(e.exit("tableRow"),n(w)):U(w)?Q(e,D,"whitespace")(w):(e.enter("data"),_(w))}function _(w){return w===null||w===124||Z(w)?(e.exit("data"),D(w)):(e.consume(w),w===92?q:_)}function q(w){return w===92||w===124?(e.consume(w),_):_(w)}}function wh(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,c=0,u,f,h;const d=new gh;for(;++t<e.length;){const p=e[t],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,c!==0&&(fr(d,n,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.add(t,0,[["enter",u,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},d.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,l[2]===0&&(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h),o=[0,0,0,0]),l[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h)),o=l,l=[o[1],t,0,0])):x.type==="tableHead"?(a=!0,c=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=t,o[1]!==0?(l[0]=l[1],h=at(d,n,o,i,t,h)):l[1]!==0&&(h=at(d,n,l,i,t,h)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=t)}for(c!==0&&fr(d,n,c,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yh(n.events,t))}return e}function at(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Me(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const c=Me(n.events,t[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Me(n.events,t[2]),f=Me(n.events,t[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[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&&(o.end=Object.assign({},Me(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function fr(e,n,t,r,i){const o=[],l=Me(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Me(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Ch={name:"tasklistCheck",tokenize:jh};function vh(){return{text:{91:Ch}}}function jh(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"),o)}function o(c){return Z(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(c)}function a(c){return O(c)?n(c):U(c)?e.check({tokenize:Sh},n,t)(c):t(c)}}function Sh(e,n,t){return Q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Nh(e){return Lr([Gc(),ah(),mh(e),bh(),vh()])}const Eh={};function Ph(e){const n=this,t=e||Eh,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nh(t)),o.push(Yc()),l.push(Qc(t))}function Si({content:e,className:n}){const t=e.trim().replace(/^#+ .+$/m,"").trim();return s.jsx(mu,{remarkPlugins:[Ph],components:{h1:({children:r})=>s.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})=>s.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-2 mt-5 first:mt-0",children:r}),h3:({children:r})=>s.jsx("h3",{className:"text-sm font-semibold text-gray-800 mb-2 mt-4 first:mt-0",children:r}),p:({children:r})=>s.jsx("p",{className:"text-sm text-gray-700 mb-3 leading-relaxed",children:r}),ul:({children:r})=>s.jsx("ul",{className:"list-disc ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),ol:({children:r})=>s.jsx("ol",{className:"list-decimal ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),li:({children:r})=>s.jsx("li",{className:"leading-relaxed",children:r}),code:({children:r,className:i})=>(i==null?void 0:i.includes("language-"))?s.jsx("pre",{className:"bg-gray-100 rounded p-3 text-xs font-mono overflow-x-auto mb-3",children:s.jsx("code",{children:r})}):s.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})=>s.jsx(s.Fragment,{children:r}),strong:({children:r})=>s.jsx("strong",{className:"font-semibold text-gray-900",children:r}),blockquote:({children:r})=>s.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:r}),table:({children:r})=>s.jsx("div",{className:"overflow-x-auto mb-3",children:s.jsx("table",{className:"min-w-full text-sm border-collapse border border-gray-200",children:r})}),thead:({children:r})=>s.jsx("thead",{className:"bg-gray-50",children:r}),th:({children:r})=>s.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold text-gray-900",children:r}),td:({children:r})=>s.jsx("td",{className:"border border-gray-200 px-3 py-2 text-gray-700",children:r}),a:({children:r,href:i})=>s.jsx("a",{href:i,className:"text-[#005C75] hover:underline",target:"_blank",rel:"noopener noreferrer",children:r})},children:t})}function Ni(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,o="";for(const l of r)o=o?`${o}/${l}`:l,i.children.has(l)||i.children.set(l,{name:l,path:o,memories:[],children:new Map}),i=i.children.get(l);r.length===0?n.memories.push(t):i.memories.push(t)}return n}function Ei(e){let n=e.memories.length;for(const t of e.children.values())n+=Ei(t);return n}function kt(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 Ge(e){return Math.round(e/3.5)}function dt(e){const n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString()){const c=t.getTime()-n.getTime(),u=Math.floor(c/(1e3*60*60));return u<1?"Just now":u===1?"1h ago":`${u}h ago`}const i=n.toLocaleDateString("en-US",{month:"short"}),o=n.getDate(),l=n.getFullYear(),a=t.getFullYear();return l===a?`${i} ${o}`:`${i} ${o}, ${l}`}function Ah({rule:e,onEdit:n,onDelete:t,onView:r,isReviewed:i,onToggleReviewed:o,changeType:l,isUncommitted:a,changeDate:c,diff:u,isFadingOut:f,showLeftBorder:h}){const[d,p]=I.useState(!1),[x,b]=I.useState(!1),v=I.useMemo(()=>kt(e.body,e.filePath),[e.body,e.filePath]),y=Ge(e.body.length),j=d?"#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"}`,A={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return s.jsxs("div",{className:N,style:A,children:[s.jsx("div",{className:`p-4 cursor-pointer ${a?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>r?r(e):p(!d),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:d?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:j})})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h3",{style:{fontSize:"14px",lineHeight:"18px",fontWeight:500,color:a?"#78350f":"#000"},children:v}),l&&s.jsx("span",{className:`px-2 py-0.5 rounded uppercase font-medium tracking-wider ${l==="deleted"?"bg-red-100 text-red-700":""}`,style:{fontSize:"10px",...l==="added"&&{backgroundColor:"#CBF3FA",color:"#005C75"},...l==="modified"&&{backgroundColor:"#FFE8C1",color:"#C67E06"}},children:l}),a&&s.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"}),s.jsxs("span",{className:"text-xs text-gray-400",children:["~",y.toLocaleString()," tokens"]})]}),s.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-500 flex-wrap",children:e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs(s.Fragment,{children:[e.frontmatter.paths.slice(0,2).map((P,k)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:P},k)),e.frontmatter.paths.length>2&&s.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:["+",e.frontmatter.paths.length-2," more"]})]})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c&&s.jsx("span",{className:"text-xs text-gray-400",children:dt(c)}),o&&s.jsx("button",{onClick:P=>{P.stopPropagation(),o(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&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}),d&&s.jsxs("div",{className:`border-t ${a?"border-amber-200":"border-gray-100"}`,children:[s.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${a?"bg-amber-50":"bg-white"}`,children:[s.jsx("div",{className:"flex items-center gap-2",children:l==="modified"&&u&&s.jsxs("button",{onClick:P=>{P.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:[s.jsx(yr,{className:"w-3 h-3"}),x?"Hide Diff":"Show Diff"]})}),l!=="deleted"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:P=>{P.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:[s.jsx(Zi,{className:"w-3 h-3"}),"Edit"]}),s.jsxs("button",{onClick:P=>{P.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:[s.jsx(nl,{className:"w-3 h-3"}),"Delete"]})]})]}),x&&u&&s.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:u.split(`
70
+ `).map((P,k)=>{let D="";return P.startsWith("+")&&!P.startsWith("+++")?D="text-green-400":P.startsWith("-")&&!P.startsWith("---")?D="text-red-400":P.startsWith("@@")&&(D="text-cyan-400"),s.jsx("div",{className:D,children:P},k)})}),s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Edit with Claude:"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.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,"`"]}),s.jsx(Vi,{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&&s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Applies to paths:"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.frontmatter.paths.map((P,k)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:P},k))})]}),!x&&s.jsx("div",{className:"mx-4 mb-4 p-4 rounded border max-h-[500px] overflow-auto bg-white border-gray-200",children:s.jsx(Si,{content:e.body})})]})]})}function Th(){return new Date().toISOString().split(".")[0]+"",`---
71
71
  paths:
72
72
  - '**/*.ts'
73
73
  ---
@@ -75,7 +75,7 @@ paths:
75
75
  ## Title
76
76
 
77
77
  Description here.
78
- `}function Ih({rule:e,onSave:n,onCancel:t}){const[r,i]=I.useState(e?`.claude/rules/${e.filePath}`:""),[o,l]=I.useState((e==null?void 0:e.content)||Th()),[a,c]=I.useState(!!e),[u,f]=I.useState(!1),h=!e;return s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold",style:{fontFamily:"Sora"},children:e?"Edit Rule":"Create New Rule"}),s.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-5 h-5"})})]}),h&&s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(yr,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),s.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:"}),s.jsxs("div",{className:"relative",children:[s.jsx("code",{className:"block bg-white px-3 py-2 pr-9 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText("/codeyam-new-rule"),f(!0),setTimeout(()=>f(!1),2e3)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-[#0284c7] hover:text-[#0c4a6e] cursor-pointer transition-colors",title:"Copy command",children:u?s.jsx(Te,{className:"w-4 h-4 text-green-500"}):s.jsx(ze,{className:"w-4 h-4"})})]})]})]})}),s.jsxs("button",{onClick:()=>c(!a),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:a?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:a?"#3e3e3e":"#c7c7c7"})})}),"Or create manually"]})]}),(a||!h)&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",value:r,onChange:d=>i(d.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}),s.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:s.jsx(ze,{className:"w-4 h-4"})})]})]}),e&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ask Claude for help editing:"}),s.jsxs("div",{className:"relative",children:[s.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"}),s.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:s.jsx(ze,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),s.jsx("textarea",{value:o,onChange:d=>l(d.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"})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.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"}),s.jsx("button",{onClick:()=>n(r.replace(/^\.claude\/rules\//,""),o),disabled:!r.trim()||!o.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 Fh({memories:e,selectedPath:n,onSelectPath:t,expandedFolders:r,onToggleFolder:i}){const o=I.useMemo(()=>Ni(e),[e]),l=(u,f,h)=>{if(u.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=u=>{t(n===u?null:u)},c=(u,f=0)=>{const h=r.has(u.path||"root"),d=Ei(u),p=u.children.size>0,x=u.name==="root"?"(root)":u.name,k=u.memories.length>0||p,v=u.path||"",y=n===v||n===null&&v==="";return s.jsxs("div",{children:[s.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:S=>l(S,u.path,k),children:[k&&s.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:S=>{S.stopPropagation(),i(u.path||"root")},children:s.jsx(Gt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!k&&s.jsx("div",{className:"w-3"}),s.jsx(kr,{className:"w-3.5 h-3.5 text-[#005C75]"}),s.jsx("span",{className:`text-xs font-mono font-semibold ${y?"text-[#005C75]":""}`,style:{color:"#005C75"},children:x}),s.jsxs("span",{className:"text-xs ml-auto",style:{color:"#005C75"},children:[d," rules"]})]}),h&&s.jsxs("div",{className:"relative",children:[(u.memories.length>0||p)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:`${f*12+8+6}px`}}),u.memories.length>0&&s.jsx("div",{style:{paddingLeft:`${(f+1)*12+8}px`},children:u.memories.map(S=>{var A;const N=n===S.filePath;return s.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(S.filePath),children:s.jsx("span",{className:"text-xs",children:(A=S.filePath.split("/").pop())==null?void 0:A.replace(".md","")})},S.filePath)})}),p&&s.jsx("div",{children:Array.from(u.children.values()).sort((S,N)=>S.name.localeCompare(N.name)).map(S=>c(S,f+1))})]})]},u.path||"root")};return s.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-8",children:c(o)})}function Dh({memories:e,onEdit:n,onDelete:t,expandedFolders:r,onToggleFolder:i,reviewedStatus:o,onMarkReviewed:l,onMarkUnreviewed:a,onViewRule:c}){const[u,f]=I.useState({});I.useEffect(()=>{f({})},[o]);const h=I.useMemo(()=>({...o,...u}),[o,u]),d=I.useMemo(()=>Ni(e),[e]),p=(k,v,y)=>{f(S=>({...S,[k]:!y})),y?a(k):l(k,v)},x=(k,v=0)=>{const y=r.has(k.path||"root"),S=k.children.size>0,N=k.name==="root"?"root":k.name,A=k.memories.length>0||S;return s.jsxs("div",{children:[s.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:()=>A&&i(k.path||"root"),children:[A&&s.jsx(Gt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!A&&s.jsx("div",{className:"w-4"}),s.jsx(kr,{className:"w-4 h-4 text-[#005C75]"}),s.jsx("span",{className:"text-sm font-mono font-semibold",style:{color:"#001f3f"},children:N})]}),y&&s.jsxs("div",{className:"ml-10 space-y-4 relative",children:[(k.memories.length>0||S)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),k.memories.length>0&&s.jsx("div",{className:"space-y-2",children:k.memories.map(P=>s.jsx(Ah,{rule:P,onEdit:n,onDelete:t,onView:c,isReviewed:h[P.filePath]??!1,onToggleReviewed:p},P.filePath))}),S&&s.jsx("div",{className:"space-y-4",children:Array.from(k.children.values()).sort((P,b)=>P.name.localeCompare(b.name)).map(P=>x(P,v+1))})]})]},k.path||"root")};return s.jsx("div",{children:x(d)})}function Rh({memories:e,reviewedStatus:n,onViewRule:t,refreshKey:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState("by-date"),[c,u]=I.useState(null),[f,h]=I.useState(!0),[d,p]=I.useState(new Map),x=I.useRef(n),k=I.useRef([]);I.useEffect(()=>()=>{k.current.forEach(clearTimeout)},[]),I.useEffect(()=>{(async()=>{h(!0);try{const b=await(await fetch("/api/memory?action=rule-coverage")).json();u(b.coverage??null)}catch{u(null)}finally{h(!1)}})()},[r]),I.useEffect(()=>{const A=x.current,P=[];for(const[b,D]of Object.entries(n))D&&!A[b]&&P.push(b);x.current=n,P.length!==0&&(p(b=>{const D=new Map(b);return P.forEach(_=>D.set(_,"approved")),D}),k.current.push(setTimeout(()=>{p(b=>{const D=new Map(b);return P.forEach(_=>D.set(_,"fading")),D})},1500)),k.current.push(setTimeout(()=>{p(b=>{const D=new Map(b);return P.forEach(_=>D.delete(_)),D})},2500)))},[n]);const v=I.useMemo(()=>{const A=[...e];return l==="by-impact"&&c!==null?A.sort((P,b)=>{const D=c[P.filePath]??0,_=c[b.filePath]??0;return _!==D?_-D:new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()}):A.sort((P,b)=>new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()),A},[e,l,c]),y=I.useMemo(()=>v.filter(A=>!n[A.filePath]).length,[v,n]),S=I.useMemo(()=>i==="unreviewed"?v.filter(A=>!n[A.filePath]||d.has(A.filePath)):v,[v,i,n,d]),N=!f&&c!==null;return s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Recently Changed Rules"})}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",y,")"]})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:["All (",v.length,")"]})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_90px_80px_100px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Rule"}),s.jsxs("button",{onClick:()=>N&&a("by-impact"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none p-0 ${N?"cursor-pointer hover:text-gray-600":"cursor-default"} ${l==="by-impact"?"text-[#005C75]":"text-gray-400"}`,children:["Src Files",l==="by-impact"&&s.jsx(zt,{className:"w-3 h-3"})]}),s.jsxs("button",{onClick:()=>a("by-date"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none cursor-pointer p-0 hover:text-gray-600 ${l==="by-date"?"text-[#005C75]":"text-gray-400"}`,children:["Changed At",l==="by-date"&&s.jsx(zt,{className:"w-3 h-3"})]}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Ot,{className:"w-3 h-3 text-gray-300 cursor-help"}),s.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"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:S.map(A=>{const P=n[A.filePath]??!1,b=d.get(A.filePath),D=bt(A.body,A.filePath),_=(c==null?void 0:c[A.filePath])??0;return s.jsx("div",{className:`border-b border-gray-50 transition-all ${b==="fading"?"duration-1000":"duration-300"}`,style:{opacity:b==="fading"?0:1},children:s.jsxs("div",{className:`grid grid-cols-[1fr_90px_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${b==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>t(A),children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsx("span",{className:"text-sm text-gray-900 truncate",children:D})}),s.jsx("span",{className:"text-xs text-center",children:f?s.jsx("span",{className:"inline-block w-6 h-3 bg-gray-100 rounded animate-pulse"}):c!==null?s.jsx("span",{className:_>0?"text-gray-700 font-medium":"text-gray-300",children:_}):s.jsx("span",{className:"text-gray-300",children:"—"})}),s.jsx("span",{className:"text-xs text-gray-500 text-center",children:yn(A.lastModified)}),s.jsx("div",{className:"flex justify-center",children:s.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&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})},A.filePath)})}),S.length===0&&i==="unreviewed"&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"})]})}function Lh(e,n){const t=n.map(r=>`- \`${r}\``).join(`
78
+ `}function Ih({rule:e,onSave:n,onCancel:t}){const[r,i]=I.useState(e?`.claude/rules/${e.filePath}`:""),[o,l]=I.useState((e==null?void 0:e.content)||Th()),[a,c]=I.useState(!!e),[u,f]=I.useState(!1),h=!e;return s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold",style:{fontFamily:"Sora"},children:e?"Edit Rule":"Create New Rule"}),s.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-5 h-5"})})]}),h&&s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(yr,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),s.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:"}),s.jsxs("div",{className:"relative",children:[s.jsx("code",{className:"block bg-white px-3 py-2 pr-9 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText("/codeyam-new-rule"),f(!0),setTimeout(()=>f(!1),2e3)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-[#0284c7] hover:text-[#0c4a6e] cursor-pointer transition-colors",title:"Copy command",children:u?s.jsx(Te,{className:"w-4 h-4 text-green-500"}):s.jsx(ze,{className:"w-4 h-4"})})]})]})]})}),s.jsxs("button",{onClick:()=>c(!a),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:a?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:a?"#3e3e3e":"#c7c7c7"})})}),"Or create manually"]})]}),(a||!h)&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",value:r,onChange:d=>i(d.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}),s.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:s.jsx(ze,{className:"w-4 h-4"})})]})]}),e&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ask Claude for help editing:"}),s.jsxs("div",{className:"relative",children:[s.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"}),s.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:s.jsx(ze,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),s.jsx("textarea",{value:o,onChange:d=>l(d.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"})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.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"}),s.jsx("button",{onClick:()=>n(r.replace(/^\.claude\/rules\//,""),o),disabled:!r.trim()||!o.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 Fh({memories:e,selectedPath:n,onSelectPath:t,expandedFolders:r,onToggleFolder:i}){const o=I.useMemo(()=>Ni(e),[e]),l=(u,f,h)=>{if(u.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=u=>{t(n===u?null:u)},c=(u,f=0)=>{const h=r.has(u.path||"root"),d=Ei(u),p=u.children.size>0,x=u.name==="root"?"(root)":u.name,b=u.memories.length>0||p,v=u.path||"",y=n===v||n===null&&v==="";return s.jsxs("div",{children:[s.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=>l(j,u.path,b),children:[b&&s.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:j=>{j.stopPropagation(),i(u.path||"root")},children:s.jsx(Jt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!b&&s.jsx("div",{className:"w-3"}),s.jsx(kr,{className:"w-3.5 h-3.5 text-[#005C75]"}),s.jsx("span",{className:`text-xs font-mono font-semibold ${y?"text-[#005C75]":""}`,style:{color:"#005C75"},children:x}),s.jsxs("span",{className:"text-xs ml-auto",style:{color:"#005C75"},children:[d," rules"]})]}),h&&s.jsxs("div",{className:"relative",children:[(u.memories.length>0||p)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:`${f*12+8+6}px`}}),u.memories.length>0&&s.jsx("div",{style:{paddingLeft:`${(f+1)*12+8}px`},children:u.memories.map(j=>{var A;const N=n===j.filePath;return s.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:s.jsx("span",{className:"text-xs",children:(A=j.filePath.split("/").pop())==null?void 0:A.replace(".md","")})},j.filePath)})}),p&&s.jsx("div",{children:Array.from(u.children.values()).sort((j,N)=>j.name.localeCompare(N.name)).map(j=>c(j,f+1))})]})]},u.path||"root")};return s.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-8",children:c(o)})}function Dh({memories:e,onEdit:n,onDelete:t,expandedFolders:r,onToggleFolder:i,reviewedStatus:o,onMarkReviewed:l,onMarkUnreviewed:a,onViewRule:c}){const[u,f]=I.useState({});I.useEffect(()=>{f({})},[o]);const h=I.useMemo(()=>({...o,...u}),[o,u]),d=I.useMemo(()=>Ni(e),[e]),p=(b,v,y)=>{f(j=>({...j,[b]:!y})),y?a(b):l(b,v)},x=(b,v=0)=>{const y=r.has(b.path||"root"),j=b.children.size>0,N=b.name==="root"?"root":b.name,A=b.memories.length>0||j;return s.jsxs("div",{children:[s.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:()=>A&&i(b.path||"root"),children:[A&&s.jsx(Jt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!A&&s.jsx("div",{className:"w-4"}),s.jsx(kr,{className:"w-4 h-4 text-[#005C75]"}),s.jsx("span",{className:"text-sm font-mono font-semibold",style:{color:"#001f3f"},children:N})]}),y&&s.jsxs("div",{className:"ml-10 space-y-4 relative",children:[(b.memories.length>0||j)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),b.memories.length>0&&s.jsx("div",{className:"space-y-2",children:b.memories.map(P=>s.jsx(Ah,{rule:P,onEdit:n,onDelete:t,onView:c,isReviewed:h[P.filePath]??!1,onToggleReviewed:p},P.filePath))}),j&&s.jsx("div",{className:"space-y-4",children:Array.from(b.children.values()).sort((P,k)=>P.name.localeCompare(k.name)).map(P=>x(P,v+1))})]})]},b.path||"root")};return s.jsx("div",{children:x(d)})}function Rh({memories:e,reviewedStatus:n,onViewRule:t,refreshKey:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState("by-date"),[c,u]=I.useState(null),[f,h]=I.useState(!0),[d,p]=I.useState(new Map),x=I.useRef(n),b=I.useRef([]);I.useEffect(()=>()=>{b.current.forEach(clearTimeout)},[]),I.useEffect(()=>{(async()=>{h(!0);try{const k=await(await fetch("/api/memory?action=rule-coverage")).json();u(k.coverage??null)}catch{u(null)}finally{h(!1)}})()},[r]),I.useEffect(()=>{const A=x.current,P=[];for(const[k,D]of Object.entries(n))D&&!A[k]&&P.push(k);x.current=n,P.length!==0&&(p(k=>{const D=new Map(k);return P.forEach(_=>D.set(_,"approved")),D}),b.current.push(setTimeout(()=>{p(k=>{const D=new Map(k);return P.forEach(_=>D.set(_,"fading")),D})},1500)),b.current.push(setTimeout(()=>{p(k=>{const D=new Map(k);return P.forEach(_=>D.delete(_)),D})},2500)))},[n]);const v=I.useMemo(()=>{const A=[...e];return l==="by-impact"&&c!==null?A.sort((P,k)=>{const D=c[P.filePath]??0,_=c[k.filePath]??0;return _!==D?_-D:new Date(k.lastModified).getTime()-new Date(P.lastModified).getTime()}):A.sort((P,k)=>new Date(k.lastModified).getTime()-new Date(P.lastModified).getTime()),A},[e,l,c]),y=I.useMemo(()=>v.filter(A=>!n[A.filePath]).length,[v,n]),j=I.useMemo(()=>i==="unreviewed"?v.filter(A=>!n[A.filePath]||d.has(A.filePath)):v,[v,i,n,d]),N=!f&&c!==null;return s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Recently Changed Rules"})}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",y,")"]})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:["All (",v.length,")"]})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_90px_80px_100px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Rule"}),s.jsxs("button",{onClick:()=>N&&a("by-impact"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none p-0 ${N?"cursor-pointer hover:text-gray-600":"cursor-default"} ${l==="by-impact"?"text-[#005C75]":"text-gray-400"}`,children:["Src Files",l==="by-impact"&&s.jsx(_t,{className:"w-3 h-3"})]}),s.jsxs("button",{onClick:()=>a("by-date"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none cursor-pointer p-0 hover:text-gray-600 ${l==="by-date"?"text-[#005C75]":"text-gray-400"}`,children:["Changed At",l==="by-date"&&s.jsx(_t,{className:"w-3 h-3"})]}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 cursor-help"}),s.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"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:j.map(A=>{const P=n[A.filePath]??!1,k=d.get(A.filePath),D=kt(A.body,A.filePath),_=(c==null?void 0:c[A.filePath])??0;return s.jsx("div",{className:`border-b border-gray-50 transition-all ${k==="fading"?"duration-1000":"duration-300"}`,style:{opacity:k==="fading"?0:1},children:s.jsxs("div",{className:`grid grid-cols-[1fr_90px_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${k==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>t(A),children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsx("span",{className:"text-sm text-gray-900 truncate",children:D})}),s.jsx("span",{className:"text-xs text-center",children:f?s.jsx("span",{className:"inline-block w-6 h-3 bg-gray-100 rounded animate-pulse"}):c!==null?s.jsx("span",{className:_>0?"text-gray-700 font-medium":"text-gray-300",children:_}):s.jsx("span",{className:"text-gray-300",children:"—"})}),s.jsx("span",{className:"text-xs text-gray-500 text-center",children:dt(A.lastModified)}),s.jsx("div",{className:"flex justify-center",children:s.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&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})},A.filePath)})}),j.length===0&&i==="unreviewed"&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"})]})}function Lh(e,n){const t=n.map(r=>`- \`${r}\``).join(`
79
79
  `);return`Please audit the following Claude Rules that apply to the file \`${e}\`:
80
80
 
81
81
  ${t}
@@ -89,4 +89,5 @@ Review each rule with the other rules in mind:
89
89
  - Overlap: Is there any redundant information across the rules that can be consolidated?
90
90
  - Duplication: Are there any rules that are nearly identical that can be merged or removed?
91
91
 
92
- Note: Each rule may apply to multiple files, not just the file listed above. Consider this when suggesting changes — modifications should not negatively impact the rule's usefulness for other files it covers.`}function Mh({filePath:e,rulePaths:n,onClose:t}){const[r,i]=I.useState(!1),o=Lh(e,n),l=()=>{navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:t,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:a=>a.stopPropagation(),children:[s.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-1",children:"Audit Rules For File"}),s.jsx("p",{className:"font-mono text-sm text-gray-500 mb-4 truncate",title:e,children:e}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can audit these rules to try and make them as efficient and effective as possible, reducing the impact on the context window."}),s.jsx("textarea",{readOnly:!0,value:o,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-4",children:s.jsx("button",{onClick:l,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:r?s.jsxs(s.Fragment,{children:[s.jsx(Te,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(ze,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function zh({refreshKey:e,reviewedStatus:n,memories:t,onViewRule:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState(null),[c,u]=I.useState(""),[f,h]=I.useState(0),[d,p]=I.useState(!1),[x,k]=I.useState(null),[v,y]=I.useState(null),S=I.useRef(null),N=I.useRef(null),[A,P]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[b,D]=I.useState(!0);I.useEffect(()=>{(async()=>{D(!0);try{const B=await(await fetch("/api/memory?action=audit")).json();P({topPaths:B.topPaths||[],totalFilesWithCoverage:B.totalFilesWithCoverage||0,allSourceFiles:B.allSourceFiles||[]})}catch(M){console.error("Failed to load audit data:",M)}finally{D(!1)}})()},[e]);const _=I.useMemo(()=>i==="all"?A.topPaths:A.topPaths.filter(C=>C.matchingRules.some(M=>!n[M.filePath])),[A.topPaths,i,n]);I.useMemo(()=>A.topPaths.filter(C=>C.matchingRules.some(M=>!n[M.filePath])).length,[A.topPaths,n]);const q=C=>C.split("/").pop()||C,w=I.useMemo(()=>{const C=new Map;for(const M of A.topPaths)C.set(M.filePath,M);return C},[A.topPaths]),F=I.useMemo(()=>{if(!c.trim())return[];const C=c.toLowerCase(),M=[],B=[];for(const K of A.allSourceFiles){const X=K.toLowerCase();if(!X.includes(C))continue;const m=w.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(C)?M.push(m):B.push(m)}return M.sort((K,X)=>K.filePath.localeCompare(X.filePath)),B.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...M,...B].slice(0,8)},[c,A.allSourceFiles,w]),R=I.useCallback(C=>{var M;k(C),a(C.filePath),u(C.filePath),p(!1),(M=S.current)==null||M.blur()},[]),Y=I.useCallback(()=>{var C;u(""),k(null),a(null),(C=S.current)==null||C.focus()},[]),L=I.useCallback(C=>{var M;!d||F.length===0||(C.key==="ArrowDown"?(C.preventDefault(),h(B=>Math.min(B+1,F.length-1))):C.key==="ArrowUp"?(C.preventDefault(),h(B=>Math.max(B-1,0))):C.key==="Enter"?(C.preventDefault(),R(F[f])):C.key==="Escape"&&(p(!1),(M=S.current)==null||M.blur()))},[d,F,f,R]);return I.useEffect(()=>{h(0)},[F]),s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),s.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[s.jsx(br,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),s.jsx("input",{ref:S,type:"text",value:c,onChange:C=>{u(C.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:L,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&&s.jsx("button",{type:"button",onMouseDown:C=>{C.preventDefault(),Y()},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:s.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:s.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),d&&F.length>0&&s.jsx("div",{ref:N,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:F.map((C,M)=>s.jsxs("div",{onMouseDown:B=>{B.preventDefault(),R(C)},onMouseEnter:()=>h(M),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${M===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[s.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 truncate",title:C.filePath,children:(()=>{const B=C.filePath.toLowerCase().indexOf(c.toLowerCase());if(B===-1)return C.filePath;const K=C.filePath.slice(0,B),X=C.filePath.slice(B,B+c.length),m=C.filePath.slice(B+c.length);return s.jsxs(s.Fragment,{children:[K,s.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),m]})})()}),s.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[C.matchingRules.length," rule",C.matchingRules.length!==1?"s":""]})]},C.filePath))})]}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Ot,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.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"})]})]}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Ot,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.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"})]})]})]}),b&&s.jsx("div",{className:"px-5 py-6",children:s.jsxs("div",{className:"animate-pulse space-y-3",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!b&&(_.length>0||x)&&s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(x?[x,..._.filter(M=>M.filePath!==x.filePath)].slice(0,8):_.slice(0,8)).map((C,M)=>{const B=C.matchingRules.length,K=C.matchingRules.filter(G=>!n[G.filePath]),X=K.length,m=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===C.filePath,g=(x==null?void 0:x.filePath)===C.filePath;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>a(se?null:C.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${g?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[se?s.jsx(zt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):s.jsx(Gt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-900 truncate",title:C.filePath,children:g?C.filePath:q(C.filePath)})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:X}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:B})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Ge(m).toLocaleString()}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:Ge(C.totalTextLength).toLocaleString()})]})]}),se&&s.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[C.matchingRules.map(G=>{const re=t.find(z=>z.filePath===G.filePath),ne=n[G.filePath]??!1;return s.jsxs("div",{onClick:z=>{z.stopPropagation(),re&&r(re)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[s.jsx(qi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:re?bt(re.body,re.filePath):G.filePath}),s.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Ge(G.bodyLength).toLocaleString()," ","tokens"]}),s.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${ne?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:ne&&s.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},G.filePath)}),s.jsxs("div",{className:"flex items-center justify-center gap-3 px-5 py-2 border-t border-gray-200",children:[s.jsx("span",{className:"text-xs text-gray-400",children:"Have Claude audit these rules"}),s.jsx("button",{onClick:G=>{G.stopPropagation(),y({filePath:C.filePath,rulePaths:C.matchingRules.map(re=>re.filePath)})},className:"px-3 py-1 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer",children:"Prompt"})]})]})]},C.filePath)})}),!b&&_.length===0&&s.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"}),v&&s.jsx(Mh,{filePath:v.filePath,rulePaths:v.rulePaths,onClose:()=>y(null)})]})}function _h({rule:e,changeInfo:n,isReviewed:t,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const a=bt(e.body,e.filePath),c=Ge(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,d]=I.useState(!1);return I.useEffect(()=>{const p=x=>{x.key==="Escape"&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l]),s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:l,children:s.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:[s.jsx("div",{className:"px-6 pt-5 pb-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[s.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:a}),n&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:yn(n.date)}),s.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})]})]}),u&&s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:u})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),s.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(f),d(!0),setTimeout(()=>d(!1),2e3)},className:"p-0.5 rounded text-gray-400 hover:text-gray-600 cursor-pointer transition-colors",title:"Copy file path",children:h?s.jsx(Te,{className:"w-3 h-3 text-green-500"}):s.jsx(ze,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[s.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:[s.jsx(Te,{className:"w-3.5 h-3.5"}),t?"Approved":"Approve"]}),s.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"}),s.jsx("button",{onClick:o,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"}),s.jsx("button",{onClick:l,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:s.jsx(et,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs("div",{className:"px-6 pb-4",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),s.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 k=p.split("/"),v=k.pop()||p,y=k.length>0?k.join("/")+"/":"";return s.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[s.jsx(_t,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),s.jsxs("span",{children:[y&&s.jsx("span",{className:"text-gray-500",children:y}),s.jsx("span",{className:"font-bold text-gray-900",children:v})]})]},x)})})]}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),s.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:s.jsx(Si,{content:e.body})})]})]})})}function Oh(){return s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Bh(){return s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function $h(){return s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),s.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."})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),s.jsxs("ol",{className:"space-y-5",children:[s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[s.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),s.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),s.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."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),s.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."})]})]})]})]})]}),s.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[s.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function pr({value:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3)};return s.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?s.jsx(Te,{className:"w-3.5 h-3.5 text-green-400"}):s.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:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function st({label:e,count:n,icon:t,bgColor:r,iconBgColor:i,textColor:o}){return s.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:t}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:n}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:n,onCreateNew:t,onLearnMore:r,reviewCounts:i}){return s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Oh,{}),s.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),s.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",s.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx("input",{type:"text",value:e,onChange:o=>n(o.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"})]}),s.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:[s.jsx(Jt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(st,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(st,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(st,{label:"Reviewed",count:i.reviewed,icon:s.jsx(Te,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(st,{label:"Stale",count:i.stale,icon:s.jsx(Ui,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:n}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:t=>t.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),s.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),s.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[s.jsxs("p",{children:["Claude Rules are a component of"," ",s.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.']}),s.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."}),s.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."})]}),s.jsx("div",{className:"flex justify-center",children:s.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:[s.jsx(Jt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:n,onCancel:t}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),s.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",s.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.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 dr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense and are they concise and efficient in their communication. We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rules is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3)};return s.jsx("button",{onClick:r,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:n?s.jsxs(s.Fragment,{children:[s.jsx(Te,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(ze,{className:"w-4 h-4"}),"Copy Prompt"]})})}function qh({onClose:e}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:n=>n.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),s.jsx("textarea",{readOnly:!0,value:dr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:dr})}),s.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[s.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),s.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:mr})})]})]})})}function Wh(){const[e,n]=I.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 mb-8 flex items-center gap-3",children:[s.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),s.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&s.jsx(qh,{onClose:()=>n(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=zi(function(){const{memories:n,reviewedStatus:t,memoryInitialized:r,error:i}=_i(),o=Oi(),l=Bi(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,x]=I.useState(null),[k,v]=I.useState(!1),[y,S]=I.useState(null),[N,A]=I.useState(0),[P,b]=I.useState(!1),[D,_]=I.useState(null),[q,w]=I.useState(null),[F,R]=I.useState({}),Y=z=>{d(H=>{const ee=new Set(H);return ee.has(z)?ee.delete(z):ee.add(z),ee})};Hi({source:"memory-page"});const L=I.useMemo(()=>({...t,...F}),[t,F]),C=I.useRef(o.state);I.useEffect(()=>{const z=C.current==="loading"||C.current==="submitting",H=o.state==="idle";z&&H&&o.data&&(l.revalidate(),x(null),v(!1),A(ee=>ee+1)),C.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{R(z=>{const H={};for(const[ee,ue]of Object.entries(z))t[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(z).length?z:H})},[t]);const M=(z,H)=>{R(ee=>({...ee,[z]:!0})),o.submit({action:"mark-reviewed",filePath:z,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=z=>{R(H=>({...H,[z]:!1})),o.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(z,H)=>{_(z),w(H??null)},X=I.useMemo(()=>{let z=n;if(a.trim()){const H=a.toLowerCase();z=z.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return z},[n,a]),m=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(z,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:z,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=z=>{o.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),S(null)},g=I.useMemo(()=>{const z=n.filter(H=>L[H.filePath]).length;return{total:n.length,reviewed:z,unreviewed:n.length-z,stale:0}},[n,L]),G=I.useMemo(()=>{const z=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,z.add(ue)}return z},[X]),re=G.size===h.size&&[...G].every(z=>h.has(z)),ne=()=>{d(re?new Set(["root"]):new Set(G))};return i?s.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:s.jsxs("div",{className:"px-12 py-6 font-sans",children:[s.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),s.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[s.jsx(Hh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>v(!0),onLearnMore:()=>b(!0),reviewCounts:g}),(k||p)&&s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{v(!1),x(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{v(!1),x(null)}})})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[s.jsx(Rh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:N}),s.jsx(zh,{onEditRule:x,onDeleteRule:S,refreshKey:N,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,memories:n,onViewRule:K})]}),s.jsx(Wh,{}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),s.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&s.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:s.jsx(Fh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),s.jsx("div",{className:"flex-1 min-w-0",children:n.length===0?s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[s.jsx(Xi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),s.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",s.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),s.jsxs("button",{onClick:()=>v(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[s.jsx(Jt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):s.jsxs("div",{children:[u&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",s.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),s.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),s.jsx(Dh,{memories:m,onEdit:x,onDelete:S,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx($i,{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:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"4 17 10 11 4 5"}),s.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),s.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),D&&!p&&(()=>{const z=n.find(H=>H.filePath===D.filePath)??D;return s.jsx(_h,{rule:z,changeInfo:q??void 0,isReviewed:L[z.filePath]??!1,onApprove:()=>{L[z.filePath]??!1?B(z.filePath):M(z.filePath,z.lastModified),_(null)},onEdit:()=>{x(z)},onDelete:()=>{S(z),_(null)},onClose:()=>_(null)})})(),P&&s.jsx(Vh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),v(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>S(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};
92
+ Note: Each rule may apply to multiple files, not just the file listed above. Consider this when suggesting changes — modifications should not negatively impact the rule's usefulness for other files it covers.`}function Mh({filePath:e,rulePaths:n,onClose:t}){const[r,i]=I.useState(!1),o=Lh(e,n),l=()=>{navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:t,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:a=>a.stopPropagation(),children:[s.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-1",children:"Audit Rules For File"}),s.jsx("p",{className:"font-mono text-sm text-gray-500 mb-4 truncate",title:e,children:e}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can audit these rules to try and make them as efficient and effective as possible, reducing the impact on the context window."}),s.jsx("textarea",{readOnly:!0,value:o,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-4",children:s.jsx("button",{onClick:l,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:r?s.jsxs(s.Fragment,{children:[s.jsx(Te,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(ze,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function zh({refreshKey:e,reviewedStatus:n,memories:t,onViewRule:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState(null),[c,u]=I.useState(""),[f,h]=I.useState(0),[d,p]=I.useState(!1),[x,b]=I.useState(null),[v,y]=I.useState(null),j=I.useRef(null),N=I.useRef(null),[A,P]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[k,D]=I.useState(!0);I.useEffect(()=>{(async()=>{D(!0);try{const B=await(await fetch("/api/memory?action=audit")).json();P({topPaths:B.topPaths||[],totalFilesWithCoverage:B.totalFilesWithCoverage||0,allSourceFiles:B.allSourceFiles||[]})}catch(M){console.error("Failed to load audit data:",M)}finally{D(!1)}})()},[e]);const _=I.useMemo(()=>i==="all"?A.topPaths:A.topPaths.filter(C=>C.matchingRules.some(M=>!n[M.filePath])),[A.topPaths,i,n]);I.useMemo(()=>A.topPaths.filter(C=>C.matchingRules.some(M=>!n[M.filePath])).length,[A.topPaths,n]);const q=C=>C.split("/").pop()||C,w=I.useMemo(()=>{const C=new Map;for(const M of A.topPaths)C.set(M.filePath,M);return C},[A.topPaths]),F=I.useMemo(()=>{if(!c.trim())return[];const C=c.toLowerCase(),M=[],B=[];for(const K of A.allSourceFiles){const X=K.toLowerCase();if(!X.includes(C))continue;const m=w.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(C)?M.push(m):B.push(m)}return M.sort((K,X)=>K.filePath.localeCompare(X.filePath)),B.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...M,...B].slice(0,8)},[c,A.allSourceFiles,w]),R=I.useCallback(C=>{var M;b(C),a(C.filePath),u(C.filePath),p(!1),(M=j.current)==null||M.blur()},[]),Y=I.useCallback(()=>{var C;u(""),b(null),a(null),(C=j.current)==null||C.focus()},[]),L=I.useCallback(C=>{var M;!d||F.length===0||(C.key==="ArrowDown"?(C.preventDefault(),h(B=>Math.min(B+1,F.length-1))):C.key==="ArrowUp"?(C.preventDefault(),h(B=>Math.max(B-1,0))):C.key==="Enter"?(C.preventDefault(),R(F[f])):C.key==="Escape"&&(p(!1),(M=j.current)==null||M.blur()))},[d,F,f,R]);return I.useEffect(()=>{h(0)},[F]),s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),s.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[s.jsx(br,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),s.jsx("input",{ref:j,type:"text",value:c,onChange:C=>{u(C.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:L,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&&s.jsx("button",{type:"button",onMouseDown:C=>{C.preventDefault(),Y()},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:s.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:s.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),d&&F.length>0&&s.jsx("div",{ref:N,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:F.map((C,M)=>s.jsxs("div",{onMouseDown:B=>{B.preventDefault(),R(C)},onMouseEnter:()=>h(M),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${M===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 truncate",title:C.filePath,children:(()=>{const B=C.filePath.toLowerCase().indexOf(c.toLowerCase());if(B===-1)return C.filePath;const K=C.filePath.slice(0,B),X=C.filePath.slice(B,B+c.length),m=C.filePath.slice(B+c.length);return s.jsxs(s.Fragment,{children:[K,s.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),m]})})()}),s.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[C.matchingRules.length," rule",C.matchingRules.length!==1?"s":""]})]},C.filePath))})]}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.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"})]})]}),s.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",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.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"})]})]})]}),k&&s.jsx("div",{className:"px-5 py-6",children:s.jsxs("div",{className:"animate-pulse space-y-3",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!k&&(_.length>0||x)&&s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(x?[x,..._.filter(M=>M.filePath!==x.filePath)].slice(0,8):_.slice(0,8)).map((C,M)=>{const B=C.matchingRules.length,K=C.matchingRules.filter(G=>!n[G.filePath]),X=K.length,m=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===C.filePath,g=(x==null?void 0:x.filePath)===C.filePath;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>a(se?null:C.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${g?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[se?s.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):s.jsx(Jt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-900 truncate",title:C.filePath,children:g?C.filePath:q(C.filePath)})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:X}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:B})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Ge(m).toLocaleString()}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:Ge(C.totalTextLength).toLocaleString()})]})]}),se&&s.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[C.matchingRules.map(G=>{const re=t.find(z=>z.filePath===G.filePath),ne=n[G.filePath]??!1;return s.jsxs("div",{onClick:z=>{z.stopPropagation(),re&&r(re)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[s.jsx(qi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:re?kt(re.body,re.filePath):G.filePath}),s.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Ge(G.bodyLength).toLocaleString()," ","tokens"]}),s.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${ne?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:ne&&s.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},G.filePath)}),s.jsxs("div",{className:"flex items-center justify-center gap-3 px-5 py-2 border-t border-gray-200",children:[s.jsx("span",{className:"text-xs text-gray-400",children:"Have Claude audit these rules"}),s.jsx("button",{onClick:G=>{G.stopPropagation(),y({filePath:C.filePath,rulePaths:C.matchingRules.map(re=>re.filePath)})},className:"px-3 py-1 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer",children:"Prompt"})]})]})]},C.filePath)})}),!k&&_.length===0&&s.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"}),v&&s.jsx(Mh,{filePath:v.filePath,rulePaths:v.rulePaths,onClose:()=>y(null)})]})}function _h({rule:e,changeInfo:n,isReviewed:t,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const a=kt(e.body,e.filePath),c=Ge(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,d]=I.useState(!1),[p,x]=I.useState(null);return I.useEffect(()=>{x(null),fetch(`/api/memory?action=rule-diff&filePath=${encodeURIComponent(e.filePath)}`).then(b=>b.json()).then(b=>{b.diff&&x(b.diff)}).catch(()=>{})},[e.filePath]),I.useEffect(()=>{const b=v=>{v.key==="Escape"&&l()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[l]),s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:l,children:s.jsxs("div",{className:"rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",style:{backgroundColor:"#F8F7F6"},onClick:b=>b.stopPropagation(),children:[s.jsx("div",{className:"px-6 pt-5 pb-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[s.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:a}),n&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:dt(n.date)}),s.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})]})]}),u&&s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:u})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),s.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(f),d(!0),setTimeout(()=>d(!1),2e3)},className:"p-0.5 rounded text-gray-400 hover:text-gray-600 cursor-pointer transition-colors",title:"Copy file path",children:h?s.jsx(Te,{className:"w-3 h-3 text-green-500"}):s.jsx(ze,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[s.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:[s.jsx(Te,{className:"w-3.5 h-3.5"}),t?"Approved":"Approve"]}),s.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"}),s.jsx("button",{onClick:o,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"}),s.jsx("button",{onClick:l,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:s.jsx(et,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs("div",{className:"px-6 pb-4",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),s.jsx("div",{className:"bg-white rounded-lg p-4 space-y-2.5",style:{border:"1px solid #E6E6E6"},children:e.frontmatter.paths.map((b,v)=>{const y=b.split("/"),j=y.pop()||b,N=y.length>0?y.join("/")+"/":"";return s.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[s.jsx(Ot,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),s.jsxs("span",{children:[N&&s.jsx("span",{className:"text-gray-500",children:N}),s.jsx("span",{className:"font-bold text-gray-900",children:j})]})]},v)})})]}),p&&s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("details",{children:[s.jsxs("summary",{className:"text-[13px] text-gray-700 font-semibold cursor-pointer",children:["Recent change: ",p.commitMessage," —"," ",dt(p.date)]}),s.jsx("pre",{className:"mt-2 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:p.diff.split(`
93
+ `).map((b,v)=>{let y="";return b.startsWith("+")&&!b.startsWith("+++")?y="text-green-400":b.startsWith("-")&&!b.startsWith("---")?y="text-red-400":b.startsWith("@@")&&(y="text-cyan-400"),s.jsx("div",{className:y,children:b},v)})})]})}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),s.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:s.jsx(Si,{content:e.body})})]})]})})}function Oh(){return s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Bh(){return s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function $h(){return s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),s.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."})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),s.jsxs("ol",{className:"space-y-5",children:[s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.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"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[s.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),s.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),s.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."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),s.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."})]})]})]})]})]}),s.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[s.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function pr({value:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3)};return s.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?s.jsx(Te,{className:"w-3.5 h-3.5 text-green-400"}):s.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:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function st({label:e,count:n,icon:t,bgColor:r,iconBgColor:i,textColor:o}){return s.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:t}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:n}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:n,onCreateNew:t,onLearnMore:r,reviewCounts:i}){return s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Oh,{}),s.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),s.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",s.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx("input",{type:"text",value:e,onChange:o=>n(o.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"})]}),s.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:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(st,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(st,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(st,{label:"Reviewed",count:i.reviewed,icon:s.jsx(Te,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(st,{label:"Stale",count:i.stale,icon:s.jsx(Ui,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:n}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:t=>t.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),s.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),s.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[s.jsxs("p",{children:["Claude Rules are a component of"," ",s.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.']}),s.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."}),s.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."})]}),s.jsx("div",{className:"flex justify-center",children:s.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:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:n,onCancel:t}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),s.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",s.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.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 dr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rules is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3)};return s.jsx("button",{onClick:r,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:n?s.jsxs(s.Fragment,{children:[s.jsx(Te,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(ze,{className:"w-4 h-4"}),"Copy Prompt"]})})}function qh({onClose:e}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:n=>n.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),s.jsx("textarea",{readOnly:!0,value:dr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:dr})}),s.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[s.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),s.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:mr})})]})]})})}function Wh(){const[e,n]=I.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 mb-8 flex items-center gap-3",children:[s.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),s.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&s.jsx(qh,{onClose:()=>n(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=zi(function(){const{memories:n,reviewedStatus:t,memoryInitialized:r,error:i}=_i(),o=Oi(),l=Bi(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,x]=I.useState(null),[b,v]=I.useState(!1),[y,j]=I.useState(null),[N,A]=I.useState(0),[P,k]=I.useState(!1),[D,_]=I.useState(null),[q,w]=I.useState(null),[F,R]=I.useState({}),Y=z=>{d(H=>{const ee=new Set(H);return ee.has(z)?ee.delete(z):ee.add(z),ee})};Hi({source:"memory-page"});const L=I.useMemo(()=>({...t,...F}),[t,F]),C=I.useRef(o.state);I.useEffect(()=>{const z=C.current==="loading"||C.current==="submitting",H=o.state==="idle";z&&H&&o.data&&(l.revalidate(),x(null),v(!1),A(ee=>ee+1)),C.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{R(z=>{const H={};for(const[ee,ue]of Object.entries(z))t[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(z).length?z:H})},[t]);const M=(z,H)=>{R(ee=>({...ee,[z]:!0})),o.submit({action:"mark-reviewed",filePath:z,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=z=>{R(H=>({...H,[z]:!1})),o.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(z,H)=>{_(z),w(H??null)},X=I.useMemo(()=>{let z=n;if(a.trim()){const H=a.toLowerCase();z=z.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return z},[n,a]),m=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(z,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:z,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=z=>{o.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},g=I.useMemo(()=>{const z=n.filter(H=>L[H.filePath]).length;return{total:n.length,reviewed:z,unreviewed:n.length-z,stale:0}},[n,L]),G=I.useMemo(()=>{const z=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,z.add(ue)}return z},[X]),re=G.size===h.size&&[...G].every(z=>h.has(z)),ne=()=>{d(re?new Set(["root"]):new Set(G))};return i?s.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:s.jsxs("div",{className:"px-12 py-6 font-sans",children:[s.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),s.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[s.jsx(Hh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>v(!0),onLearnMore:()=>k(!0),reviewCounts:g}),(b||p)&&s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{v(!1),x(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{v(!1),x(null)}})})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[s.jsx(Rh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:N}),s.jsx(zh,{onEditRule:x,onDeleteRule:j,refreshKey:N,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,memories:n,onViewRule:K})]}),s.jsx(Wh,{}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),s.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&s.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:s.jsx(Fh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),s.jsx("div",{className:"flex-1 min-w-0",children:n.length===0?s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[s.jsx(Xi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),s.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",s.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),s.jsxs("button",{onClick:()=>v(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[s.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):s.jsxs("div",{children:[u&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",s.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),s.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),s.jsx(Dh,{memories:m,onEdit:x,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx($i,{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:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"4 17 10 11 4 5"}),s.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),s.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),D&&!p&&(()=>{const z=n.find(H=>H.filePath===D.filePath)??D;return s.jsx(_h,{rule:z,changeInfo:q??void 0,isReviewed:L[z.filePath]??!1,onApprove:()=>{L[z.filePath]??!1?B(z.filePath):M(z.filePath,z.lastModified),_(null)},onEdit:()=>{x(z)},onDelete:()=>{j(z),_(null)},onClose:()=>_(null)})})(),P&&s.jsx(Vh,{onClose:()=>k(!1),onCreateNew:()=>{k(!1),v(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};