adminizer 5.0.0-build.2 → 5.0.0-build.21

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 (300) hide show
  1. package/assets/abnfDiagram-VCTEODGH-CkmsvdDi.js +1 -0
  2. package/assets/add-CESPH_aI.js +1 -0
  3. package/assets/add-group-CQ4Xm8Ru.js +1 -0
  4. package/assets/add-user-B-QNjR4B.js +1 -0
  5. package/assets/ai-assistant/agent.es.js +28362 -0
  6. package/assets/app-C5Ju5Zra.css +1 -0
  7. package/assets/app-Ca5yUSBv.js +138 -0
  8. package/assets/arc-B-Dt8YNl.js +1 -0
  9. package/assets/architectureDiagram-5GKGNRK7-Ca58kq-l.js +36 -0
  10. package/assets/asmcrypto-DZeQH0LC.js +1 -0
  11. package/assets/blockDiagram-NRAW4CY4-CuqE52IG.js +129 -0
  12. package/assets/c4Diagram-UCG6FXSJ-Cx8z-0Bw.js +38 -0
  13. package/assets/catalog-CkSbxvx0.js +6 -0
  14. package/assets/channel-C9z6Pi_j.js +1 -0
  15. package/assets/chunk-2Q5K7J3B-CXISVKTC.js +1 -0
  16. package/assets/chunk-5VM5RSS4-DYGeeVYe.js +15 -0
  17. package/assets/chunk-F27PBJKO-BeY-dbKj.js +1 -0
  18. package/assets/chunk-G27WJ6UU-DeX_eH7C.js +231 -0
  19. package/assets/chunk-JWPE2WC7-DaxI9q0u.js +1 -0
  20. package/assets/chunk-LCL6LL3I-B7PkaEz_.js +206 -0
  21. package/assets/chunk-POPQ4Y6H-lwu6ZpsN.js +1 -0
  22. package/assets/chunk-SVP7TREG-CVFllgl1.js +88 -0
  23. package/assets/chunk-XXDRQBXY-DDLN0rcg.js +1 -0
  24. package/assets/classDiagram-DTDB5LWJ-BKtCIC3B.js +1 -0
  25. package/assets/classDiagram-v2-JRS7N3AN-BKtCIC3B.js +1 -0
  26. package/assets/controls/ckeditor.es.js +9370 -9306
  27. package/assets/controls/handsontable.es.js +11971 -11938
  28. package/assets/controls/jsoneditor.es.js +13104 -13008
  29. package/assets/controls/leaflet.es.js +1023 -1004
  30. package/assets/controls/toast-ui.es.js +1843 -1834
  31. package/assets/cose-bilkent-JH36ORCC-CWRyUkhQ.js +1 -0
  32. package/assets/cynefin-OW5HDTMX-B1iLDXCC.js +166 -0
  33. package/assets/cynefinDiagram-5FMLGOSQ-DaXQHr3l.js +62 -0
  34. package/assets/cytoscape.esm-yzknjiTM.js +321 -0
  35. package/assets/dagre-3AP2YEHR-DFORa4Hz.js +4 -0
  36. package/assets/dashboard-Ssa1_Of3.js +3 -0
  37. package/assets/debounce-B3mXI_sx.js +1 -0
  38. package/assets/defaultLocale-DX6XiGOO.js +1 -0
  39. package/assets/diagram-S7CK7UJ4-CgP6KBo0.js +30 -0
  40. package/assets/diagram-UQ7AKVKN-oYfQe6w0.js +41 -0
  41. package/assets/diagram-VSXAHHWV-DfCU5wgt.js +3 -0
  42. package/assets/diagram-VX7I27RA-BITJVrNY.js +24 -0
  43. package/assets/diagram-Z3DM3KII-D8J9Ssjy.js +24 -0
  44. package/assets/docs-DHMt_Rq1.js +1 -0
  45. package/assets/ebnfDiagram-PWID7BFC-qpNmoYgx.js +1 -0
  46. package/assets/erDiagram-SSCWMZ5O-DDF-Y0zs.js +99 -0
  47. package/assets/flowDiagram-A5DVABFB-CjKVkR9T.js +168 -0
  48. package/assets/ganttDiagram-EL5Y4UJY-BXGQ53w6.js +292 -0
  49. package/assets/gitGraphDiagram-WWUBYQGX-BLMevdLh.js +106 -0
  50. package/assets/history-tBOo2gd5.js +1 -0
  51. package/assets/infoDiagram-RXCK75RN-BAnPdnyw.js +2 -0
  52. package/assets/init-Gi6I4Gst.js +1 -0
  53. package/assets/init-user-DrNUHa6r.js +1 -0
  54. package/assets/isObject-DL-BuaBl.js +1 -0
  55. package/assets/ishikawaDiagram-5VMMS53U-PnL0Z4Li.js +70 -0
  56. package/assets/journeyDiagram-EYS64GPL-CLcsCSwF.js +139 -0
  57. package/assets/kanban-definition-3QL26DDD-C2eU3uBE.js +89 -0
  58. package/assets/katex-HP8lGamR.js +257 -0
  59. package/assets/layout-BXoYdHdx.js +1 -0
  60. package/assets/linear-BSzrP0oP.js +1 -0
  61. package/assets/list-CLg6xeIK.js +4 -0
  62. package/assets/login-Ce7o3-o_.js +1 -0
  63. package/assets/manifest.json +834 -58
  64. package/assets/{media-manager-BDbpSSjH.js → media-manager-D7G1P3fz.js} +3 -3
  65. package/assets/mermaid.core-aKMJHeEk.js +310 -0
  66. package/assets/mindmap-definition-FBJOCRG2-Dzbz5ghA.js +96 -0
  67. package/assets/module-BsXph_pA.js +1 -0
  68. package/assets/notification-D-Zz1gF_.js +20 -0
  69. package/assets/ordinal-Cboi1Yqb.js +1 -0
  70. package/assets/pegDiagram-XKGWAZYB-BTdWkU0Y.js +1 -0
  71. package/assets/pieDiagram-E7YTZNPT-Dnw8-TB-.js +39 -0
  72. package/assets/quadrantDiagram-AXDQQJYC-CALzLlg9.js +7 -0
  73. package/assets/railroadDiagram-O6MQD6OU-CTA1vzcv.js +1 -0
  74. package/assets/register-CNnBkzej.js +1 -0
  75. package/assets/requirementDiagram-EFPCY7ZU-UX2CF5HA.js +84 -0
  76. package/assets/ru-CoNgAwFK.js +1 -0
  77. package/assets/sankeyDiagram-P5KCCOFB-4aPp3ATV.js +40 -0
  78. package/assets/sequenceDiagram-WJ2MYXX4--kltkwJw.js +162 -0
  79. package/assets/sizeCapture-X5ZJPWSS-Ca9-g5QY.js +1 -0
  80. package/assets/stateDiagram-HBIQ2CUA-Diaf5Q7I.js +1 -0
  81. package/assets/stateDiagram-v2-4QOOHH4V-C6FlRp7u.js +1 -0
  82. package/assets/swimlanes-XN3QIQJK-DhqX_myE.js +1 -0
  83. package/assets/swimlanesDiagram-VK2B7HYN-i_3LTEBk.js +8 -0
  84. package/assets/timeline-definition-24CTP7MA-CwkJQbhq.js +120 -0
  85. package/assets/toNumber-DZb-r9sy.js +1 -0
  86. package/assets/use-appearance-DC-DESKB.js +1 -0
  87. package/assets/user-filters-list-W47DTBp2.js +1 -0
  88. package/assets/vennDiagram-4TSXK5OY-BNM3_cVS.js +34 -0
  89. package/assets/wardleyDiagram-VM6X3IG4-BODb1NP8.js +78 -0
  90. package/assets/welcome-BeBm6NIi.js +1 -0
  91. package/assets/with-app-layout-B90DtzYC.js +31 -0
  92. package/assets/xychartDiagram-S5SC5T6Z-DthqEh3g.js +7 -0
  93. package/controllers/access-rights/permissionOptions.d.ts +2 -0
  94. package/controllers/access-rights/permissionOptions.js +23 -0
  95. package/controllers/add.js +1 -1
  96. package/controllers/addGroup.js +15 -6
  97. package/controllers/ai/AiAgentController.d.ts +66 -0
  98. package/controllers/ai/AiAgentController.js +435 -0
  99. package/controllers/ai/AiAssistantController.d.ts +0 -4
  100. package/controllers/ai/AiAssistantController.js +4 -78
  101. package/controllers/catalog/FrontendCatalogAdapter.d.ts +1 -1
  102. package/controllers/catalog/FrontentCatalogAdapter.d.ts +1 -1
  103. package/controllers/docs/index.d.ts +22 -0
  104. package/controllers/docs/index.js +126 -0
  105. package/controllers/edit.js +1 -1
  106. package/controllers/editGroup.js +15 -6
  107. package/controllers/feedback/feedbackController.d.ts +1 -1
  108. package/controllers/filter-fields/savedFilters.js +1 -1
  109. package/controllers/history-actions/HistoryController.d.ts +1 -1
  110. package/controllers/history-actions/HistoryController.js +6 -6
  111. package/controllers/list.js +1 -1
  112. package/controllers/login.js +1 -1
  113. package/controllers/media-manager/mediaManagerAdapter.d.ts +1 -1
  114. package/controllers/notifications/NotificationController.js +14 -8
  115. package/controllers/view.js +2 -2
  116. package/controllers/widgets/filterInfo.js +1 -1
  117. package/helpers/accessRightsHelper.d.ts +11 -4
  118. package/helpers/accessRightsHelper.js +82 -12
  119. package/helpers/assetVersionHelper.d.ts +14 -0
  120. package/helpers/assetVersionHelper.js +42 -0
  121. package/helpers/configHelper.d.ts +3 -3
  122. package/helpers/configHelper.js +20 -18
  123. package/helpers/controllerHelper.d.ts +3 -2
  124. package/helpers/controllerHelper.js +25 -15
  125. package/helpers/fieldsHelper.d.ts +2 -2
  126. package/helpers/fieldsHelper.js +3 -3
  127. package/helpers/filterDatetimeHelper.d.ts +1 -1
  128. package/helpers/inertiaActionsHelper.d.ts +3 -3
  129. package/helpers/inertiaActionsHelper.js +4 -5
  130. package/helpers/inertiaAddHelper.d.ts +5 -5
  131. package/helpers/inertiaAddHelper.js +7 -6
  132. package/helpers/inertiaGroupHelper.d.ts +3 -3
  133. package/helpers/inertiaGroupHelper.js +10 -2
  134. package/helpers/inertiaListHelper.d.ts +4 -4
  135. package/helpers/inertiaListHelper.js +7 -8
  136. package/helpers/inertiaMenuHelper.d.ts +2 -3
  137. package/helpers/inertiaMenuHelper.js +3 -26
  138. package/helpers/inertiaUserHelper.d.ts +3 -3
  139. package/helpers/menuHelper.d.ts +2 -2
  140. package/helpers/modelResourceHelper.d.ts +9 -0
  141. package/helpers/modelResourceHelper.js +43 -0
  142. package/helpers/navigationAccessHelper.d.ts +13 -0
  143. package/helpers/navigationAccessHelper.js +40 -0
  144. package/helpers/translationHelper.d.ts +2 -2
  145. package/index.d.ts +69 -58
  146. package/index.js +11 -0
  147. package/interfaces/adminpanelConfig.d.ts +18 -5
  148. package/interfaces/global.d.ts +6 -6
  149. package/interfaces/internalModelAccess.d.ts +1 -1
  150. package/interfaces/listQueryBuilder.d.ts +1 -1
  151. package/interfaces/types.d.ts +171 -2
  152. package/lib/Adminizer.d.ts +46 -26
  153. package/lib/Adminizer.js +37 -1
  154. package/lib/DataAccessor.d.ts +7 -6
  155. package/lib/DataAccessor.js +50 -48
  156. package/lib/MiddlewareManager.d.ts +1 -1
  157. package/lib/access-rights/AccessRightsHandler.d.ts +2 -2
  158. package/lib/admin-links/AdminLinkHandler.d.ts +72 -0
  159. package/lib/admin-links/AdminLinkHandler.js +175 -0
  160. package/lib/ai-assistant/AbstractAiConversationHistoryService.d.ts +39 -0
  161. package/lib/ai-assistant/AbstractAiConversationHistoryService.js +98 -0
  162. package/lib/ai-assistant/AbstractAiModelService.d.ts +140 -3
  163. package/lib/ai-assistant/AbstractAiModelService.js +154 -1
  164. package/lib/ai-assistant/AiAgentRunManager.d.ts +35 -0
  165. package/lib/ai-assistant/AiAgentRunManager.js +109 -0
  166. package/lib/ai-assistant/AiAssistantAgentSkillHandler.d.ts +58 -0
  167. package/lib/ai-assistant/AiAssistantAgentSkillHandler.js +87 -0
  168. package/lib/ai-assistant/AiAssistantHandler.d.ts +16 -5
  169. package/lib/ai-assistant/AiAssistantHandler.js +35 -1
  170. package/lib/ai-assistant/AiAssistantUiMethodHandler.d.ts +60 -0
  171. package/lib/ai-assistant/AiAssistantUiMethodHandler.js +138 -0
  172. package/lib/ai-assistant/builtinAgentSkills.d.ts +9 -0
  173. package/lib/ai-assistant/builtinAgentSkills.js +256 -0
  174. package/lib/ai-assistant/jsonSafe.d.ts +13 -0
  175. package/lib/ai-assistant/jsonSafe.js +81 -0
  176. package/lib/app-manager/AdminizerApp.d.ts +40 -11
  177. package/lib/app-manager/AppManager.d.ts +2 -2
  178. package/lib/app-manager/AppManager.js +54 -50
  179. package/lib/app-manager/AssetHandler.d.ts +2 -2
  180. package/lib/app-manager/ConfigLayerHandler.d.ts +2 -2
  181. package/lib/app-manager/ControllerHandler.d.ts +2 -2
  182. package/lib/catalog/AbstractCatalog.d.ts +1 -1
  183. package/lib/catalog/CatalogHandler.d.ts +1 -1
  184. package/lib/controls/ControlsHandler.d.ts +1 -1
  185. package/lib/controls/codeEditor/MonacoEditor.d.ts +1 -1
  186. package/lib/controls/geojsoneditor/GeoEditor.d.ts +1 -1
  187. package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -1
  188. package/lib/controls/markdown/ToastUiEditor.d.ts +1 -1
  189. package/lib/controls/table/Handsontable.d.ts +1 -1
  190. package/lib/controls/wysiwyg/CKeditor.d.ts +1 -1
  191. package/lib/docs/AbstractDocumentation.d.ts +100 -0
  192. package/lib/docs/AbstractDocumentation.js +108 -0
  193. package/lib/docs/DocumentationHandler.d.ts +100 -0
  194. package/lib/docs/DocumentationHandler.js +198 -0
  195. package/lib/docs/FileDocumentation.d.ts +47 -0
  196. package/lib/docs/FileDocumentation.js +189 -0
  197. package/lib/docs/docsAgentSkills.d.ts +10 -0
  198. package/lib/docs/docsAgentSkills.js +93 -0
  199. package/lib/feedback/FeedbackHandler.d.ts +2 -2
  200. package/lib/filters/ConditionValidator.d.ts +1 -1
  201. package/lib/filters/FilterCustomFieldHandler.d.ts +2 -2
  202. package/lib/filters/FilterService.d.ts +4 -4
  203. package/lib/filters/FilterService.js +4 -3
  204. package/lib/filters/index.d.ts +6 -6
  205. package/lib/history-actions/AbstractHistoryAdapter.d.ts +6 -6
  206. package/lib/history-actions/AbstractHistoryAdapter.js +11 -9
  207. package/lib/history-actions/DefaultHistoryAdapter.d.ts +4 -4
  208. package/lib/history-actions/HistoryHandler.d.ts +1 -1
  209. package/lib/list-query-builder/ListQueryBuilder.d.ts +7 -7
  210. package/lib/media-manager/AbstractMediaManager.d.ts +2 -2
  211. package/lib/media-manager/MediaManagerHandler.d.ts +1 -1
  212. package/lib/media-manager/Thumb.d.ts +1 -1
  213. package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -5
  214. package/lib/model/AbstractModel.d.ts +11 -4
  215. package/lib/model/InternalModelAccessFactory.d.ts +2 -2
  216. package/lib/model/ModelHandler.d.ts +50 -5
  217. package/lib/model/ModelHandler.js +107 -8
  218. package/lib/model/adapter/sequelize.d.ts +7 -5
  219. package/lib/model/adapter/sequelize.js +79 -46
  220. package/lib/model/adapter/typeorm.d.ts +2 -2
  221. package/lib/model/adapter/typeorm.js +1 -1
  222. package/lib/model/internalModelRepository.d.ts +2 -2
  223. package/lib/notifications/AbstractNotificationService.d.ts +4 -4
  224. package/lib/notifications/GeneralNotificationService.d.ts +2 -2
  225. package/lib/notifications/GeneralNotificationService.js +6 -5
  226. package/lib/notifications/NotificationHandler.d.ts +2 -2
  227. package/lib/notifications/SystemNotificationService.d.ts +2 -2
  228. package/lib/notifications/SystemNotificationService.js +1 -1
  229. package/lib/requestProcessor.d.ts +1 -1
  230. package/lib/ui-i18n/uiTranslationKeys.d.ts +2 -1
  231. package/lib/ui-i18n/uiTranslationKeys.js +42 -1
  232. package/lib/widgets/abstractAction.d.ts +1 -1
  233. package/lib/widgets/abstractCustom.d.ts +2 -2
  234. package/lib/widgets/abstractInfo.d.ts +1 -1
  235. package/lib/widgets/abstractLink.d.ts +2 -2
  236. package/lib/widgets/abstractSwitch.d.ts +1 -1
  237. package/lib/widgets/abstractWidgetBase.d.ts +1 -1
  238. package/lib/widgets/widgetHandler.d.ts +9 -9
  239. package/lib/widgets/widgetHandler.js +5 -1
  240. package/models/Filter.d.ts +1 -1
  241. package/models/FilterColumn.d.ts +1 -1
  242. package/models/Group.d.ts +3 -2
  243. package/models/HistoryActions.d.ts +1 -1
  244. package/models/MediaManagerAP.d.ts +2 -2
  245. package/models/MediaManagerAssociationsAP.d.ts +1 -1
  246. package/models/MediaManagerMetaAP.d.ts +1 -1
  247. package/models/User.d.ts +2 -2
  248. package/models/UserNotification.d.ts +1 -1
  249. package/package.json +29 -20
  250. package/policies/authPolicies.js +6 -6
  251. package/policies/permissionResolvers.d.ts +1 -0
  252. package/policies/permissionResolvers.js +3 -0
  253. package/services/FeedService.d.ts +3 -3
  254. package/system/Router.d.ts +1 -1
  255. package/system/Router.js +27 -1
  256. package/system/bindAccessRights.d.ts +1 -1
  257. package/system/bindAccessRights.js +2 -3
  258. package/system/bindAuthorization.d.ts +1 -1
  259. package/system/bindControls.d.ts +1 -1
  260. package/system/bindCors.d.ts +1 -1
  261. package/system/bindCustomFilterHandlers.d.ts +1 -1
  262. package/system/bindDashboardWidgets.d.ts +1 -1
  263. package/system/bindDev.d.ts +1 -1
  264. package/system/bindDocs.d.ts +13 -0
  265. package/system/bindDocs.js +77 -0
  266. package/system/bindHistory.d.ts +1 -1
  267. package/system/bindInertia.d.ts +1 -1
  268. package/system/bindInertia.js +23 -1
  269. package/system/bindMediaManager.d.ts +1 -1
  270. package/system/bindNotifications.d.ts +1 -1
  271. package/system/bindReqFunctions.d.ts +1 -1
  272. package/system/bindTranslations.d.ts +1 -1
  273. package/system/buildInternalModelAccess.d.ts +3 -3
  274. package/system/buildInternalModelAccess.js +5 -2
  275. package/system/defaults.d.ts +1 -1
  276. package/system/routePolicies.d.ts +1 -1
  277. package/system/systemModelContracts.d.ts +1 -1
  278. package/system/systemModelContracts.js +11 -7
  279. package/system/validateSystemModels.d.ts +1 -1
  280. package/system/validateSystemModels.js +29 -9
  281. package/assets/add-group-BdHFzKng.js +0 -1
  282. package/assets/add-p6yGCoZ7.js +0 -1
  283. package/assets/add-user-CDspCLu4.js +0 -1
  284. package/assets/app-DNXiApCk.css +0 -1
  285. package/assets/app-layout-DCr_-JY3.js +0 -1
  286. package/assets/app.js +0 -138
  287. package/assets/catalog-XN-_p9TB.js +0 -6
  288. package/assets/dashboard-CHZO2QFY.js +0 -3
  289. package/assets/debounce-BMmXVQ06.js +0 -1
  290. package/assets/history-CQd0FojQ.js +0 -1
  291. package/assets/init-user-8aUohVDq.js +0 -1
  292. package/assets/list-PHWgTHsg.js +0 -4
  293. package/assets/login-CO4laf6m.js +0 -1
  294. package/assets/module-DVyQtIxm.js +0 -1
  295. package/assets/notification-B87XG8nQ.js +0 -20
  296. package/assets/register-DBYIMXGQ.js +0 -1
  297. package/assets/ru-rYKdQbWF.js +0 -1
  298. package/assets/use-appearance-_EbbjHTh.js +0 -1
  299. package/assets/user-filters-list-BRzDbPkx.js +0 -1
  300. package/assets/welcome-DiXmrTgc.js +0 -1
