@johnhenry/mallory-cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -2
- package/bin/mallory.mjs +51 -0
- package/package.json +51 -4
- package/src/a2a/client.js +511 -0
- package/src/a2a/demo-agent.js +396 -0
- package/src/a2a/hub.js +578 -0
- package/src/a2a/settings.js +88 -0
- package/src/a2a/task.js +358 -0
- package/src/acp/client.js +573 -0
- package/src/acp/demo-agent.js +332 -0
- package/src/acp/hub.js +632 -0
- package/src/acp/settings.js +78 -0
- package/src/actions/map.js +524 -0
- package/src/agent/cloud.js +77 -0
- package/src/agent/compact.js +84 -0
- package/src/agent/constants.js +39 -0
- package/src/agent/diff.js +101 -0
- package/src/agent/fork.js +159 -0
- package/src/agent/grounding.js +73 -0
- package/src/agent/guards.js +129 -0
- package/src/agent/local-transport.js +152 -0
- package/src/agent/loop.js +479 -0
- package/src/agent/park-store.js +77 -0
- package/src/agent/park.js +76 -0
- package/src/agent/ports.js +28 -0
- package/src/agent/providers.js +591 -0
- package/src/agent/restart.js +51 -0
- package/src/agent/router.js +380 -0
- package/src/agent/run.js +861 -0
- package/src/agent/tools.js +247 -0
- package/src/agent-library/engine.js +43 -0
- package/src/ai/bridge.js +155 -0
- package/src/ai/policy.js +131 -0
- package/src/aimatey/vendor.js +18 -0
- package/src/audio/container-duration.js +35 -0
- package/src/audio/instruments.js +776 -0
- package/src/audio/lanes.js +230 -0
- package/src/audio/patch.js +1410 -0
- package/src/audio/plan.js +276 -0
- package/src/audio/rack.js +1006 -0
- package/src/audio/sample-trim.js +293 -0
- package/src/audio/soundfont.js +243 -0
- package/src/audio/take-store.js +87 -0
- package/src/audio/takes.js +129 -0
- package/src/audio/wav.js +170 -0
- package/src/audio/zzfx.js +333 -0
- package/src/autonomy/bundle.js +207 -0
- package/src/autonomy/confine.js +61 -0
- package/src/autonomy/enforce.js +155 -0
- package/src/autonomy/file-kv.js +88 -0
- package/src/autonomy/ledger.js +203 -0
- package/src/autonomy/pins.js +50 -0
- package/src/autonomy/psl/index.js +32 -0
- package/src/autonomy/psl/suffixes.json +1 -0
- package/src/autonomy/record.js +28 -0
- package/src/autonomy/routines.js +107 -0
- package/src/autonomy/server.js +175 -0
- package/src/autonomy/signer-node.js +167 -0
- package/src/autonomy/store.js +43 -0
- package/src/autonomy/unattended.js +13 -0
- package/src/bytes/bytes.js +378 -0
- package/src/calc/syntax.js +125 -0
- package/src/calc/tex.js +28 -0
- package/src/calendar/vendor.js +2 -0
- package/src/clipboard.js +130 -0
- package/src/clsh/clsh.js +3417 -0
- package/src/codec/capnp.js +1804 -0
- package/src/codec/core.js +2043 -0
- package/src/codec/vendor/avro.js +136 -0
- package/src/codec/vendor/cbor.js +25 -0
- package/src/codec/vendor/flatbuffers.js +206 -0
- package/src/codec/vendor/msgpack.js +9 -0
- package/src/codec/vendor/protobuf.js +53 -0
- package/src/delegation/caps.js +60 -0
- package/src/delegation/config.js +32 -0
- package/src/device/model.js +246 -0
- package/src/device/recording.js +198 -0
- package/src/device/stream-model.js +151 -0
- package/src/documents/documents.js +1224 -0
- package/src/effects/catalog.js +63 -0
- package/src/effects/extras.js +133 -0
- package/src/effects/parse.js +339 -0
- package/src/embed/protocol.js +131 -0
- package/src/env/env.js +159 -0
- package/src/exact/vendor.js +45 -0
- package/src/example-meta.js +164 -0
- package/src/examples.js +94 -0
- package/src/export/canvas-image.js +217 -0
- package/src/export/expr-latex-lazy.js +8 -0
- package/src/export/formats.js +322 -0
- package/src/export/latex.js +183 -0
- package/src/export/pane.js +184 -0
- package/src/export/value.js +452 -0
- package/src/export/zip.js +214 -0
- package/src/ext/access.js +58 -0
- package/src/ext/btasks.js +225 -0
- package/src/ext/client.js +209 -0
- package/src/ext/tools.js +69 -0
- package/src/ext/view.js +105 -0
- package/src/ext/webmcp-tabs.js +299 -0
- package/src/files/archive.js +232 -0
- package/src/files/files.js +317 -0
- package/src/formats/json.js +24 -0
- package/src/formats/jupyter.js +188 -0
- package/src/formats/markdown.js +254 -0
- package/src/formats/n8n.js +276 -0
- package/src/formats/node-red.js +363 -0
- package/src/formats/registry.js +177 -0
- package/src/formats/rivet.js +259 -0
- package/src/formats/shared.js +98 -0
- package/src/formats/structure.js +182 -0
- package/src/formats/yaml.js +127 -0
- package/src/frame/frame.js +962 -0
- package/src/frame/vendor.js +1484 -0
- package/src/gate/audit.js +116 -0
- package/src/gate/gate.js +365 -0
- package/src/gate/policy.js +295 -0
- package/src/gate/scripted.js +110 -0
- package/src/gate/seams.js +32 -0
- package/src/gate/store.js +66 -0
- package/src/geometry/model.js +533 -0
- package/src/grant-key.js +149 -0
- package/src/graph/model.js +381 -0
- package/src/headless/a2a-push.js +123 -0
- package/src/headless/channels/config.js +142 -0
- package/src/headless/channels/connectors.js +283 -0
- package/src/headless/channels/index.js +257 -0
- package/src/headless/channels/mail.js +197 -0
- package/src/headless/channels/mailnet.js +223 -0
- package/src/headless/channels/platforms.js +194 -0
- package/src/headless/channels/replay.js +49 -0
- package/src/headless/cli.js +1397 -0
- package/src/headless/companion-client.js +182 -0
- package/src/headless/cost-cli.js +177 -0
- package/src/headless/deprecations-cli.js +102 -0
- package/src/headless/examples.js +48 -0
- package/src/headless/ffmpeg-exec.js +217 -0
- package/src/headless/gateways/config.js +213 -0
- package/src/headless/gateways/homeassistant.js +159 -0
- package/src/headless/gateways/index.js +121 -0
- package/src/headless/gateways/matter.js +150 -0
- package/src/headless/gateways/mqtt-client.js +177 -0
- package/src/headless/gateways/mqtt.js +70 -0
- package/src/headless/gateways/netway.js +226 -0
- package/src/headless/gateways/serverpod-worker.mjs +16 -0
- package/src/headless/gateways/serverpod.js +71 -0
- package/src/headless/gateways/util.js +27 -0
- package/src/headless/grant-cli.js +208 -0
- package/src/headless/guard.js +125 -0
- package/src/headless/guards.js +124 -0
- package/src/headless/machine-cli.js +853 -0
- package/src/headless/mcp-endpoint.js +287 -0
- package/src/headless/mcp-roots.js +38 -0
- package/src/headless/model-endpoint.js +88 -0
- package/src/headless/net.js +151 -0
- package/src/headless/node.js +263 -0
- package/src/headless/npm-tarball.js +29 -0
- package/src/headless/operator-page.js +112 -0
- package/src/headless/operator.js +242 -0
- package/src/headless/people.js +34 -0
- package/src/headless/pkg-cli.js +1103 -0
- package/src/headless/pkg-serve.js +138 -0
- package/src/headless/process-worker.js +88 -0
- package/src/headless/runner-remote.js +477 -0
- package/src/headless/sandbox-child.mjs +21 -0
- package/src/headless/scheduled.js +557 -0
- package/src/headless/serve-stream.js +97 -0
- package/src/headless/serve.js +2238 -0
- package/src/headless/short-links.js +158 -0
- package/src/headless/static-dirs.js +207 -0
- package/src/headless/trust-file.js +51 -0
- package/src/headless/watch.js +291 -0
- package/src/headless/ws-connect.js +65 -0
- package/src/headless/ws-connections.js +44 -0
- package/src/headless/ws-echo.js +150 -0
- package/src/headless/ws-proxy.js +354 -0
- package/src/headless/ws-ticket.js +48 -0
- package/src/hooks/config.js +50 -0
- package/src/hooks/engine.js +189 -0
- package/src/input/log.js +613 -0
- package/src/input/player.js +217 -0
- package/src/input/replay.js +209 -0
- package/src/jth/vendor.js +28 -0
- package/src/ledger/tx.js +94 -0
- package/src/machine/apply.js +193 -0
- package/src/machine/diff.js +168 -0
- package/src/machine/drive.js +296 -0
- package/src/machine/engine.js +478 -0
- package/src/machine/files-tool.js +76 -0
- package/src/machine/lint.js +139 -0
- package/src/machine/llmtm-trace.js +117 -0
- package/src/machine/llmtm.js +475 -0
- package/src/machine/otel.js +80 -0
- package/src/machine/pane-provider.js +51 -0
- package/src/machine/propose.js +159 -0
- package/src/machine/random.js +52 -0
- package/src/machine/risk.js +107 -0
- package/src/machine/session.js +1017 -0
- package/src/machine/shell-tool.js +45 -0
- package/src/machine/tape.js +349 -0
- package/src/machine/templates.js +104 -0
- package/src/machine/trace.js +664 -0
- package/src/machine/view.js +73 -0
- package/src/machine/vm-tool.js +47 -0
- package/src/machine/watchdog.js +46 -0
- package/src/mcp/app-args.js +51 -0
- package/src/mcp/app-run.js +56 -0
- package/src/mcp/apps.js +468 -0
- package/src/mcp/cache.js +232 -0
- package/src/mcp/client.js +507 -0
- package/src/mcp/demo-app.js +183 -0
- package/src/mcp/demo-server.js +602 -0
- package/src/mcp/elicitation.js +116 -0
- package/src/mcp/hub.js +1326 -0
- package/src/mcp/roots.js +139 -0
- package/src/mcp/sampling.js +105 -0
- package/src/mcp/settings.js +125 -0
- package/src/mcp/tape.js +292 -0
- package/src/mcp/uri-template.js +156 -0
- package/src/mcp/wsh-client.js +164 -0
- package/src/media/animated-codec.js +7 -0
- package/src/media/animated.js +623 -0
- package/src/media/compare-agent.js +70 -0
- package/src/media/compare-job.js +63 -0
- package/src/media/compare-page.js +296 -0
- package/src/media/compare-worker.js +14 -0
- package/src/media/compare.js +600 -0
- package/src/media/contract.js +62 -0
- package/src/media/decode-frame.js +57 -0
- package/src/media/decode-pool.js +188 -0
- package/src/media/ffmpeg-edit.js +344 -0
- package/src/media/ffmpeg-wasm-client.js +121 -0
- package/src/media/ffmpeg-wasm-session.js +79 -0
- package/src/media/ffmpeg-wasm.js +139 -0
- package/src/media/ffmpeg-worker.js +23 -0
- package/src/media/ffmpeg.js +903 -0
- package/src/media/helpers.js +419 -0
- package/src/media/keep.js +108 -0
- package/src/media/metadata-worker.js +16 -0
- package/src/media/metadata.js +2518 -0
- package/src/media/mime.js +102 -0
- package/src/media/page-decode.js +74 -0
- package/src/media/persist.js +114 -0
- package/src/media/png.js +226 -0
- package/src/media/sample-input.js +67 -0
- package/src/media/store.js +86 -0
- package/src/media/wav.js +109 -0
- package/src/midi/mappings.js +250 -0
- package/src/midi/message.js +125 -0
- package/src/model/action-hub.js +143 -0
- package/src/model/adapters.js +284 -0
- package/src/model/agent-runs.js +12 -0
- package/src/model/arrange.js +308 -0
- package/src/model/automation-clock.js +494 -0
- package/src/model/automation.js +653 -0
- package/src/model/batches.js +78 -0
- package/src/model/binary-view.js +195 -0
- package/src/model/breakpoints.js +392 -0
- package/src/model/calc-settings.js +65 -0
- package/src/model/calendar.js +254 -0
- package/src/model/canvas-id.js +5 -0
- package/src/model/canvas.js +5048 -0
- package/src/model/channel-names.js +29 -0
- package/src/model/channels.js +692 -0
- package/src/model/chart-clock.js +631 -0
- package/src/model/chart-code.js +69 -0
- package/src/model/codecs.js +60 -0
- package/src/model/companion-access.js +271 -0
- package/src/model/companion-pane.js +50 -0
- package/src/model/composite.js +324 -0
- package/src/model/context.js +380 -0
- package/src/model/controls.js +231 -0
- package/src/model/converter-presets.js +368 -0
- package/src/model/cost.js +580 -0
- package/src/model/curve-transform.js +122 -0
- package/src/model/cycles.js +176 -0
- package/src/model/debug-log.js +168 -0
- package/src/model/decision-clock.js +100 -0
- package/src/model/decisions.js +265 -0
- package/src/model/desk.js +87 -0
- package/src/model/device-hub.js +400 -0
- package/src/model/diff.js +445 -0
- package/src/model/emit-events.js +179 -0
- package/src/model/errors.js +238 -0
- package/src/model/event-presets.js +297 -0
- package/src/model/events.js +1303 -0
- package/src/model/explicit-setters.js +139 -0
- package/src/model/field-mapping.js +623 -0
- package/src/model/files-pane.js +263 -0
- package/src/model/flow-idle.js +89 -0
- package/src/model/foreach.js +549 -0
- package/src/model/frame-loop.js +71 -0
- package/src/model/frame-pressure.js +180 -0
- package/src/model/function-scaffold.js +1000 -0
- package/src/model/geometry-settings.js +54 -0
- package/src/model/goals.js +176 -0
- package/src/model/graph-settings.js +76 -0
- package/src/model/grid-widget.js +175 -0
- package/src/model/groups.js +332 -0
- package/src/model/hash.js +21 -0
- package/src/model/history.js +259 -0
- package/src/model/http-copy.js +88 -0
- package/src/model/http-send-companion.js +110 -0
- package/src/model/http-send.js +163 -0
- package/src/model/http-tap.js +521 -0
- package/src/model/http-tools.js +1138 -0
- package/src/model/import-lock.js +78 -0
- package/src/model/imports.js +258 -0
- package/src/model/infer-outputs.js +822 -0
- package/src/model/ink-connect.js +150 -0
- package/src/model/ink-diff.js +75 -0
- package/src/model/ink-gone.js +71 -0
- package/src/model/ink-route.js +120 -0
- package/src/model/ink-svg.js +206 -0
- package/src/model/ink.js +739 -0
- package/src/model/input-log-hub.js +456 -0
- package/src/model/input-split.js +69 -0
- package/src/model/json-schema-host.js +9 -0
- package/src/model/json-schema.js +368 -0
- package/src/model/jth.js +78 -0
- package/src/model/latex-expr.js +528 -0
- package/src/model/layout-history.js +120 -0
- package/src/model/lazy-map.js +88 -0
- package/src/model/ledger-pane.js +101 -0
- package/src/model/legacy-viaframe.js +90 -0
- package/src/model/lessons.js +448 -0
- package/src/model/links.js +981 -0
- package/src/model/live.js +411 -0
- package/src/model/math-widget.js +53 -0
- package/src/model/memory-settings.js +33 -0
- package/src/model/midi-controls.js +350 -0
- package/src/model/nl-time.js +408 -0
- package/src/model/notebook.js +137 -0
- package/src/model/pane-view-store.js +15 -0
- package/src/model/partial.js +115 -0
- package/src/model/pause-clock.js +53 -0
- package/src/model/peer-pane.js +32 -0
- package/src/model/persist-state.js +290 -0
- package/src/model/person-only.js +122 -0
- package/src/model/pin.js +209 -0
- package/src/model/plot-3d.js +213 -0
- package/src/model/plot-series.js +157 -0
- package/src/model/plot-settings.js +531 -0
- package/src/model/ports.js +312 -0
- package/src/model/presentation.js +222 -0
- package/src/model/preset-apply.js +316 -0
- package/src/model/preset-banks.js +335 -0
- package/src/model/preset-morph.js +263 -0
- package/src/model/preset-ops.js +205 -0
- package/src/model/preset-player.js +283 -0
- package/src/model/preset-states.js +172 -0
- package/src/model/profile-settings.js +109 -0
- package/src/model/promote.js +103 -0
- package/src/model/protected.js +10 -0
- package/src/model/proxy-log.js +230 -0
- package/src/model/proxy.js +367 -0
- package/src/model/quantity-widget.js +61 -0
- package/src/model/queue-book.js +359 -0
- package/src/model/quick-add.js +224 -0
- package/src/model/rate-limit.js +313 -0
- package/src/model/rate.js +95 -0
- package/src/model/recovery.js +216 -0
- package/src/model/rename-follow.js +113 -0
- package/src/model/repeater.js +1126 -0
- package/src/model/retention.js +664 -0
- package/src/model/route-edit.js +132 -0
- package/src/model/router.js +155 -0
- package/src/model/runaway.js +232 -0
- package/src/model/runlog.js +1033 -0
- package/src/model/runners/a2a.js +2 -0
- package/src/model/runners/acp.js +2 -0
- package/src/model/runners/actions.js +4 -0
- package/src/model/runners/agent.js +4 -0
- package/src/model/runners/audio.js +21 -0
- package/src/model/runners/automation.js +2 -0
- package/src/model/runners/calc.js +23 -0
- package/src/model/runners/catch.js +10 -0
- package/src/model/runners/codec.js +24 -0
- package/src/model/runners/companion-run.js +2 -0
- package/src/model/runners/device.js +7 -0
- package/src/model/runners/dom.js +13 -0
- package/src/model/runners/effects.js +2 -0
- package/src/model/runners/embed.js +11 -0
- package/src/model/runners/eval.js +2 -0
- package/src/model/runners/files.js +19 -0
- package/src/model/runners/geometry.js +23 -0
- package/src/model/runners/goals.js +18 -0
- package/src/model/runners/graph.js +23 -0
- package/src/model/runners/html.js +2 -0
- package/src/model/runners/http-proxy.js +185 -0
- package/src/model/runners/http-send.js +61 -0
- package/src/model/runners/http-static.js +83 -0
- package/src/model/runners/http-tap.js +26 -0
- package/src/model/runners/http.js +40 -0
- package/src/model/runners/import.js +2 -0
- package/src/model/runners/index.js +74 -0
- package/src/model/runners/input.js +14 -0
- package/src/model/runners/inputlog.js +7 -0
- package/src/model/runners/ledger.js +15 -0
- package/src/model/runners/machine.js +4 -0
- package/src/model/runners/mcp.js +2 -0
- package/src/model/runners/mcpapp.js +2 -0
- package/src/model/runners/media.js +18 -0
- package/src/model/runners/memory.js +28 -0
- package/src/model/runners/mesh-inspect.js +13 -0
- package/src/model/runners/peer.js +14 -0
- package/src/model/runners/plot.js +22 -0
- package/src/model/runners/render.js +14 -0
- package/src/model/runners/respond.js +2 -0
- package/src/model/runners/sample-soundfont.js +85 -0
- package/src/model/runners/sample.js +159 -0
- package/src/model/runners/scene.js +8 -0
- package/src/model/runners/score.js +24 -0
- package/src/model/runners/secret.js +10 -0
- package/src/model/runners/select.js +2 -0
- package/src/model/runners/shared.js +4 -0
- package/src/model/runners/shares.js +15 -0
- package/src/model/runners/shell.js +7 -0
- package/src/model/runners/skill.js +26 -0
- package/src/model/runners/state.js +2 -0
- package/src/model/runners/statechart.js +4 -0
- package/src/model/runners/subgraph.js +9 -0
- package/src/model/runners/tabs.js +25 -0
- package/src/model/runners/terminal.js +5 -0
- package/src/model/runners/text.js +4 -0
- package/src/model/runners/timer.js +7 -0
- package/src/model/runners/traffic.js +65 -0
- package/src/model/runners/trigger.js +2 -0
- package/src/model/runners/verdict.js +29 -0
- package/src/model/runners/vm.js +7 -0
- package/src/model/runners/wait.js +4 -0
- package/src/model/runners/ws-client.js +57 -0
- package/src/model/safe-regex.js +719 -0
- package/src/model/sample-settings.js +43 -0
- package/src/model/sample-source.js +47 -0
- package/src/model/saved-mapping.js +153 -0
- package/src/model/score-controllers.js +87 -0
- package/src/model/score-edit.js +399 -0
- package/src/model/score-instruments.js +300 -0
- package/src/model/score-library.js +407 -0
- package/src/model/score-markup.js +235 -0
- package/src/model/score-mix.js +248 -0
- package/src/model/score-patterns.js +276 -0
- package/src/model/score-selection.js +34 -0
- package/src/model/score-time.js +139 -0
- package/src/model/score-transforms.js +336 -0
- package/src/model/score-transport.js +192 -0
- package/src/model/selection.js +351 -0
- package/src/model/serial-controls.js +328 -0
- package/src/model/shares-pane.js +17 -0
- package/src/model/shell-pane.js +106 -0
- package/src/model/signature.js +1122 -0
- package/src/model/size-hints.js +106 -0
- package/src/model/size-ratio.js +12 -0
- package/src/model/skill-settings.js +23 -0
- package/src/model/snapping.js +466 -0
- package/src/model/split.js +375 -0
- package/src/model/spring-player.js +222 -0
- package/src/model/statecharts.js +1369 -0
- package/src/model/states-preset.js +208 -0
- package/src/model/static-route.js +100 -0
- package/src/model/step-words.js +45 -0
- package/src/model/subgraph.js +1042 -0
- package/src/model/switch.js +98 -0
- package/src/model/tabs-store.js +10 -0
- package/src/model/tensor-view.js +146 -0
- package/src/model/timer-clock.js +361 -0
- package/src/model/timers.js +422 -0
- package/src/model/timing.js +212 -0
- package/src/model/traffic-agent.js +111 -0
- package/src/model/traffic-store.js +20 -0
- package/src/model/traffic.js +665 -0
- package/src/model/transport.js +364 -0
- package/src/model/turns.js +86 -0
- package/src/model/types.js +425 -0
- package/src/model/value-path.js +138 -0
- package/src/model/versions.js +535 -0
- package/src/model/view-outputs.js +144 -0
- package/src/model/viewport-bookmarks.js +194 -0
- package/src/model/virtual-clock.js +85 -0
- package/src/model/vm-pane.js +258 -0
- package/src/model/wait-clock.js +715 -0
- package/src/model/wait-persist.js +248 -0
- package/src/model/waits.js +431 -0
- package/src/model/watch.js +80 -0
- package/src/model/webhook.js +496 -0
- package/src/model/when.js +48 -0
- package/src/model/widget-values.js +392 -0
- package/src/model/window-commands.js +278 -0
- package/src/model/windows.js +348 -0
- package/src/model/wire-inspect.js +343 -0
- package/src/model/wire-ops.js +324 -0
- package/src/model/wire-pipeline.js +378 -0
- package/src/model/wire-route.js +637 -0
- package/src/model/workspaces.js +122 -0
- package/src/model/ws-client.js +155 -0
- package/src/model/ws-demo.js +31 -0
- package/src/model/ws-frames.js +141 -0
- package/src/model/ws-hub.js +219 -0
- package/src/model/ws-served.js +13 -0
- package/src/model/xstate.js +374 -0
- package/src/narrative/narrative.js +1557 -0
- package/src/network/auth.js +224 -0
- package/src/network/csp-frame.js +197 -0
- package/src/network/declarative-shadow.js +27 -0
- package/src/network/frame-net-shim.js +962 -0
- package/src/network/hosts.js +157 -0
- package/src/network/policy.js +520 -0
- package/src/network/rtc-shim.js +418 -0
- package/src/network/secret-gate.js +78 -0
- package/src/network/secrets.js +261 -0
- package/src/network/sockets.js +287 -0
- package/src/network/store.js +186 -0
- package/src/network/streams.js +99 -0
- package/src/packages/asset-values.js +50 -0
- package/src/packages/assets.js +99 -0
- package/src/packages/deprecation.js +203 -0
- package/src/packages/fetch.js +152 -0
- package/src/packages/function-canvas.js +73 -0
- package/src/packages/module.js +120 -0
- package/src/packages/package.js +474 -0
- package/src/packages/published.js +27 -0
- package/src/packages/requires.js +83 -0
- package/src/packages/signing.js +145 -0
- package/src/packages/trust.js +107 -0
- package/src/panes/a2a.js +51 -0
- package/src/panes/acp.js +60 -0
- package/src/panes/actions.js +54 -0
- package/src/panes/agent.js +83 -0
- package/src/panes/audio.js +103 -0
- package/src/panes/automation.js +112 -0
- package/src/panes/calc.js +67 -0
- package/src/panes/catch.js +52 -0
- package/src/panes/codec.js +59 -0
- package/src/panes/colors.js +12 -0
- package/src/panes/companion.js +54 -0
- package/src/panes/decision.js +65 -0
- package/src/panes/device.js +56 -0
- package/src/panes/dom.js +37 -0
- package/src/panes/effects.js +118 -0
- package/src/panes/embed.js +30 -0
- package/src/panes/eval.js +186 -0
- package/src/panes/fields.js +299 -0
- package/src/panes/files.js +45 -0
- package/src/panes/gate.js +70 -0
- package/src/panes/geometry.js +64 -0
- package/src/panes/goals.js +75 -0
- package/src/panes/graph.js +66 -0
- package/src/panes/html.js +54 -0
- package/src/panes/http.js +82 -0
- package/src/panes/import.js +38 -0
- package/src/panes/input.js +124 -0
- package/src/panes/inputlog.js +66 -0
- package/src/panes/ledger.js +56 -0
- package/src/panes/machine.js +138 -0
- package/src/panes/mcp.js +85 -0
- package/src/panes/mcpapp.js +64 -0
- package/src/panes/media.js +38 -0
- package/src/panes/memory.js +46 -0
- package/src/panes/mesh-inspect.js +49 -0
- package/src/panes/note.js +38 -0
- package/src/panes/peer.js +44 -0
- package/src/panes/plot.js +196 -0
- package/src/panes/registry.js +475 -0
- package/src/panes/render.js +87 -0
- package/src/panes/respond.js +44 -0
- package/src/panes/router.js +84 -0
- package/src/panes/sample.js +75 -0
- package/src/panes/scene.js +55 -0
- package/src/panes/score.js +87 -0
- package/src/panes/secret.js +38 -0
- package/src/panes/select.js +67 -0
- package/src/panes/shader.js +166 -0
- package/src/panes/shared.js +33 -0
- package/src/panes/shares.js +43 -0
- package/src/panes/shell.js +47 -0
- package/src/panes/skill.js +44 -0
- package/src/panes/state.js +91 -0
- package/src/panes/statechart.js +63 -0
- package/src/panes/story.js +33 -0
- package/src/panes/subgraph.js +94 -0
- package/src/panes/tabs.js +52 -0
- package/src/panes/terminal.js +57 -0
- package/src/panes/text.js +36 -0
- package/src/panes/timer.js +55 -0
- package/src/panes/traffic.js +59 -0
- package/src/panes/verdict.js +62 -0
- package/src/panes/vm.js +46 -0
- package/src/panes/wait.js +61 -0
- package/src/panes/watch.js +57 -0
- package/src/panes/webhook.js +67 -0
- package/src/panes/ws-client.js +67 -0
- package/src/persist.js +281 -0
- package/src/plot/tex.js +19 -0
- package/src/plot/vendor.js +59 -0
- package/src/plot/view-vendor.js +5 -0
- package/src/privacy/levels.js +108 -0
- package/src/protocol/devtools.js +116 -0
- package/src/protocol/inspector.js +368 -0
- package/src/render/time.js +381 -0
- package/src/rooms/mesh-metrics.js +162 -0
- package/src/run/companion.js +355 -0
- package/src/run/describe.js +114 -0
- package/src/run/local-model.js +150 -0
- package/src/run/monitor.js +208 -0
- package/src/run/publish.js +360 -0
- package/src/run/respond-outcome.js +12 -0
- package/src/run/run.js +820 -0
- package/src/run/runner-pairing.js +243 -0
- package/src/run/values.js +122 -0
- package/src/runtime/compile.js +122 -0
- package/src/runtime/console-tag.js +64 -0
- package/src/runtime/frame-signals.js +126 -0
- package/src/runtime/iteration-push.js +19 -0
- package/src/runtime/keys.js +474 -0
- package/src/runtime/midi-input.js +170 -0
- package/src/runtime/person-waits.js +140 -0
- package/src/runtime/resource-timing.js +56 -0
- package/src/runtime/runtime.js +2150 -0
- package/src/runtime/sandbox-modules.js +163 -0
- package/src/runtime/spring.js +246 -0
- package/src/runtime/strict.js +215 -0
- package/src/runtime/transfer.js +75 -0
- package/src/runtime/tween.js +158 -0
- package/src/runtime/wasm-fuel.js +596 -0
- package/src/runtime/worker/00-prelude.js +88 -0
- package/src/runtime/worker/10-helpers.js +295 -0
- package/src/runtime/worker/20-io.js +645 -0
- package/src/runtime/worker/30-previews.js +210 -0
- package/src/runtime/worker/40-profile-lineage.js +278 -0
- package/src/runtime/worker/50-own-worker.js +233 -0
- package/src/runtime/worker/60-timers.js +172 -0
- package/src/runtime/worker/70-state-keyed.js +193 -0
- package/src/runtime/worker/80-each-compile-generators.js +619 -0
- package/src/runtime/worker/90-events-operators.js +655 -0
- package/src/runtime/worker/95-agents-batches.js +1820 -0
- package/src/runtime/worker/96-plot.js +47 -0
- package/src/runtime/worker/97-calc.js +28 -0
- package/src/runtime/worker/98-geometry.js +24 -0
- package/src/runtime/worker/99-graph.js +30 -0
- package/src/runtime/worker/99-shell.js +30 -0
- package/src/safety/config.js +57 -0
- package/src/safety/engine.js +324 -0
- package/src/scene/pixi-scene.js +806 -0
- package/src/scene/scene-assets.js +241 -0
- package/src/scene/scene-edit.js +319 -0
- package/src/secret/settings.js +41 -0
- package/src/security/multipart.js +257 -0
- package/src/security/redact.js +261 -0
- package/src/serial/broker.js +473 -0
- package/src/serial/config.js +185 -0
- package/src/serial/framers.js +389 -0
- package/src/serial/packets.js +64 -0
- package/src/shader/audio-texture.js +87 -0
- package/src/shader/channels.js +496 -0
- package/src/shader/common.js +90 -0
- package/src/shader/model.js +867 -0
- package/src/shader/passes.js +150 -0
- package/src/shader/shadertoy.js +198 -0
- package/src/shell/hub.js +287 -0
- package/src/sim/checkpoints.js +850 -0
- package/src/sim/compile.js +37 -0
- package/src/sim/fixed.js +377 -0
- package/src/sim/headless.js +205 -0
- package/src/sim/physics.js +399 -0
- package/src/smf-helper/vendor.js +2 -0
- package/src/sources/config.js +435 -0
- package/src/storage.js +153 -0
- package/src/table/table-geo.js +2344 -0
- package/src/table/table-lineage.js +808 -0
- package/src/table/table-quality.js +355 -0
- package/src/table/table-schema.js +392 -0
- package/src/table/table-sql.js +1650 -0
- package/src/table/table-stats.js +480 -0
- package/src/table/table.js +2102 -0
- package/src/tensor/tensor.js +1153 -0
- package/src/terminal/hub.js +715 -0
- package/src/terminal/screen.js +516 -0
- package/src/tests/capture.js +88 -0
- package/src/tests/compare.js +480 -0
- package/src/tests/dataset.js +170 -0
- package/src/tests/evaluate.js +286 -0
- package/src/tests/from-runs.js +99 -0
- package/src/tests/judge.js +134 -0
- package/src/tests/matchers.js +263 -0
- package/src/tests/matrix-spec.js +87 -0
- package/src/tests/matrix.js +397 -0
- package/src/tests/metrics.js +369 -0
- package/src/tests/no-value.js +42 -0
- package/src/tests/pane-check.js +45 -0
- package/src/tests/report.js +124 -0
- package/src/tests/reporters.js +140 -0
- package/src/tests/run.js +155 -0
- package/src/tilemap/tilemap.js +1122 -0
- package/src/units/units.js +3 -0
- package/src/util/bytes-text.js +21 -0
- package/src/util/num.js +10 -0
- package/src/util/regexp.js +2 -0
- package/src/util/text.js +38 -0
- package/src/verdict/engine.js +154 -0
- package/src/vm/guest-wsh.js +108 -0
- package/src/vm/hub.js +457 -0
- package/src/vm/image-files.js +4 -0
- package/src/vm/image.js +33 -0
- package/src/vm/image.lock.json +13 -0
- package/src/vm/link.js +266 -0
- package/src/vm/mount.js +212 -0
- package/src/vm/net.js +85 -0
- package/src/vm/pipe-ws.js +187 -0
- package/src/vm/v86-loader.js +11 -0
- package/src/webmcp/args.js +212 -0
- package/src/webmcp/hidden.js +218 -0
- package/src/webmcp/text.js +250 -0
- package/src/webmcp/tools/bookmark-tools.js +106 -0
- package/src/webmcp/tools/breakpoint-tools.js +48 -0
- package/src/webmcp/tools/canvases.js +208 -0
- package/src/webmcp/tools/context-tools.js +84 -0
- package/src/webmcp/tools/core.js +170 -0
- package/src/webmcp/tools/devices.js +41 -0
- package/src/webmcp/tools/edit.js +357 -0
- package/src/webmcp/tools/event-tools.js +145 -0
- package/src/webmcp/tools/image-tools.js +173 -0
- package/src/webmcp/tools/ink-tools.js +247 -0
- package/src/webmcp/tools/input-log-tools.js +163 -0
- package/src/webmcp/tools/live.js +166 -0
- package/src/webmcp/tools/machine-tools.js +74 -0
- package/src/webmcp/tools/media.js +161 -0
- package/src/webmcp/tools/midi-tools.js +32 -0
- package/src/webmcp/tools/preset-tools.js +184 -0
- package/src/webmcp/tools/quick-add-tools.js +95 -0
- package/src/webmcp/tools/reshape.js +152 -0
- package/src/webmcp/tools/run-tools.js +309 -0
- package/src/webmcp/tools/runs.js +101 -0
- package/src/webmcp/tools/scaffold-tools.js +161 -0
- package/src/webmcp/tools/serial-tools.js +36 -0
- package/src/webmcp/tools/shared.js +338 -0
- package/src/webmcp/tools/subgraphs.js +360 -0
- package/src/webmcp/tools/tests.js +170 -0
- package/src/webmcp/tools/traffic-tools.js +70 -0
- package/src/webmcp/tools/transport-tools.js +65 -0
- package/src/webmcp/tools/version-tools.js +126 -0
- package/src/webmcp/tools/versions.js +11 -0
- package/src/webmcp/tools/wire-tools.js +90 -0
- package/src/webmcp/tools/workspace-tools.js +93 -0
- package/src/webmcp/tools.js +1323 -0
- package/src/wsh/connect.js +347 -0
- package/src/wsh/demo-host.js +361 -0
- package/src/wsh/e2e.js +27 -0
- package/src/wsh/keys.js +154 -0
- package/src/wsh/known-hosts.js +39 -0
- package/src/wsh/private-key.js +95 -0
- package/src/wsh/reverse.js +34 -0
- package/src/wsh/settings.js +118 -0
- package/src/wsh/transfer.js +62 -0
- package/src/wsh/vendor.js +5 -0
- package/src/x402/challenge.js +171 -0
- package/src/x402/demo-server.js +127 -0
- package/src/x402/pay.js +125 -0
- package/src/x402/retry.js +95 -0
- package/src/x402/store.js +76 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*! @msgpack/msgpack@3.1.3 (ISC), bundled into one ES module by scripts/build-codec-vendor.mjs. Do not edit.
|
|
2
|
+
|
|
3
|
+
Copyright 2019 The MessagePack Community.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
8
|
+
*/
|
|
9
|
+
function z(n){let e=n.length,t=0,s=0;for(;s<e;){let i=n.charCodeAt(s++);if((i&4294967168)===0){t++;continue}else if((i&4294965248)===0)t+=2;else{if(i>=55296&&i<=56319&&s<e){let r=n.charCodeAt(s);(r&64512)===56320&&(++s,i=((i&1023)<<10)+(r&1023)+65536)}(i&4294901760)===0?t+=3:t+=4}}return t}function V(n,e,t){let s=n.length,i=t,r=0;for(;r<s;){let o=n.charCodeAt(r++);if((o&4294967168)===0){e[i++]=o;continue}else if((o&4294965248)===0)e[i++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&r<s){let h=n.charCodeAt(r);(h&64512)===56320&&(++r,o=((o&1023)<<10)+(h&1023)+65536)}(o&4294901760)===0?(e[i++]=o>>12&15|224,e[i++]=o>>6&63|128):(e[i++]=o>>18&7|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128)}e[i++]=o&63|128}}var X=new TextEncoder,Y=50;function O(n,e,t){X.encodeInto(n,e.subarray(t))}function M(n,e,t){n.length>Y?O(n,e,t):V(n,e,t)}var J=4096;function A(n,e,t){let s=e,i=s+t,r=[],o="";for(;s<i;){let h=n[s++];if((h&128)===0)r.push(h);else if((h&224)===192){let d=n[s++]&63;r.push((h&31)<<6|d)}else if((h&240)===224){let d=n[s++]&63,I=n[s++]&63;r.push((h&31)<<12|d<<6|I)}else if((h&248)===240){let d=n[s++]&63,I=n[s++]&63,N=n[s++]&63,x=(h&7)<<18|d<<12|I<<6|N;x>65535&&(x-=65536,r.push(x>>>10&1023|55296),x=56320|x&1023),r.push(x)}else r.push(h);r.length>=J&&(o+=String.fromCharCode(...r),r.length=0)}return r.length>0&&(o+=String.fromCharCode(...r)),o}var q=new TextDecoder,G=200;function Z(n,e,t){let s=n.subarray(e,e+t);return q.decode(s)}function k(n,e,t){return t>G?Z(n,e,t):A(n,e,t)}var f=class{type;data;constructor(e,t){this.type=e,this.data=t}};var a=class n extends Error{constructor(e){super(e);let t=Object.create(n.prototype);Object.setPrototypeOf(this,t),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:n.name})}};function L(n,e,t){let s=t/4294967296,i=t;n.setUint32(e,s),n.setUint32(e+4,i)}function m(n,e,t){let s=Math.floor(t/4294967296),i=t;n.setUint32(e,s),n.setUint32(e+4,i)}function U(n,e){let t=n.getInt32(e),s=n.getUint32(e+4);return t*4294967296+s}function C(n,e){let t=n.getUint32(e),s=n.getUint32(e+4);return t*4294967296+s}var F=-1,Q=4294967296-1,j=17179869184-1;function _({sec:n,nsec:e}){if(n>=0&&e>=0&&n<=j)if(e===0&&n<=Q){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,n),t}else{let t=n/4294967296,s=n&4294967295,i=new Uint8Array(8),r=new DataView(i.buffer);return r.setUint32(0,e<<2|t&3),r.setUint32(4,s),i}else{let t=new Uint8Array(12),s=new DataView(t.buffer);return s.setUint32(0,e),m(s,4,n),t}}function P(n){let e=n.getTime(),t=Math.floor(e/1e3),s=(e-t*1e3)*1e6,i=Math.floor(s/1e9);return{sec:t+i,nsec:s-i*1e9}}function R(n){if(n instanceof Date){let e=P(n);return _(e)}else return null}function $(n){let e=new DataView(n.buffer,n.byteOffset,n.byteLength);switch(n.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let t=e.getUint32(0),s=e.getUint32(4),i=(t&3)*4294967296+s,r=t>>>2;return{sec:i,nsec:r}}case 12:{let t=U(e,4),s=e.getUint32(0);return{sec:t,nsec:s}}default:throw new a(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${n.length}`)}}function H(n){let e=$(n);return new Date(e.sec*1e3+e.nsec/1e6)}var K={type:F,encode:R,decode:H};var l=class n{static defaultCodec=new n;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(K)}register({type:e,encode:t,decode:s}){if(e>=0)this.encoders[e]=t,this.decoders[e]=s;else{let i=-1-e;this.builtInEncoders[i]=t,this.builtInDecoders[i]=s}}tryToEncode(e,t){for(let s=0;s<this.builtInEncoders.length;s++){let i=this.builtInEncoders[s];if(i!=null){let r=i(e,t);if(r!=null){let o=-1-s;return new f(o,r)}}}for(let s=0;s<this.encoders.length;s++){let i=this.encoders[s];if(i!=null){let r=i(e,t);if(r!=null){let o=s;return new f(o,r)}}}return e instanceof f?e:null}decode(e,t,s){let i=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return i?i(e,t,s):new f(t,e)}};function ee(n){return n instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&n instanceof SharedArrayBuffer}function u(n){return n instanceof Uint8Array?n:ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):ee(n)?new Uint8Array(n):Uint8Array.from(n)}var te=100,ie=2048,p=class n{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??l.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??te,this.initialBufferSize=e?.initialBufferSize??ie,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new n({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw new Error(`Too deep objects in depth ${t}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(t*2)}resizeBuffer(e){let t=new ArrayBuffer(e),s=new Uint8Array(t),i=new DataView(t);s.set(this.bytes),this.view=i,this.bytes=s}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let s=z(e);this.ensureBufferSizeToWrite(5+s),this.writeStringHeader(s),M(e,this.bytes,this.pos),this.pos+=s}encodeObject(e,t){let s=this.extensionCodec.tryToEncode(e,this.context);if(s!=null)this.encodeExtension(s);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,t);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<4294967296)this.writeU8(198),this.writeU32(t);else throw new Error(`Too large binary: ${t}`);let s=u(e);this.writeU8a(s)}encodeArray(e,t){let s=e.length;if(s<16)this.writeU8(144+s);else if(s<65536)this.writeU8(220),this.writeU16(s);else if(s<4294967296)this.writeU8(221),this.writeU32(s);else throw new Error(`Too large array: ${s}`);for(let i of e)this.doEncode(i,t+1)}countWithoutUndefined(e,t){let s=0;for(let i of t)e[i]!==void 0&&s++;return s}encodeMap(e,t){let s=Object.keys(e);this.sortKeys&&s.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,s):s.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(let r of s){let o=e[r];this.ignoreUndefined&&o===void 0||(this.encodeString(r),this.doEncode(o,t+1))}}encodeExtension(e){if(typeof e.data=="function"){let s=e.data(this.pos+6),i=s.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(s);return}let t=e.data.length;if(t===1)this.writeU8(212);else if(t===2)this.writeU8(213);else if(t===4)this.writeU8(214);else if(t===8)this.writeU8(215);else if(t===16)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<4294967296)this.writeU8(201),this.writeU32(t);else throw new Error(`Too large extension object: ${t}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),L(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),m(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function se(n,e){return new p(e).encodeSharedRef(n)}function S(n){return`${n<0?"-":""}0x${Math.abs(n).toString(16).padStart(2,"0")}`}var ne=16,re=16,E=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=ne,t=re){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let s=0;s<this.maxKeyLength;s++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,s){let i=this.caches[s-1];e:for(let r of i){let o=r.bytes;for(let h=0;h<s;h++)if(o[h]!==e[t+h])continue e;return r.str}return null}store(e,t){let s=this.caches[e.length-1],i={bytes:e,str:t};s.length>=this.maxLengthPerKey?s[Math.random()*s.length|0]=i:s.push(i)}decode(e,t,s){let i=this.find(e,t,s);if(i!=null)return this.hit++,i;this.miss++;let r=A(e,t,s),o=Uint8Array.prototype.slice.call(e,t,t+s);return this.store(o,r),r}};var T="array",g="map_key",W="map_value",oe=n=>{if(typeof n=="string"||typeof n=="number")return n;throw new a("The type of key must be string or number but "+typeof n)},D=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=T,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=g,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===T){let s=e;s.size=0,s.array=void 0,s.position=0,s.type=void 0}if(e.type===g||e.type===W){let s=e;s.size=0,s.map=void 0,s.readCount=0,s.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},y=-1,v=new DataView(new ArrayBuffer(0)),he=new Uint8Array(v.buffer);try{v.getInt8(0)}catch(n){if(!(n instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var b=new RangeError("Insufficient data"),ae=new E,c=class n{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=v;bytes=he;headByte=y;stack=new D;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??l.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:ae,this.mapKeyConverter=e?.mapKeyConverter??oe}clone(){return new n({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=y,this.stack.reset()}setBuffer(e){let t=u(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===y&&!this.hasRemaining(1))this.setBuffer(e);else{let t=this.bytes.subarray(this.pos),s=u(e),i=new Uint8Array(t.length+s.length);i.set(t),i.set(s,t.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:s}=this;return new RangeError(`Extra ${t.byteLength-s} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t=!1,s;for await(let h of e){if(t)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(h);try{s=this.doDecodeSync(),t=!0}catch(d){if(!(d instanceof RangeError))throw d}this.totalPos+=this.pos}if(t){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return s}let{headByte:i,pos:r,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${S(i)} at ${o} (${r} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,t){if(this.entered){yield*this.clone().decodeMultiAsync(e,t);return}try{this.entered=!0;let s=t,i=-1;for await(let r of e){if(t&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(r),s&&(i=this.readArraySize(),s=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),t;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){let i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e<160){let i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else{let i=e-160;t=this.decodeString(i,0)}else if(e===192)t=null;else if(e===194)t=!1;else if(e===195)t=!0;else if(e===202)t=this.readF32();else if(e===203)t=this.readF64();else if(e===204)t=this.readU8();else if(e===205)t=this.readU16();else if(e===206)t=this.readU32();else if(e===207)this.useBigInt64?t=this.readU64AsBigInt():t=this.readU64();else if(e===208)t=this.readI8();else if(e===209)t=this.readI16();else if(e===210)t=this.readI32();else if(e===211)this.useBigInt64?t=this.readI64AsBigInt():t=this.readI64();else if(e===217){let i=this.lookU8();t=this.decodeString(i,1)}else if(e===218){let i=this.lookU16();t=this.decodeString(i,2)}else if(e===219){let i=this.lookU32();t=this.decodeString(i,4)}else if(e===220){let i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else if(e===221){let i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else if(e===222){let i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e===223){let i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e===196){let i=this.lookU8();t=this.decodeBinary(i,1)}else if(e===197){let i=this.lookU16();t=this.decodeBinary(i,2)}else if(e===198){let i=this.lookU32();t=this.decodeBinary(i,4)}else if(e===212)t=this.decodeExtension(1,0);else if(e===213)t=this.decodeExtension(2,0);else if(e===214)t=this.decodeExtension(4,0);else if(e===215)t=this.decodeExtension(8,0);else if(e===216)t=this.decodeExtension(16,0);else if(e===199){let i=this.lookU8();t=this.decodeExtension(i,1)}else if(e===200){let i=this.lookU16();t=this.decodeExtension(i,2)}else if(e===201){let i=this.lookU32();t=this.decodeExtension(i,4)}else throw new a(`Unrecognized type byte: ${S(e)}`);this.complete();let s=this.stack;for(;s.length>0;){let i=s.top();if(i.type===T)if(i.array[i.position]=t,i.position++,i.position===i.size)t=i.array,s.release(i);else continue e;else if(i.type===g){if(t==="__proto__")throw new a("The key __proto__ is not allowed");i.key=this.mapKeyConverter(t),i.type=W;continue e}else if(i.map[i.key]=t,i.readCount++,i.readCount===i.size)t=i.map,s.release(i);else{i.key=null,i.type=g;continue e}}return t}}readHeadByte(){return this.headByte===y&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=y}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new a(`Unrecognized array type byte: ${S(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new a(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new a(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){if(e>this.maxStrLength)throw new a(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw b;let s=this.pos+t,i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,s,e):i=k(this.bytes,s,e),this.pos+=t+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===g:!1}decodeBinary(e,t){if(e>this.maxBinLength)throw new a(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw b;let s=this.pos+t,i=this.bytes.subarray(s,s+e);return this.pos+=t+e,i}decodeExtension(e,t){if(e>this.maxExtLength)throw new a(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let s=this.view.getInt8(this.pos+t),i=this.decodeBinary(e,t+1);return this.extensionCodec.decode(i,s,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=C(this.view,this.pos);return this.pos+=8,e}readI64(){let e=U(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function ce(n,e){return new c(e).decode(n)}function de(n,e){return new c(e).decodeMulti(n)}function fe(n){return n[Symbol.asyncIterator]!=null}async function*le(n){let e=n.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)return;yield s}}finally{e.releaseLock()}}function B(n){return fe(n)?n:le(n)}async function xe(n,e){let t=B(n);return new c(e).decodeAsync(t)}function ue(n,e){let t=B(n);return new c(e).decodeArrayStream(t)}function pe(n,e){let t=B(n);return new c(e).decodeStream(t)}export{a as DecodeError,c as Decoder,F as EXT_TIMESTAMP,p as Encoder,f as ExtData,l as ExtensionCodec,ce as decode,ue as decodeArrayStream,xe as decodeAsync,de as decodeMulti,pe as decodeMultiStream,H as decodeTimestampExtension,$ as decodeTimestampToTimeSpec,se as encode,P as encodeDateToTimeSpec,_ as encodeTimeSpecToTimestamp,R as encodeTimestampExtension};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*! protobufjs@8.8.1 (BSD-3-Clause), bundled into one ES module by scripts/build-codec-vendor.mjs. Do not edit.
|
|
2
|
+
|
|
3
|
+
This license applies to all parts of protobuf.js except those files
|
|
4
|
+
either explicitly including or referencing a different license or
|
|
5
|
+
located in a directory containing a different LICENSE file.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2016, Daniel Wirtz All rights reserved.
|
|
10
|
+
|
|
11
|
+
Redistribution and use in source and binary forms, with or without
|
|
12
|
+
modification, are permitted provided that the following conditions are
|
|
13
|
+
met:
|
|
14
|
+
|
|
15
|
+
* Redistributions of source code must retain the above copyright
|
|
16
|
+
notice, this list of conditions and the following disclaimer.
|
|
17
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
18
|
+
notice, this list of conditions and the following disclaimer in the
|
|
19
|
+
documentation and/or other materials provided with the distribution.
|
|
20
|
+
* Neither the name of its author, nor the names of its contributors
|
|
21
|
+
may be used to endorse or promote products derived from this software
|
|
22
|
+
without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
25
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
26
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
27
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
28
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
29
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
30
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
31
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
32
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
33
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
34
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
Code generated by the command line utilities is owned by the owner
|
|
39
|
+
of the input file used when generating it. This code is not
|
|
40
|
+
standalone and requires a support library to be linked with it. This
|
|
41
|
+
support library is itself covered by the above license.
|
|
42
|
+
*/
|
|
43
|
+
var as=Object.create;var Qr=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ls=Object.getOwnPropertyNames;var cs=Object.getPrototypeOf,ds=Object.prototype.hasOwnProperty;var q=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var ps=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ls(e))!ds.call(i,s)&&s!==t&&Qr(i,s,{get:()=>e[s],enumerable:!(r=hs(e,s))||r.enumerable});return i};var vs=(i,e,t)=>(t=i!=null?as(cs(i)):{},ps(e||!i||!i.__esModule?Qr(t,"default",{value:i,enumerable:!0}):t,i));var sr=q((Co,ei)=>{"use strict";ei.exports=gs;function gs(i,e){for(var t=new Array(arguments.length-1),r=0,s=2,n=!0;s<arguments.length;)t[r++]=arguments[s++];return new Promise(function(a,u){t[r]=function(g){if(n)if(n=!1,g)u(g);else{for(var b=new Array(arguments.length-1),x=0;x<b.length;)b[x++]=arguments[x];a.apply(null,b)}};try{i.apply(e||null,t)}catch(h){n&&(n=!1,u(h))}})}});var ii=q(ri=>{"use strict";var St=ri;St.length=function(e){var t=e.length;if(!t)return 0;for(;t>0&&e.charAt(t-1)==="=";)--t;return Math.floor(t*3/4)};var ot=new Array(64),Lt=new Array(123);for(Ee=0;Ee<64;)Lt[ot[Ee]=Ee<26?Ee+65:Ee<52?Ee+71:Ee<62?Ee-4:Ee-59|43]=Ee++;var Ee;Lt[45]=62;Lt[95]=63;St.encode=function(e,t,r){for(var s=null,n=[],o=0,a=0,u;t<r;){var h=e[t++];switch(a){case 0:n[o++]=ot[h>>2],u=(h&3)<<4,a=1;break;case 1:n[o++]=ot[u|h>>4],u=(h&15)<<2,a=2;break;case 2:n[o++]=ot[u|h>>6],n[o++]=ot[h&63],a=0;break}o>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),o=0)}return a&&(n[o++]=ot[u],n[o++]=61,a===1&&(n[o++]=61)),s?(o&&s.push(String.fromCharCode.apply(String,n.slice(0,o))),s.join("")):String.fromCharCode.apply(String,n.slice(0,o))};var ti="invalid encoding";St.decode=function(e,t,r){for(var s=r,n=0,o,a=0;a<e.length;){var u=e.charCodeAt(a++);if(u===61&&n>1)break;if((u=Lt[u])===void 0)throw Error(ti);switch(n){case 0:o=u,n=1;break;case 1:t[r++]=o<<2|(u&48)>>4,o=u,n=2;break;case 2:t[r++]=(o&15)<<4|(u&60)>>2,o=u,n=3;break;case 3:t[r++]=(o&3)<<6|u,n=0;break}}if(n===1)throw Error(ti);return r-s};var ys=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,ms=/[-_]/,ws=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;St.test=function(e){return ys.test(e)||ms.test(e)&&ws.test(e)}});var si=q((Po,ni)=>{"use strict";ni.exports=It;function It(){this._listeners=Object.create(null)}It.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this};It.prototype.off=function(e,t){if(e===void 0)this._listeners=Object.create(null);else if(t===void 0)this._listeners[e]=[];else{var r=this._listeners[e];if(!r)return this;for(var s=0;s<r.length;)r[s].fn===t?r.splice(s,1):++s}return this};It.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],s=1;s<arguments.length;)r.push(arguments[s++]);for(s=0;s<t.length;)t[s].fn.apply(t[s++].ctx,r)}return this}});var ci=q((zo,li)=>{"use strict";li.exports=oi(oi);function oi(i){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),r=t[3]===128;function s(u,h,g){e[0]=u,h[g]=t[0],h[g+1]=t[1],h[g+2]=t[2],h[g+3]=t[3]}function n(u,h,g){e[0]=u,h[g]=t[3],h[g+1]=t[2],h[g+2]=t[1],h[g+3]=t[0]}i.writeFloatLE=r?s:n,i.writeFloatBE=r?n:s;function o(u,h){return t[0]=u[h],t[1]=u[h+1],t[2]=u[h+2],t[3]=u[h+3],e[0]}function a(u,h){return t[3]=u[h],t[2]=u[h+1],t[1]=u[h+2],t[0]=u[h+3],e[0]}i.readFloatLE=r?o:a,i.readFloatBE=r?a:o})():(function(){function e(r,s,n,o){var a=s<0?1:0;if(a&&(s=-s),s===0)r(1/s>0?0:2147483648,n,o);else if(isNaN(s))r(2143289344,n,o);else if(s>34028234663852886e22)r((a<<31|2139095040)>>>0,n,o);else if(s<11754943508222875e-54)r((a<<31|Math.round(s/1401298464324817e-60))>>>0,n,o);else{var u=Math.floor(Math.log(s)/Math.LN2),h=Math.round(s*Math.pow(2,-u)*8388608)&8388607;r((a<<31|u+127<<23|h)>>>0,n,o)}}i.writeFloatLE=e.bind(null,ui),i.writeFloatBE=e.bind(null,fi);function t(r,s,n){var o=r(s,n),a=(o>>31)*2+1,u=o>>>23&255,h=o&8388607;return u===255?h?NaN:a*(1/0):u===0?a*1401298464324817e-60*h:a*Math.pow(2,u-150)*(h+8388608)}i.readFloatLE=t.bind(null,ai),i.readFloatBE=t.bind(null,hi)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),r=t[7]===128;function s(u,h,g){e[0]=u,h[g]=t[0],h[g+1]=t[1],h[g+2]=t[2],h[g+3]=t[3],h[g+4]=t[4],h[g+5]=t[5],h[g+6]=t[6],h[g+7]=t[7]}function n(u,h,g){e[0]=u,h[g]=t[7],h[g+1]=t[6],h[g+2]=t[5],h[g+3]=t[4],h[g+4]=t[3],h[g+5]=t[2],h[g+6]=t[1],h[g+7]=t[0]}i.writeDoubleLE=r?s:n,i.writeDoubleBE=r?n:s;function o(u,h){return t[0]=u[h],t[1]=u[h+1],t[2]=u[h+2],t[3]=u[h+3],t[4]=u[h+4],t[5]=u[h+5],t[6]=u[h+6],t[7]=u[h+7],e[0]}function a(u,h){return t[7]=u[h],t[6]=u[h+1],t[5]=u[h+2],t[4]=u[h+3],t[3]=u[h+4],t[2]=u[h+5],t[1]=u[h+6],t[0]=u[h+7],e[0]}i.readDoubleLE=r?o:a,i.readDoubleBE=r?a:o})():(function(){function e(r,s,n,o,a,u){var h=o<0?1:0;if(h&&(o=-o),o===0)r(0,a,u+s),r(1/o>0?0:2147483648,a,u+n);else if(isNaN(o))r(0,a,u+s),r(2146959360,a,u+n);else if(o>17976931348623157e292)r(0,a,u+s),r((h<<31|2146435072)>>>0,a,u+n);else{var g;if(o<22250738585072014e-324)g=o/5e-324,r(g>>>0,a,u+s),r((h<<31|g/4294967296)>>>0,a,u+n);else{var b=Math.floor(Math.log(o)/Math.LN2);b===1024&&(b=1023),g=o*Math.pow(2,-b),r(g*4503599627370496>>>0,a,u+s),r((h<<31|b+1023<<20|g*1048576&1048575)>>>0,a,u+n)}}}i.writeDoubleLE=e.bind(null,ui,0,4),i.writeDoubleBE=e.bind(null,fi,4,0);function t(r,s,n,o,a){var u=r(o,a+s),h=r(o,a+n),g=(h>>31)*2+1,b=h>>>20&2047,x=4294967296*(h&1048575)+u;return b===2047?x?NaN:g*(1/0):b===0?g*5e-324*x:g*Math.pow(2,b-1075)*(x+4503599627370496)}i.readDoubleLE=t.bind(null,ai,0,4),i.readDoubleBE=t.bind(null,hi,4,0)})(),i}function ui(i,e,t){e[t]=i&255,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24}function fi(i,e,t){e[t]=i>>>24,e[t+1]=i>>>16&255,e[t+2]=i>>>8&255,e[t+3]=i&255}function ai(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0}function hi(i,e){return(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])>>>0}});var vi=q(pi=>{"use strict";var kt=pi,Ft=new TextDecoder("utf-8",{ignoreBOM:!0}),wt,di=64;try{wt=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch{wt=Ft}kt.length=function(e){for(var t=0,r=0,s=0;s<e.length;++s)r=e.charCodeAt(s),r<128?t+=1:r<2048?t+=2:(r&64512)===55296&&(e.charCodeAt(s+1)&64512)===56320?(++s,t+=4):t+=3;return t};function ut(i,e,t,r){var s=t===0&&r===e.length?e:e.subarray(t,r);return i.decode(s)}kt.read=function(e,t,r){if(r-t<1)return"";if(r-t>=di)return ut(Ft,e,t,r);for(var s="",n=t,o,a,u,h,g,b,x,A;n+7<r;n+=8){if(o=e[n],a=e[n+1],u=e[n+2],h=e[n+3],g=e[n+4],b=e[n+5],x=e[n+6],A=e[n+7],(o|a|u|h|g|b|x|A)&128)return s+ut(Ft,e,n,r);s+=String.fromCharCode(o,a,u,h,g,b,x,A)}for(;n<r;++n){if(o=e[n],o&128)return s+ut(Ft,e,n,r);s+=String.fromCharCode(o)}return s};kt.readStrict=function(e,t,r){if(r-t<1)return"";if(r-t>=di)return ut(wt,e,t,r);for(var s="",n=t,o,a,u,h,g,b,x,A;n+7<r;n+=8){if(o=e[n],a=e[n+1],u=e[n+2],h=e[n+3],g=e[n+4],b=e[n+5],x=e[n+6],A=e[n+7],(o|a|u|h|g|b|x|A)&128)return s+ut(wt,e,n,r);s+=String.fromCharCode(o,a,u,h,g,b,x,A)}for(;n<r;++n){if(o=e[n],o&128)return s+ut(wt,e,n,r);s+=String.fromCharCode(o)}return s};kt.write=function(e,t,r){for(var s=r,n,o,a=0;a<e.length;++a)n=e.charCodeAt(a),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=n&63|128):(n&64512)===55296&&((o=e.charCodeAt(a+1))&64512)===56320?(n=65536+((n&1023)<<10)+(o&1023),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=n&63|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=n&63|128);return r-s}});var yi=q((Jo,gi)=>{"use strict";gi.exports=_s;function _s(i,e,t){var r=t||8192,s=r>>>1,n=null,o=r;return function(u){if(u<1||u>s)return i(u);o+u>r&&(n=i(r),o=0);var h=e.call(n,o,o+=u);return o&7&&(o=(o|7)+1),h}}});var wi=q((Vo,mi)=>{"use strict";mi.exports=re;var _t;function re(i,e){this.lo=i>>>0,this.hi=e>>>0}var et=re.zero=new re(0,0);et.toNumber=function(){return 0};et.zzEncode=et.zzDecode=function(){return this};et.length=function(){return 1};var bs=re.zeroHash="\0\0\0\0\0\0\0\0";re.fromNumber=function(e){if(e===0)return et;var t=e<0;t&&(e=-e);var r=e>>>0,s=(e-r)/4294967296>>>0;return t&&(s=~s>>>0,r=~r>>>0,++r>4294967295&&(r=0,++s>4294967295&&(s=0))),new re(r,s)};re.from=function(e){if(typeof e=="number")return re.fromNumber(e);if(typeof e=="string"||e instanceof String)if(_t)e=_t.fromString(e);else return re.fromNumber(parseInt(e,10));return e.low||e.high?new re(e.low>>>0,e.high>>>0):et};re.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+r*4294967296)}return this.lo+this.hi*4294967296};re.prototype.toLong=function(e){return _t?new _t(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Ue=String.prototype.charCodeAt;re.fromHash=function(e){return e===bs?et:new re((Ue.call(e,0)|Ue.call(e,1)<<8|Ue.call(e,2)<<16|Ue.call(e,3)<<24)>>>0,(Ue.call(e,4)|Ue.call(e,5)<<8|Ue.call(e,6)<<16|Ue.call(e,7)<<24)>>>0)};re.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};re.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};re.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};re.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10};re._configure=function(i){_t=i}});var _i=q((bt,or)=>{(function(i,e){function t(r){return r.default||r}typeof define=="function"&&define.amd?define([],function(){var r={};return e(r),t(r)}):typeof bt=="object"?(e(bt),typeof or=="object"&&(or.exports=t(bt))):(function(){var r={};e(r),i.Long=t(r)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:bt,function(i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function t(d,f,w){this.low=d|0,this.high=f|0,this.unsigned=!!w}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0});function r(d){return(d&&d.__isLong__)===!0}function s(d){var f=Math.clz32(d&-d);return d?31-f:f}t.isLong=r;var n={},o={};function a(d,f){var w,T,J;return f?(d>>>=0,(J=0<=d&&d<256)&&(T=o[d],T)?T:(w=h(d,0,!0),J&&(o[d]=w),w)):(d|=0,(J=-128<=d&&d<128)&&(T=n[d],T)?T:(w=h(d,d<0?-1:0,!1),J&&(n[d]=w),w))}t.fromInt=a;function u(d,f){if(isNaN(d))return f?m:fe;if(f){if(d<0)return m;if(d>=j)return _e}else{if(d<=-Q)return M;if(d+1>=Q)return de}return d<0?u(-d,f).neg():h(d%S|0,d/S|0,f)}t.fromNumber=u;function h(d,f,w){return new t(d,f,w)}t.fromBits=h;var g=Math.pow;function b(d,f,w){if(d.length===0)throw Error("empty string");if(typeof f=="number"?(w=f,f=!1):f=!!f,d==="NaN"||d==="Infinity"||d==="+Infinity"||d==="-Infinity")return f?m:fe;if(w=w||10,w<2||36<w)throw RangeError("radix");var T;if((T=d.indexOf("-"))>0)throw Error("interior hyphen");if(T===0)return b(d.substring(1),f,w).neg();for(var J=u(g(w,8)),F=fe,Y=0;Y<d.length;Y+=8){var ae=Math.min(8,d.length-Y),ve=parseInt(d.substring(Y,Y+ae),w);if(ae<8){var te=u(g(w,ae));F=F.mul(te).add(u(ve))}else F=F.mul(J),F=F.add(u(ve))}return F.unsigned=f,F}t.fromString=b;function x(d,f){return typeof d=="number"?u(d,f):typeof d=="string"?b(d,f):h(d.low,d.high,typeof f=="boolean"?f:d.unsigned)}t.fromValue=x;var A=65536,R=1<<24,S=A*A,j=S*S,Q=j/2,ee=a(R),fe=a(0);t.ZERO=fe;var m=a(0,!0);t.UZERO=m;var P=a(1);t.ONE=P;var z=a(1,!0);t.UONE=z;var W=a(-1);t.NEG_ONE=W;var de=h(-1,2147483647,!1);t.MAX_VALUE=de;var _e=h(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_e;var M=h(0,-2147483648,!1);t.MIN_VALUE=M;var p=t.prototype;p.toInt=function(){return this.unsigned?this.low>>>0:this.low},p.toNumber=function(){return this.unsigned?(this.high>>>0)*S+(this.low>>>0):this.high*S+(this.low>>>0)},p.toString=function(f){if(f=f||10,f<2||36<f)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(M)){var w=u(f),T=this.div(w),J=T.mul(w).sub(this);return T.toString(f)+J.toInt().toString(f)}else return"-"+this.neg().toString(f);for(var F=u(g(f,6),this.unsigned),Y=this,ae="";;){var ve=Y.div(F),te=Y.sub(ve.mul(F)).toInt()>>>0,G=te.toString(f);if(Y=ve,Y.isZero())return G+ae;for(;G.length<6;)G="0"+G;ae=""+G+ae}},p.getHighBits=function(){return this.high},p.getHighBitsUnsigned=function(){return this.high>>>0},p.getLowBits=function(){return this.low},p.getLowBitsUnsigned=function(){return this.low>>>0},p.getNumBitsAbs=function(){if(this.isNegative())return this.eq(M)?64:this.neg().getNumBitsAbs();for(var f=this.high!=0?this.high:this.low,w=31;w>0&&(f&1<<w)==0;w--);return this.high!=0?w+33:w+1},p.isSafeInteger=function(){var f=this.high>>21;return f?this.unsigned?!1:f===-1&&!(this.low===0&&this.high===-2097152):!0},p.isZero=function(){return this.high===0&&this.low===0},p.eqz=p.isZero,p.isNegative=function(){return!this.unsigned&&this.high<0},p.isPositive=function(){return this.unsigned||this.high>=0},p.isOdd=function(){return(this.low&1)===1},p.isEven=function(){return(this.low&1)===0},p.equals=function(f){return r(f)||(f=x(f)),this.unsigned!==f.unsigned&&this.high>>>31===1&&f.high>>>31===1?!1:this.high===f.high&&this.low===f.low},p.eq=p.equals,p.notEquals=function(f){return!this.eq(f)},p.neq=p.notEquals,p.ne=p.notEquals,p.lessThan=function(f){return this.comp(f)<0},p.lt=p.lessThan,p.lessThanOrEqual=function(f){return this.comp(f)<=0},p.lte=p.lessThanOrEqual,p.le=p.lessThanOrEqual,p.greaterThan=function(f){return this.comp(f)>0},p.gt=p.greaterThan,p.greaterThanOrEqual=function(f){return this.comp(f)>=0},p.gte=p.greaterThanOrEqual,p.ge=p.greaterThanOrEqual,p.compare=function(f){if(r(f)||(f=x(f)),this.eq(f))return 0;var w=this.isNegative(),T=f.isNegative();return w&&!T?-1:!w&&T?1:this.unsigned?f.high>>>0>this.high>>>0||f.high===this.high&&f.low>>>0>this.low>>>0?-1:1:this.sub(f).isNegative()?-1:1},p.comp=p.compare,p.negate=function(){return!this.unsigned&&this.eq(M)?M:this.not().add(P)},p.neg=p.negate,p.add=function(f){r(f)||(f=x(f));var w=this.high>>>16,T=this.high&65535,J=this.low>>>16,F=this.low&65535,Y=f.high>>>16,ae=f.high&65535,ve=f.low>>>16,te=f.low&65535,G=0,H=0,K=0,he=0;return he+=F+te,K+=he>>>16,he&=65535,K+=J+ve,H+=K>>>16,K&=65535,H+=T+ae,G+=H>>>16,H&=65535,G+=w+Y,G&=65535,h(K<<16|he,G<<16|H,this.unsigned)},p.subtract=function(f){return r(f)||(f=x(f)),this.add(f.neg())},p.sub=p.subtract,p.multiply=function(f){if(this.isZero())return this;if(r(f)||(f=x(f)),e){var w=e.mul(this.low,this.high,f.low,f.high);return h(w,e.get_high(),this.unsigned)}if(f.isZero())return this.unsigned?m:fe;if(this.eq(M))return f.isOdd()?M:fe;if(f.eq(M))return this.isOdd()?M:fe;if(this.isNegative())return f.isNegative()?this.neg().mul(f.neg()):this.neg().mul(f).neg();if(f.isNegative())return this.mul(f.neg()).neg();if(this.lt(ee)&&f.lt(ee))return u(this.toNumber()*f.toNumber(),this.unsigned);var T=this.high>>>16,J=this.high&65535,F=this.low>>>16,Y=this.low&65535,ae=f.high>>>16,ve=f.high&65535,te=f.low>>>16,G=f.low&65535,H=0,K=0,he=0,st=0;return st+=Y*G,he+=st>>>16,st&=65535,he+=F*G,K+=he>>>16,he&=65535,he+=Y*te,K+=he>>>16,he&=65535,K+=J*G,H+=K>>>16,K&=65535,K+=F*te,H+=K>>>16,K&=65535,K+=Y*ve,H+=K>>>16,K&=65535,H+=T*G+J*te+F*ve+Y*ae,H&=65535,h(he<<16|st,H<<16|K,this.unsigned)},p.mul=p.multiply,p.divide=function(f){if(r(f)||(f=x(f)),f.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&f.low===-1&&f.high===-1)return this;var w=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,f.low,f.high);return h(w,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?m:fe;var T,J,F;if(this.unsigned){if(f.unsigned||(f=f.toUnsigned()),f.gt(this))return m;if(f.gt(this.shru(1)))return z;F=m}else{if(this.eq(M)){if(f.eq(P)||f.eq(W))return M;if(f.eq(M))return P;var Y=this.shr(1);return T=Y.div(f).shl(1),T.eq(fe)?f.isNegative()?P:W:(J=this.sub(f.mul(T)),F=T.add(J.div(f)),F)}else if(f.eq(M))return this.unsigned?m:fe;if(this.isNegative())return f.isNegative()?this.neg().div(f.neg()):this.neg().div(f).neg();if(f.isNegative())return this.div(f.neg()).neg();F=fe}for(J=this;J.gte(f);){T=Math.max(1,Math.floor(J.toNumber()/f.toNumber()));for(var ae=Math.ceil(Math.log(T)/Math.LN2),ve=ae<=48?1:g(2,ae-48),te=u(T),G=te.mul(f);G.isNegative()||G.gt(J);)T-=ve,te=u(T,this.unsigned),G=te.mul(f);te.isZero()&&(te=P),F=F.add(te),J=J.sub(G)}return F},p.div=p.divide,p.modulo=function(f){if(r(f)||(f=x(f)),e){var w=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,f.low,f.high);return h(w,e.get_high(),this.unsigned)}return this.sub(this.div(f).mul(f))},p.mod=p.modulo,p.rem=p.modulo,p.not=function(){return h(~this.low,~this.high,this.unsigned)},p.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},p.clz=p.countLeadingZeros,p.countTrailingZeros=function(){return this.low?s(this.low):s(this.high)+32},p.ctz=p.countTrailingZeros,p.and=function(f){return r(f)||(f=x(f)),h(this.low&f.low,this.high&f.high,this.unsigned)},p.or=function(f){return r(f)||(f=x(f)),h(this.low|f.low,this.high|f.high,this.unsigned)},p.xor=function(f){return r(f)||(f=x(f)),h(this.low^f.low,this.high^f.high,this.unsigned)},p.shiftLeft=function(f){return r(f)&&(f=f.toInt()),(f&=63)===0?this:f<32?h(this.low<<f,this.high<<f|this.low>>>32-f,this.unsigned):h(0,this.low<<f-32,this.unsigned)},p.shl=p.shiftLeft,p.shiftRight=function(f){return r(f)&&(f=f.toInt()),(f&=63)===0?this:f<32?h(this.low>>>f|this.high<<32-f,this.high>>f,this.unsigned):h(this.high>>f-32,this.high>=0?0:-1,this.unsigned)},p.shr=p.shiftRight,p.shiftRightUnsigned=function(f){return r(f)&&(f=f.toInt()),(f&=63)===0?this:f<32?h(this.low>>>f|this.high<<32-f,this.high>>>f,this.unsigned):f===32?h(this.high,0,this.unsigned):h(this.high>>>f-32,0,this.unsigned)},p.shru=p.shiftRightUnsigned,p.shr_u=p.shiftRightUnsigned,p.rotateLeft=function(f){var w;return r(f)&&(f=f.toInt()),(f&=63)===0?this:f===32?h(this.high,this.low,this.unsigned):f<32?(w=32-f,h(this.low<<f|this.high>>>w,this.high<<f|this.low>>>w,this.unsigned)):(f-=32,w=32-f,h(this.high<<f|this.low>>>w,this.low<<f|this.high>>>w,this.unsigned))},p.rotl=p.rotateLeft,p.rotateRight=function(f){var w;return r(f)&&(f=f.toInt()),(f&=63)===0?this:f===32?h(this.high,this.low,this.unsigned):f<32?(w=32-f,h(this.high<<w|this.low>>>f,this.low<<w|this.high>>>f,this.unsigned)):(f-=32,w=32-f,h(this.low<<w|this.high>>>f,this.high<<w|this.low>>>f,this.unsigned))},p.rotr=p.rotateRight,p.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},p.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},p.toBytes=function(f){return f?this.toBytesLE():this.toBytesBE()},p.toBytesLE=function(){var f=this.high,w=this.low;return[w&255,w>>>8&255,w>>>16&255,w>>>24,f&255,f>>>8&255,f>>>16&255,f>>>24]},p.toBytesBE=function(){var f=this.high,w=this.low;return[f>>>24,f>>>16&255,f>>>8&255,f&255,w>>>24,w>>>16&255,w>>>8&255,w&255]},t.fromBytes=function(f,w,T){return T?t.fromBytesLE(f,w):t.fromBytesBE(f,w)},t.fromBytesLE=function(f,w){return new t(f[0]|f[1]<<8|f[2]<<16|f[3]<<24,f[4]|f[5]<<8|f[6]<<16|f[7]<<24,w)},t.fromBytesBE=function(f,w){return new t(f[4]<<24|f[5]<<16|f[6]<<8|f[7],f[0]<<24|f[1]<<16|f[2]<<8|f[3],w)},typeof BigInt=="function"&&(t.fromBigInt=function(f,w){var T=Number(BigInt.asIntN(32,f)),J=Number(BigInt.asIntN(32,f>>BigInt(32)));return h(T,J,w)},t.fromValue=function(f,w){return typeof f=="bigint"?t.fromBigInt(f,w):x(f,w)},p.toBigInt=function(){var f=BigInt(this.low>>>0),w=BigInt(this.unsigned?this.high>>>0:this.high);return w<<BigInt(32)|f});var Ce=i.default=t})});var Se=q(ur=>{"use strict";var O=ur;O.asPromise=sr();O.base64=ii();O.EventEmitter=si();O.float=ci();O.utf8=vi();O.pool=yi();O.LongBits=wi();function bi(i){return i==="__proto__"||i==="prototype"||i==="constructor"}O.isUnsafeProperty=bi;O.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);O.global=O.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||typeof globalThis<"u"&&globalThis||ur;O.emptyArray=Object.freeze?Object.freeze([]):[];O.emptyObject=Object.freeze?Object.freeze({}):{};O.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};O.isString=function(e){return typeof e=="string"||e instanceof String};O.isObject=function(e){return e&&typeof e=="object"};O.isset=O.isSet=function(e,t){var r=e[t];return r!=null&&Object.hasOwnProperty.call(e,t)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1};O.Buffer=(function(){try{var i=O.global.Buffer;return i.prototype.utf8Write||O.isNode?i:null}catch{return null}})();O.newBuffer=function(e){var t=O.Buffer;return typeof e=="number"?t?t.allocUnsafe(e):new Uint8Array(e):t?t.from(e):new Uint8Array(e)};O.rawField=function(e,t,r){var s=[],n=e<<3|t;for(n>>>=0;n>127;)s.push(n&127|128),n>>>=7;s.push(n);for(var o=0;o<r.length;++o)s.push(r[o]);return O.newBuffer(s)};O.Array=Uint8Array;O.Long=O.global.dcodeIO&&O.global.dcodeIO.Long||O.global.Long||(function(){try{var i=_i();return i&&i.isLong?i:null}catch{return null}})();O.key2Re=/^(?:true|false|0|1)$/;O.key32Re=/^-?(?:0|[1-9][0-9]*)$/;O.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/;O.longToHash=function(e){return e?O.LongBits.from(e).toHash():O.LongBits.zeroHash};O.longFromHash=function(e,t){var r=O.LongBits.fromHash(e);return O.Long?O.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)};O.longFromKey=function(e,t){return O.key64Re.test(e)&&!O.key32Re.test(e)?O.longFromHash(e,t):e};O.boolFromKey=function(e){return e==="true"||e==="1"};function Oi(i){var e=typeof arguments[arguments.length-1]=="boolean",t=e?arguments.length-1:arguments.length;e=e&&arguments[arguments.length-1];for(var r=1;r<t;++r){var s=arguments[r];if(s)for(var n=Object.keys(s),o=0;o<n.length;++o)!bi(n[o])&&(!e||!Object.prototype.hasOwnProperty.call(i,n[o])||i[n[o]]===void 0)&&(i[n[o]]=s[n[o]])}return i}O.merge=Oi;O.nestingLimit=32;O.recursionLimit=100;O.makeProp=function(e,t,r){Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:r===void 0?!0:r,configurable:!0,writable:!0})};O.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function Ei(i){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&Oi(this,r)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}O.newError=Ei;O.ProtocolError=Ei("ProtocolError");O.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var s=Object.keys(this),n=s.length-1;n>-1;--n)if(t[s[n]]===1&&this[s[n]]!==void 0&&this[s[n]]!==null)return s[n]}};O.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}};O.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}});var Bt=q(($o,qi)=>{"use strict";qi.exports=E;var Le=Se(),ar,je=Le.LongBits,xi=Le.base64,fr=Le.utf8;function E(){this.pos=0,this.buf=this.constructor.alloc(E.initialBufferSize),this.view=null,this.states=null}E.initialBufferSize=128;Object.defineProperty(E.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var Ni=function(){return Le.Buffer?function(){return(E.create=function(){return new ar})()}:function(){return new E}};E.create=Ni();E.alloc=function(e){return new Uint8Array(e)};E.alloc=Le.pool(E.alloc,Uint8Array.prototype.subarray);function hr(i){return i<128?1:i<16384?2:i<2097152?3:i<268435456?4:5}E.prototype._reserve=function(e){var t=this.pos+e;if(t>this.buf.length){var r=this.buf.length<<1;r<t&&(r=t);var s=this.constructor.alloc(r);s.set(this.buf.subarray(0,this.pos),0),this.buf=s,this.view=null}};function Os(i,e,t){for(var r=0;r<i.length;)e[t++]=i.charCodeAt(r++)}function tt(i,e,t){for(;i>127;)e[t++]=i&127|128,i>>>=7;return e[t]=i,t+1}E.prototype.uint32=function(e){e=e>>>0,this._reserve(5);var t=this.pos;return this.pos=tt(e,this.buf,t),this};E.prototype.int32=function(e){return(e|=0)<0?(this._reserve(10),at(je.fromNumber(e),this.buf,this.pos),this.pos+=10,this):this.uint32(e)};E.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function at(i,e,t){for(var r=i.lo,s=i.hi;s;)e[t++]=r&127|128,r=(r>>>7|s<<25)>>>0,s>>>=7;for(;r>127;)e[t++]=r&127|128,r=r>>>7;return e[t]=r,t+1}E.prototype.uint64=function(e){var t=je.from(e);this._reserve(10);var r=this.pos;return this.pos=at(t,this.buf,r),this};E.prototype.int64=E.prototype.uint64;E.prototype.sint64=function(e){var t=je.from(e).zzEncode();this._reserve(10);var r=this.pos;return this.pos=at(t,this.buf,r),this};E.prototype.bool=function(e){return this._reserve(1),this.buf[this.pos++]=e?1:0,this};function ft(i,e,t){e[t]=i&255,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24}E.prototype.fixed32=function(e){return this._reserve(4),ft(e>>>0,this.buf,this.pos),this.pos+=4,this};E.prototype.sfixed32=E.prototype.fixed32;E.prototype.fixed64=function(e){var t=je.from(e);return this._reserve(8),ft(t.lo,this.buf,this.pos),ft(t.hi,this.buf,this.pos+4),this.pos+=8,this};E.prototype.sfixed64=E.prototype.fixed64;E.prototype.float=function(e){return this._reserve(4),Le.float.writeFloatLE(e,this.buf,this.pos),this.pos+=4,this};E.prototype.double=function(e){return this._reserve(8),Le.float.writeDoubleLE(e,this.buf,this.pos),this.pos+=8,this};E.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(Le.isString(e)){var r=E.alloc(t=xi.length(e));xi.decode(e,r,0),e=r}return this.uint32(t),this._reserve(t),this.buf.set(e,this.pos),this.pos+=t,this};E.prototype.raw=function(e){var t=e.length>>>0;return t?(this._reserve(t),this.buf.set(e,this.pos),this.pos+=t,this):this};E.prototype._delim=function(e,t){var r=hr(t);return r>1&&this.buf.copyWithin(e+r,e+1,e+1+t),tt(t,this.buf,e),this.pos=e+r+t,this};E.prototype.string=function(e){var t=e.length;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(t<128){this._reserve(t*3+5);var r=this.pos;return this._delim(r,fr.write(e,this.buf,r+1))}var s=fr.length(e);return this.uint32(s),this._reserve(s),s===e.length?Os(e,this.buf,this.pos):fr.write(e,this.buf,this.pos),this.pos+=s,this};E.prototype.uint32s=function(e){var t=e.length;this._reserve(t*5+5);for(var r=this.buf,s=this.pos,n=s+1,o=0;o<t;++o)n=tt(e[o]>>>0,r,n);return this._delim(s,n-s-1)};E.prototype.int32s=function(e){var t=e.length;this._reserve(t*10+5);for(var r=this.buf,s=this.pos,n=s+1,o,a=0;a<t;++a)(o=e[a]|0)<0?n=at(je.fromNumber(o),r,n):n=tt(o,r,n);return this._delim(s,n-s-1)};E.prototype.sint32s=function(e){var t=e.length;this._reserve(t*5+5);for(var r=this.buf,s=this.pos,n=s+1,o=0;o<t;++o)n=tt((e[o]<<1^e[o]>>31)>>>0,r,n);return this._delim(s,n-s-1)};E.prototype.uint64s=function(e){var t=e.length;this._reserve(t*10+5);for(var r=this.buf,s=this.pos,n=s+1,o=0;o<t;++o)n=at(je.from(e[o]),r,n);return this._delim(s,n-s-1)};E.prototype.int64s=E.prototype.uint64s;E.prototype.sint64s=function(e){var t=e.length;this._reserve(t*10+5);for(var r=this.buf,s=this.pos,n=s+1,o=0;o<t;++o)n=at(je.from(e[o]).zzEncode(),r,n);return this._delim(s,n-s-1)};E.prototype.bools=function(e){var t=e.length;this.uint32(t),this._reserve(t);for(var r=this.buf,s=this.pos,n=0;n<t;++n)r[s++]=e[n]?1:0;return this.pos+=t,this};var Ai=16,Ri=128;function Dt(i,e,t){var r=i.view;if(r||e<t)return r;var s=i.buf;return i.view=new DataView(s.buffer,s.byteOffset,s.byteLength)}E.prototype.fixed32s=function(e){var t=e.length,r=t*4;this.uint32(r),this._reserve(r);var s=this.pos,n,o=Dt(this,t,Ri);if(o)for(n=0;n<t;++n)o.setUint32(s,e[n]>>>0,!0),s+=4;else{var a=this.buf;for(n=0;n<t;++n)ft(e[n]>>>0,a,s),s+=4}return this.pos+=r,this};E.prototype.sfixed32s=E.prototype.fixed32s;E.prototype.fixed64s=function(e){var t=e.length,r=t*8;this.uint32(r),this._reserve(r);var s=this.pos,n,o,a=Dt(this,t,Ri);if(a)for(n=0;n<t;++n)o=je.from(e[n]),a.setUint32(s,o.lo,!0),a.setUint32(s+4,o.hi,!0),s+=8;else{var u=this.buf;for(n=0;n<t;++n)o=je.from(e[n]),ft(o.lo,u,s),ft(o.hi,u,s+4),s+=8}return this.pos+=r,this};E.prototype.sfixed64s=E.prototype.fixed64s;E.prototype.floats=function(e){var t=e.length,r=t*4;this.uint32(r),this._reserve(r);var s=this.pos,n,o=Dt(this,t,Ai);if(o)for(n=0;n<t;++n)o.setFloat32(s,e[n],!0),s+=4;else{var a=this.buf;for(n=0;n<t;++n)Le.float.writeFloatLE(e[n],a,s),s+=4}return this.pos+=r,this};E.prototype.doubles=function(e){var t=e.length,r=t*8;this.uint32(r),this._reserve(r);var s=this.pos,n,o=Dt(this,t,Ai);if(o)for(n=0;n<t;++n)o.setFloat64(s,e[n],!0),s+=8;else{var a=this.buf;for(n=0;n<t;++n)Le.float.writeDoubleLE(e[n],a,s),s+=8}return this.pos+=r,this};E.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this};E.prototype.reset=function(){var e=this.states;return e&&e.length?this.pos=e.pop():this.pos=0,this};E.prototype.ldelim=function(){var e=this.states,t,r;if(e&&e.length){var s=e.pop();t=this.pos-s-1,r=hr(t),r>1?(this._reserve(r-1),this.buf.copyWithin(s+r,s+1,s+1+t),this.pos+=r-1,tt(t,this.buf,s)):this.buf[s]=t}else t=this.pos,r=hr(t),this._reserve(r),this.buf.copyWithin(r,0,t),tt(t,this.buf,0),this.pos+=r;return this};E.prototype.finish=function(e){if(e)return this.buf.subarray(0,this.pos);var t=this.constructor.alloc(this.pos);return t.set(this.buf.subarray(0,this.pos),0),t};E.prototype.finishInto=function(e,t){return t===void 0&&(t=0),e.set(this.buf.subarray(0,this.pos),t),e};E._configure=function(i){ar=i,E.create=Ni(),ar._configure()}});var Li=q((Wo,Si)=>{"use strict";Si.exports=We;var Ti=Bt();We.prototype=Object.create(Ti.prototype,{constructor:{value:We,writable:!0,enumerable:!1,configurable:!0}});var $e=Se();function We(){Ti.call(this)}var lr;We._configure=function(){We.alloc=$e.Buffer&&$e.Buffer.allocUnsafe,lr=$e.Buffer&&$e.Buffer.prototype.utf8Write?function(e,t,r){return t.utf8Write(e,r)}:function(e,t,r){return t.write(e,r)}};We.prototype.bytes=function(e){$e.isString(e)&&(e=$e.Buffer.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&(this._reserve(t),this.buf.set(e,this.pos),this.pos+=t),this};We.prototype.string=function(e){var t=e.length;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(t<128){this._reserve(t*3+5);var r=this.pos,s=this.buf;return this._delim(r,t<40?$e.utf8.write(e,s,r+1):lr(e,s,r+1))}var n=$e.Buffer.byteLength(e);return this.uint32(n),this._reserve(n),lr(e,this.buf,this.pos),this.pos+=n,this};We._configure()});var jt=q((Ho,Pi)=>{"use strict";Pi.exports=L;var xe=Se(),dr,ki=xe.LongBits,Di=xe.utf8;function I(i,e){return RangeError("index out of range: "+i.pos+" + "+(e||1)+" > "+i.len)}function L(i){this.buf=i,this.pos=0,this.len=i.length,this.view=null,this.discardUnknown=L.discardUnknown}function Ii(i){if(Array.isArray(i)&&(i=new Uint8Array(i)),i instanceof Uint8Array)return new L(i);throw Error("illegal buffer")}var Bi=function(){return xe.Buffer?function(t){return(L.create=function(s){return xe.Buffer.isBuffer(s)?new dr(s):Ii(s)})(t)}:Ii};L.create=Bi();L.prototype.raw=function(e,t){return this.buf.subarray(e,t)};function pr(i){for(var e=0,t=0;t<4;++t){if(i.pos>=i.len)throw I(i);var r=i.buf[i.pos++];if(e=(e|(r&127)<<t*7)>>>0,r<128)return e}throw I(i)}L.prototype.uint32=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw I(this);if(this.buf[this.pos]>=128)return pr(this)}var e=this.buf,t=this.pos,r=(e[t]&127)>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<21)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&15)<<28)>>>0,e[t++]<128)return this.pos=t,r;for(var s=0;s<5;++s){if(t>=this.len)throw this.pos=t,I(this);if(e[t++]<128)return this.pos=t,r}throw this.pos=t,Error("invalid varint encoding")};L.prototype.tag=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw I(this);if(this.buf[this.pos]>=128)return pr(this)}var e=this.buf,t=this.pos,r=(e[t]&127)>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<21)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&15)<<28)>>>0,e[t]<128&&(e[t]&112)===0)return this.pos=t+1,r;throw this.pos=t+1,Error("invalid tag encoding")};L.prototype.size=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw I(this);if(this.buf[this.pos]>=128)return pr(this)}var e=this.buf,t=this.pos,r=(e[t]&127)>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(e[t]&127)<<21)>>>0,e[t++]<128)return this.pos=t,r;if(this.pos=t+1,e[t]>7)throw Error("invalid length encoding");return(r|e[t]<<28)>>>0};L.prototype.int32=function(){return this.uint32()|0};L.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function cr(){var i=new ki(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;e=0}else{for(;e<4;++e){if(this.pos>=this.len)throw I(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return i}throw I(this)}if(this.len-this.pos>4){for(;e<5;++e)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;e<5;++e){if(this.pos>=this.len)throw I(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}L.prototype.bool=function(){for(var e=!1,t,r=0;r<10;++r){if(this.pos>=this.len)throw I(this);if(t=this.buf[this.pos++],t&127&&(e=!0),t<128)return e}throw Error("invalid varint encoding")};function ht(i,e){return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0}L.prototype.fixed32=function(){if(this.pos+4>this.len)throw I(this,4);return ht(this.buf,this.pos+=4)};L.prototype.sfixed32=function(){if(this.pos+4>this.len)throw I(this,4);return ht(this.buf,this.pos+=4)|0};function Fi(){if(this.pos+8>this.len)throw I(this,8);return new ki(ht(this.buf,this.pos+=4),ht(this.buf,this.pos+=4))}L.prototype.float=function(){if(this.pos+4>this.len)throw I(this,4);var e=xe.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};L.prototype.double=function(){if(this.pos+8>this.len)throw I(this,4);var e=xe.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};L.prototype.uint32s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len,s=this.buf,n=this.pos,o;if(t>r)throw I(this,t-this.pos);for(this.len=t;n<t;)o=s[n++],o<128?e.push(o):(this.pos=n-1,e.push(this.uint32()),n=this.pos);if(this.pos=n,n!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.int32s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len,s=this.buf,n=this.pos,o;if(t>r)throw I(this,t-this.pos);for(this.len=t;n<t;)o=s[n++],o<128?e.push(o):(this.pos=n-1,e.push(this.int32()),n=this.pos);if(this.pos=n,n!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.sint32s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw I(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.sint32());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.bools=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len,s=this.buf,n=this.pos,o;if(t>r)throw I(this,t-this.pos);for(this.len=t;n<t;)o=s[n++],o<128?e.push(o!==0):(this.pos=n-1,e.push(this.bool()),n=this.pos);if(this.pos=n,n!==t)throw RangeError("index out of range");return this.len=r,e};var Ci=8,ji=128;function Ct(i,e,t){var r=i.view;if(r||e<t)return r;var s=i.buf;return i.view=new DataView(s.buffer,s.byteOffset,s.byteLength)}L.prototype.fixed32s=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw I(this,t);var s=t>>>2,n=e.length,o=this.pos;e.length=n+s;var a=Ct(this,s,ji);if(a)for(var u=0;u<s;++u,o+=4)e[n++]=a.getUint32(o,!0);else for(var h=this.buf,g=0;g<s;++g,o+=4)e[n++]=ht(h,o+4);if(this.pos=o,o!==r)throw I(this,4);return e};L.prototype.sfixed32s=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw I(this,t);var s=t>>>2,n=e.length,o=this.pos;e.length=n+s;var a=Ct(this,s,ji);if(a)for(var u=0;u<s;++u,o+=4)e[n++]=a.getInt32(o,!0);else for(var h=this.buf,g=0;g<s;++g,o+=4)e[n++]=ht(h,o+4)|0;if(this.pos=o,o!==r)throw I(this,4);return e};L.prototype.floats=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw I(this,t);var s=t>>>2,n=e.length,o=this.pos;e.length=n+s;var a=Ct(this,s,Ci);if(a)for(var u=0;u<s;++u,o+=4)e[n++]=a.getFloat32(o,!0);else for(var h=this.buf,g=0;g<s;++g,o+=4)e[n++]=xe.float.readFloatLE(h,o);if(this.pos=o,o!==r)throw I(this,4);return e};L.prototype.doubles=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw I(this,t);var s=t>>>3,n=e.length,o=this.pos;e.length=n+s;var a=Ct(this,s,Ci);if(a)for(var u=0;u<s;++u,o+=8)e[n++]=a.getFloat64(o,!0);else for(var h=this.buf,g=0;g<s;++g,o+=8)e[n++]=xe.float.readDoubleLE(h,o);if(this.pos=o,o!==r)throw I(this,8);return e};L.prototype.uint64s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw I(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.uint64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.int64s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw I(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.int64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.sint64s=function(e){e===void 0&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw I(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.sint64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e};L.prototype.fixed64s=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t,s=e.length;if(r>this.len)throw I(this,t);var n=t>>>3;e.length=s+n;for(var o=0;o<n;++o)e[s++]=this.fixed64();if(this.pos!==r)throw I(this,8);return e};L.prototype.sfixed64s=function(e){e===void 0&&(e=[]);var t=this.size(),r=this.pos+t,s=e.length;if(r>this.len)throw I(this,t);var n=t>>>3;e.length=s+n;for(var o=0;o<n;++o)e[s++]=this.sfixed64();if(this.pos!==r)throw I(this,8);return e};L.prototype.bytes=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw I(this,e);return this.pos=r,this.raw(t,r)};L.prototype.string=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw I(this,e);return this.pos=r,Di.read(this.buf,t,r)};L.prototype.stringVerify=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw I(this,e);return this.pos=r,Di.readStrict(this.buf,t,r)};L.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw I(this,e);this.pos+=e}else do if(this.pos>=this.len)throw I(this);while(this.buf[this.pos++]&128);return this};L.recursionLimit=xe.recursionLimit;L.discardUnknown=!0;L.prototype.skipType=function(i,e,t){if(e===void 0&&(e=0),e>L.recursionLimit)throw Error("max depth exceeded");if(t===0)throw Error("illegal tag: field number 0");switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.size());break;case 3:for(;;){var r=this.tag(),s=r>>>3;if(i=r&7,!s)throw Error("illegal tag: field number 0");if(i===4){if(t!==void 0&&s!==t)throw Error("invalid end group tag");break}this.skipType(i,e+1,s)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};L._configure=function(i){dr=i,L.create=Bi(),dr._configure();var e=xe.Long?"toLong":"toNumber";xe.merge(L.prototype,{int64:function(){return cr.call(this)[e](!1)},uint64:function(){return cr.call(this)[e](!0)},sint64:function(){return cr.call(this).zzDecode()[e](!1)},fixed64:function(){return Fi.call(this)[e](!0)},sfixed64:function(){return Fi.call(this)[e](!1)}})}});var Vi=q((Zo,Ji)=>{"use strict";Ji.exports=He;var Mi=jt();He.prototype=Object.create(Mi.prototype,{constructor:{value:He,writable:!0,enumerable:!1,configurable:!0}});var zi=Se();function He(i){Mi.call(this,i)}He._configure=function(){zi.Buffer&&(He.prototype._slice=zi.Buffer.prototype.slice)};He.prototype.raw=function(e,t){return this._slice.call(this.buf,e,t)};He.prototype.string=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw RangeError("index out of range: "+this.pos+" + "+e+" > "+this.len);return this.pos=r,this.buf.utf8Slice?this.buf.utf8Slice(t,r):this.buf.toString("utf-8",t,r)};He._configure()});var $i=q((Xo,Ui)=>{"use strict";Ui.exports=Ot;var vr=Se();Ot.prototype=Object.create(vr.EventEmitter.prototype,{constructor:{value:Ot,writable:!0,enumerable:!1,configurable:!0}});function Ot(i,e,t){if(typeof i!="function")throw TypeError("rpcImpl must be a function");vr.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!e,this.responseDelimited=!!t}Ot.prototype.rpcCall=function i(e,t,r,s,n){if(!s)throw TypeError("request must be specified");var o=this;if(!n)return vr.asPromise(i,o,e,t,r,s);if(!o.rpcImpl){setTimeout(function(){n(Error("already ended"))},0);return}try{return o.rpcImpl(e,t[o.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(u,h){if(u)return o.emit("error",u,e),n(u);if(h===null){o.end(!0);return}if(!(h instanceof r))try{h=r[o.responseDelimited?"decodeDelimited":"decode"](h)}catch(g){return o.emit("error",g,e),n(g)}return o.emit("data",h,e),n(null,h)})}catch(a){o.emit("error",a,e),setTimeout(function(){n(a)},0);return}};Ot.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var gr=q(Wi=>{"use strict";var Es=Wi;Es.Service=$i()});var yr=q((Ko,Hi)=>{"use strict";Hi.exports=Object.create(null)});var Xi=q(pe=>{"use strict";pe.build="minimal";pe.Writer=Bt();pe.BufferWriter=Li();pe.Reader=jt();pe.BufferReader=Vi();pe.util=Se();pe.rpc=gr();pe.roots=yr();pe.configure=Zi;function Zi(){pe.util.LongBits._configure(pe.util.Long),pe.Writer._configure(pe.BufferWriter),pe.Reader._configure(pe.BufferReader)}Zi()});var wr=q(Gi=>{"use strict";var mr=Gi;mr.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;mr.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;mr.reservedRe=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/});var Yi=q((eu,Ki)=>{"use strict";Ki.exports=_r;var xs=wr(),Ns=xs.reservedRe;function _r(i,e){typeof i=="string"&&(e=i,i=void 0);var t=[];function r(n){if(typeof n!="string"){var o=s();if(_r.verbose&&console.log("codegen: "+o),o="return "+o,n){for(var a=Object.keys(n),u=new Array(a.length+1),h=new Array(a.length),g=0;g<a.length;)u[g]=a[g],h[g]=n[a[g++]];return u[g]=o,Function.apply(null,u).apply(null,h)}return Function(o)()}for(var b=new Array(arguments.length-1),x=0;x<b.length;)b[x]=arguments[++x];if(x=0,n=n.replace(/%([%dfijs])/g,function(R,S){var j=b[x++];switch(S){case"d":case"f":return j=Number(j),Object.is(j,-0)?"-0":String(j);case"i":return String(Math.floor(j));case"j":return JSON.stringify(j);case"s":return String(j)}return"%"}),x!==b.length)throw Error("parameter count mismatch");return t.push(n),r}function s(n){return"function "+As(n||e)+"("+(i&&i.join(",")||"")+`){
|
|
44
|
+
`+t.join(`
|
|
45
|
+
`)+`
|
|
46
|
+
}`}return Object.defineProperty(r,"toString",{value:s,writable:!0,enumerable:!0,configurable:!0}),r}_r.verbose=!1;function As(i){return!i||(i=String(i).replace(/[^\w$]/g,""),!i)?"":(/^\d/.test(i)&&(i="_"+i),Ns.test(i)?i+"_":i)}});var Qi=q(()=>{});var br=q((iu,en)=>{"use strict";var lt=null;try{lt=Qi(),(!lt||!lt.readFile||!lt.readFileSync)&&(lt=null)}catch{}en.exports=lt});var rn=q((nu,tn)=>{"use strict";tn.exports=Et;var Rs=sr(),Or=br();function Et(i,e,t){return typeof e=="function"?(t=e,e={}):e||(e={}),t?!e.xhr&&Or&&Or.readFile?Or.readFile(i,function(s,n){return s&&typeof XMLHttpRequest<"u"?Et.xhr(i,e,t):s?t(s):t(null,e.binary?n:n.toString("utf8"))}):Et.xhr(i,e,t):Rs(Et,this,i,e)}Et.xhr=function(e,t,r){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===4){if(s.status!==0&&s.status!==200)return r(Error("status "+s.status));if(t.binary){var o=s.response;if(!o){o=[];for(var a=0;a<s.responseText.length;++a)o.push(s.responseText.charCodeAt(a)&255)}return r(null,typeof Uint8Array<"u"?new Uint8Array(o):o)}return r(null,s.responseText)}},t.binary&&("overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.responseType="arraybuffer"),s.open("GET",e),s.send()}});var on=q(sn=>{"use strict";var Nr=sn,xr=/^[a-zA-Z][a-zA-Z0-9+.-]+:\/\//;function qs(i){if(typeof URL>"u"||!xr.test(i))return null;try{return new URL(i).href}catch{return null}}function Ts(i,e){if(typeof URL>"u"||!xr.test(i)||xr.test(e))return null;try{return new URL(e,i).href}catch{return null}}var nn=Nr.isAbsolute=function(e){return/^(?:\/|\w+:|\\\\\w+)/.test(e)},Er=Nr.normalize=function(e){var t=qs(e);if(t)return t;var r=e.substring(0,2),s="";r==="\\\\"&&(s=r,e=e.substring(2)),e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var n=e.split("/"),o=nn(e),a="";o&&(a=n.shift()+"/");for(var u=0;u<n.length;)n[u]===".."?u>0&&n[u-1]!==".."?n.splice(--u,2):o?n.splice(u,1):++u:n[u]==="."?n.splice(u,1):++u;return s+a+n.join("/")};Nr.resolve=function(e,t,r){var s=Ts(e,t);return s||(r||(t=Er(t)),nn(t)?t:(r||(e=Er(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?Er(e+"/"+t):t))}});var dt=q((ou,an)=>{"use strict";an.exports=C;var Pt=Ge();C.prototype=Object.create(Pt.prototype,{constructor:{value:C,writable:!0,enumerable:!1,configurable:!0}});C.className="Namespace";var Ar=Xe(),Ze=ue(),Ss=nt(),rt,ct,it;C.fromJSON=function(e,t,r){if(r===void 0&&(r=0),r>Ze.recursionLimit)throw Error("max depth exceeded");return new C(e,t.options).addJSON(t.nested,r)};function un(i,e){if(i&&i.length){for(var t={},r=0;r<i.length;++r)t[i[r].name]=i[r].toJSON(e);return t}}C.arrayToJSON=un;C.isReservedId=function(e,t){if(e){for(var r=0;r<e.length;++r)if(typeof e[r]!="string"&&e[r][0]<=t&&e[r][1]>=t)return!0}return!1};C.isReservedName=function(e,t){if(e){for(var r=0;r<e.length;++r)if(e[r]===t)return!0}return!1};function C(i,e){Pt.call(this,i,e),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function fn(i){i._nestedArray=null,i._lookupCache=Object.create(null);for(var e=i;e=e.parent;)e._lookupCache=Object.create(null);return i}Object.defineProperty(C.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=Ze.toArray(this.nested))}});C.prototype.toJSON=function(e){return Ze.toObject(["options",this.options,"nested",un(this.nestedArray,e)])};C.prototype.addJSON=function(e,t){if(t===void 0&&(t=0),t>Ze.recursionLimit)throw Error("max depth exceeded");var r=this;if(e)for(var s=Object.keys(e),n=0,o;n<s.length;++n)o=e[s[n]],r.add((o.fields!==void 0?rt.fromJSON:o.values!==void 0?it.fromJSON:o.methods!==void 0?ct.fromJSON:o.id!==void 0?Ar.fromJSON:C.fromJSON)(s[n],o,t+1));return this};C.prototype.get=function(e){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)?this.nested[e]:null};C.prototype.getEnum=function(e){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)&&this.nested[e]instanceof it)return this.nested[e].values;throw Error("no such enum: "+e)};C.prototype.add=function(e){if(!(e instanceof Ar&&e.extend!==void 0||e instanceof rt||e instanceof Ss||e instanceof it||e instanceof ct||e instanceof C))throw TypeError("object must be a valid nested object");if(e.name==="__proto__")return this;if(!this.nested)this.nested={};else{var t=this.get(e.name);if(t)if(t instanceof C&&e instanceof C&&!(t instanceof rt||t instanceof ct)){for(var r=t.nestedArray,s=0;s<r.length;++s)e.add(r[s]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}else throw Error("duplicate name '"+e.name+"' in "+this)}this.nested[e.name]=e,this instanceof rt||this instanceof ct||this instanceof it||this instanceof Ar||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var n=this;n=n.parent;)n._needsRecursiveFeatureResolution=!0,n._needsRecursiveResolve=!0;return e.onAdd(this),fn(this)};C.prototype.remove=function(e){if(!(e instanceof Pt))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);if(!Ze.remove(this.nested,e,e.name))throw Error(e+" is not a member of "+this);return Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),fn(this)};C.prototype.define=function(e,t){if(Ze.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&e[0]==="")throw Error("path must be relative");if(e.length>Ze.recursionLimit)throw Error("max depth exceeded");for(var r=this;e.length>0;){var s=e.shift();if(r.nested&&r.nested[s]){if(r=r.nested[s],!(r instanceof C))throw Error("path conflicts with non-namespace objects")}else r.add(r=new C(s))}return t&&r.addJSON(t),r};C.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._needsRecursiveFeatureResolution&&this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof C?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this};C.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,e=this._edition||e,Pt.prototype._resolveFeaturesRecursive.call(this,e),this.nestedArray.forEach(t=>{t._resolveFeaturesRecursive(e)}),this):this};C.prototype.lookup=function(e,t,r){if(typeof t=="boolean"?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),Ze.isString(e)&&e.length){if(e===".")return this.root;e=e.split(".")}else if(!e.length)return this;var s=e.join(".");if(e[0]==="")return this.root.lookup(e.slice(1),t);var n=this._lookupImpl(e,s);if(n&&(!t||t.indexOf(n.constructor)>-1)||(n=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+s],n&&(!t||t.indexOf(n.constructor)>-1)))return n;if(r)return null;for(var o=this;o.parent;){if(n=o.parent._lookupImpl(e,s),n&&(!t||t.indexOf(n.constructor)>-1))return n;o=o.parent}return null};C.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),s=null;if(r)e.length===1?s=r:r instanceof C&&(e=e.slice(1),s=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof C&&(r=this._nestedArray[n]._lookupImpl(e,t))){s=r;break}return this._lookupCache[t]=s,s};C.prototype.lookupType=function(e){var t=this.lookup(e,[rt]);if(!t)throw Error("no such type: "+e);return t};C.prototype.lookupEnum=function(e){var t=this.lookup(e,[it]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t};C.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[rt,it]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t};C.prototype.lookupService=function(e){var t=this.lookup(e,[ct]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t};C._configure=function(i,e,t){rt=i,ct=e,it=t}});var zt=q((uu,hn)=>{"use strict";hn.exports=Ie;var Rr=Xe();Ie.prototype=Object.create(Rr.prototype,{constructor:{value:Ie,writable:!0,enumerable:!1,configurable:!0}});Ie.className="MapField";var Ls=Ke(),pt=ue();function Ie(i,e,t,r,s,n){if(Rr.call(this,i,e,r,void 0,void 0,s,n),!pt.isString(t))throw TypeError("keyType must be a string");this.keyType=t,this.resolvedKeyType=null,this.map=!0}Ie.fromJSON=function(e,t){var r=new Ie(e,t.id,t.keyType,t.type,t.options,t.comment);return t.protoName&&(r.protoName=t.protoName),t.jsonName!==void 0?r.jsonName=t.jsonName:t.options&&t.options.json_name!==void 0&&(r.jsonName=t.options.json_name),r};Ie.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return pt.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:void 0,"jsonName",this.jsonName!==pt.jsonName(this.protoName||this.name)?this.jsonName:void 0,"options",this.options,"comment",t?this.comment:void 0])};Ie.prototype.resolve=function(){if(this.resolved)return this;if(Ls.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return Rr.prototype.resolve.call(this)};Ie.d=function(e,t,r){return typeof r=="function"?r=pt.decorateType(r).name:r&&typeof r=="object"&&(r=pt.decorateEnum(r).name),function(n,o){pt.decorateType(n.constructor).add(new Ie(o,e,t,r))}}});var Mt=q((fu,ln)=>{"use strict";ln.exports=Ye;var qr=Ge();Ye.prototype=Object.create(qr.prototype,{constructor:{value:Ye,writable:!0,enumerable:!1,configurable:!0}});Ye.className="Method";var vt=ue();function Ye(i,e,t,r,s,n,o,a,u){if(vt.isObject(s)?(o=s,s=n=void 0):vt.isObject(n)&&(o=n,n=void 0),!(e===void 0||vt.isString(e)))throw TypeError("type must be a string");if(!vt.isString(t))throw TypeError("requestType must be a string");if(!vt.isString(r))throw TypeError("responseType must be a string");qr.call(this,i,o),this.type=e||"rpc",this.requestType=t,this.requestStream=s?!0:void 0,this.responseType=r,this.responseStream=n?!0:void 0,this.path="/"+this.name,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=a,this.parsedOptions=u}Ye.fromJSON=function(e,t){return new Ye(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)};Ye.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return vt.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])};Ye.prototype.resolve=function(){if(this.resolved)return this;if(this.parent){var e=this.parent.fullName;e.charAt(0)==="."&&(e=e.substring(1)),this.path="/"+e+"/"+this.name}else this.path="/"+this.name;return this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),qr.prototype.resolve.call(this)}});var Vt=q((au,pn)=>{"use strict";pn.exports=ge;var Pe=dt();ge.prototype=Object.create(Pe.prototype,{constructor:{value:ge,writable:!0,enumerable:!1,configurable:!0}});ge.className="Service";var Tr=Mt(),Jt=ue(),cn=gr();function ge(i,e){Pe.call(this,i,e),this.methods={},this._methodsArray=null}ge.fromJSON=function(e,t,r){if(r===void 0&&(r=0),r>Jt.recursionLimit)throw Error("max depth exceeded");var s=new ge(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)s.add(Tr.fromJSON(n[o],t.methods[n[o]]));return t.nested&&s.addJSON(t.nested,r),t.edition&&(s._edition=t.edition),s.comment=t.comment,s._defaultEdition="proto3",s};ge.prototype.toJSON=function(e){var t=Pe.prototype.toJSON.call(this,e),r=e?!!e.keepComments:!1;return Jt.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"methods",Pe.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])};Object.defineProperty(ge.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=Jt.toArray(this.methods))}});function dn(i){return i._methodsArray=null,i}ge.prototype.get=function(e){return Object.prototype.hasOwnProperty.call(this.methods,e)?this.methods[e]:Pe.prototype.get.call(this,e)};ge.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;Pe.prototype.resolve.call(this);for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return this};ge.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,Pe.prototype._resolveFeaturesRecursive.call(this,e),this.methodsArray.forEach(t=>{t._resolveFeaturesRecursive(e)}),this):this};ge.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof Tr?e.name==="__proto__"?this:(this.methods[e.name]=e,e.parent=this,dn(this)):Pe.prototype.add.call(this,e)};ge.prototype.remove=function(e){if(e instanceof Tr){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,dn(this)}return Pe.prototype.remove.call(this,e)};ge.prototype.create=function(e,t,r){for(var s=new cn.Service(e,t,r),n=0,o;n<this.methodsArray.length;++n){var a=Jt.lcFirst((o=this._methodsArray[n]).resolve().name).replace(/[^$\w_]/g,"");s[a]=(function(u,h,g){return function(x,A){return cn.Service.prototype.rpcCall.call(this,u,h,g,x,A)}})(o,o.resolvedRequestType.ctor,o.resolvedResponseType.ctor)}return s}});var Ut=q((hu,vn)=>{"use strict";vn.exports=Fe;var Is=Se();function Fe(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=i[e[t]])}Fe.create=function(e){return this.$type.create(e)};Fe.encode=function(e,t){return this.$type.encode(e,t)};Fe.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)};Fe.decode=function(e){return this.$type.decode(e)};Fe.decodeDelimited=function(e){return this.$type.decodeDelimited(e)};Fe.verify=function(e){return this.$type.verify(e)};Fe.fromObject=function(e){return this.$type.fromObject(e)};Fe.toObject=function(e,t){return this.$type.toObject(e,t)};Fe.prototype.toJSON=function(){return this.$type.toObject(this,Is.toJSONOptions)}});var Sr=q((lu,gn)=>{"use strict";gn.exports=ks;var $t=Ne(),ie=Ke(),Wt=ue();function Fs(i){return"missing required '"+i.name+"'"}function xt(i){return i._features.utf8_validation==="VERIFY"?"stringVerify":"string"}function gt(i,e){return i("if(!r.discardUnknown){")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(%s)",e)("}")}function ks(i){for(var e=!1,t=!1,r=0;r<i.fieldsArray.length;++r){var s=i._fieldsArray[r];s.map&&(e=!0),(s.resolvedType instanceof $t||!s.repeated&&!s.map&&!s.hasPresence)&&(t=!0)}var n=Wt.codegen(["r","l","z","q","g"])("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(q===undefined)q=0")("if(q>Reader.recursionLimit)")('throw Error("max depth exceeded")')("var c,m"+(e?",k,v":t?",v":""))("if(l===undefined)")("c=r.len")("else{")("c=r.pos+l")("if(c>r.len)")('throw RangeError("index out of range")')("l=r.len")("r.len=c")("}")("m=g||new C")("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");for(i.fieldsArray.length&&n("var u=t&7")("switch(t>>>=3){"),r=0;r<i.fieldsArray.length;++r){var o=i._fieldsArray[r].resolve(),a=o.resolvedType instanceof $t?"int32":o.type,u="m"+Wt.safeProp(o.name),h=o.resolvedType instanceof $t&&o.resolvedType._features.enum_type==="CLOSED";if(o.map){n("case %i:{",o.id)("if(u!==2)")("break"),h||n("if(%s===util.emptyObject)",u)("%s={}",u),n("var c2=r.size()+r.pos")("if(c2>r.len)")('throw RangeError("index out of range")')("r.len=c2"),ie.defaults[o.keyType]!==void 0?n("k=%j",ie.defaults[o.keyType]):n("k=null"),ie.long[a]!==void 0?n("v=util.Long?util.Long.fromNumber(0,%j):0",a==="uint64"||a==="fixed64"):ie.defaults[a]!==void 0?n("v=%j",ie.defaults[a]):n("v=null"),n("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",ie.mapKey[o.keyType])("break")("k=r.%s()",o.keyType==="string"?xt(o):o.keyType)("continue")("case 2:")("if(u!==%i)",ie.basic[a]===void 0?2:ie.basic[a])("break"),ie.basic[a]===void 0?n("v=types[%i].decode(r,r.size(),undefined,q+1,v)",r):n("v=r.%s()",a==="string"?xt(o):a),n("continue")("}")("r.skipType(u,q,t2)")("}"),n("if(r.pos!==c2)")('throw RangeError("index out of range")')("r.len=c"),h&&(n("if(types[%i].valuesById[v]===undefined){",r),gt(n,"r.raw(s,r.pos)")("continue")("}")("if(%s===util.emptyObject)",u)("%s={}",u));var g=ie.basic[a]===void 0?"v||new types["+r+"].ctor":"v";ie.long[o.keyType]!==void 0?n('%s[typeof k==="object"?util.longToHash(k):k]=%s',u,g):(o.keyType==="string"&&n('if(k==="__proto__")')("util.makeProp(%s,k)",u),n("%s[k]=%s",u,g))}else o.repeated?(n("case %i:",o.id)("{"),ie.packed[a]!==void 0&&(n("if(u===2){"),h?(n("var c2=r.size()+r.pos")("if(c2>r.len)")('throw RangeError("index out of range")')("r.len=c2")("while(r.pos<c2){")("s=r.pos")("v=r.%s()",a)("if(types[%i].valuesById[v]!==undefined){",r)("if(!(%s&&%s.length))",u,u)("%s=[]",u)("%s.push(v)",u)("}else"),gt(n,"util.rawField("+o.id+",0,r.raw(s,r.pos))")("}"),n("if(r.pos!==c2)")('throw RangeError("index out of range")')("r.len=c")):n("if(!(%s&&%s.length))",u,u)("%s=[]",u)("r.%ss(%s)",a,u),n("continue")("}")),n("if(u!==%i)",ie.basic[a]===void 0?o.delimited?3:2:ie.basic[a])("break"),h||n("if(!(%s&&%s.length))",u,u)("%s=[]",u),ie.basic[a]===void 0?o.delimited?n("%s.push(types[%i].decode(r,undefined,%i,q+1))",u,r,o.id*8+4):n("%s.push(types[%i].decode(r,r.size(),undefined,q+1))",u,r):h?(n("v=r.%s()",a)("if(types[%i].valuesById[v]!==undefined){",r)("if(!(%s&&%s.length))",u,u)("%s=[]",u)("%s.push(v)",u)("}else"),gt(n,"r.raw(s,r.pos)")):n("%s.push(r.%s())",u,a==="string"?xt(o):a)):ie.basic[a]===void 0?(n("case %i:{",o.id)("if(u!==%i)",o.delimited?3:2)("break"),o.delimited?n("%s=types[%i].decode(r,undefined,%i,q+1,%s)",u,r,o.id*8+4,u):n("%s=types[%i].decode(r,r.size(),undefined,q+1,%s)",u,r,u)):o.hasPresence?(n("case %i:{",o.id)("if(u!==%i)",ie.basic[a])("break"),h?(n("v=r.%s()",a)("if(types[%i].valuesById[v]!==undefined){",r)("%s=v",u),o.partOf&&n("m%s=%j",Wt.safeProp(o.partOf.name),o.name),n("}else"),gt(n,"r.raw(s,r.pos)")):n("%s=r.%s()",u,a==="string"?xt(o):a)):(n("case %i:{",o.id)("if(u!==%i)",ie.basic[a])("break"),h?(n("v=r.%s()",a)("if(types[%i].valuesById[v]!==undefined){",r)("if(v!==%j)",o.typeDefault)("%s=v",u)("else")("delete %s",u)("}else{"),gt(n,"r.raw(s,r.pos)")("}")):(o.resolvedType instanceof $t&&o.typeDefault!==0?n("if((v=r.%s())!==%j)",a,o.typeDefault):a==="string"?n("if((v=r.%s()).length)",xt(o)):a==="bytes"?n("if((v=r.%s()).length)",a):ie.long[a]!==void 0?n('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',a):n(a==="double"||a==="float"?"if(!Object.is(v=r.%s(),0))":"if(v=r.%s())",a),n("%s=v",u)("else")("delete %s",u)));o.partOf&&!h&&n("m%s=%j",Wt.safeProp(o.partOf.name),o.name),n("continue")("}")}for(r&&n("}"),n("r.skipType(%s,q,t)",r?"u":"t&7"),gt(n,"r.raw(s,r.pos)")("}")("if(l!==undefined){")("if(r.pos!==c)")('throw RangeError("index out of range")')("r.len=l")("}")("if(z!==undefined)")('throw Error("missing end group")'),r=0;r<i._fieldsArray.length;++r){var b=i._fieldsArray[r];b.required&&n("if(!Object.hasOwnProperty.call(m,%j))",b.name)("throw util.ProtocolError(%j,{instance:m})",Fs(b))}return n("return m")}});var Fr=q((cu,yn)=>{"use strict";yn.exports=Cs;var Ds=Ne(),Lr=ue();function we(i,e){return i.name+": "+e+(i.repeated&&e!=="array"?"[]":i.map&&e!=="object"?"{k:"+i.keyType+"}":"")+" expected"}function Ir(i,e,t,r){var s=e.resolvedType;if(s)if(s instanceof Ds)if(s._features.enum_type==="CLOSED"){i("switch(%s){",r)("default:")("return%j",we(e,"enum value"));for(var n=Object.keys(s.values),o=0;o<n.length;++o)i("case %i:",s.values[n[o]]);i("break")("}")}else i('if(typeof %s!=="number"||(%s|0)!==%s)',r,r,r)("return%j",we(e,"enum value"));else i("{")("var e=types[%i].verify(%s,q+1);",t,r)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":i("if(!util.isInteger(%s))",r)("return%j",we(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":i("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",we(e,"integer|Long"));break;case"float":case"double":i('if(typeof %s!=="number")',r)("return%j",we(e,"number"));break;case"bool":i('if(typeof %s!=="boolean")',r)("return%j",we(e,"boolean"));break;case"string":i("if(!util.isString(%s))",r)("return%j",we(e,"string"));break;case"bytes":i('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",we(e,"buffer"));break}return i}function Bs(i,e,t){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":i("if(!util.key32Re.test(%s))",t)("return%j",we(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":i("if(!util.key64Re.test(%s))",t)("return%j",we(e,"integer|Long key"));break;case"bool":i("if(!util.key2Re.test(%s))",t)("return%j",we(e,"boolean key"));break}return i}function Cs(i){var e=Lr.codegen(["m","q"])('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")("return%j","max depth exceeded"),t=i.oneofsArray,r={};t.length&&e("var p={}");for(var s=0;s<i.fieldsArray.length;++s){var n=i._fieldsArray[s].resolve(),o="m"+Lr.safeProp(n.name);if(n.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,n.name),n.map)e("if(!util.isObject(%s))",o)("return%j",we(n,"object"))("var k=Object.keys(%s)",o)("for(var i=0;i<k.length;++i){"),Bs(e,n,"k[i]"),Ir(e,n,s,o+"[k[i]]")("}");else if(n.repeated)e("if(!Array.isArray(%s))",o)("return%j",we(n,"array"))("for(var i=0;i<%s.length;++i){",o),Ir(e,n,s,o+"[i]")("}");else{if(n.partOf){var a=Lr.safeProp(n.partOf.name);r[n.partOf.name]===1&&e("if(p%s===1)",a)("return%j",n.partOf.name+": multiple values"),r[n.partOf.name]=1,e("p%s=1",a)}Ir(e,n,s,o)}n.optional&&e("}")}return e("return null")}});var Cr=q(wn=>{"use strict";var mn=wn,ze=Ne(),Br=Ke(),Ae=ue();function kr(i,e,t,r,s){if(e.resolvedType)if(e.resolvedType instanceof ze){var n=s?"m"+s+"[m"+s+".length]":"m"+r;i("switch(d%s){",r);for(var o=e.resolvedType.values,a=Object.keys(o),u=0;u<a.length;++u)i("case%j:",a[u])("case %i:",o[a[u]])("%s=%j",n,o[a[u]])("break");i("default:"),e.resolvedType._features.enum_type!=="CLOSED"&&i('if(typeof d%s==="number"&&(d%s|0)===d%s)',r,r,r)("%s=d%s",n,r),i("}")}else i("if(!util.isObject(d%s))",r)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",r,t,r);else{var h=!1;switch(e.type){case"double":case"float":i("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":i("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":i("m%s=d%s|0",r,r);break;case"uint64":case"fixed64":h=!0;case"int64":case"sint64":case"sfixed64":i("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",r,r,h)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,h?"true":"");break;case"bytes":i('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length>=0)",r)("m%s=d%s",r,r);break;case"string":i("m%s=String(d%s)",r,r);break;case"bool":i("m%s=Boolean(d%s)",r,r);break}}return i}mn.fromObject=function(e){var t=e.fieldsArray,r=Ae.codegen(["d","q"])("if(d instanceof C)")("return d")("if(!util.isObject(d))")("throw TypeError(%j)",e.fullName+": object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!t.length)return r("return new C");r("var m=new C");for(var s=0;s<t.length;++s){var n=t[s].resolve(),o=Ae.safeProp(n.name),a=!n.hasPresence&&!n.repeated&&!n.map&&(n.resolvedType instanceof ze||Br.basic[n.type]!==void 0);n.map?(r("if(d%s){",o)("if(!util.isObject(d%s))",o)("throw TypeError(%j)",n.fullName+": object expected")("m%s={}",o)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",o),r('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",o),kr(r,n,s,o+"[ks[i]]")("}")("}")):n.repeated?(r("if(d%s){",o)("if(!Array.isArray(d%s))",o)("throw TypeError(%j)",n.fullName+": array expected"),n.resolvedType instanceof ze?r("m%s=[]",o):r("m%s=Array(d%s.length)",o,o),r("for(var i=0;i<d%s.length;++i){",o),kr(r,n,s,o+"[i]",n.resolvedType instanceof ze?o:void 0)("}")("}")):(n.resolvedType instanceof ze||r("if(d%s!=null){",o),a&&(n.resolvedType instanceof ze?r('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',o,n.typeDefault,o,s,o,n.typeDefault):n.type==="string"?r('if(typeof d%s!=="string"||d%s.length){',o,o):n.type==="bytes"?r("if(d%s.length){",o):n.type==="bool"?r("if(d%s){",o):n.type==="double"||n.type==="float"?r("if(!Object.is(Number(d%s),0)){",o):Br.long[n.type]!==void 0?r('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',o,o,o,o):r("if(Number(d%s)!==0){",o)),kr(r,n,s,o),a&&r("}"),n.resolvedType instanceof ze||r("}"))}return r("return m")};function Dr(i,e,t,r,s){if(s||(s=r),e.resolvedType)e.resolvedType instanceof ze?i("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,t,s,s,t,s,s):i("d%s=types[%i].toObject(m%s,o,q+1)",r,t,s);else{var n=!1;switch(e.type){case"double":case"float":i("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,s,s,s);break;case"uint64":case"fixed64":n=!0;case"int64":case"sint64":case"sfixed64":i('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',r,s,s,s,s,n)('else if(typeof m%s==="number")',s)("d%s=o.longs===String?String(m%s):m%s",r,s,s)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,s,s,s,n?"true":"",s);break;case"bytes":i("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,s,s,s,s);break;default:i("d%s=m%s",r,s);break}}return i}mn.toObject=function(e){var t=e.fieldsArray.slice().sort(Ae.compareFieldsById);if(!t.length)return Ae.codegen()("return {}");for(var r=Ae.codegen(["m","o","q"])("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),s=[],n=[],o=[],a=0;a<t.length;++a)t[a].partOf||(t[a].resolve().repeated?s:t[a].map?n:o).push(t[a]);if(s.length){for(r("if(o.arrays||o.defaults){"),a=0;a<s.length;++a)r("d%s=[]",Ae.safeProp(s[a].name));r("}")}if(n.length){for(r("if(o.objects||o.defaults){"),a=0;a<n.length;++a)r("d%s={}",Ae.safeProp(n[a].name));r("}")}if(o.length){for(r("if(o.defaults){"),a=0;a<o.length;++a){var u=o[a],h=Ae.safeProp(u.name);if(u.resolvedType instanceof ze)r("d%s=o.enums===String?%j:%j",h,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',h)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',h,u.typeDefault.toString(),u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var g=Array.prototype.slice.call(u.typeDefault);r("if(o.bytes===String)d%s=%j",h,Ae.base64.encode(u.typeDefault,0,u.typeDefault.length))("else{")("d%s=%j",h,g)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else(u.type==="double"||u.type==="float")&&typeof u.typeDefault=="number"&&(!isFinite(u.typeDefault)||Object.is(u.typeDefault,-0))?r("d%s=%f",h,u.typeDefault)("if(o.json&&!isFinite(d%s))d%s=String(d%s)",h,h,h):r("d%s=%j",h,u.typeDefault)}r("}")}var b=!1;for(a=0;a<t.length;++a){var u=t[a],x=e._fieldsArray.indexOf(u),h=Ae.safeProp(u.name);if(u.map){b||(b=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h);var A=Br.long[u.keyType]!==void 0,R=h+"[ks2[j]]";r("for(var j=0;j<ks2.length;++j){"),A&&r("var k2=util.longFromKey(ks2[j],%j).toString()",u.keyType==="uint64"||u.keyType==="fixed64"),r('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",h),Dr(r,u,x,A?h+"[k2]":R,R)("}")}else u.repeated?(r("if(m%s&&m%s.length){",h,h)("d%s=Array(m%s.length)",h,h)("for(var j=0;j<m%s.length;++j){",h),Dr(r,u,x,h+"[j]")("}")):(r("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",h,u.name),Dr(r,u,x,h),u.partOf&&!u.partOf.isProto3Optional&&r("if(o.oneofs)")("d%s=%j",Ae.safeProp(u.partOf.name),u.name));r("}")}return r("return d")}});var jr=q(bn=>{"use strict";var js=bn,Ps=Ut(),_n=Se();js[".google.protobuf.Any"]={fromObject:function(i,e){if(e===void 0&&(e=0),e>_n.recursionLimit)throw Error("max depth exceeded");if(i&&i["@type"]){var t=i["@type"].substring(i["@type"].lastIndexOf("/")+1),r=this.lookup(t,[this.constructor]);if(r){var s=i["@type"].charAt(0)==="."?i["@type"].slice(1):i["@type"];return s.indexOf("/")===-1&&(s="/"+s),this.create({type_url:s,value:r.encode(r.fromObject(i,e+1)).finish()})}}return this.fromObject(i,e)},toObject:function(i,e,t){if(t===void 0&&(t=0),t>_n.recursionLimit)throw Error("max depth exceeded");var r="type.googleapis.com/",s="",n="";if(e&&e.json&&i.type_url&&i.value){n=i.type_url.substring(i.type_url.lastIndexOf("/")+1),s=i.type_url.substring(0,i.type_url.lastIndexOf("/")+1);var o=this.lookup(n,[this.constructor]);o&&(i=o.decode(i.value,void 0,void 0,t+1))}if(!(i instanceof this.ctor)&&i instanceof Ps){var a=i.$type.toObject(i,e,t+1),u=i.$type.fullName[0]==="."?i.$type.fullName.slice(1):i.$type.fullName;return s===""&&(s=r),n=s+u,a["@type"]=n,a}return this.toObject(i,e,t)}}});var Xt=q((vu,xn)=>{"use strict";xn.exports=V;var be=dt();V.prototype=Object.create(be.prototype,{constructor:{value:V,writable:!0,enumerable:!1,configurable:!0}});V.className="Type";var zs=Ne(),Mr=nt(),Ht=Xe(),Ms=zt(),Js=Vt(),Pr=Ut(),zr=jt(),En=Bt(),ne=ue(),Vs=Jr(),Us=Sr(),$s=Fr(),On=Cr(),Ws=jr();function V(i,e){i=i.replace(/\W/g,""),be.call(this,i,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.visibility=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null,this._fieldsByJsonName=null}Object.defineProperties(V.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var i=Object.keys(this.fields),e=0;e<i.length;++e){var t=this.fields[i[e]],r=t.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=t}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=ne.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=ne.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=V.generateConstructor(this)())},set:function(i){var e=i.prototype;e instanceof Pr||(i.prototype=new Pr,Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,enumerable:!1,configurable:!0}),ne.merge(i.prototype,e)),i.$type=i.prototype.$type=this,ne.merge(i,Pr,!0),this._ctor=i,delete this.decode,delete this.fromObject;for(var t=0,r;t<this.fieldsArray.length;++t)r=this._fieldsArray[t].resolve(),i.prototype[r.name]=r.defaultValue;var s={};for(t=0;t<this.oneofsArray.length;++t)s[this._oneofsArray[t].resolve().name]={get:ne.oneOfGetter(this._oneofsArray[t].oneof),set:ne.oneOfSetter(this._oneofsArray[t].oneof)};t&&Object.defineProperties(i.prototype,s)}}});V.generateConstructor=function(e){for(var t=ne.codegen(["p"]),r=0,s;r<e.fieldsArray.length;++r)(s=e._fieldsArray[r]).map?t("this%s={}",ne.safeProp(s.name)):s.repeated&&t("this%s=[]",ne.safeProp(s.name));return t('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]")};function Zt(i){return i._fieldsById=i._fieldsArray=i._oneofsArray=i._fieldsByJsonName=null,delete i.encode,delete i.decode,delete i.verify,i}V.fromJSON=function(e,t,r){if(r===void 0&&(r=0),r>ne.nestingLimit)throw Error("max depth exceeded");var s=new V(e,t.options);s.extensions=t.extensions,s.reserved=t.reserved;for(var n=Object.keys(t.fields),o=0;o<n.length;++o)s.add((typeof t.fields[n[o]].keyType<"u"?Ms.fromJSON:Ht.fromJSON)(n[o],t.fields[n[o]]));if(t.oneofs)for(n=Object.keys(t.oneofs),o=0;o<n.length;++o)s.add(Mr.fromJSON(n[o],t.oneofs[n[o]]));if(t.nested)for(n=Object.keys(t.nested),o=0;o<n.length;++o){var a=t.nested[n[o]];s.add((a.id!==void 0?Ht.fromJSON:a.fields!==void 0?V.fromJSON:a.values!==void 0?zs.fromJSON:a.methods!==void 0?Js.fromJSON:be.fromJSON)(n[o],a,r+1))}return t.extensions&&t.extensions.length&&(s.extensions=t.extensions),t.reserved&&t.reserved.length&&(s.reserved=t.reserved),t.group&&(s.group=!0),t.visibility&&(s.visibility=t.visibility),t.comment&&(s.comment=t.comment),t.edition&&(s._edition=t.edition),s._defaultEdition="proto3",s};V.prototype.toJSON=function(e){var t=be.prototype.toJSON.call(this,e),r=e?!!e.keepComments:!1;return ne.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"oneofs",be.arrayToJSON(this.oneofsArray,e),"fields",be.arrayToJSON(this.fieldsArray.filter(function(s){return!s.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"visibility",this.visibility,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])};V.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;be.prototype.resolveAll.call(this);var e=this.oneofsArray;for(r=0;r<e.length;)e[r++].resolve();for(var t=this.fieldsArray,r=0;r<t.length;)t[r++].resolve();return this};V.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,be.prototype._resolveFeaturesRecursive.call(this,e),this.oneofsArray.forEach(t=>{t._resolveFeatures(e)}),this.fieldsArray.forEach(t=>{t._resolveFeatures(e)}),this):this};V.prototype.get=function(e){return Object.prototype.hasOwnProperty.call(this.fields,e)?this.fields[e]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,e)?this.oneofs[e]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)?this.nested[e]:null};V.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof Ht&&e.extend===void 0){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name)||e.name.charAt(0)==="$")throw Error("name '"+e.name+"' is reserved in "+this);return e.name==="__proto__"?this:(e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),Zt(this))}if(e instanceof Mr){if(e.name.charAt(0)==="$")throw Error("name '"+e.name+"' is reserved in "+this);return e.name==="__proto__"?this:(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),Zt(this))}return be.prototype.add.call(this,e)};V.prototype.remove=function(e){if(e instanceof Ht&&e.extend===void 0){if(!ne.remove(this.fields,e,e.name))throw Error(e+" is not a member of "+this);return e.parent=null,e.onRemove(this),Zt(this)}if(e instanceof Mr){if(!ne.remove(this.oneofs,e,e.name))throw Error(e+" is not a member of "+this);return e.parent=null,e.onRemove(this),Zt(this)}return be.prototype.remove.call(this,e)};V.prototype.isReservedId=function(e){return be.isReservedId(this.reserved,e)};V.prototype.isReservedName=function(e){return be.isReservedName(this.reserved,e)};V.prototype.create=function(e){return new this.ctor(e)};V.prototype.setup=function(){var e=this.root;if(e&&e._needsRecursiveFeatureResolution){var t=e._edition||this._edition;t&&e._resolveFeaturesRecursive(t)}for(var r=this.fullName,s=[],n=0;n<this.fieldsArray.length;++n)s.push(this._fieldsArray[n].resolve().resolvedType);this.encode=Vs(this)({Writer:En,types:s,util:ne}),this.decode=Us(this)({Reader:zr,types:s,util:ne,C:this.ctor}),this.verify=$s(this)({types:s,util:ne}),this.fromObject=On.fromObject(this)({types:s,util:ne,C:this.ctor}),this.toObject=On.toObject(this)({types:s,util:ne});var o=Ws[r];if(o){var a=Object.create(this);a._ctor=this.ctor,a.fromObject=this.fromObject,this.fromObject=o.fromObject.bind(a),a.toObject=this.toObject,this.toObject=o.toObject.bind(a)}return this};V.prototype.encode=function(e,t){return this.setup().encode.apply(this,arguments)};V.prototype.encodeDelimited=function(e,t){return this.encode(e,(t||En.create()).fork()).ldelim()};V.prototype.decode=function(e,t){return this.setup().decode.apply(this,arguments)};V.prototype.decodeDelimited=function(e){return e instanceof zr||(e=zr.create(e)),this.decode(e,e.size())};V.prototype.verify=function(e){return this.setup().verify.apply(this,arguments)};V.prototype.fromObject=function(e){return this.setup().fromObject.apply(this,arguments)};V.prototype.toObject=function(e,t){return this.setup().toObject.apply(this,arguments)};V.prototype.getTypeUrl=function(e){e===void 0&&(e="type.googleapis.com");var t=this.fullName;return e+"/"+(t.charAt(0)==="."?t.substring(1):t)};V.d=function(e){return function(r){ne.decorateType(r,e)}}});var Qt=q((gu,Rn)=>{"use strict";Rn.exports=ye;var Yt=dt();ye.prototype=Object.create(Yt.prototype,{constructor:{value:ye,writable:!0,enumerable:!1,configurable:!0}});ye.className="Root";var Gt=Xe(),Vr=Ne(),Hs=nt(),ke=ue(),Ur,$r,yt;function ye(i){Yt.call(this,"",i),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}ye.fromJSON=function(e,t,r){if(r===void 0&&(r=0),r>ke.recursionLimit)throw Error("max depth exceeded");return t||(t=new ye),e.options&&t.setOptions(e.options),t.addJSON(e.nested,r).resolveAll()};ye.prototype.resolvePath=ke.path.resolve;ye.prototype.fetch=ke.fetch;function An(){}ye.prototype.load=function i(e,t,r){typeof t=="function"&&(r=t,t=void 0);var s=this;if(!r)return ke.asPromise(i,s,e,t);var n=r===An;function o(A,R){if(r){if(n)throw A;R&&R.resolveAll();var S=r;r=null,S(A,R)}}function a(A){var R=A.lastIndexOf("google/protobuf/");if(R>-1){var S=A.substring(R);if(Object.prototype.hasOwnProperty.call(yt,S))return S}return Object.prototype.hasOwnProperty.call(yt,A)?A:null}function u(A,R,S){S===void 0&&(S=0);try{if(S>ke.recursionLimit)throw Error("max depth exceeded");if(ke.isString(R)&&R.charAt(0)==="{"&&(R=JSON.parse(R)),!ke.isString(R))s.setOptions(R.options).addJSON(R.nested);else{$r.filename=A;var j=$r(R,s,t),Q,ee=0;if(j.imports)for(;ee<j.imports.length;++ee)(Q=a(j.imports[ee])||s.resolvePath(A,j.imports[ee]))&&h(Q,!1,S+1);if(j.weakImports)for(ee=0;ee<j.weakImports.length;++ee)(Q=a(j.weakImports[ee])||s.resolvePath(A,j.weakImports[ee]))&&h(Q,!0,S+1)}}catch(fe){o(fe)}!n&&!g&&o(null,s)}function h(A,R,S){if(S===void 0&&(S=0),A=a(A)||A,!(s.files.indexOf(A)>-1)){if(s.files.push(A),Object.prototype.hasOwnProperty.call(yt,A)){n?u(A,yt[A],S):(++g,setTimeout(function(){--g,u(A,yt[A],S)}));return}if(n){var j;try{j=ke.fs.readFileSync(A).toString("utf8")}catch(Q){R||o(Q);return}u(A,j,S)}else++g,s.fetch(A,function(Q,ee){if(--g,!!r){if(Q){R?g||o(null,s):o(Q);return}u(A,ee,S)}})}}var g=0;ke.isString(e)&&(e=[e]);for(var b=0,x;b<e.length;++b)(x=s.resolvePath("",e[b]))&&h(x);return n?(s.resolveAll(),s):(g||o(null,s),s)};ye.prototype.loadSync=function(e,t){if(!ke.isNode)throw Error("not supported");return this.load(e,t,An)};ye.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return Yt.prototype.resolveAll.call(this)};var Kt=/^[A-Z]/;function Nn(i,e){var t=e.parent.lookup(e.extend);if(t){var r=new Gt(e.fullName,e.id,e.type,e.rule,void 0,e.options);return t.get(r.name)||(r.declaringField=e,e.extensionField=r,t.add(r)),!0}return!1}ye.prototype._handleAdd=function(e){if(e instanceof Gt)e.extend!==void 0&&!e.extensionField&&(Nn(this,e)||this.deferred.push(e));else if(e instanceof Vr)Kt.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof Hs)){if(e instanceof Ur)for(var t=0;t<this.deferred.length;)Nn(this,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);Kt.test(e.name)&&(e.parent[e.name]=e)}(e instanceof Ur||e instanceof Vr||e instanceof Gt)&&(this._fullyQualifiedObjects[e.fullName]=e)};ye.prototype._handleRemove=function(e){if(e instanceof Gt){if(e.extend!==void 0)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof Vr)Kt.test(e.name)&&delete e.parent[e.name];else if(e instanceof Yt){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);Kt.test(e.name)&&delete e.parent[e.name]}delete this._fullyQualifiedObjects[e.fullName]};ye._configure=function(i,e,t){Ur=i,$r=e,yt=t}});var ue=q((yu,Sn)=>{"use strict";var $=Sn.exports=Se(),qn=yr(),Wr,Hr;$.codegen=Yi();$.fetch=rn();$.path=on();$.patterns=wr();var Tn=$.patterns.reservedRe;$.fs=br();$.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),s=0;s<t.length;)r[s]=e[t[s++]];return r}return[]};$.toObject=function(e){for(var t={},r=0;r<e.length;){var s=e[r++],n=e[r++];n!==void 0&&(t[s]=n)}return t};$.remove=function(e,t,r){if(!e)return!1;if(r!==void 0&&Object.prototype.hasOwnProperty.call(e,r)&&e[r]===t)return delete e[r],!0;for(var s=Object.keys(e),n=0;n<s.length;++n)if(e[s[n]]===t)return delete e[s[n]],!0;return!1};$.isReserved=function(e){return Tn.test(e)};$.safeProp=function(e){return!/^[$\w_]+$/.test(e)||Tn.test(e)?"["+JSON.stringify(e)+"]":"."+e};$.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var Zs=/_([a-z])/g;$.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(Zs,function(t,r){return r.toUpperCase()})};$.jsonName=function(e){for(var t="",r=!1,s=0;s<e.length;++s){var n=e.charAt(s);n==="_"?r=!0:r?(t+=n.toUpperCase(),r=!1):t+=n}return t};$.compareFieldsById=function(e,t){return e.id-t.id};$.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&($.decorateRoot.remove(e.$type),e.$type.name=t,$.decorateRoot.add(e.$type)),e.$type;Wr||(Wr=Xt());var r=new Wr(t||e.name);return $.decorateRoot.add(r),r.ctor=e,Object.defineProperty(e,"$type",{value:r,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:r,enumerable:!1}),r};var Xs=0;$.decorateEnum=function(e){if(e.$type)return e.$type;Hr||(Hr=Ne());var t=new Hr("Enum"+Xs++,e);return $.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t};$.setProperty=function(e,t,r,s){function n(o,a,u){var h=a.shift();if($.isUnsafeProperty(h))return o;if(a.length>0)o[h]=n(o[h]||{},a,u);else{var g=o[h];if(g&&s)return o;g&&(u=[].concat(g).concat(u)),o[h]=u}return o}if(typeof e!="object")throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");if(t=t.split("."),t.length>$.recursionLimit)throw Error("max depth exceeded");return n(e,t,r)};Object.defineProperty($,"decorateRoot",{get:function(){return qn.decorated||(qn.decorated=new(Qt()))}})});var Ke=q(Ln=>{"use strict";var Nt=Ln,Gs=ue(),Ks=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function At(i,e){var t=0,r=Object.create(null);for(e|=0;t<i.length;)r[Ks[t+e]]=i[t++];return r}Nt.basic=At([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);Nt.defaults=At([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",Gs.emptyArray,null]);Nt.long=At([0,0,0,1,1],7);Nt.mapKey=At([0,0,0,5,5,0,0,0,1,1,0,2],2);Nt.packed=At([1,5,0,0,0,5,5,0,0,0,1,1,0])});var Xe=q((wu,Fn)=>{"use strict";Fn.exports=se;var qt=Ge();se.prototype=Object.create(qt.prototype,{constructor:{value:se,writable:!0,enumerable:!1,configurable:!0}});se.className="Field";var In=Ne(),er=Ke(),X=ue(),Rt,Ys=/^(?:required|optional|repeated)$/;se.fromJSON=function(e,t){var r=new se(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),t.protoName&&(r.protoName=t.protoName),t.jsonName!==void 0?r.jsonName=t.jsonName:t.options&&t.options.json_name!==void 0&&(r.jsonName=t.options.json_name),r._defaultEdition="proto3",r};function se(i,e,t,r,s,n,o){if(X.isObject(r)?(o=s,n=r,r=s=void 0):X.isObject(s)&&(o=n,n=s,s=void 0),qt.call(this,i,n),!X.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!X.isString(t))throw TypeError("type must be a string");if(r!==void 0&&!Ys.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(s!==void 0&&!X.isString(s))throw TypeError("extend must be a string");this.rule=r&&r!=="optional"?r:void 0,this.type=t,this.id=e,this.extend=s||void 0,this.repeated=r==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=X.Long?er.long[t]!==void 0:!1,this.bytes=t==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o,this.protoName=void 0,this.jsonName=void 0}Object.defineProperty(se.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}});Object.defineProperty(se.prototype,"optional",{get:function(){return!this.required}});Object.defineProperty(se.prototype,"delimited",{get:function(){return this.resolvedType instanceof Rt&&this._features.message_encoding==="DELIMITED"}});Object.defineProperty(se.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}});Object.defineProperty(se.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}});se.prototype.setOption=function(e,t,r){return qt.prototype.setOption.call(this,e,t,r)};se.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return X.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:void 0,"jsonName",this.jsonName!==X.jsonName(this.protoName||this.name)?this.jsonName:void 0,"options",this.options,"comment",t?this.comment:void 0])};se.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=er.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof Rt?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof In&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof In)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long){var e=this.type==="uint64"||this.type==="fixed64";this.typeDefault=typeof this.typeDefault=="string"?X.Long.fromString(this.typeDefault,e):X.Long.fromNumber(this.typeDefault,e),Object.freeze&&Object.freeze(this.typeDefault)}else if(er.long[this.type]!==void 0&&typeof this.typeDefault=="string")this.typeDefault=parseInt(this.typeDefault,10);else if(this.bytes&&typeof this.typeDefault=="string"){var t;X.base64.test(this.typeDefault)?X.base64.decode(this.typeDefault,t=X.newBuffer(X.base64.length(this.typeDefault)),0):X.utf8.write(this.typeDefault,t=X.newBuffer(X.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=X.emptyObject:this.repeated?this.defaultValue=X.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof Rt&&this.parent._ctor&&(this.parent._ctor.prototype[this.name]=this.defaultValue),this.protoName===void 0&&(this.protoName=this.name),this.jsonName===void 0&&(this.jsonName=X.jsonName(this.protoName)),qt.prototype.resolve.call(this)};se.prototype._inferLegacyProtoFeatures=function(e){if(e!=="proto2"&&e!=="proto3")return{};var t={};if(this.rule==="required"&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&er.defaults[this.type]===void 0){var r=this.parent.get(this.type.split(".").pop());r&&r instanceof Rt&&r.group&&(t.message_encoding="DELIMITED")}return this.getOption("packed")===!0?t.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(t.repeated_field_encoding="EXPANDED"),t};se.prototype._resolveFeatures=function(e){return qt.prototype._resolveFeatures.call(this,this._edition||e)};se.d=function(e,t,r,s){return typeof t=="function"?t=X.decorateType(t).name:t&&typeof t=="object"&&(t=X.decorateEnum(t).name),function(o,a){X.decorateType(o.constructor).add(new se(a,e,t,r,{default:s}))}};se._configure=function(e){Rt=e}});var nt=q((_u,Bn)=>{"use strict";Bn.exports=me;var rr=Ge();me.prototype=Object.create(rr.prototype,{constructor:{value:me,writable:!0,enumerable:!1,configurable:!0}});me.className="OneOf";var kn=Xe(),tr=ue();function me(i,e,t,r){if(Array.isArray(e)||(t=e,e=void 0),rr.call(this,i,t),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=r}me.fromJSON=function(e,t){return new me(e,t.oneof,t.options,t.comment)};me.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return tr.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])};function Dn(i){if(i.parent)for(var e=0;e<i.fieldsArray.length;++e)i.fieldsArray[e].parent||i.parent.add(i.fieldsArray[e])}me.prototype.add=function(e){if(!(e instanceof kn))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,Dn(this),this};me.prototype.remove=function(e){if(!(e instanceof kn))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.partOf=null,this};me.prototype.onAdd=function(e){rr.prototype.onAdd.call(this,e);for(var t=this,r=0;r<this.oneof.length;++r){var s=e.get(this.oneof[r]);s&&!s.partOf&&(s.partOf=t,t.fieldsArray.push(s))}Dn(this)};me.prototype.onRemove=function(e){for(var t=0,r;t<this.fieldsArray.length;++t)(r=this.fieldsArray[t]).parent&&r.parent.remove(r);rr.prototype.onRemove.call(this,e)};Object.defineProperty(me.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var i=this.fieldsArray[0];return i.options!=null&&i.options.proto3_optional===!0}});me.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(s,n){tr.decorateType(s.constructor).add(new me(n,e)),Object.defineProperty(s,n,{get:tr.oneOfGetter(e),set:tr.oneOfSetter(e)})}}});var Ge=q((bu,Cn)=>{"use strict";Cn.exports=ce;ce.className="ReflectionObject";var Qs=nt(),Re=ue(),ir,eo={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},to={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},ro={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},io={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},no={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2026",default_symbol_visibility:"STRICT",enforce_proto_limits:"PROTO_LIMITS2026"};function ce(i,e){if(!Re.isString(i))throw TypeError("name must be a string");if(e&&!Re.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=i,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(ce.prototype,{root:{get:function(){for(var i=this;i.parent!==null;)i=i.parent;return i}},fullName:{get:function(){for(var i=[this.name],e=this.parent;e;)i.unshift(e.name),e=e.parent;return i.join(".")}}});ce.prototype.toJSON=function(){throw Error()};ce.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof ir&&t._handleAdd(this)};ce.prototype.onRemove=function(e){var t=e.root;t instanceof ir&&t._handleRemove(this),this.parent=null,this.resolved=!1};ce.prototype.resolve=function(){return this.resolved?this:(this.root instanceof ir&&(this.resolved=!0),this)};ce.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)};ce.prototype._resolveFeatures=function(e){if(!this._featuresResolved){var t={};if(!e)throw new Error("Unknown edition for "+this.fullName);var r=Re.merge({},this.options&&this.options.features,this._inferLegacyProtoFeatures(e));if(this._edition){if(e==="proto2")t=Object.assign({},eo);else if(e==="proto3")t=Object.assign({},to);else if(e==="2023")t=Object.assign({},ro);else if(e==="2024")t=Object.assign({},io);else if(e==="2026")t=Object.assign({},no);else throw new Error("Unknown edition: "+e);this._features=Re.merge(t,r)}else if(this.partOf instanceof Qs){var s=Re.merge({},this.partOf._features);this._features=Re.merge(s,r)}else if(!this.declaringField)if(this.parent){var n=Re.merge({},this.parent._features);this._features=Re.merge(n,r)}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}};ce.prototype._inferLegacyProtoFeatures=function(){return{}};ce.prototype.getOption=function(e){if(this.options&&Object.prototype.hasOwnProperty.call(this.options,e))return this.options[e]};ce.prototype.setOption=function(e,t,r){if(e==="__proto__")return this;if(this.options||(this.options={}),/^features\./.test(e))Re.setProperty(this.options,e,t,r);else{var s=this.getOption(e);(!r||s===void 0)&&(s!==t&&(this.resolved=!1),this.options[e]=t)}return this};ce.prototype.setParsedOption=function(e,t,r){if(e==="__proto__")return this;this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(r){var n=s.find(function(u){return Object.prototype.hasOwnProperty.call(u,e)});if(n){var o=n[e];Re.setProperty(o,r,t)}else n={},n[e]=Re.setProperty({},r,t),s.push(n)}else{var a={};a[e]=t,s.push(a)}return this};ce.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),s=0;s<r.length;++s)this.setOption(r[s],e[r[s]],t);return this};Object.defineProperty(ce.prototype,"toString",{value:function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},writable:!0,enumerable:!1,configurable:!0});ce.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition};ce._configure=function(i){ir=i}});var Ne=q((Ou,Pn)=>{"use strict";Pn.exports=Oe;var Zr=Ge();Oe.prototype=Object.create(Zr.prototype,{constructor:{value:Oe,writable:!0,enumerable:!1,configurable:!0}});Oe.className="Enum";var jn=dt(),mt=ue();function Oe(i,e,t,r,s,n){if(Zr.call(this,i,t),e&&typeof e!="object")throw TypeError("values must be an object");if(this.valuesById=Object.create(null),this.values=Object.create(this.valuesById),this.comment=r,this.comments=s||{},this.valuesOptions=n,this._valuesFeatures={},this.reserved=void 0,this.visibility=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)o[a]!=="__proto__"&&typeof e[o[a]]=="number"&&(this.values[o[a]]=e[o[a]],this.valuesById[e[o[a]]]===void 0&&(this.valuesById[e[o[a]]]=o[a]))}Oe.prototype._resolveFeatures=function(e){return e=this._edition||e,Zr.prototype._resolveFeatures.call(this,e),Object.keys(this.values).forEach(t=>{var r=mt.merge({},this._features);this._valuesFeatures[t]=mt.merge(r,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features||{})}),this};Oe.fromJSON=function(e,t){var r=new Oe(e,t.values,t.options,t.comment,t.comments,t.valuesOptions);return r.reserved=t.reserved,t.visibility&&(r.visibility=t.visibility),t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r};Oe.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return mt.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"visibility",this.visibility,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])};Oe.prototype.add=function(e,t,r,s){if(!mt.isString(e))throw TypeError("name must be a string");if(!mt.isInteger(t))throw TypeError("id must be an integer");if(e==="__proto__")return this;if(this.values[e]!==void 0)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[t]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return s&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[e]=s||null),this.comments[e]=r||null,this};Oe.prototype.remove=function(e){if(!mt.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(t==null)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this};Oe.prototype.isReservedId=function(e){return jn.isReservedId(this.reserved,e)};Oe.prototype.isReservedName=function(e){return jn.isReservedName(this.reserved,e)}});var Jr=q((Eu,Mn)=>{"use strict";Mn.exports=so;var Xr=Ne(),Qe=Ke(),Gr=ue();function zn(i,e,t,r){return e.delimited?i("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",t,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):i("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",t,r,(e.id<<3|2)>>>0)}function so(i){for(var e=Gr.codegen(["m","w","q"])("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),t,r,s=i.fieldsArray.slice().sort(Gr.compareFieldsById),t=0;t<s.length;++t){var n=s[t].resolve(),o=i._fieldsArray.indexOf(n),a=n.resolvedType instanceof Xr?"int32":n.type,u=Qe.basic[a];r="m"+Gr.safeProp(n.name),n.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",r,n.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r),n.keyType==="bool"?e("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(n.id<<3|2)>>>0,8|Qe.mapKey[n.keyType]):Qe.long[n.keyType]!==void 0?e("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(n.id<<3|2)>>>0,8|Qe.mapKey[n.keyType],n.keyType,n.keyType==="uint64"||n.keyType==="fixed64"):e("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(n.id<<3|2)>>>0,8|Qe.mapKey[n.keyType],n.keyType),u===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",o,r):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|u,a,r),e("}")("}")):n.repeated?(e("if(%s!=null&&%s.length){",r,r),n.packed&&Qe.packed[a]!==void 0?e("w.uint32(%i).%ss(%s)",(n.id<<3|2)>>>0,a,r):(e("for(var i=0;i<%s.length;++i)",r),u===void 0?zn(e,n,o,r+"[i]"):e("w.uint32(%i).%s(%s[i])",(n.id<<3|u)>>>0,a,r)),e("}")):(n.required||(n.hasPresence||!(n.resolvedType instanceof Xr||Qe.basic[a]!==void 0)?e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",r,n.name):n.resolvedType instanceof Xr?e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==%j)",r,n.name,r,n.typeDefault):a==="bool"?e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==false)",r,n.name,r):a==="string"?e('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!=="")',r,n.name,r):a==="bytes"?e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s.length)",r,n.name,r):a==="double"||a==="float"?e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&!Object.is(%s,0))",r,n.name,r):Qe.long[a]!==void 0?e('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&(typeof %s==="object"?%s.low||%s.high:%s!==0))',r,n.name,r,r,r,r):e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==0)",r,n.name,r)),u===void 0?zn(e,n,o,r):e("w.uint32(%i).%s(%s)",(n.id<<3|u)>>>0,a,r))}return e('if(m.$unknowns!=null&&Object.hasOwnProperty.call(m,"$unknowns"))')("for(var i=0;i<m.$unknowns.length;++i)")("w.raw(m.$unknowns[i])")("return w")}});var Vn=q((B,Jn)=>{"use strict";B=Jn.exports=Xi();B.build="light";function oo(i,e,t){return typeof e=="function"?(t=e,e=new B.Root):e||(e=new B.Root),e.load(i,t)}B.load=oo;function uo(i,e){return e||(e=new B.Root),e.loadSync(i)}B.loadSync=uo;B.encoder=Jr();B.decoder=Sr();B.verifier=Fr();B.converter=Cr();B.ReflectionObject=Ge();B.Namespace=dt();B.Root=Qt();B.Enum=Ne();B.Type=Xt();B.Field=Xe();B.OneOf=nt();B.MapField=zt();B.Service=Vt();B.Method=Mt();B.Message=Ut();B.wrappers=jr();B.types=Ke();B.util=ue();B.ReflectionObject._configure(B.Root);B.Namespace._configure(B.Type,B.Service,B.Enum);B.Root._configure(B.Type,void 0,{});B.Field._configure(B.Type)});var Yr=q((xu,Wn)=>{"use strict";Wn.exports=$n;var Kr=/[\s{}=;:[\],'"()<>]/g,fo=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,ao=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,ho=/^ *[*/]+ */,lo=/^\s*\*?\/*/,co=/\n/g,po=/\s/,vo=/\\([0-7]{1,3}|[xX][0-9a-fA-F]{1,2}|.?)/g,go={a:"\x07",b:"\b",f:"\f",r:"\r",n:`
|
|
47
|
+
`,t:" ",v:"\v","?":"?","'":"'",'"':'"'};function Un(i){return i.replace(vo,function(e,t){var r=t.charAt(0);if(r>="0"&&r<="7")return String.fromCharCode(parseInt(t,8)&255);if(r==="x"||r==="X")return String.fromCharCode(parseInt(t.substring(1),16));switch(t){case"\\":case"":return t;default:return go[t]||""}})}$n.unescape=Un;function $n(i,e){i=i.toString();var t=0,r=i.length,s=1,n=0,o={},a=[],u=null;function h(m){return Error("illegal "+m+" (line "+s+")")}function g(){var m=u==="'"?ao:fo;m.lastIndex=t-1;var P=m.exec(i);if(!P)throw h("string");return t=m.lastIndex,j(u),u=null,Un(P[1])}function b(m){return i.charAt(m)}function x(m,P,z){var W={type:i.charAt(m++),lineEmpty:!1,leading:z},de;e?de=2:de=3;var _e=m-de,M;do if(--_e<0||(M=i.charAt(_e))===`
|
|
48
|
+
`){W.lineEmpty=!0;break}while(M===" "||M===" ");for(var p=i.substring(m,P).split(co),Ce=0;Ce<p.length;++Ce)p[Ce]=p[Ce].replace(e?lo:ho,"").trim();W.text=p.join(`
|
|
49
|
+
`).trim(),o[s]=W,n=s}function A(m){var P=R(m),z=i.substring(m,P),W=/^\s*\/\//.test(z);return W}function R(m){for(var P=m;P<r&&b(P)!==`
|
|
50
|
+
`;)P++;return P}function S(){if(a.length>0)return a.shift();if(u)return g();var m,P,z,W,de,_e,M=t===0;do{if(t===r)return null;for(m=!1;po.test(z=b(t));)if(z===`
|
|
51
|
+
`&&(M=!0,++s),++t===r)return null;if(b(t)==="/"){if(++t===r)throw h("comment");if(b(t)==="/")if(e){if(W=t,de=!1,A(t-1)){de=!0;do{if(t=R(t),t===r||(t++,!M))break;_e=A(t),_e&&s++}while(_e)}else t=Math.min(r,R(t)+1);de&&(x(W,t,M),M=!0),s++,m=!0}else{for(de=b(W=t+1)==="/";b(++t)!==`
|
|
52
|
+
`;)if(t===r)return null;++t,de&&(x(W,t-1,M),M=!0),++s,m=!0}else if((z=b(t))==="*"){W=t+1,de=e||b(W)==="*";do{if(z===`
|
|
53
|
+
`&&++s,++t===r)throw h("comment");P=z,z=b(t)}while(P!=="*"||z!=="/");++t,de&&(x(W,t-2,M),M=!0),m=!0}else return"/"}}while(m);var p=t;Kr.lastIndex=0;var Ce=Kr.test(b(p++));if(!Ce)for(;p<r&&!Kr.test(b(p));)++p;var d=i.substring(t,t=p);return(d==='"'||d==="'")&&(u=d),d}function j(m){a.push(m)}function Q(){if(!a.length){var m=S();if(m===null)return null;j(m)}return a[0]}function ee(m,P){var z=Q(),W=z===m;if(W)return S(),!0;if(!P)throw h("token '"+z+"', '"+m+"' expected");return!1}function fe(m){var P=null,z;return m===void 0?(z=o[s-1],delete o[s-1],z&&(e||z.type==="*"||z.lineEmpty)&&(P=z.leading?z.text:null)):(n<m&&Q(),z=o[m],delete o[m],z&&!z.lineEmpty&&(e||z.type==="/")&&(P=z.leading?null:z.text)),P}return Object.defineProperty({next:S,peek:Q,push:j,skip:ee,cmnt:fe},"line",{get:function(){return s}})}});var Kn=q((Nu,Gn)=>{"use strict";Gn.exports=Je;Je.filename=null;Je.defaults={keepCase:!1};var yo=Yr(),Hn=Qt(),Zn=Xt(),nr=Xe(),mo=zt(),Xn=nt(),wo=Ne(),_o=Vt(),bo=Mt(),Oo=Ge(),Eo=Ke(),Me=ue(),xo=/^[1-9][0-9]*$/,No=/^-?[1-9][0-9]*$/,Ao=/^0[x][0-9a-fA-F]+$/,Ro=/^-?0[x][0-9a-fA-F]+$/,qo=/^0[0-7]+$/,To=/^-?0[0-7]+$/,So=/^(?:u?int|sint|s?fixed)(?:32|64)$/,Lo=/^(?:uint|fixed)(?:32|64)$/,Io=Me.patterns.numberRe,De=/^[a-zA-Z_][a-zA-Z_0-9]*$/,qe=Me.patterns.typeRefRe,Fo=536870911,ko=2147483647;function Je(i,e,t){e instanceof Hn||(t=e,e=new Hn),t||(t=Je.defaults);var r=t.preferTrailingComment||!1,s=yo(i,t.alternateCommentMode||!1),n=s.next,o=s.push,a=s.peek,u=s.skip,h=s.cmnt,g=!0,b,x,A,R="proto2",S=e,j=[],Q={},ee=t.keepCase?function(c){return c}:Me.camelCase;function fe(){j.forEach(c=>{c._edition=R,Object.keys(Q).forEach(l=>{c.getOption(l)===void 0&&c.setOption(l,Q[l],!0)})})}function m(c,l,v){var y=Je.filename;return v||(Je.filename=null),Error("illegal "+(l||"token")+" '"+c+"' ("+(y?y+", ":"")+"line "+s.line+")")}function P(){var c=[],l;do{if((l=n())!=='"'&&l!=="'")throw m(l);c.push(n()),u(l),l=a()}while(l==='"'||l==="'");return c.join("")}function z(c){var l=n();switch(l){case"'":case'"':return o(l),P();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return de(l,!0)}catch{if(c&&qe.test(l))return l;throw m(l,"value")}}function W(c,l,v,y){var _,N;do if(l&&((_=a())==='"'||_==="'")){var D=P();if(c.push(D),R>=2023)throw m(D,"id")}else try{c.push([N=M(n(),y,v),u("to",!0)?M(n(),y,v):N])}catch(U){if(l&&qe.test(_)&&R>=2023)c.push(_);else throw U}while(u(",",!0));var k={options:void 0};k.setOption=function(U,le){this.options===void 0&&(this.options={}),this.options[U]=le},T(k,function(le){if(le==="option")H(k,le),u(";");else throw m(le)},function(){Tt(k)})}function de(c,l){var v=1;switch(c.charAt(0)==="-"&&(v=-1,c=c.substring(1)),c){case"inf":case"INF":case"Inf":return v*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return v*0}if(xo.test(c))return v*parseInt(c,10);if(Ao.test(c))return v*parseInt(c,16);if(qo.test(c))return v*parseInt(c,8);if(Io.test(c))return v*parseFloat(c);throw m(c,"number",l)}function _e(c,l,v){if(c===null)throw m(c,"end of input");if(!l&&c.charAt(0)==="-")throw m(c,v||"integer");if(c==="0"||c==="-0")return 0;var y;if(No.test(c))y=parseInt(c,10);else if(Ro.test(c))y=parseInt(c,16);else if(To.test(c))y=parseInt(c,8);else throw m(c,v||"integer");return y||0}function M(c,l,v){switch(c){case"max":case"MAX":case"Max":return v||Fo}return _e(c,l,"id")}function p(){if(b!==void 0)throw m("package");if(b=n(),b===null||!qe.test(b))throw m(b,"name");S=S.define(b),u(";")}function Ce(){var c=a(),l;switch(c){case"option":if(R<"2024")throw m("option");n(),P(),u(";");return;case"weak":l=A||(A=[]),n();break;case"public":n();default:l=x||(x=[]);break}c=P(),u(";"),l.push(c)}function d(){if(u("="),R=P(),R<2023)throw m(R,"syntax");u(";")}function f(){if(u("="),R=P(),!["2023","2024","2026"].includes(R))throw m(R,"edition");u(";")}function w(c,l,v){switch(v===void 0&&(v=0),l){case"option":return H(c,l),u(";"),!0;case"message":return J(c,l,v+1),!0;case"enum":return te(c,l),!0;case"export":case"local":if(R<"2024")return!1;var y=l;return l=n(),l==="export"||l==="local"||l!=="message"&&l!=="enum"?!1:((l==="message"?J(c,l,v+1):te(c,l)).visibility=y,!0);case"service":return os(c,l,v+1),!0;case"extend":return fs(c,l,v),!0}return!1}function T(c,l,v){var y=s.line;if(c&&(typeof c.comment!="string"&&(c.comment=h()),c.filename=Je.filename),u("{",!0)){for(var _;(_=n())!=="}";)l(_);u(";",!0)}else v&&v(),u(";"),c&&(typeof c.comment!="string"||r)&&(c.comment=h(y)||c.comment)}function J(c,l,v){if(v===void 0&&(v=0),v>Me.nestingLimit)throw Error("max depth exceeded");if((l=n())===null||!De.test(l))throw m(l,"type name");var y=new Zn(l);return T(y,function(N){if(!w(y,N,v))switch(N){case";":break;case"map":ae(y,N);break;case"required":if(R!=="proto2")throw m(N);case"repeated":F(y,N,void 0,v+1);break;case"optional":if(R==="proto3")F(y,"proto3_optional",void 0,v+1);else{if(R!=="proto2")throw m(N);F(y,"optional",void 0,v+1)}break;case"oneof":ve(y,N,v+1);break;case"extensions":W(y.extensions||(y.extensions=[]));break;case"reserved":W(y.reserved||(y.reserved=[]),!0);break;default:if(R==="proto2"||!qe.test(N))throw m(N);o(N),F(y,"optional",void 0,v+1);break}}),c.add(y),c===S&&j.push(y),y}function F(c,l,v,y){var _=n();if(_===null)throw m(_,"end of input");if(_==="group"){Y(c,l,v,y);return}for(;_.endsWith(".")||(a()||"").startsWith(".");){var N=n();if(N===null)throw m(N,"end of input");_+=N}if(!qe.test(_))throw m(_,"type");var D=n();if(D===null)throw m(D,"end of input");if(!De.test(D))throw m(D,"name");var k=D;D=ee(D),u("=");var U=new nr(D,M(n()),_,l==="proto3_optional"?"optional":l,v);if(k!==D&&(U.protoName=k),T(U,function(Ve){if(Ve==="option")H(U,Ve),u(";");else throw m(Ve)},function(){Tt(U)}),l==="proto3_optional"){var le=new Xn("_"+D);U.setOption("proto3_optional",!0),le.add(U),c.add(le)}else c.add(U);c===S&&j.push(U)}function Y(c,l,v,y){if(y===void 0&&(y=0),y>Me.nestingLimit)throw Error("max depth exceeded");if(R>=2023)throw m("group");var _=n();if(_===null||!De.test(_))throw m(_,"name");var N=Me.lcFirst(_);_===N&&(_=Me.ucFirst(_)),u("=");var D=M(n()),k=new Zn(_);k.group=!0;var U=new nr(N,D,_,l,v);U.filename=Je.filename,T(k,function(oe){switch(oe){case";":break;case"map":ae(k);break;case"option":H(k,oe),u(";");break;case"required":case"repeated":F(k,oe,void 0,y+1);break;case"optional":R==="proto3"?F(k,"proto3_optional",void 0,y+1):F(k,"optional",void 0,y+1);break;case"message":J(k,oe,y+1);break;case"enum":te(k,oe);break;case"reserved":W(k.reserved||(k.reserved=[]),!0);break;case"export":case"local":if(R<"2024")throw m(oe);switch(oe=n(),oe){case"message":J(k,oe,y+1);break;case"enum":J(k,oe,y+1);break;default:throw m(oe)}break;default:throw m(oe)}}),c.add(k).add(U),c===S&&(j.push(k),j.push(U))}function ae(c){u("<");var l=n();if(Eo.mapKey[l]===void 0)throw m(l,"type");u(",");var v=n();if(!qe.test(v))throw m(v,"type");u(">");var y=n();if(y===null||!De.test(y))throw m(y,"name");u("=");var _=y;y=ee(y);var N=new mo(y,M(n()),l,v);_!==y&&(N.protoName=_),T(N,function(k){if(k==="option")H(N,k),u(";");else throw m(k)},function(){Tt(N)}),c.add(N)}function ve(c,l,v){if((l=n())===null||!De.test(l))throw m(l,"name");var y=new Xn(ee(l));T(y,function(N){N==="option"?(H(y,N),u(";")):(o(N),F(y,"optional",void 0,v))}),c.add(y)}function te(c,l){if((l=n())===null||!De.test(l))throw m(l,"name");var v=new wo(l),y=[];T(v,function(D){switch(D){case";":break;case"option":H(v,D),u(";");break;case"reserved":W(v.reserved||(v.reserved=[]),!0,ko,!0),v.reserved===void 0&&(v.reserved=[]);break;default:y.push(G(D))}});for(var _=0;_<y.length;++_)v.add(y[_].name,y[_].id,y[_].comment,y[_].options);return c.add(v),c===S&&j.push(v),v}function G(c){if(!De.test(c))throw m(c,"name");u("=");var l=M(n(),!0),v={options:void 0};return v.getOption=function(y){return this.options[y]},v.setOption=function(y,_){Oo.prototype.setOption.call(v,y,_)},v.setParsedOption=function(){},T(v,function(_){if(_==="option")H(v,_),u(";");else throw m(_)},function(){Tt(v)}),{name:c,id:l,comment:v.comment,options:v.parsedOptions||v.options}}function H(c,l){var v,y,_=!0;for(l==="option"&&(l=n());l!=="=";){if(l===null)throw m(l,"end of input");if(l==="("){var N=n();u(")"),l="("+N+")"}if(_){if(_=!1,l.includes(".")&&!l.includes("(")){var D=l.split(".");v=D[0]+".",l=D[1];continue}v=l}else y=y?y+=l:l;l=n()}var k=y?v.concat(y):v,U=K(c,k);y=y&&y[0]==="."?y.slice(1):y,v=v&&v[v.length-1]==="."?v.slice(0,-1):v,st(c,v,U,y)}function K(c,l,v){if(v===void 0&&(v=0),v>Me.recursionLimit)throw Error("max depth exceeded");if(u("{",!0)){for(var y={};!u("}",!0);){Z=n();var _;if(Z===null)throw m(Z,"end of input");if(Z==="["){Z=n();var N=Z===null?-1:Z.lastIndexOf("/");if(Z===null||!qe.test(N<0?Z:Z.slice(N+1)))throw m(Z,"name");_="["+Z+"]",u("]")}else{if(!De.test(Z))throw m(Z,"name");_=Z}var D;if(u(":",!0),a()==="{")D=K(c,l+"."+_,v+1);else if(a()==="["){D=[];var k,U;if(u("[",!0)&&!u("]",!0)){do U=a()==="{",k=U?K(c,l+"."+_,v+1):z(!0),D.push(k);while(u(",",!0));u("]"),typeof k<"u"&&(U||he(c,l+"."+_,k))}}else D=z(!0),he(c,l+"."+_,D);var le=Object.prototype.hasOwnProperty.call(y,_)?y[_]:void 0;le&&(D=[].concat(le).concat(D)),_!=="__proto__"&&(y[_]=D),u(",",!0),u(";",!0)}return y}var oe=l==="default"&&c instanceof nr&&So.test(c.type)?_e(n(),!Lo.test(c.type)):z(!0);return he(c,l,oe),oe}function he(c,l,v){if(S===c&&/^features\./.test(l)){Q[l]=v;return}l==="json_name"&&c instanceof nr&&(c.jsonName=v),c.setOption&&c.setOption(l,v)}function st(c,l,v,y){c.setParsedOption&&c.setParsedOption(l,v,y)}function Tt(c){if(u("[",!0)){do H(c,"option");while(u(",",!0));u("]")}return c}function os(c,l,v){if(v===void 0&&(v=0),v>Me.recursionLimit)throw Error("max depth exceeded");if((l=n())===null||!De.test(l))throw m(l,"service name");var y=new _o(l);T(y,function(N){if(!w(y,N,v)&&N!==";")if(N==="rpc")us(y,N);else throw m(N)}),c.add(y),c===S&&j.push(y)}function us(c,l){var v=h(),y=l;if(!De.test(l=n()))throw m(l,"name");var _=l,N,D,k,U;if(u("("),u("stream",!0)&&(D=!0),!qe.test(l=n())||(N=l,u(")"),u("returns"),u("("),u("stream",!0)&&(U=!0),!qe.test(l=n())))throw m(l);k=l,u(")");var le=new bo(_,y,N,k,D,U);le.comment=v,T(le,function(Ve){if(Ve!==";")if(Ve==="option")H(le,Ve),u(";");else throw m(Ve)}),c.add(le)}function fs(c,l,v){if((l=n())===null||!qe.test(l))throw m(l,"reference");var y=l;T(null,function(N){switch(N){case"required":case"repeated":F(c,N,y,v+1);break;case"optional":R==="proto3"?F(c,"proto3_optional",y,v+1):F(c,"optional",y,v+1);break;default:if(R==="proto2"||!qe.test(N))throw m(N);o(N),F(c,"optional",y,v+1);break}})}for(var Z;(Z=n())!==null;)switch(Z){case";":break;case"package":if(!g)throw m(Z);p();break;case"import":Ce();break;case"syntax":if(!g)throw m(Z);d();break;case"edition":if(!g)throw m(Z);f();break;case"option":H(S,Z),u(";",!0);break;default:if(w(S,Z,0)){g=!1;continue}throw m(Z)}return fe(),Je.filename=null,{package:b,imports:x,weakImports:A,root:e}}});var es=q((Au,Qn)=>{"use strict";Qn.exports=Te;var Do=/\/|\./;function Te(i,e){Do.test(i)||(i="google/protobuf/"+i+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),Te[i]=e}Te("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var Yn;Te("duration",{Duration:Yn={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Te("timestamp",{Timestamp:Yn});Te("empty",{Empty:{fields:{}}});Te("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1,protoName:"null_value"},numberValue:{type:"double",id:2,protoName:"number_value"},stringValue:{type:"string",id:3,protoName:"string_value"},boolValue:{type:"bool",id:4,protoName:"bool_value"},structValue:{type:"Struct",id:5,protoName:"struct_value"},listValue:{type:"ListValue",id:6,protoName:"list_value"}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Te("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Te("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Te.get=function(e){return Te[e]||null}});var rs=q((Be,ts)=>{"use strict";Be=ts.exports=Vn();Be.build="full";Be.tokenize=Yr();Be.parse=Kn();Be.common=es();Be.Root._configure(Be.Type,Be.parse,Be.common)});var ns=q((Ru,is)=>{"use strict";is.exports=rs()});var ss=vs(ns()),qu=ss.default;export{qu as default};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Delegation caps (CLW-AGT-06; docs/guide/agents-and-machines.md "Delegation"): an agent pane inside a subgraph that another agent calls as a tool is a delegated agent.
|
|
2
|
+
// Its caps can only SHRINK going down, never grow: depth (how many levels of agent may sit below), how many may run at once, time, cost, steps, model-call budget, and the
|
|
3
|
+
// tools it may call. A delegated agent never gets more tools, hosts or budget than its parent. Pure: no DOM, no clock of its own, no storage.
|
|
4
|
+
//
|
|
5
|
+
// "allowance" is what a running agent passes to the agents it delegates to:
|
|
6
|
+
// { depth, concurrent, deadlineAt (ms or 0), maxCostUsd (0 none), maxSteps, budget: { calls, inputTokens }, tools: string[] | null (null: the root, no parent's list) }
|
|
7
|
+
// Hosts need nothing here: a delegated canvas is made with its parent's own network check (src/agent/tools.js callSubgraph), so it can't reach a host the parent can't.
|
|
8
|
+
export const DELEGATION_LIMITS = Object.freeze({ depth: 4, concurrent: 8 });
|
|
9
|
+
export const DELEGATION_DEFAULTS = Object.freeze({ depth: 2, concurrent: 3 });
|
|
10
|
+
|
|
11
|
+
const positive = (v) => (Number(v) > 0 ? Number(v) : 0);
|
|
12
|
+
/** The smaller of two caps where 0 means "no cap": a cap is never lost by combining it with none. */
|
|
13
|
+
export const tighter = (a, b) => (positive(a) && positive(b) ? Math.min(positive(a), positive(b)) : positive(a) || positive(b));
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The allowance a ROOT agent (one no other agent called) hands down: its own caps, with the person's depth and concurrency settings (clamped to the hard limits).
|
|
17
|
+
* `own`: `{ maxSteps, budget, maxCostUsd, maxDurationMs }` as the run uses them (after any grant's caps); `tools`: the names of its tools.
|
|
18
|
+
*/
|
|
19
|
+
export function rootAllowance(own, tools, settings = DELEGATION_DEFAULTS, now = 0) {
|
|
20
|
+
return {
|
|
21
|
+
depth: Math.max(0, Math.min(DELEGATION_LIMITS.depth, Math.floor(Number(settings.depth ?? DELEGATION_DEFAULTS.depth)) || 0)),
|
|
22
|
+
concurrent: Math.max(1, Math.min(DELEGATION_LIMITS.concurrent, Math.floor(Number(settings.concurrent ?? DELEGATION_DEFAULTS.concurrent)) || 1)),
|
|
23
|
+
deadlineAt: positive(own.maxDurationMs) ? now + positive(own.maxDurationMs) : 0,
|
|
24
|
+
maxCostUsd: positive(own.maxCostUsd),
|
|
25
|
+
maxSteps: positive(own.maxSteps),
|
|
26
|
+
budget: { calls: positive(own.budget?.calls), inputTokens: positive(own.budget?.inputTokens) },
|
|
27
|
+
tools: tools ?? null,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A delegated agent's caps: its own, narrowed by its parent's allowance. `{ ok: true, own: { maxSteps, budget, maxCostUsd, maxDurationMs }, tools, allowance }` or
|
|
33
|
+
* `{ ok: false, message }` (no depth left, or the parent's time is spent). `tools` is the child's own tool names kept only where the parent has them.
|
|
34
|
+
*/
|
|
35
|
+
export function narrowFor(parent, own, tools, now = 0, settings = DELEGATION_DEFAULTS) {
|
|
36
|
+
if (!parent) return { ok: true, own, tools, allowance: rootAllowance(own, tools, settings, now) };
|
|
37
|
+
if (!(parent.depth > 0)) return { ok: false, message: "This agent was not started: it sits deeper than agents may delegate (the delegation depth cap, which only shrinks going down)." };
|
|
38
|
+
const left = parent.deadlineAt ? parent.deadlineAt - now : 0;
|
|
39
|
+
if (parent.deadlineAt && left <= 0) return { ok: false, message: "This agent was not started: the agent that called it has used up its time." };
|
|
40
|
+
const narrowed = {
|
|
41
|
+
maxSteps: tighter(own.maxSteps, parent.maxSteps),
|
|
42
|
+
budget: { calls: tighter(own.budget?.calls, parent.budget?.calls), inputTokens: tighter(own.budget?.inputTokens, parent.budget?.inputTokens) },
|
|
43
|
+
maxCostUsd: tighter(own.maxCostUsd, parent.maxCostUsd),
|
|
44
|
+
maxDurationMs: tighter(own.maxDurationMs, left),
|
|
45
|
+
};
|
|
46
|
+
const kept = parent.tools === null || parent.tools === undefined ? tools : tools.filter((t) => parent.tools.includes(t));
|
|
47
|
+
const allowance = {
|
|
48
|
+
depth: parent.depth - 1,
|
|
49
|
+
concurrent: parent.concurrent,
|
|
50
|
+
deadlineAt: narrowed.maxDurationMs ? now + narrowed.maxDurationMs : 0,
|
|
51
|
+
maxCostUsd: narrowed.maxCostUsd,
|
|
52
|
+
maxSteps: narrowed.maxSteps,
|
|
53
|
+
budget: narrowed.budget,
|
|
54
|
+
tools: kept,
|
|
55
|
+
};
|
|
56
|
+
return { ok: true, own: narrowed, tools: kept, allowance, dropped: tools.filter((t) => !kept.includes(t)) };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** May another agent start under this parent while `running` are going? */
|
|
60
|
+
export const mayStart = (parent, running) => !parent || running < parent.concurrent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// The person's delegation settings (CLW-AGT-06): how deep agents may delegate and how many delegated agents may run at once, kept in this browser (never in a canvas).
|
|
2
|
+
// The defaults are 2 and 3, the hard limits 4 and 8. A canvas or an agent can only ask for less: these are the ceiling every agent's own caps are narrowed under.
|
|
3
|
+
import { localStore } from "../storage.js";
|
|
4
|
+
import { DELEGATION_DEFAULTS, DELEGATION_LIMITS } from "./caps.js";
|
|
5
|
+
|
|
6
|
+
const KEY = "mallory:delegation";
|
|
7
|
+
const store = localStore("delegation settings");
|
|
8
|
+
const whole = (v, lo, hi, fallback) => (Number.isInteger(v) && v >= lo && v <= hi ? v : fallback);
|
|
9
|
+
|
|
10
|
+
// A headless process takes its caps from the operator's guard file (src/headless/guards.js), or the defaults: never from a browser's storage.
|
|
11
|
+
let fixed = null;
|
|
12
|
+
/** Headless only: these caps (checked) replace the browser's; `null` goes back to the browser's. */
|
|
13
|
+
export function useFixedDelegation(caps) {
|
|
14
|
+
fixed = caps ? Object.freeze({ depth: whole(caps.depth, 0, DELEGATION_LIMITS.depth, DELEGATION_DEFAULTS.depth), concurrent: whole(caps.concurrent, 1, DELEGATION_LIMITS.concurrent, DELEGATION_DEFAULTS.concurrent) }) : null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function delegationSettings() {
|
|
18
|
+
if (fixed) return fixed;
|
|
19
|
+
try {
|
|
20
|
+
const raw = JSON.parse(store.getItem(KEY) ?? "{}") ?? {};
|
|
21
|
+
return { depth: whole(raw.depth, 0, DELEGATION_LIMITS.depth, DELEGATION_DEFAULTS.depth), concurrent: whole(raw.concurrent, 1, DELEGATION_LIMITS.concurrent, DELEGATION_DEFAULTS.concurrent) };
|
|
22
|
+
} catch {
|
|
23
|
+
return { ...DELEGATION_DEFAULTS };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function setDelegationSettings({ depth, concurrent }) {
|
|
28
|
+
if (fixed) return fixed; // the operator's caps stand
|
|
29
|
+
const next = { depth: whole(depth, 0, DELEGATION_LIMITS.depth, DELEGATION_DEFAULTS.depth), concurrent: whole(concurrent, 1, DELEGATION_LIMITS.concurrent, DELEGATION_DEFAULTS.concurrent) };
|
|
30
|
+
store.setItem(KEY, JSON.stringify(next));
|
|
31
|
+
return next;
|
|
32
|
+
}
|