@tonyclaw/agent-inspector 3.0.45 → 3.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/{nitro.json → backend/nitro.json} +3 -3
- package/.output/backend-public/assets/index-D4LX-sw-.js +11 -0
- package/.output/cli.js +8018 -5451
- package/.output/server/_libs/extend.mjs +4 -8
- package/.output/server/_libs/jszip.mjs +9 -35
- package/.output/server/_libs/react-dom.mjs +2 -3
- package/.output/server/_libs/react.mjs +1 -27
- package/.output/server/_libs/tanstack__react-router.mjs +1 -329
- package/.output/server/_libs/tanstack__router-core.mjs +42 -100
- package/.output/server/_libs/use-sync-external-store.mjs +1 -64
- package/.output/server/_libs/ws.mjs +1 -1
- package/.output/server/_ssr/index.mjs +4 -4
- package/.output/server/_ssr/{publicBasePathContext-5264L3rX.mjs → publicBasePathContext-IH2ilOfu.mjs} +52 -24
- package/.output/server/_ssr/{router-BJ_ltLim.mjs → router-BwZEsYfS.mjs} +19794 -19444
- package/.output/server/_ssr/{start-C6MjPjxp.mjs → start-COQu_AgD.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-DnbdNeun.mjs +4 -0
- package/.output/server/index.mjs +5 -145
- package/.output/{public/assets/CompareDrawer-B3_TLTJh.js → ui/assets/CompareDrawer-V-8lPASC.js} +1 -1
- package/.output/{public/assets/InspectorPet-Cpn6hv4P.js → ui/assets/InspectorPet-D4CVnfdf.js} +1 -1
- package/.output/ui/assets/ProxyViewerContainer-CO3ZVHLX.js +59 -0
- package/.output/{public/assets/ReplayDialog-B3EKVdJk.js → ui/assets/ReplayDialog-CpGyTLtt.js} +1 -1
- package/.output/{public/assets/RequestAnatomy-COOQjyUC.js → ui/assets/RequestAnatomy-BLuJL9dZ.js} +1 -1
- package/.output/ui/assets/ResponseView-BuSC-CH7.js +2 -0
- package/.output/ui/assets/StreamingChunkSequence-DeA-JJKa.js +1 -0
- package/.output/{public/assets/_sessionId-zbgYl7ZJ.js → ui/assets/_sessionId-8HuHFhjo.js} +1 -1
- package/.output/{public/assets/_sessionId-BJlM3nmt.js → ui/assets/_sessionId-Chp67th6.js} +1 -1
- package/.output/ui/assets/favicon-DYEkHSNl.svg +21 -0
- package/.output/ui/assets/index-BvXp42al.css +1 -0
- package/.output/{public/assets/index-xF_NY8Yb.js → ui/assets/index-DPmKK_5d.js} +5 -5
- package/.output/{public/assets/index-BIK4bPTv.js → ui/assets/index-atoQrlb8.js} +1 -1
- package/.output/ui/assets/index-nY3E1vxV.js +73 -0
- package/.output/{public/assets/index-D2Qw6Ri2.js → ui/assets/index-nl9-dpZn.js} +1 -1
- package/.output/ui/assets/json-viewer-B9kIzqeX.js +1 -0
- package/.output/{public/assets/jszip.min-B_rfAUCe.js → ui/assets/jszip.min-B7tfyE-I.js} +1 -1
- package/.output/ui/index.html +229 -0
- package/.output/ui/runtime-config.js +2 -0
- package/.output/workers/logFinalizer.worker.js +979 -414
- package/.output/workers/sessionWorkerEntry.js +979 -414
- package/README.md +182 -43
- package/docs/instance-control.openapi.yaml +59 -4
- package/package.json +40 -6
- package/scripts/generate-theme-scales.mjs +3 -3
- package/src/{router.tsx → backend/router.tsx} +3 -15
- package/src/backend/routes/$.ts +26 -0
- package/src/backend/routes/__root.ts +4 -0
- package/src/backend/routes/api/-instances.ts +7 -0
- package/src/{routes → backend/routes}/api/alerts.summary.ts +3 -3
- package/src/{routes → backend/routes}/api/alerts.ts +4 -4
- package/src/{routes → backend/routes}/api/config.paths.ts +1 -1
- package/src/{routes → backend/routes}/api/config.ts +11 -2
- package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.help.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.install.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.runner-presets.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.upgrade.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.packages.ts +5 -1
- package/src/{routes → backend/routes}/api/ecosystem.recipes.$recipeId.run.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.tasks.$taskId.ts +1 -1
- package/src/{routes → backend/routes}/api/ecosystem.tasks.ts +1 -1
- package/src/{routes → backend/routes}/api/groups.$groupId.evidence.ts +2 -2
- package/src/{routes → backend/routes}/api/groups.$groupId.sessions.ts +2 -2
- package/src/{routes → backend/routes}/api/groups.$groupId.ts +2 -2
- package/src/{routes → backend/routes}/api/groups.ts +2 -2
- package/src/{routes → backend/routes}/api/health.ts +3 -3
- package/src/{routes → backend/routes}/api/instances.$name.connection.ts +1 -1
- package/src/{routes → backend/routes}/api/instances.$name.restart.ts +2 -2
- package/src/{routes → backend/routes}/api/instances.$name.start.ts +2 -2
- package/src/{routes → backend/routes}/api/instances.$name.stop.ts +2 -2
- package/src/{routes → backend/routes}/api/instances.$name.ts +1 -1
- package/src/{routes → backend/routes}/api/instances.ts +1 -1
- package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.promote.ts +2 -2
- package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.ts +2 -2
- package/src/{routes → backend/routes}/api/knowledge.candidates.ts +1 -1
- package/src/{routes → backend/routes}/api/knowledge.project-context.ts +2 -2
- package/src/{routes → backend/routes}/api/knowledge.search.ts +2 -2
- package/src/{routes → backend/routes}/api/knowledge.sessions.$sessionId.candidates.ts +3 -3
- package/src/{routes → backend/routes}/api/logs.$id.body.ts +6 -6
- package/src/{routes → backend/routes}/api/logs.$id.chunks.ts +5 -4
- package/src/{routes → backend/routes}/api/logs.$id.replay.ts +12 -11
- package/src/{routes → backend/routes}/api/logs.$id.ts +4 -3
- package/src/{routes → backend/routes}/api/logs.import.ts +3 -3
- package/src/{routes → backend/routes}/api/logs.stream.ts +11 -7
- package/src/{routes → backend/routes}/api/logs.ts +17 -9
- package/src/{routes → backend/routes}/api/mcp.ts +1 -1
- package/src/{routes → backend/routes}/api/models.ts +1 -1
- package/src/{routes → backend/routes}/api/pi-agent.ts +2 -2
- package/src/{routes → backend/routes}/api/providers.$providerId.model-metadata.ts +5 -5
- package/src/{routes → backend/routes}/api/providers.$providerId.test.log.ts +7 -7
- package/src/{routes → backend/routes}/api/providers.$providerId.ts +4 -4
- package/src/{routes → backend/routes}/api/providers.export.ts +1 -1
- package/src/{routes → backend/routes}/api/providers.import.ts +3 -3
- package/src/{routes → backend/routes}/api/providers.scan.ts +2 -2
- package/src/{routes → backend/routes}/api/providers.ts +9 -4
- package/src/{routes → backend/routes}/api/runs.$runId.evidence.ts +2 -2
- package/src/{routes → backend/routes}/api/runs.$runId.ts +2 -2
- package/src/{routes → backend/routes}/api/runs.ts +4 -4
- package/src/backend/routes/api/runtime.ts +46 -0
- package/src/{routes → backend/routes}/api/sessions.ts +3 -3
- package/src/{routes → backend/routes}/proxy/$.ts +1 -1
- package/src/{routes → backend/routes}/readyz.ts +1 -1
- package/src/{start.ts → backend/start.ts} +1 -1
- package/src/cli/alias.ts +2 -11
- package/src/cli/doctor.ts +32 -9
- package/src/cli/instance.ts +36 -13
- package/src/cli/instanceApi.ts +213 -0
- package/src/cli/instanceArgs.ts +46 -11
- package/src/cli/instanceControl.ts +10 -2
- package/src/cli/instanceModel.ts +18 -17
- package/src/cli/instanceRegistry.ts +0 -9
- package/src/cli/networkHints.ts +27 -14
- package/src/cli/onboard.ts +69 -2
- package/src/cli/onboardTarget.ts +89 -40
- package/src/cli/rustBackendPackage.ts +450 -0
- package/src/cli/templates/codex-skill-onboard.ts +44 -14
- package/src/cli/templates/skill-onboard.ts +64 -28
- package/src/cli.ts +341 -75
- package/src/components/ProxyViewer.tsx +11 -9
- package/src/components/ProxyViewerContainer.tsx +12 -11
- package/src/components/pi-agent/PiAgentPanel.tsx +2 -2
- package/src/components/providers/ProviderCard.tsx +1 -1
- package/src/components/providers/ProviderTestResultsView.tsx +1 -1
- package/src/components/providers/SettingsDialog.tsx +159 -144
- package/src/components/proxy-viewer/ApplicationBar.tsx +2 -1
- package/src/components/proxy-viewer/LogEntry.tsx +1 -1
- package/src/components/proxy-viewer/log-formats/index.ts +1 -1
- package/src/contracts/index.ts +5 -0
- package/src/contracts/log.ts +33 -3
- package/src/knowledge/types.ts +3 -2
- package/src/lib/alertContract.ts +2 -2
- package/src/lib/apiClient.ts +30 -7
- package/src/lib/apiFormat.ts +29 -0
- package/src/lib/backendImplementation.ts +16 -0
- package/src/lib/basePath.ts +29 -11
- package/src/lib/browserRuntimeContract.ts +124 -0
- package/src/lib/browserRuntimeResolver.ts +244 -0
- package/src/{proxy → lib}/claudeCodeStrip.ts +6 -7
- package/src/lib/codingAgentEndpoints.ts +38 -0
- package/src/lib/instanceContract.ts +30 -11
- package/src/lib/managedInstance.ts +9 -1
- package/src/lib/piAgentContract.ts +3 -2
- package/src/lib/publicBasePathContext.ts +40 -10
- package/src/lib/resourceLimits.ts +2 -0
- package/src/lib/runContract.ts +3 -3
- package/src/lib/sessionInfoContract.ts +3 -2
- package/src/mcp/instanceHandlers.ts +2 -0
- package/src/mcp/server.ts +19 -24
- package/src/proxy/config.ts +25 -30
- package/src/proxy/dataDir.ts +43 -7
- package/src/proxy/ecosystemTasks.ts +161 -70
- package/src/proxy/formats/registry.ts +6 -21
- package/src/proxy/handler.ts +129 -29
- package/src/proxy/identityProxy.ts +567 -39
- package/src/proxy/jsonlRecovery.ts +554 -0
- package/src/proxy/logFinalizer.ts +25 -10
- package/src/proxy/logImporter.ts +2 -1
- package/src/proxy/logIndex.ts +191 -95
- package/src/proxy/logger.ts +77 -14
- package/src/proxy/platformCommands.ts +41 -0
- package/src/proxy/privateDataPath.ts +310 -88
- package/src/proxy/rawStreamCapture.ts +194 -13
- package/src/proxy/runtimeAdmission.ts +5 -2
- package/src/proxy/runtimeHealth.ts +14 -1
- package/src/proxy/runtimeShutdown.ts +11 -1
- package/src/proxy/schemas.ts +7 -1
- package/src/proxy/sessionArchive.ts +70 -14
- package/src/proxy/sqliteLogIndex.ts +65 -42
- package/src/proxy/store.ts +141 -34
- package/src/proxy/uiAssetServer.ts +106 -0
- package/src/proxy/upstream.ts +29 -2
- package/src/ui/bootstrap.ts +167 -0
- package/src/ui/index.html +38 -0
- package/src/ui/logsStreamClient.ts +20 -0
- package/src/ui/main.tsx +13 -0
- package/src/ui/public/runtime-config.js +2 -0
- package/src/ui/router.tsx +13 -0
- package/src/ui/routes/__root.tsx +69 -0
- package/src/{routes → ui/routes}/index.tsx +2 -3
- package/src/{routes → ui/routes}/session/$sessionId.tsx +5 -11
- package/src/ui/runtimeDiscovery.ts +50 -0
- package/styles/globals.css +1 -0
- package/.output/public/assets/ProxyViewerContainer-BEAhuGOJ.js +0 -126
- package/.output/public/assets/ResponseView-DBCjkwye.js +0 -2
- package/.output/public/assets/StreamingChunkSequence-CuXhDgMo.js +0 -1
- package/.output/public/assets/index-BZo_8koU.js +0 -70
- package/.output/public/assets/index-ZWschkCh.css +0 -1
- package/.output/public/assets/json-viewer-B-Ao6pwW.js +0 -1
- package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +0 -1
- package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +0 -344
- package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +0 -2
- package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +0 -2
- package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +0 -2
- package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +0 -11
- package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +0 -69
- package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +0 -1
- package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +0 -28
- package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +0 -6
- package/.output/server/_libs/@radix-ui/react-visually-hidden+[...].mjs +0 -34
- package/.output/server/_libs/aria-hidden.mjs +0 -122
- package/.output/server/_libs/bail.mjs +0 -8
- package/.output/server/_libs/character-entities.mjs +0 -2130
- package/.output/server/_libs/class-variance-authority.mjs +0 -44
- package/.output/server/_libs/clsx.mjs +0 -16
- package/.output/server/_libs/comma-separated-tokens.mjs +0 -10
- package/.output/server/_libs/decode-named-character-reference+[...].mjs +0 -8
- package/.output/server/_libs/dequal.mjs +0 -27
- package/.output/server/_libs/detect-node-es.mjs +0 -1
- package/.output/server/_libs/devlop.mjs +0 -8
- package/.output/server/_libs/diff.mjs +0 -320
- package/.output/server/_libs/estree-util-is-identifier-name.mjs +0 -11
- package/.output/server/_libs/floating-ui__core.mjs +0 -725
- package/.output/server/_libs/floating-ui__dom.mjs +0 -622
- package/.output/server/_libs/floating-ui__react-dom.mjs +0 -292
- package/.output/server/_libs/floating-ui__utils.mjs +0 -320
- package/.output/server/_libs/get-nonce.mjs +0 -9
- package/.output/server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
- package/.output/server/_libs/hast-util-whitespace.mjs +0 -10
- package/.output/server/_libs/html-url-attributes.mjs +0 -26
- package/.output/server/_libs/inline-style-parser.mjs +0 -142
- package/.output/server/_libs/is-plain-obj.mjs +0 -10
- package/.output/server/_libs/lucide-react.mjs +0 -1027
- package/.output/server/_libs/mdast-util-from-markdown.mjs +0 -717
- package/.output/server/_libs/mdast-util-to-hast.mjs +0 -710
- package/.output/server/_libs/mdast-util-to-string.mjs +0 -38
- package/.output/server/_libs/micromark-core-commonmark.mjs +0 -2259
- package/.output/server/_libs/micromark-factory-destination.mjs +0 -94
- package/.output/server/_libs/micromark-factory-label.mjs +0 -63
- package/.output/server/_libs/micromark-factory-space.mjs +0 -24
- package/.output/server/_libs/micromark-factory-title.mjs +0 -65
- package/.output/server/_libs/micromark-factory-whitespace.mjs +0 -22
- package/.output/server/_libs/micromark-util-character.mjs +0 -44
- package/.output/server/_libs/micromark-util-chunked.mjs +0 -36
- package/.output/server/_libs/micromark-util-classify-character+[...].mjs +0 -12
- package/.output/server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
- package/.output/server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
- package/.output/server/_libs/micromark-util-decode-string.mjs +0 -21
- package/.output/server/_libs/micromark-util-encode.mjs +0 -1
- package/.output/server/_libs/micromark-util-html-tag-name.mjs +0 -69
- package/.output/server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
- package/.output/server/_libs/micromark-util-resolve-all.mjs +0 -15
- package/.output/server/_libs/micromark-util-sanitize-uri.mjs +0 -41
- package/.output/server/_libs/micromark-util-subtokenize.mjs +0 -346
- package/.output/server/_libs/micromark.mjs +0 -906
- package/.output/server/_libs/property-information.mjs +0 -1209
- package/.output/server/_libs/radix-ui.mjs +0 -1
- package/.output/server/_libs/radix-ui__number.mjs +0 -6
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -11
- package/.output/server/_libs/radix-ui__react-accordion.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
- package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-avatar.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-checkbox.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-collapsible.mjs +0 -144
- package/.output/server/_libs/radix-ui__react-collection.mjs +0 -69
- package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -38
- package/.output/server/_libs/radix-ui__react-context-menu.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-context.mjs +0 -64
- package/.output/server/_libs/radix-ui__react-dialog.mjs +0 -280
- package/.output/server/_libs/radix-ui__react-direction.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-focus-guards.mjs +0 -39
- package/.output/server/_libs/radix-ui__react-focus-scope.mjs +0 -210
- package/.output/server/_libs/radix-ui__react-form.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-hover-card.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-id.mjs +0 -14
- package/.output/server/_libs/radix-ui__react-label.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-menu.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-menubar.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-popover.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-popper.mjs +0 -340
- package/.output/server/_libs/radix-ui__react-portal.mjs +0 -16
- package/.output/server/_libs/radix-ui__react-presence.mjs +0 -173
- package/.output/server/_libs/radix-ui__react-primitive.mjs +0 -42
- package/.output/server/_libs/radix-ui__react-progress.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-radio-group.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-roving-focus.mjs +0 -235
- package/.output/server/_libs/radix-ui__react-scroll-area.mjs +0 -731
- package/.output/server/_libs/radix-ui__react-select.mjs +0 -1207
- package/.output/server/_libs/radix-ui__react-separator.mjs +0 -28
- package/.output/server/_libs/radix-ui__react-slider.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-slot.mjs +0 -132
- package/.output/server/_libs/radix-ui__react-switch.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-tabs.mjs +0 -194
- package/.output/server/_libs/radix-ui__react-toast.mjs +0 -2
- package/.output/server/_libs/radix-ui__react-toggle-group.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-toggle.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-toolbar.mjs +0 -1
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -498
- package/.output/server/_libs/radix-ui__react-use-previous.mjs +0 -14
- package/.output/server/_libs/radix-ui__react-use-size.mjs +0 -39
- package/.output/server/_libs/react-markdown.mjs +0 -235
- package/.output/server/_libs/react-remove-scroll-bar.mjs +0 -82
- package/.output/server/_libs/react-remove-scroll.mjs +0 -328
- package/.output/server/_libs/react-style-singleton.mjs +0 -69
- package/.output/server/_libs/remark-parse.mjs +0 -19
- package/.output/server/_libs/remark-rehype.mjs +0 -21
- package/.output/server/_libs/space-separated-tokens.mjs +0 -6
- package/.output/server/_libs/style-to-js.mjs +0 -72
- package/.output/server/_libs/style-to-object.mjs +0 -38
- package/.output/server/_libs/swr.mjs +0 -947
- package/.output/server/_libs/tailwind-merge.mjs +0 -3255
- package/.output/server/_libs/tanstack__react-virtual.mjs +0 -130
- package/.output/server/_libs/tanstack__virtual-core.mjs +0 -1319
- package/.output/server/_libs/three.mjs +0 -26016
- package/.output/server/_libs/trim-lines.mjs +0 -41
- package/.output/server/_libs/trough.mjs +0 -85
- package/.output/server/_libs/tslib.mjs +0 -1
- package/.output/server/_libs/ungap__structured-clone.mjs +0 -212
- package/.output/server/_libs/unified.mjs +0 -661
- package/.output/server/_libs/unist-util-is.mjs +0 -100
- package/.output/server/_libs/unist-util-position.mjs +0 -27
- package/.output/server/_libs/unist-util-stringify-position.mjs +0 -27
- package/.output/server/_libs/unist-util-visit-parents.mjs +0 -82
- package/.output/server/_libs/unist-util-visit.mjs +0 -24
- package/.output/server/_libs/use-callback-ref.mjs +0 -66
- package/.output/server/_libs/use-sidecar.mjs +0 -106
- package/.output/server/_libs/vfile-message.mjs +0 -138
- package/.output/server/_libs/vfile.mjs +0 -467
- package/.output/server/_sessionId-CJ99gZFV.mjs +0 -84
- package/.output/server/_sessionId-DEjScBpK.mjs +0 -146
- package/.output/server/_ssr/CompareDrawer-DtOIMeQB.mjs +0 -1060
- package/.output/server/_ssr/InspectorPet-CXc4oCBQ.mjs +0 -938
- package/.output/server/_ssr/ProxyViewerContainer-DVPlwfkt.mjs +0 -17632
- package/.output/server/_ssr/ReplayDialog-BQEA95qC.mjs +0 -725
- package/.output/server/_ssr/RequestAnatomy-BMyd8B7Q.mjs +0 -837
- package/.output/server/_ssr/ResponseView-qrTaEIM8.mjs +0 -757
- package/.output/server/_ssr/StreamingChunkSequence-BFTL8mIy.mjs +0 -274
- package/.output/server/_ssr/index-Bcj1Hcy4.mjs +0 -135
- package/.output/server/_ssr/index-DW-M7XUG.mjs +0 -84
- package/.output/server/_ssr/json-viewer-DiI0Yjsn.mjs +0 -483
- package/.output/server/_tanstack-start-manifest_v-C6pXXX9R.mjs +0 -4
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -9
- package/src/routes/__root.tsx +0 -170
- package/src/routes/api/-instances.ts +0 -109
- /package/.output/{public → ui}/assets/agent-inspector-58K1_MsC.ico +0 -0
- /package/.output/{public → ui}/assets/alibaba-TTwafVwX.svg +0 -0
- /package/.output/{public → ui}/assets/minimax-BPMzvuL-.jpeg +0 -0
- /package/.output/{public → ui}/assets/qwen-mMn3f5ul.webp +0 -0
- /package/.output/{public → ui}/assets/zhipuai-BPNAnxo-.svg +0 -0
- /package/src/{routes → backend/routes}/livez.ts +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{F as Lt,r as Je,j as Ze}from"./index-BZo_8koU.js";function wr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Sr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Er=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cr={};function Wn(e,n){return(Cr.jsx?Er:Sr).test(e)}const Ir=/[ \t\n\f\r]/g;function Tr(e){return typeof e=="object"?e.type==="text"?Yn(e.value):!1:Yn(e)}function Yn(e){return e.replace(Ir,"")===""}class je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}je.prototype.normal={};je.prototype.property={};je.prototype.space=void 0;function vt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new je(t,r,n)}function mn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let Pr=0;const D=ke(),W=ke(),dn=ke(),k=ke(),q=ke(),Ie=ke(),ee=ke();function ke(){return 2**++Pr}const gn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:dn,spaceSeparated:q},Symbol.toStringTag,{value:"Module"})),en=Object.keys(gn);class Cn extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),Xn(this,"space",i),typeof r=="number")for(;++l<en.length;){const o=en[l];Xn(this,en[l],(r&gn[o])===gn[o])}}}Cn.prototype.defined=!0;function Xn(e,n,t){t&&(e[n]=t)}function Pe(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[mn(r)]=r,t[mn(l.attribute)]=r}return new je(n,t,e.space)}const Dt=Pe({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:q,ariaCurrent:null,ariaDescribedBy:q,ariaDetails:null,ariaDisabled:W,ariaDropEffect:q,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:q,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q,ariaLevel:k,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:q,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:q,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:W,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ot(e,n){return n in e?e[n]:n}function _t(e,n){return Ot(e,n.toLowerCase())}const Ar=Pe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:q,accessKey:q,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:q,autoFocus:D,autoPlay:D,blocking:q,capture:null,charSet:null,checked:D,cite:null,className:q,cols:k,colSpan:null,content:null,contentEditable:W,controls:D,controlsList:q,coords:k|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:dn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:q,height:k,hidden:dn,high:k,href:null,hrefLang:null,htmlFor:q,httpEquiv:q,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:q,itemRef:q,itemScope:D,itemType:q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,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:D,optimum:k,pattern:null,ping:q,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:q,required:D,reversed:D,rows:k,rowSpan:k,sandbox:q,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:W,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:_t}),zr=Pe({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ee,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:q,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:ee,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ee,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ee,rev:ee,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ee,requiredFeatures:ee,requiredFonts:ee,requiredFormats:ee,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:ee,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ee,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ee,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ot}),Ft=Pe({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()}}),Nt=Pe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_t}),Rt=Pe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Lr={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"},vr=/[A-Z]/g,Qn=/-[a-z]/g,Dr=/^data[-\w.:]+$/i;function Or(e,n){const t=mn(n);let r=n,i=J;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Dr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Qn,Fr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Qn.test(l)){let o=l.replace(vr,_r);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Cn}return new i(r,n)}function _r(e){return"-"+e.toLowerCase()}function Fr(e){return e.charAt(1).toUpperCase()}const Nr=vt([Dt,Ar,Ft,Nt,Rt],"html"),In=vt([Dt,zr,Ft,Nt,Rt],"svg");function Rr(e){return e.join(" ").trim()}var Ee={},nn,Kn;function Mr(){if(Kn)return nn;Kn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
2
|
-
`,a="/",s="*",f="",d="comment",p="declaration";function w(I,x){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];x=x||{};var L=1,C=1;function B(A){var S=A.match(n);S&&(L+=S.length);var M=A.lastIndexOf(c);C=~M?A.length-M:C+A.length}function H(){var A={line:L,column:C};return function(S){return S.position=new y(A),N(),S}}function y(A){this.start=A,this.end={line:L,column:C},this.source=x.source}y.prototype.content=I;function _(A){var S=new Error(x.source+":"+L+":"+C+": "+A);if(S.reason=A,S.filename=x.source,S.line=L,S.column=C,S.source=I,!x.silent)throw S}function U(A){var S=A.exec(I);if(S){var M=S[0];return B(M),I=I.slice(M.length),S}}function N(){U(t)}function R(A){var S;for(A=A||[];S=P();)S!==!1&&A.push(S);return A}function P(){var A=H();if(!(a!=I.charAt(0)||s!=I.charAt(1))){for(var S=2;f!=I.charAt(S)&&(s!=I.charAt(S)||a!=I.charAt(S+1));)++S;if(S+=2,f===I.charAt(S-1))return _("End of comment missing");var M=I.slice(2,S-2);return C+=2,B(M),I=I.slice(S),C+=2,A({type:d,comment:M})}}function T(){var A=H(),S=U(r);if(S){if(P(),!U(i))return _("property missing ':'");var M=U(l),Y=A({type:p,property:E(S[0].replace(e,f)),value:M?E(M[0].replace(e,f)):f});return U(o),Y}}function V(){var A=[];R(A);for(var S;S=T();)S!==!1&&(A.push(S),R(A));return A}return N(),V()}function E(I){return I?I.replace(u,f):f}return nn=w,nn}var Gn;function Br(){if(Gn)return Ee;Gn=1;var e=Ee&&Ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.default=t;const n=e(Mr());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),u=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:a,value:s}=c;u?i(a,s,c):s&&(l=l||{},l[a]=s)}),l}return Ee}var De={},Jn;function jr(){if(Jn)return De;Jn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(a){return!a||t.test(a)||e.test(a)},o=function(a,s){return s.toUpperCase()},u=function(a,s){return"".concat(s,"-")},c=function(a,s){return s===void 0&&(s={}),l(a)?a:(a=a.toLowerCase(),s.reactCompat?a=a.replace(i,u):a=a.replace(r,u),a.replace(n,o))};return De.camelCase=c,De}var Oe,Zn;function Hr(){if(Zn)return Oe;Zn=1;var e=Oe&&Oe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Br()),t=jr();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(u,c){u&&c&&(o[(0,t.camelCase)(u,l)]=c)}),o}return r.default=r,Oe=r,Oe}var Ur=Hr();const Vr=Lt(Ur),Mt=Bt("end"),Tn=Bt("start");function Bt(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 qr(e){const n=Tn(e),t=Mt(e);if(n&&t)return{start:n,end:t}}function Ne(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?et(e.position):"start"in e||"end"in e?et(e):"line"in e||"column"in e?yn(e):""}function yn(e){return nt(e&&e.line)+":"+nt(e&&e.column)}function et(e){return yn(e&&e.start)+"-"+yn(e&&e.end)}function nt(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Ne(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const Pn={}.hasOwnProperty,$r=new Map,Wr=/[A-Z]/g,Yr=new Set(["table","tbody","thead","tfoot","tr"]),Xr=new Set(["td","th"]),jt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qr(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=ri(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=ti(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"?In:Nr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Ht(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ht(e,n,t){if(n.type==="element")return Kr(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Gr(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Zr(e,n,t);if(n.type==="mdxjsEsm")return Jr(e,n);if(n.type==="root")return ei(e,n,t);if(n.type==="text")return ni(e,n)}function Kr(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(n);const l=Vt(e,n.tagName,!1),o=ii(e,n);let u=zn(e,n);return Yr.has(n.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Tr(c):!0})),Ut(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Gr(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)}Be(e,n.position)}function Jr(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Be(e,n.position)}function Zr(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Vt(e,n.name,!0),o=li(e,n),u=zn(e,n);return Ut(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function ei(e,n,t){const r={};return An(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function ni(e,n){return n.value}function Ut(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function An(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ti(e,n,t){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?t:n;return u?a(l,o,u):a(l,o)}}function ri(e,n){return t;function t(r,i,l,o){const u=Array.isArray(l.children),c=Tn(r);return n(i,l,o,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ii(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Pn.call(n.properties,i)){const l=oi(e,i,n.properties[i]);if(l){const[o,u]=l;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&Xr.has(n.tagName)?r=u:t[o]=u}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function li(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const u=o.properties[0];u.type,Object.assign(t,e.evaluater.evaluateExpression(u.argument))}else Be(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else Be(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:$r;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const a=i.get(c)||0;o=c+"-"+a,i.set(c,a+1)}}const u=Ht(e,l,o);u!==void 0&&t.push(u)}return t}function oi(e,n,t){const r=Or(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?wr(t):Rr(t)),r.property==="style"){let i=typeof t=="object"?t:ui(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ai(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Lr[r.property]||r.property:r.attribute,t]}}function ui(e,n){try{return Vr(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Q("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=jt+"#cannot-parse-style-attribute",i}}function Vt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const u=Wn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}r=o}else r=Wn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Pn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Be(e)}function Be(e,n){const t=new Q("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=jt+"#cannot-handle-mdx-estrees-without-createevaluater",t}function ai(e){const n={};let t;for(t in e)Pn.call(e,t)&&(n[si(t)]=e[t]);return n}function si(e){let n=e.replace(Wr,ci);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function ci(e){return"-"+e.toLowerCase()}const tn={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"]},pi={};function fi(e,n){const t=pi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return qt(e,r,i)}function qt(e,n,t){if(hi(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 tt(e.children,n,t)}return Array.isArray(e)?tt(e,n,t):""}function tt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=qt(e[i],n,t);return r.join("")}function hi(e){return!!(e&&typeof e=="object")}const rt=document.createElement("i");function Ln(e){const n="&"+e+";";rt.innerHTML=n;const t=rt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function se(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function te(e,n){return e.length>0?(se(e,e.length,0,n),e):n}const it={}.hasOwnProperty;function mi(e){const n={};let t=-1;for(;++t<e.length;)di(n,e[t]);return n}function di(e,n){let t;for(t in n){const i=(it.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){it.call(i,o)||(i[o]=[]);const u=l[o];gi(i[o],Array.isArray(u)?u:u?[u]:[])}}}function gi(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);se(e,0,0,r)}function $t(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 Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ae=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),yi=ge(/[#-'*+\--9=?A-Z^-~]/);function xn(e){return e!==null&&(e<32||e===127)}const kn=ge(/\d/),xi=ge(/[\dA-Fa-f]/),ki=ge(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function F(e){return e===-2||e===-1||e===32}const bi=ge(new RegExp("\\p{P}|\\p{S}","u")),wi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ae(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&ne(e.charCodeAt(t+1))&&ne(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function $(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return F(c)?(e.enter(t),u(c)):n(c)}function u(c){return F(c)&&l++<i?(e.consume(c),u):(e.exit(t),n(c))}}const Si={tokenize:Ei};function Ei(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),$(e,n,"linePrefix")}function i(u){return e.enter("paragraph"),l(u)}function l(u){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return z(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),o)}}const Ci={tokenize:Ii},lt={tokenize:Ti};function Ii(e){const n=this,t=[];let r=0,i,l,o;return u;function u(C){if(r<t.length){const B=t[r];return n.containerState=B[1],e.attempt(B[0].continuation,c,a)(C)}return a(C)}function c(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&L();const B=n.events.length;let H=B,y;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){y=n.events[H][1].end;break}x(r);let _=B;for(;_<n.events.length;)n.events[_][1].end={...y},_++;return se(n.events,H+1,0,n.events.slice(B)),n.events.length=_,a(C)}return u(C)}function a(C){if(r===t.length){if(!i)return d(C);if(i.currentConstruct&&i.currentConstruct.concrete)return w(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(lt,s,f)(C)}function s(C){return i&&L(),x(r),d(C)}function f(C){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,w(C)}function d(C){return n.containerState={},e.attempt(lt,p,w)(C)}function p(C){return r++,t.push([n.currentConstruct,n.containerState]),d(C)}function w(C){if(C===null){i&&L(),x(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),E(C)}function E(C){if(C===null){I(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return z(C)?(e.consume(C),I(e.exit("chunkFlow")),r=0,n.interrupt=void 0,u):(e.consume(C),E)}function I(C,B){const H=n.sliceStream(C);if(B&&H.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(H),n.parser.lazy[C.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<o&&(!i.events[y][1].end||i.events[y][1].end.offset>o))return;const _=n.events.length;let U=_,N,R;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(N){R=n.events[U][1].end;break}N=!0}for(x(r),y=_;y<n.events.length;)n.events[y][1].end={...R},y++;se(n.events,U+1,0,n.events.slice(_)),n.events.length=y}}function x(C){let B=t.length;for(;B-- >C;){const H=t[B];n.containerState=H[1],H[0].exit.call(n,e)}t.length=C}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ti(e,n,t){return $(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ot(e){if(e===null||G(e)||wi(e))return 1;if(bi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const bn={name:"attention",resolveAll:Pi,tokenize:Ai};function Pi(e,n){let t=-1,r,i,l,o,u,c,a,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};ut(f,-c),ut(d,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[t][1].start={...u.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=te(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=te(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=te(a,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=te(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,a=te(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,a),t=r+a.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Ai(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ot(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===l)return e.consume(c),u;const a=e.exit("attentionSequence"),s=ot(c),f=!s||s===2&&i||t.includes(c),d=!i||i===2&&s||t.includes(r);return a._open=!!(l===42?f:f&&(i||!d)),a._close=!!(l===42?d:d&&(s||!f)),n(c)}}function ut(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const zi={name:"autolink",tokenize:Li};function Li(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return ae(p)?(e.consume(p),o):p===64?t(p):a(p)}function o(p){return p===43||p===45||p===46||ne(p)?(r=1,u(p)):a(p)}function u(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ne(p))&&r++<32?(e.consume(p),u):(r=0,a(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||xn(p)?t(p):(e.consume(p),c)}function a(p){return p===64?(e.consume(p),s):yi(p)?(e.consume(p),a):t(p)}function s(p){return ne(p)?f(p):t(p)}function f(p){return p===46?(e.consume(p),r=0,s):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||ne(p))&&r++<63){const w=p===45?d:f;return e.consume(p),w}return t(p)}}const Qe={partial:!0,tokenize:vi};function vi(e,n,t){return r;function r(l){return F(l)?$(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?n(l):t(l)}}const Wt={continuation:{tokenize:Oi},exit:_i,name:"blockQuote",tokenize:Di};function Di(e,n,t){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return F(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Oi(e,n,t){const r=this;return i;function i(o){return F(o)?$(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Wt,n,t)(o)}}function _i(e){e.exit("blockQuote")}const Yt={name:"characterEscape",tokenize:Fi};function Fi(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ki(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Xt={name:"characterReference",tokenize:Ni};function Ni(e,n,t){const r=this;let i=0,l,o;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),l=31,o=ne,s(f))}function a(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=xi,s):(e.enter("characterReferenceValue"),l=7,o=kn,s(f))}function s(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===ne&&!Ln(r.sliceSerialize(d))?t(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(f)&&i++<l?(e.consume(f),s):t(f)}}const at={partial:!0,tokenize:Mi},st={concrete:!0,name:"codeFenced",tokenize:Ri};function Ri(e,n,t){const r=this,i={partial:!0,tokenize:H};let l=0,o=0,u;return c;function c(y){return a(y)}function a(y){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,u=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(y)}function s(y){return y===u?(o++,e.consume(y),s):o<3?t(y):(e.exit("codeFencedFenceSequence"),F(y)?$(e,f,"whitespace")(y):f(y))}function f(y){return y===null||z(y)?(e.exit("codeFencedFence"),r.interrupt?n(y):e.check(at,E,B)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(y)):F(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$(e,p,"whitespace")(y)):y===96&&y===u?t(y):(e.consume(y),d)}function p(y){return y===null||z(y)?f(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(y))}function w(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(y)):y===96&&y===u?t(y):(e.consume(y),w)}function E(y){return e.attempt(i,B,I)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),x}function x(y){return l>0&&F(y)?$(e,L,"linePrefix",l+1)(y):L(y)}function L(y){return y===null||z(y)?e.check(at,E,B)(y):(e.enter("codeFlowValue"),C(y))}function C(y){return y===null||z(y)?(e.exit("codeFlowValue"),L(y)):(e.consume(y),C)}function B(y){return e.exit("codeFenced"),n(y)}function H(y,_,U){let N=0;return R;function R(S){return y.enter("lineEnding"),y.consume(S),y.exit("lineEnding"),P}function P(S){return y.enter("codeFencedFence"),F(S)?$(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):T(S)}function T(S){return S===u?(y.enter("codeFencedFenceSequence"),V(S)):U(S)}function V(S){return S===u?(N++,y.consume(S),V):N>=o?(y.exit("codeFencedFenceSequence"),F(S)?$(y,A,"whitespace")(S):A(S)):U(S)}function A(S){return S===null||z(S)?(y.exit("codeFencedFence"),_(S)):U(S)}}}function Mi(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const rn={name:"codeIndented",tokenize:ji},Bi={partial:!0,tokenize:Hi};function ji(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),$(e,l,"linePrefix",5)(a)}function l(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?c(a):z(a)?e.attempt(Bi,o,c)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||z(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function c(a){return e.exit("codeIndented"),n(a)}}function Hi(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):$(e,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):z(o)?i(o):t(o)}}const Ui={name:"codeText",previous:qi,resolve:Vi,tokenize:$i};function Vi(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 qi(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $i(e,n,t){let r=0,i,l;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?t(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(l=e.enter("codeTextSequence"),i=0,s(f)):z(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),a(f))}function a(f){return f===null||f===32||f===96||z(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),a)}function s(f){return f===96?(e.consume(f),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(f)):(l.type="codeTextData",a(f))}}class Wi{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&_e(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),_e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),_e(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);_e(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);_e(this.left,t.reverse())}}}function _e(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 Qt(e){const n={};let t=-1,r,i,l,o,u,c,a;const s=new Wi(e);for(;++t<s.length;){for(;t in n;)t=n[t];if(r=s.get(t),t&&r[1].type==="chunkFlow"&&s.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Yi(s,t)),t=n[t],a=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=s.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},u=s.slice(i,t),u.unshift(r),s.splice(i,t-i+1,u))}}return se(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!a}function Yi(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,c=[],a={};let s,f,d=-1,p=t,w=0,E=0;const I=[E];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=t;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(E=d+1,I.push(E),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):I.pop(),d=I.length;d--;){const x=u.slice(I[d],I[d+1]),L=l.pop();c.push([L,L+x.length-1]),e.splice(L,2,x)}for(c.reverse(),d=-1;++d<c.length;)a[w+c[d][0]]=w+c[d][1],w+=c[d][1]-c[d][0]-1;return a}const Xi={resolve:Ki,tokenize:Gi},Qi={partial:!0,tokenize:Ji};function Ki(e){return Qt(e),e}function Gi(e,n){let t;return r;function r(u){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?l(u):z(u)?e.check(Qi,o,l)(u):(e.consume(u),i)}function l(u){return e.exit("chunkContent"),e.exit("content"),n(u)}function o(u){return e.consume(u),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ji(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),$(e,l,"linePrefix")}function l(o){if(o===null||z(o))return t(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Kt(e,n,t,r,i,l,o,u,c){const a=c||Number.POSITIVE_INFINITY;let s=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),d):x===null||x===32||x===41||xn(x)?t(x):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(x))}function d(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(u),d(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?w:p)}function w(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function E(x){return!s&&(x===null||x===41||G(x))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(x)):s<a&&x===40?(e.consume(x),s++,E):x===41?(e.consume(x),s--,E):x===null||x===32||x===40||xn(x)?t(x):(e.consume(x),x===92?I:E)}function I(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function Gt(e,n,t,r,i,l){const o=this;let u=0,c;return a;function a(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),s}function s(p){return u>999||p===null||p===91||p===93&&!c||p===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||z(p)||u++>999?(e.exit("chunkString"),s(p)):(e.consume(p),c||(c=!F(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,f):f(p)}}function Jt(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,c):t(d)}function c(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),c(o)):d===null?t(d):z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),$(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||z(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Re(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):F(i)?$(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Zi={name:"definition",tokenize:nl},el={partial:!0,tokenize:tl};function nl(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Gt.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return G(p)?Re(e,a)(p):a(p)}function a(p){return Kt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(el,f,f)(p)}function f(p){return F(p)?$(e,d,"whitespace")(p):d(p)}function d(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function tl(e,n,t){return r;function r(u){return G(u)?Re(e,i)(u):t(u)}function i(u){return Jt(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return F(u)?$(e,o,"whitespace")(u):o(u)}function o(u){return u===null||z(u)?n(u):t(u)}}const rl={name:"hardBreakEscape",tokenize:il};function il(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const ll={name:"headingAtx",resolve:ol,tokenize:ul};function ol(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function ul(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||G(s)?(e.exit("atxHeadingSequence"),u(s)):t(s)}function u(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||z(s)?(e.exit("atxHeading"),n(s)):F(s)?$(e,u,"whitespace")(s):(e.enter("atxHeadingText"),a(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),u(s))}function a(s){return s===null||s===35||G(s)?(e.exit("atxHeadingText"),u(s)):(e.consume(s),a)}}const al=["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"],ct=["pre","script","style","textarea"],sl={concrete:!0,name:"htmlFlow",resolveTo:fl,tokenize:hl},cl={partial:!0,tokenize:dl},pl={partial:!0,tokenize:ml};function fl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function hl(e,n,t){const r=this;let i,l,o,u,c;return a;function a(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,E):m===63?(e.consume(m),i=3,r.interrupt?n:h):ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,u=0,w):ae(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function w(m){const le="CDATA[";return m===le.charCodeAt(u++)?(e.consume(m),u===le.length?r.interrupt?n:T:w):t(m)}function E(m){return ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||G(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ct.includes(ye)?(i=1,r.interrupt?n(m):T(m)):al.includes(o.toLowerCase())?(i=6,le?(e.consume(m),x):r.interrupt?n(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):C(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),I):t(m)}function x(m){return m===62?(e.consume(m),r.interrupt?n:T):t(m)}function L(m){return F(m)?(e.consume(m),L):R(m)}function C(m){return m===47?(e.consume(m),R):m===58||m===95||ae(m)?(e.consume(m),B):F(m)?(e.consume(m),C):R(m)}function B(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),B):H(m)}function H(m){return m===61?(e.consume(m),y):F(m)?(e.consume(m),H):C(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,_):F(m)?(e.consume(m),y):U(m)}function _(m){return m===c?(e.consume(m),c=null,N):m===null||z(m)?t(m):(e.consume(m),_)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?H(m):(e.consume(m),U)}function N(m){return m===47||m===62||F(m)?C(m):t(m)}function R(m){return m===62?(e.consume(m),P):t(m)}function P(m){return m===null||z(m)?T(m):F(m)?(e.consume(m),P):t(m)}function T(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),Y):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):z(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(cl,pe,V)(m)):m===null||z(m)?(e.exit("htmlFlowData"),V(m)):(e.consume(m),T)}function V(m){return e.check(pl,A,pe)(m)}function A(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),S}function S(m){return m===null||z(m)?V(m):(e.enter("htmlFlowData"),T(m))}function M(m){return m===45?(e.consume(m),h):T(m)}function Y(m){return m===47?(e.consume(m),o="",re):T(m)}function re(m){if(m===62){const le=o.toLowerCase();return ct.includes(le)?(e.consume(m),ie):T(m)}return ae(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):T(m)}function ce(m){return m===93?(e.consume(m),h):T(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):T(m)}function ie(m){return m===null||z(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function ml(e,n,t){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function dl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qe,n,t)}}const gl={name:"htmlText",tokenize:yl};function yl(e,n,t){const r=this;let i,l,o;return u;function u(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),c}function c(h){return h===33?(e.consume(h),a):h===47?(e.consume(h),H):h===63?(e.consume(h),C):ae(h)?(e.consume(h),U):t(h)}function a(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,w):ae(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):z(h)?(o=f,Y(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?M(h):h===45?d(h):f(h)}function w(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?E:w):t(h)}function E(h){return h===null?t(h):h===93?(e.consume(h),I):z(h)?(o=E,Y(h)):(e.consume(h),E)}function I(h){return h===93?(e.consume(h),x):E(h)}function x(h){return h===62?M(h):h===93?(e.consume(h),x):E(h)}function L(h){return h===null||h===62?M(h):z(h)?(o=L,Y(h)):(e.consume(h),L)}function C(h){return h===null?t(h):h===63?(e.consume(h),B):z(h)?(o=C,Y(h)):(e.consume(h),C)}function B(h){return h===62?M(h):C(h)}function H(h){return ae(h)?(e.consume(h),y):t(h)}function y(h){return h===45||ne(h)?(e.consume(h),y):_(h)}function _(h){return z(h)?(o=_,Y(h)):F(h)?(e.consume(h),_):M(h)}function U(h){return h===45||ne(h)?(e.consume(h),U):h===47||h===62||G(h)?N(h):t(h)}function N(h){return h===47?(e.consume(h),M):h===58||h===95||ae(h)?(e.consume(h),R):z(h)?(o=N,Y(h)):F(h)?(e.consume(h),N):M(h)}function R(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),R):P(h)}function P(h){return h===61?(e.consume(h),T):z(h)?(o=P,Y(h)):F(h)?(e.consume(h),P):N(h)}function T(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,V):z(h)?(o=T,Y(h)):F(h)?(e.consume(h),T):(e.consume(h),A)}function V(h){return h===i?(e.consume(h),i=void 0,S):h===null?t(h):z(h)?(o=V,Y(h)):(e.consume(h),V)}function A(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||G(h)?N(h):(e.consume(h),A)}function S(h){return h===47||h===62||G(h)?N(h):t(h)}function M(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function Y(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return F(h)?$(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:wl,resolveTo:Sl,tokenize:El},xl={tokenize:Cl},kl={tokenize:Il},bl={tokenize:Tl};function wl(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&&se(e,0,e.length,t),e}function Sl(e,n){let t=e.length,r=0,i,l,o,u;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",c,n],["enter",a,n]],u=te(u,e.slice(l+1,l+r+3)),u=te(u,[["enter",s,n]]),u=te(u,vn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),u=te(u,[["exit",s,n],e[o-2],e[o-1],["exit",a,n]]),u=te(u,e.slice(o+1)),u=te(u,[["exit",c,n]]),se(e,l,e.length,u),e}function El(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return u;function u(d){return l?l._inactive?f(d):(o=r.parser.defined.includes(Te(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):t(d)}function c(d){return d===40?e.attempt(xl,s,o?s:f)(d):d===91?e.attempt(kl,s,o?a:f)(d):o?s(d):f(d)}function a(d){return e.attempt(bl,s,f)(d)}function s(d){return n(d)}function f(d){return l._balanced=!0,t(d)}}function Cl(e,n,t){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return G(f)?Re(e,l)(f):l(f)}function l(f){return f===41?s(f):Kt(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return G(f)?Re(e,c)(f):s(f)}function u(f){return t(f)}function c(f){return f===34||f===39||f===40?Jt(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):s(f)}function a(f){return G(f)?Re(e,s)(f):s(f)}function s(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),n):t(f)}}function Il(e,n,t){const r=this;return i;function i(u){return Gt.call(r,e,l,o,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(u):t(u)}function o(u){return t(u)}}function Tl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const Pl={name:"labelStartImage",resolveAll:Dn.resolveAll,tokenize:Al};function Al(e,n,t){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):t(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(u):n(u)}}const zl={name:"labelStartLink",resolveAll:Dn.resolveAll,tokenize:Ll};function Ll(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const ln={name:"lineEnding",tokenize:vl};function vl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),$(e,n,"linePrefix")}}const We={name:"thematicBreak",tokenize:Dl};function Dl(e,n,t){let r=0,i;return l;function l(a){return e.enter("thematicBreak"),o(a)}function o(a){return i=a,u(a)}function u(a){return a===i?(e.enter("thematicBreakSequence"),c(a)):r>=3&&(a===null||z(a))?(e.exit("thematicBreak"),n(a)):t(a)}function c(a){return a===i?(e.consume(a),r++,c):(e.exit("thematicBreakSequence"),F(a)?$(e,u,"whitespace")(a):u(a))}}const K={continuation:{tokenize:Nl},exit:Ml,name:"list",tokenize:Fl},Ol={partial:!0,tokenize:Bl},_l={partial:!0,tokenize:Rl};function Fl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(p){const w=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:kn(p)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(We,t,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return kn(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):t(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qe,r.interrupt?t:s,e.attempt(Ol,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return F(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Nl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qe,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!F(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_l,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(K,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Rl(e,n,t){const r=this;return $(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function Ml(e){e.exit(this.containerState.type)}function Bl(e,n,t){const r=this;return $(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!F(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pt={name:"setextUnderline",resolveTo:jl,tokenize:Hl};function jl(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Hl(e,n,t){const r=this;let i;return l;function l(a){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),F(a)?$(e,c,"lineSuffix")(a):c(a))}function c(a){return a===null||z(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const Ul={tokenize:Vl};function Vl(e){const n=this,t=e.attempt(Qe,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xi,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ql={resolveAll:er()},$l=Zt("string"),Wl=Zt("text");function Zt(e){return{resolveAll:er(e==="text"?Yl:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(s){return a(s)?l(s):u(s)}function u(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return a(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function a(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function er(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Yl(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,u=0,c;for(;l--;){const a=i[l];if(typeof a=="string"){for(o=a.length;a.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(a===-2)c=!0,u++;else if(a!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(u=0),u){const a={type:t===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(t,0,["enter",a,n],["exit",a,n]),t+=2)}t++}return e}const Xl={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Wt},Ql={91:Zi},Kl={[-2]:rn,[-1]:rn,32:rn},Gl={35:ll,42:We,45:[pt,We],60:sl,61:pt,95:We,96:st,126:st},Jl={38:Xt,92:Yt},Zl={[-5]:ln,[-4]:ln,[-3]:ln,33:Pl,38:Xt,42:bn,60:[zi,gl],91:zl,92:[rl,Yt],93:Dn,95:bn,96:Ui},eo={null:[bn,ql]},no={null:[42,95]},to={null:[]},ro=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:no,contentInitial:Ql,disable:to,document:Xl,flow:Gl,flowInitial:Kl,insideSpan:eo,string:Jl,text:Zl},Symbol.toStringTag,{value:"Module"}));function io(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],u=[];const c={attempt:_(H),check:_(y),consume:L,enter:C,exit:B,interrupt:_(y,{interrupt:!0})},a={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:f};let s=n.tokenize.call(a,c);return n.resolveAll&&l.push(n),a;function f(P){return o=te(o,P),I(),o[o.length-1]!==null?[]:(U(n,0),a.events=vn(l,a.events,a),a.events)}function d(P,T){return oo(p(P),T)}function p(P){return lo(o,P)}function w(){const{_bufferIndex:P,_index:T,line:V,column:A,offset:S}=r;return{_bufferIndex:P,_index:T,line:V,column:A,offset:S}}function E(P){i[P.line]=P.column,R()}function I(){let P;for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<T.length;)x(T.charCodeAt(r._bufferIndex));else x(T)}}function x(P){s=s(P)}function L(P){z(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,R()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=P}function C(P,T){const V=T||{};return V.type=P,V.start=w(),a.events.push(["enter",V,a]),u.push(V),V}function B(P){const T=u.pop();return T.end=w(),a.events.push(["exit",T,a]),T}function H(P,T){U(P,T.from)}function y(P,T){T.restore()}function _(P,T){return V;function V(A,S,M){let Y,re,ce,h;return Array.isArray(A)?pe(A):"tokenize"in A?pe([A]):ie(A);function ie(X){return ze;function ze(me){const be=me!==null&&X[me],we=me!==null&&X.null,Ue=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(we)?we:we?[we]:[]];return pe(Ue)(me)}}function pe(X){return Y=X,re=0,X.length===0?M:m(X[re])}function m(X){return ze;function ze(me){return h=N(),ce=X,X.partial||(a.currentConstruct=X),X.name&&a.parser.constructs.disable.null.includes(X.name)?ye():X.tokenize.call(T?Object.assign(Object.create(a),T):a,c,le,ye)(me)}}function le(X){return P(ce,h),S}function ye(X){return h.restore(),++re<Y.length?m(Y[re]):M}}}function U(P,T){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&se(a.events,T,a.events.length-T,P.resolve(a.events.slice(T),a)),P.resolveTo&&(a.events=P.resolveTo(a.events,a))}function N(){const P=w(),T=a.previous,V=a.currentConstruct,A=a.events.length,S=Array.from(u);return{from:A,restore:M};function M(){r=P,a.previous=T,a.currentConstruct=V,a.events.length=A,u=S,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lo(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function oo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
1
|
+
import{W as Lt,r as Je,j as Ze}from"./index-nY3E1vxV.js";function wr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Sr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Er=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cr={};function Wn(e,n){return(Cr.jsx?Er:Sr).test(e)}const Ir=/[ \t\n\f\r]/g;function Tr(e){return typeof e=="object"?e.type==="text"?Yn(e.value):!1:Yn(e)}function Yn(e){return e.replace(Ir,"")===""}class je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}je.prototype.normal={};je.prototype.property={};je.prototype.space=void 0;function vt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new je(t,r,n)}function mn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let Pr=0;const D=ke(),W=ke(),dn=ke(),k=ke(),q=ke(),Ie=ke(),ee=ke();function ke(){return 2**++Pr}const gn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:dn,spaceSeparated:q},Symbol.toStringTag,{value:"Module"})),en=Object.keys(gn);class Cn extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),Xn(this,"space",i),typeof r=="number")for(;++l<en.length;){const o=en[l];Xn(this,en[l],(r&gn[o])===gn[o])}}}Cn.prototype.defined=!0;function Xn(e,n,t){t&&(e[n]=t)}function Pe(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[mn(r)]=r,t[mn(l.attribute)]=r}return new je(n,t,e.space)}const Dt=Pe({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:q,ariaCurrent:null,ariaDescribedBy:q,ariaDetails:null,ariaDisabled:W,ariaDropEffect:q,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:q,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q,ariaLevel:k,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:q,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:q,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:W,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ot(e,n){return n in e?e[n]:n}function _t(e,n){return Ot(e,n.toLowerCase())}const Ar=Pe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:q,accessKey:q,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:q,autoFocus:D,autoPlay:D,blocking:q,capture:null,charSet:null,checked:D,cite:null,className:q,cols:k,colSpan:null,content:null,contentEditable:W,controls:D,controlsList:q,coords:k|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:dn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:q,height:k,hidden:dn,high:k,href:null,hrefLang:null,htmlFor:q,httpEquiv:q,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:q,itemRef:q,itemScope:D,itemType:q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,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:D,optimum:k,pattern:null,ping:q,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:q,required:D,reversed:D,rows:k,rowSpan:k,sandbox:q,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:W,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:_t}),zr=Pe({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ee,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:q,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:ee,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ee,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ee,rev:ee,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ee,requiredFeatures:ee,requiredFonts:ee,requiredFormats:ee,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:ee,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ee,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ee,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ot}),Nt=Pe({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()}}),Ft=Pe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_t}),Rt=Pe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Lr={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"},vr=/[A-Z]/g,Qn=/-[a-z]/g,Dr=/^data[-\w.:]+$/i;function Or(e,n){const t=mn(n);let r=n,i=J;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Dr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Qn,Nr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Qn.test(l)){let o=l.replace(vr,_r);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Cn}return new i(r,n)}function _r(e){return"-"+e.toLowerCase()}function Nr(e){return e.charAt(1).toUpperCase()}const Fr=vt([Dt,Ar,Nt,Ft,Rt],"html"),In=vt([Dt,zr,Nt,Ft,Rt],"svg");function Rr(e){return e.join(" ").trim()}var Ee={},nn,Kn;function Mr(){if(Kn)return nn;Kn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
2
|
+
`,a="/",s="*",f="",d="comment",p="declaration";function w(I,x){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];x=x||{};var L=1,C=1;function B(A){var S=A.match(n);S&&(L+=S.length);var M=A.lastIndexOf(c);C=~M?A.length-M:C+A.length}function H(){var A={line:L,column:C};return function(S){return S.position=new y(A),F(),S}}function y(A){this.start=A,this.end={line:L,column:C},this.source=x.source}y.prototype.content=I;function _(A){var S=new Error(x.source+":"+L+":"+C+": "+A);if(S.reason=A,S.filename=x.source,S.line=L,S.column=C,S.source=I,!x.silent)throw S}function U(A){var S=A.exec(I);if(S){var M=S[0];return B(M),I=I.slice(M.length),S}}function F(){U(t)}function R(A){var S;for(A=A||[];S=P();)S!==!1&&A.push(S);return A}function P(){var A=H();if(!(a!=I.charAt(0)||s!=I.charAt(1))){for(var S=2;f!=I.charAt(S)&&(s!=I.charAt(S)||a!=I.charAt(S+1));)++S;if(S+=2,f===I.charAt(S-1))return _("End of comment missing");var M=I.slice(2,S-2);return C+=2,B(M),I=I.slice(S),C+=2,A({type:d,comment:M})}}function T(){var A=H(),S=U(r);if(S){if(P(),!U(i))return _("property missing ':'");var M=U(l),Y=A({type:p,property:E(S[0].replace(e,f)),value:M?E(M[0].replace(e,f)):f});return U(o),Y}}function V(){var A=[];R(A);for(var S;S=T();)S!==!1&&(A.push(S),R(A));return A}return F(),V()}function E(I){return I?I.replace(u,f):f}return nn=w,nn}var Gn;function Br(){if(Gn)return Ee;Gn=1;var e=Ee&&Ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.default=t;const n=e(Mr());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),u=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:a,value:s}=c;u?i(a,s,c):s&&(l=l||{},l[a]=s)}),l}return Ee}var De={},Jn;function jr(){if(Jn)return De;Jn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(a){return!a||t.test(a)||e.test(a)},o=function(a,s){return s.toUpperCase()},u=function(a,s){return"".concat(s,"-")},c=function(a,s){return s===void 0&&(s={}),l(a)?a:(a=a.toLowerCase(),s.reactCompat?a=a.replace(i,u):a=a.replace(r,u),a.replace(n,o))};return De.camelCase=c,De}var Oe,Zn;function Hr(){if(Zn)return Oe;Zn=1;var e=Oe&&Oe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Br()),t=jr();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(u,c){u&&c&&(o[(0,t.camelCase)(u,l)]=c)}),o}return r.default=r,Oe=r,Oe}var Ur=Hr();const Vr=Lt(Ur),Mt=Bt("end"),Tn=Bt("start");function Bt(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 qr(e){const n=Tn(e),t=Mt(e);if(n&&t)return{start:n,end:t}}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?et(e.position):"start"in e||"end"in e?et(e):"line"in e||"column"in e?yn(e):""}function yn(e){return nt(e&&e.line)+":"+nt(e&&e.column)}function et(e){return yn(e&&e.start)+"-"+yn(e&&e.end)}function nt(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Fe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const Pn={}.hasOwnProperty,$r=new Map,Wr=/[A-Z]/g,Yr=new Set(["table","tbody","thead","tfoot","tr"]),Xr=new Set(["td","th"]),jt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qr(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=ri(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=ti(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"?In:Fr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Ht(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ht(e,n,t){if(n.type==="element")return Kr(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Gr(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Zr(e,n,t);if(n.type==="mdxjsEsm")return Jr(e,n);if(n.type==="root")return ei(e,n,t);if(n.type==="text")return ni(e,n)}function Kr(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(n);const l=Vt(e,n.tagName,!1),o=ii(e,n);let u=zn(e,n);return Yr.has(n.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Tr(c):!0})),Ut(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Gr(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)}Be(e,n.position)}function Jr(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Be(e,n.position)}function Zr(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=In,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Vt(e,n.name,!0),o=li(e,n),u=zn(e,n);return Ut(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function ei(e,n,t){const r={};return An(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function ni(e,n){return n.value}function Ut(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function An(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ti(e,n,t){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?t:n;return u?a(l,o,u):a(l,o)}}function ri(e,n){return t;function t(r,i,l,o){const u=Array.isArray(l.children),c=Tn(r);return n(i,l,o,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ii(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Pn.call(n.properties,i)){const l=oi(e,i,n.properties[i]);if(l){const[o,u]=l;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&Xr.has(n.tagName)?r=u:t[o]=u}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function li(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const u=o.properties[0];u.type,Object.assign(t,e.evaluater.evaluateExpression(u.argument))}else Be(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else Be(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:$r;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const a=i.get(c)||0;o=c+"-"+a,i.set(c,a+1)}}const u=Ht(e,l,o);u!==void 0&&t.push(u)}return t}function oi(e,n,t){const r=Or(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?wr(t):Rr(t)),r.property==="style"){let i=typeof t=="object"?t:ui(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ai(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Lr[r.property]||r.property:r.attribute,t]}}function ui(e,n){try{return Vr(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Q("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=jt+"#cannot-parse-style-attribute",i}}function Vt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const u=Wn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}r=o}else r=Wn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Pn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Be(e)}function Be(e,n){const t=new Q("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=jt+"#cannot-handle-mdx-estrees-without-createevaluater",t}function ai(e){const n={};let t;for(t in e)Pn.call(e,t)&&(n[si(t)]=e[t]);return n}function si(e){let n=e.replace(Wr,ci);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function ci(e){return"-"+e.toLowerCase()}const tn={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"]},pi={};function fi(e,n){const t=pi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return qt(e,r,i)}function qt(e,n,t){if(hi(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 tt(e.children,n,t)}return Array.isArray(e)?tt(e,n,t):""}function tt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=qt(e[i],n,t);return r.join("")}function hi(e){return!!(e&&typeof e=="object")}const rt=document.createElement("i");function Ln(e){const n="&"+e+";";rt.innerHTML=n;const t=rt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function se(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function te(e,n){return e.length>0?(se(e,e.length,0,n),e):n}const it={}.hasOwnProperty;function mi(e){const n={};let t=-1;for(;++t<e.length;)di(n,e[t]);return n}function di(e,n){let t;for(t in n){const i=(it.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){it.call(i,o)||(i[o]=[]);const u=l[o];gi(i[o],Array.isArray(u)?u:u?[u]:[])}}}function gi(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);se(e,0,0,r)}function $t(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 Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ae=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),yi=ge(/[#-'*+\--9=?A-Z^-~]/);function xn(e){return e!==null&&(e<32||e===127)}const kn=ge(/\d/),xi=ge(/[\dA-Fa-f]/),ki=ge(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function N(e){return e===-2||e===-1||e===32}const bi=ge(new RegExp("\\p{P}|\\p{S}","u")),wi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ae(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&ne(e.charCodeAt(t+1))&&ne(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function $(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return N(c)?(e.enter(t),u(c)):n(c)}function u(c){return N(c)&&l++<i?(e.consume(c),u):(e.exit(t),n(c))}}const Si={tokenize:Ei};function Ei(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),$(e,n,"linePrefix")}function i(u){return e.enter("paragraph"),l(u)}function l(u){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return z(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),o)}}const Ci={tokenize:Ii},lt={tokenize:Ti};function Ii(e){const n=this,t=[];let r=0,i,l,o;return u;function u(C){if(r<t.length){const B=t[r];return n.containerState=B[1],e.attempt(B[0].continuation,c,a)(C)}return a(C)}function c(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&L();const B=n.events.length;let H=B,y;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){y=n.events[H][1].end;break}x(r);let _=B;for(;_<n.events.length;)n.events[_][1].end={...y},_++;return se(n.events,H+1,0,n.events.slice(B)),n.events.length=_,a(C)}return u(C)}function a(C){if(r===t.length){if(!i)return d(C);if(i.currentConstruct&&i.currentConstruct.concrete)return w(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(lt,s,f)(C)}function s(C){return i&&L(),x(r),d(C)}function f(C){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,w(C)}function d(C){return n.containerState={},e.attempt(lt,p,w)(C)}function p(C){return r++,t.push([n.currentConstruct,n.containerState]),d(C)}function w(C){if(C===null){i&&L(),x(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),E(C)}function E(C){if(C===null){I(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return z(C)?(e.consume(C),I(e.exit("chunkFlow")),r=0,n.interrupt=void 0,u):(e.consume(C),E)}function I(C,B){const H=n.sliceStream(C);if(B&&H.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(H),n.parser.lazy[C.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<o&&(!i.events[y][1].end||i.events[y][1].end.offset>o))return;const _=n.events.length;let U=_,F,R;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(F){R=n.events[U][1].end;break}F=!0}for(x(r),y=_;y<n.events.length;)n.events[y][1].end={...R},y++;se(n.events,U+1,0,n.events.slice(_)),n.events.length=y}}function x(C){let B=t.length;for(;B-- >C;){const H=t[B];n.containerState=H[1],H[0].exit.call(n,e)}t.length=C}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ti(e,n,t){return $(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ot(e){if(e===null||G(e)||wi(e))return 1;if(bi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const bn={name:"attention",resolveAll:Pi,tokenize:Ai};function Pi(e,n){let t=-1,r,i,l,o,u,c,a,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};ut(f,-c),ut(d,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[t][1].start={...u.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=te(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=te(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=te(a,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=te(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,a=te(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,a),t=r+a.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Ai(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ot(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===l)return e.consume(c),u;const a=e.exit("attentionSequence"),s=ot(c),f=!s||s===2&&i||t.includes(c),d=!i||i===2&&s||t.includes(r);return a._open=!!(l===42?f:f&&(i||!d)),a._close=!!(l===42?d:d&&(s||!f)),n(c)}}function ut(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const zi={name:"autolink",tokenize:Li};function Li(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return ae(p)?(e.consume(p),o):p===64?t(p):a(p)}function o(p){return p===43||p===45||p===46||ne(p)?(r=1,u(p)):a(p)}function u(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ne(p))&&r++<32?(e.consume(p),u):(r=0,a(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||xn(p)?t(p):(e.consume(p),c)}function a(p){return p===64?(e.consume(p),s):yi(p)?(e.consume(p),a):t(p)}function s(p){return ne(p)?f(p):t(p)}function f(p){return p===46?(e.consume(p),r=0,s):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||ne(p))&&r++<63){const w=p===45?d:f;return e.consume(p),w}return t(p)}}const Qe={partial:!0,tokenize:vi};function vi(e,n,t){return r;function r(l){return N(l)?$(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?n(l):t(l)}}const Wt={continuation:{tokenize:Oi},exit:_i,name:"blockQuote",tokenize:Di};function Di(e,n,t){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return N(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Oi(e,n,t){const r=this;return i;function i(o){return N(o)?$(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Wt,n,t)(o)}}function _i(e){e.exit("blockQuote")}const Yt={name:"characterEscape",tokenize:Ni};function Ni(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ki(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Xt={name:"characterReference",tokenize:Fi};function Fi(e,n,t){const r=this;let i=0,l,o;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),l=31,o=ne,s(f))}function a(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=xi,s):(e.enter("characterReferenceValue"),l=7,o=kn,s(f))}function s(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===ne&&!Ln(r.sliceSerialize(d))?t(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(f)&&i++<l?(e.consume(f),s):t(f)}}const at={partial:!0,tokenize:Mi},st={concrete:!0,name:"codeFenced",tokenize:Ri};function Ri(e,n,t){const r=this,i={partial:!0,tokenize:H};let l=0,o=0,u;return c;function c(y){return a(y)}function a(y){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,u=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(y)}function s(y){return y===u?(o++,e.consume(y),s):o<3?t(y):(e.exit("codeFencedFenceSequence"),N(y)?$(e,f,"whitespace")(y):f(y))}function f(y){return y===null||z(y)?(e.exit("codeFencedFence"),r.interrupt?n(y):e.check(at,E,B)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(y)):N(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$(e,p,"whitespace")(y)):y===96&&y===u?t(y):(e.consume(y),d)}function p(y){return y===null||z(y)?f(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(y))}function w(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(y)):y===96&&y===u?t(y):(e.consume(y),w)}function E(y){return e.attempt(i,B,I)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),x}function x(y){return l>0&&N(y)?$(e,L,"linePrefix",l+1)(y):L(y)}function L(y){return y===null||z(y)?e.check(at,E,B)(y):(e.enter("codeFlowValue"),C(y))}function C(y){return y===null||z(y)?(e.exit("codeFlowValue"),L(y)):(e.consume(y),C)}function B(y){return e.exit("codeFenced"),n(y)}function H(y,_,U){let F=0;return R;function R(S){return y.enter("lineEnding"),y.consume(S),y.exit("lineEnding"),P}function P(S){return y.enter("codeFencedFence"),N(S)?$(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):T(S)}function T(S){return S===u?(y.enter("codeFencedFenceSequence"),V(S)):U(S)}function V(S){return S===u?(F++,y.consume(S),V):F>=o?(y.exit("codeFencedFenceSequence"),N(S)?$(y,A,"whitespace")(S):A(S)):U(S)}function A(S){return S===null||z(S)?(y.exit("codeFencedFence"),_(S)):U(S)}}}function Mi(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const rn={name:"codeIndented",tokenize:ji},Bi={partial:!0,tokenize:Hi};function ji(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),$(e,l,"linePrefix",5)(a)}function l(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?c(a):z(a)?e.attempt(Bi,o,c)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||z(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function c(a){return e.exit("codeIndented"),n(a)}}function Hi(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):$(e,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):z(o)?i(o):t(o)}}const Ui={name:"codeText",previous:qi,resolve:Vi,tokenize:$i};function Vi(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 qi(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $i(e,n,t){let r=0,i,l;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?t(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(l=e.enter("codeTextSequence"),i=0,s(f)):z(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),a(f))}function a(f){return f===null||f===32||f===96||z(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),a)}function s(f){return f===96?(e.consume(f),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(f)):(l.type="codeTextData",a(f))}}class Wi{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&_e(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),_e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),_e(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);_e(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);_e(this.left,t.reverse())}}}function _e(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 Qt(e){const n={};let t=-1,r,i,l,o,u,c,a;const s=new Wi(e);for(;++t<s.length;){for(;t in n;)t=n[t];if(r=s.get(t),t&&r[1].type==="chunkFlow"&&s.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Yi(s,t)),t=n[t],a=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=s.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},u=s.slice(i,t),u.unshift(r),s.splice(i,t-i+1,u))}}return se(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!a}function Yi(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,c=[],a={};let s,f,d=-1,p=t,w=0,E=0;const I=[E];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=t;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(E=d+1,I.push(E),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):I.pop(),d=I.length;d--;){const x=u.slice(I[d],I[d+1]),L=l.pop();c.push([L,L+x.length-1]),e.splice(L,2,x)}for(c.reverse(),d=-1;++d<c.length;)a[w+c[d][0]]=w+c[d][1],w+=c[d][1]-c[d][0]-1;return a}const Xi={resolve:Ki,tokenize:Gi},Qi={partial:!0,tokenize:Ji};function Ki(e){return Qt(e),e}function Gi(e,n){let t;return r;function r(u){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?l(u):z(u)?e.check(Qi,o,l)(u):(e.consume(u),i)}function l(u){return e.exit("chunkContent"),e.exit("content"),n(u)}function o(u){return e.consume(u),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ji(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),$(e,l,"linePrefix")}function l(o){if(o===null||z(o))return t(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Kt(e,n,t,r,i,l,o,u,c){const a=c||Number.POSITIVE_INFINITY;let s=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),d):x===null||x===32||x===41||xn(x)?t(x):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(x))}function d(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(u),d(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?w:p)}function w(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function E(x){return!s&&(x===null||x===41||G(x))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(x)):s<a&&x===40?(e.consume(x),s++,E):x===41?(e.consume(x),s--,E):x===null||x===32||x===40||xn(x)?t(x):(e.consume(x),x===92?I:E)}function I(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function Gt(e,n,t,r,i,l){const o=this;let u=0,c;return a;function a(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),s}function s(p){return u>999||p===null||p===91||p===93&&!c||p===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||z(p)||u++>999?(e.exit("chunkString"),s(p)):(e.consume(p),c||(c=!N(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,f):f(p)}}function Jt(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,c):t(d)}function c(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),c(o)):d===null?t(d):z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),$(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||z(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Re(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):N(i)?$(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Zi={name:"definition",tokenize:nl},el={partial:!0,tokenize:tl};function nl(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Gt.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return G(p)?Re(e,a)(p):a(p)}function a(p){return Kt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(el,f,f)(p)}function f(p){return N(p)?$(e,d,"whitespace")(p):d(p)}function d(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function tl(e,n,t){return r;function r(u){return G(u)?Re(e,i)(u):t(u)}function i(u){return Jt(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return N(u)?$(e,o,"whitespace")(u):o(u)}function o(u){return u===null||z(u)?n(u):t(u)}}const rl={name:"hardBreakEscape",tokenize:il};function il(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const ll={name:"headingAtx",resolve:ol,tokenize:ul};function ol(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function ul(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||G(s)?(e.exit("atxHeadingSequence"),u(s)):t(s)}function u(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||z(s)?(e.exit("atxHeading"),n(s)):N(s)?$(e,u,"whitespace")(s):(e.enter("atxHeadingText"),a(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),u(s))}function a(s){return s===null||s===35||G(s)?(e.exit("atxHeadingText"),u(s)):(e.consume(s),a)}}const al=["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"],ct=["pre","script","style","textarea"],sl={concrete:!0,name:"htmlFlow",resolveTo:fl,tokenize:hl},cl={partial:!0,tokenize:dl},pl={partial:!0,tokenize:ml};function fl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function hl(e,n,t){const r=this;let i,l,o,u,c;return a;function a(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,E):m===63?(e.consume(m),i=3,r.interrupt?n:h):ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,u=0,w):ae(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function w(m){const le="CDATA[";return m===le.charCodeAt(u++)?(e.consume(m),u===le.length?r.interrupt?n:T:w):t(m)}function E(m){return ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||G(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ct.includes(ye)?(i=1,r.interrupt?n(m):T(m)):al.includes(o.toLowerCase())?(i=6,le?(e.consume(m),x):r.interrupt?n(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):C(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),I):t(m)}function x(m){return m===62?(e.consume(m),r.interrupt?n:T):t(m)}function L(m){return N(m)?(e.consume(m),L):R(m)}function C(m){return m===47?(e.consume(m),R):m===58||m===95||ae(m)?(e.consume(m),B):N(m)?(e.consume(m),C):R(m)}function B(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),B):H(m)}function H(m){return m===61?(e.consume(m),y):N(m)?(e.consume(m),H):C(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,_):N(m)?(e.consume(m),y):U(m)}function _(m){return m===c?(e.consume(m),c=null,F):m===null||z(m)?t(m):(e.consume(m),_)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?H(m):(e.consume(m),U)}function F(m){return m===47||m===62||N(m)?C(m):t(m)}function R(m){return m===62?(e.consume(m),P):t(m)}function P(m){return m===null||z(m)?T(m):N(m)?(e.consume(m),P):t(m)}function T(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),Y):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):z(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(cl,pe,V)(m)):m===null||z(m)?(e.exit("htmlFlowData"),V(m)):(e.consume(m),T)}function V(m){return e.check(pl,A,pe)(m)}function A(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),S}function S(m){return m===null||z(m)?V(m):(e.enter("htmlFlowData"),T(m))}function M(m){return m===45?(e.consume(m),h):T(m)}function Y(m){return m===47?(e.consume(m),o="",re):T(m)}function re(m){if(m===62){const le=o.toLowerCase();return ct.includes(le)?(e.consume(m),ie):T(m)}return ae(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):T(m)}function ce(m){return m===93?(e.consume(m),h):T(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):T(m)}function ie(m){return m===null||z(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function ml(e,n,t){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function dl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qe,n,t)}}const gl={name:"htmlText",tokenize:yl};function yl(e,n,t){const r=this;let i,l,o;return u;function u(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),c}function c(h){return h===33?(e.consume(h),a):h===47?(e.consume(h),H):h===63?(e.consume(h),C):ae(h)?(e.consume(h),U):t(h)}function a(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,w):ae(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):z(h)?(o=f,Y(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?M(h):h===45?d(h):f(h)}function w(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?E:w):t(h)}function E(h){return h===null?t(h):h===93?(e.consume(h),I):z(h)?(o=E,Y(h)):(e.consume(h),E)}function I(h){return h===93?(e.consume(h),x):E(h)}function x(h){return h===62?M(h):h===93?(e.consume(h),x):E(h)}function L(h){return h===null||h===62?M(h):z(h)?(o=L,Y(h)):(e.consume(h),L)}function C(h){return h===null?t(h):h===63?(e.consume(h),B):z(h)?(o=C,Y(h)):(e.consume(h),C)}function B(h){return h===62?M(h):C(h)}function H(h){return ae(h)?(e.consume(h),y):t(h)}function y(h){return h===45||ne(h)?(e.consume(h),y):_(h)}function _(h){return z(h)?(o=_,Y(h)):N(h)?(e.consume(h),_):M(h)}function U(h){return h===45||ne(h)?(e.consume(h),U):h===47||h===62||G(h)?F(h):t(h)}function F(h){return h===47?(e.consume(h),M):h===58||h===95||ae(h)?(e.consume(h),R):z(h)?(o=F,Y(h)):N(h)?(e.consume(h),F):M(h)}function R(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),R):P(h)}function P(h){return h===61?(e.consume(h),T):z(h)?(o=P,Y(h)):N(h)?(e.consume(h),P):F(h)}function T(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,V):z(h)?(o=T,Y(h)):N(h)?(e.consume(h),T):(e.consume(h),A)}function V(h){return h===i?(e.consume(h),i=void 0,S):h===null?t(h):z(h)?(o=V,Y(h)):(e.consume(h),V)}function A(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||G(h)?F(h):(e.consume(h),A)}function S(h){return h===47||h===62||G(h)?F(h):t(h)}function M(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function Y(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return N(h)?$(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:wl,resolveTo:Sl,tokenize:El},xl={tokenize:Cl},kl={tokenize:Il},bl={tokenize:Tl};function wl(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&&se(e,0,e.length,t),e}function Sl(e,n){let t=e.length,r=0,i,l,o,u;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",c,n],["enter",a,n]],u=te(u,e.slice(l+1,l+r+3)),u=te(u,[["enter",s,n]]),u=te(u,vn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),u=te(u,[["exit",s,n],e[o-2],e[o-1],["exit",a,n]]),u=te(u,e.slice(o+1)),u=te(u,[["exit",c,n]]),se(e,l,e.length,u),e}function El(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return u;function u(d){return l?l._inactive?f(d):(o=r.parser.defined.includes(Te(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):t(d)}function c(d){return d===40?e.attempt(xl,s,o?s:f)(d):d===91?e.attempt(kl,s,o?a:f)(d):o?s(d):f(d)}function a(d){return e.attempt(bl,s,f)(d)}function s(d){return n(d)}function f(d){return l._balanced=!0,t(d)}}function Cl(e,n,t){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return G(f)?Re(e,l)(f):l(f)}function l(f){return f===41?s(f):Kt(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return G(f)?Re(e,c)(f):s(f)}function u(f){return t(f)}function c(f){return f===34||f===39||f===40?Jt(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):s(f)}function a(f){return G(f)?Re(e,s)(f):s(f)}function s(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),n):t(f)}}function Il(e,n,t){const r=this;return i;function i(u){return Gt.call(r,e,l,o,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(u):t(u)}function o(u){return t(u)}}function Tl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const Pl={name:"labelStartImage",resolveAll:Dn.resolveAll,tokenize:Al};function Al(e,n,t){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):t(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(u):n(u)}}const zl={name:"labelStartLink",resolveAll:Dn.resolveAll,tokenize:Ll};function Ll(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const ln={name:"lineEnding",tokenize:vl};function vl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),$(e,n,"linePrefix")}}const We={name:"thematicBreak",tokenize:Dl};function Dl(e,n,t){let r=0,i;return l;function l(a){return e.enter("thematicBreak"),o(a)}function o(a){return i=a,u(a)}function u(a){return a===i?(e.enter("thematicBreakSequence"),c(a)):r>=3&&(a===null||z(a))?(e.exit("thematicBreak"),n(a)):t(a)}function c(a){return a===i?(e.consume(a),r++,c):(e.exit("thematicBreakSequence"),N(a)?$(e,u,"whitespace")(a):u(a))}}const K={continuation:{tokenize:Fl},exit:Ml,name:"list",tokenize:Nl},Ol={partial:!0,tokenize:Bl},_l={partial:!0,tokenize:Rl};function Nl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(p){const w=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:kn(p)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(We,t,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return kn(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):t(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qe,r.interrupt?t:s,e.attempt(Ol,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return N(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Fl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qe,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!N(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_l,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(K,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Rl(e,n,t){const r=this;return $(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function Ml(e){e.exit(this.containerState.type)}function Bl(e,n,t){const r=this;return $(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!N(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pt={name:"setextUnderline",resolveTo:jl,tokenize:Hl};function jl(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Hl(e,n,t){const r=this;let i;return l;function l(a){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),N(a)?$(e,c,"lineSuffix")(a):c(a))}function c(a){return a===null||z(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const Ul={tokenize:Vl};function Vl(e){const n=this,t=e.attempt(Qe,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xi,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ql={resolveAll:er()},$l=Zt("string"),Wl=Zt("text");function Zt(e){return{resolveAll:er(e==="text"?Yl:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(s){return a(s)?l(s):u(s)}function u(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return a(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function a(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function er(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Yl(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,u=0,c;for(;l--;){const a=i[l];if(typeof a=="string"){for(o=a.length;a.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(a===-2)c=!0,u++;else if(a!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(u=0),u){const a={type:t===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(t,0,["enter",a,n],["exit",a,n]),t+=2)}t++}return e}const Xl={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Wt},Ql={91:Zi},Kl={[-2]:rn,[-1]:rn,32:rn},Gl={35:ll,42:We,45:[pt,We],60:sl,61:pt,95:We,96:st,126:st},Jl={38:Xt,92:Yt},Zl={[-5]:ln,[-4]:ln,[-3]:ln,33:Pl,38:Xt,42:bn,60:[zi,gl],91:zl,92:[rl,Yt],93:Dn,95:bn,96:Ui},eo={null:[bn,ql]},no={null:[42,95]},to={null:[]},ro=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:no,contentInitial:Ql,disable:to,document:Xl,flow:Gl,flowInitial:Kl,insideSpan:eo,string:Jl,text:Zl},Symbol.toStringTag,{value:"Module"}));function io(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],u=[];const c={attempt:_(H),check:_(y),consume:L,enter:C,exit:B,interrupt:_(y,{interrupt:!0})},a={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:f};let s=n.tokenize.call(a,c);return n.resolveAll&&l.push(n),a;function f(P){return o=te(o,P),I(),o[o.length-1]!==null?[]:(U(n,0),a.events=vn(l,a.events,a),a.events)}function d(P,T){return oo(p(P),T)}function p(P){return lo(o,P)}function w(){const{_bufferIndex:P,_index:T,line:V,column:A,offset:S}=r;return{_bufferIndex:P,_index:T,line:V,column:A,offset:S}}function E(P){i[P.line]=P.column,R()}function I(){let P;for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<T.length;)x(T.charCodeAt(r._bufferIndex));else x(T)}}function x(P){s=s(P)}function L(P){z(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,R()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=P}function C(P,T){const V=T||{};return V.type=P,V.start=w(),a.events.push(["enter",V,a]),u.push(V),V}function B(P){const T=u.pop();return T.end=w(),a.events.push(["exit",T,a]),T}function H(P,T){U(P,T.from)}function y(P,T){T.restore()}function _(P,T){return V;function V(A,S,M){let Y,re,ce,h;return Array.isArray(A)?pe(A):"tokenize"in A?pe([A]):ie(A);function ie(X){return ze;function ze(me){const be=me!==null&&X[me],we=me!==null&&X.null,Ue=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(we)?we:we?[we]:[]];return pe(Ue)(me)}}function pe(X){return Y=X,re=0,X.length===0?M:m(X[re])}function m(X){return ze;function ze(me){return h=F(),ce=X,X.partial||(a.currentConstruct=X),X.name&&a.parser.constructs.disable.null.includes(X.name)?ye():X.tokenize.call(T?Object.assign(Object.create(a),T):a,c,le,ye)(me)}}function le(X){return P(ce,h),S}function ye(X){return h.restore(),++re<Y.length?m(Y[re]):M}}}function U(P,T){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&se(a.events,T,a.events.length-T,P.resolve(a.events.slice(T),a)),P.resolveTo&&(a.events=P.resolveTo(a.events,a))}function F(){const P=w(),T=a.previous,V=a.currentConstruct,A=a.events.length,S=Array.from(u);return{from:A,restore:M};function M(){r=P,a.previous=T,a.currentConstruct=V,a.events.length=A,u=S,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lo(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function oo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
3
|
`;break}case-3:{o=`\r
|
|
4
|
-
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function uo(e){const r={constructs:mi([ro,...(e||{}).extensions||[]]),content:i(Si),defined:[],document:i(Ci),flow:i(Ul),lazy:{},string:i($l),text:i(Wl)};return r;function i(l){return o;function o(u){return io(r,l,u)}}}function ao(e){for(;!Qt(e););return e}const ft=/[\0\t\n\r]/g;function so(){let e=1,n="",t=!0,r;return i;function i(l,o,u){const c=[];let a,s,f,d,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),f=0,n="",t&&(l.charCodeAt(0)===65279&&f++,t=void 0);f<l.length;){if(ft.lastIndex=f,a=ft.exec(l),d=a&&a.index!==void 0?a.index:l.length,p=l.charCodeAt(d),!a){n=l.slice(f);break}if(p===10&&f===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<d&&(c.push(l.slice(f,d)),e+=d-f),p){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return u&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const co=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function po(e){return e.replace(co,fo)}function fo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return $t(t.slice(l?2:1),l?16:10)}return Ln(t)||e}const nr={}.hasOwnProperty;function ho(e,n,t){return typeof n!="string"&&(t=n,n=void 0),mo(t)(ao(uo(t).document().write(so()(e,n,!0))))}function mo(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(qn),autolinkProtocol:N,autolinkEmail:N,atxHeading:l(Hn),blockQuote:l(we),characterEscape:N,characterReference:N,codeFenced:l(Ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Ue,o),codeText:l(fr,o),codeTextData:N,data:N,codeFlowValue:N,definition:l(hr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(mr),hardBreakEscape:l(Un),hardBreakTrailing:l(Un),htmlFlow:l(Vn,o),htmlFlowData:N,htmlText:l(Vn,o),htmlTextData:N,image:l(dr),label:o,link:l(qn),listItem:l(gr),listItemValue:d,listOrdered:l($n,f),listUnordered:l($n),paragraph:l(yr),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Hn),strong:l(xr),thematicBreak:l(br)},exit:{atxHeading:c(),atxHeadingSequence:H,autolink:c(),autolinkEmail:be,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:X,characterReference:ze,codeFenced:c(I),codeFencedFence:E,codeFencedFenceInfo:p,codeFencedFenceMeta:w,codeFlowValue:R,codeIndented:c(x),codeText:c(S),codeTextData:R,data:R,definition:c(),definitionDestinationString:B,definitionLabelString:L,definitionTitleString:C,emphasis:c(),hardBreakEscape:c(T),hardBreakTrailing:c(T),htmlFlow:c(V),htmlFlowData:R,htmlText:c(A),htmlTextData:R,image:c(Y),label:ce,labelText:re,lineEnding:P,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:h,resourceTitleString:ie,resource:pe,setextHeading:c(U),setextHeadingLineSequence:_,setextHeadingText:y,strong:c(),thematicBreak:c()}};tr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let b={type:"root",children:[]};const v={stack:[b],tokenStack:[],config:n,enter:u,exit:a,buffer:o,resume:s,data:t},O=[];let j=-1;for(;++j<g.length;)if(g[j][1].type==="listOrdered"||g[j][1].type==="listUnordered")if(g[j][0]==="enter")O.push(j);else{const oe=O.pop();j=i(g,oe,j)}for(j=-1;++j<g.length;){const oe=n[g[j][0]];nr.call(oe,g[j][1].type)&&oe[g[j][1].type].call(Object.assign({sliceSerialize:g[j][2].sliceSerialize},v),g[j][1])}if(v.tokenStack.length>0){const oe=v.tokenStack[v.tokenStack.length-1];(oe[1]||ht).call(v,void 0,oe[0])}for(b.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},j=-1;++j<n.transforms.length;)b=n.transforms[j](b)||b;return b}function i(g,b,v){let O=b-1,j=-1,oe=!1,xe,fe,Le,ve;for(;++O<=v;){const Z=g[O];switch(Z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Z[0]==="enter"?j++:j--,ve=void 0;break}case"lineEndingBlank":{Z[0]==="enter"&&(xe&&!ve&&!j&&!Le&&(Le=O),ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ve=void 0}if(!j&&Z[0]==="enter"&&Z[1].type==="listItemPrefix"||j===-1&&Z[0]==="exit"&&(Z[1].type==="listUnordered"||Z[1].type==="listOrdered")){if(xe){let Se=O;for(fe=void 0;Se--;){const he=g[Se];if(he[1].type==="lineEnding"||he[1].type==="lineEndingBlank"){if(he[0]==="exit")continue;fe&&(g[fe][1].type="lineEndingBlank",oe=!0),he[1].type="lineEnding",fe=Se}else if(!(he[1].type==="linePrefix"||he[1].type==="blockQuotePrefix"||he[1].type==="blockQuotePrefixWhitespace"||he[1].type==="blockQuoteMarker"||he[1].type==="listItemIndent"))break}Le&&(!fe||Le<fe)&&(xe._spread=!0),xe.end=Object.assign({},fe?g[fe][1].start:Z[1].end),g.splice(fe||O,0,["exit",xe,Z[2]]),O++,v++}if(Z[1].type==="listItemPrefix"){const Se={type:"listItem",_spread:!1,start:Object.assign({},Z[1].start),end:void 0};xe=Se,g.splice(O,0,["enter",Se,Z[2]]),O++,v++,Le=void 0,ve=!0}}}return g[b][1]._spread=oe,v}function l(g,b){return v;function v(O){u.call(this,g(O),O),b&&b.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(g,b,v){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([b,v||void 0]),g.position={start:de(b.start),end:void 0}}function c(g){return b;function b(v){g&&g.call(this,v),a.call(this,v)}}function a(g,b){const v=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==g.type&&(b?b.call(this,g,O[0]):(O[1]||ht).call(this,g,O[0]));else throw new Error("Cannot close `"+g.type+"` ("+Ne({start:g.start,end:g.end})+"): it’s not open");v.position.end=de(g.end)}function s(){return fi(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(g){if(this.data.expectingFirstListItemValue){const b=this.stack[this.stack.length-2];b.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function p(){const g=this.resume(),b=this.stack[this.stack.length-1];b.lang=g}function w(){const g=this.resume(),b=this.stack[this.stack.length-1];b.meta=g}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g.replace(/(\r?\n|\r)$/g,"")}function L(g){const b=this.resume(),v=this.stack[this.stack.length-1];v.label=b,v.identifier=Te(this.sliceSerialize(g)).toLowerCase()}function C(){const g=this.resume(),b=this.stack[this.stack.length-1];b.title=g}function B(){const g=this.resume(),b=this.stack[this.stack.length-1];b.url=g}function H(g){const b=this.stack[this.stack.length-1];if(!b.depth){const v=this.sliceSerialize(g).length;b.depth=v}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function _(g){const b=this.stack[this.stack.length-1];b.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function N(g){const v=this.stack[this.stack.length-1].children;let O=v[v.length-1];(!O||O.type!=="text")&&(O=kr(),O.position={start:de(g.start),end:void 0},v.push(O)),this.stack.push(O)}function R(g){const b=this.stack.pop();b.value+=this.sliceSerialize(g),b.position.end=de(g.end)}function P(g){const b=this.stack[this.stack.length-1];if(this.data.atHardBreak){const v=b.children[b.children.length-1];v.position.end=de(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(b.type)&&(N.call(this,g),R.call(this,g))}function T(){this.data.atHardBreak=!0}function V(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function A(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function S(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function M(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const b=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=b,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function Y(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const b=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=b,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function re(g){const b=this.sliceSerialize(g),v=this.stack[this.stack.length-2];v.label=po(b),v.identifier=Te(b).toLowerCase()}function ce(){const g=this.stack[this.stack.length-1],b=this.resume(),v=this.stack[this.stack.length-1];if(this.data.inReference=!0,v.type==="link"){const O=g.children;v.children=O}else v.alt=b}function h(){const g=this.resume(),b=this.stack[this.stack.length-1];b.url=g}function ie(){const g=this.resume(),b=this.stack[this.stack.length-1];b.title=g}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function le(g){const b=this.resume(),v=this.stack[this.stack.length-1];v.label=b,v.identifier=Te(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ye(g){this.data.characterReferenceType=g.type}function X(g){const b=this.sliceSerialize(g),v=this.data.characterReferenceType;let O;v?(O=$t(b,v==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=Ln(b);const j=this.stack[this.stack.length-1];j.value+=O}function ze(g){const b=this.stack.pop();b.position.end=de(g.end)}function me(g){R.call(this,g);const b=this.stack[this.stack.length-1];b.url=this.sliceSerialize(g)}function be(g){R.call(this,g);const b=this.stack[this.stack.length-1];b.url="mailto:"+this.sliceSerialize(g)}function we(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function fr(){return{type:"inlineCode",value:""}}function hr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mr(){return{type:"emphasis",children:[]}}function Hn(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function Vn(){return{type:"html",value:""}}function dr(){return{type:"image",title:null,url:"",alt:null}}function qn(){return{type:"link",title:null,url:"",children:[]}}function $n(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function gr(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function yr(){return{type:"paragraph",children:[]}}function xr(){return{type:"strong",children:[]}}function kr(){return{type:"text",value:""}}function br(){return{type:"thematicBreak"}}}function de(e){return{line:e.line,column:e.column,offset:e.offset}}function tr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?tr(e,r):go(e,r)}}function go(e,n){let t;for(t in n)if(nr.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 ht(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ne({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ne({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ne({start:n.start,end:n.end})+") is still open")}function yo(e){const n=this;n.parser=t;function t(r){return ho(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function xo(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 ko(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
4
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function uo(e){const r={constructs:mi([ro,...(e||{}).extensions||[]]),content:i(Si),defined:[],document:i(Ci),flow:i(Ul),lazy:{},string:i($l),text:i(Wl)};return r;function i(l){return o;function o(u){return io(r,l,u)}}}function ao(e){for(;!Qt(e););return e}const ft=/[\0\t\n\r]/g;function so(){let e=1,n="",t=!0,r;return i;function i(l,o,u){const c=[];let a,s,f,d,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),f=0,n="",t&&(l.charCodeAt(0)===65279&&f++,t=void 0);f<l.length;){if(ft.lastIndex=f,a=ft.exec(l),d=a&&a.index!==void 0?a.index:l.length,p=l.charCodeAt(d),!a){n=l.slice(f);break}if(p===10&&f===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<d&&(c.push(l.slice(f,d)),e+=d-f),p){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return u&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const co=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function po(e){return e.replace(co,fo)}function fo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return $t(t.slice(l?2:1),l?16:10)}return Ln(t)||e}const nr={}.hasOwnProperty;function ho(e,n,t){return typeof n!="string"&&(t=n,n=void 0),mo(t)(ao(uo(t).document().write(so()(e,n,!0))))}function mo(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(qn),autolinkProtocol:F,autolinkEmail:F,atxHeading:l(Hn),blockQuote:l(we),characterEscape:F,characterReference:F,codeFenced:l(Ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Ue,o),codeText:l(fr,o),codeTextData:F,data:F,codeFlowValue:F,definition:l(hr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(mr),hardBreakEscape:l(Un),hardBreakTrailing:l(Un),htmlFlow:l(Vn,o),htmlFlowData:F,htmlText:l(Vn,o),htmlTextData:F,image:l(dr),label:o,link:l(qn),listItem:l(gr),listItemValue:d,listOrdered:l($n,f),listUnordered:l($n),paragraph:l(yr),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Hn),strong:l(xr),thematicBreak:l(br)},exit:{atxHeading:c(),atxHeadingSequence:H,autolink:c(),autolinkEmail:be,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:X,characterReference:ze,codeFenced:c(I),codeFencedFence:E,codeFencedFenceInfo:p,codeFencedFenceMeta:w,codeFlowValue:R,codeIndented:c(x),codeText:c(S),codeTextData:R,data:R,definition:c(),definitionDestinationString:B,definitionLabelString:L,definitionTitleString:C,emphasis:c(),hardBreakEscape:c(T),hardBreakTrailing:c(T),htmlFlow:c(V),htmlFlowData:R,htmlText:c(A),htmlTextData:R,image:c(Y),label:ce,labelText:re,lineEnding:P,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:h,resourceTitleString:ie,resource:pe,setextHeading:c(U),setextHeadingLineSequence:_,setextHeadingText:y,strong:c(),thematicBreak:c()}};tr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let b={type:"root",children:[]};const v={stack:[b],tokenStack:[],config:n,enter:u,exit:a,buffer:o,resume:s,data:t},O=[];let j=-1;for(;++j<g.length;)if(g[j][1].type==="listOrdered"||g[j][1].type==="listUnordered")if(g[j][0]==="enter")O.push(j);else{const oe=O.pop();j=i(g,oe,j)}for(j=-1;++j<g.length;){const oe=n[g[j][0]];nr.call(oe,g[j][1].type)&&oe[g[j][1].type].call(Object.assign({sliceSerialize:g[j][2].sliceSerialize},v),g[j][1])}if(v.tokenStack.length>0){const oe=v.tokenStack[v.tokenStack.length-1];(oe[1]||ht).call(v,void 0,oe[0])}for(b.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},j=-1;++j<n.transforms.length;)b=n.transforms[j](b)||b;return b}function i(g,b,v){let O=b-1,j=-1,oe=!1,xe,fe,Le,ve;for(;++O<=v;){const Z=g[O];switch(Z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Z[0]==="enter"?j++:j--,ve=void 0;break}case"lineEndingBlank":{Z[0]==="enter"&&(xe&&!ve&&!j&&!Le&&(Le=O),ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ve=void 0}if(!j&&Z[0]==="enter"&&Z[1].type==="listItemPrefix"||j===-1&&Z[0]==="exit"&&(Z[1].type==="listUnordered"||Z[1].type==="listOrdered")){if(xe){let Se=O;for(fe=void 0;Se--;){const he=g[Se];if(he[1].type==="lineEnding"||he[1].type==="lineEndingBlank"){if(he[0]==="exit")continue;fe&&(g[fe][1].type="lineEndingBlank",oe=!0),he[1].type="lineEnding",fe=Se}else if(!(he[1].type==="linePrefix"||he[1].type==="blockQuotePrefix"||he[1].type==="blockQuotePrefixWhitespace"||he[1].type==="blockQuoteMarker"||he[1].type==="listItemIndent"))break}Le&&(!fe||Le<fe)&&(xe._spread=!0),xe.end=Object.assign({},fe?g[fe][1].start:Z[1].end),g.splice(fe||O,0,["exit",xe,Z[2]]),O++,v++}if(Z[1].type==="listItemPrefix"){const Se={type:"listItem",_spread:!1,start:Object.assign({},Z[1].start),end:void 0};xe=Se,g.splice(O,0,["enter",Se,Z[2]]),O++,v++,Le=void 0,ve=!0}}}return g[b][1]._spread=oe,v}function l(g,b){return v;function v(O){u.call(this,g(O),O),b&&b.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(g,b,v){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([b,v||void 0]),g.position={start:de(b.start),end:void 0}}function c(g){return b;function b(v){g&&g.call(this,v),a.call(this,v)}}function a(g,b){const v=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==g.type&&(b?b.call(this,g,O[0]):(O[1]||ht).call(this,g,O[0]));else throw new Error("Cannot close `"+g.type+"` ("+Fe({start:g.start,end:g.end})+"): it’s not open");v.position.end=de(g.end)}function s(){return fi(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(g){if(this.data.expectingFirstListItemValue){const b=this.stack[this.stack.length-2];b.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function p(){const g=this.resume(),b=this.stack[this.stack.length-1];b.lang=g}function w(){const g=this.resume(),b=this.stack[this.stack.length-1];b.meta=g}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g.replace(/(\r?\n|\r)$/g,"")}function L(g){const b=this.resume(),v=this.stack[this.stack.length-1];v.label=b,v.identifier=Te(this.sliceSerialize(g)).toLowerCase()}function C(){const g=this.resume(),b=this.stack[this.stack.length-1];b.title=g}function B(){const g=this.resume(),b=this.stack[this.stack.length-1];b.url=g}function H(g){const b=this.stack[this.stack.length-1];if(!b.depth){const v=this.sliceSerialize(g).length;b.depth=v}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function _(g){const b=this.stack[this.stack.length-1];b.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function F(g){const v=this.stack[this.stack.length-1].children;let O=v[v.length-1];(!O||O.type!=="text")&&(O=kr(),O.position={start:de(g.start),end:void 0},v.push(O)),this.stack.push(O)}function R(g){const b=this.stack.pop();b.value+=this.sliceSerialize(g),b.position.end=de(g.end)}function P(g){const b=this.stack[this.stack.length-1];if(this.data.atHardBreak){const v=b.children[b.children.length-1];v.position.end=de(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(b.type)&&(F.call(this,g),R.call(this,g))}function T(){this.data.atHardBreak=!0}function V(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function A(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function S(){const g=this.resume(),b=this.stack[this.stack.length-1];b.value=g}function M(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const b=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=b,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function Y(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const b=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=b,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function re(g){const b=this.sliceSerialize(g),v=this.stack[this.stack.length-2];v.label=po(b),v.identifier=Te(b).toLowerCase()}function ce(){const g=this.stack[this.stack.length-1],b=this.resume(),v=this.stack[this.stack.length-1];if(this.data.inReference=!0,v.type==="link"){const O=g.children;v.children=O}else v.alt=b}function h(){const g=this.resume(),b=this.stack[this.stack.length-1];b.url=g}function ie(){const g=this.resume(),b=this.stack[this.stack.length-1];b.title=g}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function le(g){const b=this.resume(),v=this.stack[this.stack.length-1];v.label=b,v.identifier=Te(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ye(g){this.data.characterReferenceType=g.type}function X(g){const b=this.sliceSerialize(g),v=this.data.characterReferenceType;let O;v?(O=$t(b,v==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=Ln(b);const j=this.stack[this.stack.length-1];j.value+=O}function ze(g){const b=this.stack.pop();b.position.end=de(g.end)}function me(g){R.call(this,g);const b=this.stack[this.stack.length-1];b.url=this.sliceSerialize(g)}function be(g){R.call(this,g);const b=this.stack[this.stack.length-1];b.url="mailto:"+this.sliceSerialize(g)}function we(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function fr(){return{type:"inlineCode",value:""}}function hr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mr(){return{type:"emphasis",children:[]}}function Hn(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function Vn(){return{type:"html",value:""}}function dr(){return{type:"image",title:null,url:"",alt:null}}function qn(){return{type:"link",title:null,url:"",children:[]}}function $n(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function gr(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function yr(){return{type:"paragraph",children:[]}}function xr(){return{type:"strong",children:[]}}function kr(){return{type:"text",value:""}}function br(){return{type:"thematicBreak"}}}function de(e){return{line:e.line,column:e.column,offset:e.offset}}function tr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?tr(e,r):go(e,r)}}function go(e,n){let t;for(t in n)if(nr.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 ht(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is still open")}function yo(e){const n=this;n.parser=t;function t(r){return ho(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function xo(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 ko(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
5
5
|
`}]}function bo(e,n){const t=n.value?n.value+`
|
|
6
6
|
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function wo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function So(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Eo(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ae(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const a={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,a),e.applyData(n,a)}function Co(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 Io(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function rr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function To(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return rr(e,n);const i={src:Ae(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function Po(e,n){const t={src:Ae(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 Ao(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 zo(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return rr(e,n);const i={href:Ae(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Lo(e,n){const t={href:Ae(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 vo(e,n,t){const r=e.all(n),i=t?Do(t):ir(n),l={},o=[];if(typeof n.checked=="boolean"){const s=r[0];let f;s&&s.type==="element"&&s.tagName==="p"?f=s:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const s=r[u];(i||u!==0||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
7
|
`}),s.type==="element"&&s.tagName==="p"&&!i?o.push(...s.children):o.push(s)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
-
`});const a={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,a),e.applyData(n,a)}function Do(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=ir(t[r])}return n}function ir(e){const n=e.spread;return n??e.children.length>1}function Oo(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function _o(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function
|
|
8
|
+
`});const a={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,a),e.applyData(n,a)}function Do(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=ir(t[r])}return n}function ir(e){const n=e.spread;return n??e.children.length>1}function Oo(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function _o(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function No(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Fo(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ro(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},u=Tn(n.children[1]),c=Mt(n.children[n.children.length-1]);u&&c&&(o.position={start:u,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function Mo(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:n.children.length;let c=-1;const a=[];for(;++c<u;){const f=n.children[c],d={},p=o?o[c]:void 0;p&&(d.align=p);let w={type:"element",tagName:l,properties:d,children:[]};f&&(w.children=e.all(f),e.patch(f,w),w=e.applyData(f,w)),a.push(w)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(n,s),e.applyData(n,s)}function Bo(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const mt=9,dt=32;function jo(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(gt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(gt(n.slice(i),i>0,!1)),l.join("")}function gt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===mt||l===dt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===mt||l===dt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ho(e,n){const t={type:"text",value:jo(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Uo(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Vo={blockquote:xo,break:ko,code:bo,delete:wo,emphasis:So,footnoteReference:Eo,heading:Co,html:Io,imageReference:To,image:Po,inlineCode:Ao,linkReference:zo,link:Lo,listItem:vo,list:Oo,paragraph:_o,root:No,strong:Fo,table:Ro,tableCell:Bo,tableRow:Mo,text:Ho,thematicBreak:Uo,toml:Ve,yaml:Ve,definition:Ve,footnoteDefinition:Ve};function Ve(){}const lr=-1,Ke=0,Me=1,Ye=2,On=3,_n=4,Nn=5,Fn=6,or=7,ur=8,yt=typeof self=="object"?self:globalThis,qo=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case Ke:case lr:return t(o,i);case Me:{const u=t([],i);for(const c of o)u.push(r(c));return u}case Ye:{const u=t({},i);for(const[c,a]of o)u[r(c)]=r(a);return u}case On:return t(new Date(o),i);case _n:{const{source:u,flags:c}=o;return t(new RegExp(u,c),i)}case Nn:{const u=t(new Map,i);for(const[c,a]of o)u.set(r(c),r(a));return u}case Fn:{const u=t(new Set,i);for(const c of o)u.add(r(c));return u}case or:{const{name:u,message:c}=o;return t(new yt[u](c),i)}case ur:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:u}=new Uint8Array(o);return t(new DataView(u),o)}}return t(new yt[l](o),i)};return r},xt=e=>qo(new Map,e)(0),Ce="",{toString:$o}={},{keys:Wo}=Object,Ne=e=>{const n=typeof e;if(n!=="object"||!e)return[Ke,n];const t=$o.call(e).slice(8,-1);switch(t){case"Array":return[Me,Ce];case"Object":return[Ye,Ce];case"Date":return[On,Ce];case"RegExp":return[_n,Ce];case"Map":return[Nn,Ce];case"Set":return[Fn,Ce];case"DataView":return[Me,t]}return t.includes("Array")?[Me,t]:t.includes("Error")?[or,t]:[Ye,t]},qe=([e,n])=>e===Ke&&(n==="function"||n==="symbol"),Yo=(e,n,t,r)=>{const i=(o,u)=>{const c=r.push(o)-1;return t.set(u,c),c},l=o=>{if(t.has(o))return t.get(o);let[u,c]=Ne(o);switch(u){case Ke:{let s=o;switch(c){case"bigint":u=ur,s=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);s=null;break;case"undefined":return i([lr],o)}return i([u,s],o)}case Me:{if(c){let d=o;return c==="DataView"?d=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(o)),i([c,[...d]],o)}const s=[],f=i([u,s],o);for(const d of o)s.push(l(d));return f}case Ye:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const s=[],f=i([u,s],o);for(const d of Wo(o))(e||!qe(Ne(o[d])))&&s.push([l(d),l(o[d])]);return f}case On:return i([u,o.toISOString()],o);case _n:{const{source:s,flags:f}=o;return i([u,{source:s,flags:f}],o)}case Nn:{const s=[],f=i([u,s],o);for(const[d,p]of o)(e||!(qe(Ne(d))||qe(Ne(p))))&&s.push([l(d),l(p)]);return f}case Fn:{const s=[],f=i([u,s],o);for(const d of o)(e||!qe(Ne(d)))&&s.push(l(d));return f}}const{message:a}=o;return i([u,{name:c,message:a}],o)};return l},kt=(e,{json:n,lossy:t}={})=>{const r=[];return Yo(!(n||t),!!n,new Map,r)(e),r},Xe=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?xt(kt(e,n)):structuredClone(e):(e,n)=>xt(kt(e,n));function Xo(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 Qo(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Ko(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Xo,r=e.options.footnoteBackLabel||Qo,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[c]);if(!a)continue;const s=e.all(a),f=String(a.identifier).toUpperCase(),d=Ae(f.toLowerCase());let p=0;const w=[],E=e.footnoteCounts.get(f);for(;E!==void 0&&++p<=E;){w.length>0&&w.push({type:"text",value:" "});let L=typeof t=="string"?t:t(c,p);typeof L=="string"&&(L={type:"text",value:L}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}const I=s[s.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const L=I.children[I.children.length-1];L&&L.type==="text"?L.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...w)}else s.push(...w);const x={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(s,!0)};e.patch(a,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Xe(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
9
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
10
10
|
`}]}}const ar=(function(e){if(e==null)return eu;if(typeof e=="function")return Ge(e);if(typeof e=="object")return Array.isArray(e)?Go(e):Jo(e);if(typeof e=="string")return Zo(e);throw new Error("Expected function, string, or object as test")});function Go(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=ar(e[t]);return Ge(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function Jo(e){const n=e;return Ge(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function Zo(e){return Ge(n);function n(t){return t&&t.type===e}}function Ge(e){return n;function n(t,r,i){return!!(nu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function eu(){return!0}function nu(e){return e!==null&&typeof e=="object"&&"type"in e}const sr=[],tu=!0,bt=!1,ru="skip";function iu(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=ar(i),o=r?-1:1;u(e,void 0,[])();function u(c,a,s){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=sr,w,E,I;if((!n||l(c,a,s[s.length-1]||void 0))&&(p=lu(t(c,s)),p[0]===bt))return p;if("children"in c&&c.children){const x=c;if(x.children&&p[0]!==ru)for(E=(r?x.children.length:-1)+o,I=s.concat(x);E>-1&&E<x.children.length;){const L=x.children[E];if(w=u(L,E,I)(),w[0]===bt)return w;E=typeof w[1]=="number"?w[1]:E+o}}return p}}}function lu(e){return Array.isArray(e)?e:typeof e=="number"?[tu,e]:e==null?sr:[e]}function cr(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),iu(e,l,u,i);function u(c,a){const s=a[a.length-1],f=s?s.children.indexOf(c):void 0;return o(c,f,s)}}const wn={}.hasOwnProperty,ou={};function uu(e,n){const t=n||ou,r=new Map,i=new Map,l=new Map,o={...Vo,...t.handlers},u={all:a,applyData:su,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:c,options:t,patch:au,wrap:pu};return cr(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const f=s.type==="definition"?r:i,d=String(s.identifier).toUpperCase();f.has(d)||f.set(d,s)}}),u;function c(s,f){const d=s.type,p=u.handlers[d];if(wn.call(u.handlers,d)&&p)return p(u,s,f);if(u.options.passThrough&&u.options.passThrough.includes(d)){if("children"in s){const{children:E,...I}=s,x=Xe(I);return x.children=u.all(s),x}return Xe(s)}return(u.options.unknownHandler||cu)(u,s,f)}function a(s){const f=[];if("children"in s){const d=s.children;let p=-1;for(;++p<d.length;){const w=u.one(d[p],s);if(w){if(p&&d[p-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=wt(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=wt(E.value))}Array.isArray(w)?f.push(...w):f.push(w)}}}return f}}function au(e,n){e.position&&(n.position=qr(e))}function su(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,Xe(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function cu(e,n){const t=n.data||{},r="value"in n&&!(wn.call(t,"hProperties")||wn.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 pu(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
11
11
|
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
12
12
|
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
13
13
|
`}),t}function wt(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function St(e,n){const t=uu(e,n),r=t.one(e,void 0),i=Ko(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
14
|
-
`},i),l}function fu(e,n){return e&&"run"in e?async function(t,r){const i=St(t,{file:r,...n});await e.run(i,r)}:function(t,r){return St(t,{file:r,...e||n})}}function Et(e){if(e)throw e}var on,Ct;function hu(){if(Ct)return on;Ct=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(a){return typeof Array.isArray=="function"?Array.isArray(a):n.call(a)==="[object Array]"},l=function(a){if(!a||n.call(a)!=="[object Object]")return!1;var s=e.call(a,"constructor"),f=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!s&&!f)return!1;var d;for(d in a);return typeof d>"u"||e.call(a,d)},o=function(a,s){t&&s.name==="__proto__"?t(a,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):a[s.name]=s.newValue},u=function(a,s){if(s==="__proto__")if(e.call(a,s)){if(r)return r(a,s).value}else return;return a[s]};return on=function c(){var a,s,f,d,p,w,E=arguments[0],I=1,x=arguments.length,L=!1;for(typeof E=="boolean"&&(L=E,E=arguments[1]||{},I=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});I<x;++I)if(a=arguments[I],a!=null)for(s in a)f=u(E,s),d=u(a,s),E!==d&&(L&&d&&(l(d)||(p=i(d)))?(p?(p=!1,w=f&&i(f)?f:[]):w=f&&l(f)?f:{},o(E,{name:s,newValue:c(L,w,d)})):typeof d<"u"&&o(E,{name:s,newValue:d}));return E},on}var mu=hu();const un=Lt(mu);function Sn(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 du(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...i);function u(c,...a){const s=e[++l];let f=-1;if(c){o(c);return}for(;++f<i.length;)(a[f]===null||a[f]===void 0)&&(a[f]=i[f]);i=a,s?gu(s,u)(...a):o(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function gu(e,n){let t;return r;function r(...o){const u=e.length>o.length;let c;u&&o.push(i);try{c=e.apply(this,o)}catch(a){const s=a;if(u&&t)throw s;return i(s)}u||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const ue={basename:yu,dirname:xu,extname:ku,join:bu,sep:"/"};function yu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');He(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.codePointAt(i)===n.codePointAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function xu(e){if(He(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 ku(e){He(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.codePointAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function bu(...e){let n=-1,t;for(;++n<e.length;)He(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":wu(t)}function wu(e){He(e);const n=e.codePointAt(0)===47;let t=Su(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Su(e,n){let t="",r=0,i=-1,l=0,o=-1,u,c;for(;++o<=e.length;){if(o<e.length)u=e.codePointAt(o);else{if(u===47)break;u=47}if(u===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function He(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Eu={cwd:Cu};function Cu(){return"/"}function En(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Iu(e){if(typeof e=="string")e=new URL(e);else if(!En(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 Tu(e)}function Tu(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 an=["history","path","basename","stem","extname","dirname"];class pr{constructor(n){let t;n?En(n)?t={path:n}:typeof n=="string"||Pu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Eu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<an.length;){const l=an[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)an.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ue.basename(this.path):void 0}set basename(n){cn(n,"basename"),sn(n,"basename"),this.path=ue.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ue.dirname(this.path):void 0}set dirname(n){It(this.basename,"dirname"),this.path=ue.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ue.extname(this.path):void 0}set extname(n){if(sn(n,"extname"),It(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=ue.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){En(n)&&(n=Iu(n)),cn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}set stem(n){cn(n,"stem"),sn(n,"stem"),this.path=ue.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 Q(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 sn(e,n){if(e&&e.includes(ue.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ue.sep+"`")}function cn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function It(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Pu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Au=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),zu={}.hasOwnProperty;class Rn extends Au{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=du()}copy(){const n=new Rn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(un(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(hn("data",this.frozen),this.namespace[n]=t,this):zu.call(this.namespace,n)&&this.namespace[n]||void 0:n?(hn("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=$e(n),r=this.parser||this.Parser;return pn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),pn("process",this.parser||this.Parser),fn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const u=$e(n),c=r.parse(u);r.run(c,u,function(s,f,d){if(s||!f||!d)return a(s);const p=f,w=r.stringify(p,d);Du(w)?d.value=w:d.result=w,a(s,d)});function a(s,f){s||!f?o(s):l?l(f):t(void 0,f)}}}processSync(n){let t=!1,r;return this.freeze(),pn("processSync",this.parser||this.Parser),fn("processSync",this.compiler||this.Compiler),this.process(n,i),Pt("processSync","process",t),r;function i(l,o){t=!0,Et(l),r=o}}run(n,t,r){Tt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,u){const c=$e(t);i.run(n,c,a);function a(s,f,d){const p=f||n;s?u(s):o?o(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Pt("runSync","run",r),i;function l(o,u){Et(o),i=u,r=!0}}stringify(n,t){this.freeze();const r=$e(t),i=this.compiler||this.Compiler;return fn("stringify",i),Tt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(hn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?u(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(a){if(typeof a=="function")c(a,[]);else if(typeof a=="object")if(Array.isArray(a)){const[s,...f]=a;c(s,f)}else o(a);else throw new TypeError("Expected usable value, not `"+a+"`")}function o(a){if(!("plugins"in a)&&!("settings"in a))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");u(a.plugins),a.settings&&(i.settings=un(!0,i.settings,a.settings))}function u(a){let s=-1;if(a!=null)if(Array.isArray(a))for(;++s<a.length;){const f=a[s];l(f)}else throw new TypeError("Expected a list of plugins, not `"+a+"`")}function c(a,s){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===a){d=f;break}if(d===-1)r.push([a,...s]);else if(s.length>0){let[p,...w]=s;const E=r[d][1];Sn(E)&&Sn(p)&&(p=un(!0,E,p)),r[d]=[a,p,...w]}}}}const Lu=new Rn().freeze();function pn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hn(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 Tt(e){if(!Sn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Pt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function $e(e){return vu(e)?e:new pr(e)}function vu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Du(e){return typeof e=="string"||Ou(e)}function Ou(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _u="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",At=[],zt={allowDangerousHtml:!0},Fu=/^(https?|ircs?|mailto|xmpp)$/i,Nu=[{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 Bu(e){const n=Mn(e),t=Bn(e);return jn(n.runSync(n.parse(t),t),e)}async function ju(e){const n=Mn(e),t=Bn(e),r=await n.run(n.parse(t),t);return jn(r,e)}function Hu(e){const n=Mn(e),[t,r]=Je.useState(void 0),[i,l]=Je.useState(void 0);if(Je.useEffect(function(){let o=!1;const u=Bn(e);return n.run(n.parse(u),u,function(c,a){o||(r(c),l(a))}),function(){o=!0}},[e.children,e.rehypePlugins,e.remarkPlugins,e.remarkRehypeOptions]),t)throw t;return i?jn(i,e):e.fallback}function Mn(e){const n=e.rehypePlugins||At,t=e.remarkPlugins||At,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zt}:zt;return Lu().use(yo).use(t).use(fu,r).use(n)}function Bn(e){const n=e.children||"",t=new pr;return typeof n=="string"&&(t.value=n),t}function jn(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,u=n.unwrapDisallowed,c=n.urlTransform||Ru;for(const s of Nu)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+_u+s.id,void 0);return cr(e,a),Qr(e,{Fragment:Ze.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ze.jsx,jsxs:Ze.jsxs,passKeys:!0,passNode:!0});function a(s,f,d){if(s.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in tn)if(Object.hasOwn(tn,p)&&Object.hasOwn(s.properties,p)){const w=s.properties[p],E=tn[p];(E===null||E.includes(s.tagName))&&(s.properties[p]=c(String(w||""),p,s))}}if(s.type==="element"){let p=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,d)),p&&d&&typeof f=="number")return u&&s.children?d.children.splice(f,1,...s.children):d.children.splice(f,1),f}}}function Ru(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||Fu.test(e.slice(0,n))?e:""}export{ju as MarkdownAsync,Hu as MarkdownHooks,Bu as default,Ru as defaultUrlTransform};
|
|
14
|
+
`},i),l}function fu(e,n){return e&&"run"in e?async function(t,r){const i=St(t,{file:r,...n});await e.run(i,r)}:function(t,r){return St(t,{file:r,...e||n})}}function Et(e){if(e)throw e}var on,Ct;function hu(){if(Ct)return on;Ct=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(a){return typeof Array.isArray=="function"?Array.isArray(a):n.call(a)==="[object Array]"},l=function(a){if(!a||n.call(a)!=="[object Object]")return!1;var s=e.call(a,"constructor"),f=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!s&&!f)return!1;var d;for(d in a);return typeof d>"u"||e.call(a,d)},o=function(a,s){t&&s.name==="__proto__"?t(a,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):a[s.name]=s.newValue},u=function(a,s){if(s==="__proto__")if(e.call(a,s)){if(r)return r(a,s).value}else return;return a[s]};return on=function c(){var a,s,f,d,p,w,E=arguments[0],I=1,x=arguments.length,L=!1;for(typeof E=="boolean"&&(L=E,E=arguments[1]||{},I=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});I<x;++I)if(a=arguments[I],a!=null)for(s in a)f=u(E,s),d=u(a,s),E!==d&&(L&&d&&(l(d)||(p=i(d)))?(p?(p=!1,w=f&&i(f)?f:[]):w=f&&l(f)?f:{},o(E,{name:s,newValue:c(L,w,d)})):typeof d<"u"&&o(E,{name:s,newValue:d}));return E},on}var mu=hu();const un=Lt(mu);function Sn(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 du(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...i);function u(c,...a){const s=e[++l];let f=-1;if(c){o(c);return}for(;++f<i.length;)(a[f]===null||a[f]===void 0)&&(a[f]=i[f]);i=a,s?gu(s,u)(...a):o(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function gu(e,n){let t;return r;function r(...o){const u=e.length>o.length;let c;u&&o.push(i);try{c=e.apply(this,o)}catch(a){const s=a;if(u&&t)throw s;return i(s)}u||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const ue={basename:yu,dirname:xu,extname:ku,join:bu,sep:"/"};function yu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');He(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.codePointAt(i)===n.codePointAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function xu(e){if(He(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 ku(e){He(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.codePointAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function bu(...e){let n=-1,t;for(;++n<e.length;)He(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":wu(t)}function wu(e){He(e);const n=e.codePointAt(0)===47;let t=Su(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Su(e,n){let t="",r=0,i=-1,l=0,o=-1,u,c;for(;++o<=e.length;){if(o<e.length)u=e.codePointAt(o);else{if(u===47)break;u=47}if(u===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function He(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Eu={cwd:Cu};function Cu(){return"/"}function En(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Iu(e){if(typeof e=="string")e=new URL(e);else if(!En(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 Tu(e)}function Tu(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 an=["history","path","basename","stem","extname","dirname"];class pr{constructor(n){let t;n?En(n)?t={path:n}:typeof n=="string"||Pu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Eu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<an.length;){const l=an[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)an.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ue.basename(this.path):void 0}set basename(n){cn(n,"basename"),sn(n,"basename"),this.path=ue.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ue.dirname(this.path):void 0}set dirname(n){It(this.basename,"dirname"),this.path=ue.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ue.extname(this.path):void 0}set extname(n){if(sn(n,"extname"),It(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=ue.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){En(n)&&(n=Iu(n)),cn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}set stem(n){cn(n,"stem"),sn(n,"stem"),this.path=ue.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 Q(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 sn(e,n){if(e&&e.includes(ue.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ue.sep+"`")}function cn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function It(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Pu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Au=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),zu={}.hasOwnProperty;class Rn extends Au{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=du()}copy(){const n=new Rn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(un(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(hn("data",this.frozen),this.namespace[n]=t,this):zu.call(this.namespace,n)&&this.namespace[n]||void 0:n?(hn("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=$e(n),r=this.parser||this.Parser;return pn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),pn("process",this.parser||this.Parser),fn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const u=$e(n),c=r.parse(u);r.run(c,u,function(s,f,d){if(s||!f||!d)return a(s);const p=f,w=r.stringify(p,d);Du(w)?d.value=w:d.result=w,a(s,d)});function a(s,f){s||!f?o(s):l?l(f):t(void 0,f)}}}processSync(n){let t=!1,r;return this.freeze(),pn("processSync",this.parser||this.Parser),fn("processSync",this.compiler||this.Compiler),this.process(n,i),Pt("processSync","process",t),r;function i(l,o){t=!0,Et(l),r=o}}run(n,t,r){Tt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,u){const c=$e(t);i.run(n,c,a);function a(s,f,d){const p=f||n;s?u(s):o?o(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Pt("runSync","run",r),i;function l(o,u){Et(o),i=u,r=!0}}stringify(n,t){this.freeze();const r=$e(t),i=this.compiler||this.Compiler;return fn("stringify",i),Tt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(hn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?u(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(a){if(typeof a=="function")c(a,[]);else if(typeof a=="object")if(Array.isArray(a)){const[s,...f]=a;c(s,f)}else o(a);else throw new TypeError("Expected usable value, not `"+a+"`")}function o(a){if(!("plugins"in a)&&!("settings"in a))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");u(a.plugins),a.settings&&(i.settings=un(!0,i.settings,a.settings))}function u(a){let s=-1;if(a!=null)if(Array.isArray(a))for(;++s<a.length;){const f=a[s];l(f)}else throw new TypeError("Expected a list of plugins, not `"+a+"`")}function c(a,s){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===a){d=f;break}if(d===-1)r.push([a,...s]);else if(s.length>0){let[p,...w]=s;const E=r[d][1];Sn(E)&&Sn(p)&&(p=un(!0,E,p)),r[d]=[a,p,...w]}}}}const Lu=new Rn().freeze();function pn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hn(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 Tt(e){if(!Sn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Pt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function $e(e){return vu(e)?e:new pr(e)}function vu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Du(e){return typeof e=="string"||Ou(e)}function Ou(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _u="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",At=[],zt={allowDangerousHtml:!0},Nu=/^(https?|ircs?|mailto|xmpp)$/i,Fu=[{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 Bu(e){const n=Mn(e),t=Bn(e);return jn(n.runSync(n.parse(t),t),e)}async function ju(e){const n=Mn(e),t=Bn(e),r=await n.run(n.parse(t),t);return jn(r,e)}function Hu(e){const n=Mn(e),[t,r]=Je.useState(void 0),[i,l]=Je.useState(void 0);if(Je.useEffect(function(){let o=!1;const u=Bn(e);return n.run(n.parse(u),u,function(c,a){o||(r(c),l(a))}),function(){o=!0}},[e.children,e.rehypePlugins,e.remarkPlugins,e.remarkRehypeOptions]),t)throw t;return i?jn(i,e):e.fallback}function Mn(e){const n=e.rehypePlugins||At,t=e.remarkPlugins||At,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zt}:zt;return Lu().use(yo).use(t).use(fu,r).use(n)}function Bn(e){const n=e.children||"",t=new pr;return typeof n=="string"&&(t.value=n),t}function jn(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,u=n.unwrapDisallowed,c=n.urlTransform||Ru;for(const s of Fu)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+_u+s.id,void 0);return cr(e,a),Qr(e,{Fragment:Ze.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ze.jsx,jsxs:Ze.jsxs,passKeys:!0,passNode:!0});function a(s,f,d){if(s.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in tn)if(Object.hasOwn(tn,p)&&Object.hasOwn(s.properties,p)){const w=s.properties[p],E=tn[p];(E===null||E.includes(s.tagName))&&(s.properties[p]=c(String(w||""),p,s))}}if(s.type==="element"){let p=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,d)),p&&d&&typeof f=="number")return u&&s.children?d.children.splice(f,1,...s.children):d.children.splice(f,1),f}}}function Ru(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||Nu.test(e.slice(0,n))?e:""}export{ju as MarkdownAsync,Hu as MarkdownHooks,Bu as default,Ru as defaultUrlTransform};
|