@parity/ppn 0.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +84 -0
  3. package/config/ports.env +128 -0
  4. package/config/versions.env +120 -0
  5. package/dist/bin.d.ts +2 -0
  6. package/dist/bin.js +30 -0
  7. package/dist/bin.js.map +1 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.js +471 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/commands/bite.d.ts +27 -0
  12. package/dist/commands/bite.js +556 -0
  13. package/dist/commands/bite.js.map +1 -0
  14. package/dist/commands/dashboard.d.ts +2 -0
  15. package/dist/commands/dashboard.js +503 -0
  16. package/dist/commands/dashboard.js.map +1 -0
  17. package/dist/commands/dist.d.ts +7 -0
  18. package/dist/commands/dist.js +121 -0
  19. package/dist/commands/dist.js.map +1 -0
  20. package/dist/commands/fetch.d.ts +11 -0
  21. package/dist/commands/fetch.js +550 -0
  22. package/dist/commands/fetch.js.map +1 -0
  23. package/dist/commands/fork.d.ts +1 -0
  24. package/dist/commands/fork.js +164 -0
  25. package/dist/commands/fork.js.map +1 -0
  26. package/dist/commands/generate.d.ts +7 -0
  27. package/dist/commands/generate.js +201 -0
  28. package/dist/commands/generate.js.map +1 -0
  29. package/dist/commands/genesis-toml.d.ts +1 -0
  30. package/dist/commands/genesis-toml.js +26 -0
  31. package/dist/commands/genesis-toml.js.map +1 -0
  32. package/dist/commands/nginx-conf.d.ts +1 -0
  33. package/dist/commands/nginx-conf.js +32 -0
  34. package/dist/commands/nginx-conf.js.map +1 -0
  35. package/dist/commands/service-context.d.ts +13 -0
  36. package/dist/commands/service-context.js +5 -0
  37. package/dist/commands/service-context.js.map +1 -0
  38. package/dist/commands/service.d.ts +28 -0
  39. package/dist/commands/service.js +807 -0
  40. package/dist/commands/service.js.map +1 -0
  41. package/dist/commands/stamp-spawn.d.ts +7 -0
  42. package/dist/commands/stamp-spawn.js +43 -0
  43. package/dist/commands/stamp-spawn.js.map +1 -0
  44. package/dist/commands/start.d.ts +33 -0
  45. package/dist/commands/start.js +462 -0
  46. package/dist/commands/start.js.map +1 -0
  47. package/dist/commands/upgrade.d.ts +15 -0
  48. package/dist/commands/upgrade.js +101 -0
  49. package/dist/commands/upgrade.js.map +1 -0
  50. package/dist/fork/chains.d.ts +25 -0
  51. package/dist/fork/chains.js +36 -0
  52. package/dist/fork/chains.js.map +1 -0
  53. package/dist/fork/codec.d.ts +36 -0
  54. package/dist/fork/codec.js +122 -0
  55. package/dist/fork/codec.js.map +1 -0
  56. package/dist/fork/manifest.d.ts +13 -0
  57. package/dist/fork/manifest.js +77 -0
  58. package/dist/fork/manifest.js.map +1 -0
  59. package/dist/fork/overrides.d.ts +45 -0
  60. package/dist/fork/overrides.js +255 -0
  61. package/dist/fork/overrides.js.map +1 -0
  62. package/dist/fork/products.d.ts +68 -0
  63. package/dist/fork/products.js +265 -0
  64. package/dist/fork/products.js.map +1 -0
  65. package/dist/fork/rpc.d.ts +25 -0
  66. package/dist/fork/rpc.js +51 -0
  67. package/dist/fork/rpc.js.map +1 -0
  68. package/dist/fork/shared-relay.d.ts +99 -0
  69. package/dist/fork/shared-relay.js +162 -0
  70. package/dist/fork/shared-relay.js.map +1 -0
  71. package/dist/fork/sleep.d.ts +3 -0
  72. package/dist/fork/sleep.js +2 -0
  73. package/dist/fork/sleep.js.map +1 -0
  74. package/dist/fork/validators.d.ts +81 -0
  75. package/dist/fork/validators.js +170 -0
  76. package/dist/fork/validators.js.map +1 -0
  77. package/dist/fork/verify.d.ts +79 -0
  78. package/dist/fork/verify.js +192 -0
  79. package/dist/fork/verify.js.map +1 -0
  80. package/dist/lib/archive.d.ts +8 -0
  81. package/dist/lib/archive.js +40 -0
  82. package/dist/lib/archive.js.map +1 -0
  83. package/dist/lib/fork-bundle-name.d.ts +4 -0
  84. package/dist/lib/fork-bundle-name.js +20 -0
  85. package/dist/lib/fork-bundle-name.js.map +1 -0
  86. package/dist/lib/github.d.ts +48 -0
  87. package/dist/lib/github.js +192 -0
  88. package/dist/lib/github.js.map +1 -0
  89. package/dist/lib/provenance.d.ts +67 -0
  90. package/dist/lib/provenance.js +98 -0
  91. package/dist/lib/provenance.js.map +1 -0
  92. package/dist/lib/spawn-env.d.ts +33 -0
  93. package/dist/lib/spawn-env.js +71 -0
  94. package/dist/lib/spawn-env.js.map +1 -0
  95. package/dist/lib/spawn-stamp.d.ts +34 -0
  96. package/dist/lib/spawn-stamp.js +63 -0
  97. package/dist/lib/spawn-stamp.js.map +1 -0
  98. package/dist/upgrade/chains.d.ts +4 -0
  99. package/dist/upgrade/chains.js +17 -0
  100. package/dist/upgrade/chains.js.map +1 -0
  101. package/dist/upgrade/fund.d.ts +38 -0
  102. package/dist/upgrade/fund.js +119 -0
  103. package/dist/upgrade/fund.js.map +1 -0
  104. package/dist/upgrade/provider-node.d.ts +2 -0
  105. package/dist/upgrade/provider-node.js +7 -0
  106. package/dist/upgrade/provider-node.js.map +1 -0
  107. package/dist/upgrade/signer.d.ts +21 -0
  108. package/dist/upgrade/signer.js +48 -0
  109. package/dist/upgrade/signer.js.map +1 -0
  110. package/dist/upgrade/sudo.d.ts +2 -0
  111. package/dist/upgrade/sudo.js +26 -0
  112. package/dist/upgrade/sudo.js.map +1 -0
  113. package/dist/upgrade/upgrade.d.ts +128 -0
  114. package/dist/upgrade/upgrade.js +539 -0
  115. package/dist/upgrade/upgrade.js.map +1 -0
  116. package/networks/README.md +120 -0
  117. package/networks/devnet.json +113 -0
  118. package/networks/kusama.json +56 -0
  119. package/networks/paseo-next-v2.json +87 -0
  120. package/networks/polkadot.json +57 -0
  121. package/networks/previewnet.json +186 -0
  122. package/package.json +54 -0
  123. package/scripts/assign-cores.sh +12 -0
  124. package/scripts/dashboard.sh +11 -0
  125. package/scripts/docker-entrypoint.sh +52 -0
  126. package/scripts/dub/postgres.sh +116 -0
  127. package/scripts/dub/service.sh +202 -0
  128. package/scripts/ensure-dot-cli.sh +23 -0
  129. package/scripts/eth-rpc.sh +45 -0
  130. package/scripts/force-open-hrmp.sh +11 -0
  131. package/scripts/grant-invites.sh +11 -0
  132. package/scripts/increase-people-lite-attestation-allowance.sh +11 -0
  133. package/scripts/install.sh +12 -0
  134. package/scripts/ipfs-daemon.sh +48 -0
  135. package/scripts/ipfs-swarm.sh +48 -0
  136. package/scripts/kill-port.sh +11 -0
  137. package/scripts/lib/workspace.sh +47 -0
  138. package/scripts/omni-node.sh +112 -0
  139. package/scripts/patch-bootnodes.sh +11 -0
  140. package/scripts/pin-bulletin-products.sh +11 -0
  141. package/scripts/pin-design-families.sh +144 -0
  142. package/scripts/set-dispatcher-address.sh +11 -0
  143. package/scripts/storage-provider-node.sh +11 -0
  144. package/web/assets/index-BW4b1s2y.js +7 -0
  145. package/web/assets/index-X3pZpnYk.css +1 -0
  146. package/web/index.html +13 -0
  147. package/zombienet-configs/local-dev.toml +253 -0
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+ # IPFS swarm reconnect loop - keeps IPFS connected to Bulletin Chain
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ PROJECT_DIR="$SCRIPT_DIR/.."
6
+ source "$SCRIPT_DIR/lib/workspace.sh"
7
+ BIN_DIR="$PPN_WS_BIN"
8
+
9
+ # Source port configuration
10
+ source "$PROJECT_DIR/config/ports.env"
11
+
12
+ IPFS_PATH="${IPFS_PATH:-$BIN_DIR/.ipfs}"
13
+ IPFS_BIN="${IPFS_BIN:-$BIN_DIR/ipfs}"
14
+
15
+ # Bulletin's peer id is derived from its node key, which zombienet derives from the
16
+ # NODE NAME — and genesis and fork spawns name the collator differently, so any
17
+ # hardcoded id only ever matches one mode (a fork's kubo retried forever and fresh
18
+ # uploads were unfetchable through the gateway). Resolve it from the collator's own
19
+ # RPC instead; re-resolving every loop also survives a collator restart.
20
+ resolve_bulletin_addr() {
21
+ local peer
22
+ peer=$(curl -sS --max-time 5 -H 'Content-Type: application/json' \
23
+ -d '{"jsonrpc":"2.0","id":1,"method":"system_localPeerId","params":[]}' \
24
+ "http://127.0.0.1:$BULLETIN_PORT" 2>/dev/null \
25
+ | sed -n 's/.*"result":"\([^"]*\)".*/\1/p')
26
+ [[ -n "$peer" ]] && echo "/ip4/127.0.0.1/tcp/$BULLETIN_P2P_PORT/ws/p2p/$peer"
27
+ }
28
+
29
+ echo "IPFS swarm reconnect loop starting..."
30
+ echo " IPFS_PATH: $IPFS_PATH"
31
+
32
+ # Wait for IPFS daemon to start
33
+ sleep 10
34
+
35
+ while true; do
36
+ BULLETIN_ADDR=$(resolve_bulletin_addr)
37
+ if [[ -z "$BULLETIN_ADDR" ]]; then
38
+ echo "Bulletin RPC (:$BULLETIN_PORT) not answering yet..."
39
+ sleep 5
40
+ continue
41
+ fi
42
+ if OUTPUT=$(IPFS_PATH="$IPFS_PATH" "$IPFS_BIN" swarm connect "$BULLETIN_ADDR" 2>&1); then
43
+ echo "Connected to Bulletin ($BULLETIN_ADDR)"
44
+ else
45
+ echo "Retrying connection to $BULLETIN_ADDR: $OUTPUT"
46
+ fi
47
+ sleep 5
48
+ done
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # Kill any process listening on the given port(s).
3
+ # Usage: kill-port.sh 8080 5001 4001
4
+
5
+ for PORT in "$@"; do
6
+ PIDS=$(lsof -ti ":$PORT" 2>/dev/null)
7
+ if [ -n "$PIDS" ]; then
8
+ echo "Killing process(es) on port $PORT: $PIDS"
9
+ echo "$PIDS" | xargs kill -9 2>/dev/null || true
10
+ fi
11
+ done
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env bash
2
+ # Where the workspace is — the one rule, shared by every launcher. Mirrors workspaceRoot()
3
+ # in @parity/ppn-network-config: $PPN_HOME, else the nearest ancestor of the cwd with
4
+ # networks/, else a checkout this script sits in, else the per-user home. In a checkout all
5
+ # of these agree; installed from npm the script lives in node_modules, whose bin/ does not
6
+ # exist — five launchers each grew their own partial copy of this logic and each broke a
7
+ # different way, which is why it now lives here once.
8
+ #
9
+ # zombienet runs custom processes with a stripped environment (no HOME), so the last resort
10
+ # derives the home from the owner of this file — the user whose `ppn fetch` filled ~/.ppn.
11
+ #
12
+ # Usage: source "$(dirname "${BASH_SOURCE[0]}")/lib/workspace.sh" (adjust depth)
13
+ # Sets: PPN_WS the workspace root
14
+ # PPN_WS_BIN its bin/ (callers append /<network> for non-previewnet binaries)
15
+
16
+ ppn_workspace_root() {
17
+ if [[ -n "${PPN_HOME:-}" ]]; then
18
+ echo "$PPN_HOME"; return
19
+ fi
20
+ local dir="$PWD"
21
+ for _ in 1 2 3 4 5 6 7 8; do
22
+ [[ -d "$dir/networks" ]] && { echo "$dir"; return; }
23
+ [[ "$dir" == "/" ]] && break
24
+ dir="$(dirname "$dir")"
25
+ done
26
+ # A checkout: this helper sits at <root>/scripts/lib/workspace.sh, and a checkout has a
27
+ # fetched bin/. The npm package ships scripts/ too but never a bin/, so this rung
28
+ # distinguishes them.
29
+ local own; own="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
30
+ [[ -d "$own/bin" ]] && { echo "$own"; return; }
31
+ # The per-user home.
32
+ if [[ -n "${XDG_DATA_HOME:-}" ]]; then
33
+ echo "$XDG_DATA_HOME/ppn"; return
34
+ fi
35
+ if [[ -n "${HOME:-}" ]]; then
36
+ echo "$HOME/.ppn"; return
37
+ fi
38
+ local owner
39
+ owner="$(stat -c '%U' "${BASH_SOURCE[0]}" 2>/dev/null)" \
40
+ || owner="$(stat -f '%Su' "${BASH_SOURCE[0]}" 2>/dev/null)" \
41
+ || owner=""
42
+ [[ "$owner" =~ ^[A-Za-z0-9._-]+$ ]] && { echo "$(eval echo "~$owner")/.ppn"; return; }
43
+ echo ""
44
+ }
45
+
46
+ PPN_WS="$(ppn_workspace_root)"
47
+ PPN_WS_BIN="$PPN_WS/bin"
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env bash
2
+ # Wrapper around polkadot-omni-node that forces the libp2p network backend on the
3
+ # collator's *relay-chain* side.
4
+ #
5
+ # Why this exists: a collator runs a relay-chain node in the same process, configured by
6
+ # the args after the `--` separator. zombienet owns those args and passes no
7
+ # `--network-backend`, so the relay side takes the default — litep2p — whose websocket
8
+ # listener dies a few seconds after startup with:
9
+ #
10
+ # litep2p::websocket: [Relaychain] Websocket listener terminated error=Kind(InvalidInput)
11
+ # sc_service::task_manager: [Relaychain] Essential task `network-worker` failed.
12
+ #
13
+ # `network-worker` is essential, so the whole collator exits, usually right after it has
14
+ # authored its first block. Verified on macOS arm64 with 1.24.0-2f2eeb2b81d: with the
15
+ # default backend three or four collators die on every start; with libp2p, none do.
16
+ #
17
+ # This is consistent rather than exceptional — PPN already passes --network-backend=libp2p
18
+ # to every relay validator (see CHAIN_ARGS.relay in @ppn/network-config). The
19
+ # relay side of a collator is the one relay node that was still getting the default.
20
+ #
21
+ # The flag is appended, which puts it in the relay-chain arg list, and only on a real node
22
+ # run: zombienet also invokes this binary for spec and key generation, where it would be
23
+ # rejected as an unexpected argument.
24
+ #
25
+ # Which binary is exec'd, and from where, comes from the environment (set per collator
26
+ # in the generated fork TOML — zombienet forwards node-level env):
27
+ # PPN_BIN_DIR bin directory; non-previewnet networks keep theirs in bin/<network>
28
+ # PPN_COLLATOR_BINARY e.g. polkadot-parachain (networks/<name>.json parachain `command`)
29
+ # The libp2p fix applies to any cumulus collator, whichever binary it is.
30
+ set -euo pipefail
31
+
32
+ # Where the binaries are is a property of the *workspace*, never of this script's location.
33
+ # `ppn fetch` writes them to the workspace's bin/ ($PPN_HOME, or the checkout); installed from
34
+ # npm this script lives in node_modules/@parity/ppn/scripts, whose ../bin does not exist at all
35
+ # — under `set -e` the old `cd .../../bin` ended the script before the fallback below could run.
36
+ # So: the explicit env first, then the workspace, and only then this script's own tree, which is
37
+ # the right answer in a checkout and a harmless miss anywhere else.
38
+ source "$(dirname "${BASH_SOURCE[0]}")/lib/workspace.sh"
39
+ REPO_BIN="$PPN_WS_BIN"
40
+ # `ppn start` exports BIN as the directory this run resolved to — bin/ for previewnet,
41
+ # bin/<network> for everything else — and the probe below inherits it even though it gets
42
+ # none of the node-level env.
43
+ BIN_DIR="${PPN_BIN_DIR:-${BIN:-$REPO_BIN}}"
44
+ BINARY="${PPN_COLLATOR_BINARY:-polkadot-omni-node}"
45
+ BIN="$BIN_DIR/$BINARY"
46
+
47
+ # Fall back to bin/<network>/ when the resolved path has nothing in it.
48
+ #
49
+ # Before spawning anything, zombienet probes each node command to learn which arguments it
50
+ # accepts — and that probe runs *without* the node-level env, so PPN_BIN_DIR is unset and the
51
+ # lookup above lands on plain bin/. previewnet keeps its binaries there, so it works; every other
52
+ # network keeps them in bin/<network>/, and the probe fails with a bare
53
+ #
54
+ # NodeAvailableArgsError("", ".../scripts/omni-node.sh")
55
+ #
56
+ # which says nothing about a missing binary. It only shows up on a machine that has fetched one
57
+ # network and not previewnet — a fresh CI runner — so a developer whose bin/ still holds a
58
+ # previewnet fetch will never see it.
59
+ #
60
+ # The probe cannot know the *name* either: Kusama's collator is polkadot-parachain and it
61
+ # still probes as the default, which is how a completed bite died at spawn with the error
62
+ # above naming bin/polkadot-omni-node. A network's directory holds one collator, so
63
+ # whichever of the two is in there is the one this network runs.
64
+ if [[ ! -x "$BIN" ]]; then
65
+ dirs=("$BIN_DIR")
66
+ if [[ -n "$REPO_BIN" ]]; then
67
+ [[ -n "${PPN_NETWORK:-}" ]] && dirs+=("$REPO_BIN/$PPN_NETWORK")
68
+ dirs+=("$REPO_BIN" "$REPO_BIN"/*/)
69
+ fi
70
+ for dir in "${dirs[@]}"; do
71
+ for name in "$BINARY" polkadot-omni-node polkadot-parachain; do
72
+ if [[ -x "${dir%/}/$name" ]]; then
73
+ BIN="${dir%/}/$name"
74
+ break 2
75
+ fi
76
+ done
77
+ done
78
+ fi
79
+
80
+ # On a chain whose Aura is ed25519 (Polkadot's Asset Hub), zombienet's keystore has no key the
81
+ # collator can author with: it writes `aura` as sr25519 and files the ed25519 key under `gran`.
82
+ # Same seed, so inserting it under `aura` is all that is missing — without it the collator syncs,
83
+ # reports no error, and never proposes a block.
84
+ #
85
+ # Only on a real node run: the arg probe passes neither, and `key insert` on a half-set-up node
86
+ # would fail the probe rather than the spawn.
87
+ if [[ "${PPN_COLLATOR_AURA:-}" == "ed25519" ]]; then
88
+ base=""; chain=""
89
+ prev=""
90
+ for arg in "$@"; do
91
+ case "$prev" in
92
+ --base-path|-d) base="$arg" ;;
93
+ --chain) chain="$arg" ;;
94
+ esac
95
+ prev="$arg"
96
+ done
97
+ if [[ -n "$base" && -n "$chain" ]]; then
98
+ name="$(basename "$base")"
99
+ [[ "$name" == "data" ]] && name="$(basename "$(dirname "$base")")"
100
+ "$BIN" key insert --key-type aura --scheme ed25519 \
101
+ --suri "//$name" --chain "$chain" --base-path "$base" \
102
+ || echo "omni-node.sh: could not insert the ed25519 aura key for $name" >&2
103
+ fi
104
+ fi
105
+
106
+ for arg in "$@"; do
107
+ if [[ "$arg" == "--" ]]; then
108
+ exec "$BIN" "$@" --network-backend=libp2p --discover-local --allow-private-ip
109
+ fi
110
+ done
111
+
112
+ exec "$BIN" "$@"
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # zombienet's custom_processes spawns a command path, so this launcher has to exist.
3
+ # What it used to decide now lives in `ppn service patch-bootnodes` — see docs/ARCHITECTURE.md.
4
+ # In a checkout the entry point is bin/ppn.mjs; installed from npm it is dist/bin.js —
5
+ # the tarball ships no bin/. Every service launcher had the checkout path hardcoded, which
6
+ # broke every custom_process on an npm install, silently: zombienet does not gate a spawn
7
+ # on its custom processes, so the network came up with cores unassigned and no services.
8
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
+ ENTRY="$ROOT/bin/ppn.mjs"
10
+ [[ -f "$ENTRY" ]] || ENTRY="$ROOT/dist/bin.js"
11
+ exec node "$ENTRY" service patch-bootnodes
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # zombienet's custom_processes spawns a command path, so this launcher has to exist.
3
+ # What it used to decide now lives in `ppn service pin-bulletin-products` — see docs/ARCHITECTURE.md.
4
+ # In a checkout the entry point is bin/ppn.mjs; installed from npm it is dist/bin.js —
5
+ # the tarball ships no bin/. Every service launcher had the checkout path hardcoded, which
6
+ # broke every custom_process on an npm install, silently: zombienet does not gate a spawn
7
+ # on its custom processes, so the network came up with cores unassigned and no services.
8
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
+ ENTRY="$ROOT/bin/ppn.mjs"
10
+ [[ -f "$ENTRY" ]] || ENTRY="$ROOT/dist/bin.js"
11
+ exec node "$ENTRY" service pin-bulletin-products
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env bash
2
+ # Pins Proof of Ink design families to the local IPFS node.
3
+ #
4
+ # CID encoding (matches proof-of-ink fixtures.ts):
5
+ # .json → blake2b-256 + json codec (0x0200)
6
+ # .js → blake2b-256 + raw codec (0x0055)
7
+ # dirs → UnixFS (dag-pb + sha2-256)
8
+
9
+ set -euo pipefail
10
+
11
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
+ PROJECT_DIR="$SCRIPT_DIR/.."
13
+ source "$SCRIPT_DIR/lib/workspace.sh"
14
+ BIN_DIR="$PPN_WS_BIN"
15
+
16
+ source "$PROJECT_DIR/config/ports.env"
17
+
18
+ export IPFS_PATH="${IPFS_PATH:-$BIN_DIR/.ipfs}"
19
+ export PATH="$BIN_DIR:$PATH"
20
+
21
+ DESIGN_FAMILIES_DIR="${DESIGN_FAMILIES_DIR:-$PPN_WS/design-families}"
22
+
23
+ # Max block size for standard bitswap (1MB)
24
+ MAX_BLOCK_SIZE=1048576
25
+
26
+ GREEN='\033[0;32m'
27
+ RED='\033[0;31m'
28
+ YELLOW='\033[1;33m'
29
+ NC='\033[0m'
30
+
31
+ # --- Sanity checks ---
32
+
33
+ if ! command -v ipfs &>/dev/null; then
34
+ echo -e "${RED}Error: ipfs not found in PATH${NC}"
35
+ exit 1
36
+ fi
37
+
38
+ MAX_RETRIES=30
39
+ RETRY_INTERVAL=10
40
+ # Probe the daemon's API socket, not `ipfs id`. `ipfs id` also succeeds in offline mode,
41
+ # opening the repo directly, so it returns true before the daemon exists. Every pin below
42
+ # then runs offline, takes bin/.ipfs/repo.lock, and collides the moment ipfs-daemon starts:
43
+ # Error: lock .../repo.lock: someone else has the lock
44
+ # which shows up as a run that pins a handful of files and fails all the rest.
45
+ # --api on every call below, so none of them can silently fall back to offline mode.
46
+ IPFS_API="/ip4/127.0.0.1/tcp/${IPFS_API_PORT}"
47
+ echo "Waiting for IPFS daemon to be ready..."
48
+ for i in $(seq 1 "$MAX_RETRIES"); do
49
+ if curl -sS --fail --max-time 5 -X POST "http://127.0.0.1:${IPFS_API_PORT}/api/v0/id" &>/dev/null; then
50
+ break
51
+ fi
52
+ if [ "$i" -eq "$MAX_RETRIES" ]; then
53
+ echo -e "${RED}Error: IPFS daemon not ready after $((MAX_RETRIES * RETRY_INTERVAL))s${NC}"
54
+ exit 1
55
+ fi
56
+ echo " Attempt $i/$MAX_RETRIES — retrying in ${RETRY_INTERVAL}s..."
57
+ sleep "$RETRY_INTERVAL"
58
+ done
59
+
60
+ if [ ! -d "$DESIGN_FAMILIES_DIR" ]; then
61
+ echo -e "${RED}Error: Design families directory not found: $DESIGN_FAMILIES_DIR${NC}"
62
+ exit 1
63
+ fi
64
+
65
+ echo -e "${GREEN}IPFS daemon is running${NC}"
66
+ echo "Pinning design families from $DESIGN_FAMILIES_DIR"
67
+ echo ""
68
+
69
+ # Cross-platform file size
70
+ get_file_size() {
71
+ if stat --version &>/dev/null 2>&1; then
72
+ stat -c%s "$1" 2>/dev/null
73
+ else
74
+ stat -f%z "$1" 2>/dev/null
75
+ fi
76
+ }
77
+
78
+ format_size() {
79
+ local size=$1
80
+ if [ "$size" -ge 1048576 ]; then echo "$((size / 1048576))MB"
81
+ elif [ "$size" -ge 1024 ]; then echo "$((size / 1024))KB"
82
+ else echo "${size}B"
83
+ fi
84
+ }
85
+
86
+ PASSED=0
87
+ FAILED=0
88
+ SKIPPED=0
89
+
90
+ # --- Pin individual files (blake2b-256) ---
91
+
92
+ for file in "$DESIGN_FAMILIES_DIR"/*; do
93
+ [ -f "$file" ] || continue
94
+
95
+ filename=$(basename "$file")
96
+ filesize=$(get_file_size "$file")
97
+
98
+ if [[ "$filename" == *.json ]]; then
99
+ codec_flag="--cid-codec=json"
100
+ elif [[ "$filename" == *.js ]]; then
101
+ codec_flag="--cid-codec=raw"
102
+ else
103
+ continue
104
+ fi
105
+
106
+ if [ -n "$filesize" ] && [ "$filesize" -gt "$MAX_BLOCK_SIZE" ]; then
107
+ echo -e " ${YELLOW}⊘${NC} $filename ($(format_size "$filesize") > 1MB limit)"
108
+ SKIPPED=$((SKIPPED + 1))
109
+ continue
110
+ fi
111
+
112
+ if cid=$(ipfs --api "$IPFS_API" block put --pin --mhtype=blake2b-256 $codec_flag "$file" 2>&1); then
113
+ echo -e " ${GREEN}✓${NC} $filename → $cid"
114
+ PASSED=$((PASSED + 1))
115
+ else
116
+ echo -e " ${RED}✗${NC} $filename — $cid"
117
+ FAILED=$((FAILED + 1))
118
+ fi
119
+ done
120
+
121
+ # --- Pin directories (UnixFS dag-pb + sha2-256) ---
122
+
123
+ for dir in "$DESIGN_FAMILIES_DIR"/*; do
124
+ [ -d "$dir" ] || continue
125
+ dirname=$(basename "$dir")
126
+ [[ "$dirname" == .* ]] && continue
127
+
128
+ if cid=$(ipfs --api "$IPFS_API" add -r -Q --pin "$dir" 2>&1); then
129
+ echo -e " ${GREEN}✓${NC} $dirname/ → $cid"
130
+ PASSED=$((PASSED + 1))
131
+ else
132
+ echo -e " ${RED}✗${NC} $dirname/ — $cid"
133
+ FAILED=$((FAILED + 1))
134
+ fi
135
+ done
136
+
137
+ # --- Summary ---
138
+
139
+ echo ""
140
+ echo "Done: $PASSED pinned, $FAILED failed, $SKIPPED skipped"
141
+
142
+ if [ "$FAILED" -gt 0 ]; then
143
+ exit 1
144
+ fi
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # zombienet's custom_processes spawns a command path, so this launcher has to exist.
3
+ # What it used to decide now lives in `ppn service set-dispatcher-address` — see docs/ARCHITECTURE.md.
4
+ # In a checkout the entry point is bin/ppn.mjs; installed from npm it is dist/bin.js —
5
+ # the tarball ships no bin/. Every service launcher had the checkout path hardcoded, which
6
+ # broke every custom_process on an npm install, silently: zombienet does not gate a spawn
7
+ # on its custom processes, so the network came up with cores unassigned and no services.
8
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
+ ENTRY="$ROOT/bin/ppn.mjs"
10
+ [[ -f "$ENTRY" ]] || ENTRY="$ROOT/dist/bin.js"
11
+ exec node "$ENTRY" service set-dispatcher-address
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # zombienet's custom_processes spawns a command path, so this launcher has to exist.
3
+ # What it used to decide now lives in `ppn service storage-provider-node` — see docs/ARCHITECTURE.md.
4
+ # In a checkout the entry point is bin/ppn.mjs; installed from npm it is dist/bin.js —
5
+ # the tarball ships no bin/. Every service launcher had the checkout path hardcoded, which
6
+ # broke every custom_process on an npm install, silently: zombienet does not gate a spawn
7
+ # on its custom processes, so the network came up with cores unassigned and no services.
8
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
+ ENTRY="$ROOT/bin/ppn.mjs"
10
+ [[ -f "$ENTRY" ]] || ENTRY="$ROOT/dist/bin.js"
11
+ exec node "$ENTRY" service storage-provider-node
@@ -0,0 +1,7 @@
1
+ var Ri=Object.defineProperty;var En=e=>{throw TypeError(e)};var Li=(e,t,r)=>t in e?Ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var me=(e,t,r)=>Li(e,typeof t!="symbol"?t+"":t,r),Ur=(e,t,r)=>t.has(e)||En("Cannot "+r);var l=(e,t,r)=>(Ur(e,t,"read from private field"),r?r.call(e):t.get(e)),M=(e,t,r)=>t.has(e)?En("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),C=(e,t,r,n)=>(Ur(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),I=(e,t,r)=>(Ur(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const Fn=!1;var In=Array.isArray,Pi=Array.prototype.indexOf,Or=Array.prototype.includes,Ir=Array.from,Di=Object.defineProperty,er=Object.getOwnPropertyDescriptor,Fi=Object.getOwnPropertyDescriptors,Ii=Object.prototype,ji=Array.prototype,jn=Object.getPrototypeOf,kn=Object.isExtensible;const $i=()=>{};function Hi(e){for(var t=0;t<e.length;t++)e[t]()}function $n(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}function dr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const se=2,It=4,jr=8,Hn=1<<24,Ie=16,Ne=32,Xe=64,Qr=128,Oe=512,ie=1024,te=2048,$e=4096,de=8192,Ce=16384,Bt=32768,Xr=1<<25,xt=65536,Cr=1<<17,Vi=1<<18,zt=1<<19,Ui=1<<20,Ue=1<<25,bt=65536,Mr=1<<21,Ct=1<<22,st=1<<23,xr=Symbol("$state"),qi=Symbol(""),br=Symbol("attributes"),en=Symbol("class"),Bi=Symbol("style"),Kt=Symbol("text"),Er=Symbol("form reset"),vr=new class extends Error{constructor(){super(...arguments);me(this,"name","StaleReactionError");me(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Vn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function zi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Yi(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Wi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Gi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Zi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ji(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function es(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ts=1,rs=2,Un=4,ns=8,is=16,ss=1,as=2,ne=Symbol("uninitialized"),os="http://www.w3.org/1999/xhtml";function ls(){console.warn("https://svelte.dev/e/derived_inert")}function fs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function qn(e){return e===this.v}function us(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Bn(e){return!us(e,this.v)}let cs=!1,oe=null;function jt(e){oe=e}function lt(e,t=!1,r){oe={p:oe,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function ft(e){var t=oe,r=t.e;if(r!==null){t.e=null;for(var n of r)ci(n)}return t.i=!0,oe=t.p,{}}function zn(){return!0}let ct=[];function Yn(){var e=ct;ct=[],Hi(e)}function Ze(e){if(ct.length===0&&!rr){var t=ct;queueMicrotask(()=>{t===ct&&Yn()})}ct.push(e)}function ds(){for(;ct.length>0;)Yn()}function Wn(e){var t=D;if(t===null)return R.f|=st,e;if((t.f&Bt)===0&&(t.f&It)===0)throw e;it(e,t)}function it(e,t){if(!(t!==null&&(t.f&Ce)!==0)){for(;t!==null;){if((t.f&Qr)!==0){if((t.f&Bt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}const vs=-7169;function G(e,t){e.f=e.f&vs|t}function vn(e){(e.f&Oe)!==0||e.deps===null?G(e,ie):G(e,$e)}function Gn(e){if(e!==null)for(const t of e)(t.f&se)===0||(t.f&bt)===0||(t.f^=bt,Gn(t.deps))}function Kn(e,t,r){(e.f&te)!==0?t.add(e):(e.f&$e)!==0&&r.add(e),Gn(e.deps),G(e,ie)}let Sn=!1;function hs(){Sn||(Sn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r[Er])==null||t.call(r)})},{capture:!0}))}function Yt(e){var t=R,r=D;Re(null),ze(null);try{return e()}finally{Re(t),ze(r)}}function ps(e,t,r,n=r){e.addEventListener(t,()=>Yt(r));const i=e[Er];i?e[Er]=()=>{i(),n(!0)}:e[Er]=()=>n(!0),hs()}function _s(e){let t=0,r=kt(0),n;return()=>{mn()&&(c(r),yn(()=>(t===0&&(n=_r(()=>e(()=>nr(r)))),t+=1,()=>{Ze(()=>{t-=1,t===0&&(n==null||n(),n=void 0,nr(r))})})))}}var gs=xt|zt;function ms(e,t,r,n){new ws(e,t,r,n)}var ke,dn,Se,ht,he,Te,ce,ye,Ye,pt,rt,Mt,or,lr,We,Pr,Y,ys,xs,tn,bs,rn,kr,Sr,nn,sn;class ws{constructor(t,r,n,i){M(this,Y);me(this,"parent");me(this,"is_pending",!1);me(this,"transform_error");M(this,ke);M(this,dn,null);M(this,Se);M(this,ht);M(this,he);M(this,Te,null);M(this,ce,null);M(this,ye,null);M(this,Ye,null);M(this,pt,0);M(this,rt,0);M(this,Mt,!1);M(this,or,new Set);M(this,lr,new Set);M(this,We,null);M(this,Pr,_s(()=>(C(this,We,kt(l(this,pt))),()=>{C(this,We,null)})));var s;C(this,ke,t),C(this,Se,r),C(this,ht,a=>{var f=D;f.b=this,f.f|=Qr,n(a)}),this.parent=D.b,this.transform_error=i??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),C(this,he,$r(()=>{I(this,Y,rn).call(this)},gs))}defer_effect(t){Kn(t,l(this,or),l(this,lr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!l(this,Se).pending}update_pending_count(t,r){I(this,Y,nn).call(this,t,r),C(this,pt,l(this,pt)+t),!(!l(this,We)||l(this,Mt))&&(C(this,Mt,!0),Ze(()=>{C(this,Mt,!1),l(this,We)&&$t(l(this,We),l(this,pt))}))}get_effect_pending(){return l(this,Pr).call(this),c(l(this,We))}error(t){if(!l(this,Se).onerror&&!l(this,Se).failed)throw t;E!=null&&E.is_fork?(l(this,Te)&&E.skip_effect(l(this,Te)),l(this,ce)&&E.skip_effect(l(this,ce)),l(this,ye)&&E.skip_effect(l(this,ye)),E.oncommit(()=>{I(this,Y,sn).call(this,t)})):I(this,Y,sn).call(this,t)}}ke=new WeakMap,dn=new WeakMap,Se=new WeakMap,ht=new WeakMap,he=new WeakMap,Te=new WeakMap,ce=new WeakMap,ye=new WeakMap,Ye=new WeakMap,pt=new WeakMap,rt=new WeakMap,Mt=new WeakMap,or=new WeakMap,lr=new WeakMap,We=new WeakMap,Pr=new WeakMap,Y=new WeakSet,ys=function(){try{C(this,Te,Ae(()=>l(this,ht).call(this,l(this,ke))))}catch(t){this.error(t)}},xs=function(t){const r=l(this,Se).failed,{reset:n,invoke_onerror:i}=I(this,Y,tn).call(this,t);Ze(i),r&&C(this,ye,Ae(()=>{r(l(this,ke),()=>t,()=>n)}))},tn=function(t){var r=!1,n=!1;const i=()=>{if(r){fs();return}r=!0,n&&es(),l(this,ye)!==null&&wt(l(this,ye),()=>{C(this,ye,null)}),I(this,Y,Sr).call(this,()=>{I(this,Y,rn).call(this)})};return{reset:i,invoke_onerror:()=>{var a,f;try{n=!0,(f=(a=l(this,Se)).onerror)==null||f.call(a,t,i),n=!1}catch(o){it(o,l(this,he)&&l(this,he).parent)}}}},bs=function(){const t=l(this,Se).pending;t&&(this.is_pending=!0,C(this,ce,Ae(()=>t(l(this,ke)))),Ze(()=>{var r=C(this,Ye,document.createDocumentFragment()),n=Qe();r.append(n),C(this,Te,I(this,Y,Sr).call(this,()=>Ae(()=>l(this,ht).call(this,n)))),l(this,rt)===0&&(l(this,ke).before(r),C(this,Ye,null),wt(l(this,ce),()=>{C(this,ce,null)}),I(this,Y,kr).call(this,E))}))},rn=function(){try{if(this.is_pending=this.has_pending_snippet(),C(this,rt,0),C(this,pt,0),C(this,Te,Ae(()=>{l(this,ht).call(this,l(this,ke))})),l(this,rt)>0){var t=C(this,Ye,document.createDocumentFragment());bn(l(this,Te),t);const r=l(this,Se).pending;C(this,ce,Ae(()=>r(l(this,ke))))}else I(this,Y,kr).call(this,E)}catch(r){this.error(r)}},kr=function(t){this.is_pending=!1,t.transfer_effects(l(this,or),l(this,lr))},Sr=function(t){var r=D,n=R,i=oe;ze(l(this,he)),Re(l(this,he)),jt(l(this,he).ctx);try{return Et.ensure(),t()}catch(s){return Wn(s),null}finally{ze(r),Re(n),jt(i)}},nn=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&I(n=this.parent,Y,nn).call(n,t,r);return}C(this,rt,l(this,rt)+t),l(this,rt)===0&&(I(this,Y,kr).call(this,r),l(this,ce)&&wt(l(this,ce),()=>{C(this,ce,null)}),l(this,Ye)&&(l(this,ke).before(l(this,Ye)),C(this,Ye,null)))},sn=function(t){l(this,Te)&&(ge(l(this,Te)),C(this,Te,null)),l(this,ce)&&(ge(l(this,ce)),C(this,ce,null)),l(this,ye)&&(ge(l(this,ye)),C(this,ye,null));let r=l(this,Se).failed;const n=i=>{const{reset:s,invoke_onerror:a}=I(this,Y,tn).call(this,i);a(),r&&C(this,ye,I(this,Y,Sr).call(this,()=>{try{return Ae(()=>{var f=D;f.b=this,f.f|=Qr,r(l(this,ke),()=>i,()=>s)})}catch(f){return it(f,l(this,he).parent),null}}))};Ze(()=>{var i;try{i=this.transform_error(t)}catch(s){it(s,l(this,he)&&l(this,he).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(n,s=>it(s,l(this,he)&&l(this,he).parent)):n(i)})};function Es(e,t,r,n){const i=hn;var s=e.filter(_=>!_.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var f=D,o=ks(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(_=>_.promise)):null;function v(_){if((f.f&Ce)===0){o();try{n([...a,..._])}catch(p){it(p,f)}Nr()}}var m=Zn();if(r.length===0){u.then(()=>v([])).finally(m);return}function d(){Promise.all(r.map(_=>Ss(_))).then(v).catch(_=>it(_,f)).finally(m)}u?u.then(()=>{o(),d(),Nr()}):d()}function ks(){var e=D,t=R,r=oe,n=E;return function(s=!0){ze(e),Re(t),jt(r),s&&(e.f&Ce)===0&&(n==null||n.activate(),n==null||n.apply())}}function Nr(e=!0){ze(null),Re(null),jt(null),e&&(E==null||E.deactivate())}function Zn(){var e=D,t=e.b,r=E,n=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,r),r.increment(n,e),()=>{t==null||t.update_pending_count(-1,r),r.decrement(n,e)}}function hn(e){var t=se|te;return D!==null&&(D.f|=zt),{ctx:oe,deps:null,effects:null,equals:qn,f:t,fn:e,reactions:null,rv:0,v:ne,wv:0,parent:D,ac:null}}const Zt=Symbol("obsolete");function Ss(e,t,r){let n=D;n===null&&zi();var i=void 0,s=kt(ne),a=!R,f=new Set;return Us(()=>{var _,p;var o=D,u=$n();i=u.promise;try{Promise.resolve(e()).then(u.resolve,g=>{g!==vr&&u.reject(g)}).finally(Nr)}catch(g){u.reject(g),Nr()}var v=E;if(a){if((o.f&Bt)!==0)var m=Zn();if((_=n.b)!=null&&_.is_rendered())(p=v.async_deriveds.get(o))==null||p.reject(Zt);else for(const g of f.values())g.reject(Zt);f.add(u),v.async_deriveds.set(o,u)}const d=(g,h=void 0)=>{m==null||m(),f.delete(u),h!==Zt&&(v.activate(),h?(s.f|=st,$t(s,h)):((s.f&st)!==0&&(s.f^=st),$t(s,g)),v.deactivate())};u.promise.then(d,g=>d(null,g||"unknown"))}),ui(()=>{for(const o of f)o.reject(Zt)}),new Promise(o=>{function u(v){function m(){v===i?o(s):u(i)}v.then(m,m)}u(i)})}function X(e){const t=hn(e);return _i(t),t}function Ts(e){const t=hn(e);return t.equals=Bn,t}function As(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}function pn(e){var t,r=D,n=e.parent;if(!at&&n!==null&&e.v!==ne&&(n.f&(Ce|de))!==0)return ls(),e.v;ze(n);try{e.f&=~bt,As(e),t=yi(e)}finally{ze(r)}return t}function Jn(e){var t=pn(e);if(!e.equals(t)&&(e.wv=mi(),(!(E!=null&&E.is_fork)||e.deps===null)&&(E!==null?(E.capture(e,t,!0),tr==null||tr.capture(e,t,!0)):e.v=t,e.deps===null))){G(e,ie);return}at||(ae!==null?(mn()||E!=null&&E.is_fork)&&ae.set(e,t):vn(e))}function Os(e){var t;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),r.ac!==null&&Yt(()=>{r.ac.abort(vr),r.ac=null}),r.fn!==null&&(r.teardown=$i),ir(r,0),xn(r))}function Qn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Vt(t)}let qr=null,Tt=null,E=null,tr=null,ae=null,an=null,rr=!1,Br=!1,Ot=null,Tr=null;var Tn=0;let Cs=1;var Nt,nt,_t,Rt,Lt,Pt,Ge,Dt,pe,fr,Ke,De,He,Ft,gt,V,on,Jt,ln,Xn,ei,At,Ms,Qt;const Dr=class Dr{constructor(){M(this,V);me(this,"id",Cs++);M(this,Nt,!1);me(this,"linked",!0);M(this,nt,null);M(this,_t,null);me(this,"async_deriveds",new Map);me(this,"current",new Map);me(this,"previous",new Map);M(this,Rt,new Set);M(this,Lt,new Set);M(this,Pt,0);M(this,Ge,new Map);M(this,Dt,null);M(this,pe,[]);M(this,fr,[]);M(this,Ke,new Set);M(this,De,new Set);M(this,He,new Map);M(this,Ft,new Set);me(this,"is_fork",!1);M(this,gt,!1);Tt===null?qr=Tt=this:(C(Tt,_t,this),C(this,nt,Tt)),Tt=this}skip_effect(t){l(this,He).has(t)||l(this,He).set(t,{d:[],m:[]}),l(this,Ft).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=l(this,He).get(t);if(n){l(this,He).delete(t);for(var i of n.d)G(i,te),r(i);for(i of n.m)G(i,$e),r(i)}l(this,Ft).add(t)}capture(t,r,n=!1){t.v!==ne&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&st)===0&&(this.current.set(t,[r,n]),ae==null||ae.set(t,r)),this.is_fork||(t.v=r)}activate(){E=this}deactivate(){E=null,ae=null}flush(){try{Br=!0,E=this,I(this,V,Jt).call(this)}finally{Tn=0,an=null,Ot=null,Tr=null,Br=!1,E=null,ae=null,qe.clear()}}discard(){var t;for(const r of l(this,Lt))r(this);l(this,Lt).clear();for(const r of this.async_deriveds.values())r.reject(Zt);I(this,V,Qt).call(this),(t=l(this,Dt))==null||t.resolve()}register_created_effect(t){l(this,fr).push(t)}increment(t,r){if(C(this,Pt,l(this,Pt)+1),t){let n=l(this,Ge).get(r)??0;l(this,Ge).set(r,n+1)}}decrement(t,r){if(C(this,Pt,l(this,Pt)-1),t){let n=l(this,Ge).get(r)??0;n===1?l(this,Ge).delete(r):l(this,Ge).set(r,n-1)}l(this,gt)||(C(this,gt,!0),Ze(()=>{C(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)l(this,Ke).add(n);for(const n of r)l(this,De).add(n);t.clear(),r.clear()}oncommit(t){l(this,Rt).add(t)}ondiscard(t){l(this,Lt).add(t)}settled(){return(l(this,Dt)??C(this,Dt,$n())).promise}static ensure(){if(E===null){const t=E=new Dr;!Br&&!rr&&Ze(()=>{l(t,Nt)||t.flush()})}return E}apply(){{ae=null;return}}schedule(t){var i;if(an=t,(i=t.b)!=null&&i.is_pending&&(t.f&(It|jr|Hn))!==0&&(t.f&Bt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Ot!==null&&r===D&&(R===null||(R.f&se)===0))return;if((n&(Xe|Ne))!==0){if((n&ie)===0)return;r.f^=ie}}l(this,pe).push(r)}};Nt=new WeakMap,nt=new WeakMap,_t=new WeakMap,Rt=new WeakMap,Lt=new WeakMap,Pt=new WeakMap,Ge=new WeakMap,Dt=new WeakMap,pe=new WeakMap,fr=new WeakMap,Ke=new WeakMap,De=new WeakMap,He=new WeakMap,Ft=new WeakMap,gt=new WeakMap,V=new WeakSet,on=function(){if(this.is_fork)return!0;for(const n of l(this,Ge).keys()){for(var t=n,r=!1;t.parent!==null;){if(l(this,He).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Jt=function(){var o,u,v,m;C(this,Nt,!0),Tn++>1e3&&(I(this,V,Qt).call(this),Rs());for(const d of l(this,Ke))l(this,De).delete(d),G(d,te),this.schedule(d);for(const d of l(this,De))G(d,$e),this.schedule(d);const t=l(this,pe);C(this,pe,[]),this.apply();var r=Ot=[],n=[],i=Tr=[];for(const d of t)try{I(this,V,ln).call(this,d,r,n)}catch(_){throw ni(d),I(this,V,on).call(this)||this.discard(),_}if(E=null,i.length>0){var s=Dr.ensure();for(const d of i)s.schedule(d)}if(Ot=null,Tr=null,I(this,V,on).call(this)){I(this,V,At).call(this,n),I(this,V,At).call(this,r);for(const[d,_]of l(this,He))ri(d,_);i.length>0&&I(o=E,V,Jt).call(o);return}const a=I(this,V,Xn).call(this);if(a){I(this,V,At).call(this,n),I(this,V,At).call(this,r),I(u=a,V,ei).call(u,this);return}l(this,Ke).clear(),l(this,De).clear();for(const d of l(this,Rt))d(this);l(this,Rt).clear(),tr=this,An(n),An(r),tr=null,(v=l(this,Dt))==null||v.resolve();var f=E;if(l(this,Pt)===0&&(l(this,pe).length===0||f!==null)&&I(this,V,Qt).call(this),l(this,pe).length>0)if(f!==null){const d=f;l(d,pe).push(...l(this,pe).filter(_=>!l(d,pe).includes(_)))}else f=this;f!==null&&(qe.clear(),I(m=f,V,Jt).call(m))},ln=function(t,r,n){t.f^=ie;for(var i=t.first;i!==null;){var s=i.f,a=(s&(Ne|Xe))!==0,f=a&&(s&ie)!==0,o=f||(s&de)!==0||l(this,He).has(i);if(!o&&i.fn!==null){a?i.f^=ie:(s&It)!==0?r.push(i):pr(i)&&((s&Ie)!==0&&l(this,De).add(i),Vt(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},Xn=function(){for(var t=l(this,nt);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=l(t,nt)}return null},ei=function(t){var n;for(const[i,s]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,s);for(const[i,s]of t.async_deriveds){const a=this.async_deriveds.get(i);a&&s.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(l(t,Ke),l(t,De));const r=i=>{var s=i.reactions;if(s!==null&&!((i.f&se)!==0&&(i.f&(te|$e))===0))for(const o of s){var a=o.f;if((a&se)!==0)r(o);else{var f=o;a&(Ct|Ie)&&!this.async_deriveds.has(f)&&(l(this,De).delete(f),G(f,te),this.schedule(f))}}};for(const i of this.current.keys())r(i);this.oncommit(()=>t.discard()),I(n=t,V,Qt).call(n),E=this,I(this,V,Jt).call(this)},At=function(t){for(var r=0;r<t.length;r+=1)Kn(t[r],l(this,Ke),l(this,De))},Ms=function(){var m;for(let d=qr;d!==null;d=l(d,_t)){var t=d.id<this.id,r=[];for(const[_,[p,g]]of this.current){if(d.current.has(_)){var n=d.current.get(_)[0];if(t&&p!==n)d.current.set(_,[p,g]);else continue}r.push(_)}if(t)for(const[_,p]of this.async_deriveds){const g=d.async_deriveds.get(_);g&&p.promise.then(g.resolve).catch(g.reject)}var i=[...d.current.keys()].filter(_=>!d.current.get(_)[1]);if(!(!l(d,Nt)||i.length===0)){var s=i.filter(_=>!this.current.has(_));if(s.length===0)t&&d.discard();else if(r.length>0){if(t)for(const _ of l(this,Ft))d.unskip_effect(_,p=>{var g;(p.f&(Ie|Ct))!==0?d.schedule(p):I(g=d,V,At).call(g,[p])});d.activate();var a=new Set,f=new Map;for(var o of r)ti(o,s,a,f);f=new Map;var u=[...d.current].filter(([_,p])=>{const g=this.current.get(_);return g?g[0]!==p[0]||g[1]!==p[1]:!0}).map(([_])=>_);if(u.length>0)for(const _ of l(this,fr))(_.f&(Ce|de|Cr))===0&&_n(_,u,f)&&((_.f&(Ct|Ie))!==0?(G(_,te),d.schedule(_)):l(d,Ke).add(_));if(l(d,pe).length>0&&!l(d,gt)){d.apply();for(var v of l(d,pe))I(m=d,V,ln).call(m,v,[],[]);C(d,pe,[])}d.deactivate()}}}},Qt=function(){if(this.linked){var t=l(this,nt),r=l(this,_t);t===null?qr=r:C(t,_t,r),r===null?Tt=t:C(r,nt,t),this.linked=!1}};let Et=Dr;function Ns(e){var t=rr;rr=!0;try{for(var r;;){if(ds(),E===null)return r;E.flush()}}finally{rr=t}}function Rs(){try{Zi()}catch(e){it(e,an)}}let Pe=null;function An(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Ce|de))===0&&pr(n)&&(Pe=new Set,Vt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&vi(n),(Pe==null?void 0:Pe.size)>0)){qe.clear();for(const i of Pe){if((i.f&(Ce|de))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Pe.has(a)&&(Pe.delete(a),s.push(a)),a=a.parent;for(let f=s.length-1;f>=0;f--){const o=s[f];(o.f&(Ce|de))===0&&Vt(o)}}Pe.clear()}}Pe=null}}function ti(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&se)!==0?ti(i,t,r,n):(s&(Ct|Ie))!==0&&(s&te)===0&&_n(i,t,n)&&(G(i,te),gn(i))}}function _n(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Or.call(t,i))return!0;if((i.f&se)!==0&&_n(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function gn(e){E.schedule(e)}function ri(e,t){if(!((e.f&Ne)!==0&&(e.f&ie)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),G(e,ie);for(var r=e.first;r!==null;)ri(r,t),r=r.next}}function ni(e){G(e,ie);for(var t=e.first;t!==null;)ni(t),t=t.next}let Rr=new Set;const qe=new Map;let ii=!1;function kt(e,t){var r={f:0,v:e,reactions:null,equals:qn,rv:0,wv:0};return r}function Z(e,t){const r=kt(e);return _i(r),r}function Ls(e,t=!1,r=!0){const n=kt(e);return t||(n.equals=Bn),n}function B(e,t,r=!1){R!==null&&(!je||(R.f&Cr)!==0)&&zn()&&(R.f&(se|Ie|Ct|Cr))!==0&&(Be===null||!Be.has(e))&&Xi();let n=r?Je(t):t;return $t(e,n,Tr)}function $t(e,t,r=null){if(!e.equals(t)){at?qe.set(e,t):qe.has(e)||qe.set(e,e.v);var n=Et.ensure();if(n.capture(e,t),(e.f&se)!==0){const i=e;(e.f&te)!==0&&pn(i),ae===null&&vn(i)}e.wv=mi(),si(e,te,r),D!==null&&(D.f&ie)!==0&&(D.f&(Ne|Xe))===0&&(Ee===null?zs([e]):Ee.push(e)),!n.is_fork&&Rr.size>0&&!ii&&Ps()}return t}function Ps(){ii=!1;for(const e of Rr){(e.f&ie)!==0&&G(e,$e);let t;try{t=pr(e)}catch{t=!0}t&&Vt(e)}Rr.clear()}function nr(e){B(e,e.v+1)}function si(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var a=n[s],f=a.f,o=(f&te)===0;if(o&&G(a,t),(f&Cr)!==0)Rr.add(a);else if((f&se)!==0){var u=a;ae==null||ae.delete(u),(f&bt)===0&&(f&Oe&&(D===null||(D.f&Mr)===0)&&(a.f|=bt),si(u,$e,r))}else if(o){var v=a;(f&Ie)!==0&&Pe!==null&&Pe.add(v),r!==null?r.push(v):gn(v)}}}function Je(e){if(typeof e!="object"||e===null||xr in e)return e;const t=jn(e);if(t!==Ii&&t!==ji)return e;var r=new Map,n=In(e),i=Z(0),s=yt,a=f=>{if(yt===s)return f();var o=R,u=yt;Re(null),Mn(s);var v=f();return Re(o),Mn(u),v};return n&&r.set("length",Z(e.length)),new Proxy(e,{defineProperty(f,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ji();var v=r.get(o);return v===void 0?a(()=>{var m=Z(u.value);return r.set(o,m),m}):B(v,u.value,!0),!0},deleteProperty(f,o){var u=r.get(o);if(u===void 0){if(o in f){const v=a(()=>Z(ne));r.set(o,v),nr(i)}}else B(u,ne),nr(i);return!0},get(f,o,u){var _;if(o===xr)return e;var v=r.get(o),m=o in f;if(v===void 0&&(!m||(_=er(f,o))!=null&&_.writable)&&(v=a(()=>{var p=Je(m?f[o]:ne),g=Z(p);return g}),r.set(o,v)),v!==void 0){var d=c(v);return d===ne?void 0:d}return Reflect.get(f,o,u)},getOwnPropertyDescriptor(f,o){var u=Reflect.getOwnPropertyDescriptor(f,o);if(u&&"value"in u){var v=r.get(o);v&&(u.value=c(v))}else if(u===void 0){var m=r.get(o),d=m==null?void 0:m.v;if(m!==void 0&&d!==ne)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(f,o){var d;if(o===xr)return!0;var u=r.get(o),v=u!==void 0&&u.v!==ne||Reflect.has(f,o);if(u!==void 0||D!==null&&(!v||(d=er(f,o))!=null&&d.writable)){u===void 0&&(u=a(()=>{var _=v?Je(f[o]):ne,p=Z(_);return p}),r.set(o,u));var m=c(u);if(m===ne)return!1}return v},set(f,o,u,v){var T;var m=r.get(o),d=o in f;if(n&&o==="length")for(var _=u;_<m.v;_+=1){var p=r.get(_+"");p!==void 0?B(p,ne):_ in f&&(p=a(()=>Z(ne)),r.set(_+"",p))}if(m===void 0)(!d||(T=er(f,o))!=null&&T.writable)&&(m=a(()=>Z(void 0)),B(m,Je(u)),r.set(o,m));else{d=m.v!==ne;var g=a(()=>Je(u));B(m,g)}var h=Reflect.getOwnPropertyDescriptor(f,o);if(h!=null&&h.set&&h.set.call(v,u),!d){if(n&&typeof o=="string"){var w=r.get("length"),N=Number(o);Number.isInteger(N)&&N>=w.v&&B(w,N+1)}nr(i)}return!0},ownKeys(f){c(i);var o=Reflect.ownKeys(f).filter(m=>{var d=r.get(m);return d===void 0||d.v!==ne});for(var[u,v]of r)v.v!==ne&&!(u in f)&&o.push(u);return o},setPrototypeOf(){Qi()}})}var On,ai,oi,li;function Ds(){if(On===void 0){On=window,ai=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;oi=er(t,"firstChild").get,li=er(t,"nextSibling").get,kn(e)&&(e[en]=void 0,e[br]=null,e[Bi]=void 0,e.__e=void 0),kn(r)&&(r[Kt]=void 0)}}function Qe(e=""){return document.createTextNode(e)}function Ht(e){return oi.call(e)}function hr(e){return li.call(e)}function x(e,t){return Ht(e)}function fe(e,t=!1){{var r=Ht(e);return r instanceof Comment&&r.data===""?hr(r):r}}function P(e,t=1,r=!1){let n=e;for(;t--;)n=hr(n);return n}function Fs(e){e.textContent=""}function fi(){return!1}function Is(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function js(e){D===null&&(R===null&&Ki(),Gi()),at&&Wi()}function $s(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function et(e,t){var r=D;r!==null&&(r.f&de)!==0&&(e|=de);var n={ctx:oe,deps:null,nodes:null,f:e|te|Oe,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};E==null||E.register_created_effect(n);var i=n;if((e&It)!==0)Ot!==null?Ot.push(n):Et.ensure().schedule(n);else if(t!==null){try{Vt(n)}catch(a){throw ge(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&zt)===0&&(i=i.first,(e&Ie)!==0&&(e&xt)!==0&&i!==null&&(i.f|=xt))}if(i!==null&&(i.parent=r,r!==null&&$s(i,r),R!==null&&(R.f&se)!==0&&(e&Xe)===0)){var s=R;(s.effects??(s.effects=[])).push(i)}return n}function mn(){return R!==null&&!je}function ui(e){const t=et(jr,null);return G(t,ie),t.teardown=e,t}function wn(e){js();var t=D.f,r=!R&&(t&Ne)!==0&&oe!==null&&!oe.i;if(r){var n=oe;(n.e??(n.e=[])).push(e)}else return ci(e)}function ci(e){return et(It|Ui,e)}function Hs(e){Et.ensure();const t=et(Xe|zt,e);return(r={})=>new Promise(n=>{r.outro?wt(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Vs(e){return et(It,e)}function Us(e){return et(Ct|zt,e)}function yn(e,t=0){return et(jr|t,e)}function z(e,t=[],r=[],n=[]){Es(n,t,r,i=>{et(jr,()=>{e(...i.map(c))})})}function $r(e,t=0){var r=et(Ie|t,e);return r}function Ae(e){return et(Ne|zt,e)}function di(e){var t=e.teardown;if(t!==null){const r=at,n=R;Cn(!0),Re(null);try{t.call(null)}finally{Cn(r),Re(n)}}}function xn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Yt(()=>{i.abort(vr)});var n=r.next;(r.f&Xe)!==0?r.parent=null:ge(r,t),r=n}}function qs(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Ne)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&Vi)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Bs(e.nodes.start,e.nodes.end),r=!0),e.f|=Xr,xn(e,t&&!r),ir(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();di(e),e.f^=Xr,e.f|=Ce;var i=e.parent;i!==null&&i.first!==null&&vi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Bs(e,t){for(;e!==null;){var r=e===t?null:hr(e);e.remove(),e=r}}function vi(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function wt(e,t,r=!0){var n=[];hi(e,n,!0);var i=()=>{r&&ge(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var f of n)f.out(a)}else i()}function hi(e,t,r){if((e.f&de)===0){e.f^=de;var n=e.nodes&&e.nodes.t;if(n!==null)for(const f of n)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var s=i.next;if((i.f&Xe)===0){var a=(i.f&xt)!==0||(i.f&Ne)!==0&&(e.f&Ie)!==0;hi(i,t,a?r:!1)}i=s}}}function Lr(e){pi(e,!0)}function pi(e,t){if((e.f&de)!==0){e.f^=de,(e.f&ie)===0&&(G(e,te),Et.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&xt)!==0||(r.f&Ne)!==0;pi(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function bn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:hr(r);t.append(r),r=i}}let Ar=!1,at=!1;function Cn(e){at=e}let R=null,je=!1;function Re(e){R=e}let D=null;function ze(e){D=e}let Be=null;function _i(e){R!==null&&(Be??(Be=new Set)).add(e)}let _e=null,we=0,Ee=null;function zs(e){Ee=e}let gi=1,dt=0,yt=dt;function Mn(e){yt=e}function mi(){return++gi}function pr(e){var t=e.f;if((t&te)!==0)return!0;if(t&se&&(e.f&=~bt),(t&$e)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(pr(s)&&Jn(s),s.wv>e.wv)return!0}(t&Oe)!==0&&ae===null&&G(e,ie)}return!1}function wi(e,t,r=!0){var n=e.reactions;if(n!==null&&!(Be!==null&&Be.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&se)!==0?wi(s,t,!1):t===s&&(r?G(s,te):(s.f&ie)!==0&&G(s,$e),gn(s))}}function yi(e){var g;var t=_e,r=we,n=Ee,i=R,s=Be,a=oe,f=je,o=yt,u=e.f;_e=null,we=0,Ee=null,R=(u&(Ne|Xe))===0?e:null,Be=null,jt(e.ctx),je=!1,yt=++dt,e.ac!==null&&(Yt(()=>{e.ac.abort(vr)}),e.ac=null);try{e.f|=Mr;var v=e.fn,m=v();e.f|=Bt;var d=e.deps,_=E==null?void 0:E.is_fork;if(_e!==null){var p;if(_||ir(e,we),d!==null&&we>0)for(d.length=we+_e.length,p=0;p<_e.length;p++)d[we+p]=_e[p];else e.deps=d=_e;if(mn()&&(e.f&Oe)!==0)for(p=we;p<d.length;p++)((g=d[p]).reactions??(g.reactions=[])).push(e)}else!_&&d!==null&&we<d.length&&(ir(e,we),d.length=we);if(zn()&&Ee!==null&&!je&&d!==null&&(e.f&(se|$e|te))===0)for(p=0;p<Ee.length;p++)wi(Ee[p],e);if(i!==null&&i!==e){if(dt++,i.deps!==null)for(let h=0;h<r;h+=1)i.deps[h].rv=dt;if(t!==null)for(const h of t)h.rv=dt;Ee!==null&&(n===null?n=Ee:n.push(...Ee))}return(e.f&st)!==0&&(e.f^=st),m}catch(h){return Wn(h)}finally{e.f^=Mr,_e=t,we=r,Ee=n,R=i,Be=s,jt(a),je=f,yt=o}}function Ys(e,t){let r=t.reactions;if(r!==null){var n=Pi.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&se)!==0&&(_e===null||!Or.call(_e,t))){var s=t;(s.f&Oe)!==0&&(s.f^=Oe,s.f&=~bt),s.v!==ne&&vn(s),s.ac!==null&&Yt(()=>{s.ac.abort(vr),s.ac=null,G(s,te)}),Os(s),ir(s,0)}}function ir(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ys(e,r[n])}function Vt(e){var t=e.f;if((t&Ce)===0){G(e,ie);var r=D,n=Ar;D=e,Ar=(t&(Ne|Xe))===0;try{(t&(Ie|Hn))!==0?qs(e):xn(e),di(e);var i=yi(e);e.teardown=typeof i=="function"?i:null,e.wv=gi;var s;Fn&&cs&&(e.f&te)!==0&&e.deps}finally{Ar=n,D=r}}}async function Ws(){await Promise.resolve(),Ns()}function c(e){var t=e.f,r=(t&se)!==0;if(R!==null&&!je){var n=D!==null&&(D.f&Ce)!==0;if(!n&&(Be===null||!Be.has(e))){var i=R.deps;if((R.f&Mr)!==0)e.rv<dt&&(e.rv=dt,_e===null&&i!==null&&i[we]===e?we++:_e===null?_e=[e]:_e.push(e));else{R.deps??(R.deps=[]),Or.call(R.deps,e)||R.deps.push(e);var s=e.reactions;s===null?e.reactions=[R]:Or.call(s,R)||s.push(R)}}}if(at&&qe.has(e))return qe.get(e);if(r){var a=e;if(at){var f=a.v;return((a.f&ie)===0&&a.reactions!==null||bi(a))&&(f=pn(a)),qe.set(a,f),f}var o=(a.f&Oe)===0&&!je&&R!==null&&(Ar||(R.f&Oe)!==0),u=(a.f&Bt)===0;pr(a)&&(o&&(a.f|=Oe),Jn(a)),o&&!u&&(Qn(a),xi(a))}if(ae!=null&&ae.has(e))return ae.get(e);if((e.f&st)!==0)throw e.v;return e.v}function xi(e){if(e.f|=Oe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&se)!==0&&(t.f&Oe)===0&&(Qn(t),xi(t))}function bi(e){if(e.v===ne)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(qe.has(t)||(t.f&se)!==0&&bi(t))return!0;return!1}function _r(e){var t=je;try{return je=!0,e()}finally{je=t}}const Gs=["touchstart","touchmove"];function Ks(e){return Gs.includes(e)}const vt=Symbol("events"),Ei=new Set,fn=new Set;function Zs(e,t,r,n={}){function i(s){if(n.capture||un.call(t,s),!s.cancelBubble)return Yt(()=>r==null?void 0:r.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ze(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function wr(e,t,r,n,i){var s={capture:n,passive:i},a=Zs(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ui(()=>{t.removeEventListener(e,a,s)})}function Ut(e,t,r){(t[vt]??(t[vt]={}))[e]=r}function gr(e){for(var t=0;t<e.length;t++)Ei.add(e[t]);for(var r of fn)r(e)}let zr=null,Yr=!1;function un(e){var g,h;var t=this,r=t.ownerDocument,n=e.type,i=((g=e.composedPath)==null?void 0:g.call(e))||[],s=i[0]||e.target;zr=e,Yr||(Yr=!0,setTimeout(()=>{Yr=!1,zr=null}));var a=0,f=zr===e&&e[vt];if(f){var o=i.indexOf(f);if(o!==-1&&(t===document||t===window)){e[vt]=t;return}var u=i.indexOf(t);if(u===-1)return;o<=u&&(a=o)}if(s=i[a]||e.target,s!==t){Di(e,"currentTarget",{configurable:!0,get(){return s||r}});var v=R,m=D;Re(null),ze(null);try{for(var d,_=[];s!==null&&s!==t;){try{var p=(h=s[vt])==null?void 0:h[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(w){d?_.push(w):d=w}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let w of _)queueMicrotask(()=>{throw w});throw d}}finally{e[vt]=t,delete e.currentTarget,Re(v),ze(m)}}}var Pn;const Wr=((Pn=globalThis==null?void 0:globalThis.window)==null?void 0:Pn.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Js(e){return(Wr==null?void 0:Wr.createHTML(e))??e}function ki(e){var t=Is("template");return t.innerHTML=Js(e.replaceAll("<!>","<!---->")),t.content}function sr(e,t){var r=D;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var r=(t&ss)!==0,n=(t&as)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=ki(s?e:"<!>"+e),r||(i=Ht(i)));var a=n||ai?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=Ht(a),o=a.lastChild;sr(f,o)}else sr(a,a);return a}}function Qs(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,s;return()=>{if(!s){var a=ki(i),f=Ht(a);s=Ht(f)}var o=s.cloneNode(!0);return sr(o,o),o}}function Si(e,t){return Qs(e,t,"svg")}function Xs(e=""){{var t=Qe(e+"");return sr(t,t),t}}function ot(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Qe();return e.append(t,r),sr(t,r),e}function S(e,t){e!==null&&e.before(t)}function $(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Kt]??(e[Kt]=e.nodeValue))&&(e[Kt]=r,e.nodeValue=`${r}`)}function ea(e,t){return ta(e,t)}const yr=new Map;function ta(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:f}){Ds();var o=void 0,u=Hs(()=>{var v=r??t.appendChild(Qe());ms(v,{pending:()=>{}},_=>{lt({});var p=oe;s&&(p.c=s),i&&(n.$$events=i),o=e(_,n)||{},ft()},f);var m=new Set,d=_=>{for(var p=0;p<_.length;p++){var g=_[p];if(!m.has(g)){m.add(g);var h=Ks(g);for(const T of[t,document]){var w=yr.get(T);w===void 0&&(w=new Map,yr.set(T,w));var N=w.get(g);N===void 0?(T.addEventListener(g,un,{passive:h}),w.set(g,1)):w.set(g,N+1)}}}};return d(Ir(Ei)),fn.add(d),()=>{var h;for(var _ of m)for(const w of[t,document]){var p=yr.get(w),g=p.get(_);--g==0?(w.removeEventListener(_,un),p.delete(_),p.size===0&&yr.delete(w)):p.set(_,g)}fn.delete(d),v!==r&&((h=v.parentNode)==null||h.removeChild(v))}});return ra.set(o,u),o}let ra=new WeakMap;var Fe,Ve,xe,mt,ur,cr,Fr;class Ti{constructor(t,r=!0){me(this,"anchor");M(this,Fe,new Map);M(this,Ve,new Map);M(this,xe,new Map);M(this,mt,new Set);M(this,ur,!0);M(this,cr,t=>{if(l(this,Fe).has(t)){var r=l(this,Fe).get(t),n=l(this,Ve).get(r);if(n)Lr(n),l(this,mt).delete(r);else{var i=l(this,xe).get(r);i&&(Lr(i.effect),l(this,Ve).set(r,i.effect),l(this,xe).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of l(this,Fe)){if(l(this,Fe).delete(s),s===t)break;const f=l(this,xe).get(a);f&&(ge(f.effect),l(this,xe).delete(a))}for(const[s,a]of l(this,Ve)){if(s===r||l(this,mt).has(s))continue;const f=()=>{if(Array.from(l(this,Fe).values()).includes(s)){var u=document.createDocumentFragment();bn(a,u),u.append(Qe()),l(this,xe).set(s,{effect:a,fragment:u})}else ge(a);l(this,mt).delete(s),l(this,Ve).delete(s)};l(this,ur)||!n?(l(this,mt).add(s),wt(a,f,!1)):f()}}});M(this,Fr,t=>{l(this,Fe).delete(t);const r=Array.from(l(this,Fe).values());for(const[n,i]of l(this,xe))r.includes(n)||(ge(i.effect),l(this,xe).delete(n))});this.anchor=t,C(this,ur,r)}ensure(t,r){var n=E,i=fi();if(r&&!l(this,Ve).has(t)&&!l(this,xe).has(t))if(i){var s=document.createDocumentFragment(),a=Qe();s.append(a),l(this,xe).set(t,{effect:Ae(()=>r(a)),fragment:s})}else l(this,Ve).set(t,Ae(()=>r(this.anchor)));if(l(this,Fe).set(n,t),i){for(const[f,o]of l(this,Ve))f===t?n.unskip_effect(o):n.skip_effect(o);for(const[f,o]of l(this,xe))f===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(l(this,cr)),n.ondiscard(l(this,Fr))}else l(this,cr).call(this,n)}}Fe=new WeakMap,Ve=new WeakMap,xe=new WeakMap,mt=new WeakMap,ur=new WeakMap,cr=new WeakMap,Fr=new WeakMap;function J(e,t,r=!1){var n=new Ti(e),i=r?xt:0;function s(a,f){n.ensure(a,f)}$r(()=>{var a=!1;t((f,o=0)=>{a=!0,s(o,f)}),a||s(-1,null)},i)}function ar(e,t){return t}function na(e,t,r){for(var n=[],i=t.length,s,a=t.length,f=0;f<i;f++){let m=t[f];wt(m,()=>{if(s){if(s.pending.delete(m),s.done.add(m),s.pending.size===0){var d=e.outrogroups;cn(e,Ir(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var o=n.length===0&&r!==null&&e.pending.size===0;if(o){var u=r,v=u.parentNode;Fs(v),v.append(u),e.items.clear()}cn(e,t,!o)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function cn(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const f of a)n.add(e.items.get(f).e)}for(var i=0;i<t.length;i++){var s=t[i];if(n!=null&&n.has(s)){s.f|=Ue;const a=document.createDocumentFragment();bn(s,a)}else ge(t[i],r)}}var Nn;function Me(e,t,r,n,i,s=null){var a=e,f=new Map,o=(t&Un)!==0;if(o){var u=e;a=u.appendChild(Qe())}var v=null,m=Ts(()=>{var T=r();return In(T)?T:T==null?[]:Ir(T)}),d,_=new Map,p=!0;function g(T){(N.effect.f&Ce)===0&&(N.pending.delete(T),N.fallback=v,ia(N,d,a,t,n),v!==null&&(d.length===0?(v.f&Ue)===0?Lr(v):(v.f^=Ue,Xt(v,null,a)):wt(v,()=>{v=null})))}function h(T){N.pending.delete(T)}var w=$r(()=>{d=c(m);for(var T=d.length,A=new Set,L=E,U=fi(),H=0;H<T;H+=1){var q=d[H],y=n(q,H),k=p?null:f.get(y);k?(k.v&&$t(k.v,q),k.i&&$t(k.i,H),U&&L.unskip_effect(k.e)):(k=sa(f,p?a:Nn??(Nn=Qe()),q,y,H,i,t,r),p||(k.e.f|=Ue),f.set(y,k)),A.add(y)}if(T===0&&s&&!v&&(p?v=Ae(()=>s(a)):(v=Ae(()=>s(Nn??(Nn=Qe()))),v.f|=Ue)),T>A.size&&Yi(),!p)if(_.set(L,A),U){for(const[j,W]of f)A.has(j)||L.skip_effect(W.e);L.oncommit(g),L.ondiscard(h)}else g(L);c(m)}),N={effect:w,items:f,pending:_,outrogroups:null,fallback:v};p=!1}function Gt(e){for(;e!==null&&(e.f&Ne)===0;)e=e.next;return e}function ia(e,t,r,n,i){var k,j,W,ue,be,K,Q,le,Le;var s=(n&ns)!==0,a=t.length,f=e.items,o=Gt(e.effect.first),u,v=null,m,d=[],_=[],p,g,h,w;if(s)for(w=0;w<a;w+=1)p=t[w],g=i(p,w),h=f.get(g).e,(h.f&Ue)===0&&((j=(k=h.nodes)==null?void 0:k.a)==null||j.measure(),(m??(m=new Set)).add(h));for(w=0;w<a;w+=1){if(p=t[w],g=i(p,w),h=f.get(g).e,e.outrogroups!==null)for(const ve of e.outrogroups)ve.pending.delete(h),ve.done.delete(h);if((h.f&de)!==0&&(Lr(h),s&&((ue=(W=h.nodes)==null?void 0:W.a)==null||ue.unfix(),(m??(m=new Set)).delete(h))),(h.f&Ue)!==0)if(h.f^=Ue,h===o)Xt(h,null,r);else{var N=v?v.next:o;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),tt(e,v,h),tt(e,h,N),Xt(h,N,r),v=h,d=[],_=[],o=Gt(v.next);continue}if(h!==o){if(u!==void 0&&u.has(h)){if(d.length<_.length){var T=_[0],A;v=T.prev;var L=d[0],U=d[d.length-1];for(A=0;A<d.length;A+=1)Xt(d[A],T,r);for(A=0;A<_.length;A+=1)u.delete(_[A]);tt(e,L.prev,U.next),tt(e,v,L),tt(e,U,T),o=T,v=U,w-=1,d=[],_=[]}else u.delete(h),Xt(h,o,r),tt(e,h.prev,h.next),tt(e,h,v===null?e.effect.first:v.next),tt(e,v,h),v=h;continue}for(d=[],_=[];o!==null&&o!==h;)(u??(u=new Set)).add(o),_.push(o),o=Gt(o.next);if(o===null)continue}(h.f&Ue)===0&&d.push(h),v=h,o=Gt(h.next)}if(e.outrogroups!==null){for(const ve of e.outrogroups)ve.pending.size===0&&(cn(e,Ir(ve.done)),(be=e.outrogroups)==null||be.delete(ve));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||u!==void 0){var H=[];if(u!==void 0)for(h of u)(h.f&de)===0&&H.push(h);for(;o!==null;)(o.f&de)===0&&o!==e.fallback&&H.push(o),o=Gt(o.next);var q=H.length;if(q>0){var y=(n&Un)!==0&&a===0?r:null;if(s){for(w=0;w<q;w+=1)(Q=(K=H[w].nodes)==null?void 0:K.a)==null||Q.measure();for(w=0;w<q;w+=1)(Le=(le=H[w].nodes)==null?void 0:le.a)==null||Le.fix()}na(e,H,y)}}s&&Ze(()=>{var ve,St;if(m!==void 0)for(h of m)(St=(ve=h.nodes)==null?void 0:ve.a)==null||St.apply()})}function sa(e,t,r,n,i,s,a,f){var o=(a&ts)!==0?(a&is)===0?Ls(r,!1,!1):kt(r):null,u=(a&rs)!==0?kt(i):null;return{v:o,i:u,e:Ae(()=>(s(t,o??r,u??i,f),()=>{e.delete(n)}))}}function Xt(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&Ue)===0?t.nodes.start:r;n!==null;){var a=hr(n);if(s.before(n),n===i)return;n=a}}function tt(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function aa(e,t,r){var n=new Ti(e);$r(()=>{var i=t()??null;n.ensure(i,i&&(s=>r(s,i)))},xt)}function Ai(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Ai(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oa(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Ai(e))&&(n&&(n+=" "),n+=t);return n}function la(e){return typeof e=="object"?oa(e):e??""}function fa(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function qt(e,t,r,n,i,s){var a=e[en];if(a!==r||a===void 0){var f=fa(r);f==null?e.removeAttribute("class"):e.className=f,e[en]=r}return s}const ua=Symbol("is custom element"),ca=Symbol("is html");function ut(e,t,r,n){var i=da(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[qi]=r),r==null?e.removeAttribute(t):typeof r!="string"&&va(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function da(e){return e[br]??(e[br]={[ua]:e.nodeName.includes("-"),[ca]:e.namespaceURI===os})}var Rn=new Map;function va(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Fi(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=jn(i)}return r}function ha(e,t,r=t){var n=new WeakSet;ps(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Gr(e)?Kr(s):s,r(s),E!==null&&n.add(E),await Ws(),s!==(s=t())){var a=e.selectionStart,f=e.selectionEnd,o=e.value.length;if(e.value=s??"",f!==null){var u=e.value.length;a===f&&f===o&&u>o?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(f,u))}}}),_r(t)==null&&e.value&&(r(Gr(e)?Kr(e.value):e.value),E!==null&&n.add(E)),yn(()=>{var i=t();if(e===document.activeElement){var s=E;if(n.has(s))return}Gr(e)&&i===Kr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Gr(e){var t=e.type;return t==="number"||t==="range"}function Kr(e){return e===""?null:+e}function Zr(e,t){return e===t||(e==null?void 0:e[xr])===t}function pa(e={},t,r,n){var i=oe.r,s=D;return Vs(()=>{var a,f;return yn(()=>{a=f,f=[],_r(()=>{Zr(r(...f),e)||(t(e,...f),a&&Zr(r(...a),e)&&t(null,...a))})}),()=>{let o=s;for(;o!==i&&o.parent!==null&&o.parent.f&Xr;)o=o.parent;const u=()=>{f&&Zr(r(...f),e)&&t(null,...f)},v=o.teardown;o.teardown=()=>{u(),v==null||v()}}}),e}function _a(e){oe===null&&Vn(),wn(()=>{const t=_r(e);if(typeof t=="function")return t})}function ga(e){oe===null&&Vn(),_a(()=>()=>_r(e))}const ma="5";var Dn;typeof window<"u"&&((Dn=window.__svelte??(window.__svelte={})).v??(Dn.v=new Set)).add(ma);async function Wt(e){const t=await fetch(e);if(!t.ok)throw new Error(`${e}: HTTP ${t.status}`);return t.json()}const wa=()=>Wt("/api/network"),ya=()=>Wt("/api/health"),xa=()=>Wt("/api/provenance"),ba=()=>Wt("/api/logs"),Ea=e=>new EventSource(`/api/logs/${e}`),ka=()=>Wt("/api/actions");async function Sa(e,t){const r=`chain=${encodeURIComponent(e)}`,n=t instanceof File?await fetch(`/api/actions/upgrade?${r}`,{method:"POST",body:t}):await fetch(`/api/actions/upgrade?${r}&path=${encodeURIComponent(t.path)}`,{method:"POST"});if(n.status===409)throw new Error("another action is still running");if(!n.ok){const s=await n.json().catch(()=>null);throw new Error((s==null?void 0:s.error)??`upgrade rejected: HTTP ${n.status}`)}const{events:i}=await n.json();return i}const Ta=()=>Wt("/api/addresses"),ee=Je({model:null,health:{},provenance:null,actions:null,error:null});async function Aa(){try{ee.model=await wa(),ee.provenance=await xa().catch(()=>null),ee.actions=await ka().catch(()=>null),await Ln(),setInterval(Ln,5e3)}catch(e){ee.error=e.message}}async function Ln(){try{const e=await ya();ee.health=Object.fromEntries(e.map(t=>[t.id,t]))}catch{}}var Oa=F(`<div role="region"><div class="mb-2">Drop the runtime for <span class="font-medium text-fg-primary"> </span> here, pick a file,
2
+ or give a path on this machine (e.g. a runtime repo's <code class="font-mono">target/release/wbuild/…/*.compact.compressed.wasm</code>):</div> <div class="flex flex-wrap items-center gap-2"><input type="file" accept=".wasm" class="text-xs"/> <form class="flex min-w-0 flex-1 gap-2"><input type="text" placeholder="/path/to/runtime.compact.compressed.wasm" class="min-w-0 flex-1 rounded-medium bg-surface-container px-2.5 py-1.5 font-mono text-xs text-fg-primary placeholder:text-fg-tertiary"/> <button type="submit" class="cursor-pointer rounded-medium bg-surface-container px-3 py-1.5 text-xs font-medium text-fg-secondary transition-colors hover:text-fg-primary">upgrade</button></form></div></div>`),Ca=F("<div> </div>"),Ma=F('<div class="mt-1.5 text-xs font-medium text-status-ok">Upgrade applied.</div>'),Na=F('<div class="mt-1.5 text-xs font-medium text-status-err">Upgrade failed — the log above says why.</div>'),Ra=F('<div class="max-h-48 overflow-auto whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-fg-secondary"></div> <!>',1),La=F('<div class="mt-1 rounded-nested bg-surface-nested p-3"><!></div>');function Pa(e,t){lt(t,!0);let r=Z(Je([])),n=Z("idle"),i=Z(""),s=Z(!1);async function a(p){B(n,"running"),B(r,[],!0);try{const g=await Sa(t.chain,p),h=new EventSource(g);h.onmessage=w=>c(r).push(w.data),h.addEventListener("done",w=>{B(n,w.data==="ok"?"ok":"error",!0),h.close()})}catch(g){B(n,"error"),c(r).push(g.message)}}function f(p){var h;const g=(h=p.target.files)==null?void 0:h[0];g&&a(g)}function o(p){var h,w;p.preventDefault(),B(s,!1);const g=(w=(h=p.dataTransfer)==null?void 0:h.files)==null?void 0:w[0];g&&a(g)}function u(p){p.preventDefault(),c(i).trim()&&a({path:c(i).trim()})}var v=La(),m=x(v);{var d=p=>{var g=Oa(),h=x(g),w=P(x(h)),N=x(w),T=P(h,2),A=x(T),L=P(A,2),U=x(L),H=P(U,2);z(q=>{qt(g,1,`rounded-medium border border-dashed p-3 text-xs transition-colors
3
+ ${c(s)?"border-fg-secondary text-fg-primary":"border-divider text-fg-secondary"}`),$(N,t.chain),H.disabled=q},[()=>!c(i).trim()]),wr("dragover",g,q=>{q.preventDefault(),B(s,!0)}),wr("dragleave",g,()=>B(s,!1)),wr("drop",g,o),Ut("change",A,f),wr("submit",L,u),ha(U,()=>c(i),q=>B(i,q)),S(p,g)},_=p=>{var g=Ra(),h=fe(g);Me(h,21,()=>c(r),ar,(A,L)=>{var U=Ca(),H=x(U);z(()=>$(H,c(L))),S(A,U)});var w=P(h,2);{var N=A=>{var L=Ma();S(A,L)},T=A=>{var L=Na();S(A,L)};J(w,A=>{c(n)==="ok"?A(N):c(n)==="error"&&A(T,1)})}S(p,g)};J(m,p=>{c(n)==="idle"?p(d):p(_,-1)})}S(e,v),ft()}gr(["change"]);var Da=F('<a class="inline-flex items-center gap-1 text-sm font-medium text-fg-primary underline-offset-3 hover:underline" target="_blank" rel="noreferrer"> <svg class="h-3 w-3 text-fg-tertiary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>'),Fa=F('<span class="text-sm font-medium text-fg-primary"> </span>'),Ia=Si('<svg class="h-3.5 w-3.5 text-status-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"></path></svg>'),ja=Si('<svg class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>'),$a=F('<span class="text-status-err">down</span>'),Ha=F('<code class="font-mono text-fg-secondary"> </code>'),Va=F('<code class="font-mono"> </code>'),Ua=F('<a class="text-xs text-fg-link underline underline-offset-3 hover:text-fg-primary" target="_blank" rel="noreferrer"> </a>'),qa=F('<button class="cursor-pointer rounded-medium bg-surface-nested px-2.5 py-1 text-xs font-medium text-fg-secondary transition-colors hover:bg-selection-hover hover:text-fg-primary">runtime-upgrade</button>'),Ba=F('<div class="col-span-7 pb-3 pl-6"><!></div>'),za=F('<div class="col-span-7 grid grid-cols-subgrid items-center border-b border-divider py-2.5 last:border-0"><span></span> <!> <span class="inline-flex min-w-0 items-center gap-1.5"><code class="truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer rounded p-0.5 text-fg-tertiary transition-colors hover:text-fg-primary" title="copy"><!></button></span> <span class="text-right text-xs tabular-nums text-fg-tertiary"><!></span> <span class="inline-flex items-center gap-2 text-xs text-fg-tertiary"><!> <!></span> <span></span> <span class="inline-flex items-center justify-end gap-3"><!> <!></span> <!></div>');function Ya(e,t){lt(t,!0);const r=X(()=>ee.health[t.entry.id]),n=X(()=>t.entry.id==="relay-alice"?"relay":!t.entry.id.startsWith("relay-")&&"paraId"in t.entry?t.entry.id:null),i=X(()=>{var b;return(((b=ee.actions)==null?void 0:b.enabled)??!1)&&c(n)!==null}),s=X(()=>t.entry.protocol==="ws"?t.entry.links.pjs??null:t.entry.url),a=X(()=>{var b;return(b=c(r))!=null&&b.runtime?`${c(r).runtime.specName}/${c(r).runtime.specVersion}`:null}),f=X(()=>{var b,O;return((O=(b=c(r))==null?void 0:b.clientVersion)==null?void 0:O.split("-")[0])??null});let o=Z(!1),u=Z(!1);async function v(){await navigator.clipboard.writeText(t.entry.url),B(o,!0),setTimeout(()=>B(o,!1),1200)}var m=za(),d=x(m),_=P(d,2);{var p=b=>{var O=Da(),re=x(O);z(()=>{ut(O,"href",c(s)),ut(O,"title",t.entry.protocol==="ws"?"open in polkadot.js Apps":"open"),$(re,`${t.entry.label??""} `)}),S(b,O)},g=b=>{var O=Fa(),re=x(O);z(()=>$(re,t.entry.label)),S(b,O)};J(_,b=>{c(s)?b(p):b(g,-1)})}var h=P(_,2),w=x(h),N=x(w),T=P(w,2),A=x(T);{var L=b=>{var O=Ia();S(b,O)},U=b=>{var O=ja();S(b,O)};J(A,b=>{c(o)?b(L):b(U,-1)})}var H=P(h,2),q=x(H);{var y=b=>{var O=Xs();z(re=>$(O,`#${re??""}`),[()=>c(r).block.toLocaleString()]),S(b,O)},k=b=>{var O=$a();S(b,O)};J(q,b=>{var O,re;((O=c(r))==null?void 0:O.status)==="ok"&&c(r).block!==void 0?b(y):((re=c(r))==null?void 0:re.status)==="down"&&b(k,1)})}var j=P(H,2),W=x(j);{var ue=b=>{var O=Ha(),re=x(O);z(()=>{ut(O,"title",`runtime ${c(r).runtime.specName??""} spec ${c(r).runtime.specVersion??""}, impl ${c(r).runtime.implVersion??""}, tx ${c(r).runtime.transactionVersion??""}`),$(re,c(a))}),S(b,O)};J(W,b=>{c(a)&&b(ue)})}var be=P(W,2);{var K=b=>{var O=Va(),re=x(O);z(()=>{ut(O,"title",`node binary ${c(r).clientVersion??""}`),$(re,c(f))}),S(b,O)};J(be,b=>{c(f)&&b(K)})}var Q=P(j,4),le=x(Q);Me(le,17,()=>Object.entries(t.entry.links??{}),ar,(b,O)=>{var re=X(()=>dr(c(O),2));let Hr=()=>c(re)[0],Mi=()=>c(re)[1];var Vr=Ua(),Ni=x(Vr);z(()=>{ut(Vr,"href",Mi()),$(Ni,Hr())}),S(b,Vr)});var Le=P(le,2);{var ve=b=>{var O=qa();Ut("click",O,()=>B(u,!c(u))),S(b,O)};J(Le,b=>{c(i)&&b(ve)})}var St=P(Q,2);{var mr=b=>{var O=Ba(),re=x(O);Pa(re,{get chain(){return c(n)}}),S(b,O)};J(St,b=>{c(u)&&c(i)&&b(mr)})}z(()=>{var b,O;qt(d,1,`h-2 w-2 rounded-full
4
+ ${((b=c(r))==null?void 0:b.status)==="ok"?"bg-status-ok":((O=c(r))==null?void 0:O.status)==="down"?"bg-status-err":"bg-fg-tertiary"}`),ut(w,"title",t.entry.url),$(N,t.entry.url)}),Ut("click",T,v),S(e,m),ft()}gr(["click"]);var Wa=F('<div class="flex items-center gap-3 border-b border-divider px-4 py-2.5 last:border-0"><span class="w-64 shrink-0 truncate text-sm font-medium text-fg-primary"> </span> <code class="min-w-0 flex-1 truncate font-mono text-xs text-fg-secondary"> </code> <button class="shrink-0 cursor-pointer text-xs text-fg-tertiary transition-colors hover:text-fg-primary"> </button></div>'),Ga=F('<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary">DotNS contracts on Asset Hub</h2> <div class="overflow-hidden rounded-container bg-surface-container shadow-1"></div>',1),Ka=F('<div class="p-8 text-center text-fg-tertiary">No DotNS address manifest in this workspace — `ppn fetch` downloads it for genesis networks.</div>');function Za(e,t){lt(t,!0);let r=Z(null),n=Z(null);Ta().then(u=>B(r,u,!0));async function i(u){await navigator.clipboard.writeText(u),B(n,u,!0),setTimeout(()=>B(n,null),1200)}var s=ot(),a=fe(s);{var f=u=>{var v=Ga(),m=P(fe(v),2);Me(m,21,()=>Object.entries(c(r).dotns),([d,_])=>d,(d,_)=>{var p=X(()=>dr(c(_),2));let g=()=>c(p)[0],h=()=>c(p)[1];var w=Wa(),N=x(w),T=x(N),A=P(N,2),L=x(A),U=P(A,2),H=x(U);z(()=>{$(T,g()),$(L,h()),$(H,c(n)===h()?"copied":"copy")}),Ut("click",U,()=>i(h())),S(d,w)}),S(u,v)},o=u=>{var v=Ka();S(u,v)};J(a,u=>{var v;(v=c(r))!=null&&v.dotns?u(f):c(r)&&u(o,1)})}S(e,s),ft()}gr(["click"]);var Ja=F(`<h2 class="mb-2 mt-6 text-[13px] font-semibold uppercase tracking-wide text-fg-tertiary"> </h2> <div class="grid grid-cols-[0.6rem_max-content_minmax(0,max-content)_max-content_max-content_1fr_max-content]
5
+ items-center gap-x-5 overflow-hidden rounded-container bg-surface-container px-4 shadow-1"></div>`,1),Qa=F("<!> <!>",1);function Xa(e,t){lt(t,!0);const r=X(()=>{var u;return((u=ee.model)==null?void 0:u.chains.filter(v=>v.paraId===null))??[]}),n=X(()=>{var u;return((u=ee.model)==null?void 0:u.chains.filter(v=>v.paraId!==null))??[]}),i=X(()=>ee.model?[["Relay",c(r)],["Parachains",c(n)],["Services",ee.model.services]]:[]);var s=Qa(),a=fe(s);{var f=u=>{var v=ot(),m=fe(v);Me(m,17,()=>c(i),([d,_])=>d,(d,_)=>{var p=X(()=>dr(c(_),2));let g=()=>c(p)[0],h=()=>c(p)[1];var w=ot(),N=fe(w);{var T=A=>{var L=Ja(),U=fe(L),H=x(U),q=P(U,2);Me(q,21,h,y=>y.id,(y,k)=>{Ya(y,{get entry(){return c(k)}})}),z(()=>$(H,g())),S(A,L)};J(N,A=>{h().length&&A(T)})}S(d,w)}),S(u,v)};J(a,u=>{ee.model&&u(f)})}var o=P(a,2);Za(o,{}),S(e,s),ft()}var eo=F('<div class="p-8 text-center text-fg-tertiary">No provenance stamp — run `ppn fetch` from a version that writes one.</div>'),to=F('<th class="px-3 py-1.5 text-left font-medium text-fg-tertiary"> </th>'),ro=F('<tr class="odd:bg-surface-nested"><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5 text-fg-secondary"> </td><td class="px-3 py-1.5"><code class="font-mono text-xs text-fg-secondary"> </code></td><td class="px-3 py-1.5"><code> </code></td><td class="px-3 py-1.5 font-mono text-xs text-fg-secondary"> </td><td class="px-3 py-1.5 font-mono text-xs text-fg-tertiary"> </td></tr>'),no=F('<h2 class="mb-3 mt-7 text-[15px] font-semibold leading-tight text-fg-secondary"> </h2> <div class="overflow-x-auto rounded-container bg-surface-container shadow-1"><table class="w-full border-collapse text-[13px]"><thead><tr></tr></thead><tbody></tbody></table></div>',1);function io(e,t){lt(t,!0);const r=X(()=>{var o;return((o=ee.provenance)==null?void 0:o.provenance)??null}),n=X(()=>c(r)?[["Node binaries",c(r).binaries??[]],["Runtimes",c(r).runtimes??[]],["Toolchain",c(r).toolchain??[]]].filter(([,o])=>o.length>0):[]);var i=ot(),s=fe(i);{var a=o=>{var u=eo();S(o,u)},f=o=>{var u=ot(),v=fe(u);Me(v,17,()=>c(n),([m,d])=>m,(m,d)=>{var _=X(()=>dr(c(d),2));let p=()=>c(_)[0],g=()=>c(_)[1];var h=no(),w=fe(h),N=x(w),T=P(w,2),A=x(T),L=x(A),U=x(L);Me(U,20,()=>["name","source","pinned","resolved","version","sha256"],ar,(q,y)=>{var k=to(),j=x(k);z(()=>$(j,y)),S(q,k)});var H=P(L);Me(H,21,g,q=>q.name,(q,y)=>{var k=ro(),j=x(k),W=x(j),ue=P(j),be=x(ue),K=P(ue),Q=x(K),le=x(Q),Le=P(K),ve=x(Le),St=x(ve),mr=P(Le),b=x(mr),O=P(mr),re=x(O);z(Hr=>{$(W,c(y).name),$(be,c(y).repo),$(le,c(y).pinned),qt(ve,1,`font-mono text-xs ${c(y).pinned!==c(y).resolved?"font-medium text-fg-primary":"text-fg-secondary"}`),$(St,c(y).resolved),$(b,c(y).version??"—"),ut(O,"title",c(y).sha256),$(re,`${Hr??""}…`)},[()=>c(y).sha256.slice(0,16)]),S(q,k)}),z(()=>$(N,p())),S(m,h)}),S(o,u)};J(s,o=>{c(r)?o(f,-1):o(a)})}S(e,i),ft()}function Oi(e){return e.replace(/^#\/?/,"").split("/")}function so(e,t,r){const n=Oi(e)[0];return t.includes(n)?n:r}function ao(e){const t=Oi(e);if(t[0]!=="logs"||!t[1])return null;try{return decodeURIComponent(t[1])}catch{return null}}function Ci(e,t){return t?`#${e}/${encodeURIComponent(t)}`:`#${e}`}var oo=F('<div class="p-8 text-center text-fg-tertiary">No logs yet — is the network running?</div>'),lo=F("<button> </button>"),fo=F('<div class="px-3 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-tertiary"> </div> <!>',1),uo=F("<div> </div>"),co=F('<div class="grid min-h-[60vh] grid-cols-[260px_1fr] gap-3"><div class="max-h-[75vh] overflow-y-auto rounded-container bg-surface-container p-2 shadow-1"></div> <div class="max-h-[75vh] overflow-auto whitespace-pre-wrap break-all rounded-container bg-surface-container p-3.5 font-mono text-xs leading-relaxed text-fg-secondary shadow-1"></div></div>');function vo(e,t){lt(t,!0);let r=Z(null),n=Z(null),i=Z(Je([])),s=Z(null),a=null;const f=()=>ao(location.hash);ba().then(p=>{B(r,p,!0);const g=[...p.chains,...p.services,...p.scripts],h=f(),w=(h&&g.includes(h)?h:null)??g[0];w&&o(w)}),wn(()=>{const p=()=>{const g=f();g&&g!==c(n)&&c(r)&&[...c(r).chains,...c(r).services,...c(r).scripts].includes(g)&&o(g)};return window.addEventListener("hashchange",p),()=>window.removeEventListener("hashchange",p)});function o(p){B(n,p,!0);const g=Ci("logs",p);location.hash!==g&&history.replaceState(null,"",g),B(i,[],!0),a==null||a.close(),a=Ea(p),a.onmessage=h=>{const w=/error|panic|fatal/i.test(h.data)?"e":/warn/i.test(h.data)?"w":"",N=c(s)&&c(s).scrollTop+c(s).clientHeight>=c(s).scrollHeight-40;c(i).push({text:h.data,sev:w}),c(i).length>2e3&&c(i).splice(0,c(i).length-2e3),N&&requestAnimationFrame(()=>c(s)&&(c(s).scrollTop=c(s).scrollHeight))}}ga(()=>a==null?void 0:a.close());const u=X(()=>c(r)?[["Chains",c(r).chains],["Services",c(r).services],["One-off scripts",c(r).scripts]]:[]);var v=ot(),m=fe(v);{var d=p=>{var g=oo();S(p,g)},_=p=>{var g=co(),h=x(g);Me(h,21,()=>c(u),ar,(N,T)=>{var A=X(()=>dr(c(T),2));let L=()=>c(A)[0],U=()=>c(A)[1];var H=ot(),q=fe(H);{var y=k=>{var j=fo(),W=fe(j),ue=x(W),be=P(W,2);Me(be,16,U,K=>K,(K,Q)=>{var le=lo(),Le=x(le);z(()=>{qt(le,1,`block w-full cursor-pointer rounded-medium px-3 py-1.5 text-left text-[13px] transition-colors
6
+ ${Q===c(n)?"bg-surface-nested font-medium text-fg-primary":"text-fg-secondary hover:bg-selection-hover"}`),$(Le,Q)}),Ut("click",le,()=>o(Q)),S(K,le)}),z(()=>$(ue,L())),S(k,j)};J(q,k=>{U().length&&k(y)})}S(N,H)});var w=P(h,2);Me(w,21,()=>c(i),ar,(N,T)=>{var A=uo(),L=x(A);z(()=>{qt(A,1,la(c(T).sev==="e"?"text-status-err":c(T).sev==="w"?"text-status-warn":"")),$(L,c(T).text)}),S(N,A)}),pa(w,N=>B(s,N),()=>c(s)),S(p,g)};J(m,p=>{c(r)&&!c(r).chains.length&&!c(r).services.length&&!c(r).scripts.length?p(d):c(r)&&p(_,1)})}S(e,v),ft()}gr(["click"]);var Jr=F("<span> </span>"),ho=F('<span class="rounded-full bg-surface-nested px-2.5 py-0.5 text-xs font-medium text-fg-secondary"> </span> <!>',1),po=F("<span> </span> <!>",1),_o=F("<button> </button>"),go=F('<div class="p-8 text-center text-fg-tertiary"> </div>'),mo=F('<div class="mx-auto max-w-[1200px] bg-surface-main px-4 py-8 font-sans text-fg-primary sm:px-12"><header class="mb-8"><h1 class="text-[22px] font-semibold leading-tight"> </h1> <div class="mt-1.5 flex flex-wrap gap-4 text-[13px] text-fg-tertiary"><!> <!> <!></div></header> <nav class="mb-6 flex gap-1"></nav> <!></div>');function wo(e,t){lt(t,!0);const r={overview:Xa,provenance:io,logs:vo},n=Object.keys(r),i=()=>so(location.hash,n,"overview");let s=Z(Je(i()));const a=X(()=>r[c(s)]);function f(y){location.hash=Ci(y)}wn(()=>{const y=()=>B(s,i(),!0);return window.addEventListener("hashchange",y),()=>window.removeEventListener("hashchange",y)});const o=X(()=>{var y;return((y=ee.provenance)==null?void 0:y.spawn)??null}),u=X(()=>{var y,k;return((k=(y=ee.provenance)==null?void 0:y.provenance)==null?void 0:k.fetchedAt)??null});Aa();var v=mo(),m=x(v),d=x(m),_=x(d),p=P(d,2),g=x(p);{var h=y=>{var k=ho(),j=fe(k),W=x(j),ue=P(j,2);{var be=K=>{var Q=Jr(),le=x(Q);z(Le=>$(le,`bitten ${Le??""} from ${new URL(c(o).bite.source).host??""}`),[()=>new Date(c(o).bite.at).toLocaleString()]),S(K,Q)};J(ue,K=>{var Q;(Q=c(o))!=null&&Q.bite&&K(be)})}z(()=>$(W,c(o)?c(o).mode:ee.model.network.genesis?"genesis":"fork-only")),S(y,k)};J(g,y=>{(c(o)||ee.model)&&y(h)})}var w=P(g,2);{var N=y=>{var k=po(),j=fe(k),W=x(j),ue=P(j,2);{var be=K=>{var Q=Jr(),le=x(Q);z(()=>$(le,`ppn ${c(o).ppnVersion??""}`)),S(K,Q)};J(ue,K=>{c(o).ppnVersion&&K(be)})}z(K=>$(W,`spawned ${K??""}`),[()=>new Date(c(o).spawnedAt).toLocaleString()]),S(y,k)};J(w,y=>{c(o)&&y(N)})}var T=P(w,2);{var A=y=>{var k=Jr(),j=x(k);z(W=>$(j,`artifacts fetched ${W??""}`),[()=>new Date(c(u)).toLocaleString()]),S(y,k)};J(T,y=>{c(u)&&y(A)})}var L=P(m,2);Me(L,20,()=>Object.keys(r),y=>y,(y,k)=>{var j=_o(),W=x(j);z(()=>{qt(j,1,`cursor-pointer rounded-t-lg border-b-2 px-3.5 py-2 text-sm font-medium transition-colors
7
+ ${c(s)===k?"border-fg-primary text-fg-primary":"border-transparent text-fg-secondary hover:text-fg-primary"}`),$(W,k)}),Ut("click",j,()=>f(k)),S(y,j)});var U=P(L,2);{var H=y=>{var k=go(),j=x(k);z(()=>$(j,`Cannot reach the dashboard API: ${ee.error??""}`)),S(y,k)},q=y=>{var k=ot(),j=fe(k);aa(j,()=>c(a),(W,ue)=>{ue(W,{})}),S(y,k)};J(U,y=>{ee.error?y(H):y(q,-1)})}z(()=>{var y;return $(_,((y=ee.model)==null?void 0:y.network.displayName)??"Product Preview Network")}),S(e,v),ft()}gr(["click"]);ea(wo,{target:document.getElementById("app")});
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Inter", system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface-main:#fafaf9;--color-surface-container:#fff;--color-surface-nested:#f5f5f4;--color-selection-hover:#e7e5e4;--color-fg-primary:#1c1917;--color-fg-secondary:#57534e;--color-fg-tertiary:#a8a29e;--color-fg-link:#44403c;--color-status-ok:#16a34a;--color-status-err:#dc2626;--color-status-warn:#d97706;--radius-container:16px;--radius-nested:12px;--radius-medium:10px;--color-divider:#0000000d}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static{position:static}.col-span-7{grid-column:span 7/span 7}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\[75vh\]{max-height:75vh}.min-h-\[60vh\]{min-height:60vh}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.max-w-\[1200px\]{max-width:1200px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.grid-cols-\[0\.6rem_max-content_minmax\(0\,max-content\)_max-content_max-content_1fr_max-content\]{grid-template-columns:.6rem max-content minmax(0,max-content) max-content max-content 1fr max-content}.grid-cols-\[260px_1fr\]{grid-template-columns:260px 1fr}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-container{border-radius:var(--radius-container)}.rounded-full{border-radius:3.40282e38px}.rounded-medium{border-radius:var(--radius-medium)}.rounded-nested{border-radius:var(--radius-nested)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-divider{border-color:var(--color-divider)}.border-fg-primary{border-color:var(--color-fg-primary)}.border-fg-secondary{border-color:var(--color-fg-secondary)}.border-transparent{border-color:#0000}.bg-fg-tertiary{background-color:var(--color-fg-tertiary)}.bg-status-err{background-color:var(--color-status-err)}.bg-status-ok{background-color:var(--color-status-ok)}.bg-surface-container{background-color:var(--color-surface-container)}.bg-surface-main{background-color:var(--color-surface-main)}.bg-surface-nested{background-color:var(--color-surface-nested)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-8{padding:calc(var(--spacing) * 8)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-1{padding-bottom:var(--spacing)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[22px\]{font-size:22px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-fg-link{color:var(--color-fg-link)}.text-fg-primary{color:var(--color-fg-primary)}.text-fg-secondary{color:var(--color-fg-secondary)}.text-fg-tertiary{color:var(--color-fg-tertiary)}.text-status-err{color:var(--color-status-err)}.text-status-ok{color:var(--color-status-ok)}.text-status-warn{color:var(--color-status-warn)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-3{text-underline-offset:3px}.shadow-1{--tw-shadow:0 1px 3px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.placeholder\:text-fg-tertiary::placeholder{color:var(--color-fg-tertiary)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.odd\:bg-surface-nested:nth-child(odd){background-color:var(--color-surface-nested)}@media(hover:hover){.hover\:bg-selection-hover:hover{background-color:var(--color-selection-hover)}.hover\:text-fg-primary:hover{color:var(--color-fg-primary)}.hover\:underline:hover{text-decoration-line:underline}}@media(min-width:40rem){.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}}@media(prefers-color-scheme:dark){:root{--color-surface-main:#131211;--color-surface-container:#1e1c1b;--color-surface-nested:#292524;--color-selection-hover:#33302e;--color-fg-primary:#fafaf9;--color-fg-secondary:#d6d3d1;--color-fg-tertiary:#78716c;--color-fg-link:#e7e5e4;--shadow-1:0 1px 3px #0006;--color-divider:#ffffff0f}}:focus-visible{outline:2px solid var(--color-fg-secondary);outline-offset:2px}body{background:var(--color-surface-main)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/web/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>PPN</title>
7
+ <script type="module" crossorigin src="/assets/index-BW4b1s2y.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-X3pZpnYk.css">
9
+ </head>
10
+ <body>
11
+ <div id="app"></div>
12
+ </body>
13
+ </html>