@@ -0,0 +1,31 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-aKMJHeEk.js","./app-Ca5yUSBv.js","./app-C5Ju5Zra.css","./isObject-DL-BuaBl.js"])))=>i.map(i=>d[i]);
2
+ import{r as N,j as h,bX as ml,c as X,u as ye,bY as Fr,bZ as gl,f as kt,b_ as xl,b$ as et,c0 as yl,c1 as He,c2 as Xt,c3 as Ue,c4 as kl,c5 as Yt,c6 as Kt,c7 as Qt,p as me,a as st,b1 as bl,bW as wl,c8 as Sl,bo as Cl,b2 as vl,b3 as jl,b4 as El,c9 as Nl,b5 as Al,b6 as Il,L as Pt,I as Tl,be as Pl,d as le,ca as zl,X as Mr,bd as Dl,o as ot,q as ee,cb as Ll,cc as Fl,cd as Ml,ce as _l,cf as Rl,cg as _r,ch as Ol,ci as Bl,cj as $l,ck as Hl,cl as On,cm as Bn,cn as $n,co as Ul,cp as ql,cq as Vl,cr as Wl,cs as Jl,ct as Gl,cu as Xl,cv as Yl,cw as Kl,cx as Ql,cy as Zl,aE as ea,aF as Rr,bk as Or,cz as ta,cA as na,cB as ra,aA as Br,aB as $r,aD as Hr,H as ia,cC as la,cD as aa,cE as sa,bn as oa,cF as ua,bj as ca,N as hn,O as pn,au as fa,Q as dn,b as mn,e as Ur,cG as qr,az as Vr,bL as ha,cH as pa,Z as da,P as ma,cI as ga,cJ as xa,cK as ya,bA as ka,cL as ba,cM as wa,av as Sa,aw as Ca,ax as Hn,ay as Un,F as va,B as ja,cN as Ea,cO as Na,cP as Aa,cQ as Ia,i as Ta,k as Pa,l as za,m as Da,n as La,cR as Fa}from"./app-Ca5yUSBv.js";import{u as Ma}from"./use-appearance-DC-DESKB.js";const _a=N.memo(({children:e,variant:n="header"})=>{const[t,r]=N.useState(()=>typeof window<"u"?localStorage.getItem("sidebar")!=="false":!0),i=a=>{r(a),typeof window<"u"&&localStorage.setItem("sidebar",String(a))};return n==="header"?h.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e}):h.jsx(ml,{className:"h-svh overflow-hidden",defaultOpen:t,open:t,onOpenChange:i,children:e})});function Q({name:e,className:n,style:t}){return h.jsx("span",{className:X("material-icons-outlined",n),style:t,children:e})}function Ra({items:e=[]}){const n=ye(),t=p=>p.split("?")[0].replace(/\/$/,""),r=e.reduce((p,m)=>{const b=m.section||"Platform";return p[b]||(p[b]=[]),p[b].push(m),p},{}),i=Object.keys(r).sort((p,m)=>p==="Platform"?-1:m==="Platform"||p==="System"?1:m==="System"?-1:p.localeCompare(m)),[a,l]=N.useState(()=>{const p={};return e.forEach(m=>{const b=m.section||"Platform";p[b]=!1}),p}),[s,u]=N.useState(()=>{const p={};return e.forEach(m=>{const b=m.section||"Platform";p[b]=!1}),p}),o=p=>{const m=t(n.url),b=t(p);return m===b||m.startsWith(`${b}/`)},f=N.useRef(a),c=N.useRef(s);f.current=a,c.current=s;const d=({item:p})=>p.actions?.length>0?h.jsx(yl,{asChild:!0,defaultOpen:o(p.link),className:"group/collapsible",children:h.jsxs(He,{children:[h.jsx(Xt,{asChild:!0,children:h.jsxs(Ue,{tooltip:p.title,children:[h.jsx(Q,{name:p.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:p.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),h.jsx(kl,{children:h.jsx(Yt,{children:p.actions?.map(m=>h.jsx(Kt,{children:h.jsx(Qt,{asChild:!0,isActive:o(m.link),children:m.type==="blank"?h.jsxs("a",{href:m.link,target:"_blank",rel:"noopener noreferrer",children:[m.icon&&h.jsx(Q,{name:m.icon,className:"!text-[18px]"}),h.jsx("span",{children:m.title})]}):h.jsxs(me,{href:m.link,children:[m.icon&&h.jsx(Q,{name:m.icon,className:"!text-[18px]"}),h.jsx("span",{children:m.title})]})})},m.id))})})]})},p.title):h.jsx(He,{children:h.jsx(Ue,{asChild:!0,isActive:o(p.link),tooltip:{children:p.title},children:p.type==="blank"?h.jsxs("a",{href:p.link,target:"_blank",rel:"noopener noreferrer",children:[p.icon&&h.jsx(Q,{name:p.icon,className:"!text-[18px]"}),h.jsx("span",{children:p.title})]}):h.jsxs(me,{href:p.link,children:[p.icon&&h.jsx(Q,{name:p.icon,className:"!text-[18px]"}),h.jsx("span",{children:p.title})]})})},p.title);return h.jsx(h.Fragment,{children:i.map(p=>{const m=r[p],b=m.some(k=>k.actions?.length>0?k.actions.some(v=>o(v.link)):o(k.link)),S=s[p]?a[p]:b;return h.jsxs(Fr,{className:"px-2 py-0",children:[h.jsx(gl,{asChild:!0,className:"cursor-pointer",onClick:()=>{const j=!(c.current[p]?f.current[p]:b);u(L=>({...L,[p]:!0})),l(L=>({...L,[p]:j}))},children:h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(kt,{className:`transform transition-transform duration-200 ${S?"rotate-90":""}`}),h.jsx("span",{children:p})]})}),S&&h.jsx(xl,{children:h.jsx(et,{children:m.map(k=>h.jsx(d,{item:k},k.id||k.title))})})]},p)})})}const Oa=5*1024*1024,Ba=(e,n)=>{const t=e?.response?.data;if(!t)return n;if(typeof t=="string")try{const r=JSON.parse(t);return r.error??r.message??n}catch{return t||n}if(typeof t=="object"){const r=t;return r.error??r.message??n}return n},Wr=N.memo(({routePrefix:e,triggerLabel:n,placeholder:t,t:r,onClose:i})=>{const[a,l]=N.useState(""),[s,u]=N.useState(""),[o,f]=N.useState([]),[c,d]=N.useState({}),[p,m]=N.useState(!1),[b,S]=N.useState(!1),k=N.useRef(null),v=I=>{if(!I)return;const w={},_=[];Array.from(I).forEach(R=>{R.size>Oa?w[R.name]=r("File size exceeds the 5 MB limit"):_.push(R)}),f(R=>[...R,..._]),Object.keys(w).length&&d(R=>({...R,...w}))},j=I=>f(w=>w.filter((_,R)=>R!==I)),L=async I=>{if(I.preventDefault(),!a.trim()){d({title:r("Title is required")});return}m(!0),d({});const w=new FormData;w.append("title",a.trim()),w.append("description",s.trim()),o.forEach(_=>w.append("files",_));try{await ee.post(`${e}/api/feedback`,w),S(!0)}catch(_){const R=Ba(_,r("Internal server error"));d({_global:R}),m(!1)}};return N.useEffect(()=>{if(!b)return;const I=setTimeout(i,2e3);return()=>clearTimeout(I)},[b,i]),b?h.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[h.jsx(Nl,{size:48,className:"text-green-500 dark:text-green-400"}),h.jsx("p",{className:"text-base font-medium",children:r("Feedback sent successfully")})]}):h.jsxs(h.Fragment,{children:[h.jsxs(Al,{className:"mb-4",children:[h.jsx(Il,{children:n??r("Feedback")}),t&&h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),h.jsxs("form",{onSubmit:L,className:"space-y-5",noValidate:!0,children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Pt,{htmlFor:"fb-title",children:r("Title")}),h.jsx(Tl,{id:"fb-title",value:a,onChange:I=>l(I.target.value),disabled:p,placeholder:r("Title"),className:c.title?"border-destructive":""}),c.title&&h.jsx("p",{className:"text-xs text-destructive",children:c.title})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Pt,{htmlFor:"fb-desc",children:r("Description")}),h.jsx(Pl,{id:"fb-desc",value:s,onChange:I=>u(I.target.value),disabled:p,placeholder:r("Description"),rows:5,className:"resize-none"})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Pt,{children:r("Attach files")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(le,{type:"button",variant:"outline",size:"sm",onClick:()=>k.current?.click(),disabled:p,children:[h.jsx(zl,{size:14,className:"mr-1"}),r("Attach files")]}),h.jsx("span",{className:"text-xs text-muted-foreground",children:r("Max 5 MB per file")})]}),h.jsx("input",{ref:k,type:"file",multiple:!0,className:"hidden",onChange:I=>v(I.target.files),disabled:p}),o.length>0&&h.jsx("ul",{className:"mt-2 space-y-1",children:o.map((I,w)=>h.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[h.jsx("span",{className:"truncate max-w-[340px]",children:I.name}),h.jsx("button",{type:"button",onClick:()=>j(w),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":r("Remove file"),disabled:p,children:h.jsx(Mr,{size:13})})]},w))}),Object.entries(c).filter(([I])=>I!=="title"&&I!=="_global").map(([I,w])=>h.jsx("p",{className:"text-xs text-destructive",children:w},I))]}),c._global&&h.jsx("p",{className:"text-xs text-destructive",children:c._global}),h.jsx(Dl,{children:h.jsx(le,{type:"submit",disabled:p,children:p?h.jsxs(h.Fragment,{children:[h.jsx(ot,{size:14,className:"mr-1.5 animate-spin"}),r("Sending...")]}):r("Send")})})]})]})});Wr.displayName="FeedbackForm";function $a(){const e=ye(),{t:n}=st(),t=e.props.routePrefix??window.routePrefix??"",r=e.props.feedbackTriggerLabel??null,i=e.props.feedbackPlaceholder??null,[a,l]=N.useState(!1),[s,u]=N.useState(0),o=N.useCallback(()=>l(!1),[]),f=N.useCallback(c=>{l(c),c||u(d=>d+1)},[]);return h.jsxs(bl,{open:a,onOpenChange:f,children:[h.jsx(wl,{asChild:!0,children:h.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":r??n("Send feedback"),children:[h.jsx(Sl,{size:13}),r??n("Send feedback")]})}),Cl.createPortal(h.jsx(vl,{}),document.body),h.jsx(jl,{children:h.jsx(El,{children:h.jsx(Wr,{routePrefix:t,triggerLabel:r,placeholder:i,t:n,onClose:o},s)})})]})}function Ha(){const e=ye();return h.jsxs(Ll,{collapsible:"icon",variant:"inset",children:[h.jsx(Fl,{children:h.jsx(et,{children:h.jsxs(He,{children:[h.jsx(Ml,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:h.jsxs(_l,{children:[h.jsx(Rl,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:h.jsx(Ue,{asChild:!0,children:h.jsx(le,{variant:"ghost",asChild:!0,className:`w-full ${e.props.section?"":"pointer-events-none"}`,children:h.jsxs("div",{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:e.props.brand}),e.props.section&&h.jsx(_r,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),e.props.section&&h.jsx(Ol,{side:"right",className:"z-[1003]",children:e.props.section.map(n=>h.jsx("div",{children:n.subItems?h.jsxs(Bl,{children:[h.jsxs($l,{className:"flex gap-2 items-center cursor-pointer",children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}),h.jsx(Hl,{children:n.subItems.map(t=>h.jsx(On,{children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id):h.jsxs(me,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id)},t.id))})]}):h.jsx(On,{children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(me,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})]})}),h.jsx(Fr,{className:"px-2 py-0 block md:hidden",children:h.jsx(et,{children:h.jsx(Bn,{asChild:!0,className:"group/collapsible",children:h.jsxs(He,{children:[h.jsx(Xt,{asChild:!0,children:h.jsxs(Ue,{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.props.brand}),e.props.section&&h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),e.props.section&&h.jsx($n,{children:h.jsx(Yt,{children:e.props.section&&e.props.section.map(n=>n.subItems?h.jsx(et,{children:h.jsx(Bn,{asChild:!0,className:"group/collapsible-sub",children:h.jsxs(He,{children:[h.jsx(Xt,{asChild:!0,children:h.jsxs(Ue,{children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),h.jsx($n,{children:h.jsx(Yt,{children:n.subItems.map(t=>h.jsx(Kt,{children:h.jsx(Qt,{asChild:!0,children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]}):h.jsxs(me,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]})})},t.id))})})]})})},n.id):h.jsx(Kt,{children:h.jsx(Qt,{asChild:!0,children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(me,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})})]})})})})]},e.props.brand)})}),h.jsx(Ul,{children:h.jsx(Ra,{items:e.props.menu})}),h.jsx(ql,{children:h.jsxs("div",{className:"flex flex-col items-center",children:[e.props.version&&(()=>{const n=e.props.version,t=n.text||"5.0.0",r=new Date("2026-08-21T16:15:20.410Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),i=n.text?`v.${t}`:`v.${t} · ${r}`,a="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return n.link?h.jsx("a",{href:n.link,target:"_blank",rel:"noreferrer",title:n.hint??void 0,className:a,children:i}):h.jsx("span",{title:n.hint??void 0,className:a,children:i})})(),e.props.showFeedback&&h.jsx($a,{})]})})]})}function Ua({breadcrumbs:e}){return h.jsx(h.Fragment,{children:e.length>0&&h.jsx(Vl,{children:h.jsx(Wl,{children:e.map((n,t)=>{const r=t===e.length-1;return h.jsxs(N.Fragment,{children:[h.jsx(Jl,{children:r?h.jsx(Gl,{children:n.title}):h.jsx(Xl,{asChild:!0,children:h.jsx(me,{href:n.href,children:n.title})})}),!r&&h.jsx(Yl,{})]},t)})})})})}function qa(){return N.useCallback(n=>{const t=n.trim().split(" ");if(t.length===0)return"";if(t.length===1)return t[0].charAt(0).toUpperCase();const r=t[0].charAt(0),i=t[t.length-1].charAt(0);return`${r}${i}`.toUpperCase()},[])}function Jr({user:e,showEmail:n=!1}){const t=qa();return h.jsxs(h.Fragment,{children:[h.jsxs(Kl,{className:"h-8 w-8 overflow-hidden rounded-full",children:[h.jsx(Ql,{src:e.avatar,alt:e.login}),h.jsx(Zl,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:t(e.login)})]}),h.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[h.jsx("span",{className:"truncate font-medium",children:e.login}),n&&h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:e.email})]})]})}function Va(){return N.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function Wa({user:e,logout:n,logoutBtn:t}){const r=Va();return h.jsxs(h.Fragment,{children:[h.jsx(ea,{className:"p-0 font-normal",children:h.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:h.jsx(Jr,{user:e,showEmail:!0})})}),h.jsx(Rr,{}),h.jsx(Or,{asChild:!0,children:h.jsxs(me,{className:"block w-full cursor-pointer",method:"get",href:n,as:"button",onClick:r,children:[h.jsx(ta,{className:"mr-2"}),t]})})]})}function Ja(){const{auth:e,logout:n,logoutBtn:t}=ye().props,{state:r}=na(),i=ra();return h.jsx(et,{children:h.jsx(He,{children:h.jsxs(Br,{children:[h.jsx($r,{asChild:!0,children:h.jsxs(Ue,{size:"lg",className:"text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group focus-visible:ring-0 cursor-pointer",children:[h.jsx(Jr,{user:e.user}),h.jsx(_r,{className:"ml-auto size-4"})]})}),h.jsx(Hr,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg z-[1002]",align:"end",side:i?"bottom":r==="collapsed"?"left":"bottom",children:h.jsx(Wa,{user:e.user,logout:n,logoutBtn:t})})]})})})}function Ga(){const{appearance:e,updateAppearance:n}=Ma(),t={light:"dark",dark:"system",system:"light"},r={light:sa,dark:aa,system:la},i=()=>n(t[e]),a=r[e];return h.jsx(le,{variant:"ghost",size:"icon",onClick:i,className:"shrink-0",children:h.jsx(ia,{iconNode:a})})}const Gr=N.createContext(void 0),Xa=({children:e})=>{const[n,t]=N.useState([]),[r,i]=N.useState([]),[a,l]=N.useState([]),[s,u]=N.useState(!1),[o,f]=N.useState(null),[c,d]=N.useState(""),p=ye(),{t:m}=st(),b=oa.useMemo(()=>({"Make read":m("Make read"),"View All":m("View All"),Search:m("Search"),"Make all read":m("Make all read"),Title:m("Title"),Message:m("Message"),Date:m("Date"),Diff:m("Diff"),"No notifications":m("No notifications"),"No notifications found":m("No notifications found"),"The end of the list has been reached":m("The end of the list has been reached")}),[m]),S=[...r,...a],k=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api`,{params:{unreadOnly:!0,limit:4}});t(y.data)}catch(y){console.error("Error fetching bell notifications:",y)}},v=async()=>{await k()},j=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api/get-classes`);y.data&&(f(y.data.activeServices),d(y.data.initTab))}catch(y){console.error("Error fetching tabs:",y)}},L=async(y,A)=>{try{if(!y){await I(A);return}const P=await ee.postJson(`${window.routePrefix}/notifications/api/search`,{s:y,notificationClass:A});l(P.data)}catch(P){console.error("Error searching notifications:",P)}},I=async y=>{u(!0);try{const A=`${window.routePrefix}/notifications/api/${y}`,P=await ee.getJson(A,{params:{limit:20,skip:0,unreadOnly:!1}});return i([]),l(P.data),P.data}catch(A){return console.error("Error fetching all notifications:",A),[]}finally{u(!1)}},w=async(y,A)=>{try{const P=`${window.routePrefix}/notifications/api/${y}`,B=await ee.getJson(P,{params:{limit:20,skip:A,unreadOnly:!1}});return l(F=>[...F,...B.data]),B.data}catch(P){return console.error("Error paginating notifications:",P),[]}};N.useEffect(()=>{if(!p.props.notifications)return;k();const y=new EventSource(`${window.routePrefix}/notifications/api/stream`);return y.addEventListener("connected",A=>{j()}),y.addEventListener("notification",A=>{const P=JSON.parse(A.data);i(B=>[P,...B]),t(B=>[P,...B].slice(0,4))}),y.onerror=()=>{console.error("SSE connection error")},()=>y.close()},[]);const _=async(y,A)=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/${y}/${A}/read`,{}),i(P=>P.map(B=>B.id===A?{...B,read:!0}:B)),l(P=>P.map(B=>B.id===A?{...B,read:!0}:B)),t([])}catch(P){console.error("Error marking as read:",P)}},R=async()=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/read-all`,{}),i(y=>y.map(A=>({...A,read:!0}))),l(y=>y.map(A=>({...A,read:!0}))),await k()}catch(y){console.error("Error marking all as read:",y)}},D=n.filter(y=>!y.read).length;return h.jsx(Gr.Provider,{value:{bellNotifications:n,allNotifications:S,unreadCount:D,getTabs:j,tabs:o,initTab:c,search:L,markAsRead:_,markAllAsRead:R,messages:b,fetchAllNotifications:I,paginateNotifications:w,loading:s,refreshBellNotifications:v},children:e})},Xr=()=>{const e=N.useContext(Gr);if(e===void 0)throw new Error("useNotifications must be used within a NotificationProvider");return e};function Ya(){const{bellNotifications:e,markAsRead:n,unreadCount:t,refreshBellNotifications:r,messages:i}=Xr(),[a,l]=N.useState(!1),s=async(o,f)=>{l(!0);try{await n(o,f),await r()}catch(c){console.error("Error marking as read:",c)}finally{l(!1)}},u=o=>{const f=new Date,c=new Date(o),d=f.getTime()-c.getTime(),p=Math.floor(d/1e3),m=new Intl.RelativeTimeFormat("en",{numeric:"auto"});if(p<60)return m.format(-p,"second");const b=Math.floor(p/60);if(b<60)return m.format(-b,"minute");const S=Math.floor(b/60);if(S<24)return m.format(-S,"hour");const k=Math.floor(S/24);if(k<30)return m.format(-k,"day");const v=Math.floor(k/30);if(v<12)return m.format(-v,"month");const j=Math.floor(v/12);return m.format(-j,"year")};return h.jsxs(Br,{children:[h.jsx($r,{asChild:!0,className:"cursor-pointer data-[state=open]:bg-sidebar-accent",children:h.jsxs(le,{variant:"ghost",className:"relative",children:[h.jsx(ua,{}),t>0&&h.jsx("div",{className:"absolute top-1.5 right-1.5 size-1.5 rounded-full bg-destructive"})]})}),h.jsxs(Hr,{className:"z-[1002] p-2",align:"end",onCloseAutoFocus:o=>o.preventDefault(),children:[h.jsx(ca,{className:`${a?"opacity-50 pointer-events-none":""}`,children:e.length===0?h.jsx("div",{className:"p-4 text-center text-muted-foreground",children:i["No notifications"]}):e.map(o=>h.jsxs("div",{children:[h.jsx(Or,{asChild:!0,className:"cursor-pointer",onSelect:f=>{f.preventDefault(),mn.visit(`${window.routePrefix}/notifications?type=${o.notificationClass}`)},children:h.jsxs("div",{className:"grid grid-cols-[32px_250px] grid-rows-[auto_1fr] items-start gap-x-4 gap-y-2",children:[o.icon?h.jsx(Q,{name:o.icon.icon,style:{color:o.icon.iconColor},className:"!text-[32px]"}):h.jsx("div",{}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"font-medium",children:o.title}),h.jsx("span",{className:"truncate",children:o.message})]}),h.jsxs("div",{className:"col-start-2 flex justify-between flex-nowrap items-center",children:[h.jsx("div",{className:"flex flex-nowrap gap-2 items-center",children:h.jsx("div",{children:u(o.createdAt)})}),h.jsxs(hn,{children:[h.jsx(pn,{asChild:!0,children:h.jsx(le,{variant:"ghost",size:"icon",className:"size-4",onClick:f=>{f.stopPropagation(),s(o.notificationClass,o.id)},children:h.jsx(fa,{className:"text-primary"})})}),h.jsx(dn,{side:"left",className:"z-[1003]",children:h.jsx("p",{children:i["Make read"]})})]})]})]})}),h.jsx(Rr,{})]},o.id))}),h.jsx(le,{variant:"secondary",asChild:!0,children:h.jsxs(me,{href:`${window.routePrefix}/notifications`,className:`w-full ${a?"opacity-50 pointer-events-none":""}`,children:[i["View All"],a&&h.jsx(ot,{className:"h-4 w-4 animate-spin"})]})})]})]})}const Yr="adminizer.aiAssistant.state",Ka=()=>{if(!(typeof window>"u")){try{const e=window.localStorage.getItem(Yr);if(e){const n=JSON.parse(e);if(typeof n.isOpen=="boolean")return{isOpen:n.isOpen,activeModel:typeof n.activeModel=="string"?n.activeModel:void 0}}}catch{}return window.__adminizerAiAssistantState__??void 0}},Qa=e=>{if(!(typeof window>"u")){window.__adminizerAiAssistantState__=e;try{window.localStorage.setItem(Yr,JSON.stringify(e))}catch{}}},Kr=N.createContext(void 0),Za=({children:e})=>{const t=ye().props.aiAssistant,r=N.useMemo(()=>Ka(),[]),[i,a]=N.useState(()=>r?.isOpen??!1),[l,s]=N.useState([]),[u,o]=N.useState(()=>r?.activeModel??t?.defaultModel??void 0),[f,c]=N.useState(!1),[d,p]=N.useState(null),m=t?.enabled??!1,b=N.useCallback(async()=>{if(m)try{c(!0);const{data:I}=await ee.getJson(`${window.routePrefix}/api/ai-assistant/models`);s(I),o(w=>w&&I.some(R=>R.id===w)?w:t?.defaultModel&&I.some(R=>R.id===t.defaultModel)?t.defaultModel:I[0]?.id)}catch(I){console.error("Failed to load AI assistant models",I),p("Unable to load AI assistant models")}finally{c(!1)}},[t?.defaultModel,m]);N.useEffect(()=>{m&&b()},[b,m]);const S=N.useCallback(I=>{o(I)},[]),k=N.useCallback(()=>a(!0),[]),v=N.useCallback(()=>a(!1),[]),j=N.useCallback(()=>a(I=>!I),[]);N.useEffect(()=>{m||a(!1)},[m]),N.useEffect(()=>{Qa({isOpen:i,activeModel:u})},[u,i]);const L=N.useMemo(()=>({isEnabled:m,isOpen:i,openChat:k,closeChat:v,toggleChat:j,models:l,activeModel:u,setActiveModel:S,loading:f,error:d}),[u,v,d,m,i,f,l,k,S,j]);return h.jsx(Kr.Provider,{value:L,children:e})},jt=()=>{const e=N.useContext(Kr);if(!e)throw new Error("useAiAssistant must be used within an AiAssistantProvider");return e};function es(){const{isEnabled:e,isOpen:n,toggleChat:t,models:r,loading:i}=jt();if(!e)return null;const a=r.length>0;return h.jsx(h.Fragment,{children:h.jsxs(hn,{children:[h.jsx(pn,{asChild:!0,children:h.jsx(le,{variant:"ghost",className:qr("relative",{"text-primary":n}),onClick:t,"aria-expanded":n,"aria-haspopup":"true","aria-controls":"ai-assistant-panel",disabled:!a&&i,children:i&&!a?h.jsx(ot,{className:"size-4 animate-spin"}):h.jsx(Ur,{className:"size-4"})})}),h.jsx(dn,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:"AI assistant"})})]})})}function Qr({fields:e,title:n,loading:t=!1,className:r}){const{t:i}=st();return h.jsxs("div",{className:X("overflow-hidden rounded-xl border",r),children:[n&&h.jsx("div",{className:"bg-muted/50 border-b px-3 py-1.5 text-sm font-medium",children:n}),t||!e?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("Loading...")}):e.length===0?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("No fields to display")}):h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"bg-muted/30 text-muted-foreground",children:[h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Field")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Type")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Required")})]})}),h.jsx("tbody",{children:e.map(a=>h.jsxs("tr",{className:"border-t",children:[h.jsxs("td",{className:"px-3 py-1.5",children:[h.jsx("span",{className:"font-medium",children:a.title||a.name}),a.title&&a.title!==a.name&&h.jsx("span",{className:"text-muted-foreground ms-2 font-mono text-xs",children:a.name})]}),h.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:a.type}),h.jsx("td",{className:"px-3 py-1.5",children:a.required?i("Yes"):i("No")})]},a.name))})]})]})}function ts(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ns=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,is={};function qn(e,n){return(is.jsx?rs:ns).test(e)}const ls=/[ \t\n\f\r]/g;function as(e){return typeof e=="object"?e.type==="text"?Vn(e.value):!1:Vn(e)}function Vn(e){return e.replace(ls,"")===""}class ut{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ut.prototype.normal={};ut.prototype.property={};ut.prototype.space=void 0;function Zr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ut(t,r,n)}function Zt(e){return e.toLowerCase()}class ae{constructor(n,t){this.attribute=t,this.property=n}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let ss=0;const O=Fe(),Y=Fe(),en=Fe(),E=Fe(),J=Fe(),De=Fe(),oe=Fe();function Fe(){return 2**++ss}const tn=Object.freeze(Object.defineProperty({__proto__:null,boolean:O,booleanish:Y,commaOrSpaceSeparated:oe,commaSeparated:De,number:E,overloadedBoolean:en,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),zt=Object.keys(tn);class gn extends ae{constructor(n,t,r,i){let a=-1;if(super(n,t),Wn(this,"space",i),typeof r=="number")for(;++a<zt.length;){const l=zt[a];Wn(this,zt[a],(r&tn[l])===tn[l])}}}gn.prototype.defined=!0;function Wn(e,n,t){t&&(e[n]=t)}function Ve(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const a=new gn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),n[r]=a,t[Zt(r)]=r,t[Zt(a.attribute)]=r}return new ut(n,t,e.space)}const ei=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:E,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:Y,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 ti(e,n){return n in e?e[n]:n}function ni(e,n){return ti(e,n.toLowerCase())}const os=Ve({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alpha:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:J,autoFocus:O,autoPlay:O,blocking:J,capture:null,charSet:null,checked:O,cite:null,className:J,closedBy:null,colorSpace:null,cols:E,colSpan:E,command:null,commandFor:null,content:null,contentEditable:Y,controls:O,controlsList:J,coords:E|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:en,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:J,height:E,hidden:en,high:E,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:J,itemRef:J,itemScope:O,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,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:O,optimum:E,pattern:null,ping:J,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:J,required:O,reversed:O,rows:E,rowSpan:E,sandbox:J,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootCustomElementRegistry:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shadowRootSerializable:O,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:Y,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:O,useMap:null,value:Y,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,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:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:O,disablePictureInPicture:O,disableRemotePlayback:O,exportParts:De,part:J,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:ni}),us=Ve({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",maskType:"mask-type",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:oe,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:J,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:O,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:De,g2:De,glyphName:De,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:oe,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,maskType: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:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,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:oe,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:oe,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:oe,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:ti}),ri=Ve({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()}}),ii=Ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ni}),li=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),cs={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"},fs=/[A-Z]/g,Jn=/-[a-z]/g,hs=/^data[-\w.:]+$/i;function ps(e,n){const t=Zt(n);let r=n,i=ae;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&hs.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(Jn,ms);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!Jn.test(a)){let l=a.replace(fs,ds);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=gn}return new i(r,n)}function ds(e){return"-"+e.toLowerCase()}function ms(e){return e.charAt(1).toUpperCase()}const gs=Zr([ei,os,ri,ii,li],"html"),xn=Zr([ei,us,ri,ii,li],"svg");function xs(e){return e.join(" ").trim()}var Oe={},Dt,Gn;function ys(){if(Gn)return Dt;Gn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,u=`
3
+ `,o="/",f="*",c="",d="comment",p="declaration";function m(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var v=1,j=1;function L(F){var z=F.match(n);z&&(v+=z.length);var V=F.lastIndexOf(u);j=~V?F.length-V:j+F.length}function I(){var F={line:v,column:j};return function(z){return z.position=new w(F),D(),z}}function w(F){this.start=F,this.end={line:v,column:j},this.source=k.source}w.prototype.content=S;function _(F){var z=new Error(k.source+":"+v+":"+j+": "+F);if(z.reason=F,z.filename=k.source,z.line=v,z.column=j,z.source=S,!k.silent)throw z}function R(F){var z=F.exec(S);if(z){var V=z[0];return L(V),S=S.slice(V.length),z}}function D(){R(t)}function y(F){var z;for(F=F||[];z=A();)z!==!1&&F.push(z);return F}function A(){var F=I();if(!(o!=S.charAt(0)||f!=S.charAt(1))){for(var z=2;c!=S.charAt(z)&&(f!=S.charAt(z)||o!=S.charAt(z+1));)++z;if(z+=2,c===S.charAt(z-1))return _("End of comment missing");var V=S.slice(2,z-2);return j+=2,L(V),S=S.slice(z),j+=2,F({type:d,comment:V})}}function P(){var F=I(),z=R(r);if(z){if(A(),!R(i))return _("property missing ':'");var V=R(a),K=F({type:p,property:b(z[0].replace(e,c)),value:V?b(V[0].replace(e,c)):c});return R(l),K}}function B(){var F=[];y(F);for(var z;z=P();)z!==!1&&(F.push(z),y(F));return F}return D(),B()}function b(S){return S?S.replace(s,c):c}return Dt=m,Dt}var Xn;function ks(){if(Xn)return Oe;Xn=1;var e=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=t;const n=e(ys());function t(r,i){let a=null;if(!r||typeof r!="string")return a;const l=(0,n.default)(r),s=typeof i=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:o,value:f}=u;s?i(o,f,u):f&&(a=a||{},a[o]=f)}),a}return Oe}var Ye={},Yn;function bs(){if(Yn)return Ye;Yn=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(o){return!o||t.test(o)||e.test(o)},l=function(o,f){return f.toUpperCase()},s=function(o,f){return"".concat(f,"-")},u=function(o,f){return f===void 0&&(f={}),a(o)?o:(o=o.toLowerCase(),f.reactCompat?o=o.replace(i,s):o=o.replace(r,s),o.replace(n,l))};return Ye.camelCase=u,Ye}var Ke,Kn;function ws(){if(Kn)return Ke;Kn=1;var e=Ke&&Ke.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ks()),t=bs();function r(i,a){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(s,u){s&&u&&(l[(0,t.camelCase)(s,a)]=u)}),l}return r.default=r,Ke=r,Ke}var Ss=ws();const Cs=Vr(Ss),ai=si("end"),yn=si("start");function si(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 vs(e){const n=yn(e),t=ai(e);if(n&&t)return{start:n,end:t}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qn(e.position):"start"in e||"end"in e?Qn(e):"line"in e||"column"in e?nn(e):""}function nn(e){return Zn(e&&e.line)+":"+Zn(e&&e.column)}function Qn(e){return nn(e&&e.start)+"-"+nn(e&&e.end)}function Zn(e){return e&&typeof e=="number"?e:1}class ne extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",a={},l=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?i=n:!a.cause&&n&&(l=!0,i=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=tt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ne.prototype.file="";ne.prototype.name="";ne.prototype.reason="";ne.prototype.message="";ne.prototype.stack="";ne.prototype.column=void 0;ne.prototype.line=void 0;ne.prototype.ancestors=void 0;ne.prototype.cause=void 0;ne.prototype.fatal=void 0;ne.prototype.place=void 0;ne.prototype.ruleId=void 0;ne.prototype.source=void 0;const kn={}.hasOwnProperty,js=new Map,Es=/[A-Z]/g,Ns=new Set(["table","tbody","thead","tfoot","tr"]),As=new Set(["td","th"]),oi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Is(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=_s(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=Ms(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"?xn:gs,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=ui(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ui(e,n,t){if(n.type==="element")return Ts(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ps(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ds(e,n,t);if(n.type==="mdxjsEsm")return zs(e,n);if(n.type==="root")return Ls(e,n,t);if(n.type==="text")return Fs(e,n)}function Ts(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=xn,e.schema=i),e.ancestors.push(n);const a=fi(e,n.tagName,!1),l=Rs(e,n);let s=wn(e,n);return Ns.has(n.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!as(u):!0})),ci(e,l,a,n),bn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Ps(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)}lt(e,n.position)}function zs(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);lt(e,n.position)}function Ds(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=xn,e.schema=i),e.ancestors.push(n);const a=n.name===null?e.Fragment:fi(e,n.name,!0),l=Os(e,n),s=wn(e,n);return ci(e,l,a,n),bn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Ls(e,n,t){const r={};return bn(r,wn(e,n)),e.create(n,e.Fragment,r,t)}function Fs(e,n){return n.value}function ci(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function bn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ms(e,n,t){return r;function r(i,a,l,s){const o=Array.isArray(l.children)?t:n;return s?o(a,l,s):o(a,l)}}function _s(e,n){return t;function t(r,i,a,l){const s=Array.isArray(a.children),u=yn(r);return n(i,a,l,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Rs(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&kn.call(n.properties,i)){const a=Bs(e,i,n.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&As.has(n.tagName)?r=s:t[l]=s}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Os(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else lt(e,n.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else lt(e,n.position);else a=r.value===null?!0:r.value;t[i]=a}return t}function wn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:js;for(;++r<n.children.length;){const a=n.children[r];let l;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const o=i.get(u)||0;l=u+"-"+o,i.set(u,o+1)}}const s=ui(e,a,l);s!==void 0&&t.push(s)}return t}function Bs(e,n,t){const r=ps(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ts(t):xs(t)),r.property==="style"){let i=typeof t=="object"?t:$s(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Hs(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?cs[r.property]||r.property:r.attribute,t]}}function $s(e,n){try{return Cs(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ne("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=oi+"#cannot-parse-style-attribute",i}}function fi(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let a=-1,l;for(;++a<i.length;){const s=qn(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=l}else r=qn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return kn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);lt(e)}function lt(e,n){const t=new ne("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=oi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Hs(e){const n={};let t;for(t in e)kn.call(e,t)&&(n[Us(t)]=e[t]);return n}function Us(e){let n=e.replace(Es,qs);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function qs(e){return"-"+e.toLowerCase()}const Lt={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"]},Vs={};function Sn(e,n){const t=Vs,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return hi(e,r,i)}function hi(e,n,t){if(Ws(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 er(e.children,n,t)}return Array.isArray(e)?er(e,n,t):""}function er(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=hi(e[i],n,t);return r.join("")}function Ws(e){return!!(e&&typeof e=="object")}const tr=document.createElement("i");function Cn(e){const n="&"+e+";";tr.innerHTML=n;const t=tr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function ue(e,n,t,r){const i=e.length;let a=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);a<r.length;)l=r.slice(a,a+1e4),l.unshift(n,0),e.splice(...l),a+=1e4,n+=1e4}function ce(e,n){return e.length>0?(ue(e,e.length,0,n),e):n}const nr={}.hasOwnProperty;function pi(e){const n={};let t=-1;for(;++t<e.length;)Js(n,e[t]);return n}function Js(e,n){let t;for(t in n){const i=(nr.call(e,t)?e[t]:void 0)||(e[t]={}),a=n[t];let l;if(a)for(l in a){nr.call(i,l)||(i[l]=[]);const s=a[l];Gs(i[l],Array.isArray(s)?s:s?[s]:[])}}}function Gs(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ue(e,0,0,r)}function di(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 ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const re=Ne(/[A-Za-z]/),te=Ne(/[\dA-Za-z]/),Xs=Ne(/[#-'*+\--9=?A-Z^-~]/);function bt(e){return e!==null&&(e<32||e===127)}const rn=Ne(/\d/),Ys=Ne(/[\dA-Fa-f]/),Ks=Ne(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const Et=Ne(new RegExp("\\p{P}|\\p{S}","u")),Le=Ne(/\s/);function Ne(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function We(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const a=e.charCodeAt(t);let l="";if(a===37&&te(e.charCodeAt(t+1))&&te(e.charCodeAt(t+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(t+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);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 a=0;return l;function l(u){return H(u)?(e.enter(t),s(u)):n(u)}function s(u){return H(u)&&a++<i?(e.consume(u),s):(e.exit(t),n(u))}}const Qs={tokenize:Zs};function Zs(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),q(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return M(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),l)}}const eo={tokenize:to},rr={tokenize:no};function to(e){const n=this,t=[];let r=0,i,a,l;return s;function s(j){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,u,o)(j)}return o(j)}function u(j){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&v();const L=n.events.length;let I=L,w;for(;I--;)if(n.events[I][0]==="exit"&&n.events[I][1].type==="chunkFlow"){w=n.events[I][1].end;break}k(r);let _=L;for(;_<n.events.length;)n.events[_][1].end={...w},_++;return ue(n.events,I+1,0,n.events.slice(L)),n.events.length=_,o(j)}return s(j)}function o(j){if(r===t.length){if(!i)return d(j);if(i.currentConstruct&&i.currentConstruct.concrete)return m(j);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(rr,f,c)(j)}function f(j){return i&&v(),k(r),d(j)}function c(j){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(j)}function d(j){return n.containerState={},e.attempt(rr,p,m)(j)}function p(j){return r++,t.push([n.currentConstruct,n.containerState]),d(j)}function m(j){if(j===null){i&&v(),k(0),e.consume(j);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(j)}function b(j){if(j===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return M(j)?(e.consume(j),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(j),b)}function S(j,L){const I=n.sliceStream(j);if(L&&I.push(null),j.previous=a,a&&(a.next=j),a=j,i.defineSkip(j.start),i.write(I),n.parser.lazy[j.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const _=n.events.length;let R=_,D,y;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){if(D){y=n.events[R][1].end;break}D=!0}for(k(r),w=_;w<n.events.length;)n.events[w][1].end={...y},w++;ue(n.events,R+1,0,n.events.slice(_)),n.events.length=w}}function k(j){let L=t.length;for(;L-- >j;){const I=t[L];n.containerState=I[1],I[0].exit.call(n,e)}t.length=j}function v(){i.write([null]),a=void 0,i=void 0,n.containerState._closeFlow=void 0}}function no(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 qe(e){if(e===null||G(e)||Le(e))return 1;if(Et(e))return 2}function Nt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(n=a(n,t),r.push(a))}return n}const ln={name:"attention",resolveAll:ro,tokenize:io};function ro(e,n){let t=-1,r,i,a,l,s,u,o,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=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 c={...e[r][1].end},d={...e[t][1].start};ir(c,-u),ir(d,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[t][1].start={...s.end},o=[],e[r][1].end.offset-e[r][1].start.offset&&(o=ce(o,[["enter",e[r][1],n],["exit",e[r][1],n]])),o=ce(o,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",a,n]]),o=ce(o,Nt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),o=ce(o,[["exit",a,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,o=ce(o,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,ue(e,r-1,t-r+3,o),t=r+o.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function io(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qe(r);let a;return l;function l(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const o=e.exit("attentionSequence"),f=qe(u),c=!f||f===2&&i||t.includes(u),d=!i||i===2&&f||t.includes(r);return o._open=!!(a===42?c:c&&(i||!d)),o._close=!!(a===42?d:d&&(f||!c)),n(u)}}function ir(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const lo={name:"autolink",tokenize:ao};function ao(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"),a}function a(p){return re(p)?(e.consume(p),l):p===64?t(p):o(p)}function l(p){return p===43||p===45||p===46||te(p)?(r=1,s(p)):o(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||te(p))&&r++<32?(e.consume(p),s):(r=0,o(p))}function u(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||bt(p)?t(p):(e.consume(p),u)}function o(p){return p===64?(e.consume(p),f):Xs(p)?(e.consume(p),o):t(p)}function f(p){return te(p)?c(p):t(p)}function c(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||te(p))&&r++<63){const m=p===45?d:c;return e.consume(p),m}return t(p)}}const ct={partial:!0,tokenize:so};function so(e,n,t){return r;function r(a){return H(a)?q(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||M(a)?n(a):t(a)}}const mi={continuation:{tokenize:uo},exit:co,name:"blockQuote",tokenize:oo};function oo(e,n,t){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return t(l)}function a(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function uo(e,n,t){const r=this;return i;function i(l){return H(l)?q(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(mi,n,t)(l)}}function co(e){e.exit("blockQuote")}const gi={name:"characterEscape",tokenize:fo};function fo(e,n,t){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Ks(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(a)}}const xi={name:"characterReference",tokenize:ho};function ho(e,n,t){const r=this;let i=0,a,l;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),o):(e.enter("characterReferenceValue"),a=31,l=te,f(c))}function o(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=Ys,f):(e.enter("characterReferenceValue"),a=7,l=rn,f(c))}function f(c){if(c===59&&i){const d=e.exit("characterReferenceValue");return l===te&&!Cn(r.sliceSerialize(d))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<a?(e.consume(c),f):t(c)}}const lr={partial:!0,tokenize:mo},ar={concrete:!0,name:"codeFenced",tokenize:po};function po(e,n,t){const r=this,i={partial:!0,tokenize:I};let a=0,l=0,s;return u;function u(w){return o(w)}function o(w){const _=r.events[r.events.length-1];return a=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===s?(l++,e.consume(w),f):l<3?t(w):(e.exit("codeFencedFenceSequence"),H(w)?q(e,c,"whitespace")(w):c(w))}function c(w){return w===null||M(w)?(e.exit("codeFencedFence"),r.interrupt?n(w):e.check(lr,b,L)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):H(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(w)):w===96&&w===s?t(w):(e.consume(w),d)}function p(w){return w===null||M(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===s?t(w):(e.consume(w),m)}function b(w){return e.attempt(i,L,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),k}function k(w){return a>0&&H(w)?q(e,v,"linePrefix",a+1)(w):v(w)}function v(w){return w===null||M(w)?e.check(lr,b,L)(w):(e.enter("codeFlowValue"),j(w))}function j(w){return w===null||M(w)?(e.exit("codeFlowValue"),v(w)):(e.consume(w),j)}function L(w){return e.exit("codeFenced"),n(w)}function I(w,_,R){let D=0;return y;function y(z){return w.enter("lineEnding"),w.consume(z),w.exit("lineEnding"),A}function A(z){return w.enter("codeFencedFence"),H(z)?q(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):P(z)}function P(z){return z===s?(w.enter("codeFencedFenceSequence"),B(z)):R(z)}function B(z){return z===s?(D++,w.consume(z),B):D>=l?(w.exit("codeFencedFenceSequence"),H(z)?q(w,F,"whitespace")(z):F(z)):R(z)}function F(z){return z===null||M(z)?(w.exit("codeFencedFence"),_(z)):R(z)}}}function mo(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"),a)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Ft={name:"codeIndented",tokenize:xo},go={partial:!0,tokenize:yo};function xo(e,n,t){const r=this;return i;function i(o){return e.enter("codeIndented"),q(e,a,"linePrefix",5)(o)}function a(o){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(o):t(o)}function l(o){return o===null?u(o):M(o)?e.attempt(go,l,u)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||M(o)?(e.exit("codeFlowValue"),l(o)):(e.consume(o),s)}function u(o){return e.exit("codeIndented"),n(o)}}function yo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):q(e,a,"linePrefix",5)(l)}function a(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):M(l)?i(l):t(l)}}const ko={name:"codeText",previous:wo,resolve:bo,tokenize:So};function bo(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 wo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function So(e,n,t){let r=0,i,a;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(a=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),o(c))}function o(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),o)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(a.type="codeTextData",o(c))}}class Co{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qe(this.left,r),a.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),Qe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Qe(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);Qe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Qe(this.left,t.reverse())}}}function Qe(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 yi(e){const n={};let t=-1,r,i,a,l,s,u,o;const f=new Co(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"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,vo(f,t)),t=n[t],o=!0);else if(r[1]._container){for(a=t,i=void 0;a--;)if(l=f.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,t),s.unshift(r),f.splice(i,t-i+1,s))}}return ue(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!o}function vo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const a=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,u=[],o={};let f,c,d=-1,p=t,m=0,b=0;const S=[b];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=t;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(b=d+1,S.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):S.pop(),d=S.length;d--;){const k=s.slice(S[d],S[d+1]),v=a.pop();u.push([v,v+k.length-1]),e.splice(v,2,k)}for(u.reverse(),d=-1;++d<u.length;)o[m+u[d][0]]=m+u[d][1],m+=u[d][1]-u[d][0]-1;return o}const jo={resolve:No,tokenize:Ao},Eo={partial:!0,tokenize:Io};function No(e){return yi(e),e}function Ao(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):M(s)?e.check(Eo,l,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function l(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Io(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,a,"linePrefix")}function a(l){if(l===null||M(l))return t(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function ki(e,n,t,r,i,a,l,s,u){const o=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),d):k===null||k===32||k===41||bt(k)?t(k):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(k))}function d(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),d(k)):k===null||k===60||M(k)?t(k):(e.consume(k),k===92?m:p)}function m(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function b(k){return!f&&(k===null||k===41||G(k))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),n(k)):f<o&&k===40?(e.consume(k),f++,b):k===41?(e.consume(k),f--,b):k===null||k===32||k===40||bt(k)?t(k):(e.consume(k),k===92?S:b)}function S(k){return k===40||k===41||k===92?(e.consume(k),b):b(k)}}function bi(e,n,t,r,i,a){const l=this;let s=0,u;return o;function o(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),f}function f(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||M(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),u||(u=!H(p)),p===92?d:c)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function wi(e,n,t,r,i,a){let l;return s;function s(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,u):t(d)}function u(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(a),o(d))}function o(d){return d===l?(e.exit(a),u(l)):d===null?t(d):M(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),q(e,o,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||M(d)?(e.exit("chunkString"),o(d)):(e.consume(d),d===92?c:f)}function c(d){return d===l||d===92?(e.consume(d),f):f(d)}}function nt(e,n){let t;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const To={name:"definition",tokenize:zo},Po={partial:!0,tokenize:Do};function zo(e,n,t){const r=this;let i;return a;function a(p){return e.enter("definition"),l(p)}function l(p){return bi.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return G(p)?nt(e,o)(p):o(p)}function o(p){return ki(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Po,c,c)(p)}function c(p){return H(p)?q(e,d,"whitespace")(p):d(p)}function d(p){return p===null||M(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Do(e,n,t){return r;function r(s){return G(s)?nt(e,i)(s):t(s)}function i(s){return wi(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return H(s)?q(e,l,"whitespace")(s):l(s)}function l(s){return s===null||M(s)?n(s):t(s)}}const Lo={name:"hardBreakEscape",tokenize:Fo};function Fo(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return M(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Mo={name:"headingAtx",resolve:_o,tokenize:Ro};function _o(e,n){let t=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ue(e,r,t-r+1,[["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n]])),e}function Ro(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||G(f)?(e.exit("atxHeadingSequence"),s(f)):t(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||M(f)?(e.exit("atxHeading"),n(f)):H(f)?q(e,s,"whitespace")(f):(e.enter("atxHeadingText"),o(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),s(f))}function o(f){return f===null||f===35||G(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),o)}}const Oo=["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"],sr=["pre","script","style","textarea"],Bo={concrete:!0,name:"htmlFlow",resolveTo:Uo,tokenize:qo},$o={partial:!0,tokenize:Wo},Ho={partial:!0,tokenize:Vo};function Uo(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 qo(e,n,t){const r=this;let i,a,l,s,u;return o;function o(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),a=!0,b):x===63?(e.consume(x),i=3,r.interrupt?n:g):re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,m):re(x)?(e.consume(x),i=4,r.interrupt?n:g):t(x)}function p(x){return x===45?(e.consume(x),r.interrupt?n:g):t(x)}function m(x){const pe="CDATA[";return x===pe.charCodeAt(s++)?(e.consume(x),s===pe.length?r.interrupt?n:P:m):t(x)}function b(x){return re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function S(x){if(x===null||x===47||x===62||G(x)){const pe=x===47,Ae=l.toLowerCase();return!pe&&!a&&sr.includes(Ae)?(i=1,r.interrupt?n(x):P(x)):Oo.includes(l.toLowerCase())?(i=6,pe?(e.consume(x),k):r.interrupt?n(x):P(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(x):a?v(x):j(x))}return x===45||te(x)?(e.consume(x),l+=String.fromCharCode(x),S):t(x)}function k(x){return x===62?(e.consume(x),r.interrupt?n:P):t(x)}function v(x){return H(x)?(e.consume(x),v):y(x)}function j(x){return x===47?(e.consume(x),y):x===58||x===95||re(x)?(e.consume(x),L):H(x)?(e.consume(x),j):y(x)}function L(x){return x===45||x===46||x===58||x===95||te(x)?(e.consume(x),L):I(x)}function I(x){return x===61?(e.consume(x),w):H(x)?(e.consume(x),I):j(x)}function w(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),u=x,_):H(x)?(e.consume(x),w):R(x)}function _(x){return x===u?(e.consume(x),u=null,D):x===null||M(x)?t(x):(e.consume(x),_)}function R(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||G(x)?I(x):(e.consume(x),R)}function D(x){return x===47||x===62||H(x)?j(x):t(x)}function y(x){return x===62?(e.consume(x),A):t(x)}function A(x){return x===null||M(x)?P(x):H(x)?(e.consume(x),A):t(x)}function P(x){return x===45&&i===2?(e.consume(x),V):x===60&&i===1?(e.consume(x),K):x===62&&i===4?(e.consume(x),he):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),be):M(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($o,we,B)(x)):x===null||M(x)?(e.exit("htmlFlowData"),B(x)):(e.consume(x),P)}function B(x){return e.check(Ho,F,we)(x)}function F(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),z}function z(x){return x===null||M(x)?B(x):(e.enter("htmlFlowData"),P(x))}function V(x){return x===45?(e.consume(x),g):P(x)}function K(x){return x===47?(e.consume(x),l="",fe):P(x)}function fe(x){if(x===62){const pe=l.toLowerCase();return sr.includes(pe)?(e.consume(x),he):P(x)}return re(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),fe):P(x)}function be(x){return x===93?(e.consume(x),g):P(x)}function g(x){return x===62?(e.consume(x),he):x===45&&i===2?(e.consume(x),g):P(x)}function he(x){return x===null||M(x)?(e.exit("htmlFlowData"),we(x)):(e.consume(x),he)}function we(x){return e.exit("htmlFlow"),n(x)}}function Vo(e,n,t){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):t(l)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Wo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ct,n,t)}}const Jo={name:"htmlText",tokenize:Go};function Go(e,n,t){const r=this;let i,a,l;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),o):g===47?(e.consume(g),I):g===63?(e.consume(g),j):re(g)?(e.consume(g),R):t(g)}function o(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),a=0,m):re(g)?(e.consume(g),v):t(g)}function f(g){return g===45?(e.consume(g),p):t(g)}function c(g){return g===null?t(g):g===45?(e.consume(g),d):M(g)?(l=c,K(g)):(e.consume(g),c)}function d(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?V(g):g===45?d(g):c(g)}function m(g){const he="CDATA[";return g===he.charCodeAt(a++)?(e.consume(g),a===he.length?b:m):t(g)}function b(g){return g===null?t(g):g===93?(e.consume(g),S):M(g)?(l=b,K(g)):(e.consume(g),b)}function S(g){return g===93?(e.consume(g),k):b(g)}function k(g){return g===62?V(g):g===93?(e.consume(g),k):b(g)}function v(g){return g===null||g===62?V(g):M(g)?(l=v,K(g)):(e.consume(g),v)}function j(g){return g===null?t(g):g===63?(e.consume(g),L):M(g)?(l=j,K(g)):(e.consume(g),j)}function L(g){return g===62?V(g):j(g)}function I(g){return re(g)?(e.consume(g),w):t(g)}function w(g){return g===45||te(g)?(e.consume(g),w):_(g)}function _(g){return M(g)?(l=_,K(g)):H(g)?(e.consume(g),_):V(g)}function R(g){return g===45||te(g)?(e.consume(g),R):g===47||g===62||G(g)?D(g):t(g)}function D(g){return g===47?(e.consume(g),V):g===58||g===95||re(g)?(e.consume(g),y):M(g)?(l=D,K(g)):H(g)?(e.consume(g),D):V(g)}function y(g){return g===45||g===46||g===58||g===95||te(g)?(e.consume(g),y):A(g)}function A(g){return g===61?(e.consume(g),P):M(g)?(l=A,K(g)):H(g)?(e.consume(g),A):D(g)}function P(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,B):M(g)?(l=P,K(g)):H(g)?(e.consume(g),P):(e.consume(g),F)}function B(g){return g===i?(e.consume(g),i=void 0,z):g===null?t(g):M(g)?(l=B,K(g)):(e.consume(g),B)}function F(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||G(g)?D(g):(e.consume(g),F)}function z(g){return g===47||g===62||G(g)?D(g):t(g)}function V(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function K(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),fe}function fe(g){return H(g)?q(e,be,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):be(g)}function be(g){return e.enter("htmlTextData"),l(g)}}const vn={name:"labelEnd",resolveAll:Qo,resolveTo:Zo,tokenize:eu},Xo={tokenize:tu},Yo={tokenize:nu},Ko={tokenize:ru};function Qo(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ue(e,0,e.length,t),e}function Zo(e,n){let t=e.length,r=0,i,a,l,s;for(;t--;)if(i=e[t][1],a){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&&(a=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},o={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",u,n],["enter",o,n]],s=ce(s,e.slice(a+1,a+r+3)),s=ce(s,[["enter",f,n]]),s=ce(s,Nt(n.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),n)),s=ce(s,[["exit",f,n],e[l-2],e[l-1],["exit",o,n]]),s=ce(s,e.slice(l+1)),s=ce(s,[["exit",u,n]]),ue(e,a,e.length,s),e}function eu(e,n,t){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?c(d):(l=r.parser.defined.includes(ge(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):t(d)}function u(d){return d===40?e.attempt(Xo,f,l?f:c)(d):d===91?e.attempt(Yo,f,l?o:c)(d):l?f(d):c(d)}function o(d){return e.attempt(Ko,f,c)(d)}function f(d){return n(d)}function c(d){return a._balanced=!0,t(d)}}function tu(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?nt(e,a)(c):a(c)}function a(c){return c===41?f(c):ki(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?nt(e,u)(c):f(c)}function s(c){return t(c)}function u(c){return c===34||c===39||c===40?wi(e,o,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function o(c){return G(c)?nt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function nu(e,n,t){const r=this;return i;function i(s){return bi.call(r,e,a,l,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function l(s){return t(s)}}function ru(e,n,t){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),n):t(a)}}const iu={name:"labelStartImage",resolveAll:vn.resolveAll,tokenize:lu};function lu(e,n,t){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):t(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const au={name:"labelStartLink",resolveAll:vn.resolveAll,tokenize:su};function su(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"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const Mt={name:"lineEnding",tokenize:ou};function ou(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,n,"linePrefix")}}const xt={name:"thematicBreak",tokenize:uu};function uu(e,n,t){let r=0,i;return a;function a(o){return e.enter("thematicBreak"),l(o)}function l(o){return i=o,s(o)}function s(o){return o===i?(e.enter("thematicBreakSequence"),u(o)):r>=3&&(o===null||M(o))?(e.exit("thematicBreak"),n(o)):t(o)}function u(o){return o===i?(e.consume(o),r++,u):(e.exit("thematicBreakSequence"),H(o)?q(e,s,"whitespace")(o):s(o))}}const ie={continuation:{tokenize:pu},exit:mu,name:"list",tokenize:hu},cu={partial:!0,tokenize:gu},fu={partial:!0,tokenize:du};function hu(e,n,t){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:rn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(xt,t,o)(p):o(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return rn(p)&&++l<10?(e.consume(p),u):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),o(p)):t(p)}function o(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ct,r.interrupt?t:f,e.attempt(cu,d,c))}function f(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function pu(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ct,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!H(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fu,n,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(ie,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function du(e,n,t){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(a){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(a):t(a)}}function mu(e){e.exit(this.containerState.type)}function gu(e,n,t){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!H(a)&&l&&l[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const or={name:"setextUnderline",resolveTo:xu,tokenize:yu};function xu(e,n){let t=e.length,r,i,a;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),!a&&e[t][1].type==="definition"&&(a=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function yu(e,n,t){const r=this;let i;return a;function a(o){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=o,l(o)):t(o)}function l(o){return e.enter("setextHeadingLineSequence"),s(o)}function s(o){return o===i?(e.consume(o),s):(e.exit("setextHeadingLineSequence"),H(o)?q(e,u,"lineSuffix")(o):u(o))}function u(o){return o===null||M(o)?(e.exit("setextHeadingLine"),n(o)):t(o)}}const ku={tokenize:bu};function bu(e){const n=this,t=e.attempt(ct,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(jo,i)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const wu={resolveAll:Ci()},Su=Si("string"),Cu=Si("text");function Si(e){return{resolveAll:Ci(e==="text"?vu:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],a=t.attempt(i,l,s);return l;function l(f){return o(f)?a(f):s(f)}function s(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return o(f)?(t.exit("data"),a(f)):(t.consume(f),u)}function o(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d<c.length;){const p=c[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ci(e){return n;function n(t,r){let i=-1,a;for(;++i<=t.length;)a===void 0?t[i]&&t[i][1].type==="data"&&(a=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==a+2&&(t[a][1].end=t[i-1][1].end,t.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(t,r):t}}function vu(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 a=i.length,l=-1,s=0,u;for(;a--;){const o=i[a];if(typeof o=="string"){for(l=o.length;o.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(o===-2)u=!0,s++;else if(o!==-1){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const o={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(t,0,["enter",o,n],["exit",o,n]),t+=2)}t++}return e}const ju={42:ie,43:ie,45:ie,48:ie,49:ie,50:ie,51:ie,52:ie,53:ie,54:ie,55:ie,56:ie,57:ie,62:mi},Eu={91:To},Nu={[-2]:Ft,[-1]:Ft,32:Ft},Au={35:Mo,42:xt,45:[or,xt],60:Bo,61:or,95:xt,96:ar,126:ar},Iu={38:xi,92:gi},Tu={[-5]:Mt,[-4]:Mt,[-3]:Mt,33:iu,38:xi,42:ln,60:[lo,Jo],91:au,92:[Lo,gi],93:vn,95:ln,96:ko},Pu={null:[ln,wu]},zu={null:[42,95]},Du={null:[]},Lu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zu,contentInitial:Eu,disable:Du,document:ju,flow:Au,flowInitial:Nu,insideSpan:Pu,string:Iu,text:Tu},Symbol.toStringTag,{value:"Module"}));function Fu(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={},a=[];let l=[],s=[];const u={attempt:_(I),check:_(w),consume:v,enter:j,exit:L,interrupt:_(w,{interrupt:!0})},o={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:c};let f=n.tokenize.call(o,u);return n.resolveAll&&a.push(n),o;function c(A){return l=ce(l,A),S(),l[l.length-1]!==null?[]:(R(n,0),o.events=Nt(a,o.events,o),o.events)}function d(A,P){return _u(p(A),P)}function p(A){return Mu(l,A)}function m(){const{_bufferIndex:A,_index:P,line:B,column:F,offset:z}=r;return{_bufferIndex:A,_index:P,line:B,column:F,offset:z}}function b(A){i[A.line]=A.column,y()}function S(){let A;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<P.length;)k(P.charCodeAt(r._bufferIndex));else k(P)}}function k(A){f=f(A)}function v(A){M(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,y()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),o.previous=A}function j(A,P){const B=P||{};return B.type=A,B.start=m(),o.events.push(["enter",B,o]),s.push(B),B}function L(A){const P=s.pop();return P.end=m(),o.events.push(["exit",P,o]),P}function I(A,P){R(A,P.from)}function w(A,P){P.restore()}function _(A,P){return B;function B(F,z,V){let K,fe,be,g;return Array.isArray(F)?we(F):"tokenize"in F?we([F]):he(F);function he(Z){return Je;function Je(je){const Me=je!==null&&Z[je],_e=je!==null&&Z.null,ht=[...Array.isArray(Me)?Me:Me?[Me]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return we(ht)(je)}}function we(Z){return K=Z,fe=0,Z.length===0?V:x(Z[fe])}function x(Z){return Je;function Je(je){return g=D(),be=Z,Z.partial||(o.currentConstruct=Z),Z.name&&o.parser.constructs.disable.null.includes(Z.name)?Ae():Z.tokenize.call(P?Object.assign(Object.create(o),P):o,u,pe,Ae)(je)}}function pe(Z){return A(be,g),z}function Ae(Z){return g.restore(),++fe<K.length?x(K[fe]):V}}}function R(A,P){A.resolveAll&&!a.includes(A)&&a.push(A),A.resolve&&ue(o.events,P,o.events.length-P,A.resolve(o.events.slice(P),o)),A.resolveTo&&(o.events=A.resolveTo(o.events,o))}function D(){const A=m(),P=o.previous,B=o.currentConstruct,F=o.events.length,z=Array.from(s);return{from:F,restore:V};function V(){r=A,o.previous=P,o.currentConstruct=B,o.events.length=F,s=z,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Mu(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,a=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,a)];else{if(l=e.slice(t,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function _u(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const a=e[t];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
4
+ `;break}case-3:{l=`\r
5
+ `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function Ru(e){const r={constructs:pi([Lu,...(e||{}).extensions||[]]),content:i(Qs),defined:[],document:i(eo),flow:i(ku),lazy:{},string:i(Su),text:i(Cu)};return r;function i(a){return l;function l(s){return Fu(r,a,s)}}}function Ou(e){for(;!yi(e););return e}const ur=/[\0\t\n\r]/g;function Bu(){let e=1,n="",t=!0,r;return i;function i(a,l,s){const u=[];let o,f,c,d,p;for(a=n+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),c=0,n="",t&&(a.charCodeAt(0)===65279&&c++,t=void 0);c<a.length;){if(ur.lastIndex=c,o=ur.exec(a),d=o&&o.index!==void 0?o.index:a.length,p=a.charCodeAt(d),!o){n=a.slice(c);break}if(p===10&&c===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<d&&(u.push(a.slice(c,d)),e+=d-c),p){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=d+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const $u=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hu(e){return e.replace($u,Uu)}function Uu(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),a=i===120||i===88;return di(t.slice(a?2:1),a?16:10)}return Cn(t)||e}const vi={}.hasOwnProperty;function qu(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Vu(t)(Ou(Ru(t).document().write(Bu()(e,n,!0))))}function Vu(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_n),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(Ln),blockQuote:a(_e),characterEscape:D,characterReference:D,codeFenced:a(ht),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ht,l),codeText:a(al,l),codeTextData:D,data:D,codeFlowValue:D,definition:a(sl),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(ol),hardBreakEscape:a(Fn),hardBreakTrailing:a(Fn),htmlFlow:a(Mn,l),htmlFlowData:D,htmlText:a(Mn,l),htmlTextData:D,image:a(ul),label:l,link:a(_n),listItem:a(cl),listItemValue:d,listOrdered:a(Rn,c),listUnordered:a(Rn),paragraph:a(fl),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Ln),strong:a(hl),thematicBreak:a(dl)},exit:{atxHeading:u(),atxHeadingSequence:I,autolink:u(),autolinkEmail:Me,autolinkProtocol:je,blockQuote:u(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:Z,characterReference:Je,codeFenced:u(S),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:y,codeIndented:u(k),codeText:u(z),codeTextData:y,data:y,definition:u(),definitionDestinationString:L,definitionLabelString:v,definitionTitleString:j,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(B),htmlFlowData:y,htmlText:u(F),htmlTextData:y,image:u(K),label:be,labelText:fe,lineEnding:A,link:u(V),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:pe,resourceDestinationString:g,resourceTitleString:he,resource:we,setextHeading:u(R),setextHeadingLineSequence:_,setextHeadingText:w,strong:u(),thematicBreak:u()}};ji(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(C){let T={type:"root",children:[]};const $={stack:[T],tokenStack:[],config:n,enter:s,exit:o,buffer:l,resume:f,data:t},U=[];let W=-1;for(;++W<C.length;)if(C[W][1].type==="listOrdered"||C[W][1].type==="listUnordered")if(C[W][0]==="enter")U.push(W);else{const de=U.pop();W=i(C,de,W)}for(W=-1;++W<C.length;){const de=n[C[W][0]];vi.call(de,C[W][1].type)&&de[C[W][1].type].call(Object.assign({sliceSerialize:C[W][2].sliceSerialize},$),C[W][1])}if($.tokenStack.length>0){const de=$.tokenStack[$.tokenStack.length-1];(de[1]||cr).call($,void 0,de[0])}for(T.position={start:Ee(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Ee(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<n.transforms.length;)T=n.transforms[W](T)||T;return T}function i(C,T,$){let U=T-1,W=-1,de=!1,Ie,Se,Ge,Xe;for(;++U<=$;){const se=C[U];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?W++:W--,Xe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(Ie&&!Xe&&!W&&!Ge&&(Ge=U),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!W&&se[0]==="enter"&&se[1].type==="listItemPrefix"||W===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(Ie){let Re=U;for(Se=void 0;Re--;){const Ce=C[Re];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;Se&&(C[Se][1].type="lineEndingBlank",de=!0),Ce[1].type="lineEnding",Se=Re}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}Ge&&(!Se||Ge<Se)&&(Ie._spread=!0),Ie.end=Object.assign({},Se?C[Se][1].start:se[1].end),C.splice(Se||U,0,["exit",Ie,se[2]]),U++,$++}if(se[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};Ie=Re,C.splice(U,0,["enter",Re,se[2]]),U++,$++,Ge=void 0,Xe=!0}}}return C[T][1]._spread=de,$}function a(C,T){return $;function $(U){s.call(this,C(U),U),T&&T.call(this,U)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(C,T,$){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([T,$||void 0]),C.position={start:Ee(T.start),end:void 0}}function u(C){return T;function T($){C&&C.call(this,$),o.call(this,$)}}function o(C,T){const $=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==C.type&&(T?T.call(this,C,U[0]):(U[1]||cr).call(this,C,U[0]));else throw new Error("Cannot close `"+C.type+"` ("+tt({start:C.start,end:C.end})+"): it’s not open");$.position.end=Ee(C.end)}function f(){return Sn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function d(C){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),T=this.stack[this.stack.length-1];T.lang=C}function m(){const C=this.resume(),T=this.stack[this.stack.length-1];T.meta=C}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const C=this.resume(),T=this.stack[this.stack.length-1];T.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),T=this.stack[this.stack.length-1];T.value=C.replace(/(\r?\n|\r)$/g,"")}function v(C){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ge(this.sliceSerialize(C)).toLowerCase()}function j(){const C=this.resume(),T=this.stack[this.stack.length-1];T.title=C}function L(){const C=this.resume(),T=this.stack[this.stack.length-1];T.url=C}function I(C){const T=this.stack[this.stack.length-1];if(!T.depth){const $=this.sliceSerialize(C).length;T.depth=$}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function _(C){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function D(C){const $=this.stack[this.stack.length-1].children;let U=$[$.length-1];(!U||U.type!=="text")&&(U=pl(),U.position={start:Ee(C.start),end:void 0},$.push(U)),this.stack.push(U)}function y(C){const T=this.stack.pop();T.value+=this.sliceSerialize(C),T.position.end=Ee(C.end)}function A(C){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=T.children[T.children.length-1];$.position.end=Ee(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(T.type)&&(D.call(this,C),y.call(this,C))}function P(){this.data.atHardBreak=!0}function B(){const C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function F(){const C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function z(){const C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function V(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=T,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function K(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=T,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function fe(C){const T=this.sliceSerialize(C),$=this.stack[this.stack.length-2];$.label=Hu(T),$.identifier=ge(T).toLowerCase()}function be(){const C=this.stack[this.stack.length-1],T=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const U=C.children;$.children=U}else $.alt=T}function g(){const C=this.resume(),T=this.stack[this.stack.length-1];T.url=C}function he(){const C=this.resume(),T=this.stack[this.stack.length-1];T.title=C}function we(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function pe(C){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ge(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Ae(C){this.data.characterReferenceType=C.type}function Z(C){const T=this.sliceSerialize(C),$=this.data.characterReferenceType;let U;$?(U=di(T,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=Cn(T);const W=this.stack[this.stack.length-1];W.value+=U}function Je(C){const T=this.stack.pop();T.position.end=Ee(C.end)}function je(C){y.call(this,C);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(C)}function Me(C){y.call(this,C);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(C)}function _e(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function al(){return{type:"inlineCode",value:""}}function sl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ol(){return{type:"emphasis",children:[]}}function Ln(){return{type:"heading",depth:0,children:[]}}function Fn(){return{type:"break"}}function Mn(){return{type:"html",value:""}}function ul(){return{type:"image",title:null,url:"",alt:null}}function _n(){return{type:"link",title:null,url:"",children:[]}}function Rn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function cl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function fl(){return{type:"paragraph",children:[]}}function hl(){return{type:"strong",children:[]}}function pl(){return{type:"text",value:""}}function dl(){return{type:"thematicBreak"}}}function Ee(e){return{line:e.line,column:e.column,offset:e.offset}}function ji(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ji(e,r):Wu(e,r)}}function Wu(e,n){let t;for(t in n)if(vi.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 cr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is still open")}function Ju(e){const n=this;n.parser=t;function t(r){return qu(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Gu(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 Xu(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
6
+ `}]}function Yu(e,n){const t=n.value?n.value+`
7
+ `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Ku(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Qu(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Zu(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=We(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,u);const o={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,o),e.applyData(n,o)}function ec(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 tc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Ei(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),a=i[0];a&&a.type==="text"?a.value="["+a.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 nc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ei(e,n);const i={src:We(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function rc(e,n){const t={src:We(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 ic(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 lc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ei(e,n);const i={href:We(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function ac(e,n){const t={href:We(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 sc(e,n,t){const r=e.all(n),i=t?oc(t):Ni(n),a={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
8
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
9
+ `});const o={type:"element",tagName:"li",properties:a,children:l};return e.patch(n,o),e.applyData(n,o)}function oc(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=Ni(t[r])}return n}function Ni(e){const n=e.spread;return n??e.children.length>1}function uc(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 a={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function cc(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function fc(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function hc(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function pc(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)},s=yn(n.children[1]),u=ai(n.children[n.children.length-1]);s&&u&&(l.position={start:s,end:u}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,a),e.applyData(n,a)}function dc(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,s=l?l.length:n.children.length;let u=-1;const o=[];for(;++u<s;){const c=n.children[u],d={},p=l?l[u]:void 0;p&&(d.align=p);let m={type:"element",tagName:a,properties:d,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),o.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(n,f),e.applyData(n,f)}function mc(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const fr=9,hr=32;function gc(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const a=[];for(;r;)a.push(pr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return a.push(pr(n.slice(i),i>0,!1)),a.join("")}function pr(e,n,t){let r=0,i=e.length;if(n){let a=e.codePointAt(r);for(;a===fr||a===hr;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(i-1);for(;a===fr||a===hr;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xc(e,n){const t={type:"text",value:gc(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function yc(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const kc={blockquote:Gu,break:Xu,code:Yu,delete:Ku,emphasis:Qu,footnoteReference:Zu,heading:ec,html:tc,imageReference:nc,image:rc,inlineCode:ic,linkReference:lc,link:ac,listItem:sc,list:uc,paragraph:cc,root:fc,strong:hc,table:pc,tableCell:mc,tableRow:dc,text:xc,thematicBreak:yc,toml:pt,yaml:pt,definition:pt,footnoteDefinition:pt};function pt(){}const Ai=-1,At=0,rt=1,wt=2,jn=3,En=4,Nn=5,An=6,Ii=7,Ti=8,Pi=typeof self=="object"?self:globalThis,dr=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Pi[e](n)},bc=(e,n)=>{const t=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=n[i];switch(a){case At:case Ai:return t(l,i);case rt:{const s=t([],i);for(const u of l)s.push(r(u));return s}case wt:{const s=t({},i);for(const[u,o]of l)s[r(u)]=r(o);return s}case jn:return t(new Date(l),i);case En:{const{source:s,flags:u}=l;return t(new RegExp(s,u),i)}case Nn:{const s=t(new Map,i);for(const[u,o]of l)s.set(r(u),r(o));return s}case An:{const s=t(new Set,i);for(const u of l)s.add(r(u));return s}case Ii:{const{name:s,message:u}=l;return t(typeof Pi[s]=="function"?dr(s,u):new Error(u),i)}case Ti: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:s}=new Uint8Array(l);return t(new DataView(s),l)}}return t(dr(a,l),i)};return r},mr=e=>bc(new Map,e)(0),ze="",{toString:wc}={},{keys:Sc}=Object,Ze=e=>{const n=typeof e;if(n!=="object"||!e)return[At,n];const t=wc.call(e).slice(8,-1);switch(t){case"Array":return[rt,ze];case"Object":return[wt,ze];case"Date":return[jn,ze];case"RegExp":return[En,ze];case"Map":return[Nn,ze];case"Set":return[An,ze];case"DataView":return[rt,t]}return t.includes("Array")?[rt,t]:e instanceof Error?[Ii,e.name||"Error"]:[wt,t]},dt=([e,n])=>e===At&&(n==="function"||n==="symbol"),Cc=(e,n,t,r)=>{const i=(l,s)=>{const u=r.push(l)-1;return t.set(s,u),u},a=l=>{if(t.has(l))return t.get(l);let[s,u]=Ze(l);switch(s){case At:{let f=l;switch(u){case"bigint":s=Ti,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Ai],l)}return i([s,f],l)}case rt:{if(u){let d=l;return u==="DataView"?d=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(l)),i([u,[...d]],l)}const f=[],c=i([s,f],l);for(const d of l)f.push(a(d));return c}case wt:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(n&&"toJSON"in l)return a(l.toJSON());const f=[],c=i([s,f],l);for(const d of Sc(l))(e||!dt(Ze(l[d])))&&f.push([a(d),a(l[d])]);return c}case jn:return i([s,isNaN(l.getTime())?ze:l.toISOString()],l);case En:{const{source:f,flags:c}=l;return i([s,{source:f,flags:c}],l)}case Nn:{const f=[],c=i([s,f],l);for(const[d,p]of l)(e||!(dt(Ze(d))||dt(Ze(p))))&&f.push([a(d),a(p)]);return c}case An:{const f=[],c=i([s,f],l);for(const d of l)(e||!dt(Ze(d)))&&f.push(a(d));return c}}const{message:o}=l;return i([s,{name:u,message:o}],l)};return a},gr=(e,{json:n,lossy:t}={})=>{const r=[];return Cc(!(n||t),!!n,new Map,r)(e),r},St=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?mr(gr(e,n)):structuredClone(e):(e,n)=>mr(gr(e,n));function vc(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 jc(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Ec(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||vc,r=e.options.footnoteBackLabel||jc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const f=e.all(o),c=String(o.identifier).toUpperCase(),d=We(c.toLowerCase());let p=0;const m=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){m.length>0&&m.push({type:"text",value:" "});let v=typeof t=="string"?t:t(u,p);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const v=S.children[S.children.length-1];v&&v.type==="text"?v.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...m)}else f.push(...m);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(o,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...St(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
10
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
11
+ `}]}}const It=(function(e){if(e==null)return Tc;if(typeof e=="function")return Tt(e);if(typeof e=="object")return Array.isArray(e)?Nc(e):Ac(e);if(typeof e=="string")return Ic(e);throw new Error("Expected function, string, or object as test")});function Nc(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=It(e[t]);return Tt(r);function r(...i){let a=-1;for(;++a<n.length;)if(n[a].apply(this,i))return!0;return!1}}function Ac(e){const n=e;return Tt(t);function t(r){const i=r;let a;for(a in e)if(i[a]!==n[a])return!1;return!0}}function Ic(e){return Tt(n);function n(t){return t&&t.type===e}}function Tt(e){return n;function n(t,r,i){return!!(Pc(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Tc(){return!0}function Pc(e){return e!==null&&typeof e=="object"&&"type"in e}const zi=[],zc=!0,an=!1,Dc="skip";function Di(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const a=It(i),l=r?-1:1;s(e,void 0,[])();function s(u,o,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=zi,m,b,S;if((!n||a(u,o,f[f.length-1]||void 0))&&(p=Lc(t(u,f)),p[0]===an))return p;if("children"in u&&u.children){const k=u;if(k.children&&p[0]!==Dc)for(b=(r?k.children.length:-1)+l,S=f.concat(k);b>-1&&b<k.children.length;){const v=k.children[b];if(m=s(v,b,S)(),m[0]===an)return m;b=typeof m[1]=="number"?m[1]:b+l}}return p}}}function Lc(e){return Array.isArray(e)?e:typeof e=="number"?[zc,e]:e==null?zi:[e]}function In(e,n,t,r){let i,a,l;typeof n=="function"&&typeof t!="function"?(a=void 0,l=n,i=t):(a=n,l=t,i=r),Di(e,a,s,i);function s(u,o){const f=o[o.length-1],c=f?f.children.indexOf(u):void 0;return l(u,c,f)}}const sn={}.hasOwnProperty,Fc={};function Mc(e,n){const t=n||Fc,r=new Map,i=new Map,a=new Map,l={...kc,...t.handlers},s={all:o,applyData:Rc,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:u,options:t,patch:_c,wrap:Bc};return In(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();c.has(d)||c.set(d,f)}}),s;function u(f,c){const d=f.type,p=s.handlers[d];if(sn.call(s.handlers,d)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in f){const{children:b,...S}=f,k=St(S);return k.children=s.all(f),k}return St(f)}return(s.options.unknownHandler||Oc)(s,f,c)}function o(f){const c=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const m=s.one(d[p],f);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=xr(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=xr(b.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function _c(e,n){e.position&&(n.position=vs(e))}function Rc(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=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"&&a&&Object.assign(t.properties,St(a)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Oc(e,n){const t=n.data||{},r="value"in n&&!(sn.call(t,"hProperties")||sn.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 Bc(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
12
+ `});++r<e.length;)r&&t.push({type:"text",value:`
13
+ `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
14
+ `}),t}function xr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function yr(e,n){const t=Mc(e,n),r=t.one(e,void 0),i=Ec(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
15
+ `},i),a}function $c(e,n){return e&&"run"in e?async function(t,r){const i=yr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return yr(t,{file:r,...e||n})}}function kr(e){if(e)throw e}var _t,br;function Hc(){if(br)return _t;br=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(o){return typeof Array.isArray=="function"?Array.isArray(o):n.call(o)==="[object Array]"},a=function(o){if(!o||n.call(o)!=="[object Object]")return!1;var f=e.call(o,"constructor"),c=o.constructor&&o.constructor.prototype&&e.call(o.constructor.prototype,"isPrototypeOf");if(o.constructor&&!f&&!c)return!1;var d;for(d in o);return typeof d>"u"||e.call(o,d)},l=function(o,f){t&&f.name==="__proto__"?t(o,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):o[f.name]=f.newValue},s=function(o,f){if(f==="__proto__")if(e.call(o,f)){if(r)return r(o,f).value}else return;return o[f]};return _t=function u(){var o,f,c,d,p,m,b=arguments[0],S=1,k=arguments.length,v=!1;for(typeof b=="boolean"&&(v=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<k;++S)if(o=arguments[S],o!=null)for(f in o)c=s(b,f),d=s(o,f),b!==d&&(v&&d&&(a(d)||(p=i(d)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},l(b,{name:f,newValue:u(v,m,d)})):typeof d<"u"&&l(b,{name:f,newValue:d}));return b},_t}var Uc=Hc();const Rt=Vr(Uc);function on(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 qc(){const e=[],n={run:t,use:r};return n;function t(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(u,...o){const f=e[++a];let c=-1;if(u){l(u);return}for(;++c<i.length;)(o[c]===null||o[c]===void 0)&&(o[c]=i[c]);i=o,f?Vc(f,s)(...o):l(null,...o)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Vc(e,n){let t;return r;function r(...l){const s=e.length>l.length;let u;s&&l.push(i);try{u=e.apply(this,l)}catch(o){const f=o;if(s&&t)throw f;return i(f)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(l,...s){t||(t=!0,n(l,...s))}function a(l){i(null,l)}}const xe={basename:Wc,dirname:Jc,extname:Gc,join:Xc,sep:"/"};function Wc(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ft(e);let t=0,r=-1,i=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,s=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===n.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Jc(e){if(ft(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 Gc(e){ft(e);let n=e.length,t=-1,r=0,i=-1,a=0,l;for(;n--;){const s=e.codePointAt(n);if(s===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),s===46?i<0?i=n:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||t<0||a===0||a===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Xc(...e){let n=-1,t;for(;++n<e.length;)ft(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Yc(t)}function Yc(e){ft(e);const n=e.codePointAt(0)===47;let t=Kc(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Kc(e,n){let t="",r=0,i=-1,a=0,l=-1,s,u;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=l,a=0;continue}}else if(t.length>0){t="",r=0,i=l,a=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,a=0}else s===46&&a>-1?a++:a=-1}return t}function ft(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qc={cwd:Zc};function Zc(){return"/"}function un(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ef(e){if(typeof e=="string")e=new URL(e);else if(!un(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 tf(e)}function tf(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 Ot=["history","path","basename","stem","extname","dirname"];class Li{constructor(n){let t;n?un(n)?t={path:n}:typeof n=="string"||nf(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Qc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ot.length;){const a=Ot[r];a in t&&t[a]!==void 0&&t[a]!==null&&(this[a]=a==="history"?[...t[a]]:t[a])}let i;for(i in t)Ot.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?xe.basename(this.path):void 0}set basename(n){$t(n,"basename"),Bt(n,"basename"),this.path=xe.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?xe.dirname(this.path):void 0}set dirname(n){wr(this.basename,"dirname"),this.path=xe.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?xe.extname(this.path):void 0}set extname(n){if(Bt(n,"extname"),wr(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=xe.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){un(n)&&(n=ef(n)),$t(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?xe.basename(this.path,this.extname):void 0}set stem(n){$t(n,"stem"),Bt(n,"stem"),this.path=xe.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 ne(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 Bt(e,n){if(e&&e.includes(xe.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+xe.sep+"`")}function $t(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function wr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function nf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rf=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lf={}.hasOwnProperty;class Tn extends rf{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=qc()}copy(){const n=new Tn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Rt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(qt("data",this.frozen),this.namespace[n]=t,this):lf.call(this.namespace,n)&&this.namespace[n]||void 0:n?(qt("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=mt(n),r=this.parser||this.Parser;return Ht("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Ht("process",this.parser||this.Parser),Ut("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(a,l){const s=mt(n),u=r.parse(s);r.run(u,s,function(f,c,d){if(f||!c||!d)return o(f);const p=c,m=r.stringify(p,d);of(m)?d.value=m:d.result=m,o(f,d)});function o(f,c){f||!c?l(f):a?a(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Ht("processSync",this.parser||this.Parser),Ut("processSync",this.compiler||this.Compiler),this.process(n,i),Cr("processSync","process",t),r;function i(a,l){t=!0,kr(a),r=l}}run(n,t,r){Sr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(l,s){const u=mt(t);i.run(n,u,o);function o(f,c,d){const p=c||n;f?s(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,a),Cr("runSync","run",r),i;function a(l,s){kr(l),i=s,r=!0}}stringify(n,t){this.freeze();const r=mt(t),i=this.compiler||this.Compiler;return Ut("stringify",i),Sr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(qt("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function a(o){if(typeof o=="function")u(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[f,...c]=o;u(f,c)}else l(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function l(o){if(!("plugins"in o)&&!("settings"in o))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(o.plugins),o.settings&&(i.settings=Rt(!0,i.settings,o.settings))}function s(o){let f=-1;if(o!=null)if(Array.isArray(o))for(;++f<o.length;){const c=o[f];a(c)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function u(o,f){let c=-1,d=-1;for(;++c<r.length;)if(r[c][0]===o){d=c;break}if(d===-1)r.push([o,...f]);else if(f.length>0){let[p,...m]=f;const b=r[d][1];on(b)&&on(p)&&(p=Rt(!0,b,p)),r[d]=[o,p,...m]}}}}const af=new Tn().freeze();function Ht(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ut(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qt(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 Sr(e){if(!on(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Cr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function mt(e){return sf(e)?e:new Li(e)}function sf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function of(e){return typeof e=="string"||uf(e)}function uf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cf="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vr=[],jr={allowDangerousHtml:!0},ff=/^(https?|ircs?|mailto|xmpp)$/i,hf=[{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 pf(e){const n=df(e),t=mf(e);return gf(n.runSync(n.parse(t),t),e)}function df(e){const n=e.rehypePlugins||vr,t=e.remarkPlugins||vr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jr}:jr;return af().use(Ju).use(t).use($c,r).use(n)}function mf(e){const n=e.children||"",t=new Li;return typeof n=="string"&&(t.value=n),t}function gf(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,a=n.disallowedElements,l=n.skipHtml,s=n.unwrapDisallowed,u=n.urlTransform||xf;for(const f of hf)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+cf+f.id,void 0);return In(e,o),Is(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function o(f,c,d){if(f.type==="raw"&&d&&typeof c=="number")return l?d.children.splice(c,1):d.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Lt)if(Object.hasOwn(Lt,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],b=Lt[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=u(String(m||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):a?a.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,d)),p&&d&&typeof c=="number")return s&&f.children?d.children.splice(c,1,...f.children):d.children.splice(c,1),c}}}function xf(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||ff.test(e.slice(0,n))?e:""}function Er(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 yf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function kf(e,n,t){const i=It((t||{}).ignore||[]),a=bf(n);let l=-1;for(;++l<a.length;)Di(e,"text",s);function s(o,f){let c=-1,d;for(;++c<f.length;){const p=f[c],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return u(o,f)}function u(o,f){const c=f[f.length-1],d=a[l][0],p=a[l][1];let m=0;const S=c.children.indexOf(o);let k=!1,v=[];d.lastIndex=0;let j=d.exec(o.value);for(;j;){const L=j.index,I={index:j.index,input:j.input,stack:[...f,o]};let w=p(...j,I);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?d.lastIndex=L+1:(m!==L&&v.push({type:"text",value:o.value.slice(m,L)}),Array.isArray(w)?v.push(...w):w&&v.push(w),m=L+j[0].length,k=!0),!d.global)break;j=d.exec(o.value)}return k?(m<o.value.length&&v.push({type:"text",value:o.value.slice(m)}),c.children.splice(S,1,...v)):v=[o],S+v.length}}function bf(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([wf(i[0]),Sf(i[1])])}return n}function wf(e){return typeof e=="string"?new RegExp(yf(e),"g"):e}function Sf(e){return typeof e=="function"?e:function(){return e}}const Vt="phrasing",Wt=["autolink","link","image","label"];function Cf(){return{transforms:[Tf],enter:{literalAutolink:jf,literalAutolinkEmail:Jt,literalAutolinkHttp:Jt,literalAutolinkWww:Jt},exit:{literalAutolink:If,literalAutolinkEmail:Af,literalAutolinkHttp:Ef,literalAutolinkWww:Nf}}}function vf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vt,notInConstruct:Wt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vt,notInConstruct:Wt},{character:":",before:"[ps]",after:"\\/",inConstruct:Vt,notInConstruct:Wt}]}}function jf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jt(e){this.config.enter.autolinkProtocol.call(this,e)}function Ef(e){this.config.exit.autolinkProtocol.call(this,e)}function Nf(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 Af(e){this.config.exit.autolinkEmail.call(this,e)}function If(e){this.exit(e)}function Tf(e){kf(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Pf],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zf]],{ignore:["link","linkReference"]})}function Pf(e,n,t,r,i){let a="";if(!Fi(i)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!Df(t)))return!1;const l=Lf(t+r);if(!l[0])return!1;const s={type:"link",title:null,url:a+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function zf(e,n,t,r){return!Fi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Df(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 Lf(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=Er(e,"(");let a=Er(e,")");for(;r!==-1&&i>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function Fi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Le(t)||Et(t))&&(!n||t!==47)}Mi.peek=Uf;function Ff(){this.buffer()}function Mf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _f(){this.buffer()}function Rf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Of(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Bf(e){this.exit(e)}function $f(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hf(e){this.exit(e)}function Uf(){return"["}function Mi(e,n,t,r){const i=t.createTracker(r);let a=i.move("[^");const l=t.enter("footnoteReference"),s=t.enter("reference");return a+=i.move(t.safe(t.associationId(e),{after:"]",before:a})),s(),l(),a+=i.move("]"),a}function qf(){return{enter:{gfmFootnoteCallString:Ff,gfmFootnoteCall:Mf,gfmFootnoteDefinitionLabelString:_f,gfmFootnoteDefinition:Rf},exit:{gfmFootnoteCallString:Of,gfmFootnoteCall:Bf,gfmFootnoteDefinitionLabelString:$f,gfmFootnoteDefinition:Hf}}}function Vf(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Mi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,a,l){const s=a.createTracker(l);let u=s.move("[^");const o=a.enter("footnoteDefinition"),f=a.enter("label");return u+=s.move(a.safe(a.associationId(r),{before:u,after:"]"})),f(),u+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),u+=s.move((n?`
16
+ `:" ")+a.indentLines(a.containerFlow(r,s.current()),n?_i:Wf))),o(),u}}function Wf(e,n,t){return n===0?e:_i(e,n,t)}function _i(e,n,t){return(t?"":" ")+e}const Jf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ri.peek=Qf;function Gf(){return{canContainEols:["delete"],enter:{strikethrough:Yf},exit:{strikethrough:Kf}}}function Xf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Jf}],handlers:{delete:Ri}}}function Yf(e){this.enter({type:"delete",children:[]},e)}function Kf(e){this.exit(e)}function Ri(e,n,t,r){const i=t.createTracker(r),a=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function Qf(){return"~"}function Zf(e){return e.length}function eh(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||Zf,a=[],l=[],s=[],u=[];let o=0,f=-1;for(;++f<e.length;){const b=[],S=[];let k=-1;for(e[f].length>o&&(o=e[f].length);++k<e[f].length;){const v=th(e[f][k]);if(t.alignDelimiters!==!1){const j=i(v);S[k]=j,(u[k]===void 0||j>u[k])&&(u[k]=j)}b.push(v)}l[f]=b,s[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<o;)a[c]=Nr(r[c]);else{const b=Nr(r);for(;++c<o;)a[c]=b}c=-1;const d=[],p=[];for(;++c<o;){const b=a[c];let S="",k="";b===99?(S=":",k=":"):b===108?S=":":b===114&&(k=":");let v=t.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-k.length);const j=S+"-".repeat(v)+k;t.alignDelimiters!==!1&&(v=S.length+v+k.length,v>u[c]&&(u[c]=v),p[c]=v),d[c]=j}l.splice(1,0,d),s.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const b=l[f],S=s[f];c=-1;const k=[];for(;++c<o;){const v=b[c]||"";let j="",L="";if(t.alignDelimiters!==!1){const I=u[c]-(S[c]||0),w=a[c];w===114?j=" ".repeat(I):w===99?I%2?(j=" ".repeat(I/2+.5),L=" ".repeat(I/2-.5)):(j=" ".repeat(I/2),L=j):L=" ".repeat(I)}t.delimiterStart!==!1&&!c&&k.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||c)&&k.push(" "),t.alignDelimiters!==!1&&k.push(j),k.push(v),t.alignDelimiters!==!1&&k.push(L),t.padding!==!1&&k.push(" "),(t.delimiterEnd!==!1||c!==o-1)&&k.push("|")}m.push(t.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return m.join(`
17
+ `)}function th(e){return e==null?"":String(e)}function Nr(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 nh(e,n,t,r){const i=t.enter("blockquote"),a=t.createTracker(r);a.move("> "),a.shift(2);const l=t.indentLines(t.containerFlow(e,a.current()),rh);return i(),l}function rh(e,n,t){return">"+(t?"":" ")+e}function ih(e,n){return Ar(e,n.inConstruct,!0)&&!Ar(e,n.notInConstruct,!1)}function Ar(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 Ir(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
18
+ `&&ih(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
19
+ `}function lh(e,n){const t=String(e);let r=t.indexOf(n),i=r,a=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+n.length,r=t.indexOf(n,i);return l}function ah(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 sh(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 oh(e,n,t,r){const i=sh(t),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(ah(e,t)){const c=t.enter("codeIndented"),d=t.indentLines(a,uh);return c(),d}const s=t.createTracker(r),u=i.repeat(Math.max(lh(a,i)+1,3)),o=t.enter("codeFenced");let f=s.move(u);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=s.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=s.move(" "),f+=s.move(t.safe(e.meta,{before:f,after:`
20
+ `,encode:["`"],...s.current()})),c()}return f+=s.move(`
21
+ `),a&&(f+=s.move(a+`
22
+ `)),f+=s.move(u),o(),f}function uh(e,n,t){return(t?"":" ")+e}function Pn(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 ch(e,n,t,r){const i=Pn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let s=t.enter("label");const u=t.createTracker(r);let o=u.move("[");return o+=u.move(t.safe(t.associationId(e),{before:o,after:"]",...u.current()})),o+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),o+=u.move("<"),o+=u.move(t.safe(e.url,{before:o,after:">",...u.current()})),o+=u.move(">")):(s=t.enter("destinationRaw"),o+=u.move(t.safe(e.url,{before:o,after:e.title?" ":`
23
+ `,...u.current()}))),s(),e.title&&(s=t.enter(`title${a}`),o+=u.move(" "+i),o+=u.move(t.safe(e.title,{before:o,after:i,...u.current()})),o+=u.move(i),s()),l(),o}function fh(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 at(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ct(e,n,t){const r=qe(e),i=qe(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=hh;function Oi(e,n,t,r){const i=fh(t),a=t.enter("emphasis"),l=t.createTracker(r),s=l.move(i);let u=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const o=u.charCodeAt(0),f=Ct(r.before.charCodeAt(r.before.length-1),o,i);f.inside&&(u=at(o)+u.slice(1));const c=u.charCodeAt(u.length-1),d=Ct(r.after.charCodeAt(0),c,i);d.inside&&(u=u.slice(0,-1)+at(c));const p=l.move(i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+u+p}function hh(e,n,t){return t.options.emphasis||"*"}function ph(e,n){let t=!1;return In(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,an}),!!((!e.depth||e.depth<3)&&Sn(e)&&(n.options.setext||t))}function dh(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(ph(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),d=t.containerPhrasing(e,{...a.current(),before:`
24
+ `,after:`
25
+ `});return c(),f(),d+`
26
+ `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
27
+ `))+1))}const l="#".repeat(i),s=t.enter("headingAtx"),u=t.enter("phrasing");a.move(l+" ");let o=t.containerPhrasing(e,{before:"# ",after:`
28
+ `,...a.current()});return/^[\t ]/.test(o)&&(o=at(o.charCodeAt(0))+o.slice(1)),o=o?l+" "+o:l,t.options.closeAtx&&(o+=" "+l),u(),s(),o}Bi.peek=mh;function Bi(e){return e.value||""}function mh(){return"<"}$i.peek=gh;function $i(e,n,t,r){const i=Pn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let s=t.enter("label");const u=t.createTracker(r);let o=u.move("![");return o+=u.move(t.safe(e.alt,{before:o,after:"]",...u.current()})),o+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),o+=u.move("<"),o+=u.move(t.safe(e.url,{before:o,after:">",...u.current()})),o+=u.move(">")):(s=t.enter("destinationRaw"),o+=u.move(t.safe(e.url,{before:o,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=t.enter(`title${a}`),o+=u.move(" "+i),o+=u.move(t.safe(e.title,{before:o,after:i,...u.current()})),o+=u.move(i),s()),o+=u.move(")"),l(),o}function gh(){return"!"}Hi.peek=xh;function Hi(e,n,t,r){const i=e.referenceType,a=t.enter("imageReference");let l=t.enter("label");const s=t.createTracker(r);let u=s.move("![");const o=t.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(o+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!o||o!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function xh(){return"!"}Ui.peek=yh;function Ui(e,n,t){let r=e.value||"",i="`",a=-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+" ");++a<t.unsafe.length;){const l=t.unsafe[a],s=t.compilePattern(l);let u;if(l.atBreak)for(;u=s.exec(r);){let o=u.index;r.charCodeAt(o)===10&&r.charCodeAt(o-1)===13&&o--,r=r.slice(0,o)+" "+r.slice(u.index+1)}}return i+r+i}function yh(){return"`"}function qi(e,n){const t=Sn(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))}Vi.peek=kh;function Vi(e,n,t,r){const i=Pn(t),a=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let s,u;if(qi(e,t)){const f=t.stack;t.stack=[],s=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),s(),t.stack=f,c}s=t.enter("link"),u=t.enter("label");let o=l.move("[");return o+=l.move(t.containerPhrasing(e,{before:o,after:"](",...l.current()})),o+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),o+=l.move("<"),o+=l.move(t.safe(e.url,{before:o,after:">",...l.current()})),o+=l.move(">")):(u=t.enter("destinationRaw"),o+=l.move(t.safe(e.url,{before:o,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=t.enter(`title${a}`),o+=l.move(" "+i),o+=l.move(t.safe(e.title,{before:o,after:i,...l.current()})),o+=l.move(i),u()),o+=l.move(")"),s(),o}function kh(e,n,t){return qi(e,t)?"<":"["}Wi.peek=bh;function Wi(e,n,t,r){const i=e.referenceType,a=t.enter("linkReference");let l=t.enter("label");const s=t.createTracker(r);let u=s.move("[");const o=t.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(o+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:u,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!o||o!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function bh(){return"["}function zn(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 wh(e){const n=zn(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 Sh(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 Ji(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 Ch(e,n,t,r){const i=t.enter("list"),a=t.bulletCurrent;let l=e.ordered?Sh(t):zn(t);const s=e.ordered?l==="."?")":".":wh(t);let u=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&&(u=!0),Ji(t)===l&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=s),t.bulletCurrent=l;const o=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=a,i(),o}function vh(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 jh(e,n,t,r){const i=vh(t);let a=t.bulletCurrent||zn(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=t.createTracker(r);s.move(a+" ".repeat(l-a.length)),s.shift(l);const u=t.enter("listItem"),o=t.indentLines(t.containerFlow(e,s.current()),f);return u(),o;function f(c,d,p){return d?(p?"":" ".repeat(l))+c:(p?a:a+" ".repeat(l-a.length))+c}}function Eh(e,n,t,r){const i=t.enter("paragraph"),a=t.enter("phrasing"),l=t.containerPhrasing(e,r);return a(),i(),l}const Nh=It(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ah(e,n,t,r){return(e.children.some(function(l){return Nh(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Ih(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Gi.peek=Th;function Gi(e,n,t,r){const i=Ih(t),a=t.enter("strong"),l=t.createTracker(r),s=l.move(i+i);let u=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const o=u.charCodeAt(0),f=Ct(r.before.charCodeAt(r.before.length-1),o,i);f.inside&&(u=at(o)+u.slice(1));const c=u.charCodeAt(u.length-1),d=Ct(r.after.charCodeAt(0),c,i);d.inside&&(u=u.slice(0,-1)+at(c));const p=l.move(i+i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+u+p}function Th(e,n,t){return t.options.strong||"*"}function Ph(e,n,t,r){return t.safe(e.value,r)}function zh(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 Dh(e,n,t){const r=(Ji(t)+(t.options.ruleSpaces?" ":"")).repeat(zh(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Xi={blockquote:nh,break:Ir,code:oh,definition:ch,emphasis:Oi,hardBreak:Ir,heading:dh,html:Bi,image:$i,imageReference:Hi,inlineCode:Ui,link:Vi,linkReference:Wi,list:Ch,listItem:jh,paragraph:Eh,root:Ah,strong:Gi,text:Ph,thematicBreak:Dh};function Lh(){return{enter:{table:Fh,tableData:Tr,tableHeader:Tr,tableRow:_h},exit:{codeText:Rh,table:Mh,tableData:Gt,tableHeader:Gt,tableRow:Gt}}}function Fh(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 Mh(e){this.exit(e),this.data.inTable=void 0}function _h(e){this.enter({type:"tableRow",children:[]},e)}function Gt(e){this.exit(e)}function Tr(e){this.enter({type:"tableCell",children:[]},e)}function Rh(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Oh));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Oh(e,n){return n==="|"?n:e}function Bh(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
29
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:l,tableCell:u,tableRow:s}};function l(p,m,b,S){return o(f(p,b,S),p.align)}function s(p,m,b,S){const k=c(p,b,S),v=o([k]);return v.slice(0,v.indexOf(`
30
+ `))}function u(p,m,b,S){const k=b.enter("tableCell"),v=b.enter("phrasing"),j=b.containerPhrasing(p,{...S,before:a,after:a});return v(),k(),j}function o(p,m){return eh(p,{align:m,alignDelimiters:r,padding:t,stringLength:i})}function f(p,m,b){const S=p.children;let k=-1;const v=[],j=m.enter("table");for(;++k<S.length;)v[k]=c(S[k],m,b);return j(),v}function c(p,m,b){const S=p.children;let k=-1;const v=[],j=m.enter("tableRow");for(;++k<S.length;)v[k]=u(S[k],p,m,b);return j(),v}function d(p,m,b){let S=Xi.inlineCode(p,m,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function $h(){return{exit:{taskListCheckValueChecked:Pr,taskListCheckValueUnchecked:Pr,paragraph:Uh}}}function Hh(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:qh}}}function Pr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Uh(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 a=-1,l;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){l=s;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 qh(e,n,t,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);a&&s.move(l);let u=Xi.listItem(e,n,t,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,o)),u;function o(f){return f+l}}function Vh(){return[Cf(),qf(),Gf(),Lh(),$h()]}function Wh(e){return{extensions:[vf(),Vf(e),Xf(),Bh(e),Hh()]}}const Jh={tokenize:Zh,partial:!0},Yi={tokenize:ep,partial:!0},Ki={tokenize:tp,partial:!0},Qi={tokenize:np,partial:!0},Gh={tokenize:rp,partial:!0},Zi={name:"wwwAutolink",tokenize:Kh,previous:tl},el={name:"protocolAutolink",tokenize:Qh,previous:nl},ve={name:"emailAutolink",tokenize:Yh,previous:rl},ke={};function Xh(){return{text:ke}}let Te=48;for(;Te<123;)ke[Te]=ve,Te++,Te===58?Te=65:Te===91&&(Te=97);ke[43]=ve;ke[45]=ve;ke[46]=ve;ke[95]=ve;ke[72]=[ve,el];ke[104]=[ve,el];ke[87]=[ve,Zi];ke[119]=[ve,Zi];function Yh(e,n,t){const r=this;let i,a;return l;function l(c){return!cn(c)||!rl.call(r,r.previous)||Dn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return cn(c)?(e.consume(c),s):c===64?(e.consume(c),u):t(c)}function u(c){return c===46?e.check(Gh,f,o)(c):c===45||c===95||te(c)?(a=!0,e.consume(c),u):f(c)}function o(c){return e.consume(c),i=!0,u}function f(c){return a&&i&&re(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Kh(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!tl.call(r,r.previous)||Dn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Jh,e.attempt(Yi,e.attempt(Ki,a),t),t)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function Qh(e,n,t){const r=this;let i="",a=!1;return l;function l(c){return(c===72||c===104)&&nl.call(r,r.previous)&&!Dn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):t(c)}function s(c){if(re(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),u}return t(c)}function u(c){return c===47?(e.consume(c),a?o:(a=!0,u)):t(c)}function o(c){return c===null||bt(c)||G(c)||Le(c)||Et(c)?t(c):e.attempt(Yi,e.attempt(Ki,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Zh(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),a):t(l)}function a(l){return l===null?t(l):n(l)}}function ep(e,n,t){let r,i,a;return l;function l(o){return o===46||o===95?e.check(Qi,u,s)(o):o===null||G(o)||Le(o)||o!==45&&Et(o)?u(o):(a=!0,e.consume(o),l)}function s(o){return o===95?r=!0:(i=r,r=void 0),e.consume(o),l}function u(o){return i||r||!a?t(o):n(o)}}function tp(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?a(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(Qi,n,a)(l):l===null||G(l)||Le(l)?n(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function np(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||G(s)||Le(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||G(s)||Le(s)?n(s):r(s)}function a(s){return re(s)?l(s):t(s)}function l(s){return s===59?(e.consume(s),r):re(s)?(e.consume(s),l):t(s)}}function rp(e,n,t){return r;function r(a){return e.consume(a),i}function i(a){return te(a)?t(a):n(a)}}function tl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||G(e)}function nl(e){return!re(e)}function rl(e){return!(e===47||cn(e))}function cn(e){return e===43||e===45||e===46||e===95||te(e)}function Dn(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 ip={tokenize:hp,partial:!0};function lp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:up,continuation:{tokenize:cp},exit:fp}},text:{91:{name:"gfmFootnoteCall",tokenize:op},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ap,resolveTo:sp}}}}function ap(e,n,t){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!l||!l._balanced)return t(u);const o=ge(r.sliceSerialize({start:l.end,end:r.now()}));return o.codePointAt(0)!==94||!a.includes(o.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function sp(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...s),e}function op(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",o)}function o(c){if(a>999||c===93&&!l||c===null||c===91||G(c))return t(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return G(c)||(l=!0),a++,e.consume(c),c===92?f:o}function f(c){return c===91||c===92||c===93?(e.consume(c),a++,o):o(c)}}function up(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),o}function o(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!s||m===null||m===91||G(m))return t(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=ge(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return G(m)||(s=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),q(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function cp(e,n,t){return e.check(ct,n,e.attempt(ip,n,t))}function fp(e){e.exit("gfmFootnoteDefinition")}function hp(e,n,t){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(a):t(a)}}function pp(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let o=u;for(;o--;)if(l[o][0]==="exit"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[o][1].end.offset-l[o][1].start.offset){l[u][1].type="strikethroughSequence",l[o][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[o][1].start),end:Object.assign({},l[u][1].end)},c={type:"strikethroughText",start:Object.assign({},l[o][1].end),end:Object.assign({},l[u][1].start)},d=[["enter",f,s],["enter",l[o][1],s],["exit",l[o][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ue(d,d.length,0,Nt(p,l.slice(o+1,u),s)),ue(d,d.length,0,[["exit",c,s],["enter",l[u][1],s],["exit",l[u][1],s],["exit",f,s]]),ue(l,o-1,u-o+3,d),u=o+d.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function a(l,s,u){const o=this.previous,f=this.events;let c=0;return d;function d(m){return o===126&&f[f.length-1][1].type!=="characterEscape"?u(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const b=qe(o);if(m===126)return c>1?u(m):(l.consume(m),c++,p);if(c<2&&!t)return u(m);const S=l.exit("strikethroughSequenceTemporary"),k=qe(m);return S._open=!k||k===2&&!!b,S._close=!b||b===2&&!!k,s(m)}}}class dp{constructor(){this.map=[]}add(n,t,r){mp(this,n,t,r)}consume(n){if(this.map.sort(function(a,l){return a[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 a of i)n.push(a);i=r.pop()}this.map.length=0}}function mp(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 gp(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 a=r.length-1;r[a]=r[a]==="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 xp(){return{flow:{null:{name:"table",tokenize:yp,resolveAll:kp}}}}function yp(e,n,t){const r=this;let i=0,a=0,l;return s;function s(y){let A=r.events.length-1;for(;A>-1;){const F=r.events[A][1].type;if(F==="lineEnding"||F==="linePrefix")A--;else break}const P=A>-1?r.events[A][1].type:null,B=P==="tableHead"||P==="tableRow"?w:u;return B===w&&r.parser.lazy[r.now().line]?t(y):B(y)}function u(y){return e.enter("tableHead"),e.enter("tableRow"),o(y)}function o(y){return y===124||(l=!0,a+=1),f(y)}function f(y){return y===null?t(y):M(y)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):H(y)?q(e,f,"whitespace")(y):(a+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||G(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?d:c)}function d(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?q(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):I(y)}function b(y){return H(y)?q(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),k):y===45?(a+=1,k(y)):y===null||M(y)?L(y):I(y)}function k(y){return y===45?(e.enter("tableDelimiterFiller"),v(y)):I(y)}function v(y){return y===45?(e.consume(y),v):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(y))}function j(y){return H(y)?q(e,L,"whitespace")(y):L(y)}function L(y){return y===124?m(y):y===null||M(y)?!l||i!==a?I(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):I(y)}function I(y){return t(y)}function w(y){return e.enter("tableRow"),_(y)}function _(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),_):y===null||M(y)?(e.exit("tableRow"),n(y)):H(y)?q(e,_,"whitespace")(y):(e.enter("data"),R(y))}function R(y){return y===null||y===124||G(y)?(e.exit("data"),_(y)):(e.consume(y),y===92?D:R)}function D(y){return y===92||y===124?(e.consume(y),R):R(y)}}function kp(e,n){let t=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,u=0,o,f,c;const d=new dp;for(;++t<e.length;){const p=e[t],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(zr(d,n,u,o,f),f=void 0,u=0),o={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",o,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],l=[0,t+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",f,n]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],c=gt(d,n,a,i,void 0,c),a=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],c=gt(d,n,a,i,void 0,c)),a=l,l=[a[1],t,0,0])):m.type==="tableHead"?(s=!0,u=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=t,a[1]!==0?(l[0]=l[1],c=gt(d,n,a,i,t,c)):l[1]!==0&&(c=gt(d,n,l,i,t,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(u!==0&&zr(d,n,u,o,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=gp(n.events,t))}return e}function gt(e,n,t,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(a.end=Object.assign({},Be(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));const u=Be(n.events,t[1]);if(a={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){const o=Be(n.events,t[2]),f=Be(n.events,t[3]),c={type:s,start:Object.assign({},o),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,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 m=t[2]+1,b=t[3]-t[2]-1;e.add(m,b,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(a.end=Object.assign({},Be(n.events,i)),e.add(i,0,[["exit",a,n]]),a=void 0),a}function zr(e,n,t,r,i){const a=[],l=Be(n.events,t);i&&(i.end=Object.assign({},l),a.push(["exit",i,n])),r.end=Object.assign({},l),a.push(["exit",r,n]),e.add(t+1,0,a)}function Be(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const bp={name:"tasklistCheck",tokenize:Sp};function wp(){return{text:{91:bp}}}function Sp(e,n,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return G(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):t(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(u)}function s(u){return M(u)?n(u):H(u)?e.check({tokenize:Cp},n,t)(u):t(u)}}function Cp(e,n,t){return q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function vp(e){return pi([Xh(),lp(),pp(e),xp(),wp()])}const jp={};function Ep(e){const n=this,t=e||jp,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(vp(t)),a.push(Vh()),l.push(Wh(t))}const Pe=()=>`${window.routePrefix??""}/docs/api`,Np=e=>`${window.routePrefix??""}/docs/${encodeURIComponent(e)}`,vt={list:async(e,n)=>{const{data:t}=await ee.getJson(`${Pe()}/list`,{params:{locale:e},signal:n});return t.documents??[]},keywords:async(e,n)=>{const{data:t}=await ee.getJson(`${Pe()}/keywords`,{params:{locale:e},signal:n});return t.keywords??{}},search:async(e,n)=>{const{data:t}=await ee.getJson(`${Pe()}/search`,{params:{q:e.query||void 0,keywords:e.keywords?.length?e.keywords.join(","):void 0,url:e.url||void 0,model:e.model||void 0,locale:e.locale||void 0},signal:n});return t.results??[]},context:async(e,n,t,r)=>{const{data:i}=await ee.getJson(`${Pe()}/context`,{params:{url:e,model:n,locale:t},signal:r});return i.documents??[]},doc:async(e,n,t)=>{const{data:r}=await ee.getJson(`${Pe()}/doc/${encodeURIComponent(e)}`,{params:{locale:n},signal:t});return r},resolve:async(e,n,t)=>{if(n.length===0)return{};const{data:r}=await ee.getJson(`${Pe()}/resolve`,{params:{from:e,refs:n.join(",")},signal:t});return r.resolved??{}},schema:async(e,n)=>{const{data:t}=await ee.getJson(`${Pe()}/schema`,{params:{model:e},signal:n});return t}},yt=e=>e.trim().toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,""),td=e=>{const n=[];let t=!1;for(const r of e.split(`
31
+ `)){if(/^\s*(```|~~~)/.test(r)){t=!t;continue}if(t)continue;const i=/^(#{2,3})\s+(.+?)\s*#*\s*$/.exec(r);if(!i)continue;const a=i[2].replace(/[*_`]/g,"").trim();n.push({depth:i[1].length,title:a,slug:yt(a)})}return n},Ap=e=>{const n=new Set,t=/\]\(\s*([^)\s]+)/g;let r;for(;(r=t.exec(e))!==null;){const i=r[1];!i||i.startsWith("#")||i.startsWith("/")||/^[a-z][a-z0-9+.-]*:/i.test(i)||i.startsWith("//")||n.add(i)}return[...n]},$e=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map($e).join(""):N.isValidElement(e)?$e(e.props.children):"",Ip=()=>typeof document<"u"&&document.documentElement.classList.contains("dark"),Tp=()=>{const[e,n]=N.useState(!1);return{isCopied:e,copy:r=>{!r||typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)},()=>{})}}},Pp=({code:e})=>{const[n,t]=N.useState(null),[r,i]=N.useState(!1),a=N.useId().replace(/[^a-zA-Z0-9]/g,"");return N.useEffect(()=>{let l=!1;return t(null),i(!1),ha(()=>import("./mermaid.core-aKMJHeEk.js").then(s=>s.bI),__vite__mapDeps([0,1,2,3]),import.meta.url).then(async({default:s})=>{s.initialize({startOnLoad:!1,securityLevel:"strict",theme:Ip()?"dark":"default"});const u=await s.render(`mermaid-${a}`,e);l||t(u.svg)}).catch(()=>{l||i(!0)}),()=>{l=!0}},[e,a]),r?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):n?h.jsx("div",{className:"my-3 flex justify-center overflow-x-auto rounded-xl border p-3 [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:n}}):h.jsx("div",{className:"bg-muted/30 text-muted-foreground my-3 rounded-xl border p-4 text-sm",children:"…"})},zp=({source:e})=>{const[n,t]=N.useState(null),[r,i]=N.useState(null),[a,l]=N.useState(!1),s=N.useMemo(()=>{try{const u=JSON.parse(e);return u&&typeof u=="object"?u:null}catch{return null}},[e]);return N.useEffect(()=>{if(!s){l(!0);return}if(s.fields){t(s.fields),i(s.title??null);return}if(!s.model){l(!0);return}const u=new AbortController;return vt.schema(s.model,u.signal).then(o=>{u.signal.aborted||(t(o.fields),i(s.title??o.title))}).catch(()=>{u.signal.aborted||l(!0)}),()=>u.abort()},[s]),a?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):h.jsx(Qr,{className:"my-3",fields:n,title:r,loading:!n})},Dp=({language:e,code:n})=>{const{isCopied:t,copy:r}=Tp();return h.jsxs("div",{className:"my-3",children:[h.jsxs("div",{className:"border-border/50 bg-muted/50 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs",children:[h.jsx("span",{className:"text-muted-foreground font-medium lowercase",children:e}),h.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(n),"aria-label":"Copy",children:t?h.jsx(pa,{className:"size-3.5"}):h.jsx(da,{className:"size-3.5"})})]}),h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-b-xl border border-t-0 p-3.5 text-[13px] leading-relaxed",children:h.jsx("code",{children:n})})]})};function Lp({markdown:e,docLinks:n={},onDocLink:t,className:r}){const i=N.useMemo(()=>({h1:({className:a,children:l,...s})=>h.jsx("h1",{id:yt($e(l)),className:X("aui-md-h1 mt-6 mb-3 scroll-mt-20 text-2xl font-semibold first:mt-0",a),...s,children:l}),h2:({className:a,children:l,...s})=>h.jsx("h2",{id:yt($e(l)),className:X("aui-md-h2 mt-6 mb-2 scroll-mt-20 text-xl font-semibold first:mt-0",a),...s,children:l}),h3:({className:a,children:l,...s})=>h.jsx("h3",{id:yt($e(l)),className:X("aui-md-h3 mt-5 mb-2 scroll-mt-20 text-lg font-semibold first:mt-0",a),...s,children:l}),h4:({className:a,...l})=>h.jsx("h4",{className:X("aui-md-h4 mt-4 mb-1.5 text-base font-medium first:mt-0",a),...l}),p:({className:a,...l})=>h.jsx("p",{className:X("aui-md-p my-3 leading-relaxed first:mt-0 last:mb-0",a),...l}),a:({className:a,href:l,children:s,...u})=>{const o=(l??"").trim(),f=X("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2",a);if(o.startsWith("#"))return h.jsx("a",{className:f,href:o,...u,children:s});if(/^[a-z][a-z0-9+.-]*:/i.test(o)||o.startsWith("//"))return h.jsx("a",{className:f,href:o,target:"_blank",rel:"noreferrer",...u,children:s});if(o.startsWith("/"))return h.jsx("a",{className:f,href:o,onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),mn.visit(o))},...u,children:s});const d=n[o]??n[o.replace(/#.*$/,"")];return!d||!t?h.jsx("span",{className:X("text-foreground",a),children:s}):h.jsx("a",{className:f,href:Np(d),onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),t(d))},...u,children:s})},blockquote:({className:a,...l})=>h.jsx("blockquote",{className:X("aui-md-blockquote border-muted-foreground/30 text-muted-foreground my-3 border-s-2 ps-4",a),...l}),ul:({className:a,...l})=>h.jsx("ul",{className:X("aui-md-ul marker:text-muted-foreground my-3 ms-5 list-disc [&>li]:mt-1",a),...l}),ol:({className:a,...l})=>h.jsx("ol",{className:X("aui-md-ol marker:text-muted-foreground my-3 ms-5 list-decimal [&>li]:mt-1",a),...l}),li:({className:a,...l})=>h.jsx("li",{className:X("aui-md-li leading-relaxed",a),...l}),hr:({className:a,...l})=>h.jsx("hr",{className:X("aui-md-hr border-muted-foreground/20 my-4",a),...l}),table:({className:a,...l})=>h.jsx("div",{className:"my-3 overflow-x-auto",children:h.jsx("table",{className:X("aui-md-table w-full border-separate border-spacing-0 text-sm",a),...l})}),th:({className:a,...l})=>h.jsx("th",{className:X("aui-md-th bg-muted px-3 py-1.5 text-start font-medium first:rounded-ss-lg last:rounded-se-lg",a),...l}),td:({className:a,...l})=>h.jsx("td",{className:X("aui-md-td border-muted-foreground/20 border-s border-b px-3 py-1.5 text-start last:border-e",a),...l}),tr:({className:a,...l})=>h.jsx("tr",{className:X("aui-md-tr m-0 border-b p-0 first:border-t",a),...l}),img:({className:a,...l})=>h.jsx("img",{className:X("my-3 max-w-full rounded-lg border",a),...l}),code:({className:a,...l})=>h.jsx("code",{className:X("aui-md-inline-code bg-muted rounded-md px-1.5 py-0.5 font-mono text-[0.85em]",a),...l}),pre:({children:a})=>{const l=Array.isArray(a)?a[0]:a;if(!N.isValidElement(l))return h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 my-3 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:a});const s=/language-([\w-]+)/.exec(l.props.className??"")?.[1]??"",u=$e(l.props.children).replace(/\n$/,"");return s==="mermaid"?h.jsx(Pp,{code:u}):s==="schema"?h.jsx(zp,{source:u}):h.jsx(Dp,{language:s||"text",code:u})}}),[n,t]);return h.jsx("div",{className:X("aui-md text-sm",r),children:h.jsx(pf,{remarkPlugins:[Ep],components:i,children:e})})}function Fp(e,n){const[t,r]=N.useState(null),[i,a]=N.useState({}),[l,s]=N.useState(!1),[u,o]=N.useState(!1);return N.useEffect(()=>{if(!e){r(null),a({}),o(!1);return}const f=new AbortController;return s(!0),o(!1),vt.doc(e,n,f.signal).then(async c=>{if(f.signal.aborted)return;r(c);const d=Ap(c.markdown),p=d.length>0?await vt.resolve(c.meta.id,d,f.signal).catch(()=>({})):{};f.signal.aborted||a(p)}).catch(()=>{f.signal.aborted||(r(null),o(!0))}).finally(()=>{f.signal.aborted||s(!1)}),()=>f.abort()},[e,n]),{content:t,docLinks:i,loading:l,error:u}}const Mp="adminizer:ai-attach-doc";function _p(e){window.__adminizerAttachDoc__=e,window.dispatchEvent(new CustomEvent(Mp,{detail:e}))}const it="info",Dr=()=>{if(typeof window>"u")return{open:!1,docId:null};const e=window.location.hash.replace(/^#/,"");return e===it?{open:!0,docId:null}:e.startsWith(`${it}=`)?{open:!0,docId:decodeURIComponent(e.slice(it.length+1))||null}:{open:!1,docId:null}},Rp=e=>{const{pathname:n,search:t}=window.location;window.history.pushState(null,"",`${n}${t}${e}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},Op=()=>{const[e,n]=N.useState(Dr);return N.useEffect(()=>{const t=()=>n(Dr());window.addEventListener("hashchange",t),window.addEventListener("popstate",t);const r=mn.on("navigate",t);return()=>{window.removeEventListener("hashchange",t),window.removeEventListener("popstate",t),r()}},[]),e},Bp=()=>{const e=ye();return N.useMemo(()=>{const n=window.routePrefix??"",t=(e.url||window.location.pathname).split(/[?#]/)[0],r=n&&t.startsWith(n)?t.slice(n.length):t,i=/^\/model\/([^/]+)/.exec(r);return i?decodeURIComponent(i[1]):null},[e.url])};function $p({open:e,docId:n,items:t,model:r,onOpenDoc:i,onClose:a}){const{t:l,locale:s}=st(),{isEnabled:u,openChat:o}=jt(),[f,c]=N.useState(void 0),{content:d,docLinks:p,loading:m,error:b}=Fp(e?n:null,f??s),[S,k]=N.useState(null),[v,j]=N.useState(!1),[L,I]=N.useState("docs");N.useEffect(()=>c(void 0),[n]),N.useEffect(()=>{if(!e||!r)return;const D=new AbortController;return k(null),j(!1),vt.schema(r,D.signal).then(y=>{D.signal.aborted||k(y)}).catch(()=>{D.signal.aborted||j(!0)}),()=>D.abort()},[r,e]);const w=N.useMemo(()=>{const D=new Map;for(const y of t){const A=y.section??"";D.set(A,[...D.get(A)??[],y])}return[...D.entries()]},[t]),_=N.useRef(!1),R=()=>{d&&(_.current=!0,a(),o(),_p({id:d.meta.id,title:d.meta.title}))};return h.jsx(ga,{open:e,onOpenChange:D=>!D&&a(),children:h.jsxs(xa,{side:"right",className:"z-[1002] w-full gap-0 p-0 sm:max-w-xl",onCloseAutoFocus:D=>{_.current&&(_.current=!1,D.preventDefault())},children:[h.jsxs(ya,{className:"border-b px-4 py-3",children:[h.jsxs("div",{className:"flex items-center gap-2 pe-8",children:[n&&h.jsx(le,{variant:"ghost",size:"icon",className:"-ms-2 shrink-0",onClick:()=>i(null),"aria-label":l("Back to contents"),children:h.jsx(ka,{className:"size-4"})}),h.jsx(ba,{className:"truncate",children:n?d?.meta.title??l("Documentation"):l("Page documentation")})]}),h.jsx(wa,{className:"sr-only",children:l("Documentation")})]}),h.jsxs(Sa,{value:r?L:"docs",onValueChange:I,className:"flex min-h-0 flex-1 flex-col gap-0",children:[r&&h.jsxs(Ca,{className:"mx-4 mt-3 w-fit",children:[h.jsx(Hn,{value:"docs",children:l("Documentation")}),h.jsx(Hn,{value:"schema",children:l("Schema")})]}),h.jsx(Un,{value:"docs",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:n?m&&!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Loading...")}):b||!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Failed to load documentation")}):h.jsxs("div",{className:"flex flex-col gap-3",children:[(d.meta.locales?.length??0)>1&&h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground text-xs",children:l("Language")}),d.meta.locales?.map(D=>h.jsx("button",{type:"button",onClick:()=>c(D),className:X("rounded-full border px-2 py-0.5 text-xs uppercase transition-colors",D===d.locale?"bg-primary text-primary-foreground border-transparent":"hover:bg-accent"),children:D},D))]}),h.jsx(Lp,{markdown:d.markdown,docLinks:p,onDocLink:i})]}):t.length===0?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Nothing found")}):h.jsx("div",{className:"flex flex-col gap-4",children:w.map(([D,y])=>h.jsxs("div",{className:"flex flex-col gap-1",children:[D&&h.jsx("div",{className:"text-muted-foreground px-1 text-xs font-medium uppercase",children:D}),y.map(A=>h.jsxs("button",{type:"button",onClick:()=>i(A.id),className:"hover:bg-accent flex items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm transition-colors",children:[h.jsx(va,{className:"text-muted-foreground size-4 shrink-0"}),h.jsx("span",{className:"truncate",children:A.title})]},A.id))]},D))})}),r&&h.jsx(Un,{value:"schema",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:h.jsx(Qr,{fields:S?.fields??(v?[]:null),title:S?.title??r,loading:!S&&!v})})]}),h.jsxs("div",{className:"flex items-center justify-between gap-2 border-t px-4 py-3",children:[h.jsx(le,{variant:"ghost",size:"sm",asChild:!0,children:h.jsxs(me,{href:`${window.routePrefix}/docs${n?`/${encodeURIComponent(n)}`:""}`,children:[h.jsx(ja,{className:"size-4"}),l("Open in knowledge base")]})}),u&&d&&h.jsxs(le,{variant:"outline",size:"sm",onClick:R,children:[h.jsx(Ur,{className:"size-4"}),l("Send to assistant")]})]})]})})}function Hp(){const n=ye().props.docs,{t}=st(),{open:r,docId:i}=Op(),a=Bp(),l=N.useCallback(f=>{Rp(f?`#${it}=${encodeURIComponent(f)}`:`#${it}`)},[]),s=N.useCallback(()=>{const{pathname:f,search:c}=window.location;window.history.pushState(null,"",`${f}${c}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},[]);if(!n)return null;const u=n.items??[],o=u.length>0||!!a;return h.jsxs(h.Fragment,{children:[o&&h.jsxs(hn,{children:[h.jsx(pn,{asChild:!0,children:h.jsx(le,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>l(null),"aria-label":t("Page documentation"),children:h.jsx(ma,{className:"size-4"})})}),h.jsx(dn,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:t("Page documentation")})})]}),h.jsx($p,{open:r,docId:i,items:u,model:a,onOpenDoc:l,onClose:s})]})}function Up({breadcrumbs:e=[]}){const{tabs:n}=Xr(),t=ye();return h.jsx("header",{className:"border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:h.jsxs("div",{className:"flex justify-between w-full",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Ea,{className:"-ml-1"}),h.jsx(Ua,{breadcrumbs:e})]}),h.jsxs("div",{className:"flex gap-4 items-center",children:[h.jsx(es,{}),h.jsx(Hp,{}),t.props.history&&h.jsx(me,{href:`${window.routePrefix}/history/view-all`,children:h.jsx(le,{variant:"ghost",size:"icon",className:"shrink-0",children:h.jsx(Na,{})})}),h.jsx(Ga,{}),t.props.notifications&&(n===null?h.jsx("div",{className:"w-[40px] flex-none flex justify-center",children:h.jsx(ot,{className:"size-4 animate-spin"})}):n.length?h.jsx(Ya,{}):null),h.jsx(Ja,{})]})]})})}const qp=N.memo(({children:e,breadcrumbs:n=[],className:t})=>{const r=ye();return h.jsxs(_a,{variant:"sidebar",children:[h.jsx(Aa,{title:r.props.title}),h.jsx(Ha,{}),h.jsxs(Ia,{className:"overflow-hidden",children:[h.jsx(Up,{breadcrumbs:n}),h.jsx("div",{"data-scroll-region":"content",className:X("relative flex min-h-0 flex-1 overflow-y-auto overscroll-contain",t),children:h.jsx("div",{className:"flex min-h-full w-full flex-col",children:e})})]})]})}),Vp=()=>`${window.routePrefix??""}/assets/ai-assistant/agent.es.js?v=5.0.0`;function Wp({width:e="min(25vw, 420px)",isResizing:n=!1,onResizeStart:t}){const{isEnabled:r,isOpen:i,closeChat:a,models:l,activeModel:s,setActiveModel:u,loading:o,error:f}=jt(),[c,d]=N.useState(null),[p,m]=N.useState(null);if(N.useEffect(()=>{if(!i||c||p)return;let v=!1;return import(Vp()).then(j=>{v||d(()=>j.default)}).catch(j=>{console.error("Failed to load the AI assistant UI",j),v||m("Unable to load the AI assistant UI")}),()=>{v=!0}},[c,i,p]),!r)return null;const b=l.find(v=>v.id===s),S=h.jsx(le,{variant:"ghost",size:"icon",onClick:a,"aria-label":"Close AI assistant",children:h.jsx(Mr,{className:"size-4"})}),k=h.jsxs(h.Fragment,{children:[l.length>1&&h.jsxs(Ta,{value:s,onValueChange:u,children:[h.jsx(Pa,{className:"h-8 w-36 text-xs","aria-label":"Select assistant",children:h.jsx(za,{placeholder:"Assistant"})}),h.jsx(Da,{className:"z-[70]",children:l.map(v=>h.jsx(La,{value:v.id,children:v.name},v.id))})]}),S]});return h.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:qr("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none",n&&"transition-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+e+")"},children:[h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize AI assistant panel",className:"absolute -left-2 top-0 z-10 hidden h-full w-4 cursor-col-resize touch-none md:block",onPointerDown:t}),s&&c&&!p?h.jsx(c,{routePrefix:window.routePrefix??"",modelId:s,title:b?.name,layout:"panel",headerActions:k},s):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[h.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),S]}),h.jsx("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground",children:p||f?h.jsx("span",{className:"text-destructive",children:p??f}):!o&&l.length===0?h.jsx("span",{children:"No AI models are available for your account."}):h.jsx(ot,{className:"size-8 animate-spin"})})]})]})}const Jp="25vw",Lr="margin-right 300ms ease-in-out",il=.25,Gp=.55,ll="adminizer.aiAssistant.panelWidth",fn=()=>({min:Math.round(window.innerWidth*il),max:Math.round(window.innerWidth*Gp)}),Xp=()=>window.innerWidth*il,Yp=()=>{try{const e=Number(window.localStorage.getItem(ll));if(!Number.isFinite(e))return null;const{min:n,max:t}=fn();return Math.min(t,Math.max(n,e))}catch{return null}};function Kp({children:e,panelWidth:n=Jp}){const{isEnabled:t,isOpen:r}=jt(),[i,a]=N.useState(Yp),[l,s]=N.useState(!1),u=i===null?n:`${i}px`,o=N.useCallback(f=>{if(window.innerWidth<768)return;f.preventDefault();const c=f.clientX,d=i??Xp(),p=document.body.style.userSelect;document.body.style.userSelect="none",s(!0);const m=S=>{const{min:k,max:v}=fn(),j=Math.min(v,Math.max(k,d+c-S.clientX));a(Math.round(j))},b=()=>{document.body.style.userSelect=p,s(!1),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",b),document.removeEventListener("pointercancel",b)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",b),document.addEventListener("pointercancel",b)},[i]);return N.useEffect(()=>{if(i!==null)try{window.localStorage.setItem(ll,String(i))}catch{}},[i]),N.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=f.style.transition,d=c?.includes("margin-right");return d||(f.style.transition=c?`${c}, ${Lr}`:Lr),f.classList.add("ai-assistant-host"),f.style.setProperty("--ai-assistant-panel-width",u),()=>{f.classList.remove("ai-assistant-host"),f.style.removeProperty("--ai-assistant-panel-width"),f.style.removeProperty("--ai-assistant-panel-actual-width"),f.style.removeProperty("margin-right"),delete f.dataset.aiAssistantOpen,d||(f.style.transition=c)}},[u]),N.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=window.innerWidth<768,d=c?"100vw":u;f.style.setProperty("--ai-assistant-panel-actual-width",d),t&&r?(f.style.marginRight=c?"0":u,f.dataset.aiAssistantOpen="true"):(f.style.removeProperty("margin-right"),f.dataset.aiAssistantOpen="false");const p=()=>{const m=window.innerWidth<768,b=m?"100vw":u;if(f.style.setProperty("--ai-assistant-panel-actual-width",b),i!==null&&!m){const{min:S,max:k}=fn();a(v=>v===null?v:Math.min(k,Math.max(S,v)))}t&&r&&(f.style.marginRight=m?"0":u)};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[u,i,t,r]),h.jsxs(h.Fragment,{children:[e,h.jsx(Wp,{width:u,isResizing:l,onResizeStart:o})]})}const Qp=N.memo(({children:e,className:n,breadcrumbs:t,...r})=>h.jsx(Xa,{children:h.jsx(Za,{children:h.jsxs(Fa,{children:[h.jsx(qp,{breadcrumbs:t,className:n,...r,children:e}),h.jsx(Kp,{})]})})})),nd=(e,n={})=>{const t=e;return t.layout=r=>h.jsx(Qp,{...n,children:r}),t};export{Lp as M,Fp as a,Np as b,Q as c,vt as d,td as e,Xr as f,_p as s,jt as u,nd as w};