[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cloudflare-cloudflare-bundler-apps":3,"mdc-2gy58n-key":39,"related-org-cloudflare-cloudflare-bundler-apps":8554,"related-repo-cloudflare-cloudflare-bundler-apps":8724},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":34,"sourceUrl":37,"mdContent":38},"cloudflare-bundler-apps","author Cloudflare Worker Bundler applications","Author Cloudflare Worker Bundler-compatible apps that build and preview correctly inside a space. Use this skill whenever you scaffold, modify, or deploy a project that will be built with `@cloudflare\u002Fworker-bundler` (i.e. anything served from `\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F`). Covers wrangler config, project layout, static asset rules, server entry conventions, npm dependency limits, and the most common cause of blank previews (JSX in browser scripts).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cloudflare","Cloudflare","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcloudflare.jpg",[12,16,17,20],{"name":13,"slug":14,"type":15},"Cloudflare Workers","cloudflare-workers","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Deployment","deployment",{"name":21,"slug":22,"type":15},"Web Development","web-development",5145,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fvibesdk","2026-06-16T09:45:57.551207",null,1217,[29,14,30,31,32,33],"ai","coding-agent","durable-objects","text-to-app","vibe-coding",{"repoUrl":24,"stars":23,"forks":27,"topics":35,"description":36},[29,14,30,31,32,33],"An open-source vibe coding platform that helps you build your own vibe-coding platform, built entirely on Cloudflare stack ","https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fvibesdk\u002Ftree\u002FHEAD\u002Fworker\u002Fagents\u002Fthink\u002Fskills\u002Fapp-file-structure","---\nname: cloudflare-bundler-apps\ndescription: Author Cloudflare Worker Bundler-compatible apps that build and preview correctly inside a space. Use this skill whenever you scaffold, modify, or deploy a project that will be built with `@cloudflare\u002Fworker-bundler` (i.e. anything served from `\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F`). Covers wrangler config, project layout, static asset rules, server entry conventions, npm dependency limits, and the most common cause of blank previews (JSX in browser scripts).\n---\n\nThis skill teaches how to build apps that deploy cleanly through the space deploy pipeline. Every project committed to a space is built by `@cloudflare\u002Fworker-bundler` (`createApp` when there are static assets, `createWorker` when there are none) and served on a Dynamic Worker via `WorkerLoader`. Get the conventions right and the preview \"just works\". Get them wrong and you get a blank page, a 500, or a `Build failed` error.\n\n## How the pipeline works\n\nWhen `deploy_space(branch)` is called, the space DO:\n\n1. Reads every file from the branch's working tree (skipping `.git\u002F`).\n2. Parses `wrangler.json` \u002F `wrangler.jsonc` \u002F `wrangler.toml` for `main`, `compatibility_date`, `compatibility_flags`, and `[assets]`.\n3. If `[assets].directory` is set, files under that directory become static assets served host-side by `handleAssetRequest`. Everything else is built into a Worker via `createApp` (with `server: \u003Cmain>`).\n4. If no assets directory is configured, only `createWorker({ entryPoint: \u003Cmain> })` is run. The output is loaded as a Dynamic Worker; all requests go to the Worker.\n5. Previews are served at `\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F*`. Responses with `content-type: text\u002Fhtml` are run through `HTMLRewriter`, which prefixes root-relative `src` \u002F `href` \u002F `action` attributes with the preview base path. **JS-side fetches and dynamic imports are NOT rewritten.**\n\nPractical consequences:\n\n- **You can rely on root-relative `src=\"\u002Ffoo.js\"` and `href=\"\u002Fstyle.css\"` in HTML.** They will be rewritten to the preview path automatically.\n- **You cannot rely on root-relative paths inside JS strings**: `fetch(\"\u002Fapi\u002Fx\")`, `new URL(\"\u002Ffoo\", location.origin)`, dynamic `import(\"\u002Flib.js\")`. These hit the wrong path under the preview prefix. Use relative paths (`.\u002Fapi\u002Fx`, `import.meta.url`) or read the base path from `\u003Cbase href>` \u002F a meta tag injected at build time.\n- The `\u003Cbase href>` tag is also rewritten if present — using it lets all relative URLs resolve against the preview path.\n\n## Project layout\n\nA typical full-stack space project:\n\n```\n\u002F\n├── wrangler.json          # required for non-trivial setups\n├── package.json           # npm deps (text-only packages, see limits below)\n├── src\u002F\n│   └── index.ts           # server entry: export default { fetch }\n└── public\u002F                # static assets directory (configurable)\n    ├── index.html\n    ├── app.js             # compiled, no JSX\n    └── styles.css\n```\n\nA static-only SPA can skip `src\u002F` entirely — just `wrangler.json` + `public\u002F` is enough as long as `main` points to a minimal pass-through worker or you accept that all requests fall through assets.\n\n## Wrangler config\n\nMinimum viable `wrangler.json`:\n\n```json\n{\n  \"main\": \"src\u002Findex.ts\",\n  \"compatibility_date\": \"2025-04-01\",\n  \"assets\": {\n    \"directory\": \".\u002Fpublic\",\n    \"html_handling\": \"auto-trailing-slash\",\n    \"not_found_handling\": \"single-page-application\"\n  }\n}\n```\n\nNotes:\n\n- `main` is required when there's any server code. The bundler also auto-detects `src\u002Findex.ts`, `src\u002Findex.js`, `index.ts`, `index.js` if missing.\n- `compatibility_date` defaults to `2025-04-01` if omitted. Set it explicitly for newer features.\n- Add `\"compatibility_flags\": [\"nodejs_compat\"]` only if you actually need Node built-ins.\n- `assets.directory` is the **only** way to ship static files. Files outside this directory are bundled into the Worker or ignored — they will **not** be reachable via URL.\n- `html_handling: \"auto-trailing-slash\"` is usually what you want for multi-page sites; SPAs should also set `not_found_handling: \"single-page-application\"` so deep links return `index.html`.\n\nTOML works too (`wrangler.toml`), but the parser only handles top-level scalar fields plus an `[assets]` table — no inline tables, no env overrides. Prefer JSON.\n\n## Server entry: one Durable Object class named `App`\n\n**Your entire backend is one Durable Object.** Your main module exports\na class named `App` extending `DurableObject`. The platform loads it as\na [Cloudflare Durable Object\nFacet](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdynamic-workers\u002Fusage\u002Fdurable-object-facets\u002F)\nof the host SpaceDO and forwards every non-asset request — including\nWebSocket upgrades — to your `App.fetch(request)`.\n\n**Do not `export default { fetch }`.** A default fetch handler will be\nignored. There is no separate worker; the DO is the worker.\n\n```ts\n\u002F\u002F src\u002Findex.ts\nimport { DurableObject } from \"cloudflare:workers\";\n\nexport class App extends DurableObject {\n  async fetch(request: Request): Promise\u003CResponse> {\n    const url = new URL(request.url);\n\n    \u002F\u002F Lazy schema init on the first request. Idempotent.\n    this.ctx.storage.sql.exec(`\n      CREATE TABLE IF NOT EXISTS notes (\n        id INTEGER PRIMARY KEY AUTOINCREMENT,\n        body TEXT NOT NULL\n      )\n    `);\n\n    if (url.pathname === \"\u002Fapi\u002Fnotes\" && request.method === \"POST\") {\n      const { body } = await request.json\u003C{ body: string }>();\n      this.ctx.storage.sql.exec(`INSERT INTO notes (body) VALUES (?)`, body);\n      return new Response(null, { status: 201 });\n    }\n    if (url.pathname === \"\u002Fapi\u002Fnotes\") {\n      const rows = this.ctx.storage.sql\n        .exec(`SELECT id, body FROM notes ORDER BY id DESC`)\n        .toArray();\n      return Response.json(rows);\n    }\n    return new Response(\"Not found\", { status: 404 });\n  }\n}\n```\n\nOr with Hono inside the DO:\n\n```ts\nimport { DurableObject } from \"cloudflare:workers\";\nimport { Hono } from \"hono\";\n\nexport class App extends DurableObject {\n  private app = new Hono()\n    .get(\"\u002Fapi\u002Fhello\", (c) => c.json({ msg: \"hi\" }))\n    .post(\"\u002Fapi\u002Fnotes\", async (c) => {\n      const { body } = await c.req.json\u003C{ body: string }>();\n      this.ctx.storage.sql.exec(`INSERT INTO notes (body) VALUES (?)`, body);\n      return c.json({ ok: true });\n    });\n\n  async fetch(request: Request) {\n    return this.app.fetch(request);\n  }\n}\n```\n\nWhen `[assets]` is configured, static files take priority — your `fetch`\nonly sees requests that didn't match an asset. For a SPA, put\n`index.html` in `public\u002F` and `App.fetch` only handles `\u002Fapi\u002F*`.\n\n### State and storage\n\nState lives on `this.ctx.storage`. No `env.DB` exists; you do not need\nto declare any binding. The DO's storage is a per-(space, branch)\nSQLite database that survives redeploys.\n\n- `this.ctx.storage.sql.exec(sql, ...params)` — full SQLite. Returns a\n  cursor with `.toArray()`, `.one()`, `.columnNames`, etc.\n- `this.ctx.storage.kv.get(key)` \u002F `.put(key, value)` — simple KV\n  backed by SQLite.\n- `this.ctx.storage.transactionSync(() => { ... })` — atomic batch\n  inside the same DO instance.\n\n```ts\n\u002F\u002F SQL\nthis.ctx.storage.sql.exec(`CREATE TABLE IF NOT EXISTS counter (n INTEGER)`);\nconst cur = this.ctx.storage.sql.exec(`SELECT n FROM counter LIMIT 1`).toArray();\nconst n = (cur[0]?.n as number) ?? 0;\n\n\u002F\u002F KV\nconst last = this.ctx.storage.kv.get\u003Cnumber>(\"last_seen\") ?? 0;\nthis.ctx.storage.kv.put(\"last_seen\", Date.now());\n```\n\n**Use the DO's storage for all persistent state** — users, sessions,\ncontent, settings, anything that should survive a reload. Do not use\n`localStorage` or `sessionStorage` for primary data; they are\nper-browser, per-origin, and lost on incognito or any other browser.\n\n### WebSockets\n\nThe platform forwards `Upgrade: websocket` requests transparently into\n`App.fetch`. Use the standard Durable Object hibernation API:\n\n```ts\nexport class App extends DurableObject {\n  async fetch(request: Request) {\n    const upgrade = request.headers.get(\"Upgrade\");\n    if (upgrade === \"websocket\") {\n      const { 0: client, 1: server } = new WebSocketPair();\n      this.ctx.acceptWebSocket(server);\n      return new Response(null, { status: 101, webSocket: client });\n    }\n    return new Response(\"not found\", { status: 404 });\n  }\n\n  webSocketMessage(ws: WebSocket, message: string | ArrayBuffer) {\n    \u002F\u002F Broadcast to every connected client (chat-style fan-out).\n    for (const peer of this.ctx.getWebSockets()) {\n      peer.send(typeof message === \"string\" ? message : new Uint8Array(message));\n    }\n  }\n\n  webSocketClose(_ws: WebSocket, _code: number, _reason: string, _wasClean: boolean) {\n    \u002F\u002F Cleanup if needed.\n  }\n}\n```\n\n`acceptWebSocket` + `webSocketMessage` is the right pattern for\nmulti-connection use cases (chat rooms, multiplayer, presence) because\nthe DO can hibernate between messages without losing connections.\n\n### Per-entity grouping (chat rooms, per-user records)\n\nYou get **one App DO per (space, branch)** — a single instance, not a\nnamespace. Do not call `idFromName` or try to declare a DO binding in\n`wrangler.json`; both are rejected. For multi-room \u002F multi-user state,\n**partition rows with a column** in the App's SQLite:\n\n```sql\nCREATE TABLE messages (\n  room_id TEXT NOT NULL,\n  user_id TEXT NOT NULL,\n  body TEXT NOT NULL,\n  ts INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)\n);\nCREATE INDEX messages_by_room ON messages (room_id, ts);\n```\n\nThen route by `room_id` inside `App.fetch`. SQLite is fast enough that\nsharing the same table across rooms is fine for prototyping; if you\nlater need stronger isolation, attach `room_id` to a tag and use\n`acceptWebSocket(ws, [room_id])` so `getWebSockets(room_id)` returns\nonly that room's sockets.\n\n### What you cannot declare\n\n- **`durable_objects.bindings` in `wrangler.json`.** The platform\n  extracts your `App` class automatically. Adding bindings fails the\n  deploy with a clear error.\n- **`new_sqlite_classes` \u002F migrations.** Same reason. Your App's\n  storage is set up by the platform.\n- **`d1_databases`, `r2_buckets`, `kv_namespaces`.** Not available.\n  Everything goes in `this.ctx.storage`.\n\n## Static asset rules (read this twice)\n\nThis is where most preview failures happen. The browser eventually runs your assets — the bundler does **not** transform them. So:\n\n### **NEVER ship JSX in a `\u003Cscript type=\"module\">` (or any other script tag).** Browsers cannot parse JSX.\n\nThis page **will be blank** with a `SyntaxError: Unexpected token '\u003C'`:\n\n```html\n\u003Cscript type=\"module\">\n  import React from \"https:\u002F\u002Fesm.sh\u002Freact@18\";\n  const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;   \u002F\u002F ← browser dies here\n\u003C\u002Fscript>\n```\n\nFix one of these three ways:\n\n1. **Pre-compile** — write JSX in a build step (Vite\u002Fesbuild\u002Ftsup) and emit plain JS into `public\u002F`. Best for production.\n2. **`React.createElement` by hand** — works without a build step but is verbose.\n3. **`@babel\u002Fstandalone`** — only for prototypes. Load Babel **before** the script and use `type=\"text\u002Fbabel\"`. The modern `@babel\u002Fpreset-react` defaults to the **automatic JSX runtime**, which emits `import { jsx } from \"react\u002Fjsx-runtime\"`. Browsers will reject that bare specifier unless your importmap maps it. **Always ship a complete importmap alongside the Babel script:**\n\n   ```html\n   \u003Cscript type=\"importmap\">\n   {\n     \"imports\": {\n       \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\",\n       \"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\u002Fjsx-runtime\",\n       \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\",\n       \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\"\n     }\n   }\n   \u003C\u002Fscript>\n   \u003Cscript src=\"https:\u002F\u002Funpkg.com\u002F@babel\u002Fstandalone\u002Fbabel.min.js\">\u003C\u002Fscript>\n   \u003Cscript type=\"text\u002Fbabel\" data-type=\"module\" data-presets=\"react\">\n     import React from \"react\";\n     import { createRoot } from \"react-dom\u002Fclient\";\n     const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;\n     createRoot(document.getElementById(\"root\")).render(\u003CApp \u002F>);\n   \u003C\u002Fscript>\n   ```\n\n   `data-type=\"module\"` is required for `import` to work inside the Babel script. Import React from the importmap key (`\"react\"`) — not from a hard-coded `esm.sh` URL — so your code and Babel's emitted `react\u002Fjsx-runtime` import resolve to the **same** React instance.\n\n   If you really cannot ship `react\u002Fjsx-runtime` in the importmap, force Babel to the legacy classic runtime instead so it emits `React.createElement` calls and never touches `react\u002Fjsx-runtime`:\n\n   ```html\n   \u003Cscript\n     type=\"text\u002Fbabel\"\n     data-type=\"module\"\n     data-presets=\"react\"\n     data-plugins='[[\"transform-react-jsx\", { \"runtime\": \"classic\" }]]'\n   >\n     import React from \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\";  \u002F* must be in scope *\u002F\n     const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;\n   \u003C\u002Fscript>\n   ```\n\n   The classic runtime requires `React` to be in lexical scope (because `\u003Cdiv>` becomes `React.createElement(\"div\")`). The automatic runtime (default) does not, but needs `react\u002Fjsx-runtime` resolvable.\n\n### Symptom-to-fix index\n\n| Console error | Cause | Fix |\n| --- | --- | --- |\n| `Uncaught SyntaxError: Unexpected token '\u003C'` (inside `\u003Cscript type=\"module\">`) | JSX shipped raw to the browser | Pre-compile, or use `@babel\u002Fstandalone` with `type=\"text\u002Fbabel\"` |\n| `Uncaught TypeError: Failed to resolve module specifier \"react\u002Fjsx-runtime\". Relative references must start with either \"\u002F\", \".\u002F\", or \"..\u002F\".` | Automatic JSX runtime emits `import \"react\u002Fjsx-runtime\"` but importmap doesn't map it | Add `\"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@\u003Csame-version>\u002Fjsx-runtime\"` to the importmap **before** the Babel\u002Fscript tag — or force the classic runtime (see above) |\n| `Uncaught TypeError: Failed to resolve module specifier \"react\"` (or any bare name) | No importmap entry for that package | Add it to the importmap; importmap script tag must appear **before** any module script that uses the specifier |\n| `TypeError: Cannot read properties of null (reading 'useContext')` | Dual-React (two copies loaded) | Append `?external=react,react-dom` to every esm.sh URL with React as a peer dep — see the dual-React trap below |\n\n### Other asset gotchas\n\n- **Binary assets are not extracted from npm packages.** Fonts, images, and `.wasm` shipped via npm tarballs will be missing. Put binaries directly in `public\u002F` instead.\n- **Paths in JS need care under preview**: prefer `import.meta.url`, relative paths, or a runtime base detected from `document.baseURI`. Don't hard-code `\u002Fapi\u002F...` in client code; use `.\u002Fapi\u002F...` or read a base from a `\u003Cmeta>` tag.\n- **Trailing slashes matter** for `auto-trailing-slash` mode: `\u002Fabout` serves `about.html`, `\u002Fabout\u002F` serves `about\u002Findex.html`. Pick one shape and link consistently.\n- **No CSS preprocessors at runtime** — ship `.css`, not `.scss`. Compile first if you need Sass.\n- **Importmaps work** since they're inline JSON. Use them to avoid bundling React\u002Fetc. for prototypes — but watch the dual-React trap below.\n\n### The dual-React trap (the #1 cause of \"blank page + `useContext` is null`)\n\n`esm.sh` bundles a package's peer dependencies *into the package itself* unless you tell it otherwise. So this importmap looks correct but ships **two copies of React** — one for your app, another nested inside `framer-motion`:\n\n```html\n\u003C!-- BROKEN: framer-motion has its own React inside, hooks crash with `Cannot read properties of null (reading 'useContext')` -->\n\u003Cscript type=\"importmap\">\n{\n  \"imports\": {\n    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.2.0\",\n    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.2.0\u002Fclient\",\n    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11\"\n  }\n}\n\u003C\u002Fscript>\n```\n\nThe symptom is exactly: blank background + console errors like\n\n```\nTypeError: Cannot read properties of null (reading 'useContext')\n  at u (SwitchLayoutGroupContext.mjs:1:1)\n```\n\nbecause the nested React instance has no provider in the tree.\n\n**Fix: append `?external=react,react-dom` (and any other shared peers) to every esm.sh URL that has React as a peer dep.** Pin the exact same React version everywhere too.\n\n```html\n\u003C!-- CORRECT: one React shared across the whole importmap -->\n\u003Cscript type=\"importmap\">\n{\n  \"imports\": {\n    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\",\n    \"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\u002Fjsx-runtime\",\n    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\",\n    \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\",\n    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11?external=react,react-dom\",\n    \"lucide-react\": \"https:\u002F\u002Fesm.sh\u002Flucide-react@0.400.0?external=react,react-dom\"\n  }\n}\n\u003C\u002Fscript>\n```\n\nApply `?external=...` to **every** React-consuming dep (UI libraries, icon sets, animation libs, headless components). Same rule for `vue`, `solid-js`, etc. if you swap the framework.\n\nIf a project needs more than two or three of these packages, stop using the importmap path — switch to option 1 (pre-compile with Vite\u002Fesbuild) so the bundler can dedupe React for you.\n\n## npm dependencies\n\nThe bundler installs deps from npm at build time. Limits to respect:\n\n- **Flat node_modules.** No two versions of the same package can coexist — peer-dep conflicts will pick one and break the other. Keep dep graphs shallow.\n- **Text-only files** are extracted from tarballs. `.js`, `.ts`, `.json`, `.css`, `.md` work. `.wasm`, `.node`, native binaries, fonts, images do not.\n- **No PAX tar headers** — packages whose internal paths exceed 100 chars may have those files silently dropped. Avoid deeply-nested monorepo packages.\n- **No build scripts run** — `postinstall`, `prepare`, etc. are ignored. Packages that compile native code or run codegen at install time will not work.\n- **`cloudflare:*` imports are always external** and resolved by the runtime (`cloudflare:workers`, etc.). Don't add them to `package.json`.\n\nSafe and well-tested deps: `hono`, `zod`, `itty-router`, `nanoid`, `valibot`, `@hono\u002Fzod-validator`. Avoid anything that needs node-native modules unless you set `compatibility_flags: [\"nodejs_compat\"]` and the package is pure JS under that flag.\n\n## Project shapes\n\n| Project shape                       | What you need                                                                          |\n| ----------------------------------- | -------------------------------------------------------------------------------------- |\n| Pure static site (HTML+JS+CSS only) | `wrangler.json` with `[assets]`, files in `public\u002F`. No `main`. No App class.          |\n| SPA + API                           | `[assets]` for the SPA, `main` exporting `class App extends DurableObject`             |\n| API only (JSON, no frontend)        | `main` exporting `class App extends DurableObject`, no `[assets]`                      |\n| Realtime (WebSocket \u002F multiplayer)  | Same as SPA + API; `App.fetch` upgrades to WebSocket and uses `ctx.acceptWebSocket`    |\n\n## Pre-flight checklist before `deploy_space`\n\nRun through every item — most \"preview is broken\" reports trace back to one of these.\n\n- `wrangler.json` exists at repo root with `main` and (if static assets exist) `[assets].directory`.\n- Every browser-loaded `.js` \u002F `.mjs` \u002F `\u003Cscript type=\"module\">` is **plain JS, no JSX**, or wrapped with `@babel\u002Fstandalone` + `type=\"text\u002Fbabel\"`.\n- If you use React via importmap (Babel-standalone or pre-compiled with the automatic JSX runtime), the importmap maps **all** of `react`, `react\u002Fjsx-runtime`, `react-dom`, and `react-dom\u002Fclient` — same version on every entry. Missing `react\u002Fjsx-runtime` produces `Failed to resolve module specifier \"react\u002Fjsx-runtime\"` and a blank page.\n- The `\u003Cscript type=\"importmap\">` tag appears **before** any `\u003Cscript type=\"module\">` (or `type=\"text\u002Fbabel\" data-type=\"module\"`) that depends on the mapped specifiers.\n- Static files live under the configured `assets.directory` (default suggestion: `public\u002F`).\n- HTML uses root-relative paths (`\u002Ffoo.js`) — they get rewritten. JS uses relative paths (`.\u002Ffoo`).\n- No binary assets are imported from npm packages. Binaries live in `public\u002F`.\n- `package.json` deps are pure-JS, no native modules, no install scripts.\n- SPA routing? Set `not_found_handling: \"single-page-application\"`.\n- Server entry exports `class App extends DurableObject` from your `main` module (no `export default { fetch }`).\n- No `durable_objects` \u002F `d1_databases` \u002F `kv_namespaces` \u002F `r2_buckets` blocks in `wrangler.json`.\n- `compatibility_date` is set if you use APIs newer than the default.\n\nIf any of these are off, fix them in the working tree, commit, and redeploy. The preview will pick up the new build on the next `deploy_space` call (the dynamic worker is keyed by commit hash, so old builds are not reused).\n\n## Minimal end-to-end example\n\nA working SPA with a tiny API:\n\n```\nwrangler.json\npackage.json\nsrc\u002Findex.ts\npublic\u002Findex.html\npublic\u002Fapp.js\npublic\u002Fstyle.css\n```\n\n`wrangler.json`:\n\n```json\n{\n  \"main\": \"src\u002Findex.ts\",\n  \"compatibility_date\": \"2025-04-01\",\n  \"assets\": {\n    \"directory\": \".\u002Fpublic\",\n    \"html_handling\": \"auto-trailing-slash\",\n    \"not_found_handling\": \"single-page-application\"\n  }\n}\n```\n\n`package.json`:\n\n```json\n{ \"name\": \"demo\", \"type\": \"module\", \"dependencies\": { \"hono\": \"^4.6.0\" } }\n```\n\n`src\u002Findex.ts`:\n\n```ts\nimport { DurableObject } from \"cloudflare:workers\";\nimport { Hono } from \"hono\";\n\nexport class App extends DurableObject {\n  private app = new Hono()\n    .get(\"\u002Fapi\u002Ftime\", (c) => c.json({ now: new Date().toISOString() }))\n    .post(\"\u002Fapi\u002Fvisit\", async (c) => {\n      this.ctx.storage.sql.exec(\n        `CREATE TABLE IF NOT EXISTS visits (id INTEGER PRIMARY KEY AUTOINCREMENT, ts INTEGER)`\n      );\n      this.ctx.storage.sql.exec(`INSERT INTO visits (ts) VALUES (?)`, Date.now());\n      const cnt = this.ctx.storage.sql\n        .exec(`SELECT COUNT(*) AS c FROM visits`)\n        .one().c as number;\n      return c.json({ count: cnt });\n    });\n\n  async fetch(request: Request) {\n    return this.app.fetch(request);\n  }\n}\n```\n\n`public\u002Findex.html`:\n\n```html\n\u003C!doctype html>\n\u003Chtml>\n\u003Chead>\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fstyle.css\">\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv id=\"root\">Loading…\u003C\u002Fdiv>\n  \u003Cscript type=\"module\" src=\"\u002Fapp.js\">\u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n`public\u002Fapp.js`:\n\n```js\nconst res = await fetch(\".\u002Fapi\u002Ftime\");\nconst data = await res.json();\ndocument.getElementById(\"root\").textContent = data.now;\n\n\u002F\u002F Increment + display visit counter (server state lives in App.ctx.storage.sql)\nconst v = await fetch(\".\u002Fapi\u002Fvisit\", { method: \"POST\" }).then((r) => r.json());\ndocument.getElementById(\"root\").textContent += `  ·  visits: ${v.count}`;\n```\n\nNote `.\u002Fapi\u002Ftime` (relative) in JS, `\u002Fstyle.css` (root-relative) in HTML. The HTML href is rewritten by the preview; the JS fetch resolves against the document's base URL.\n\nCommit this, call `deploy_space(\"main\")`, and the preview at `\u002Fspace\u002F\u003Cname>\u002Fpreview\u002Fmain\u002F` will render the timestamp and an incrementing visit counter persisted in the App DO's SQLite.\n",{"data":40,"body":41},{"name":4,"description":6},{"type":42,"children":43},"root",[44,93,100,113,295,300,398,404,409,421,456,462,474,732,737,859,878,890,933,950,1877,1882,2505,2551,2558,2579,2644,3065,3091,3097,3117,3884,3901,3907,3941,4005,4048,4054,4136,4142,4153,4172,4191,4352,4357,5249,5255,5433,5439,5598,5612,5644,5761,5766,5775,5780,5797,5935,5970,5975,5981,5986,6123,6178,6184,6329,6341,6346,6644,6656,6662,6667,6676,6685,6906,6915,7055,7064,7794,7804,8103,8113,8508,8527,8548],{"type":45,"tag":46,"props":47,"children":48},"element","p",{},[49,52,59,61,67,69,75,77,83,85,91],{"type":50,"value":51},"text","This skill teaches how to build apps that deploy cleanly through the space deploy pipeline. Every project committed to a space is built by ",{"type":45,"tag":53,"props":54,"children":56},"code",{"className":55},[],[57],{"type":50,"value":58},"@cloudflare\u002Fworker-bundler",{"type":50,"value":60}," (",{"type":45,"tag":53,"props":62,"children":64},{"className":63},[],[65],{"type":50,"value":66},"createApp",{"type":50,"value":68}," when there are static assets, ",{"type":45,"tag":53,"props":70,"children":72},{"className":71},[],[73],{"type":50,"value":74},"createWorker",{"type":50,"value":76}," when there are none) and served on a Dynamic Worker via ",{"type":45,"tag":53,"props":78,"children":80},{"className":79},[],[81],{"type":50,"value":82},"WorkerLoader",{"type":50,"value":84},". Get the conventions right and the preview \"just works\". Get them wrong and you get a blank page, a 500, or a ",{"type":45,"tag":53,"props":86,"children":88},{"className":87},[],[89],{"type":50,"value":90},"Build failed",{"type":50,"value":92}," error.",{"type":45,"tag":94,"props":95,"children":97},"h2",{"id":96},"how-the-pipeline-works",[98],{"type":50,"value":99},"How the pipeline works",{"type":45,"tag":46,"props":101,"children":102},{},[103,105,111],{"type":50,"value":104},"When ",{"type":45,"tag":53,"props":106,"children":108},{"className":107},[],[109],{"type":50,"value":110},"deploy_space(branch)",{"type":50,"value":112}," is called, the space DO:",{"type":45,"tag":114,"props":115,"children":116},"ol",{},[117,131,190,225,238],{"type":45,"tag":118,"props":119,"children":120},"li",{},[121,123,129],{"type":50,"value":122},"Reads every file from the branch's working tree (skipping ",{"type":45,"tag":53,"props":124,"children":126},{"className":125},[],[127],{"type":50,"value":128},".git\u002F",{"type":50,"value":130},").",{"type":45,"tag":118,"props":132,"children":133},{},[134,136,142,144,150,151,157,159,165,167,173,174,180,182,188],{"type":50,"value":135},"Parses ",{"type":45,"tag":53,"props":137,"children":139},{"className":138},[],[140],{"type":50,"value":141},"wrangler.json",{"type":50,"value":143}," \u002F ",{"type":45,"tag":53,"props":145,"children":147},{"className":146},[],[148],{"type":50,"value":149},"wrangler.jsonc",{"type":50,"value":143},{"type":45,"tag":53,"props":152,"children":154},{"className":153},[],[155],{"type":50,"value":156},"wrangler.toml",{"type":50,"value":158}," for ",{"type":45,"tag":53,"props":160,"children":162},{"className":161},[],[163],{"type":50,"value":164},"main",{"type":50,"value":166},", ",{"type":45,"tag":53,"props":168,"children":170},{"className":169},[],[171],{"type":50,"value":172},"compatibility_date",{"type":50,"value":166},{"type":45,"tag":53,"props":175,"children":177},{"className":176},[],[178],{"type":50,"value":179},"compatibility_flags",{"type":50,"value":181},", and ",{"type":45,"tag":53,"props":183,"children":185},{"className":184},[],[186],{"type":50,"value":187},"[assets]",{"type":50,"value":189},".",{"type":45,"tag":118,"props":191,"children":192},{},[193,195,201,203,209,211,216,218,224],{"type":50,"value":194},"If ",{"type":45,"tag":53,"props":196,"children":198},{"className":197},[],[199],{"type":50,"value":200},"[assets].directory",{"type":50,"value":202}," is set, files under that directory become static assets served host-side by ",{"type":45,"tag":53,"props":204,"children":206},{"className":205},[],[207],{"type":50,"value":208},"handleAssetRequest",{"type":50,"value":210},". Everything else is built into a Worker via ",{"type":45,"tag":53,"props":212,"children":214},{"className":213},[],[215],{"type":50,"value":66},{"type":50,"value":217}," (with ",{"type":45,"tag":53,"props":219,"children":221},{"className":220},[],[222],{"type":50,"value":223},"server: \u003Cmain>",{"type":50,"value":130},{"type":45,"tag":118,"props":226,"children":227},{},[228,230,236],{"type":50,"value":229},"If no assets directory is configured, only ",{"type":45,"tag":53,"props":231,"children":233},{"className":232},[],[234],{"type":50,"value":235},"createWorker({ entryPoint: \u003Cmain> })",{"type":50,"value":237}," is run. The output is loaded as a Dynamic Worker; all requests go to the Worker.",{"type":45,"tag":118,"props":239,"children":240},{},[241,243,249,251,257,259,265,267,273,274,280,281,287,289],{"type":50,"value":242},"Previews are served at ",{"type":45,"tag":53,"props":244,"children":246},{"className":245},[],[247],{"type":50,"value":248},"\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F*",{"type":50,"value":250},". Responses with ",{"type":45,"tag":53,"props":252,"children":254},{"className":253},[],[255],{"type":50,"value":256},"content-type: text\u002Fhtml",{"type":50,"value":258}," are run through ",{"type":45,"tag":53,"props":260,"children":262},{"className":261},[],[263],{"type":50,"value":264},"HTMLRewriter",{"type":50,"value":266},", which prefixes root-relative ",{"type":45,"tag":53,"props":268,"children":270},{"className":269},[],[271],{"type":50,"value":272},"src",{"type":50,"value":143},{"type":45,"tag":53,"props":275,"children":277},{"className":276},[],[278],{"type":50,"value":279},"href",{"type":50,"value":143},{"type":45,"tag":53,"props":282,"children":284},{"className":283},[],[285],{"type":50,"value":286},"action",{"type":50,"value":288}," attributes with the preview base path. ",{"type":45,"tag":290,"props":291,"children":292},"strong",{},[293],{"type":50,"value":294},"JS-side fetches and dynamic imports are NOT rewritten.",{"type":45,"tag":46,"props":296,"children":297},{},[298],{"type":50,"value":299},"Practical consequences:",{"type":45,"tag":301,"props":302,"children":303},"ul",{},[304,330,386],{"type":45,"tag":118,"props":305,"children":306},{},[307,328],{"type":45,"tag":290,"props":308,"children":309},{},[310,312,318,320,326],{"type":50,"value":311},"You can rely on root-relative ",{"type":45,"tag":53,"props":313,"children":315},{"className":314},[],[316],{"type":50,"value":317},"src=\"\u002Ffoo.js\"",{"type":50,"value":319}," and ",{"type":45,"tag":53,"props":321,"children":323},{"className":322},[],[324],{"type":50,"value":325},"href=\"\u002Fstyle.css\"",{"type":50,"value":327}," in HTML.",{"type":50,"value":329}," They will be rewritten to the preview path automatically.",{"type":45,"tag":118,"props":331,"children":332},{},[333,338,340,346,347,353,355,361,363,369,370,376,378,384],{"type":45,"tag":290,"props":334,"children":335},{},[336],{"type":50,"value":337},"You cannot rely on root-relative paths inside JS strings",{"type":50,"value":339},": ",{"type":45,"tag":53,"props":341,"children":343},{"className":342},[],[344],{"type":50,"value":345},"fetch(\"\u002Fapi\u002Fx\")",{"type":50,"value":166},{"type":45,"tag":53,"props":348,"children":350},{"className":349},[],[351],{"type":50,"value":352},"new URL(\"\u002Ffoo\", location.origin)",{"type":50,"value":354},", dynamic ",{"type":45,"tag":53,"props":356,"children":358},{"className":357},[],[359],{"type":50,"value":360},"import(\"\u002Flib.js\")",{"type":50,"value":362},". These hit the wrong path under the preview prefix. Use relative paths (",{"type":45,"tag":53,"props":364,"children":366},{"className":365},[],[367],{"type":50,"value":368},".\u002Fapi\u002Fx",{"type":50,"value":166},{"type":45,"tag":53,"props":371,"children":373},{"className":372},[],[374],{"type":50,"value":375},"import.meta.url",{"type":50,"value":377},") or read the base path from ",{"type":45,"tag":53,"props":379,"children":381},{"className":380},[],[382],{"type":50,"value":383},"\u003Cbase href>",{"type":50,"value":385}," \u002F a meta tag injected at build time.",{"type":45,"tag":118,"props":387,"children":388},{},[389,391,396],{"type":50,"value":390},"The ",{"type":45,"tag":53,"props":392,"children":394},{"className":393},[],[395],{"type":50,"value":383},{"type":50,"value":397}," tag is also rewritten if present — using it lets all relative URLs resolve against the preview path.",{"type":45,"tag":94,"props":399,"children":401},{"id":400},"project-layout",[402],{"type":50,"value":403},"Project layout",{"type":45,"tag":46,"props":405,"children":406},{},[407],{"type":50,"value":408},"A typical full-stack space project:",{"type":45,"tag":410,"props":411,"children":415},"pre",{"className":412,"code":414,"language":50},[413],"language-text","\u002F\n├── wrangler.json          # required for non-trivial setups\n├── package.json           # npm deps (text-only packages, see limits below)\n├── src\u002F\n│   └── index.ts           # server entry: export default { fetch }\n└── public\u002F                # static assets directory (configurable)\n    ├── index.html\n    ├── app.js             # compiled, no JSX\n    └── styles.css\n",[416],{"type":45,"tag":53,"props":417,"children":419},{"__ignoreMap":418},"",[420],{"type":50,"value":414},{"type":45,"tag":46,"props":422,"children":423},{},[424,426,432,434,439,441,447,449,454],{"type":50,"value":425},"A static-only SPA can skip ",{"type":45,"tag":53,"props":427,"children":429},{"className":428},[],[430],{"type":50,"value":431},"src\u002F",{"type":50,"value":433}," entirely — just ",{"type":45,"tag":53,"props":435,"children":437},{"className":436},[],[438],{"type":50,"value":141},{"type":50,"value":440}," + ",{"type":45,"tag":53,"props":442,"children":444},{"className":443},[],[445],{"type":50,"value":446},"public\u002F",{"type":50,"value":448}," is enough as long as ",{"type":45,"tag":53,"props":450,"children":452},{"className":451},[],[453],{"type":50,"value":164},{"type":50,"value":455}," points to a minimal pass-through worker or you accept that all requests fall through assets.",{"type":45,"tag":94,"props":457,"children":459},{"id":458},"wrangler-config",[460],{"type":50,"value":461},"Wrangler config",{"type":45,"tag":46,"props":463,"children":464},{},[465,467,472],{"type":50,"value":466},"Minimum viable ",{"type":45,"tag":53,"props":468,"children":470},{"className":469},[],[471],{"type":50,"value":141},{"type":50,"value":473},":",{"type":45,"tag":410,"props":475,"children":479},{"className":476,"code":477,"language":478,"meta":418,"style":418},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"main\": \"src\u002Findex.ts\",\n  \"compatibility_date\": \"2025-04-01\",\n  \"assets\": {\n    \"directory\": \".\u002Fpublic\",\n    \"html_handling\": \"auto-trailing-slash\",\n    \"not_found_handling\": \"single-page-application\"\n  }\n}\n","json",[480],{"type":45,"tag":53,"props":481,"children":482},{"__ignoreMap":418},[483,495,538,575,601,641,679,714,723],{"type":45,"tag":484,"props":485,"children":488},"span",{"class":486,"line":487},"line",1,[489],{"type":45,"tag":484,"props":490,"children":492},{"style":491},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[493],{"type":50,"value":494},"{\n",{"type":45,"tag":484,"props":496,"children":498},{"class":486,"line":497},2,[499,504,509,514,518,523,529,533],{"type":45,"tag":484,"props":500,"children":501},{"style":491},[502],{"type":50,"value":503},"  \"",{"type":45,"tag":484,"props":505,"children":507},{"style":506},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[508],{"type":50,"value":164},{"type":45,"tag":484,"props":510,"children":511},{"style":491},[512],{"type":50,"value":513},"\"",{"type":45,"tag":484,"props":515,"children":516},{"style":491},[517],{"type":50,"value":473},{"type":45,"tag":484,"props":519,"children":520},{"style":491},[521],{"type":50,"value":522}," \"",{"type":45,"tag":484,"props":524,"children":526},{"style":525},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[527],{"type":50,"value":528},"src\u002Findex.ts",{"type":45,"tag":484,"props":530,"children":531},{"style":491},[532],{"type":50,"value":513},{"type":45,"tag":484,"props":534,"children":535},{"style":491},[536],{"type":50,"value":537},",\n",{"type":45,"tag":484,"props":539,"children":541},{"class":486,"line":540},3,[542,546,550,554,558,562,567,571],{"type":45,"tag":484,"props":543,"children":544},{"style":491},[545],{"type":50,"value":503},{"type":45,"tag":484,"props":547,"children":548},{"style":506},[549],{"type":50,"value":172},{"type":45,"tag":484,"props":551,"children":552},{"style":491},[553],{"type":50,"value":513},{"type":45,"tag":484,"props":555,"children":556},{"style":491},[557],{"type":50,"value":473},{"type":45,"tag":484,"props":559,"children":560},{"style":491},[561],{"type":50,"value":522},{"type":45,"tag":484,"props":563,"children":564},{"style":525},[565],{"type":50,"value":566},"2025-04-01",{"type":45,"tag":484,"props":568,"children":569},{"style":491},[570],{"type":50,"value":513},{"type":45,"tag":484,"props":572,"children":573},{"style":491},[574],{"type":50,"value":537},{"type":45,"tag":484,"props":576,"children":578},{"class":486,"line":577},4,[579,583,588,592,596],{"type":45,"tag":484,"props":580,"children":581},{"style":491},[582],{"type":50,"value":503},{"type":45,"tag":484,"props":584,"children":585},{"style":506},[586],{"type":50,"value":587},"assets",{"type":45,"tag":484,"props":589,"children":590},{"style":491},[591],{"type":50,"value":513},{"type":45,"tag":484,"props":593,"children":594},{"style":491},[595],{"type":50,"value":473},{"type":45,"tag":484,"props":597,"children":598},{"style":491},[599],{"type":50,"value":600}," {\n",{"type":45,"tag":484,"props":602,"children":604},{"class":486,"line":603},5,[605,610,616,620,624,628,633,637],{"type":45,"tag":484,"props":606,"children":607},{"style":491},[608],{"type":50,"value":609},"    \"",{"type":45,"tag":484,"props":611,"children":613},{"style":612},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[614],{"type":50,"value":615},"directory",{"type":45,"tag":484,"props":617,"children":618},{"style":491},[619],{"type":50,"value":513},{"type":45,"tag":484,"props":621,"children":622},{"style":491},[623],{"type":50,"value":473},{"type":45,"tag":484,"props":625,"children":626},{"style":491},[627],{"type":50,"value":522},{"type":45,"tag":484,"props":629,"children":630},{"style":525},[631],{"type":50,"value":632},".\u002Fpublic",{"type":45,"tag":484,"props":634,"children":635},{"style":491},[636],{"type":50,"value":513},{"type":45,"tag":484,"props":638,"children":639},{"style":491},[640],{"type":50,"value":537},{"type":45,"tag":484,"props":642,"children":644},{"class":486,"line":643},6,[645,649,654,658,662,666,671,675],{"type":45,"tag":484,"props":646,"children":647},{"style":491},[648],{"type":50,"value":609},{"type":45,"tag":484,"props":650,"children":651},{"style":612},[652],{"type":50,"value":653},"html_handling",{"type":45,"tag":484,"props":655,"children":656},{"style":491},[657],{"type":50,"value":513},{"type":45,"tag":484,"props":659,"children":660},{"style":491},[661],{"type":50,"value":473},{"type":45,"tag":484,"props":663,"children":664},{"style":491},[665],{"type":50,"value":522},{"type":45,"tag":484,"props":667,"children":668},{"style":525},[669],{"type":50,"value":670},"auto-trailing-slash",{"type":45,"tag":484,"props":672,"children":673},{"style":491},[674],{"type":50,"value":513},{"type":45,"tag":484,"props":676,"children":677},{"style":491},[678],{"type":50,"value":537},{"type":45,"tag":484,"props":680,"children":682},{"class":486,"line":681},7,[683,687,692,696,700,704,709],{"type":45,"tag":484,"props":684,"children":685},{"style":491},[686],{"type":50,"value":609},{"type":45,"tag":484,"props":688,"children":689},{"style":612},[690],{"type":50,"value":691},"not_found_handling",{"type":45,"tag":484,"props":693,"children":694},{"style":491},[695],{"type":50,"value":513},{"type":45,"tag":484,"props":697,"children":698},{"style":491},[699],{"type":50,"value":473},{"type":45,"tag":484,"props":701,"children":702},{"style":491},[703],{"type":50,"value":522},{"type":45,"tag":484,"props":705,"children":706},{"style":525},[707],{"type":50,"value":708},"single-page-application",{"type":45,"tag":484,"props":710,"children":711},{"style":491},[712],{"type":50,"value":713},"\"\n",{"type":45,"tag":484,"props":715,"children":717},{"class":486,"line":716},8,[718],{"type":45,"tag":484,"props":719,"children":720},{"style":491},[721],{"type":50,"value":722},"  }\n",{"type":45,"tag":484,"props":724,"children":726},{"class":486,"line":725},9,[727],{"type":45,"tag":484,"props":728,"children":729},{"style":491},[730],{"type":50,"value":731},"}\n",{"type":45,"tag":46,"props":733,"children":734},{},[735],{"type":50,"value":736},"Notes:",{"type":45,"tag":301,"props":738,"children":739},{},[740,778,795,808,833],{"type":45,"tag":118,"props":741,"children":742},{},[743,748,750,755,756,762,763,769,770,776],{"type":45,"tag":53,"props":744,"children":746},{"className":745},[],[747],{"type":50,"value":164},{"type":50,"value":749}," is required when there's any server code. The bundler also auto-detects ",{"type":45,"tag":53,"props":751,"children":753},{"className":752},[],[754],{"type":50,"value":528},{"type":50,"value":166},{"type":45,"tag":53,"props":757,"children":759},{"className":758},[],[760],{"type":50,"value":761},"src\u002Findex.js",{"type":50,"value":166},{"type":45,"tag":53,"props":764,"children":766},{"className":765},[],[767],{"type":50,"value":768},"index.ts",{"type":50,"value":166},{"type":45,"tag":53,"props":771,"children":773},{"className":772},[],[774],{"type":50,"value":775},"index.js",{"type":50,"value":777}," if missing.",{"type":45,"tag":118,"props":779,"children":780},{},[781,786,788,793],{"type":45,"tag":53,"props":782,"children":784},{"className":783},[],[785],{"type":50,"value":172},{"type":50,"value":787}," defaults to ",{"type":45,"tag":53,"props":789,"children":791},{"className":790},[],[792],{"type":50,"value":566},{"type":50,"value":794}," if omitted. Set it explicitly for newer features.",{"type":45,"tag":118,"props":796,"children":797},{},[798,800,806],{"type":50,"value":799},"Add ",{"type":45,"tag":53,"props":801,"children":803},{"className":802},[],[804],{"type":50,"value":805},"\"compatibility_flags\": [\"nodejs_compat\"]",{"type":50,"value":807}," only if you actually need Node built-ins.",{"type":45,"tag":118,"props":809,"children":810},{},[811,817,819,824,826,831],{"type":45,"tag":53,"props":812,"children":814},{"className":813},[],[815],{"type":50,"value":816},"assets.directory",{"type":50,"value":818}," is the ",{"type":45,"tag":290,"props":820,"children":821},{},[822],{"type":50,"value":823},"only",{"type":50,"value":825}," way to ship static files. Files outside this directory are bundled into the Worker or ignored — they will ",{"type":45,"tag":290,"props":827,"children":828},{},[829],{"type":50,"value":830},"not",{"type":50,"value":832}," be reachable via URL.",{"type":45,"tag":118,"props":834,"children":835},{},[836,842,844,850,852,858],{"type":45,"tag":53,"props":837,"children":839},{"className":838},[],[840],{"type":50,"value":841},"html_handling: \"auto-trailing-slash\"",{"type":50,"value":843}," is usually what you want for multi-page sites; SPAs should also set ",{"type":45,"tag":53,"props":845,"children":847},{"className":846},[],[848],{"type":50,"value":849},"not_found_handling: \"single-page-application\"",{"type":50,"value":851}," so deep links return ",{"type":45,"tag":53,"props":853,"children":855},{"className":854},[],[856],{"type":50,"value":857},"index.html",{"type":50,"value":189},{"type":45,"tag":46,"props":860,"children":861},{},[862,864,869,871,876],{"type":50,"value":863},"TOML works too (",{"type":45,"tag":53,"props":865,"children":867},{"className":866},[],[868],{"type":50,"value":156},{"type":50,"value":870},"), but the parser only handles top-level scalar fields plus an ",{"type":45,"tag":53,"props":872,"children":874},{"className":873},[],[875],{"type":50,"value":187},{"type":50,"value":877}," table — no inline tables, no env overrides. Prefer JSON.",{"type":45,"tag":94,"props":879,"children":881},{"id":880},"server-entry-one-durable-object-class-named-app",[882,884],{"type":50,"value":883},"Server entry: one Durable Object class named ",{"type":45,"tag":53,"props":885,"children":887},{"className":886},[],[888],{"type":50,"value":889},"App",{"type":45,"tag":46,"props":891,"children":892},{},[893,898,900,905,907,913,915,924,926,932],{"type":45,"tag":290,"props":894,"children":895},{},[896],{"type":50,"value":897},"Your entire backend is one Durable Object.",{"type":50,"value":899}," Your main module exports\na class named ",{"type":45,"tag":53,"props":901,"children":903},{"className":902},[],[904],{"type":50,"value":889},{"type":50,"value":906}," extending ",{"type":45,"tag":53,"props":908,"children":910},{"className":909},[],[911],{"type":50,"value":912},"DurableObject",{"type":50,"value":914},". The platform loads it as\na ",{"type":45,"tag":916,"props":917,"children":921},"a",{"href":918,"rel":919},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdynamic-workers\u002Fusage\u002Fdurable-object-facets\u002F",[920],"nofollow",[922],{"type":50,"value":923},"Cloudflare Durable Object\nFacet",{"type":50,"value":925},"\nof the host SpaceDO and forwards every non-asset request — including\nWebSocket upgrades — to your ",{"type":45,"tag":53,"props":927,"children":929},{"className":928},[],[930],{"type":50,"value":931},"App.fetch(request)",{"type":50,"value":189},{"type":45,"tag":46,"props":934,"children":935},{},[936,948],{"type":45,"tag":290,"props":937,"children":938},{},[939,941,947],{"type":50,"value":940},"Do not ",{"type":45,"tag":53,"props":942,"children":944},{"className":943},[],[945],{"type":50,"value":946},"export default { fetch }",{"type":50,"value":189},{"type":50,"value":949}," A default fetch handler will be\nignored. There is no separate worker; the DO is the worker.",{"type":45,"tag":410,"props":951,"children":955},{"className":952,"code":953,"language":954,"meta":418,"style":418},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F src\u002Findex.ts\nimport { DurableObject } from \"cloudflare:workers\";\n\nexport class App extends DurableObject {\n  async fetch(request: Request): Promise\u003CResponse> {\n    const url = new URL(request.url);\n\n    \u002F\u002F Lazy schema init on the first request. Idempotent.\n    this.ctx.storage.sql.exec(`\n      CREATE TABLE IF NOT EXISTS notes (\n        id INTEGER PRIMARY KEY AUTOINCREMENT,\n        body TEXT NOT NULL\n      )\n    `);\n\n    if (url.pathname === \"\u002Fapi\u002Fnotes\" && request.method === \"POST\") {\n      const { body } = await request.json\u003C{ body: string }>();\n      this.ctx.storage.sql.exec(`INSERT INTO notes (body) VALUES (?)`, body);\n      return new Response(null, { status: 201 });\n    }\n    if (url.pathname === \"\u002Fapi\u002Fnotes\") {\n      const rows = this.ctx.storage.sql\n        .exec(`SELECT id, body FROM notes ORDER BY id DESC`)\n        .toArray();\n      return Response.json(rows);\n    }\n    return new Response(\"Not found\", { status: 404 });\n  }\n}\n","ts",[956],{"type":45,"tag":53,"props":957,"children":958},{"__ignoreMap":418},[959,968,1016,1025,1056,1119,1174,1181,1189,1238,1247,1256,1265,1274,1291,1299,1388,1463,1535,1593,1602,1650,1693,1728,1749,1786,1794,1861,1869],{"type":45,"tag":484,"props":960,"children":961},{"class":486,"line":487},[962],{"type":45,"tag":484,"props":963,"children":965},{"style":964},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[966],{"type":50,"value":967},"\u002F\u002F src\u002Findex.ts\n",{"type":45,"tag":484,"props":969,"children":970},{"class":486,"line":497},[971,977,982,988,993,998,1002,1007,1011],{"type":45,"tag":484,"props":972,"children":974},{"style":973},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[975],{"type":50,"value":976},"import",{"type":45,"tag":484,"props":978,"children":979},{"style":491},[980],{"type":50,"value":981}," {",{"type":45,"tag":484,"props":983,"children":985},{"style":984},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[986],{"type":50,"value":987}," DurableObject",{"type":45,"tag":484,"props":989,"children":990},{"style":491},[991],{"type":50,"value":992}," }",{"type":45,"tag":484,"props":994,"children":995},{"style":973},[996],{"type":50,"value":997}," from",{"type":45,"tag":484,"props":999,"children":1000},{"style":491},[1001],{"type":50,"value":522},{"type":45,"tag":484,"props":1003,"children":1004},{"style":525},[1005],{"type":50,"value":1006},"cloudflare:workers",{"type":45,"tag":484,"props":1008,"children":1009},{"style":491},[1010],{"type":50,"value":513},{"type":45,"tag":484,"props":1012,"children":1013},{"style":491},[1014],{"type":50,"value":1015},";\n",{"type":45,"tag":484,"props":1017,"children":1018},{"class":486,"line":540},[1019],{"type":45,"tag":484,"props":1020,"children":1022},{"emptyLinePlaceholder":1021},true,[1023],{"type":50,"value":1024},"\n",{"type":45,"tag":484,"props":1026,"children":1027},{"class":486,"line":577},[1028,1033,1038,1043,1048,1052],{"type":45,"tag":484,"props":1029,"children":1030},{"style":973},[1031],{"type":50,"value":1032},"export",{"type":45,"tag":484,"props":1034,"children":1035},{"style":506},[1036],{"type":50,"value":1037}," class",{"type":45,"tag":484,"props":1039,"children":1040},{"style":612},[1041],{"type":50,"value":1042}," App",{"type":45,"tag":484,"props":1044,"children":1045},{"style":506},[1046],{"type":50,"value":1047}," extends",{"type":45,"tag":484,"props":1049,"children":1050},{"style":612},[1051],{"type":50,"value":987},{"type":45,"tag":484,"props":1053,"children":1054},{"style":491},[1055],{"type":50,"value":600},{"type":45,"tag":484,"props":1057,"children":1058},{"class":486,"line":603},[1059,1064,1070,1075,1081,1085,1090,1095,1100,1105,1110,1115],{"type":45,"tag":484,"props":1060,"children":1061},{"style":506},[1062],{"type":50,"value":1063},"  async",{"type":45,"tag":484,"props":1065,"children":1067},{"style":1066},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1068],{"type":50,"value":1069}," fetch",{"type":45,"tag":484,"props":1071,"children":1072},{"style":491},[1073],{"type":50,"value":1074},"(",{"type":45,"tag":484,"props":1076,"children":1078},{"style":1077},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1079],{"type":50,"value":1080},"request",{"type":45,"tag":484,"props":1082,"children":1083},{"style":491},[1084],{"type":50,"value":473},{"type":45,"tag":484,"props":1086,"children":1087},{"style":612},[1088],{"type":50,"value":1089}," Request",{"type":45,"tag":484,"props":1091,"children":1092},{"style":491},[1093],{"type":50,"value":1094},"):",{"type":45,"tag":484,"props":1096,"children":1097},{"style":612},[1098],{"type":50,"value":1099}," Promise",{"type":45,"tag":484,"props":1101,"children":1102},{"style":491},[1103],{"type":50,"value":1104},"\u003C",{"type":45,"tag":484,"props":1106,"children":1107},{"style":612},[1108],{"type":50,"value":1109},"Response",{"type":45,"tag":484,"props":1111,"children":1112},{"style":491},[1113],{"type":50,"value":1114},">",{"type":45,"tag":484,"props":1116,"children":1117},{"style":491},[1118],{"type":50,"value":600},{"type":45,"tag":484,"props":1120,"children":1121},{"class":486,"line":643},[1122,1127,1132,1137,1142,1148,1152,1156,1160,1165,1170],{"type":45,"tag":484,"props":1123,"children":1124},{"style":506},[1125],{"type":50,"value":1126},"    const",{"type":45,"tag":484,"props":1128,"children":1129},{"style":984},[1130],{"type":50,"value":1131}," url",{"type":45,"tag":484,"props":1133,"children":1134},{"style":491},[1135],{"type":50,"value":1136}," =",{"type":45,"tag":484,"props":1138,"children":1139},{"style":491},[1140],{"type":50,"value":1141}," new",{"type":45,"tag":484,"props":1143,"children":1145},{"style":1144},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1146],{"type":50,"value":1147}," URL",{"type":45,"tag":484,"props":1149,"children":1150},{"style":1066},[1151],{"type":50,"value":1074},{"type":45,"tag":484,"props":1153,"children":1154},{"style":984},[1155],{"type":50,"value":1080},{"type":45,"tag":484,"props":1157,"children":1158},{"style":491},[1159],{"type":50,"value":189},{"type":45,"tag":484,"props":1161,"children":1162},{"style":984},[1163],{"type":50,"value":1164},"url",{"type":45,"tag":484,"props":1166,"children":1167},{"style":1066},[1168],{"type":50,"value":1169},")",{"type":45,"tag":484,"props":1171,"children":1172},{"style":491},[1173],{"type":50,"value":1015},{"type":45,"tag":484,"props":1175,"children":1176},{"class":486,"line":681},[1177],{"type":45,"tag":484,"props":1178,"children":1179},{"emptyLinePlaceholder":1021},[1180],{"type":50,"value":1024},{"type":45,"tag":484,"props":1182,"children":1183},{"class":486,"line":716},[1184],{"type":45,"tag":484,"props":1185,"children":1186},{"style":964},[1187],{"type":50,"value":1188},"    \u002F\u002F Lazy schema init on the first request. Idempotent.\n",{"type":45,"tag":484,"props":1190,"children":1191},{"class":486,"line":725},[1192,1197,1202,1206,1211,1215,1220,1224,1229,1233],{"type":45,"tag":484,"props":1193,"children":1194},{"style":491},[1195],{"type":50,"value":1196},"    this.",{"type":45,"tag":484,"props":1198,"children":1199},{"style":984},[1200],{"type":50,"value":1201},"ctx",{"type":45,"tag":484,"props":1203,"children":1204},{"style":491},[1205],{"type":50,"value":189},{"type":45,"tag":484,"props":1207,"children":1208},{"style":984},[1209],{"type":50,"value":1210},"storage",{"type":45,"tag":484,"props":1212,"children":1213},{"style":491},[1214],{"type":50,"value":189},{"type":45,"tag":484,"props":1216,"children":1217},{"style":984},[1218],{"type":50,"value":1219},"sql",{"type":45,"tag":484,"props":1221,"children":1222},{"style":491},[1223],{"type":50,"value":189},{"type":45,"tag":484,"props":1225,"children":1226},{"style":1144},[1227],{"type":50,"value":1228},"exec",{"type":45,"tag":484,"props":1230,"children":1231},{"style":1066},[1232],{"type":50,"value":1074},{"type":45,"tag":484,"props":1234,"children":1235},{"style":491},[1236],{"type":50,"value":1237},"`\n",{"type":45,"tag":484,"props":1239,"children":1241},{"class":486,"line":1240},10,[1242],{"type":45,"tag":484,"props":1243,"children":1244},{"style":525},[1245],{"type":50,"value":1246},"      CREATE TABLE IF NOT EXISTS notes (\n",{"type":45,"tag":484,"props":1248,"children":1250},{"class":486,"line":1249},11,[1251],{"type":45,"tag":484,"props":1252,"children":1253},{"style":525},[1254],{"type":50,"value":1255},"        id INTEGER PRIMARY KEY AUTOINCREMENT,\n",{"type":45,"tag":484,"props":1257,"children":1259},{"class":486,"line":1258},12,[1260],{"type":45,"tag":484,"props":1261,"children":1262},{"style":525},[1263],{"type":50,"value":1264},"        body TEXT NOT NULL\n",{"type":45,"tag":484,"props":1266,"children":1268},{"class":486,"line":1267},13,[1269],{"type":45,"tag":484,"props":1270,"children":1271},{"style":525},[1272],{"type":50,"value":1273},"      )\n",{"type":45,"tag":484,"props":1275,"children":1277},{"class":486,"line":1276},14,[1278,1283,1287],{"type":45,"tag":484,"props":1279,"children":1280},{"style":491},[1281],{"type":50,"value":1282},"    `",{"type":45,"tag":484,"props":1284,"children":1285},{"style":1066},[1286],{"type":50,"value":1169},{"type":45,"tag":484,"props":1288,"children":1289},{"style":491},[1290],{"type":50,"value":1015},{"type":45,"tag":484,"props":1292,"children":1294},{"class":486,"line":1293},15,[1295],{"type":45,"tag":484,"props":1296,"children":1297},{"emptyLinePlaceholder":1021},[1298],{"type":50,"value":1024},{"type":45,"tag":484,"props":1300,"children":1302},{"class":486,"line":1301},16,[1303,1308,1312,1316,1320,1325,1330,1334,1339,1343,1348,1353,1357,1362,1366,1370,1375,1379,1384],{"type":45,"tag":484,"props":1304,"children":1305},{"style":973},[1306],{"type":50,"value":1307},"    if",{"type":45,"tag":484,"props":1309,"children":1310},{"style":1066},[1311],{"type":50,"value":60},{"type":45,"tag":484,"props":1313,"children":1314},{"style":984},[1315],{"type":50,"value":1164},{"type":45,"tag":484,"props":1317,"children":1318},{"style":491},[1319],{"type":50,"value":189},{"type":45,"tag":484,"props":1321,"children":1322},{"style":984},[1323],{"type":50,"value":1324},"pathname",{"type":45,"tag":484,"props":1326,"children":1327},{"style":491},[1328],{"type":50,"value":1329}," ===",{"type":45,"tag":484,"props":1331,"children":1332},{"style":491},[1333],{"type":50,"value":522},{"type":45,"tag":484,"props":1335,"children":1336},{"style":525},[1337],{"type":50,"value":1338},"\u002Fapi\u002Fnotes",{"type":45,"tag":484,"props":1340,"children":1341},{"style":491},[1342],{"type":50,"value":513},{"type":45,"tag":484,"props":1344,"children":1345},{"style":491},[1346],{"type":50,"value":1347}," &&",{"type":45,"tag":484,"props":1349,"children":1350},{"style":984},[1351],{"type":50,"value":1352}," request",{"type":45,"tag":484,"props":1354,"children":1355},{"style":491},[1356],{"type":50,"value":189},{"type":45,"tag":484,"props":1358,"children":1359},{"style":984},[1360],{"type":50,"value":1361},"method",{"type":45,"tag":484,"props":1363,"children":1364},{"style":491},[1365],{"type":50,"value":1329},{"type":45,"tag":484,"props":1367,"children":1368},{"style":491},[1369],{"type":50,"value":522},{"type":45,"tag":484,"props":1371,"children":1372},{"style":525},[1373],{"type":50,"value":1374},"POST",{"type":45,"tag":484,"props":1376,"children":1377},{"style":491},[1378],{"type":50,"value":513},{"type":45,"tag":484,"props":1380,"children":1381},{"style":1066},[1382],{"type":50,"value":1383},") ",{"type":45,"tag":484,"props":1385,"children":1386},{"style":491},[1387],{"type":50,"value":494},{"type":45,"tag":484,"props":1389,"children":1391},{"class":486,"line":1390},17,[1392,1397,1401,1406,1410,1414,1419,1423,1427,1431,1436,1440,1444,1449,1454,1459],{"type":45,"tag":484,"props":1393,"children":1394},{"style":506},[1395],{"type":50,"value":1396},"      const",{"type":45,"tag":484,"props":1398,"children":1399},{"style":491},[1400],{"type":50,"value":981},{"type":45,"tag":484,"props":1402,"children":1403},{"style":984},[1404],{"type":50,"value":1405}," body",{"type":45,"tag":484,"props":1407,"children":1408},{"style":491},[1409],{"type":50,"value":992},{"type":45,"tag":484,"props":1411,"children":1412},{"style":491},[1413],{"type":50,"value":1136},{"type":45,"tag":484,"props":1415,"children":1416},{"style":973},[1417],{"type":50,"value":1418}," await",{"type":45,"tag":484,"props":1420,"children":1421},{"style":984},[1422],{"type":50,"value":1352},{"type":45,"tag":484,"props":1424,"children":1425},{"style":491},[1426],{"type":50,"value":189},{"type":45,"tag":484,"props":1428,"children":1429},{"style":1144},[1430],{"type":50,"value":478},{"type":45,"tag":484,"props":1432,"children":1433},{"style":491},[1434],{"type":50,"value":1435},"\u003C{",{"type":45,"tag":484,"props":1437,"children":1438},{"style":1066},[1439],{"type":50,"value":1405},{"type":45,"tag":484,"props":1441,"children":1442},{"style":491},[1443],{"type":50,"value":473},{"type":45,"tag":484,"props":1445,"children":1446},{"style":612},[1447],{"type":50,"value":1448}," string",{"type":45,"tag":484,"props":1450,"children":1451},{"style":491},[1452],{"type":50,"value":1453}," }>",{"type":45,"tag":484,"props":1455,"children":1456},{"style":1066},[1457],{"type":50,"value":1458},"()",{"type":45,"tag":484,"props":1460,"children":1461},{"style":491},[1462],{"type":50,"value":1015},{"type":45,"tag":484,"props":1464,"children":1466},{"class":486,"line":1465},18,[1467,1472,1476,1480,1484,1488,1492,1496,1500,1504,1509,1514,1518,1523,1527,1531],{"type":45,"tag":484,"props":1468,"children":1469},{"style":491},[1470],{"type":50,"value":1471},"      this.",{"type":45,"tag":484,"props":1473,"children":1474},{"style":984},[1475],{"type":50,"value":1201},{"type":45,"tag":484,"props":1477,"children":1478},{"style":491},[1479],{"type":50,"value":189},{"type":45,"tag":484,"props":1481,"children":1482},{"style":984},[1483],{"type":50,"value":1210},{"type":45,"tag":484,"props":1485,"children":1486},{"style":491},[1487],{"type":50,"value":189},{"type":45,"tag":484,"props":1489,"children":1490},{"style":984},[1491],{"type":50,"value":1219},{"type":45,"tag":484,"props":1493,"children":1494},{"style":491},[1495],{"type":50,"value":189},{"type":45,"tag":484,"props":1497,"children":1498},{"style":1144},[1499],{"type":50,"value":1228},{"type":45,"tag":484,"props":1501,"children":1502},{"style":1066},[1503],{"type":50,"value":1074},{"type":45,"tag":484,"props":1505,"children":1506},{"style":491},[1507],{"type":50,"value":1508},"`",{"type":45,"tag":484,"props":1510,"children":1511},{"style":525},[1512],{"type":50,"value":1513},"INSERT INTO notes (body) VALUES (?)",{"type":45,"tag":484,"props":1515,"children":1516},{"style":491},[1517],{"type":50,"value":1508},{"type":45,"tag":484,"props":1519,"children":1520},{"style":491},[1521],{"type":50,"value":1522},",",{"type":45,"tag":484,"props":1524,"children":1525},{"style":984},[1526],{"type":50,"value":1405},{"type":45,"tag":484,"props":1528,"children":1529},{"style":1066},[1530],{"type":50,"value":1169},{"type":45,"tag":484,"props":1532,"children":1533},{"style":491},[1534],{"type":50,"value":1015},{"type":45,"tag":484,"props":1536,"children":1538},{"class":486,"line":1537},19,[1539,1544,1548,1553,1557,1562,1566,1571,1575,1581,1585,1589],{"type":45,"tag":484,"props":1540,"children":1541},{"style":973},[1542],{"type":50,"value":1543},"      return",{"type":45,"tag":484,"props":1545,"children":1546},{"style":491},[1547],{"type":50,"value":1141},{"type":45,"tag":484,"props":1549,"children":1550},{"style":1144},[1551],{"type":50,"value":1552}," Response",{"type":45,"tag":484,"props":1554,"children":1555},{"style":1066},[1556],{"type":50,"value":1074},{"type":45,"tag":484,"props":1558,"children":1559},{"style":491},[1560],{"type":50,"value":1561},"null,",{"type":45,"tag":484,"props":1563,"children":1564},{"style":491},[1565],{"type":50,"value":981},{"type":45,"tag":484,"props":1567,"children":1568},{"style":1066},[1569],{"type":50,"value":1570}," status",{"type":45,"tag":484,"props":1572,"children":1573},{"style":491},[1574],{"type":50,"value":473},{"type":45,"tag":484,"props":1576,"children":1578},{"style":1577},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1579],{"type":50,"value":1580}," 201",{"type":45,"tag":484,"props":1582,"children":1583},{"style":491},[1584],{"type":50,"value":992},{"type":45,"tag":484,"props":1586,"children":1587},{"style":1066},[1588],{"type":50,"value":1169},{"type":45,"tag":484,"props":1590,"children":1591},{"style":491},[1592],{"type":50,"value":1015},{"type":45,"tag":484,"props":1594,"children":1596},{"class":486,"line":1595},20,[1597],{"type":45,"tag":484,"props":1598,"children":1599},{"style":491},[1600],{"type":50,"value":1601},"    }\n",{"type":45,"tag":484,"props":1603,"children":1605},{"class":486,"line":1604},21,[1606,1610,1614,1618,1622,1626,1630,1634,1638,1642,1646],{"type":45,"tag":484,"props":1607,"children":1608},{"style":973},[1609],{"type":50,"value":1307},{"type":45,"tag":484,"props":1611,"children":1612},{"style":1066},[1613],{"type":50,"value":60},{"type":45,"tag":484,"props":1615,"children":1616},{"style":984},[1617],{"type":50,"value":1164},{"type":45,"tag":484,"props":1619,"children":1620},{"style":491},[1621],{"type":50,"value":189},{"type":45,"tag":484,"props":1623,"children":1624},{"style":984},[1625],{"type":50,"value":1324},{"type":45,"tag":484,"props":1627,"children":1628},{"style":491},[1629],{"type":50,"value":1329},{"type":45,"tag":484,"props":1631,"children":1632},{"style":491},[1633],{"type":50,"value":522},{"type":45,"tag":484,"props":1635,"children":1636},{"style":525},[1637],{"type":50,"value":1338},{"type":45,"tag":484,"props":1639,"children":1640},{"style":491},[1641],{"type":50,"value":513},{"type":45,"tag":484,"props":1643,"children":1644},{"style":1066},[1645],{"type":50,"value":1383},{"type":45,"tag":484,"props":1647,"children":1648},{"style":491},[1649],{"type":50,"value":494},{"type":45,"tag":484,"props":1651,"children":1653},{"class":486,"line":1652},22,[1654,1658,1663,1667,1672,1676,1680,1684,1688],{"type":45,"tag":484,"props":1655,"children":1656},{"style":506},[1657],{"type":50,"value":1396},{"type":45,"tag":484,"props":1659,"children":1660},{"style":984},[1661],{"type":50,"value":1662}," rows",{"type":45,"tag":484,"props":1664,"children":1665},{"style":491},[1666],{"type":50,"value":1136},{"type":45,"tag":484,"props":1668,"children":1669},{"style":491},[1670],{"type":50,"value":1671}," this.",{"type":45,"tag":484,"props":1673,"children":1674},{"style":984},[1675],{"type":50,"value":1201},{"type":45,"tag":484,"props":1677,"children":1678},{"style":491},[1679],{"type":50,"value":189},{"type":45,"tag":484,"props":1681,"children":1682},{"style":984},[1683],{"type":50,"value":1210},{"type":45,"tag":484,"props":1685,"children":1686},{"style":491},[1687],{"type":50,"value":189},{"type":45,"tag":484,"props":1689,"children":1690},{"style":984},[1691],{"type":50,"value":1692},"sql\n",{"type":45,"tag":484,"props":1694,"children":1696},{"class":486,"line":1695},23,[1697,1702,1706,1710,1714,1719,1723],{"type":45,"tag":484,"props":1698,"children":1699},{"style":491},[1700],{"type":50,"value":1701},"        .",{"type":45,"tag":484,"props":1703,"children":1704},{"style":1144},[1705],{"type":50,"value":1228},{"type":45,"tag":484,"props":1707,"children":1708},{"style":1066},[1709],{"type":50,"value":1074},{"type":45,"tag":484,"props":1711,"children":1712},{"style":491},[1713],{"type":50,"value":1508},{"type":45,"tag":484,"props":1715,"children":1716},{"style":525},[1717],{"type":50,"value":1718},"SELECT id, body FROM notes ORDER BY id DESC",{"type":45,"tag":484,"props":1720,"children":1721},{"style":491},[1722],{"type":50,"value":1508},{"type":45,"tag":484,"props":1724,"children":1725},{"style":1066},[1726],{"type":50,"value":1727},")\n",{"type":45,"tag":484,"props":1729,"children":1731},{"class":486,"line":1730},24,[1732,1736,1741,1745],{"type":45,"tag":484,"props":1733,"children":1734},{"style":491},[1735],{"type":50,"value":1701},{"type":45,"tag":484,"props":1737,"children":1738},{"style":1144},[1739],{"type":50,"value":1740},"toArray",{"type":45,"tag":484,"props":1742,"children":1743},{"style":1066},[1744],{"type":50,"value":1458},{"type":45,"tag":484,"props":1746,"children":1747},{"style":491},[1748],{"type":50,"value":1015},{"type":45,"tag":484,"props":1750,"children":1752},{"class":486,"line":1751},25,[1753,1757,1761,1765,1769,1773,1778,1782],{"type":45,"tag":484,"props":1754,"children":1755},{"style":973},[1756],{"type":50,"value":1543},{"type":45,"tag":484,"props":1758,"children":1759},{"style":984},[1760],{"type":50,"value":1552},{"type":45,"tag":484,"props":1762,"children":1763},{"style":491},[1764],{"type":50,"value":189},{"type":45,"tag":484,"props":1766,"children":1767},{"style":1144},[1768],{"type":50,"value":478},{"type":45,"tag":484,"props":1770,"children":1771},{"style":1066},[1772],{"type":50,"value":1074},{"type":45,"tag":484,"props":1774,"children":1775},{"style":984},[1776],{"type":50,"value":1777},"rows",{"type":45,"tag":484,"props":1779,"children":1780},{"style":1066},[1781],{"type":50,"value":1169},{"type":45,"tag":484,"props":1783,"children":1784},{"style":491},[1785],{"type":50,"value":1015},{"type":45,"tag":484,"props":1787,"children":1789},{"class":486,"line":1788},26,[1790],{"type":45,"tag":484,"props":1791,"children":1792},{"style":491},[1793],{"type":50,"value":1601},{"type":45,"tag":484,"props":1795,"children":1797},{"class":486,"line":1796},27,[1798,1803,1807,1811,1815,1819,1824,1828,1832,1836,1840,1844,1849,1853,1857],{"type":45,"tag":484,"props":1799,"children":1800},{"style":973},[1801],{"type":50,"value":1802},"    return",{"type":45,"tag":484,"props":1804,"children":1805},{"style":491},[1806],{"type":50,"value":1141},{"type":45,"tag":484,"props":1808,"children":1809},{"style":1144},[1810],{"type":50,"value":1552},{"type":45,"tag":484,"props":1812,"children":1813},{"style":1066},[1814],{"type":50,"value":1074},{"type":45,"tag":484,"props":1816,"children":1817},{"style":491},[1818],{"type":50,"value":513},{"type":45,"tag":484,"props":1820,"children":1821},{"style":525},[1822],{"type":50,"value":1823},"Not found",{"type":45,"tag":484,"props":1825,"children":1826},{"style":491},[1827],{"type":50,"value":513},{"type":45,"tag":484,"props":1829,"children":1830},{"style":491},[1831],{"type":50,"value":1522},{"type":45,"tag":484,"props":1833,"children":1834},{"style":491},[1835],{"type":50,"value":981},{"type":45,"tag":484,"props":1837,"children":1838},{"style":1066},[1839],{"type":50,"value":1570},{"type":45,"tag":484,"props":1841,"children":1842},{"style":491},[1843],{"type":50,"value":473},{"type":45,"tag":484,"props":1845,"children":1846},{"style":1577},[1847],{"type":50,"value":1848}," 404",{"type":45,"tag":484,"props":1850,"children":1851},{"style":491},[1852],{"type":50,"value":992},{"type":45,"tag":484,"props":1854,"children":1855},{"style":1066},[1856],{"type":50,"value":1169},{"type":45,"tag":484,"props":1858,"children":1859},{"style":491},[1860],{"type":50,"value":1015},{"type":45,"tag":484,"props":1862,"children":1864},{"class":486,"line":1863},28,[1865],{"type":45,"tag":484,"props":1866,"children":1867},{"style":491},[1868],{"type":50,"value":722},{"type":45,"tag":484,"props":1870,"children":1872},{"class":486,"line":1871},29,[1873],{"type":45,"tag":484,"props":1874,"children":1875},{"style":491},[1876],{"type":50,"value":731},{"type":45,"tag":46,"props":1878,"children":1879},{},[1880],{"type":50,"value":1881},"Or with Hono inside the DO:",{"type":45,"tag":410,"props":1883,"children":1885},{"className":952,"code":1884,"language":954,"meta":418,"style":418},"import { DurableObject } from \"cloudflare:workers\";\nimport { Hono } from \"hono\";\n\nexport class App extends DurableObject {\n  private app = new Hono()\n    .get(\"\u002Fapi\u002Fhello\", (c) => c.json({ msg: \"hi\" }))\n    .post(\"\u002Fapi\u002Fnotes\", async (c) => {\n      const { body } = await c.req.json\u003C{ body: string }>();\n      this.ctx.storage.sql.exec(`INSERT INTO notes (body) VALUES (?)`, body);\n      return c.json({ ok: true });\n    });\n\n  async fetch(request: Request) {\n    return this.app.fetch(request);\n  }\n}\n",[1886],{"type":45,"tag":53,"props":1887,"children":1888},{"__ignoreMap":418},[1889,1928,1969,1976,2003,2033,2138,2195,2271,2338,2392,2408,2415,2450,2491,2498],{"type":45,"tag":484,"props":1890,"children":1891},{"class":486,"line":487},[1892,1896,1900,1904,1908,1912,1916,1920,1924],{"type":45,"tag":484,"props":1893,"children":1894},{"style":973},[1895],{"type":50,"value":976},{"type":45,"tag":484,"props":1897,"children":1898},{"style":491},[1899],{"type":50,"value":981},{"type":45,"tag":484,"props":1901,"children":1902},{"style":984},[1903],{"type":50,"value":987},{"type":45,"tag":484,"props":1905,"children":1906},{"style":491},[1907],{"type":50,"value":992},{"type":45,"tag":484,"props":1909,"children":1910},{"style":973},[1911],{"type":50,"value":997},{"type":45,"tag":484,"props":1913,"children":1914},{"style":491},[1915],{"type":50,"value":522},{"type":45,"tag":484,"props":1917,"children":1918},{"style":525},[1919],{"type":50,"value":1006},{"type":45,"tag":484,"props":1921,"children":1922},{"style":491},[1923],{"type":50,"value":513},{"type":45,"tag":484,"props":1925,"children":1926},{"style":491},[1927],{"type":50,"value":1015},{"type":45,"tag":484,"props":1929,"children":1930},{"class":486,"line":497},[1931,1935,1939,1944,1948,1952,1956,1961,1965],{"type":45,"tag":484,"props":1932,"children":1933},{"style":973},[1934],{"type":50,"value":976},{"type":45,"tag":484,"props":1936,"children":1937},{"style":491},[1938],{"type":50,"value":981},{"type":45,"tag":484,"props":1940,"children":1941},{"style":984},[1942],{"type":50,"value":1943}," Hono",{"type":45,"tag":484,"props":1945,"children":1946},{"style":491},[1947],{"type":50,"value":992},{"type":45,"tag":484,"props":1949,"children":1950},{"style":973},[1951],{"type":50,"value":997},{"type":45,"tag":484,"props":1953,"children":1954},{"style":491},[1955],{"type":50,"value":522},{"type":45,"tag":484,"props":1957,"children":1958},{"style":525},[1959],{"type":50,"value":1960},"hono",{"type":45,"tag":484,"props":1962,"children":1963},{"style":491},[1964],{"type":50,"value":513},{"type":45,"tag":484,"props":1966,"children":1967},{"style":491},[1968],{"type":50,"value":1015},{"type":45,"tag":484,"props":1970,"children":1971},{"class":486,"line":540},[1972],{"type":45,"tag":484,"props":1973,"children":1974},{"emptyLinePlaceholder":1021},[1975],{"type":50,"value":1024},{"type":45,"tag":484,"props":1977,"children":1978},{"class":486,"line":577},[1979,1983,1987,1991,1995,1999],{"type":45,"tag":484,"props":1980,"children":1981},{"style":973},[1982],{"type":50,"value":1032},{"type":45,"tag":484,"props":1984,"children":1985},{"style":506},[1986],{"type":50,"value":1037},{"type":45,"tag":484,"props":1988,"children":1989},{"style":612},[1990],{"type":50,"value":1042},{"type":45,"tag":484,"props":1992,"children":1993},{"style":506},[1994],{"type":50,"value":1047},{"type":45,"tag":484,"props":1996,"children":1997},{"style":612},[1998],{"type":50,"value":987},{"type":45,"tag":484,"props":2000,"children":2001},{"style":491},[2002],{"type":50,"value":600},{"type":45,"tag":484,"props":2004,"children":2005},{"class":486,"line":603},[2006,2011,2016,2020,2024,2028],{"type":45,"tag":484,"props":2007,"children":2008},{"style":506},[2009],{"type":50,"value":2010},"  private",{"type":45,"tag":484,"props":2012,"children":2013},{"style":1066},[2014],{"type":50,"value":2015}," app",{"type":45,"tag":484,"props":2017,"children":2018},{"style":491},[2019],{"type":50,"value":1136},{"type":45,"tag":484,"props":2021,"children":2022},{"style":491},[2023],{"type":50,"value":1141},{"type":45,"tag":484,"props":2025,"children":2026},{"style":1066},[2027],{"type":50,"value":1943},{"type":45,"tag":484,"props":2029,"children":2030},{"style":984},[2031],{"type":50,"value":2032},"()\n",{"type":45,"tag":484,"props":2034,"children":2035},{"class":486,"line":643},[2036,2041,2046,2050,2054,2059,2063,2067,2071,2076,2080,2085,2090,2094,2098,2102,2107,2112,2116,2120,2125,2129,2133],{"type":45,"tag":484,"props":2037,"children":2038},{"style":491},[2039],{"type":50,"value":2040},"    .",{"type":45,"tag":484,"props":2042,"children":2043},{"style":1144},[2044],{"type":50,"value":2045},"get",{"type":45,"tag":484,"props":2047,"children":2048},{"style":984},[2049],{"type":50,"value":1074},{"type":45,"tag":484,"props":2051,"children":2052},{"style":491},[2053],{"type":50,"value":513},{"type":45,"tag":484,"props":2055,"children":2056},{"style":525},[2057],{"type":50,"value":2058},"\u002Fapi\u002Fhello",{"type":45,"tag":484,"props":2060,"children":2061},{"style":491},[2062],{"type":50,"value":513},{"type":45,"tag":484,"props":2064,"children":2065},{"style":491},[2066],{"type":50,"value":1522},{"type":45,"tag":484,"props":2068,"children":2069},{"style":491},[2070],{"type":50,"value":60},{"type":45,"tag":484,"props":2072,"children":2073},{"style":1077},[2074],{"type":50,"value":2075},"c",{"type":45,"tag":484,"props":2077,"children":2078},{"style":491},[2079],{"type":50,"value":1169},{"type":45,"tag":484,"props":2081,"children":2082},{"style":506},[2083],{"type":50,"value":2084}," =>",{"type":45,"tag":484,"props":2086,"children":2087},{"style":984},[2088],{"type":50,"value":2089}," c",{"type":45,"tag":484,"props":2091,"children":2092},{"style":491},[2093],{"type":50,"value":189},{"type":45,"tag":484,"props":2095,"children":2096},{"style":1144},[2097],{"type":50,"value":478},{"type":45,"tag":484,"props":2099,"children":2100},{"style":984},[2101],{"type":50,"value":1074},{"type":45,"tag":484,"props":2103,"children":2104},{"style":491},[2105],{"type":50,"value":2106},"{",{"type":45,"tag":484,"props":2108,"children":2109},{"style":1066},[2110],{"type":50,"value":2111}," msg",{"type":45,"tag":484,"props":2113,"children":2114},{"style":491},[2115],{"type":50,"value":473},{"type":45,"tag":484,"props":2117,"children":2118},{"style":491},[2119],{"type":50,"value":522},{"type":45,"tag":484,"props":2121,"children":2122},{"style":525},[2123],{"type":50,"value":2124},"hi",{"type":45,"tag":484,"props":2126,"children":2127},{"style":491},[2128],{"type":50,"value":513},{"type":45,"tag":484,"props":2130,"children":2131},{"style":491},[2132],{"type":50,"value":992},{"type":45,"tag":484,"props":2134,"children":2135},{"style":984},[2136],{"type":50,"value":2137},"))\n",{"type":45,"tag":484,"props":2139,"children":2140},{"class":486,"line":681},[2141,2145,2150,2154,2158,2162,2166,2170,2175,2179,2183,2187,2191],{"type":45,"tag":484,"props":2142,"children":2143},{"style":491},[2144],{"type":50,"value":2040},{"type":45,"tag":484,"props":2146,"children":2147},{"style":1144},[2148],{"type":50,"value":2149},"post",{"type":45,"tag":484,"props":2151,"children":2152},{"style":984},[2153],{"type":50,"value":1074},{"type":45,"tag":484,"props":2155,"children":2156},{"style":491},[2157],{"type":50,"value":513},{"type":45,"tag":484,"props":2159,"children":2160},{"style":525},[2161],{"type":50,"value":1338},{"type":45,"tag":484,"props":2163,"children":2164},{"style":491},[2165],{"type":50,"value":513},{"type":45,"tag":484,"props":2167,"children":2168},{"style":491},[2169],{"type":50,"value":1522},{"type":45,"tag":484,"props":2171,"children":2172},{"style":506},[2173],{"type":50,"value":2174}," async",{"type":45,"tag":484,"props":2176,"children":2177},{"style":491},[2178],{"type":50,"value":60},{"type":45,"tag":484,"props":2180,"children":2181},{"style":1077},[2182],{"type":50,"value":2075},{"type":45,"tag":484,"props":2184,"children":2185},{"style":491},[2186],{"type":50,"value":1169},{"type":45,"tag":484,"props":2188,"children":2189},{"style":506},[2190],{"type":50,"value":2084},{"type":45,"tag":484,"props":2192,"children":2193},{"style":491},[2194],{"type":50,"value":600},{"type":45,"tag":484,"props":2196,"children":2197},{"class":486,"line":716},[2198,2202,2206,2210,2214,2218,2222,2226,2230,2235,2239,2243,2247,2251,2255,2259,2263,2267],{"type":45,"tag":484,"props":2199,"children":2200},{"style":506},[2201],{"type":50,"value":1396},{"type":45,"tag":484,"props":2203,"children":2204},{"style":491},[2205],{"type":50,"value":981},{"type":45,"tag":484,"props":2207,"children":2208},{"style":984},[2209],{"type":50,"value":1405},{"type":45,"tag":484,"props":2211,"children":2212},{"style":491},[2213],{"type":50,"value":992},{"type":45,"tag":484,"props":2215,"children":2216},{"style":491},[2217],{"type":50,"value":1136},{"type":45,"tag":484,"props":2219,"children":2220},{"style":973},[2221],{"type":50,"value":1418},{"type":45,"tag":484,"props":2223,"children":2224},{"style":984},[2225],{"type":50,"value":2089},{"type":45,"tag":484,"props":2227,"children":2228},{"style":491},[2229],{"type":50,"value":189},{"type":45,"tag":484,"props":2231,"children":2232},{"style":984},[2233],{"type":50,"value":2234},"req",{"type":45,"tag":484,"props":2236,"children":2237},{"style":491},[2238],{"type":50,"value":189},{"type":45,"tag":484,"props":2240,"children":2241},{"style":1144},[2242],{"type":50,"value":478},{"type":45,"tag":484,"props":2244,"children":2245},{"style":491},[2246],{"type":50,"value":1435},{"type":45,"tag":484,"props":2248,"children":2249},{"style":1066},[2250],{"type":50,"value":1405},{"type":45,"tag":484,"props":2252,"children":2253},{"style":491},[2254],{"type":50,"value":473},{"type":45,"tag":484,"props":2256,"children":2257},{"style":612},[2258],{"type":50,"value":1448},{"type":45,"tag":484,"props":2260,"children":2261},{"style":491},[2262],{"type":50,"value":1453},{"type":45,"tag":484,"props":2264,"children":2265},{"style":1066},[2266],{"type":50,"value":1458},{"type":45,"tag":484,"props":2268,"children":2269},{"style":491},[2270],{"type":50,"value":1015},{"type":45,"tag":484,"props":2272,"children":2273},{"class":486,"line":725},[2274,2278,2282,2286,2290,2294,2298,2302,2306,2310,2314,2318,2322,2326,2330,2334],{"type":45,"tag":484,"props":2275,"children":2276},{"style":491},[2277],{"type":50,"value":1471},{"type":45,"tag":484,"props":2279,"children":2280},{"style":984},[2281],{"type":50,"value":1201},{"type":45,"tag":484,"props":2283,"children":2284},{"style":491},[2285],{"type":50,"value":189},{"type":45,"tag":484,"props":2287,"children":2288},{"style":984},[2289],{"type":50,"value":1210},{"type":45,"tag":484,"props":2291,"children":2292},{"style":491},[2293],{"type":50,"value":189},{"type":45,"tag":484,"props":2295,"children":2296},{"style":984},[2297],{"type":50,"value":1219},{"type":45,"tag":484,"props":2299,"children":2300},{"style":491},[2301],{"type":50,"value":189},{"type":45,"tag":484,"props":2303,"children":2304},{"style":1144},[2305],{"type":50,"value":1228},{"type":45,"tag":484,"props":2307,"children":2308},{"style":1066},[2309],{"type":50,"value":1074},{"type":45,"tag":484,"props":2311,"children":2312},{"style":491},[2313],{"type":50,"value":1508},{"type":45,"tag":484,"props":2315,"children":2316},{"style":525},[2317],{"type":50,"value":1513},{"type":45,"tag":484,"props":2319,"children":2320},{"style":491},[2321],{"type":50,"value":1508},{"type":45,"tag":484,"props":2323,"children":2324},{"style":491},[2325],{"type":50,"value":1522},{"type":45,"tag":484,"props":2327,"children":2328},{"style":984},[2329],{"type":50,"value":1405},{"type":45,"tag":484,"props":2331,"children":2332},{"style":1066},[2333],{"type":50,"value":1169},{"type":45,"tag":484,"props":2335,"children":2336},{"style":491},[2337],{"type":50,"value":1015},{"type":45,"tag":484,"props":2339,"children":2340},{"class":486,"line":1240},[2341,2345,2349,2353,2357,2361,2365,2370,2374,2380,2384,2388],{"type":45,"tag":484,"props":2342,"children":2343},{"style":973},[2344],{"type":50,"value":1543},{"type":45,"tag":484,"props":2346,"children":2347},{"style":984},[2348],{"type":50,"value":2089},{"type":45,"tag":484,"props":2350,"children":2351},{"style":491},[2352],{"type":50,"value":189},{"type":45,"tag":484,"props":2354,"children":2355},{"style":1144},[2356],{"type":50,"value":478},{"type":45,"tag":484,"props":2358,"children":2359},{"style":1066},[2360],{"type":50,"value":1074},{"type":45,"tag":484,"props":2362,"children":2363},{"style":491},[2364],{"type":50,"value":2106},{"type":45,"tag":484,"props":2366,"children":2367},{"style":1066},[2368],{"type":50,"value":2369}," ok",{"type":45,"tag":484,"props":2371,"children":2372},{"style":491},[2373],{"type":50,"value":473},{"type":45,"tag":484,"props":2375,"children":2377},{"style":2376},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2378],{"type":50,"value":2379}," true",{"type":45,"tag":484,"props":2381,"children":2382},{"style":491},[2383],{"type":50,"value":992},{"type":45,"tag":484,"props":2385,"children":2386},{"style":1066},[2387],{"type":50,"value":1169},{"type":45,"tag":484,"props":2389,"children":2390},{"style":491},[2391],{"type":50,"value":1015},{"type":45,"tag":484,"props":2393,"children":2394},{"class":486,"line":1249},[2395,2400,2404],{"type":45,"tag":484,"props":2396,"children":2397},{"style":491},[2398],{"type":50,"value":2399},"    }",{"type":45,"tag":484,"props":2401,"children":2402},{"style":984},[2403],{"type":50,"value":1169},{"type":45,"tag":484,"props":2405,"children":2406},{"style":491},[2407],{"type":50,"value":1015},{"type":45,"tag":484,"props":2409,"children":2410},{"class":486,"line":1258},[2411],{"type":45,"tag":484,"props":2412,"children":2413},{"emptyLinePlaceholder":1021},[2414],{"type":50,"value":1024},{"type":45,"tag":484,"props":2416,"children":2417},{"class":486,"line":1267},[2418,2422,2426,2430,2434,2438,2442,2446],{"type":45,"tag":484,"props":2419,"children":2420},{"style":506},[2421],{"type":50,"value":1063},{"type":45,"tag":484,"props":2423,"children":2424},{"style":1066},[2425],{"type":50,"value":1069},{"type":45,"tag":484,"props":2427,"children":2428},{"style":491},[2429],{"type":50,"value":1074},{"type":45,"tag":484,"props":2431,"children":2432},{"style":1077},[2433],{"type":50,"value":1080},{"type":45,"tag":484,"props":2435,"children":2436},{"style":491},[2437],{"type":50,"value":473},{"type":45,"tag":484,"props":2439,"children":2440},{"style":612},[2441],{"type":50,"value":1089},{"type":45,"tag":484,"props":2443,"children":2444},{"style":491},[2445],{"type":50,"value":1169},{"type":45,"tag":484,"props":2447,"children":2448},{"style":491},[2449],{"type":50,"value":600},{"type":45,"tag":484,"props":2451,"children":2452},{"class":486,"line":1276},[2453,2457,2461,2466,2470,2475,2479,2483,2487],{"type":45,"tag":484,"props":2454,"children":2455},{"style":973},[2456],{"type":50,"value":1802},{"type":45,"tag":484,"props":2458,"children":2459},{"style":491},[2460],{"type":50,"value":1671},{"type":45,"tag":484,"props":2462,"children":2463},{"style":984},[2464],{"type":50,"value":2465},"app",{"type":45,"tag":484,"props":2467,"children":2468},{"style":491},[2469],{"type":50,"value":189},{"type":45,"tag":484,"props":2471,"children":2472},{"style":1144},[2473],{"type":50,"value":2474},"fetch",{"type":45,"tag":484,"props":2476,"children":2477},{"style":1066},[2478],{"type":50,"value":1074},{"type":45,"tag":484,"props":2480,"children":2481},{"style":984},[2482],{"type":50,"value":1080},{"type":45,"tag":484,"props":2484,"children":2485},{"style":1066},[2486],{"type":50,"value":1169},{"type":45,"tag":484,"props":2488,"children":2489},{"style":491},[2490],{"type":50,"value":1015},{"type":45,"tag":484,"props":2492,"children":2493},{"class":486,"line":1293},[2494],{"type":45,"tag":484,"props":2495,"children":2496},{"style":491},[2497],{"type":50,"value":722},{"type":45,"tag":484,"props":2499,"children":2500},{"class":486,"line":1301},[2501],{"type":45,"tag":484,"props":2502,"children":2503},{"style":491},[2504],{"type":50,"value":731},{"type":45,"tag":46,"props":2506,"children":2507},{},[2508,2509,2514,2516,2521,2523,2528,2530,2535,2536,2542,2544,2550],{"type":50,"value":104},{"type":45,"tag":53,"props":2510,"children":2512},{"className":2511},[],[2513],{"type":50,"value":187},{"type":50,"value":2515}," is configured, static files take priority — your ",{"type":45,"tag":53,"props":2517,"children":2519},{"className":2518},[],[2520],{"type":50,"value":2474},{"type":50,"value":2522},"\nonly sees requests that didn't match an asset. For a SPA, put\n",{"type":45,"tag":53,"props":2524,"children":2526},{"className":2525},[],[2527],{"type":50,"value":857},{"type":50,"value":2529}," in ",{"type":45,"tag":53,"props":2531,"children":2533},{"className":2532},[],[2534],{"type":50,"value":446},{"type":50,"value":319},{"type":45,"tag":53,"props":2537,"children":2539},{"className":2538},[],[2540],{"type":50,"value":2541},"App.fetch",{"type":50,"value":2543}," only handles ",{"type":45,"tag":53,"props":2545,"children":2547},{"className":2546},[],[2548],{"type":50,"value":2549},"\u002Fapi\u002F*",{"type":50,"value":189},{"type":45,"tag":2552,"props":2553,"children":2555},"h3",{"id":2554},"state-and-storage",[2556],{"type":50,"value":2557},"State and storage",{"type":45,"tag":46,"props":2559,"children":2560},{},[2561,2563,2569,2571,2577],{"type":50,"value":2562},"State lives on ",{"type":45,"tag":53,"props":2564,"children":2566},{"className":2565},[],[2567],{"type":50,"value":2568},"this.ctx.storage",{"type":50,"value":2570},". No ",{"type":45,"tag":53,"props":2572,"children":2574},{"className":2573},[],[2575],{"type":50,"value":2576},"env.DB",{"type":50,"value":2578}," exists; you do not need\nto declare any binding. The DO's storage is a per-(space, branch)\nSQLite database that survives redeploys.",{"type":45,"tag":301,"props":2580,"children":2581},{},[2582,2615,2633],{"type":45,"tag":118,"props":2583,"children":2584},{},[2585,2591,2593,2599,2600,2606,2607,2613],{"type":45,"tag":53,"props":2586,"children":2588},{"className":2587},[],[2589],{"type":50,"value":2590},"this.ctx.storage.sql.exec(sql, ...params)",{"type":50,"value":2592}," — full SQLite. Returns a\ncursor with ",{"type":45,"tag":53,"props":2594,"children":2596},{"className":2595},[],[2597],{"type":50,"value":2598},".toArray()",{"type":50,"value":166},{"type":45,"tag":53,"props":2601,"children":2603},{"className":2602},[],[2604],{"type":50,"value":2605},".one()",{"type":50,"value":166},{"type":45,"tag":53,"props":2608,"children":2610},{"className":2609},[],[2611],{"type":50,"value":2612},".columnNames",{"type":50,"value":2614},", etc.",{"type":45,"tag":118,"props":2616,"children":2617},{},[2618,2624,2625,2631],{"type":45,"tag":53,"props":2619,"children":2621},{"className":2620},[],[2622],{"type":50,"value":2623},"this.ctx.storage.kv.get(key)",{"type":50,"value":143},{"type":45,"tag":53,"props":2626,"children":2628},{"className":2627},[],[2629],{"type":50,"value":2630},".put(key, value)",{"type":50,"value":2632}," — simple KV\nbacked by SQLite.",{"type":45,"tag":118,"props":2634,"children":2635},{},[2636,2642],{"type":45,"tag":53,"props":2637,"children":2639},{"className":2638},[],[2640],{"type":50,"value":2641},"this.ctx.storage.transactionSync(() => { ... })",{"type":50,"value":2643}," — atomic batch\ninside the same DO instance.",{"type":45,"tag":410,"props":2645,"children":2647},{"className":952,"code":2646,"language":954,"meta":418,"style":418},"\u002F\u002F SQL\nthis.ctx.storage.sql.exec(`CREATE TABLE IF NOT EXISTS counter (n INTEGER)`);\nconst cur = this.ctx.storage.sql.exec(`SELECT n FROM counter LIMIT 1`).toArray();\nconst n = (cur[0]?.n as number) ?? 0;\n\n\u002F\u002F KV\nconst last = this.ctx.storage.kv.get\u003Cnumber>(\"last_seen\") ?? 0;\nthis.ctx.storage.kv.put(\"last_seen\", Date.now());\n",[2648],{"type":45,"tag":53,"props":2649,"children":2650},{"__ignoreMap":418},[2651,2659,2720,2807,2876,2883,2891,2986],{"type":45,"tag":484,"props":2652,"children":2653},{"class":486,"line":487},[2654],{"type":45,"tag":484,"props":2655,"children":2656},{"style":964},[2657],{"type":50,"value":2658},"\u002F\u002F SQL\n",{"type":45,"tag":484,"props":2660,"children":2661},{"class":486,"line":497},[2662,2667,2671,2675,2679,2683,2687,2691,2695,2699,2703,2708,2712,2716],{"type":45,"tag":484,"props":2663,"children":2664},{"style":491},[2665],{"type":50,"value":2666},"this.",{"type":45,"tag":484,"props":2668,"children":2669},{"style":984},[2670],{"type":50,"value":1201},{"type":45,"tag":484,"props":2672,"children":2673},{"style":491},[2674],{"type":50,"value":189},{"type":45,"tag":484,"props":2676,"children":2677},{"style":984},[2678],{"type":50,"value":1210},{"type":45,"tag":484,"props":2680,"children":2681},{"style":491},[2682],{"type":50,"value":189},{"type":45,"tag":484,"props":2684,"children":2685},{"style":984},[2686],{"type":50,"value":1219},{"type":45,"tag":484,"props":2688,"children":2689},{"style":491},[2690],{"type":50,"value":189},{"type":45,"tag":484,"props":2692,"children":2693},{"style":1144},[2694],{"type":50,"value":1228},{"type":45,"tag":484,"props":2696,"children":2697},{"style":984},[2698],{"type":50,"value":1074},{"type":45,"tag":484,"props":2700,"children":2701},{"style":491},[2702],{"type":50,"value":1508},{"type":45,"tag":484,"props":2704,"children":2705},{"style":525},[2706],{"type":50,"value":2707},"CREATE TABLE IF NOT EXISTS counter (n INTEGER)",{"type":45,"tag":484,"props":2709,"children":2710},{"style":491},[2711],{"type":50,"value":1508},{"type":45,"tag":484,"props":2713,"children":2714},{"style":984},[2715],{"type":50,"value":1169},{"type":45,"tag":484,"props":2717,"children":2718},{"style":491},[2719],{"type":50,"value":1015},{"type":45,"tag":484,"props":2721,"children":2722},{"class":486,"line":540},[2723,2728,2733,2738,2742,2746,2750,2754,2758,2762,2766,2770,2774,2778,2783,2787,2791,2795,2799,2803],{"type":45,"tag":484,"props":2724,"children":2725},{"style":506},[2726],{"type":50,"value":2727},"const",{"type":45,"tag":484,"props":2729,"children":2730},{"style":984},[2731],{"type":50,"value":2732}," cur ",{"type":45,"tag":484,"props":2734,"children":2735},{"style":491},[2736],{"type":50,"value":2737},"=",{"type":45,"tag":484,"props":2739,"children":2740},{"style":491},[2741],{"type":50,"value":1671},{"type":45,"tag":484,"props":2743,"children":2744},{"style":984},[2745],{"type":50,"value":1201},{"type":45,"tag":484,"props":2747,"children":2748},{"style":491},[2749],{"type":50,"value":189},{"type":45,"tag":484,"props":2751,"children":2752},{"style":984},[2753],{"type":50,"value":1210},{"type":45,"tag":484,"props":2755,"children":2756},{"style":491},[2757],{"type":50,"value":189},{"type":45,"tag":484,"props":2759,"children":2760},{"style":984},[2761],{"type":50,"value":1219},{"type":45,"tag":484,"props":2763,"children":2764},{"style":491},[2765],{"type":50,"value":189},{"type":45,"tag":484,"props":2767,"children":2768},{"style":1144},[2769],{"type":50,"value":1228},{"type":45,"tag":484,"props":2771,"children":2772},{"style":984},[2773],{"type":50,"value":1074},{"type":45,"tag":484,"props":2775,"children":2776},{"style":491},[2777],{"type":50,"value":1508},{"type":45,"tag":484,"props":2779,"children":2780},{"style":525},[2781],{"type":50,"value":2782},"SELECT n FROM counter LIMIT 1",{"type":45,"tag":484,"props":2784,"children":2785},{"style":491},[2786],{"type":50,"value":1508},{"type":45,"tag":484,"props":2788,"children":2789},{"style":984},[2790],{"type":50,"value":1169},{"type":45,"tag":484,"props":2792,"children":2793},{"style":491},[2794],{"type":50,"value":189},{"type":45,"tag":484,"props":2796,"children":2797},{"style":1144},[2798],{"type":50,"value":1740},{"type":45,"tag":484,"props":2800,"children":2801},{"style":984},[2802],{"type":50,"value":1458},{"type":45,"tag":484,"props":2804,"children":2805},{"style":491},[2806],{"type":50,"value":1015},{"type":45,"tag":484,"props":2808,"children":2809},{"class":486,"line":577},[2810,2814,2819,2823,2828,2833,2838,2843,2848,2853,2858,2862,2867,2872],{"type":45,"tag":484,"props":2811,"children":2812},{"style":506},[2813],{"type":50,"value":2727},{"type":45,"tag":484,"props":2815,"children":2816},{"style":984},[2817],{"type":50,"value":2818}," n ",{"type":45,"tag":484,"props":2820,"children":2821},{"style":491},[2822],{"type":50,"value":2737},{"type":45,"tag":484,"props":2824,"children":2825},{"style":984},[2826],{"type":50,"value":2827}," (cur[",{"type":45,"tag":484,"props":2829,"children":2830},{"style":1577},[2831],{"type":50,"value":2832},"0",{"type":45,"tag":484,"props":2834,"children":2835},{"style":984},[2836],{"type":50,"value":2837},"]",{"type":45,"tag":484,"props":2839,"children":2840},{"style":491},[2841],{"type":50,"value":2842},"?.",{"type":45,"tag":484,"props":2844,"children":2845},{"style":984},[2846],{"type":50,"value":2847},"n ",{"type":45,"tag":484,"props":2849,"children":2850},{"style":973},[2851],{"type":50,"value":2852},"as",{"type":45,"tag":484,"props":2854,"children":2855},{"style":612},[2856],{"type":50,"value":2857}," number",{"type":45,"tag":484,"props":2859,"children":2860},{"style":984},[2861],{"type":50,"value":1383},{"type":45,"tag":484,"props":2863,"children":2864},{"style":491},[2865],{"type":50,"value":2866},"??",{"type":45,"tag":484,"props":2868,"children":2869},{"style":1577},[2870],{"type":50,"value":2871}," 0",{"type":45,"tag":484,"props":2873,"children":2874},{"style":491},[2875],{"type":50,"value":1015},{"type":45,"tag":484,"props":2877,"children":2878},{"class":486,"line":603},[2879],{"type":45,"tag":484,"props":2880,"children":2881},{"emptyLinePlaceholder":1021},[2882],{"type":50,"value":1024},{"type":45,"tag":484,"props":2884,"children":2885},{"class":486,"line":643},[2886],{"type":45,"tag":484,"props":2887,"children":2888},{"style":964},[2889],{"type":50,"value":2890},"\u002F\u002F KV\n",{"type":45,"tag":484,"props":2892,"children":2893},{"class":486,"line":681},[2894,2898,2903,2907,2911,2915,2919,2923,2927,2932,2936,2940,2944,2949,2953,2957,2961,2966,2970,2974,2978,2982],{"type":45,"tag":484,"props":2895,"children":2896},{"style":506},[2897],{"type":50,"value":2727},{"type":45,"tag":484,"props":2899,"children":2900},{"style":984},[2901],{"type":50,"value":2902}," last ",{"type":45,"tag":484,"props":2904,"children":2905},{"style":491},[2906],{"type":50,"value":2737},{"type":45,"tag":484,"props":2908,"children":2909},{"style":491},[2910],{"type":50,"value":1671},{"type":45,"tag":484,"props":2912,"children":2913},{"style":984},[2914],{"type":50,"value":1201},{"type":45,"tag":484,"props":2916,"children":2917},{"style":491},[2918],{"type":50,"value":189},{"type":45,"tag":484,"props":2920,"children":2921},{"style":984},[2922],{"type":50,"value":1210},{"type":45,"tag":484,"props":2924,"children":2925},{"style":491},[2926],{"type":50,"value":189},{"type":45,"tag":484,"props":2928,"children":2929},{"style":984},[2930],{"type":50,"value":2931},"kv",{"type":45,"tag":484,"props":2933,"children":2934},{"style":491},[2935],{"type":50,"value":189},{"type":45,"tag":484,"props":2937,"children":2938},{"style":1144},[2939],{"type":50,"value":2045},{"type":45,"tag":484,"props":2941,"children":2942},{"style":491},[2943],{"type":50,"value":1104},{"type":45,"tag":484,"props":2945,"children":2946},{"style":612},[2947],{"type":50,"value":2948},"number",{"type":45,"tag":484,"props":2950,"children":2951},{"style":491},[2952],{"type":50,"value":1114},{"type":45,"tag":484,"props":2954,"children":2955},{"style":984},[2956],{"type":50,"value":1074},{"type":45,"tag":484,"props":2958,"children":2959},{"style":491},[2960],{"type":50,"value":513},{"type":45,"tag":484,"props":2962,"children":2963},{"style":525},[2964],{"type":50,"value":2965},"last_seen",{"type":45,"tag":484,"props":2967,"children":2968},{"style":491},[2969],{"type":50,"value":513},{"type":45,"tag":484,"props":2971,"children":2972},{"style":984},[2973],{"type":50,"value":1383},{"type":45,"tag":484,"props":2975,"children":2976},{"style":491},[2977],{"type":50,"value":2866},{"type":45,"tag":484,"props":2979,"children":2980},{"style":1577},[2981],{"type":50,"value":2871},{"type":45,"tag":484,"props":2983,"children":2984},{"style":491},[2985],{"type":50,"value":1015},{"type":45,"tag":484,"props":2987,"children":2988},{"class":486,"line":716},[2989,2993,2997,3001,3005,3009,3013,3017,3022,3026,3030,3034,3038,3042,3047,3051,3056,3061],{"type":45,"tag":484,"props":2990,"children":2991},{"style":491},[2992],{"type":50,"value":2666},{"type":45,"tag":484,"props":2994,"children":2995},{"style":984},[2996],{"type":50,"value":1201},{"type":45,"tag":484,"props":2998,"children":2999},{"style":491},[3000],{"type":50,"value":189},{"type":45,"tag":484,"props":3002,"children":3003},{"style":984},[3004],{"type":50,"value":1210},{"type":45,"tag":484,"props":3006,"children":3007},{"style":491},[3008],{"type":50,"value":189},{"type":45,"tag":484,"props":3010,"children":3011},{"style":984},[3012],{"type":50,"value":2931},{"type":45,"tag":484,"props":3014,"children":3015},{"style":491},[3016],{"type":50,"value":189},{"type":45,"tag":484,"props":3018,"children":3019},{"style":1144},[3020],{"type":50,"value":3021},"put",{"type":45,"tag":484,"props":3023,"children":3024},{"style":984},[3025],{"type":50,"value":1074},{"type":45,"tag":484,"props":3027,"children":3028},{"style":491},[3029],{"type":50,"value":513},{"type":45,"tag":484,"props":3031,"children":3032},{"style":525},[3033],{"type":50,"value":2965},{"type":45,"tag":484,"props":3035,"children":3036},{"style":491},[3037],{"type":50,"value":513},{"type":45,"tag":484,"props":3039,"children":3040},{"style":491},[3041],{"type":50,"value":1522},{"type":45,"tag":484,"props":3043,"children":3044},{"style":984},[3045],{"type":50,"value":3046}," Date",{"type":45,"tag":484,"props":3048,"children":3049},{"style":491},[3050],{"type":50,"value":189},{"type":45,"tag":484,"props":3052,"children":3053},{"style":1144},[3054],{"type":50,"value":3055},"now",{"type":45,"tag":484,"props":3057,"children":3058},{"style":984},[3059],{"type":50,"value":3060},"())",{"type":45,"tag":484,"props":3062,"children":3063},{"style":491},[3064],{"type":50,"value":1015},{"type":45,"tag":46,"props":3066,"children":3067},{},[3068,3073,3075,3081,3083,3089],{"type":45,"tag":290,"props":3069,"children":3070},{},[3071],{"type":50,"value":3072},"Use the DO's storage for all persistent state",{"type":50,"value":3074}," — users, sessions,\ncontent, settings, anything that should survive a reload. Do not use\n",{"type":45,"tag":53,"props":3076,"children":3078},{"className":3077},[],[3079],{"type":50,"value":3080},"localStorage",{"type":50,"value":3082}," or ",{"type":45,"tag":53,"props":3084,"children":3086},{"className":3085},[],[3087],{"type":50,"value":3088},"sessionStorage",{"type":50,"value":3090}," for primary data; they are\nper-browser, per-origin, and lost on incognito or any other browser.",{"type":45,"tag":2552,"props":3092,"children":3094},{"id":3093},"websockets",[3095],{"type":50,"value":3096},"WebSockets",{"type":45,"tag":46,"props":3098,"children":3099},{},[3100,3102,3108,3110,3115],{"type":50,"value":3101},"The platform forwards ",{"type":45,"tag":53,"props":3103,"children":3105},{"className":3104},[],[3106],{"type":50,"value":3107},"Upgrade: websocket",{"type":50,"value":3109}," requests transparently into\n",{"type":45,"tag":53,"props":3111,"children":3113},{"className":3112},[],[3114],{"type":50,"value":2541},{"type":50,"value":3116},". Use the standard Durable Object hibernation API:",{"type":45,"tag":410,"props":3118,"children":3120},{"className":952,"code":3119,"language":954,"meta":418,"style":418},"export class App extends DurableObject {\n  async fetch(request: Request) {\n    const upgrade = request.headers.get(\"Upgrade\");\n    if (upgrade === \"websocket\") {\n      const { 0: client, 1: server } = new WebSocketPair();\n      this.ctx.acceptWebSocket(server);\n      return new Response(null, { status: 101, webSocket: client });\n    }\n    return new Response(\"not found\", { status: 404 });\n  }\n\n  webSocketMessage(ws: WebSocket, message: string | ArrayBuffer) {\n    \u002F\u002F Broadcast to every connected client (chat-style fan-out).\n    for (const peer of this.ctx.getWebSockets()) {\n      peer.send(typeof message === \"string\" ? message : new Uint8Array(message));\n    }\n  }\n\n  webSocketClose(_ws: WebSocket, _code: number, _reason: string, _wasClean: boolean) {\n    \u002F\u002F Cleanup if needed.\n  }\n}\n",[3121],{"type":45,"tag":53,"props":3122,"children":3123},{"__ignoreMap":418},[3124,3151,3186,3248,3289,3356,3393,3462,3469,3533,3540,3547,3608,3616,3668,3756,3763,3770,3777,3862,3870,3877],{"type":45,"tag":484,"props":3125,"children":3126},{"class":486,"line":487},[3127,3131,3135,3139,3143,3147],{"type":45,"tag":484,"props":3128,"children":3129},{"style":973},[3130],{"type":50,"value":1032},{"type":45,"tag":484,"props":3132,"children":3133},{"style":506},[3134],{"type":50,"value":1037},{"type":45,"tag":484,"props":3136,"children":3137},{"style":612},[3138],{"type":50,"value":1042},{"type":45,"tag":484,"props":3140,"children":3141},{"style":506},[3142],{"type":50,"value":1047},{"type":45,"tag":484,"props":3144,"children":3145},{"style":612},[3146],{"type":50,"value":987},{"type":45,"tag":484,"props":3148,"children":3149},{"style":491},[3150],{"type":50,"value":600},{"type":45,"tag":484,"props":3152,"children":3153},{"class":486,"line":497},[3154,3158,3162,3166,3170,3174,3178,3182],{"type":45,"tag":484,"props":3155,"children":3156},{"style":506},[3157],{"type":50,"value":1063},{"type":45,"tag":484,"props":3159,"children":3160},{"style":1066},[3161],{"type":50,"value":1069},{"type":45,"tag":484,"props":3163,"children":3164},{"style":491},[3165],{"type":50,"value":1074},{"type":45,"tag":484,"props":3167,"children":3168},{"style":1077},[3169],{"type":50,"value":1080},{"type":45,"tag":484,"props":3171,"children":3172},{"style":491},[3173],{"type":50,"value":473},{"type":45,"tag":484,"props":3175,"children":3176},{"style":612},[3177],{"type":50,"value":1089},{"type":45,"tag":484,"props":3179,"children":3180},{"style":491},[3181],{"type":50,"value":1169},{"type":45,"tag":484,"props":3183,"children":3184},{"style":491},[3185],{"type":50,"value":600},{"type":45,"tag":484,"props":3187,"children":3188},{"class":486,"line":540},[3189,3193,3198,3202,3206,3210,3215,3219,3223,3227,3231,3236,3240,3244],{"type":45,"tag":484,"props":3190,"children":3191},{"style":506},[3192],{"type":50,"value":1126},{"type":45,"tag":484,"props":3194,"children":3195},{"style":984},[3196],{"type":50,"value":3197}," upgrade",{"type":45,"tag":484,"props":3199,"children":3200},{"style":491},[3201],{"type":50,"value":1136},{"type":45,"tag":484,"props":3203,"children":3204},{"style":984},[3205],{"type":50,"value":1352},{"type":45,"tag":484,"props":3207,"children":3208},{"style":491},[3209],{"type":50,"value":189},{"type":45,"tag":484,"props":3211,"children":3212},{"style":984},[3213],{"type":50,"value":3214},"headers",{"type":45,"tag":484,"props":3216,"children":3217},{"style":491},[3218],{"type":50,"value":189},{"type":45,"tag":484,"props":3220,"children":3221},{"style":1144},[3222],{"type":50,"value":2045},{"type":45,"tag":484,"props":3224,"children":3225},{"style":1066},[3226],{"type":50,"value":1074},{"type":45,"tag":484,"props":3228,"children":3229},{"style":491},[3230],{"type":50,"value":513},{"type":45,"tag":484,"props":3232,"children":3233},{"style":525},[3234],{"type":50,"value":3235},"Upgrade",{"type":45,"tag":484,"props":3237,"children":3238},{"style":491},[3239],{"type":50,"value":513},{"type":45,"tag":484,"props":3241,"children":3242},{"style":1066},[3243],{"type":50,"value":1169},{"type":45,"tag":484,"props":3245,"children":3246},{"style":491},[3247],{"type":50,"value":1015},{"type":45,"tag":484,"props":3249,"children":3250},{"class":486,"line":577},[3251,3255,3259,3264,3268,3272,3277,3281,3285],{"type":45,"tag":484,"props":3252,"children":3253},{"style":973},[3254],{"type":50,"value":1307},{"type":45,"tag":484,"props":3256,"children":3257},{"style":1066},[3258],{"type":50,"value":60},{"type":45,"tag":484,"props":3260,"children":3261},{"style":984},[3262],{"type":50,"value":3263},"upgrade",{"type":45,"tag":484,"props":3265,"children":3266},{"style":491},[3267],{"type":50,"value":1329},{"type":45,"tag":484,"props":3269,"children":3270},{"style":491},[3271],{"type":50,"value":522},{"type":45,"tag":484,"props":3273,"children":3274},{"style":525},[3275],{"type":50,"value":3276},"websocket",{"type":45,"tag":484,"props":3278,"children":3279},{"style":491},[3280],{"type":50,"value":513},{"type":45,"tag":484,"props":3282,"children":3283},{"style":1066},[3284],{"type":50,"value":1383},{"type":45,"tag":484,"props":3286,"children":3287},{"style":491},[3288],{"type":50,"value":494},{"type":45,"tag":484,"props":3290,"children":3291},{"class":486,"line":603},[3292,3296,3300,3304,3308,3313,3317,3322,3326,3331,3335,3339,3343,3348,3352],{"type":45,"tag":484,"props":3293,"children":3294},{"style":506},[3295],{"type":50,"value":1396},{"type":45,"tag":484,"props":3297,"children":3298},{"style":491},[3299],{"type":50,"value":981},{"type":45,"tag":484,"props":3301,"children":3302},{"style":1577},[3303],{"type":50,"value":2871},{"type":45,"tag":484,"props":3305,"children":3306},{"style":491},[3307],{"type":50,"value":473},{"type":45,"tag":484,"props":3309,"children":3310},{"style":984},[3311],{"type":50,"value":3312}," client",{"type":45,"tag":484,"props":3314,"children":3315},{"style":491},[3316],{"type":50,"value":1522},{"type":45,"tag":484,"props":3318,"children":3319},{"style":1577},[3320],{"type":50,"value":3321}," 1",{"type":45,"tag":484,"props":3323,"children":3324},{"style":491},[3325],{"type":50,"value":473},{"type":45,"tag":484,"props":3327,"children":3328},{"style":984},[3329],{"type":50,"value":3330}," server",{"type":45,"tag":484,"props":3332,"children":3333},{"style":491},[3334],{"type":50,"value":992},{"type":45,"tag":484,"props":3336,"children":3337},{"style":491},[3338],{"type":50,"value":1136},{"type":45,"tag":484,"props":3340,"children":3341},{"style":491},[3342],{"type":50,"value":1141},{"type":45,"tag":484,"props":3344,"children":3345},{"style":1144},[3346],{"type":50,"value":3347}," WebSocketPair",{"type":45,"tag":484,"props":3349,"children":3350},{"style":1066},[3351],{"type":50,"value":1458},{"type":45,"tag":484,"props":3353,"children":3354},{"style":491},[3355],{"type":50,"value":1015},{"type":45,"tag":484,"props":3357,"children":3358},{"class":486,"line":643},[3359,3363,3367,3371,3376,3380,3385,3389],{"type":45,"tag":484,"props":3360,"children":3361},{"style":491},[3362],{"type":50,"value":1471},{"type":45,"tag":484,"props":3364,"children":3365},{"style":984},[3366],{"type":50,"value":1201},{"type":45,"tag":484,"props":3368,"children":3369},{"style":491},[3370],{"type":50,"value":189},{"type":45,"tag":484,"props":3372,"children":3373},{"style":1144},[3374],{"type":50,"value":3375},"acceptWebSocket",{"type":45,"tag":484,"props":3377,"children":3378},{"style":1066},[3379],{"type":50,"value":1074},{"type":45,"tag":484,"props":3381,"children":3382},{"style":984},[3383],{"type":50,"value":3384},"server",{"type":45,"tag":484,"props":3386,"children":3387},{"style":1066},[3388],{"type":50,"value":1169},{"type":45,"tag":484,"props":3390,"children":3391},{"style":491},[3392],{"type":50,"value":1015},{"type":45,"tag":484,"props":3394,"children":3395},{"class":486,"line":681},[3396,3400,3404,3408,3412,3416,3420,3424,3428,3433,3437,3442,3446,3450,3454,3458],{"type":45,"tag":484,"props":3397,"children":3398},{"style":973},[3399],{"type":50,"value":1543},{"type":45,"tag":484,"props":3401,"children":3402},{"style":491},[3403],{"type":50,"value":1141},{"type":45,"tag":484,"props":3405,"children":3406},{"style":1144},[3407],{"type":50,"value":1552},{"type":45,"tag":484,"props":3409,"children":3410},{"style":1066},[3411],{"type":50,"value":1074},{"type":45,"tag":484,"props":3413,"children":3414},{"style":491},[3415],{"type":50,"value":1561},{"type":45,"tag":484,"props":3417,"children":3418},{"style":491},[3419],{"type":50,"value":981},{"type":45,"tag":484,"props":3421,"children":3422},{"style":1066},[3423],{"type":50,"value":1570},{"type":45,"tag":484,"props":3425,"children":3426},{"style":491},[3427],{"type":50,"value":473},{"type":45,"tag":484,"props":3429,"children":3430},{"style":1577},[3431],{"type":50,"value":3432}," 101",{"type":45,"tag":484,"props":3434,"children":3435},{"style":491},[3436],{"type":50,"value":1522},{"type":45,"tag":484,"props":3438,"children":3439},{"style":1066},[3440],{"type":50,"value":3441}," webSocket",{"type":45,"tag":484,"props":3443,"children":3444},{"style":491},[3445],{"type":50,"value":473},{"type":45,"tag":484,"props":3447,"children":3448},{"style":984},[3449],{"type":50,"value":3312},{"type":45,"tag":484,"props":3451,"children":3452},{"style":491},[3453],{"type":50,"value":992},{"type":45,"tag":484,"props":3455,"children":3456},{"style":1066},[3457],{"type":50,"value":1169},{"type":45,"tag":484,"props":3459,"children":3460},{"style":491},[3461],{"type":50,"value":1015},{"type":45,"tag":484,"props":3463,"children":3464},{"class":486,"line":716},[3465],{"type":45,"tag":484,"props":3466,"children":3467},{"style":491},[3468],{"type":50,"value":1601},{"type":45,"tag":484,"props":3470,"children":3471},{"class":486,"line":725},[3472,3476,3480,3484,3488,3492,3497,3501,3505,3509,3513,3517,3521,3525,3529],{"type":45,"tag":484,"props":3473,"children":3474},{"style":973},[3475],{"type":50,"value":1802},{"type":45,"tag":484,"props":3477,"children":3478},{"style":491},[3479],{"type":50,"value":1141},{"type":45,"tag":484,"props":3481,"children":3482},{"style":1144},[3483],{"type":50,"value":1552},{"type":45,"tag":484,"props":3485,"children":3486},{"style":1066},[3487],{"type":50,"value":1074},{"type":45,"tag":484,"props":3489,"children":3490},{"style":491},[3491],{"type":50,"value":513},{"type":45,"tag":484,"props":3493,"children":3494},{"style":525},[3495],{"type":50,"value":3496},"not found",{"type":45,"tag":484,"props":3498,"children":3499},{"style":491},[3500],{"type":50,"value":513},{"type":45,"tag":484,"props":3502,"children":3503},{"style":491},[3504],{"type":50,"value":1522},{"type":45,"tag":484,"props":3506,"children":3507},{"style":491},[3508],{"type":50,"value":981},{"type":45,"tag":484,"props":3510,"children":3511},{"style":1066},[3512],{"type":50,"value":1570},{"type":45,"tag":484,"props":3514,"children":3515},{"style":491},[3516],{"type":50,"value":473},{"type":45,"tag":484,"props":3518,"children":3519},{"style":1577},[3520],{"type":50,"value":1848},{"type":45,"tag":484,"props":3522,"children":3523},{"style":491},[3524],{"type":50,"value":992},{"type":45,"tag":484,"props":3526,"children":3527},{"style":1066},[3528],{"type":50,"value":1169},{"type":45,"tag":484,"props":3530,"children":3531},{"style":491},[3532],{"type":50,"value":1015},{"type":45,"tag":484,"props":3534,"children":3535},{"class":486,"line":1240},[3536],{"type":45,"tag":484,"props":3537,"children":3538},{"style":491},[3539],{"type":50,"value":722},{"type":45,"tag":484,"props":3541,"children":3542},{"class":486,"line":1249},[3543],{"type":45,"tag":484,"props":3544,"children":3545},{"emptyLinePlaceholder":1021},[3546],{"type":50,"value":1024},{"type":45,"tag":484,"props":3548,"children":3549},{"class":486,"line":1258},[3550,3555,3559,3564,3568,3573,3577,3582,3586,3590,3595,3600,3604],{"type":45,"tag":484,"props":3551,"children":3552},{"style":1066},[3553],{"type":50,"value":3554},"  webSocketMessage",{"type":45,"tag":484,"props":3556,"children":3557},{"style":491},[3558],{"type":50,"value":1074},{"type":45,"tag":484,"props":3560,"children":3561},{"style":1077},[3562],{"type":50,"value":3563},"ws",{"type":45,"tag":484,"props":3565,"children":3566},{"style":491},[3567],{"type":50,"value":473},{"type":45,"tag":484,"props":3569,"children":3570},{"style":612},[3571],{"type":50,"value":3572}," WebSocket",{"type":45,"tag":484,"props":3574,"children":3575},{"style":491},[3576],{"type":50,"value":1522},{"type":45,"tag":484,"props":3578,"children":3579},{"style":1077},[3580],{"type":50,"value":3581}," message",{"type":45,"tag":484,"props":3583,"children":3584},{"style":491},[3585],{"type":50,"value":473},{"type":45,"tag":484,"props":3587,"children":3588},{"style":612},[3589],{"type":50,"value":1448},{"type":45,"tag":484,"props":3591,"children":3592},{"style":491},[3593],{"type":50,"value":3594}," |",{"type":45,"tag":484,"props":3596,"children":3597},{"style":612},[3598],{"type":50,"value":3599}," ArrayBuffer",{"type":45,"tag":484,"props":3601,"children":3602},{"style":491},[3603],{"type":50,"value":1169},{"type":45,"tag":484,"props":3605,"children":3606},{"style":491},[3607],{"type":50,"value":600},{"type":45,"tag":484,"props":3609,"children":3610},{"class":486,"line":1267},[3611],{"type":45,"tag":484,"props":3612,"children":3613},{"style":964},[3614],{"type":50,"value":3615},"    \u002F\u002F Broadcast to every connected client (chat-style fan-out).\n",{"type":45,"tag":484,"props":3617,"children":3618},{"class":486,"line":1276},[3619,3624,3628,3632,3637,3642,3646,3650,3654,3659,3664],{"type":45,"tag":484,"props":3620,"children":3621},{"style":973},[3622],{"type":50,"value":3623},"    for",{"type":45,"tag":484,"props":3625,"children":3626},{"style":1066},[3627],{"type":50,"value":60},{"type":45,"tag":484,"props":3629,"children":3630},{"style":506},[3631],{"type":50,"value":2727},{"type":45,"tag":484,"props":3633,"children":3634},{"style":984},[3635],{"type":50,"value":3636}," peer",{"type":45,"tag":484,"props":3638,"children":3639},{"style":491},[3640],{"type":50,"value":3641}," of",{"type":45,"tag":484,"props":3643,"children":3644},{"style":491},[3645],{"type":50,"value":1671},{"type":45,"tag":484,"props":3647,"children":3648},{"style":984},[3649],{"type":50,"value":1201},{"type":45,"tag":484,"props":3651,"children":3652},{"style":491},[3653],{"type":50,"value":189},{"type":45,"tag":484,"props":3655,"children":3656},{"style":1144},[3657],{"type":50,"value":3658},"getWebSockets",{"type":45,"tag":484,"props":3660,"children":3661},{"style":1066},[3662],{"type":50,"value":3663},"()) ",{"type":45,"tag":484,"props":3665,"children":3666},{"style":491},[3667],{"type":50,"value":494},{"type":45,"tag":484,"props":3669,"children":3670},{"class":486,"line":1293},[3671,3676,3680,3685,3689,3694,3698,3702,3706,3711,3715,3720,3724,3729,3733,3738,3742,3747,3752],{"type":45,"tag":484,"props":3672,"children":3673},{"style":984},[3674],{"type":50,"value":3675},"      peer",{"type":45,"tag":484,"props":3677,"children":3678},{"style":491},[3679],{"type":50,"value":189},{"type":45,"tag":484,"props":3681,"children":3682},{"style":1144},[3683],{"type":50,"value":3684},"send",{"type":45,"tag":484,"props":3686,"children":3687},{"style":1066},[3688],{"type":50,"value":1074},{"type":45,"tag":484,"props":3690,"children":3691},{"style":491},[3692],{"type":50,"value":3693},"typeof",{"type":45,"tag":484,"props":3695,"children":3696},{"style":984},[3697],{"type":50,"value":3581},{"type":45,"tag":484,"props":3699,"children":3700},{"style":491},[3701],{"type":50,"value":1329},{"type":45,"tag":484,"props":3703,"children":3704},{"style":491},[3705],{"type":50,"value":522},{"type":45,"tag":484,"props":3707,"children":3708},{"style":525},[3709],{"type":50,"value":3710},"string",{"type":45,"tag":484,"props":3712,"children":3713},{"style":491},[3714],{"type":50,"value":513},{"type":45,"tag":484,"props":3716,"children":3717},{"style":491},[3718],{"type":50,"value":3719}," ?",{"type":45,"tag":484,"props":3721,"children":3722},{"style":984},[3723],{"type":50,"value":3581},{"type":45,"tag":484,"props":3725,"children":3726},{"style":491},[3727],{"type":50,"value":3728}," :",{"type":45,"tag":484,"props":3730,"children":3731},{"style":491},[3732],{"type":50,"value":1141},{"type":45,"tag":484,"props":3734,"children":3735},{"style":1144},[3736],{"type":50,"value":3737}," Uint8Array",{"type":45,"tag":484,"props":3739,"children":3740},{"style":1066},[3741],{"type":50,"value":1074},{"type":45,"tag":484,"props":3743,"children":3744},{"style":984},[3745],{"type":50,"value":3746},"message",{"type":45,"tag":484,"props":3748,"children":3749},{"style":1066},[3750],{"type":50,"value":3751},"))",{"type":45,"tag":484,"props":3753,"children":3754},{"style":491},[3755],{"type":50,"value":1015},{"type":45,"tag":484,"props":3757,"children":3758},{"class":486,"line":1301},[3759],{"type":45,"tag":484,"props":3760,"children":3761},{"style":491},[3762],{"type":50,"value":1601},{"type":45,"tag":484,"props":3764,"children":3765},{"class":486,"line":1390},[3766],{"type":45,"tag":484,"props":3767,"children":3768},{"style":491},[3769],{"type":50,"value":722},{"type":45,"tag":484,"props":3771,"children":3772},{"class":486,"line":1465},[3773],{"type":45,"tag":484,"props":3774,"children":3775},{"emptyLinePlaceholder":1021},[3776],{"type":50,"value":1024},{"type":45,"tag":484,"props":3778,"children":3779},{"class":486,"line":1537},[3780,3785,3789,3794,3798,3802,3806,3811,3815,3819,3823,3828,3832,3836,3840,3845,3849,3854,3858],{"type":45,"tag":484,"props":3781,"children":3782},{"style":1066},[3783],{"type":50,"value":3784},"  webSocketClose",{"type":45,"tag":484,"props":3786,"children":3787},{"style":491},[3788],{"type":50,"value":1074},{"type":45,"tag":484,"props":3790,"children":3791},{"style":1077},[3792],{"type":50,"value":3793},"_ws",{"type":45,"tag":484,"props":3795,"children":3796},{"style":491},[3797],{"type":50,"value":473},{"type":45,"tag":484,"props":3799,"children":3800},{"style":612},[3801],{"type":50,"value":3572},{"type":45,"tag":484,"props":3803,"children":3804},{"style":491},[3805],{"type":50,"value":1522},{"type":45,"tag":484,"props":3807,"children":3808},{"style":1077},[3809],{"type":50,"value":3810}," _code",{"type":45,"tag":484,"props":3812,"children":3813},{"style":491},[3814],{"type":50,"value":473},{"type":45,"tag":484,"props":3816,"children":3817},{"style":612},[3818],{"type":50,"value":2857},{"type":45,"tag":484,"props":3820,"children":3821},{"style":491},[3822],{"type":50,"value":1522},{"type":45,"tag":484,"props":3824,"children":3825},{"style":1077},[3826],{"type":50,"value":3827}," _reason",{"type":45,"tag":484,"props":3829,"children":3830},{"style":491},[3831],{"type":50,"value":473},{"type":45,"tag":484,"props":3833,"children":3834},{"style":612},[3835],{"type":50,"value":1448},{"type":45,"tag":484,"props":3837,"children":3838},{"style":491},[3839],{"type":50,"value":1522},{"type":45,"tag":484,"props":3841,"children":3842},{"style":1077},[3843],{"type":50,"value":3844}," _wasClean",{"type":45,"tag":484,"props":3846,"children":3847},{"style":491},[3848],{"type":50,"value":473},{"type":45,"tag":484,"props":3850,"children":3851},{"style":612},[3852],{"type":50,"value":3853}," boolean",{"type":45,"tag":484,"props":3855,"children":3856},{"style":491},[3857],{"type":50,"value":1169},{"type":45,"tag":484,"props":3859,"children":3860},{"style":491},[3861],{"type":50,"value":600},{"type":45,"tag":484,"props":3863,"children":3864},{"class":486,"line":1595},[3865],{"type":45,"tag":484,"props":3866,"children":3867},{"style":964},[3868],{"type":50,"value":3869},"    \u002F\u002F Cleanup if needed.\n",{"type":45,"tag":484,"props":3871,"children":3872},{"class":486,"line":1604},[3873],{"type":45,"tag":484,"props":3874,"children":3875},{"style":491},[3876],{"type":50,"value":722},{"type":45,"tag":484,"props":3878,"children":3879},{"class":486,"line":1652},[3880],{"type":45,"tag":484,"props":3881,"children":3882},{"style":491},[3883],{"type":50,"value":731},{"type":45,"tag":46,"props":3885,"children":3886},{},[3887,3892,3893,3899],{"type":45,"tag":53,"props":3888,"children":3890},{"className":3889},[],[3891],{"type":50,"value":3375},{"type":50,"value":440},{"type":45,"tag":53,"props":3894,"children":3896},{"className":3895},[],[3897],{"type":50,"value":3898},"webSocketMessage",{"type":50,"value":3900}," is the right pattern for\nmulti-connection use cases (chat rooms, multiplayer, presence) because\nthe DO can hibernate between messages without losing connections.",{"type":45,"tag":2552,"props":3902,"children":3904},{"id":3903},"per-entity-grouping-chat-rooms-per-user-records",[3905],{"type":50,"value":3906},"Per-entity grouping (chat rooms, per-user records)",{"type":45,"tag":46,"props":3908,"children":3909},{},[3910,3912,3917,3919,3925,3927,3932,3934,3939],{"type":50,"value":3911},"You get ",{"type":45,"tag":290,"props":3913,"children":3914},{},[3915],{"type":50,"value":3916},"one App DO per (space, branch)",{"type":50,"value":3918}," — a single instance, not a\nnamespace. Do not call ",{"type":45,"tag":53,"props":3920,"children":3922},{"className":3921},[],[3923],{"type":50,"value":3924},"idFromName",{"type":50,"value":3926}," or try to declare a DO binding in\n",{"type":45,"tag":53,"props":3928,"children":3930},{"className":3929},[],[3931],{"type":50,"value":141},{"type":50,"value":3933},"; both are rejected. For multi-room \u002F multi-user state,\n",{"type":45,"tag":290,"props":3935,"children":3936},{},[3937],{"type":50,"value":3938},"partition rows with a column",{"type":50,"value":3940}," in the App's SQLite:",{"type":45,"tag":410,"props":3942,"children":3945},{"className":3943,"code":3944,"language":1219,"meta":418,"style":418},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CREATE TABLE messages (\n  room_id TEXT NOT NULL,\n  user_id TEXT NOT NULL,\n  body TEXT NOT NULL,\n  ts INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)\n);\nCREATE INDEX messages_by_room ON messages (room_id, ts);\n",[3946],{"type":45,"tag":53,"props":3947,"children":3948},{"__ignoreMap":418},[3949,3957,3965,3973,3981,3989,3997],{"type":45,"tag":484,"props":3950,"children":3951},{"class":486,"line":487},[3952],{"type":45,"tag":484,"props":3953,"children":3954},{},[3955],{"type":50,"value":3956},"CREATE TABLE messages (\n",{"type":45,"tag":484,"props":3958,"children":3959},{"class":486,"line":497},[3960],{"type":45,"tag":484,"props":3961,"children":3962},{},[3963],{"type":50,"value":3964},"  room_id TEXT NOT NULL,\n",{"type":45,"tag":484,"props":3966,"children":3967},{"class":486,"line":540},[3968],{"type":45,"tag":484,"props":3969,"children":3970},{},[3971],{"type":50,"value":3972},"  user_id TEXT NOT NULL,\n",{"type":45,"tag":484,"props":3974,"children":3975},{"class":486,"line":577},[3976],{"type":45,"tag":484,"props":3977,"children":3978},{},[3979],{"type":50,"value":3980},"  body TEXT NOT NULL,\n",{"type":45,"tag":484,"props":3982,"children":3983},{"class":486,"line":603},[3984],{"type":45,"tag":484,"props":3985,"children":3986},{},[3987],{"type":50,"value":3988},"  ts INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)\n",{"type":45,"tag":484,"props":3990,"children":3991},{"class":486,"line":643},[3992],{"type":45,"tag":484,"props":3993,"children":3994},{},[3995],{"type":50,"value":3996},");\n",{"type":45,"tag":484,"props":3998,"children":3999},{"class":486,"line":681},[4000],{"type":45,"tag":484,"props":4001,"children":4002},{},[4003],{"type":50,"value":4004},"CREATE INDEX messages_by_room ON messages (room_id, ts);\n",{"type":45,"tag":46,"props":4006,"children":4007},{},[4008,4010,4016,4018,4023,4025,4030,4032,4038,4040,4046],{"type":50,"value":4009},"Then route by ",{"type":45,"tag":53,"props":4011,"children":4013},{"className":4012},[],[4014],{"type":50,"value":4015},"room_id",{"type":50,"value":4017}," inside ",{"type":45,"tag":53,"props":4019,"children":4021},{"className":4020},[],[4022],{"type":50,"value":2541},{"type":50,"value":4024},". SQLite is fast enough that\nsharing the same table across rooms is fine for prototyping; if you\nlater need stronger isolation, attach ",{"type":45,"tag":53,"props":4026,"children":4028},{"className":4027},[],[4029],{"type":50,"value":4015},{"type":50,"value":4031}," to a tag and use\n",{"type":45,"tag":53,"props":4033,"children":4035},{"className":4034},[],[4036],{"type":50,"value":4037},"acceptWebSocket(ws, [room_id])",{"type":50,"value":4039}," so ",{"type":45,"tag":53,"props":4041,"children":4043},{"className":4042},[],[4044],{"type":50,"value":4045},"getWebSockets(room_id)",{"type":50,"value":4047}," returns\nonly that room's sockets.",{"type":45,"tag":2552,"props":4049,"children":4051},{"id":4050},"what-you-cannot-declare",[4052],{"type":50,"value":4053},"What you cannot declare",{"type":45,"tag":301,"props":4055,"children":4056},{},[4057,4085,4101],{"type":45,"tag":118,"props":4058,"children":4059},{},[4060,4076,4078,4083],{"type":45,"tag":290,"props":4061,"children":4062},{},[4063,4069,4070,4075],{"type":45,"tag":53,"props":4064,"children":4066},{"className":4065},[],[4067],{"type":50,"value":4068},"durable_objects.bindings",{"type":50,"value":2529},{"type":45,"tag":53,"props":4071,"children":4073},{"className":4072},[],[4074],{"type":50,"value":141},{"type":50,"value":189},{"type":50,"value":4077}," The platform\nextracts your ",{"type":45,"tag":53,"props":4079,"children":4081},{"className":4080},[],[4082],{"type":50,"value":889},{"type":50,"value":4084}," class automatically. Adding bindings fails the\ndeploy with a clear error.",{"type":45,"tag":118,"props":4086,"children":4087},{},[4088,4099],{"type":45,"tag":290,"props":4089,"children":4090},{},[4091,4097],{"type":45,"tag":53,"props":4092,"children":4094},{"className":4093},[],[4095],{"type":50,"value":4096},"new_sqlite_classes",{"type":50,"value":4098}," \u002F migrations.",{"type":50,"value":4100}," Same reason. Your App's\nstorage is set up by the platform.",{"type":45,"tag":118,"props":4102,"children":4103},{},[4104,4128,4130,4135],{"type":45,"tag":290,"props":4105,"children":4106},{},[4107,4113,4114,4120,4121,4127],{"type":45,"tag":53,"props":4108,"children":4110},{"className":4109},[],[4111],{"type":50,"value":4112},"d1_databases",{"type":50,"value":166},{"type":45,"tag":53,"props":4115,"children":4117},{"className":4116},[],[4118],{"type":50,"value":4119},"r2_buckets",{"type":50,"value":166},{"type":45,"tag":53,"props":4122,"children":4124},{"className":4123},[],[4125],{"type":50,"value":4126},"kv_namespaces",{"type":50,"value":189},{"type":50,"value":4129}," Not available.\nEverything goes in ",{"type":45,"tag":53,"props":4131,"children":4133},{"className":4132},[],[4134],{"type":50,"value":2568},{"type":50,"value":189},{"type":45,"tag":94,"props":4137,"children":4139},{"id":4138},"static-asset-rules-read-this-twice",[4140],{"type":50,"value":4141},"Static asset rules (read this twice)",{"type":45,"tag":46,"props":4143,"children":4144},{},[4145,4147,4151],{"type":50,"value":4146},"This is where most preview failures happen. The browser eventually runs your assets — the bundler does ",{"type":45,"tag":290,"props":4148,"children":4149},{},[4150],{"type":50,"value":830},{"type":50,"value":4152}," transform them. So:",{"type":45,"tag":2552,"props":4154,"children":4156},{"id":4155},"never-ship-jsx-in-a-script-typemodule-or-any-other-script-tag-browsers-cannot-parse-jsx",[4157,4170],{"type":45,"tag":290,"props":4158,"children":4159},{},[4160,4162,4168],{"type":50,"value":4161},"NEVER ship JSX in a ",{"type":45,"tag":53,"props":4163,"children":4165},{"className":4164},[],[4166],{"type":50,"value":4167},"\u003Cscript type=\"module\">",{"type":50,"value":4169}," (or any other script tag).",{"type":50,"value":4171}," Browsers cannot parse JSX.",{"type":45,"tag":46,"props":4173,"children":4174},{},[4175,4177,4182,4184,4190],{"type":50,"value":4176},"This page ",{"type":45,"tag":290,"props":4178,"children":4179},{},[4180],{"type":50,"value":4181},"will be blank",{"type":50,"value":4183}," with a ",{"type":45,"tag":53,"props":4185,"children":4187},{"className":4186},[],[4188],{"type":50,"value":4189},"SyntaxError: Unexpected token '\u003C'",{"type":50,"value":473},{"type":45,"tag":410,"props":4192,"children":4196},{"className":4193,"code":4194,"language":4195,"meta":418,"style":418},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript type=\"module\">\n  import React from \"https:\u002F\u002Fesm.sh\u002Freact@18\";\n  const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;   \u002F\u002F ← browser dies here\n\u003C\u002Fscript>\n","html",[4197],{"type":45,"tag":53,"props":4198,"children":4199},{"__ignoreMap":418},[4200,4239,4274,4337],{"type":45,"tag":484,"props":4201,"children":4202},{"class":486,"line":487},[4203,4207,4212,4217,4221,4225,4230,4234],{"type":45,"tag":484,"props":4204,"children":4205},{"style":491},[4206],{"type":50,"value":1104},{"type":45,"tag":484,"props":4208,"children":4209},{"style":1066},[4210],{"type":50,"value":4211},"script",{"type":45,"tag":484,"props":4213,"children":4214},{"style":506},[4215],{"type":50,"value":4216}," type",{"type":45,"tag":484,"props":4218,"children":4219},{"style":491},[4220],{"type":50,"value":2737},{"type":45,"tag":484,"props":4222,"children":4223},{"style":491},[4224],{"type":50,"value":513},{"type":45,"tag":484,"props":4226,"children":4227},{"style":525},[4228],{"type":50,"value":4229},"module",{"type":45,"tag":484,"props":4231,"children":4232},{"style":491},[4233],{"type":50,"value":513},{"type":45,"tag":484,"props":4235,"children":4236},{"style":491},[4237],{"type":50,"value":4238},">\n",{"type":45,"tag":484,"props":4240,"children":4241},{"class":486,"line":497},[4242,4247,4252,4257,4261,4266,4270],{"type":45,"tag":484,"props":4243,"children":4244},{"style":973},[4245],{"type":50,"value":4246},"  import",{"type":45,"tag":484,"props":4248,"children":4249},{"style":984},[4250],{"type":50,"value":4251}," React ",{"type":45,"tag":484,"props":4253,"children":4254},{"style":973},[4255],{"type":50,"value":4256},"from",{"type":45,"tag":484,"props":4258,"children":4259},{"style":491},[4260],{"type":50,"value":522},{"type":45,"tag":484,"props":4262,"children":4263},{"style":525},[4264],{"type":50,"value":4265},"https:\u002F\u002Fesm.sh\u002Freact@18",{"type":45,"tag":484,"props":4267,"children":4268},{"style":491},[4269],{"type":50,"value":513},{"type":45,"tag":484,"props":4271,"children":4272},{"style":491},[4273],{"type":50,"value":1015},{"type":45,"tag":484,"props":4275,"children":4276},{"class":486,"line":540},[4277,4282,4287,4291,4296,4300,4305,4310,4314,4318,4323,4327,4332],{"type":45,"tag":484,"props":4278,"children":4279},{"style":506},[4280],{"type":50,"value":4281},"  const",{"type":45,"tag":484,"props":4283,"children":4284},{"style":984},[4285],{"type":50,"value":4286}," App ",{"type":45,"tag":484,"props":4288,"children":4289},{"style":491},[4290],{"type":50,"value":2737},{"type":45,"tag":484,"props":4292,"children":4293},{"style":491},[4294],{"type":50,"value":4295}," ()",{"type":45,"tag":484,"props":4297,"children":4298},{"style":506},[4299],{"type":50,"value":2084},{"type":45,"tag":484,"props":4301,"children":4302},{"style":491},[4303],{"type":50,"value":4304}," \u003C",{"type":45,"tag":484,"props":4306,"children":4307},{"style":1066},[4308],{"type":50,"value":4309},"div",{"type":45,"tag":484,"props":4311,"children":4312},{"style":491},[4313],{"type":50,"value":1114},{"type":45,"tag":484,"props":4315,"children":4316},{"style":984},[4317],{"type":50,"value":2124},{"type":45,"tag":484,"props":4319,"children":4320},{"style":491},[4321],{"type":50,"value":4322},"\u003C\u002F",{"type":45,"tag":484,"props":4324,"children":4325},{"style":1066},[4326],{"type":50,"value":4309},{"type":45,"tag":484,"props":4328,"children":4329},{"style":491},[4330],{"type":50,"value":4331},">;",{"type":45,"tag":484,"props":4333,"children":4334},{"style":964},[4335],{"type":50,"value":4336},"   \u002F\u002F ← browser dies here\n",{"type":45,"tag":484,"props":4338,"children":4339},{"class":486,"line":577},[4340,4344,4348],{"type":45,"tag":484,"props":4341,"children":4342},{"style":491},[4343],{"type":50,"value":4322},{"type":45,"tag":484,"props":4345,"children":4346},{"style":1066},[4347],{"type":50,"value":4211},{"type":45,"tag":484,"props":4349,"children":4350},{"style":491},[4351],{"type":50,"value":4238},{"type":45,"tag":46,"props":4353,"children":4354},{},[4355],{"type":50,"value":4356},"Fix one of these three ways:",{"type":45,"tag":114,"props":4358,"children":4359},{},[4360,4377,4393],{"type":45,"tag":118,"props":4361,"children":4362},{},[4363,4368,4370,4375],{"type":45,"tag":290,"props":4364,"children":4365},{},[4366],{"type":50,"value":4367},"Pre-compile",{"type":50,"value":4369}," — write JSX in a build step (Vite\u002Fesbuild\u002Ftsup) and emit plain JS into ",{"type":45,"tag":53,"props":4371,"children":4373},{"className":4372},[],[4374],{"type":50,"value":446},{"type":50,"value":4376},". Best for production.",{"type":45,"tag":118,"props":4378,"children":4379},{},[4380,4391],{"type":45,"tag":290,"props":4381,"children":4382},{},[4383,4389],{"type":45,"tag":53,"props":4384,"children":4386},{"className":4385},[],[4387],{"type":50,"value":4388},"React.createElement",{"type":50,"value":4390}," by hand",{"type":50,"value":4392}," — works without a build step but is verbose.",{"type":45,"tag":118,"props":4394,"children":4395},{},[4396,4405,4407,4412,4414,4420,4422,4428,4430,4435,4437,4443,4445,4450,4909,4913,4919,4921,4926,4928,4934,4936,4942,4944,4950,4952,4957,4959,4962,4964,4969,4971,4976,4978,4983,4984,5213,5216,5218,5224,5226,5232,5234,5240,5242,5247],{"type":45,"tag":290,"props":4397,"children":4398},{},[4399],{"type":45,"tag":53,"props":4400,"children":4402},{"className":4401},[],[4403],{"type":50,"value":4404},"@babel\u002Fstandalone",{"type":50,"value":4406}," — only for prototypes. Load Babel ",{"type":45,"tag":290,"props":4408,"children":4409},{},[4410],{"type":50,"value":4411},"before",{"type":50,"value":4413}," the script and use ",{"type":45,"tag":53,"props":4415,"children":4417},{"className":4416},[],[4418],{"type":50,"value":4419},"type=\"text\u002Fbabel\"",{"type":50,"value":4421},". The modern ",{"type":45,"tag":53,"props":4423,"children":4425},{"className":4424},[],[4426],{"type":50,"value":4427},"@babel\u002Fpreset-react",{"type":50,"value":4429}," defaults to the ",{"type":45,"tag":290,"props":4431,"children":4432},{},[4433],{"type":50,"value":4434},"automatic JSX runtime",{"type":50,"value":4436},", which emits ",{"type":45,"tag":53,"props":4438,"children":4440},{"className":4439},[],[4441],{"type":50,"value":4442},"import { jsx } from \"react\u002Fjsx-runtime\"",{"type":50,"value":4444},". Browsers will reject that bare specifier unless your importmap maps it. ",{"type":45,"tag":290,"props":4446,"children":4447},{},[4448],{"type":50,"value":4449},"Always ship a complete importmap alongside the Babel script:",{"type":45,"tag":410,"props":4451,"children":4453},{"className":4193,"code":4452,"language":4195,"meta":418,"style":418},"\u003Cscript type=\"importmap\">\n{\n  \"imports\": {\n    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\",\n    \"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\u002Fjsx-runtime\",\n    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\",\n    \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\"\n  }\n}\n\u003C\u002Fscript>\n\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002F@babel\u002Fstandalone\u002Fbabel.min.js\">\u003C\u002Fscript>\n\u003Cscript type=\"text\u002Fbabel\" data-type=\"module\" data-presets=\"react\">\n  import React from \"react\";\n  import { createRoot } from \"react-dom\u002Fclient\";\n  const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;\n  createRoot(document.getElementById(\"root\")).render(\u003CApp \u002F>);\n\u003C\u002Fscript>\n",[4454],{"type":45,"tag":53,"props":4455,"children":4456},{"__ignoreMap":418},[4457,4493,4500,4508,4516,4524,4532,4540,4547,4554,4569,4615,4694,4725,4766,4818,4894],{"type":45,"tag":484,"props":4458,"children":4459},{"class":486,"line":487},[4460,4464,4468,4472,4476,4480,4485,4489],{"type":45,"tag":484,"props":4461,"children":4462},{"style":491},[4463],{"type":50,"value":1104},{"type":45,"tag":484,"props":4465,"children":4466},{"style":1066},[4467],{"type":50,"value":4211},{"type":45,"tag":484,"props":4469,"children":4470},{"style":506},[4471],{"type":50,"value":4216},{"type":45,"tag":484,"props":4473,"children":4474},{"style":491},[4475],{"type":50,"value":2737},{"type":45,"tag":484,"props":4477,"children":4478},{"style":491},[4479],{"type":50,"value":513},{"type":45,"tag":484,"props":4481,"children":4482},{"style":525},[4483],{"type":50,"value":4484},"importmap",{"type":45,"tag":484,"props":4486,"children":4487},{"style":491},[4488],{"type":50,"value":513},{"type":45,"tag":484,"props":4490,"children":4491},{"style":491},[4492],{"type":50,"value":4238},{"type":45,"tag":484,"props":4494,"children":4495},{"class":486,"line":497},[4496],{"type":45,"tag":484,"props":4497,"children":4498},{"style":984},[4499],{"type":50,"value":494},{"type":45,"tag":484,"props":4501,"children":4502},{"class":486,"line":540},[4503],{"type":45,"tag":484,"props":4504,"children":4505},{"style":984},[4506],{"type":50,"value":4507},"  \"imports\": {\n",{"type":45,"tag":484,"props":4509,"children":4510},{"class":486,"line":577},[4511],{"type":45,"tag":484,"props":4512,"children":4513},{"style":984},[4514],{"type":50,"value":4515},"    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\",\n",{"type":45,"tag":484,"props":4517,"children":4518},{"class":486,"line":603},[4519],{"type":45,"tag":484,"props":4520,"children":4521},{"style":984},[4522],{"type":50,"value":4523},"    \"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\u002Fjsx-runtime\",\n",{"type":45,"tag":484,"props":4525,"children":4526},{"class":486,"line":643},[4527],{"type":45,"tag":484,"props":4528,"children":4529},{"style":984},[4530],{"type":50,"value":4531},"    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\",\n",{"type":45,"tag":484,"props":4533,"children":4534},{"class":486,"line":681},[4535],{"type":45,"tag":484,"props":4536,"children":4537},{"style":984},[4538],{"type":50,"value":4539},"    \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\"\n",{"type":45,"tag":484,"props":4541,"children":4542},{"class":486,"line":716},[4543],{"type":45,"tag":484,"props":4544,"children":4545},{"style":984},[4546],{"type":50,"value":722},{"type":45,"tag":484,"props":4548,"children":4549},{"class":486,"line":725},[4550],{"type":45,"tag":484,"props":4551,"children":4552},{"style":984},[4553],{"type":50,"value":731},{"type":45,"tag":484,"props":4555,"children":4556},{"class":486,"line":1240},[4557,4561,4565],{"type":45,"tag":484,"props":4558,"children":4559},{"style":491},[4560],{"type":50,"value":4322},{"type":45,"tag":484,"props":4562,"children":4563},{"style":1066},[4564],{"type":50,"value":4211},{"type":45,"tag":484,"props":4566,"children":4567},{"style":491},[4568],{"type":50,"value":4238},{"type":45,"tag":484,"props":4570,"children":4571},{"class":486,"line":1249},[4572,4576,4580,4585,4589,4593,4598,4602,4607,4611],{"type":45,"tag":484,"props":4573,"children":4574},{"style":491},[4575],{"type":50,"value":1104},{"type":45,"tag":484,"props":4577,"children":4578},{"style":1066},[4579],{"type":50,"value":4211},{"type":45,"tag":484,"props":4581,"children":4582},{"style":506},[4583],{"type":50,"value":4584}," src",{"type":45,"tag":484,"props":4586,"children":4587},{"style":491},[4588],{"type":50,"value":2737},{"type":45,"tag":484,"props":4590,"children":4591},{"style":491},[4592],{"type":50,"value":513},{"type":45,"tag":484,"props":4594,"children":4595},{"style":525},[4596],{"type":50,"value":4597},"https:\u002F\u002Funpkg.com\u002F@babel\u002Fstandalone\u002Fbabel.min.js",{"type":45,"tag":484,"props":4599,"children":4600},{"style":491},[4601],{"type":50,"value":513},{"type":45,"tag":484,"props":4603,"children":4604},{"style":491},[4605],{"type":50,"value":4606},">\u003C\u002F",{"type":45,"tag":484,"props":4608,"children":4609},{"style":1066},[4610],{"type":50,"value":4211},{"type":45,"tag":484,"props":4612,"children":4613},{"style":491},[4614],{"type":50,"value":4238},{"type":45,"tag":484,"props":4616,"children":4617},{"class":486,"line":1258},[4618,4622,4626,4630,4634,4638,4643,4647,4652,4656,4660,4664,4668,4673,4677,4681,4686,4690],{"type":45,"tag":484,"props":4619,"children":4620},{"style":491},[4621],{"type":50,"value":1104},{"type":45,"tag":484,"props":4623,"children":4624},{"style":1066},[4625],{"type":50,"value":4211},{"type":45,"tag":484,"props":4627,"children":4628},{"style":506},[4629],{"type":50,"value":4216},{"type":45,"tag":484,"props":4631,"children":4632},{"style":491},[4633],{"type":50,"value":2737},{"type":45,"tag":484,"props":4635,"children":4636},{"style":491},[4637],{"type":50,"value":513},{"type":45,"tag":484,"props":4639,"children":4640},{"style":525},[4641],{"type":50,"value":4642},"text\u002Fbabel",{"type":45,"tag":484,"props":4644,"children":4645},{"style":491},[4646],{"type":50,"value":513},{"type":45,"tag":484,"props":4648,"children":4649},{"style":506},[4650],{"type":50,"value":4651}," data-type",{"type":45,"tag":484,"props":4653,"children":4654},{"style":491},[4655],{"type":50,"value":2737},{"type":45,"tag":484,"props":4657,"children":4658},{"style":491},[4659],{"type":50,"value":513},{"type":45,"tag":484,"props":4661,"children":4662},{"style":525},[4663],{"type":50,"value":4229},{"type":45,"tag":484,"props":4665,"children":4666},{"style":491},[4667],{"type":50,"value":513},{"type":45,"tag":484,"props":4669,"children":4670},{"style":506},[4671],{"type":50,"value":4672}," data-presets",{"type":45,"tag":484,"props":4674,"children":4675},{"style":491},[4676],{"type":50,"value":2737},{"type":45,"tag":484,"props":4678,"children":4679},{"style":491},[4680],{"type":50,"value":513},{"type":45,"tag":484,"props":4682,"children":4683},{"style":525},[4684],{"type":50,"value":4685},"react",{"type":45,"tag":484,"props":4687,"children":4688},{"style":491},[4689],{"type":50,"value":513},{"type":45,"tag":484,"props":4691,"children":4692},{"style":491},[4693],{"type":50,"value":4238},{"type":45,"tag":484,"props":4695,"children":4696},{"class":486,"line":1267},[4697,4701,4705,4709,4713,4717,4721],{"type":45,"tag":484,"props":4698,"children":4699},{"style":973},[4700],{"type":50,"value":4246},{"type":45,"tag":484,"props":4702,"children":4703},{"style":984},[4704],{"type":50,"value":4251},{"type":45,"tag":484,"props":4706,"children":4707},{"style":973},[4708],{"type":50,"value":4256},{"type":45,"tag":484,"props":4710,"children":4711},{"style":491},[4712],{"type":50,"value":522},{"type":45,"tag":484,"props":4714,"children":4715},{"style":525},[4716],{"type":50,"value":4685},{"type":45,"tag":484,"props":4718,"children":4719},{"style":491},[4720],{"type":50,"value":513},{"type":45,"tag":484,"props":4722,"children":4723},{"style":491},[4724],{"type":50,"value":1015},{"type":45,"tag":484,"props":4726,"children":4727},{"class":486,"line":1276},[4728,4732,4736,4741,4745,4749,4753,4758,4762],{"type":45,"tag":484,"props":4729,"children":4730},{"style":973},[4731],{"type":50,"value":4246},{"type":45,"tag":484,"props":4733,"children":4734},{"style":491},[4735],{"type":50,"value":981},{"type":45,"tag":484,"props":4737,"children":4738},{"style":984},[4739],{"type":50,"value":4740}," createRoot",{"type":45,"tag":484,"props":4742,"children":4743},{"style":491},[4744],{"type":50,"value":992},{"type":45,"tag":484,"props":4746,"children":4747},{"style":973},[4748],{"type":50,"value":997},{"type":45,"tag":484,"props":4750,"children":4751},{"style":491},[4752],{"type":50,"value":522},{"type":45,"tag":484,"props":4754,"children":4755},{"style":525},[4756],{"type":50,"value":4757},"react-dom\u002Fclient",{"type":45,"tag":484,"props":4759,"children":4760},{"style":491},[4761],{"type":50,"value":513},{"type":45,"tag":484,"props":4763,"children":4764},{"style":491},[4765],{"type":50,"value":1015},{"type":45,"tag":484,"props":4767,"children":4768},{"class":486,"line":1293},[4769,4773,4777,4781,4785,4789,4793,4797,4801,4805,4809,4813],{"type":45,"tag":484,"props":4770,"children":4771},{"style":506},[4772],{"type":50,"value":4281},{"type":45,"tag":484,"props":4774,"children":4775},{"style":984},[4776],{"type":50,"value":4286},{"type":45,"tag":484,"props":4778,"children":4779},{"style":491},[4780],{"type":50,"value":2737},{"type":45,"tag":484,"props":4782,"children":4783},{"style":491},[4784],{"type":50,"value":4295},{"type":45,"tag":484,"props":4786,"children":4787},{"style":506},[4788],{"type":50,"value":2084},{"type":45,"tag":484,"props":4790,"children":4791},{"style":491},[4792],{"type":50,"value":4304},{"type":45,"tag":484,"props":4794,"children":4795},{"style":1066},[4796],{"type":50,"value":4309},{"type":45,"tag":484,"props":4798,"children":4799},{"style":491},[4800],{"type":50,"value":1114},{"type":45,"tag":484,"props":4802,"children":4803},{"style":984},[4804],{"type":50,"value":2124},{"type":45,"tag":484,"props":4806,"children":4807},{"style":491},[4808],{"type":50,"value":4322},{"type":45,"tag":484,"props":4810,"children":4811},{"style":1066},[4812],{"type":50,"value":4309},{"type":45,"tag":484,"props":4814,"children":4815},{"style":491},[4816],{"type":50,"value":4817},">;\n",{"type":45,"tag":484,"props":4819,"children":4820},{"class":486,"line":1301},[4821,4826,4831,4835,4840,4844,4848,4852,4856,4860,4864,4869,4873,4877,4881,4886,4890],{"type":45,"tag":484,"props":4822,"children":4823},{"style":1144},[4824],{"type":50,"value":4825},"  createRoot",{"type":45,"tag":484,"props":4827,"children":4828},{"style":984},[4829],{"type":50,"value":4830},"(document",{"type":45,"tag":484,"props":4832,"children":4833},{"style":491},[4834],{"type":50,"value":189},{"type":45,"tag":484,"props":4836,"children":4837},{"style":1144},[4838],{"type":50,"value":4839},"getElementById",{"type":45,"tag":484,"props":4841,"children":4842},{"style":984},[4843],{"type":50,"value":1074},{"type":45,"tag":484,"props":4845,"children":4846},{"style":491},[4847],{"type":50,"value":513},{"type":45,"tag":484,"props":4849,"children":4850},{"style":525},[4851],{"type":50,"value":42},{"type":45,"tag":484,"props":4853,"children":4854},{"style":491},[4855],{"type":50,"value":513},{"type":45,"tag":484,"props":4857,"children":4858},{"style":984},[4859],{"type":50,"value":3751},{"type":45,"tag":484,"props":4861,"children":4862},{"style":491},[4863],{"type":50,"value":189},{"type":45,"tag":484,"props":4865,"children":4866},{"style":1144},[4867],{"type":50,"value":4868},"render",{"type":45,"tag":484,"props":4870,"children":4871},{"style":984},[4872],{"type":50,"value":1074},{"type":45,"tag":484,"props":4874,"children":4875},{"style":491},[4876],{"type":50,"value":1104},{"type":45,"tag":484,"props":4878,"children":4879},{"style":612},[4880],{"type":50,"value":889},{"type":45,"tag":484,"props":4882,"children":4883},{"style":491},[4884],{"type":50,"value":4885}," \u002F>",{"type":45,"tag":484,"props":4887,"children":4888},{"style":984},[4889],{"type":50,"value":1169},{"type":45,"tag":484,"props":4891,"children":4892},{"style":491},[4893],{"type":50,"value":1015},{"type":45,"tag":484,"props":4895,"children":4896},{"class":486,"line":1390},[4897,4901,4905],{"type":45,"tag":484,"props":4898,"children":4899},{"style":491},[4900],{"type":50,"value":4322},{"type":45,"tag":484,"props":4902,"children":4903},{"style":1066},[4904],{"type":50,"value":4211},{"type":45,"tag":484,"props":4906,"children":4907},{"style":491},[4908],{"type":50,"value":4238},{"type":45,"tag":4910,"props":4911,"children":4912},"br",{},[],{"type":45,"tag":53,"props":4914,"children":4916},{"className":4915},[],[4917],{"type":50,"value":4918},"data-type=\"module\"",{"type":50,"value":4920}," is required for ",{"type":45,"tag":53,"props":4922,"children":4924},{"className":4923},[],[4925],{"type":50,"value":976},{"type":50,"value":4927}," to work inside the Babel script. Import React from the importmap key (",{"type":45,"tag":53,"props":4929,"children":4931},{"className":4930},[],[4932],{"type":50,"value":4933},"\"react\"",{"type":50,"value":4935},") — not from a hard-coded ",{"type":45,"tag":53,"props":4937,"children":4939},{"className":4938},[],[4940],{"type":50,"value":4941},"esm.sh",{"type":50,"value":4943}," URL — so your code and Babel's emitted ",{"type":45,"tag":53,"props":4945,"children":4947},{"className":4946},[],[4948],{"type":50,"value":4949},"react\u002Fjsx-runtime",{"type":50,"value":4951}," import resolve to the ",{"type":45,"tag":290,"props":4953,"children":4954},{},[4955],{"type":50,"value":4956},"same",{"type":50,"value":4958}," React instance.",{"type":45,"tag":4910,"props":4960,"children":4961},{},[],{"type":50,"value":4963},"If you really cannot ship ",{"type":45,"tag":53,"props":4965,"children":4967},{"className":4966},[],[4968],{"type":50,"value":4949},{"type":50,"value":4970}," in the importmap, force Babel to the legacy classic runtime instead so it emits ",{"type":45,"tag":53,"props":4972,"children":4974},{"className":4973},[],[4975],{"type":50,"value":4388},{"type":50,"value":4977}," calls and never touches ",{"type":45,"tag":53,"props":4979,"children":4981},{"className":4980},[],[4982],{"type":50,"value":4949},{"type":50,"value":473},{"type":45,"tag":410,"props":4985,"children":4987},{"className":4193,"code":4986,"language":4195,"meta":418,"style":418},"\u003Cscript\n  type=\"text\u002Fbabel\"\n  data-type=\"module\"\n  data-presets=\"react\"\n  data-plugins='[[\"transform-react-jsx\", { \"runtime\": \"classic\" }]]'\n>\n  import React from \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\";  \u002F* must be in scope *\u002F\n  const App = () => \u003Cdiv>hi\u003C\u002Fdiv>;\n\u003C\u002Fscript>\n",[4988],{"type":45,"tag":53,"props":4989,"children":4990},{"__ignoreMap":418},[4991,5003,5027,5051,5075,5102,5109,5147,5198],{"type":45,"tag":484,"props":4992,"children":4993},{"class":486,"line":487},[4994,4998],{"type":45,"tag":484,"props":4995,"children":4996},{"style":491},[4997],{"type":50,"value":1104},{"type":45,"tag":484,"props":4999,"children":5000},{"style":1066},[5001],{"type":50,"value":5002},"script\n",{"type":45,"tag":484,"props":5004,"children":5005},{"class":486,"line":497},[5006,5011,5015,5019,5023],{"type":45,"tag":484,"props":5007,"children":5008},{"style":506},[5009],{"type":50,"value":5010},"  type",{"type":45,"tag":484,"props":5012,"children":5013},{"style":491},[5014],{"type":50,"value":2737},{"type":45,"tag":484,"props":5016,"children":5017},{"style":491},[5018],{"type":50,"value":513},{"type":45,"tag":484,"props":5020,"children":5021},{"style":525},[5022],{"type":50,"value":4642},{"type":45,"tag":484,"props":5024,"children":5025},{"style":491},[5026],{"type":50,"value":713},{"type":45,"tag":484,"props":5028,"children":5029},{"class":486,"line":540},[5030,5035,5039,5043,5047],{"type":45,"tag":484,"props":5031,"children":5032},{"style":506},[5033],{"type":50,"value":5034},"  data-type",{"type":45,"tag":484,"props":5036,"children":5037},{"style":491},[5038],{"type":50,"value":2737},{"type":45,"tag":484,"props":5040,"children":5041},{"style":491},[5042],{"type":50,"value":513},{"type":45,"tag":484,"props":5044,"children":5045},{"style":525},[5046],{"type":50,"value":4229},{"type":45,"tag":484,"props":5048,"children":5049},{"style":491},[5050],{"type":50,"value":713},{"type":45,"tag":484,"props":5052,"children":5053},{"class":486,"line":577},[5054,5059,5063,5067,5071],{"type":45,"tag":484,"props":5055,"children":5056},{"style":506},[5057],{"type":50,"value":5058},"  data-presets",{"type":45,"tag":484,"props":5060,"children":5061},{"style":491},[5062],{"type":50,"value":2737},{"type":45,"tag":484,"props":5064,"children":5065},{"style":491},[5066],{"type":50,"value":513},{"type":45,"tag":484,"props":5068,"children":5069},{"style":525},[5070],{"type":50,"value":4685},{"type":45,"tag":484,"props":5072,"children":5073},{"style":491},[5074],{"type":50,"value":713},{"type":45,"tag":484,"props":5076,"children":5077},{"class":486,"line":603},[5078,5083,5087,5092,5097],{"type":45,"tag":484,"props":5079,"children":5080},{"style":506},[5081],{"type":50,"value":5082},"  data-plugins",{"type":45,"tag":484,"props":5084,"children":5085},{"style":491},[5086],{"type":50,"value":2737},{"type":45,"tag":484,"props":5088,"children":5089},{"style":491},[5090],{"type":50,"value":5091},"'",{"type":45,"tag":484,"props":5093,"children":5094},{"style":525},[5095],{"type":50,"value":5096},"[[\"transform-react-jsx\", { \"runtime\": \"classic\" }]]",{"type":45,"tag":484,"props":5098,"children":5099},{"style":491},[5100],{"type":50,"value":5101},"'\n",{"type":45,"tag":484,"props":5103,"children":5104},{"class":486,"line":643},[5105],{"type":45,"tag":484,"props":5106,"children":5107},{"style":491},[5108],{"type":50,"value":4238},{"type":45,"tag":484,"props":5110,"children":5111},{"class":486,"line":681},[5112,5116,5120,5124,5128,5133,5137,5142],{"type":45,"tag":484,"props":5113,"children":5114},{"style":973},[5115],{"type":50,"value":4246},{"type":45,"tag":484,"props":5117,"children":5118},{"style":984},[5119],{"type":50,"value":4251},{"type":45,"tag":484,"props":5121,"children":5122},{"style":973},[5123],{"type":50,"value":4256},{"type":45,"tag":484,"props":5125,"children":5126},{"style":491},[5127],{"type":50,"value":522},{"type":45,"tag":484,"props":5129,"children":5130},{"style":525},[5131],{"type":50,"value":5132},"https:\u002F\u002Fesm.sh\u002Freact@18.3.1",{"type":45,"tag":484,"props":5134,"children":5135},{"style":491},[5136],{"type":50,"value":513},{"type":45,"tag":484,"props":5138,"children":5139},{"style":491},[5140],{"type":50,"value":5141},";",{"type":45,"tag":484,"props":5143,"children":5144},{"style":964},[5145],{"type":50,"value":5146},"  \u002F* must be in scope *\u002F\n",{"type":45,"tag":484,"props":5148,"children":5149},{"class":486,"line":716},[5150,5154,5158,5162,5166,5170,5174,5178,5182,5186,5190,5194],{"type":45,"tag":484,"props":5151,"children":5152},{"style":506},[5153],{"type":50,"value":4281},{"type":45,"tag":484,"props":5155,"children":5156},{"style":984},[5157],{"type":50,"value":4286},{"type":45,"tag":484,"props":5159,"children":5160},{"style":491},[5161],{"type":50,"value":2737},{"type":45,"tag":484,"props":5163,"children":5164},{"style":491},[5165],{"type":50,"value":4295},{"type":45,"tag":484,"props":5167,"children":5168},{"style":506},[5169],{"type":50,"value":2084},{"type":45,"tag":484,"props":5171,"children":5172},{"style":491},[5173],{"type":50,"value":4304},{"type":45,"tag":484,"props":5175,"children":5176},{"style":1066},[5177],{"type":50,"value":4309},{"type":45,"tag":484,"props":5179,"children":5180},{"style":491},[5181],{"type":50,"value":1114},{"type":45,"tag":484,"props":5183,"children":5184},{"style":984},[5185],{"type":50,"value":2124},{"type":45,"tag":484,"props":5187,"children":5188},{"style":491},[5189],{"type":50,"value":4322},{"type":45,"tag":484,"props":5191,"children":5192},{"style":1066},[5193],{"type":50,"value":4309},{"type":45,"tag":484,"props":5195,"children":5196},{"style":491},[5197],{"type":50,"value":4817},{"type":45,"tag":484,"props":5199,"children":5200},{"class":486,"line":725},[5201,5205,5209],{"type":45,"tag":484,"props":5202,"children":5203},{"style":491},[5204],{"type":50,"value":4322},{"type":45,"tag":484,"props":5206,"children":5207},{"style":1066},[5208],{"type":50,"value":4211},{"type":45,"tag":484,"props":5210,"children":5211},{"style":491},[5212],{"type":50,"value":4238},{"type":45,"tag":4910,"props":5214,"children":5215},{},[],{"type":50,"value":5217},"The classic runtime requires ",{"type":45,"tag":53,"props":5219,"children":5221},{"className":5220},[],[5222],{"type":50,"value":5223},"React",{"type":50,"value":5225}," to be in lexical scope (because ",{"type":45,"tag":53,"props":5227,"children":5229},{"className":5228},[],[5230],{"type":50,"value":5231},"\u003Cdiv>",{"type":50,"value":5233}," becomes ",{"type":45,"tag":53,"props":5235,"children":5237},{"className":5236},[],[5238],{"type":50,"value":5239},"React.createElement(\"div\")",{"type":50,"value":5241},"). The automatic runtime (default) does not, but needs ",{"type":45,"tag":53,"props":5243,"children":5245},{"className":5244},[],[5246],{"type":50,"value":4949},{"type":50,"value":5248}," resolvable.",{"type":45,"tag":2552,"props":5250,"children":5252},{"id":5251},"symptom-to-fix-index",[5253],{"type":50,"value":5254},"Symptom-to-fix index",{"type":45,"tag":5256,"props":5257,"children":5258},"table",{},[5259,5283],{"type":45,"tag":5260,"props":5261,"children":5262},"thead",{},[5263],{"type":45,"tag":5264,"props":5265,"children":5266},"tr",{},[5267,5273,5278],{"type":45,"tag":5268,"props":5269,"children":5270},"th",{},[5271],{"type":50,"value":5272},"Console error",{"type":45,"tag":5268,"props":5274,"children":5275},{},[5276],{"type":50,"value":5277},"Cause",{"type":45,"tag":5268,"props":5279,"children":5280},{},[5281],{"type":50,"value":5282},"Fix",{"type":45,"tag":5284,"props":5285,"children":5286},"tbody",{},[5287,5330,5373,5403],{"type":45,"tag":5264,"props":5288,"children":5289},{},[5290,5308,5313],{"type":45,"tag":5291,"props":5292,"children":5293},"td",{},[5294,5300,5302,5307],{"type":45,"tag":53,"props":5295,"children":5297},{"className":5296},[],[5298],{"type":50,"value":5299},"Uncaught SyntaxError: Unexpected token '\u003C'",{"type":50,"value":5301}," (inside ",{"type":45,"tag":53,"props":5303,"children":5305},{"className":5304},[],[5306],{"type":50,"value":4167},{"type":50,"value":1169},{"type":45,"tag":5291,"props":5309,"children":5310},{},[5311],{"type":50,"value":5312},"JSX shipped raw to the browser",{"type":45,"tag":5291,"props":5314,"children":5315},{},[5316,5318,5323,5325],{"type":50,"value":5317},"Pre-compile, or use ",{"type":45,"tag":53,"props":5319,"children":5321},{"className":5320},[],[5322],{"type":50,"value":4404},{"type":50,"value":5324}," with ",{"type":45,"tag":53,"props":5326,"children":5328},{"className":5327},[],[5329],{"type":50,"value":4419},{"type":45,"tag":5264,"props":5331,"children":5332},{},[5333,5342,5355],{"type":45,"tag":5291,"props":5334,"children":5335},{},[5336],{"type":45,"tag":53,"props":5337,"children":5339},{"className":5338},[],[5340],{"type":50,"value":5341},"Uncaught TypeError: Failed to resolve module specifier \"react\u002Fjsx-runtime\". Relative references must start with either \"\u002F\", \".\u002F\", or \"..\u002F\".",{"type":45,"tag":5291,"props":5343,"children":5344},{},[5345,5347,5353],{"type":50,"value":5346},"Automatic JSX runtime emits ",{"type":45,"tag":53,"props":5348,"children":5350},{"className":5349},[],[5351],{"type":50,"value":5352},"import \"react\u002Fjsx-runtime\"",{"type":50,"value":5354}," but importmap doesn't map it",{"type":45,"tag":5291,"props":5356,"children":5357},{},[5358,5359,5365,5367,5371],{"type":50,"value":799},{"type":45,"tag":53,"props":5360,"children":5362},{"className":5361},[],[5363],{"type":50,"value":5364},"\"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@\u003Csame-version>\u002Fjsx-runtime\"",{"type":50,"value":5366}," to the importmap ",{"type":45,"tag":290,"props":5368,"children":5369},{},[5370],{"type":50,"value":4411},{"type":50,"value":5372}," the Babel\u002Fscript tag — or force the classic runtime (see above)",{"type":45,"tag":5264,"props":5374,"children":5375},{},[5376,5387,5392],{"type":45,"tag":5291,"props":5377,"children":5378},{},[5379,5385],{"type":45,"tag":53,"props":5380,"children":5382},{"className":5381},[],[5383],{"type":50,"value":5384},"Uncaught TypeError: Failed to resolve module specifier \"react\"",{"type":50,"value":5386}," (or any bare name)",{"type":45,"tag":5291,"props":5388,"children":5389},{},[5390],{"type":50,"value":5391},"No importmap entry for that package",{"type":45,"tag":5291,"props":5393,"children":5394},{},[5395,5397,5401],{"type":50,"value":5396},"Add it to the importmap; importmap script tag must appear ",{"type":45,"tag":290,"props":5398,"children":5399},{},[5400],{"type":50,"value":4411},{"type":50,"value":5402}," any module script that uses the specifier",{"type":45,"tag":5264,"props":5404,"children":5405},{},[5406,5415,5420],{"type":45,"tag":5291,"props":5407,"children":5408},{},[5409],{"type":45,"tag":53,"props":5410,"children":5412},{"className":5411},[],[5413],{"type":50,"value":5414},"TypeError: Cannot read properties of null (reading 'useContext')",{"type":45,"tag":5291,"props":5416,"children":5417},{},[5418],{"type":50,"value":5419},"Dual-React (two copies loaded)",{"type":45,"tag":5291,"props":5421,"children":5422},{},[5423,5425,5431],{"type":50,"value":5424},"Append ",{"type":45,"tag":53,"props":5426,"children":5428},{"className":5427},[],[5429],{"type":50,"value":5430},"?external=react,react-dom",{"type":50,"value":5432}," to every esm.sh URL with React as a peer dep — see the dual-React trap below",{"type":45,"tag":2552,"props":5434,"children":5436},{"id":5435},"other-asset-gotchas",[5437],{"type":50,"value":5438},"Other asset gotchas",{"type":45,"tag":301,"props":5440,"children":5441},{},[5442,5467,5516,5562,5588],{"type":45,"tag":118,"props":5443,"children":5444},{},[5445,5450,5452,5458,5460,5465],{"type":45,"tag":290,"props":5446,"children":5447},{},[5448],{"type":50,"value":5449},"Binary assets are not extracted from npm packages.",{"type":50,"value":5451}," Fonts, images, and ",{"type":45,"tag":53,"props":5453,"children":5455},{"className":5454},[],[5456],{"type":50,"value":5457},".wasm",{"type":50,"value":5459}," shipped via npm tarballs will be missing. Put binaries directly in ",{"type":45,"tag":53,"props":5461,"children":5463},{"className":5462},[],[5464],{"type":50,"value":446},{"type":50,"value":5466}," instead.",{"type":45,"tag":118,"props":5468,"children":5469},{},[5470,5475,5477,5482,5484,5490,5492,5498,5500,5506,5508,5514],{"type":45,"tag":290,"props":5471,"children":5472},{},[5473],{"type":50,"value":5474},"Paths in JS need care under preview",{"type":50,"value":5476},": prefer ",{"type":45,"tag":53,"props":5478,"children":5480},{"className":5479},[],[5481],{"type":50,"value":375},{"type":50,"value":5483},", relative paths, or a runtime base detected from ",{"type":45,"tag":53,"props":5485,"children":5487},{"className":5486},[],[5488],{"type":50,"value":5489},"document.baseURI",{"type":50,"value":5491},". Don't hard-code ",{"type":45,"tag":53,"props":5493,"children":5495},{"className":5494},[],[5496],{"type":50,"value":5497},"\u002Fapi\u002F...",{"type":50,"value":5499}," in client code; use ",{"type":45,"tag":53,"props":5501,"children":5503},{"className":5502},[],[5504],{"type":50,"value":5505},".\u002Fapi\u002F...",{"type":50,"value":5507}," or read a base from a ",{"type":45,"tag":53,"props":5509,"children":5511},{"className":5510},[],[5512],{"type":50,"value":5513},"\u003Cmeta>",{"type":50,"value":5515}," tag.",{"type":45,"tag":118,"props":5517,"children":5518},{},[5519,5524,5525,5530,5532,5538,5540,5546,5547,5553,5554,5560],{"type":45,"tag":290,"props":5520,"children":5521},{},[5522],{"type":50,"value":5523},"Trailing slashes matter",{"type":50,"value":158},{"type":45,"tag":53,"props":5526,"children":5528},{"className":5527},[],[5529],{"type":50,"value":670},{"type":50,"value":5531}," mode: ",{"type":45,"tag":53,"props":5533,"children":5535},{"className":5534},[],[5536],{"type":50,"value":5537},"\u002Fabout",{"type":50,"value":5539}," serves ",{"type":45,"tag":53,"props":5541,"children":5543},{"className":5542},[],[5544],{"type":50,"value":5545},"about.html",{"type":50,"value":166},{"type":45,"tag":53,"props":5548,"children":5550},{"className":5549},[],[5551],{"type":50,"value":5552},"\u002Fabout\u002F",{"type":50,"value":5539},{"type":45,"tag":53,"props":5555,"children":5557},{"className":5556},[],[5558],{"type":50,"value":5559},"about\u002Findex.html",{"type":50,"value":5561},". Pick one shape and link consistently.",{"type":45,"tag":118,"props":5563,"children":5564},{},[5565,5570,5572,5578,5580,5586],{"type":45,"tag":290,"props":5566,"children":5567},{},[5568],{"type":50,"value":5569},"No CSS preprocessors at runtime",{"type":50,"value":5571}," — ship ",{"type":45,"tag":53,"props":5573,"children":5575},{"className":5574},[],[5576],{"type":50,"value":5577},".css",{"type":50,"value":5579},", not ",{"type":45,"tag":53,"props":5581,"children":5583},{"className":5582},[],[5584],{"type":50,"value":5585},".scss",{"type":50,"value":5587},". Compile first if you need Sass.",{"type":45,"tag":118,"props":5589,"children":5590},{},[5591,5596],{"type":45,"tag":290,"props":5592,"children":5593},{},[5594],{"type":50,"value":5595},"Importmaps work",{"type":50,"value":5597}," since they're inline JSON. Use them to avoid bundling React\u002Fetc. for prototypes — but watch the dual-React trap below.",{"type":45,"tag":2552,"props":5599,"children":5601},{"id":5600},"the-dual-react-trap-the-1-cause-of-blank-page-usecontext-is-null",[5602,5604,5610],{"type":50,"value":5603},"The dual-React trap (the #1 cause of \"blank page + ",{"type":45,"tag":53,"props":5605,"children":5607},{"className":5606},[],[5608],{"type":50,"value":5609},"useContext",{"type":50,"value":5611}," is null`)",{"type":45,"tag":46,"props":5613,"children":5614},{},[5615,5620,5622,5628,5630,5635,5637,5643],{"type":45,"tag":53,"props":5616,"children":5618},{"className":5617},[],[5619],{"type":50,"value":4941},{"type":50,"value":5621}," bundles a package's peer dependencies ",{"type":45,"tag":5623,"props":5624,"children":5625},"em",{},[5626],{"type":50,"value":5627},"into the package itself",{"type":50,"value":5629}," unless you tell it otherwise. So this importmap looks correct but ships ",{"type":45,"tag":290,"props":5631,"children":5632},{},[5633],{"type":50,"value":5634},"two copies of React",{"type":50,"value":5636}," — one for your app, another nested inside ",{"type":45,"tag":53,"props":5638,"children":5640},{"className":5639},[],[5641],{"type":50,"value":5642},"framer-motion",{"type":50,"value":473},{"type":45,"tag":410,"props":5645,"children":5647},{"className":4193,"code":5646,"language":4195,"meta":418,"style":418},"\u003C!-- BROKEN: framer-motion has its own React inside, hooks crash with `Cannot read properties of null (reading 'useContext')` -->\n\u003Cscript type=\"importmap\">\n{\n  \"imports\": {\n    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.2.0\",\n    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.2.0\u002Fclient\",\n    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11\"\n  }\n}\n\u003C\u002Fscript>\n",[5648],{"type":45,"tag":53,"props":5649,"children":5650},{"__ignoreMap":418},[5651,5659,5694,5701,5708,5716,5724,5732,5739,5746],{"type":45,"tag":484,"props":5652,"children":5653},{"class":486,"line":487},[5654],{"type":45,"tag":484,"props":5655,"children":5656},{"style":964},[5657],{"type":50,"value":5658},"\u003C!-- BROKEN: framer-motion has its own React inside, hooks crash with `Cannot read properties of null (reading 'useContext')` -->\n",{"type":45,"tag":484,"props":5660,"children":5661},{"class":486,"line":497},[5662,5666,5670,5674,5678,5682,5686,5690],{"type":45,"tag":484,"props":5663,"children":5664},{"style":491},[5665],{"type":50,"value":1104},{"type":45,"tag":484,"props":5667,"children":5668},{"style":1066},[5669],{"type":50,"value":4211},{"type":45,"tag":484,"props":5671,"children":5672},{"style":506},[5673],{"type":50,"value":4216},{"type":45,"tag":484,"props":5675,"children":5676},{"style":491},[5677],{"type":50,"value":2737},{"type":45,"tag":484,"props":5679,"children":5680},{"style":491},[5681],{"type":50,"value":513},{"type":45,"tag":484,"props":5683,"children":5684},{"style":525},[5685],{"type":50,"value":4484},{"type":45,"tag":484,"props":5687,"children":5688},{"style":491},[5689],{"type":50,"value":513},{"type":45,"tag":484,"props":5691,"children":5692},{"style":491},[5693],{"type":50,"value":4238},{"type":45,"tag":484,"props":5695,"children":5696},{"class":486,"line":540},[5697],{"type":45,"tag":484,"props":5698,"children":5699},{"style":984},[5700],{"type":50,"value":494},{"type":45,"tag":484,"props":5702,"children":5703},{"class":486,"line":577},[5704],{"type":45,"tag":484,"props":5705,"children":5706},{"style":984},[5707],{"type":50,"value":4507},{"type":45,"tag":484,"props":5709,"children":5710},{"class":486,"line":603},[5711],{"type":45,"tag":484,"props":5712,"children":5713},{"style":984},[5714],{"type":50,"value":5715},"    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.2.0\",\n",{"type":45,"tag":484,"props":5717,"children":5718},{"class":486,"line":643},[5719],{"type":45,"tag":484,"props":5720,"children":5721},{"style":984},[5722],{"type":50,"value":5723},"    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.2.0\u002Fclient\",\n",{"type":45,"tag":484,"props":5725,"children":5726},{"class":486,"line":681},[5727],{"type":45,"tag":484,"props":5728,"children":5729},{"style":984},[5730],{"type":50,"value":5731},"    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11\"\n",{"type":45,"tag":484,"props":5733,"children":5734},{"class":486,"line":716},[5735],{"type":45,"tag":484,"props":5736,"children":5737},{"style":984},[5738],{"type":50,"value":722},{"type":45,"tag":484,"props":5740,"children":5741},{"class":486,"line":725},[5742],{"type":45,"tag":484,"props":5743,"children":5744},{"style":984},[5745],{"type":50,"value":731},{"type":45,"tag":484,"props":5747,"children":5748},{"class":486,"line":1240},[5749,5753,5757],{"type":45,"tag":484,"props":5750,"children":5751},{"style":491},[5752],{"type":50,"value":4322},{"type":45,"tag":484,"props":5754,"children":5755},{"style":1066},[5756],{"type":50,"value":4211},{"type":45,"tag":484,"props":5758,"children":5759},{"style":491},[5760],{"type":50,"value":4238},{"type":45,"tag":46,"props":5762,"children":5763},{},[5764],{"type":50,"value":5765},"The symptom is exactly: blank background + console errors like",{"type":45,"tag":410,"props":5767,"children":5770},{"className":5768,"code":5769,"language":50},[413],"TypeError: Cannot read properties of null (reading 'useContext')\n  at u (SwitchLayoutGroupContext.mjs:1:1)\n",[5771],{"type":45,"tag":53,"props":5772,"children":5773},{"__ignoreMap":418},[5774],{"type":50,"value":5769},{"type":45,"tag":46,"props":5776,"children":5777},{},[5778],{"type":50,"value":5779},"because the nested React instance has no provider in the tree.",{"type":45,"tag":46,"props":5781,"children":5782},{},[5783,5795],{"type":45,"tag":290,"props":5784,"children":5785},{},[5786,5788,5793],{"type":50,"value":5787},"Fix: append ",{"type":45,"tag":53,"props":5789,"children":5791},{"className":5790},[],[5792],{"type":50,"value":5430},{"type":50,"value":5794}," (and any other shared peers) to every esm.sh URL that has React as a peer dep.",{"type":50,"value":5796}," Pin the exact same React version everywhere too.",{"type":45,"tag":410,"props":5798,"children":5800},{"className":4193,"code":5799,"language":4195,"meta":418,"style":418},"\u003C!-- CORRECT: one React shared across the whole importmap -->\n\u003Cscript type=\"importmap\">\n{\n  \"imports\": {\n    \"react\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\",\n    \"react\u002Fjsx-runtime\": \"https:\u002F\u002Fesm.sh\u002Freact@18.3.1\u002Fjsx-runtime\",\n    \"react-dom\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\",\n    \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\",\n    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11?external=react,react-dom\",\n    \"lucide-react\": \"https:\u002F\u002Fesm.sh\u002Flucide-react@0.400.0?external=react,react-dom\"\n  }\n}\n\u003C\u002Fscript>\n",[5801],{"type":45,"tag":53,"props":5802,"children":5803},{"__ignoreMap":418},[5804,5812,5847,5854,5861,5868,5875,5882,5890,5898,5906,5913,5920],{"type":45,"tag":484,"props":5805,"children":5806},{"class":486,"line":487},[5807],{"type":45,"tag":484,"props":5808,"children":5809},{"style":964},[5810],{"type":50,"value":5811},"\u003C!-- CORRECT: one React shared across the whole importmap -->\n",{"type":45,"tag":484,"props":5813,"children":5814},{"class":486,"line":497},[5815,5819,5823,5827,5831,5835,5839,5843],{"type":45,"tag":484,"props":5816,"children":5817},{"style":491},[5818],{"type":50,"value":1104},{"type":45,"tag":484,"props":5820,"children":5821},{"style":1066},[5822],{"type":50,"value":4211},{"type":45,"tag":484,"props":5824,"children":5825},{"style":506},[5826],{"type":50,"value":4216},{"type":45,"tag":484,"props":5828,"children":5829},{"style":491},[5830],{"type":50,"value":2737},{"type":45,"tag":484,"props":5832,"children":5833},{"style":491},[5834],{"type":50,"value":513},{"type":45,"tag":484,"props":5836,"children":5837},{"style":525},[5838],{"type":50,"value":4484},{"type":45,"tag":484,"props":5840,"children":5841},{"style":491},[5842],{"type":50,"value":513},{"type":45,"tag":484,"props":5844,"children":5845},{"style":491},[5846],{"type":50,"value":4238},{"type":45,"tag":484,"props":5848,"children":5849},{"class":486,"line":540},[5850],{"type":45,"tag":484,"props":5851,"children":5852},{"style":984},[5853],{"type":50,"value":494},{"type":45,"tag":484,"props":5855,"children":5856},{"class":486,"line":577},[5857],{"type":45,"tag":484,"props":5858,"children":5859},{"style":984},[5860],{"type":50,"value":4507},{"type":45,"tag":484,"props":5862,"children":5863},{"class":486,"line":603},[5864],{"type":45,"tag":484,"props":5865,"children":5866},{"style":984},[5867],{"type":50,"value":4515},{"type":45,"tag":484,"props":5869,"children":5870},{"class":486,"line":643},[5871],{"type":45,"tag":484,"props":5872,"children":5873},{"style":984},[5874],{"type":50,"value":4523},{"type":45,"tag":484,"props":5876,"children":5877},{"class":486,"line":681},[5878],{"type":45,"tag":484,"props":5879,"children":5880},{"style":984},[5881],{"type":50,"value":4531},{"type":45,"tag":484,"props":5883,"children":5884},{"class":486,"line":716},[5885],{"type":45,"tag":484,"props":5886,"children":5887},{"style":984},[5888],{"type":50,"value":5889},"    \"react-dom\u002Fclient\": \"https:\u002F\u002Fesm.sh\u002Freact-dom@18.3.1\u002Fclient\",\n",{"type":45,"tag":484,"props":5891,"children":5892},{"class":486,"line":725},[5893],{"type":45,"tag":484,"props":5894,"children":5895},{"style":984},[5896],{"type":50,"value":5897},"    \"framer-motion\": \"https:\u002F\u002Fesm.sh\u002Fframer-motion@11?external=react,react-dom\",\n",{"type":45,"tag":484,"props":5899,"children":5900},{"class":486,"line":1240},[5901],{"type":45,"tag":484,"props":5902,"children":5903},{"style":984},[5904],{"type":50,"value":5905},"    \"lucide-react\": \"https:\u002F\u002Fesm.sh\u002Flucide-react@0.400.0?external=react,react-dom\"\n",{"type":45,"tag":484,"props":5907,"children":5908},{"class":486,"line":1249},[5909],{"type":45,"tag":484,"props":5910,"children":5911},{"style":984},[5912],{"type":50,"value":722},{"type":45,"tag":484,"props":5914,"children":5915},{"class":486,"line":1258},[5916],{"type":45,"tag":484,"props":5917,"children":5918},{"style":984},[5919],{"type":50,"value":731},{"type":45,"tag":484,"props":5921,"children":5922},{"class":486,"line":1267},[5923,5927,5931],{"type":45,"tag":484,"props":5924,"children":5925},{"style":491},[5926],{"type":50,"value":4322},{"type":45,"tag":484,"props":5928,"children":5929},{"style":1066},[5930],{"type":50,"value":4211},{"type":45,"tag":484,"props":5932,"children":5933},{"style":491},[5934],{"type":50,"value":4238},{"type":45,"tag":46,"props":5936,"children":5937},{},[5938,5940,5946,5948,5953,5955,5961,5962,5968],{"type":50,"value":5939},"Apply ",{"type":45,"tag":53,"props":5941,"children":5943},{"className":5942},[],[5944],{"type":50,"value":5945},"?external=...",{"type":50,"value":5947}," to ",{"type":45,"tag":290,"props":5949,"children":5950},{},[5951],{"type":50,"value":5952},"every",{"type":50,"value":5954}," React-consuming dep (UI libraries, icon sets, animation libs, headless components). Same rule for ",{"type":45,"tag":53,"props":5956,"children":5958},{"className":5957},[],[5959],{"type":50,"value":5960},"vue",{"type":50,"value":166},{"type":45,"tag":53,"props":5963,"children":5965},{"className":5964},[],[5966],{"type":50,"value":5967},"solid-js",{"type":50,"value":5969},", etc. if you swap the framework.",{"type":45,"tag":46,"props":5971,"children":5972},{},[5973],{"type":50,"value":5974},"If a project needs more than two or three of these packages, stop using the importmap path — switch to option 1 (pre-compile with Vite\u002Fesbuild) so the bundler can dedupe React for you.",{"type":45,"tag":94,"props":5976,"children":5978},{"id":5977},"npm-dependencies",[5979],{"type":50,"value":5980},"npm dependencies",{"type":45,"tag":46,"props":5982,"children":5983},{},[5984],{"type":50,"value":5985},"The bundler installs deps from npm at build time. Limits to respect:",{"type":45,"tag":301,"props":5987,"children":5988},{},[5989,5999,6058,6068,6093],{"type":45,"tag":118,"props":5990,"children":5991},{},[5992,5997],{"type":45,"tag":290,"props":5993,"children":5994},{},[5995],{"type":50,"value":5996},"Flat node_modules.",{"type":50,"value":5998}," No two versions of the same package can coexist — peer-dep conflicts will pick one and break the other. Keep dep graphs shallow.",{"type":45,"tag":118,"props":6000,"children":6001},{},[6002,6007,6009,6015,6016,6022,6023,6029,6030,6035,6036,6042,6044,6049,6050,6056],{"type":45,"tag":290,"props":6003,"children":6004},{},[6005],{"type":50,"value":6006},"Text-only files",{"type":50,"value":6008}," are extracted from tarballs. ",{"type":45,"tag":53,"props":6010,"children":6012},{"className":6011},[],[6013],{"type":50,"value":6014},".js",{"type":50,"value":166},{"type":45,"tag":53,"props":6017,"children":6019},{"className":6018},[],[6020],{"type":50,"value":6021},".ts",{"type":50,"value":166},{"type":45,"tag":53,"props":6024,"children":6026},{"className":6025},[],[6027],{"type":50,"value":6028},".json",{"type":50,"value":166},{"type":45,"tag":53,"props":6031,"children":6033},{"className":6032},[],[6034],{"type":50,"value":5577},{"type":50,"value":166},{"type":45,"tag":53,"props":6037,"children":6039},{"className":6038},[],[6040],{"type":50,"value":6041},".md",{"type":50,"value":6043}," work. ",{"type":45,"tag":53,"props":6045,"children":6047},{"className":6046},[],[6048],{"type":50,"value":5457},{"type":50,"value":166},{"type":45,"tag":53,"props":6051,"children":6053},{"className":6052},[],[6054],{"type":50,"value":6055},".node",{"type":50,"value":6057},", native binaries, fonts, images do not.",{"type":45,"tag":118,"props":6059,"children":6060},{},[6061,6066],{"type":45,"tag":290,"props":6062,"children":6063},{},[6064],{"type":50,"value":6065},"No PAX tar headers",{"type":50,"value":6067}," — packages whose internal paths exceed 100 chars may have those files silently dropped. Avoid deeply-nested monorepo packages.",{"type":45,"tag":118,"props":6069,"children":6070},{},[6071,6076,6078,6084,6085,6091],{"type":45,"tag":290,"props":6072,"children":6073},{},[6074],{"type":50,"value":6075},"No build scripts run",{"type":50,"value":6077}," — ",{"type":45,"tag":53,"props":6079,"children":6081},{"className":6080},[],[6082],{"type":50,"value":6083},"postinstall",{"type":50,"value":166},{"type":45,"tag":53,"props":6086,"children":6088},{"className":6087},[],[6089],{"type":50,"value":6090},"prepare",{"type":50,"value":6092},", etc. are ignored. Packages that compile native code or run codegen at install time will not work.",{"type":45,"tag":118,"props":6094,"children":6095},{},[6096,6107,6109,6114,6116,6122],{"type":45,"tag":290,"props":6097,"children":6098},{},[6099,6105],{"type":45,"tag":53,"props":6100,"children":6102},{"className":6101},[],[6103],{"type":50,"value":6104},"cloudflare:*",{"type":50,"value":6106}," imports are always external",{"type":50,"value":6108}," and resolved by the runtime (",{"type":45,"tag":53,"props":6110,"children":6112},{"className":6111},[],[6113],{"type":50,"value":1006},{"type":50,"value":6115},", etc.). Don't add them to ",{"type":45,"tag":53,"props":6117,"children":6119},{"className":6118},[],[6120],{"type":50,"value":6121},"package.json",{"type":50,"value":189},{"type":45,"tag":46,"props":6124,"children":6125},{},[6126,6128,6133,6134,6140,6141,6147,6148,6154,6155,6161,6162,6168,6170,6176],{"type":50,"value":6127},"Safe and well-tested deps: ",{"type":45,"tag":53,"props":6129,"children":6131},{"className":6130},[],[6132],{"type":50,"value":1960},{"type":50,"value":166},{"type":45,"tag":53,"props":6135,"children":6137},{"className":6136},[],[6138],{"type":50,"value":6139},"zod",{"type":50,"value":166},{"type":45,"tag":53,"props":6142,"children":6144},{"className":6143},[],[6145],{"type":50,"value":6146},"itty-router",{"type":50,"value":166},{"type":45,"tag":53,"props":6149,"children":6151},{"className":6150},[],[6152],{"type":50,"value":6153},"nanoid",{"type":50,"value":166},{"type":45,"tag":53,"props":6156,"children":6158},{"className":6157},[],[6159],{"type":50,"value":6160},"valibot",{"type":50,"value":166},{"type":45,"tag":53,"props":6163,"children":6165},{"className":6164},[],[6166],{"type":50,"value":6167},"@hono\u002Fzod-validator",{"type":50,"value":6169},". Avoid anything that needs node-native modules unless you set ",{"type":45,"tag":53,"props":6171,"children":6173},{"className":6172},[],[6174],{"type":50,"value":6175},"compatibility_flags: [\"nodejs_compat\"]",{"type":50,"value":6177}," and the package is pure JS under that flag.",{"type":45,"tag":94,"props":6179,"children":6181},{"id":6180},"project-shapes",[6182],{"type":50,"value":6183},"Project shapes",{"type":45,"tag":5256,"props":6185,"children":6186},{},[6187,6203],{"type":45,"tag":5260,"props":6188,"children":6189},{},[6190],{"type":45,"tag":5264,"props":6191,"children":6192},{},[6193,6198],{"type":45,"tag":5268,"props":6194,"children":6195},{},[6196],{"type":50,"value":6197},"Project shape",{"type":45,"tag":5268,"props":6199,"children":6200},{},[6201],{"type":50,"value":6202},"What you need",{"type":45,"tag":5284,"props":6204,"children":6205},{},[6206,6243,6274,6303],{"type":45,"tag":5264,"props":6207,"children":6208},{},[6209,6214],{"type":45,"tag":5291,"props":6210,"children":6211},{},[6212],{"type":50,"value":6213},"Pure static site (HTML+JS+CSS only)",{"type":45,"tag":5291,"props":6215,"children":6216},{},[6217,6222,6223,6228,6230,6235,6236,6241],{"type":45,"tag":53,"props":6218,"children":6220},{"className":6219},[],[6221],{"type":50,"value":141},{"type":50,"value":5324},{"type":45,"tag":53,"props":6224,"children":6226},{"className":6225},[],[6227],{"type":50,"value":187},{"type":50,"value":6229},", files in ",{"type":45,"tag":53,"props":6231,"children":6233},{"className":6232},[],[6234],{"type":50,"value":446},{"type":50,"value":2570},{"type":45,"tag":53,"props":6237,"children":6239},{"className":6238},[],[6240],{"type":50,"value":164},{"type":50,"value":6242},". No App class.",{"type":45,"tag":5264,"props":6244,"children":6245},{},[6246,6251],{"type":45,"tag":5291,"props":6247,"children":6248},{},[6249],{"type":50,"value":6250},"SPA + API",{"type":45,"tag":5291,"props":6252,"children":6253},{},[6254,6259,6261,6266,6268],{"type":45,"tag":53,"props":6255,"children":6257},{"className":6256},[],[6258],{"type":50,"value":187},{"type":50,"value":6260}," for the SPA, ",{"type":45,"tag":53,"props":6262,"children":6264},{"className":6263},[],[6265],{"type":50,"value":164},{"type":50,"value":6267}," exporting ",{"type":45,"tag":53,"props":6269,"children":6271},{"className":6270},[],[6272],{"type":50,"value":6273},"class App extends DurableObject",{"type":45,"tag":5264,"props":6275,"children":6276},{},[6277,6282],{"type":45,"tag":5291,"props":6278,"children":6279},{},[6280],{"type":50,"value":6281},"API only (JSON, no frontend)",{"type":45,"tag":5291,"props":6283,"children":6284},{},[6285,6290,6291,6296,6298],{"type":45,"tag":53,"props":6286,"children":6288},{"className":6287},[],[6289],{"type":50,"value":164},{"type":50,"value":6267},{"type":45,"tag":53,"props":6292,"children":6294},{"className":6293},[],[6295],{"type":50,"value":6273},{"type":50,"value":6297},", no ",{"type":45,"tag":53,"props":6299,"children":6301},{"className":6300},[],[6302],{"type":50,"value":187},{"type":45,"tag":5264,"props":6304,"children":6305},{},[6306,6311],{"type":45,"tag":5291,"props":6307,"children":6308},{},[6309],{"type":50,"value":6310},"Realtime (WebSocket \u002F multiplayer)",{"type":45,"tag":5291,"props":6312,"children":6313},{},[6314,6316,6321,6323],{"type":50,"value":6315},"Same as SPA + API; ",{"type":45,"tag":53,"props":6317,"children":6319},{"className":6318},[],[6320],{"type":50,"value":2541},{"type":50,"value":6322}," upgrades to WebSocket and uses ",{"type":45,"tag":53,"props":6324,"children":6326},{"className":6325},[],[6327],{"type":50,"value":6328},"ctx.acceptWebSocket",{"type":45,"tag":94,"props":6330,"children":6332},{"id":6331},"pre-flight-checklist-before-deploy_space",[6333,6335],{"type":50,"value":6334},"Pre-flight checklist before ",{"type":45,"tag":53,"props":6336,"children":6338},{"className":6337},[],[6339],{"type":50,"value":6340},"deploy_space",{"type":45,"tag":46,"props":6342,"children":6343},{},[6344],{"type":50,"value":6345},"Run through every item — most \"preview is broken\" reports trace back to one of these.",{"type":45,"tag":301,"props":6347,"children":6348},{},[6349,6372,6416,6469,6502,6520,6540,6551,6561,6572,6597,6634],{"type":45,"tag":118,"props":6350,"children":6351},{},[6352,6357,6359,6364,6366,6371],{"type":45,"tag":53,"props":6353,"children":6355},{"className":6354},[],[6356],{"type":50,"value":141},{"type":50,"value":6358}," exists at repo root with ",{"type":45,"tag":53,"props":6360,"children":6362},{"className":6361},[],[6363],{"type":50,"value":164},{"type":50,"value":6365}," and (if static assets exist) ",{"type":45,"tag":53,"props":6367,"children":6369},{"className":6368},[],[6370],{"type":50,"value":200},{"type":50,"value":189},{"type":45,"tag":118,"props":6373,"children":6374},{},[6375,6377,6382,6383,6389,6390,6395,6397,6402,6404,6409,6410,6415],{"type":50,"value":6376},"Every browser-loaded ",{"type":45,"tag":53,"props":6378,"children":6380},{"className":6379},[],[6381],{"type":50,"value":6014},{"type":50,"value":143},{"type":45,"tag":53,"props":6384,"children":6386},{"className":6385},[],[6387],{"type":50,"value":6388},".mjs",{"type":50,"value":143},{"type":45,"tag":53,"props":6391,"children":6393},{"className":6392},[],[6394],{"type":50,"value":4167},{"type":50,"value":6396}," is ",{"type":45,"tag":290,"props":6398,"children":6399},{},[6400],{"type":50,"value":6401},"plain JS, no JSX",{"type":50,"value":6403},", or wrapped with ",{"type":45,"tag":53,"props":6405,"children":6407},{"className":6406},[],[6408],{"type":50,"value":4404},{"type":50,"value":440},{"type":45,"tag":53,"props":6411,"children":6413},{"className":6412},[],[6414],{"type":50,"value":4419},{"type":50,"value":189},{"type":45,"tag":118,"props":6417,"children":6418},{},[6419,6421,6426,6428,6433,6434,6439,6440,6446,6447,6452,6454,6459,6461,6467],{"type":50,"value":6420},"If you use React via importmap (Babel-standalone or pre-compiled with the automatic JSX runtime), the importmap maps ",{"type":45,"tag":290,"props":6422,"children":6423},{},[6424],{"type":50,"value":6425},"all",{"type":50,"value":6427}," of ",{"type":45,"tag":53,"props":6429,"children":6431},{"className":6430},[],[6432],{"type":50,"value":4685},{"type":50,"value":166},{"type":45,"tag":53,"props":6435,"children":6437},{"className":6436},[],[6438],{"type":50,"value":4949},{"type":50,"value":166},{"type":45,"tag":53,"props":6441,"children":6443},{"className":6442},[],[6444],{"type":50,"value":6445},"react-dom",{"type":50,"value":181},{"type":45,"tag":53,"props":6448,"children":6450},{"className":6449},[],[6451],{"type":50,"value":4757},{"type":50,"value":6453}," — same version on every entry. Missing ",{"type":45,"tag":53,"props":6455,"children":6457},{"className":6456},[],[6458],{"type":50,"value":4949},{"type":50,"value":6460}," produces ",{"type":45,"tag":53,"props":6462,"children":6464},{"className":6463},[],[6465],{"type":50,"value":6466},"Failed to resolve module specifier \"react\u002Fjsx-runtime\"",{"type":50,"value":6468}," and a blank page.",{"type":45,"tag":118,"props":6470,"children":6471},{},[6472,6473,6479,6481,6485,6487,6492,6494,6500],{"type":50,"value":390},{"type":45,"tag":53,"props":6474,"children":6476},{"className":6475},[],[6477],{"type":50,"value":6478},"\u003Cscript type=\"importmap\">",{"type":50,"value":6480}," tag appears ",{"type":45,"tag":290,"props":6482,"children":6483},{},[6484],{"type":50,"value":4411},{"type":50,"value":6486}," any ",{"type":45,"tag":53,"props":6488,"children":6490},{"className":6489},[],[6491],{"type":50,"value":4167},{"type":50,"value":6493}," (or ",{"type":45,"tag":53,"props":6495,"children":6497},{"className":6496},[],[6498],{"type":50,"value":6499},"type=\"text\u002Fbabel\" data-type=\"module\"",{"type":50,"value":6501},") that depends on the mapped specifiers.",{"type":45,"tag":118,"props":6503,"children":6504},{},[6505,6507,6512,6514,6519],{"type":50,"value":6506},"Static files live under the configured ",{"type":45,"tag":53,"props":6508,"children":6510},{"className":6509},[],[6511],{"type":50,"value":816},{"type":50,"value":6513}," (default suggestion: ",{"type":45,"tag":53,"props":6515,"children":6517},{"className":6516},[],[6518],{"type":50,"value":446},{"type":50,"value":130},{"type":45,"tag":118,"props":6521,"children":6522},{},[6523,6525,6531,6533,6539],{"type":50,"value":6524},"HTML uses root-relative paths (",{"type":45,"tag":53,"props":6526,"children":6528},{"className":6527},[],[6529],{"type":50,"value":6530},"\u002Ffoo.js",{"type":50,"value":6532},") — they get rewritten. JS uses relative paths (",{"type":45,"tag":53,"props":6534,"children":6536},{"className":6535},[],[6537],{"type":50,"value":6538},".\u002Ffoo",{"type":50,"value":130},{"type":45,"tag":118,"props":6541,"children":6542},{},[6543,6545,6550],{"type":50,"value":6544},"No binary assets are imported from npm packages. Binaries live in ",{"type":45,"tag":53,"props":6546,"children":6548},{"className":6547},[],[6549],{"type":50,"value":446},{"type":50,"value":189},{"type":45,"tag":118,"props":6552,"children":6553},{},[6554,6559],{"type":45,"tag":53,"props":6555,"children":6557},{"className":6556},[],[6558],{"type":50,"value":6121},{"type":50,"value":6560}," deps are pure-JS, no native modules, no install scripts.",{"type":45,"tag":118,"props":6562,"children":6563},{},[6564,6566,6571],{"type":50,"value":6565},"SPA routing? Set ",{"type":45,"tag":53,"props":6567,"children":6569},{"className":6568},[],[6570],{"type":50,"value":849},{"type":50,"value":189},{"type":45,"tag":118,"props":6573,"children":6574},{},[6575,6577,6582,6584,6589,6591,6596],{"type":50,"value":6576},"Server entry exports ",{"type":45,"tag":53,"props":6578,"children":6580},{"className":6579},[],[6581],{"type":50,"value":6273},{"type":50,"value":6583}," from your ",{"type":45,"tag":53,"props":6585,"children":6587},{"className":6586},[],[6588],{"type":50,"value":164},{"type":50,"value":6590}," module (no ",{"type":45,"tag":53,"props":6592,"children":6594},{"className":6593},[],[6595],{"type":50,"value":946},{"type":50,"value":130},{"type":45,"tag":118,"props":6598,"children":6599},{},[6600,6602,6608,6609,6614,6615,6620,6621,6626,6628,6633],{"type":50,"value":6601},"No ",{"type":45,"tag":53,"props":6603,"children":6605},{"className":6604},[],[6606],{"type":50,"value":6607},"durable_objects",{"type":50,"value":143},{"type":45,"tag":53,"props":6610,"children":6612},{"className":6611},[],[6613],{"type":50,"value":4112},{"type":50,"value":143},{"type":45,"tag":53,"props":6616,"children":6618},{"className":6617},[],[6619],{"type":50,"value":4126},{"type":50,"value":143},{"type":45,"tag":53,"props":6622,"children":6624},{"className":6623},[],[6625],{"type":50,"value":4119},{"type":50,"value":6627}," blocks in ",{"type":45,"tag":53,"props":6629,"children":6631},{"className":6630},[],[6632],{"type":50,"value":141},{"type":50,"value":189},{"type":45,"tag":118,"props":6635,"children":6636},{},[6637,6642],{"type":45,"tag":53,"props":6638,"children":6640},{"className":6639},[],[6641],{"type":50,"value":172},{"type":50,"value":6643}," is set if you use APIs newer than the default.",{"type":45,"tag":46,"props":6645,"children":6646},{},[6647,6649,6654],{"type":50,"value":6648},"If any of these are off, fix them in the working tree, commit, and redeploy. The preview will pick up the new build on the next ",{"type":45,"tag":53,"props":6650,"children":6652},{"className":6651},[],[6653],{"type":50,"value":6340},{"type":50,"value":6655}," call (the dynamic worker is keyed by commit hash, so old builds are not reused).",{"type":45,"tag":94,"props":6657,"children":6659},{"id":6658},"minimal-end-to-end-example",[6660],{"type":50,"value":6661},"Minimal end-to-end example",{"type":45,"tag":46,"props":6663,"children":6664},{},[6665],{"type":50,"value":6666},"A working SPA with a tiny API:",{"type":45,"tag":410,"props":6668,"children":6671},{"className":6669,"code":6670,"language":50},[413],"wrangler.json\npackage.json\nsrc\u002Findex.ts\npublic\u002Findex.html\npublic\u002Fapp.js\npublic\u002Fstyle.css\n",[6672],{"type":45,"tag":53,"props":6673,"children":6674},{"__ignoreMap":418},[6675],{"type":50,"value":6670},{"type":45,"tag":46,"props":6677,"children":6678},{},[6679,6684],{"type":45,"tag":53,"props":6680,"children":6682},{"className":6681},[],[6683],{"type":50,"value":141},{"type":50,"value":473},{"type":45,"tag":410,"props":6686,"children":6687},{"className":476,"code":477,"language":478,"meta":418,"style":418},[6688],{"type":45,"tag":53,"props":6689,"children":6690},{"__ignoreMap":418},[6691,6698,6733,6768,6791,6826,6861,6892,6899],{"type":45,"tag":484,"props":6692,"children":6693},{"class":486,"line":487},[6694],{"type":45,"tag":484,"props":6695,"children":6696},{"style":491},[6697],{"type":50,"value":494},{"type":45,"tag":484,"props":6699,"children":6700},{"class":486,"line":497},[6701,6705,6709,6713,6717,6721,6725,6729],{"type":45,"tag":484,"props":6702,"children":6703},{"style":491},[6704],{"type":50,"value":503},{"type":45,"tag":484,"props":6706,"children":6707},{"style":506},[6708],{"type":50,"value":164},{"type":45,"tag":484,"props":6710,"children":6711},{"style":491},[6712],{"type":50,"value":513},{"type":45,"tag":484,"props":6714,"children":6715},{"style":491},[6716],{"type":50,"value":473},{"type":45,"tag":484,"props":6718,"children":6719},{"style":491},[6720],{"type":50,"value":522},{"type":45,"tag":484,"props":6722,"children":6723},{"style":525},[6724],{"type":50,"value":528},{"type":45,"tag":484,"props":6726,"children":6727},{"style":491},[6728],{"type":50,"value":513},{"type":45,"tag":484,"props":6730,"children":6731},{"style":491},[6732],{"type":50,"value":537},{"type":45,"tag":484,"props":6734,"children":6735},{"class":486,"line":540},[6736,6740,6744,6748,6752,6756,6760,6764],{"type":45,"tag":484,"props":6737,"children":6738},{"style":491},[6739],{"type":50,"value":503},{"type":45,"tag":484,"props":6741,"children":6742},{"style":506},[6743],{"type":50,"value":172},{"type":45,"tag":484,"props":6745,"children":6746},{"style":491},[6747],{"type":50,"value":513},{"type":45,"tag":484,"props":6749,"children":6750},{"style":491},[6751],{"type":50,"value":473},{"type":45,"tag":484,"props":6753,"children":6754},{"style":491},[6755],{"type":50,"value":522},{"type":45,"tag":484,"props":6757,"children":6758},{"style":525},[6759],{"type":50,"value":566},{"type":45,"tag":484,"props":6761,"children":6762},{"style":491},[6763],{"type":50,"value":513},{"type":45,"tag":484,"props":6765,"children":6766},{"style":491},[6767],{"type":50,"value":537},{"type":45,"tag":484,"props":6769,"children":6770},{"class":486,"line":577},[6771,6775,6779,6783,6787],{"type":45,"tag":484,"props":6772,"children":6773},{"style":491},[6774],{"type":50,"value":503},{"type":45,"tag":484,"props":6776,"children":6777},{"style":506},[6778],{"type":50,"value":587},{"type":45,"tag":484,"props":6780,"children":6781},{"style":491},[6782],{"type":50,"value":513},{"type":45,"tag":484,"props":6784,"children":6785},{"style":491},[6786],{"type":50,"value":473},{"type":45,"tag":484,"props":6788,"children":6789},{"style":491},[6790],{"type":50,"value":600},{"type":45,"tag":484,"props":6792,"children":6793},{"class":486,"line":603},[6794,6798,6802,6806,6810,6814,6818,6822],{"type":45,"tag":484,"props":6795,"children":6796},{"style":491},[6797],{"type":50,"value":609},{"type":45,"tag":484,"props":6799,"children":6800},{"style":612},[6801],{"type":50,"value":615},{"type":45,"tag":484,"props":6803,"children":6804},{"style":491},[6805],{"type":50,"value":513},{"type":45,"tag":484,"props":6807,"children":6808},{"style":491},[6809],{"type":50,"value":473},{"type":45,"tag":484,"props":6811,"children":6812},{"style":491},[6813],{"type":50,"value":522},{"type":45,"tag":484,"props":6815,"children":6816},{"style":525},[6817],{"type":50,"value":632},{"type":45,"tag":484,"props":6819,"children":6820},{"style":491},[6821],{"type":50,"value":513},{"type":45,"tag":484,"props":6823,"children":6824},{"style":491},[6825],{"type":50,"value":537},{"type":45,"tag":484,"props":6827,"children":6828},{"class":486,"line":643},[6829,6833,6837,6841,6845,6849,6853,6857],{"type":45,"tag":484,"props":6830,"children":6831},{"style":491},[6832],{"type":50,"value":609},{"type":45,"tag":484,"props":6834,"children":6835},{"style":612},[6836],{"type":50,"value":653},{"type":45,"tag":484,"props":6838,"children":6839},{"style":491},[6840],{"type":50,"value":513},{"type":45,"tag":484,"props":6842,"children":6843},{"style":491},[6844],{"type":50,"value":473},{"type":45,"tag":484,"props":6846,"children":6847},{"style":491},[6848],{"type":50,"value":522},{"type":45,"tag":484,"props":6850,"children":6851},{"style":525},[6852],{"type":50,"value":670},{"type":45,"tag":484,"props":6854,"children":6855},{"style":491},[6856],{"type":50,"value":513},{"type":45,"tag":484,"props":6858,"children":6859},{"style":491},[6860],{"type":50,"value":537},{"type":45,"tag":484,"props":6862,"children":6863},{"class":486,"line":681},[6864,6868,6872,6876,6880,6884,6888],{"type":45,"tag":484,"props":6865,"children":6866},{"style":491},[6867],{"type":50,"value":609},{"type":45,"tag":484,"props":6869,"children":6870},{"style":612},[6871],{"type":50,"value":691},{"type":45,"tag":484,"props":6873,"children":6874},{"style":491},[6875],{"type":50,"value":513},{"type":45,"tag":484,"props":6877,"children":6878},{"style":491},[6879],{"type":50,"value":473},{"type":45,"tag":484,"props":6881,"children":6882},{"style":491},[6883],{"type":50,"value":522},{"type":45,"tag":484,"props":6885,"children":6886},{"style":525},[6887],{"type":50,"value":708},{"type":45,"tag":484,"props":6889,"children":6890},{"style":491},[6891],{"type":50,"value":713},{"type":45,"tag":484,"props":6893,"children":6894},{"class":486,"line":716},[6895],{"type":45,"tag":484,"props":6896,"children":6897},{"style":491},[6898],{"type":50,"value":722},{"type":45,"tag":484,"props":6900,"children":6901},{"class":486,"line":725},[6902],{"type":45,"tag":484,"props":6903,"children":6904},{"style":491},[6905],{"type":50,"value":731},{"type":45,"tag":46,"props":6907,"children":6908},{},[6909,6914],{"type":45,"tag":53,"props":6910,"children":6912},{"className":6911},[],[6913],{"type":50,"value":6121},{"type":50,"value":473},{"type":45,"tag":410,"props":6916,"children":6918},{"className":476,"code":6917,"language":478,"meta":418,"style":418},"{ \"name\": \"demo\", \"type\": \"module\", \"dependencies\": { \"hono\": \"^4.6.0\" } }\n",[6919],{"type":45,"tag":53,"props":6920,"children":6921},{"__ignoreMap":418},[6922],{"type":45,"tag":484,"props":6923,"children":6924},{"class":486,"line":487},[6925,6929,6933,6938,6942,6946,6950,6955,6959,6963,6967,6972,6976,6980,6984,6988,6992,6996,7000,7005,7009,7013,7017,7021,7025,7029,7033,7037,7042,7046,7050],{"type":45,"tag":484,"props":6926,"children":6927},{"style":491},[6928],{"type":50,"value":2106},{"type":45,"tag":484,"props":6930,"children":6931},{"style":491},[6932],{"type":50,"value":522},{"type":45,"tag":484,"props":6934,"children":6935},{"style":506},[6936],{"type":50,"value":6937},"name",{"type":45,"tag":484,"props":6939,"children":6940},{"style":491},[6941],{"type":50,"value":513},{"type":45,"tag":484,"props":6943,"children":6944},{"style":491},[6945],{"type":50,"value":473},{"type":45,"tag":484,"props":6947,"children":6948},{"style":491},[6949],{"type":50,"value":522},{"type":45,"tag":484,"props":6951,"children":6952},{"style":525},[6953],{"type":50,"value":6954},"demo",{"type":45,"tag":484,"props":6956,"children":6957},{"style":491},[6958],{"type":50,"value":513},{"type":45,"tag":484,"props":6960,"children":6961},{"style":491},[6962],{"type":50,"value":1522},{"type":45,"tag":484,"props":6964,"children":6965},{"style":491},[6966],{"type":50,"value":522},{"type":45,"tag":484,"props":6968,"children":6969},{"style":506},[6970],{"type":50,"value":6971},"type",{"type":45,"tag":484,"props":6973,"children":6974},{"style":491},[6975],{"type":50,"value":513},{"type":45,"tag":484,"props":6977,"children":6978},{"style":491},[6979],{"type":50,"value":473},{"type":45,"tag":484,"props":6981,"children":6982},{"style":491},[6983],{"type":50,"value":522},{"type":45,"tag":484,"props":6985,"children":6986},{"style":525},[6987],{"type":50,"value":4229},{"type":45,"tag":484,"props":6989,"children":6990},{"style":491},[6991],{"type":50,"value":513},{"type":45,"tag":484,"props":6993,"children":6994},{"style":491},[6995],{"type":50,"value":1522},{"type":45,"tag":484,"props":6997,"children":6998},{"style":491},[6999],{"type":50,"value":522},{"type":45,"tag":484,"props":7001,"children":7002},{"style":506},[7003],{"type":50,"value":7004},"dependencies",{"type":45,"tag":484,"props":7006,"children":7007},{"style":491},[7008],{"type":50,"value":513},{"type":45,"tag":484,"props":7010,"children":7011},{"style":491},[7012],{"type":50,"value":473},{"type":45,"tag":484,"props":7014,"children":7015},{"style":491},[7016],{"type":50,"value":981},{"type":45,"tag":484,"props":7018,"children":7019},{"style":491},[7020],{"type":50,"value":522},{"type":45,"tag":484,"props":7022,"children":7023},{"style":612},[7024],{"type":50,"value":1960},{"type":45,"tag":484,"props":7026,"children":7027},{"style":491},[7028],{"type":50,"value":513},{"type":45,"tag":484,"props":7030,"children":7031},{"style":491},[7032],{"type":50,"value":473},{"type":45,"tag":484,"props":7034,"children":7035},{"style":491},[7036],{"type":50,"value":522},{"type":45,"tag":484,"props":7038,"children":7039},{"style":525},[7040],{"type":50,"value":7041},"^4.6.0",{"type":45,"tag":484,"props":7043,"children":7044},{"style":491},[7045],{"type":50,"value":513},{"type":45,"tag":484,"props":7047,"children":7048},{"style":491},[7049],{"type":50,"value":992},{"type":45,"tag":484,"props":7051,"children":7052},{"style":491},[7053],{"type":50,"value":7054}," }\n",{"type":45,"tag":46,"props":7056,"children":7057},{},[7058,7063],{"type":45,"tag":53,"props":7059,"children":7061},{"className":7060},[],[7062],{"type":50,"value":528},{"type":50,"value":473},{"type":45,"tag":410,"props":7065,"children":7067},{"className":952,"code":7066,"language":954,"meta":418,"style":418},"import { DurableObject } from \"cloudflare:workers\";\nimport { Hono } from \"hono\";\n\nexport class App extends DurableObject {\n  private app = new Hono()\n    .get(\"\u002Fapi\u002Ftime\", (c) => c.json({ now: new Date().toISOString() }))\n    .post(\"\u002Fapi\u002Fvisit\", async (c) => {\n      this.ctx.storage.sql.exec(\n        `CREATE TABLE IF NOT EXISTS visits (id INTEGER PRIMARY KEY AUTOINCREMENT, ts INTEGER)`\n      );\n      this.ctx.storage.sql.exec(`INSERT INTO visits (ts) VALUES (?)`, Date.now());\n      const cnt = this.ctx.storage.sql\n        .exec(`SELECT COUNT(*) AS c FROM visits`)\n        .one().c as number;\n      return c.json({ count: cnt });\n    });\n\n  async fetch(request: Request) {\n    return this.app.fetch(request);\n  }\n}\n",[7068],{"type":45,"tag":53,"props":7069,"children":7070},{"__ignoreMap":418},[7071,7110,7149,7156,7183,7210,7322,7378,7418,7435,7447,7523,7563,7595,7632,7684,7699,7706,7741,7780,7787],{"type":45,"tag":484,"props":7072,"children":7073},{"class":486,"line":487},[7074,7078,7082,7086,7090,7094,7098,7102,7106],{"type":45,"tag":484,"props":7075,"children":7076},{"style":973},[7077],{"type":50,"value":976},{"type":45,"tag":484,"props":7079,"children":7080},{"style":491},[7081],{"type":50,"value":981},{"type":45,"tag":484,"props":7083,"children":7084},{"style":984},[7085],{"type":50,"value":987},{"type":45,"tag":484,"props":7087,"children":7088},{"style":491},[7089],{"type":50,"value":992},{"type":45,"tag":484,"props":7091,"children":7092},{"style":973},[7093],{"type":50,"value":997},{"type":45,"tag":484,"props":7095,"children":7096},{"style":491},[7097],{"type":50,"value":522},{"type":45,"tag":484,"props":7099,"children":7100},{"style":525},[7101],{"type":50,"value":1006},{"type":45,"tag":484,"props":7103,"children":7104},{"style":491},[7105],{"type":50,"value":513},{"type":45,"tag":484,"props":7107,"children":7108},{"style":491},[7109],{"type":50,"value":1015},{"type":45,"tag":484,"props":7111,"children":7112},{"class":486,"line":497},[7113,7117,7121,7125,7129,7133,7137,7141,7145],{"type":45,"tag":484,"props":7114,"children":7115},{"style":973},[7116],{"type":50,"value":976},{"type":45,"tag":484,"props":7118,"children":7119},{"style":491},[7120],{"type":50,"value":981},{"type":45,"tag":484,"props":7122,"children":7123},{"style":984},[7124],{"type":50,"value":1943},{"type":45,"tag":484,"props":7126,"children":7127},{"style":491},[7128],{"type":50,"value":992},{"type":45,"tag":484,"props":7130,"children":7131},{"style":973},[7132],{"type":50,"value":997},{"type":45,"tag":484,"props":7134,"children":7135},{"style":491},[7136],{"type":50,"value":522},{"type":45,"tag":484,"props":7138,"children":7139},{"style":525},[7140],{"type":50,"value":1960},{"type":45,"tag":484,"props":7142,"children":7143},{"style":491},[7144],{"type":50,"value":513},{"type":45,"tag":484,"props":7146,"children":7147},{"style":491},[7148],{"type":50,"value":1015},{"type":45,"tag":484,"props":7150,"children":7151},{"class":486,"line":540},[7152],{"type":45,"tag":484,"props":7153,"children":7154},{"emptyLinePlaceholder":1021},[7155],{"type":50,"value":1024},{"type":45,"tag":484,"props":7157,"children":7158},{"class":486,"line":577},[7159,7163,7167,7171,7175,7179],{"type":45,"tag":484,"props":7160,"children":7161},{"style":973},[7162],{"type":50,"value":1032},{"type":45,"tag":484,"props":7164,"children":7165},{"style":506},[7166],{"type":50,"value":1037},{"type":45,"tag":484,"props":7168,"children":7169},{"style":612},[7170],{"type":50,"value":1042},{"type":45,"tag":484,"props":7172,"children":7173},{"style":506},[7174],{"type":50,"value":1047},{"type":45,"tag":484,"props":7176,"children":7177},{"style":612},[7178],{"type":50,"value":987},{"type":45,"tag":484,"props":7180,"children":7181},{"style":491},[7182],{"type":50,"value":600},{"type":45,"tag":484,"props":7184,"children":7185},{"class":486,"line":603},[7186,7190,7194,7198,7202,7206],{"type":45,"tag":484,"props":7187,"children":7188},{"style":506},[7189],{"type":50,"value":2010},{"type":45,"tag":484,"props":7191,"children":7192},{"style":1066},[7193],{"type":50,"value":2015},{"type":45,"tag":484,"props":7195,"children":7196},{"style":491},[7197],{"type":50,"value":1136},{"type":45,"tag":484,"props":7199,"children":7200},{"style":491},[7201],{"type":50,"value":1141},{"type":45,"tag":484,"props":7203,"children":7204},{"style":1066},[7205],{"type":50,"value":1943},{"type":45,"tag":484,"props":7207,"children":7208},{"style":984},[7209],{"type":50,"value":2032},{"type":45,"tag":484,"props":7211,"children":7212},{"class":486,"line":643},[7213,7217,7221,7225,7229,7234,7238,7242,7246,7250,7254,7258,7262,7266,7270,7274,7278,7283,7287,7291,7295,7299,7303,7308,7313,7318],{"type":45,"tag":484,"props":7214,"children":7215},{"style":491},[7216],{"type":50,"value":2040},{"type":45,"tag":484,"props":7218,"children":7219},{"style":1144},[7220],{"type":50,"value":2045},{"type":45,"tag":484,"props":7222,"children":7223},{"style":984},[7224],{"type":50,"value":1074},{"type":45,"tag":484,"props":7226,"children":7227},{"style":491},[7228],{"type":50,"value":513},{"type":45,"tag":484,"props":7230,"children":7231},{"style":525},[7232],{"type":50,"value":7233},"\u002Fapi\u002Ftime",{"type":45,"tag":484,"props":7235,"children":7236},{"style":491},[7237],{"type":50,"value":513},{"type":45,"tag":484,"props":7239,"children":7240},{"style":491},[7241],{"type":50,"value":1522},{"type":45,"tag":484,"props":7243,"children":7244},{"style":491},[7245],{"type":50,"value":60},{"type":45,"tag":484,"props":7247,"children":7248},{"style":1077},[7249],{"type":50,"value":2075},{"type":45,"tag":484,"props":7251,"children":7252},{"style":491},[7253],{"type":50,"value":1169},{"type":45,"tag":484,"props":7255,"children":7256},{"style":506},[7257],{"type":50,"value":2084},{"type":45,"tag":484,"props":7259,"children":7260},{"style":984},[7261],{"type":50,"value":2089},{"type":45,"tag":484,"props":7263,"children":7264},{"style":491},[7265],{"type":50,"value":189},{"type":45,"tag":484,"props":7267,"children":7268},{"style":1144},[7269],{"type":50,"value":478},{"type":45,"tag":484,"props":7271,"children":7272},{"style":984},[7273],{"type":50,"value":1074},{"type":45,"tag":484,"props":7275,"children":7276},{"style":491},[7277],{"type":50,"value":2106},{"type":45,"tag":484,"props":7279,"children":7280},{"style":1066},[7281],{"type":50,"value":7282}," now",{"type":45,"tag":484,"props":7284,"children":7285},{"style":491},[7286],{"type":50,"value":473},{"type":45,"tag":484,"props":7288,"children":7289},{"style":491},[7290],{"type":50,"value":1141},{"type":45,"tag":484,"props":7292,"children":7293},{"style":1144},[7294],{"type":50,"value":3046},{"type":45,"tag":484,"props":7296,"children":7297},{"style":984},[7298],{"type":50,"value":1458},{"type":45,"tag":484,"props":7300,"children":7301},{"style":491},[7302],{"type":50,"value":189},{"type":45,"tag":484,"props":7304,"children":7305},{"style":1144},[7306],{"type":50,"value":7307},"toISOString",{"type":45,"tag":484,"props":7309,"children":7310},{"style":984},[7311],{"type":50,"value":7312},"() ",{"type":45,"tag":484,"props":7314,"children":7315},{"style":491},[7316],{"type":50,"value":7317},"}",{"type":45,"tag":484,"props":7319,"children":7320},{"style":984},[7321],{"type":50,"value":2137},{"type":45,"tag":484,"props":7323,"children":7324},{"class":486,"line":681},[7325,7329,7333,7337,7341,7346,7350,7354,7358,7362,7366,7370,7374],{"type":45,"tag":484,"props":7326,"children":7327},{"style":491},[7328],{"type":50,"value":2040},{"type":45,"tag":484,"props":7330,"children":7331},{"style":1144},[7332],{"type":50,"value":2149},{"type":45,"tag":484,"props":7334,"children":7335},{"style":984},[7336],{"type":50,"value":1074},{"type":45,"tag":484,"props":7338,"children":7339},{"style":491},[7340],{"type":50,"value":513},{"type":45,"tag":484,"props":7342,"children":7343},{"style":525},[7344],{"type":50,"value":7345},"\u002Fapi\u002Fvisit",{"type":45,"tag":484,"props":7347,"children":7348},{"style":491},[7349],{"type":50,"value":513},{"type":45,"tag":484,"props":7351,"children":7352},{"style":491},[7353],{"type":50,"value":1522},{"type":45,"tag":484,"props":7355,"children":7356},{"style":506},[7357],{"type":50,"value":2174},{"type":45,"tag":484,"props":7359,"children":7360},{"style":491},[7361],{"type":50,"value":60},{"type":45,"tag":484,"props":7363,"children":7364},{"style":1077},[7365],{"type":50,"value":2075},{"type":45,"tag":484,"props":7367,"children":7368},{"style":491},[7369],{"type":50,"value":1169},{"type":45,"tag":484,"props":7371,"children":7372},{"style":506},[7373],{"type":50,"value":2084},{"type":45,"tag":484,"props":7375,"children":7376},{"style":491},[7377],{"type":50,"value":600},{"type":45,"tag":484,"props":7379,"children":7380},{"class":486,"line":716},[7381,7385,7389,7393,7397,7401,7405,7409,7413],{"type":45,"tag":484,"props":7382,"children":7383},{"style":491},[7384],{"type":50,"value":1471},{"type":45,"tag":484,"props":7386,"children":7387},{"style":984},[7388],{"type":50,"value":1201},{"type":45,"tag":484,"props":7390,"children":7391},{"style":491},[7392],{"type":50,"value":189},{"type":45,"tag":484,"props":7394,"children":7395},{"style":984},[7396],{"type":50,"value":1210},{"type":45,"tag":484,"props":7398,"children":7399},{"style":491},[7400],{"type":50,"value":189},{"type":45,"tag":484,"props":7402,"children":7403},{"style":984},[7404],{"type":50,"value":1219},{"type":45,"tag":484,"props":7406,"children":7407},{"style":491},[7408],{"type":50,"value":189},{"type":45,"tag":484,"props":7410,"children":7411},{"style":1144},[7412],{"type":50,"value":1228},{"type":45,"tag":484,"props":7414,"children":7415},{"style":1066},[7416],{"type":50,"value":7417},"(\n",{"type":45,"tag":484,"props":7419,"children":7420},{"class":486,"line":725},[7421,7426,7431],{"type":45,"tag":484,"props":7422,"children":7423},{"style":491},[7424],{"type":50,"value":7425},"        `",{"type":45,"tag":484,"props":7427,"children":7428},{"style":525},[7429],{"type":50,"value":7430},"CREATE TABLE IF NOT EXISTS visits (id INTEGER PRIMARY KEY AUTOINCREMENT, ts INTEGER)",{"type":45,"tag":484,"props":7432,"children":7433},{"style":491},[7434],{"type":50,"value":1237},{"type":45,"tag":484,"props":7436,"children":7437},{"class":486,"line":1240},[7438,7443],{"type":45,"tag":484,"props":7439,"children":7440},{"style":1066},[7441],{"type":50,"value":7442},"      )",{"type":45,"tag":484,"props":7444,"children":7445},{"style":491},[7446],{"type":50,"value":1015},{"type":45,"tag":484,"props":7448,"children":7449},{"class":486,"line":1249},[7450,7454,7458,7462,7466,7470,7474,7478,7482,7486,7490,7495,7499,7503,7507,7511,7515,7519],{"type":45,"tag":484,"props":7451,"children":7452},{"style":491},[7453],{"type":50,"value":1471},{"type":45,"tag":484,"props":7455,"children":7456},{"style":984},[7457],{"type":50,"value":1201},{"type":45,"tag":484,"props":7459,"children":7460},{"style":491},[7461],{"type":50,"value":189},{"type":45,"tag":484,"props":7463,"children":7464},{"style":984},[7465],{"type":50,"value":1210},{"type":45,"tag":484,"props":7467,"children":7468},{"style":491},[7469],{"type":50,"value":189},{"type":45,"tag":484,"props":7471,"children":7472},{"style":984},[7473],{"type":50,"value":1219},{"type":45,"tag":484,"props":7475,"children":7476},{"style":491},[7477],{"type":50,"value":189},{"type":45,"tag":484,"props":7479,"children":7480},{"style":1144},[7481],{"type":50,"value":1228},{"type":45,"tag":484,"props":7483,"children":7484},{"style":1066},[7485],{"type":50,"value":1074},{"type":45,"tag":484,"props":7487,"children":7488},{"style":491},[7489],{"type":50,"value":1508},{"type":45,"tag":484,"props":7491,"children":7492},{"style":525},[7493],{"type":50,"value":7494},"INSERT INTO visits (ts) VALUES (?)",{"type":45,"tag":484,"props":7496,"children":7497},{"style":491},[7498],{"type":50,"value":1508},{"type":45,"tag":484,"props":7500,"children":7501},{"style":491},[7502],{"type":50,"value":1522},{"type":45,"tag":484,"props":7504,"children":7505},{"style":984},[7506],{"type":50,"value":3046},{"type":45,"tag":484,"props":7508,"children":7509},{"style":491},[7510],{"type":50,"value":189},{"type":45,"tag":484,"props":7512,"children":7513},{"style":1144},[7514],{"type":50,"value":3055},{"type":45,"tag":484,"props":7516,"children":7517},{"style":1066},[7518],{"type":50,"value":3060},{"type":45,"tag":484,"props":7520,"children":7521},{"style":491},[7522],{"type":50,"value":1015},{"type":45,"tag":484,"props":7524,"children":7525},{"class":486,"line":1258},[7526,7530,7535,7539,7543,7547,7551,7555,7559],{"type":45,"tag":484,"props":7527,"children":7528},{"style":506},[7529],{"type":50,"value":1396},{"type":45,"tag":484,"props":7531,"children":7532},{"style":984},[7533],{"type":50,"value":7534}," cnt",{"type":45,"tag":484,"props":7536,"children":7537},{"style":491},[7538],{"type":50,"value":1136},{"type":45,"tag":484,"props":7540,"children":7541},{"style":491},[7542],{"type":50,"value":1671},{"type":45,"tag":484,"props":7544,"children":7545},{"style":984},[7546],{"type":50,"value":1201},{"type":45,"tag":484,"props":7548,"children":7549},{"style":491},[7550],{"type":50,"value":189},{"type":45,"tag":484,"props":7552,"children":7553},{"style":984},[7554],{"type":50,"value":1210},{"type":45,"tag":484,"props":7556,"children":7557},{"style":491},[7558],{"type":50,"value":189},{"type":45,"tag":484,"props":7560,"children":7561},{"style":984},[7562],{"type":50,"value":1692},{"type":45,"tag":484,"props":7564,"children":7565},{"class":486,"line":1267},[7566,7570,7574,7578,7582,7587,7591],{"type":45,"tag":484,"props":7567,"children":7568},{"style":491},[7569],{"type":50,"value":1701},{"type":45,"tag":484,"props":7571,"children":7572},{"style":1144},[7573],{"type":50,"value":1228},{"type":45,"tag":484,"props":7575,"children":7576},{"style":1066},[7577],{"type":50,"value":1074},{"type":45,"tag":484,"props":7579,"children":7580},{"style":491},[7581],{"type":50,"value":1508},{"type":45,"tag":484,"props":7583,"children":7584},{"style":525},[7585],{"type":50,"value":7586},"SELECT COUNT(*) AS c FROM visits",{"type":45,"tag":484,"props":7588,"children":7589},{"style":491},[7590],{"type":50,"value":1508},{"type":45,"tag":484,"props":7592,"children":7593},{"style":1066},[7594],{"type":50,"value":1727},{"type":45,"tag":484,"props":7596,"children":7597},{"class":486,"line":1276},[7598,7602,7607,7611,7615,7619,7624,7628],{"type":45,"tag":484,"props":7599,"children":7600},{"style":491},[7601],{"type":50,"value":1701},{"type":45,"tag":484,"props":7603,"children":7604},{"style":1144},[7605],{"type":50,"value":7606},"one",{"type":45,"tag":484,"props":7608,"children":7609},{"style":1066},[7610],{"type":50,"value":1458},{"type":45,"tag":484,"props":7612,"children":7613},{"style":491},[7614],{"type":50,"value":189},{"type":45,"tag":484,"props":7616,"children":7617},{"style":984},[7618],{"type":50,"value":2075},{"type":45,"tag":484,"props":7620,"children":7621},{"style":973},[7622],{"type":50,"value":7623}," as",{"type":45,"tag":484,"props":7625,"children":7626},{"style":612},[7627],{"type":50,"value":2857},{"type":45,"tag":484,"props":7629,"children":7630},{"style":491},[7631],{"type":50,"value":1015},{"type":45,"tag":484,"props":7633,"children":7634},{"class":486,"line":1293},[7635,7639,7643,7647,7651,7655,7659,7664,7668,7672,7676,7680],{"type":45,"tag":484,"props":7636,"children":7637},{"style":973},[7638],{"type":50,"value":1543},{"type":45,"tag":484,"props":7640,"children":7641},{"style":984},[7642],{"type":50,"value":2089},{"type":45,"tag":484,"props":7644,"children":7645},{"style":491},[7646],{"type":50,"value":189},{"type":45,"tag":484,"props":7648,"children":7649},{"style":1144},[7650],{"type":50,"value":478},{"type":45,"tag":484,"props":7652,"children":7653},{"style":1066},[7654],{"type":50,"value":1074},{"type":45,"tag":484,"props":7656,"children":7657},{"style":491},[7658],{"type":50,"value":2106},{"type":45,"tag":484,"props":7660,"children":7661},{"style":1066},[7662],{"type":50,"value":7663}," count",{"type":45,"tag":484,"props":7665,"children":7666},{"style":491},[7667],{"type":50,"value":473},{"type":45,"tag":484,"props":7669,"children":7670},{"style":984},[7671],{"type":50,"value":7534},{"type":45,"tag":484,"props":7673,"children":7674},{"style":491},[7675],{"type":50,"value":992},{"type":45,"tag":484,"props":7677,"children":7678},{"style":1066},[7679],{"type":50,"value":1169},{"type":45,"tag":484,"props":7681,"children":7682},{"style":491},[7683],{"type":50,"value":1015},{"type":45,"tag":484,"props":7685,"children":7686},{"class":486,"line":1301},[7687,7691,7695],{"type":45,"tag":484,"props":7688,"children":7689},{"style":491},[7690],{"type":50,"value":2399},{"type":45,"tag":484,"props":7692,"children":7693},{"style":984},[7694],{"type":50,"value":1169},{"type":45,"tag":484,"props":7696,"children":7697},{"style":491},[7698],{"type":50,"value":1015},{"type":45,"tag":484,"props":7700,"children":7701},{"class":486,"line":1390},[7702],{"type":45,"tag":484,"props":7703,"children":7704},{"emptyLinePlaceholder":1021},[7705],{"type":50,"value":1024},{"type":45,"tag":484,"props":7707,"children":7708},{"class":486,"line":1465},[7709,7713,7717,7721,7725,7729,7733,7737],{"type":45,"tag":484,"props":7710,"children":7711},{"style":506},[7712],{"type":50,"value":1063},{"type":45,"tag":484,"props":7714,"children":7715},{"style":1066},[7716],{"type":50,"value":1069},{"type":45,"tag":484,"props":7718,"children":7719},{"style":491},[7720],{"type":50,"value":1074},{"type":45,"tag":484,"props":7722,"children":7723},{"style":1077},[7724],{"type":50,"value":1080},{"type":45,"tag":484,"props":7726,"children":7727},{"style":491},[7728],{"type":50,"value":473},{"type":45,"tag":484,"props":7730,"children":7731},{"style":612},[7732],{"type":50,"value":1089},{"type":45,"tag":484,"props":7734,"children":7735},{"style":491},[7736],{"type":50,"value":1169},{"type":45,"tag":484,"props":7738,"children":7739},{"style":491},[7740],{"type":50,"value":600},{"type":45,"tag":484,"props":7742,"children":7743},{"class":486,"line":1537},[7744,7748,7752,7756,7760,7764,7768,7772,7776],{"type":45,"tag":484,"props":7745,"children":7746},{"style":973},[7747],{"type":50,"value":1802},{"type":45,"tag":484,"props":7749,"children":7750},{"style":491},[7751],{"type":50,"value":1671},{"type":45,"tag":484,"props":7753,"children":7754},{"style":984},[7755],{"type":50,"value":2465},{"type":45,"tag":484,"props":7757,"children":7758},{"style":491},[7759],{"type":50,"value":189},{"type":45,"tag":484,"props":7761,"children":7762},{"style":1144},[7763],{"type":50,"value":2474},{"type":45,"tag":484,"props":7765,"children":7766},{"style":1066},[7767],{"type":50,"value":1074},{"type":45,"tag":484,"props":7769,"children":7770},{"style":984},[7771],{"type":50,"value":1080},{"type":45,"tag":484,"props":7773,"children":7774},{"style":1066},[7775],{"type":50,"value":1169},{"type":45,"tag":484,"props":7777,"children":7778},{"style":491},[7779],{"type":50,"value":1015},{"type":45,"tag":484,"props":7781,"children":7782},{"class":486,"line":1595},[7783],{"type":45,"tag":484,"props":7784,"children":7785},{"style":491},[7786],{"type":50,"value":722},{"type":45,"tag":484,"props":7788,"children":7789},{"class":486,"line":1604},[7790],{"type":45,"tag":484,"props":7791,"children":7792},{"style":491},[7793],{"type":50,"value":731},{"type":45,"tag":46,"props":7795,"children":7796},{},[7797,7803],{"type":45,"tag":53,"props":7798,"children":7800},{"className":7799},[],[7801],{"type":50,"value":7802},"public\u002Findex.html",{"type":50,"value":473},{"type":45,"tag":410,"props":7805,"children":7807},{"className":4193,"code":7806,"language":4195,"meta":418,"style":418},"\u003C!doctype html>\n\u003Chtml>\n\u003Chead>\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fstyle.css\">\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv id=\"root\">Loading…\u003C\u002Fdiv>\n  \u003Cscript type=\"module\" src=\"\u002Fapp.js\">\u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n",[7808],{"type":45,"tag":53,"props":7809,"children":7810},{"__ignoreMap":418},[7811,7833,7848,7864,7925,7940,7956,8009,8073,8088],{"type":45,"tag":484,"props":7812,"children":7813},{"class":486,"line":487},[7814,7819,7824,7829],{"type":45,"tag":484,"props":7815,"children":7816},{"style":491},[7817],{"type":50,"value":7818},"\u003C!",{"type":45,"tag":484,"props":7820,"children":7821},{"style":1066},[7822],{"type":50,"value":7823},"doctype",{"type":45,"tag":484,"props":7825,"children":7826},{"style":506},[7827],{"type":50,"value":7828}," html",{"type":45,"tag":484,"props":7830,"children":7831},{"style":491},[7832],{"type":50,"value":4238},{"type":45,"tag":484,"props":7834,"children":7835},{"class":486,"line":497},[7836,7840,7844],{"type":45,"tag":484,"props":7837,"children":7838},{"style":491},[7839],{"type":50,"value":1104},{"type":45,"tag":484,"props":7841,"children":7842},{"style":1066},[7843],{"type":50,"value":4195},{"type":45,"tag":484,"props":7845,"children":7846},{"style":491},[7847],{"type":50,"value":4238},{"type":45,"tag":484,"props":7849,"children":7850},{"class":486,"line":540},[7851,7855,7860],{"type":45,"tag":484,"props":7852,"children":7853},{"style":491},[7854],{"type":50,"value":1104},{"type":45,"tag":484,"props":7856,"children":7857},{"style":1066},[7858],{"type":50,"value":7859},"head",{"type":45,"tag":484,"props":7861,"children":7862},{"style":491},[7863],{"type":50,"value":4238},{"type":45,"tag":484,"props":7865,"children":7866},{"class":486,"line":577},[7867,7872,7877,7882,7886,7890,7895,7899,7904,7908,7912,7917,7921],{"type":45,"tag":484,"props":7868,"children":7869},{"style":491},[7870],{"type":50,"value":7871},"  \u003C",{"type":45,"tag":484,"props":7873,"children":7874},{"style":1066},[7875],{"type":50,"value":7876},"link",{"type":45,"tag":484,"props":7878,"children":7879},{"style":506},[7880],{"type":50,"value":7881}," rel",{"type":45,"tag":484,"props":7883,"children":7884},{"style":491},[7885],{"type":50,"value":2737},{"type":45,"tag":484,"props":7887,"children":7888},{"style":491},[7889],{"type":50,"value":513},{"type":45,"tag":484,"props":7891,"children":7892},{"style":525},[7893],{"type":50,"value":7894},"stylesheet",{"type":45,"tag":484,"props":7896,"children":7897},{"style":491},[7898],{"type":50,"value":513},{"type":45,"tag":484,"props":7900,"children":7901},{"style":506},[7902],{"type":50,"value":7903}," href",{"type":45,"tag":484,"props":7905,"children":7906},{"style":491},[7907],{"type":50,"value":2737},{"type":45,"tag":484,"props":7909,"children":7910},{"style":491},[7911],{"type":50,"value":513},{"type":45,"tag":484,"props":7913,"children":7914},{"style":525},[7915],{"type":50,"value":7916},"\u002Fstyle.css",{"type":45,"tag":484,"props":7918,"children":7919},{"style":491},[7920],{"type":50,"value":513},{"type":45,"tag":484,"props":7922,"children":7923},{"style":491},[7924],{"type":50,"value":4238},{"type":45,"tag":484,"props":7926,"children":7927},{"class":486,"line":603},[7928,7932,7936],{"type":45,"tag":484,"props":7929,"children":7930},{"style":491},[7931],{"type":50,"value":4322},{"type":45,"tag":484,"props":7933,"children":7934},{"style":1066},[7935],{"type":50,"value":7859},{"type":45,"tag":484,"props":7937,"children":7938},{"style":491},[7939],{"type":50,"value":4238},{"type":45,"tag":484,"props":7941,"children":7942},{"class":486,"line":643},[7943,7947,7952],{"type":45,"tag":484,"props":7944,"children":7945},{"style":491},[7946],{"type":50,"value":1104},{"type":45,"tag":484,"props":7948,"children":7949},{"style":1066},[7950],{"type":50,"value":7951},"body",{"type":45,"tag":484,"props":7953,"children":7954},{"style":491},[7955],{"type":50,"value":4238},{"type":45,"tag":484,"props":7957,"children":7958},{"class":486,"line":681},[7959,7963,7967,7972,7976,7980,7984,7988,7992,7997,8001,8005],{"type":45,"tag":484,"props":7960,"children":7961},{"style":491},[7962],{"type":50,"value":7871},{"type":45,"tag":484,"props":7964,"children":7965},{"style":1066},[7966],{"type":50,"value":4309},{"type":45,"tag":484,"props":7968,"children":7969},{"style":506},[7970],{"type":50,"value":7971}," id",{"type":45,"tag":484,"props":7973,"children":7974},{"style":491},[7975],{"type":50,"value":2737},{"type":45,"tag":484,"props":7977,"children":7978},{"style":491},[7979],{"type":50,"value":513},{"type":45,"tag":484,"props":7981,"children":7982},{"style":525},[7983],{"type":50,"value":42},{"type":45,"tag":484,"props":7985,"children":7986},{"style":491},[7987],{"type":50,"value":513},{"type":45,"tag":484,"props":7989,"children":7990},{"style":491},[7991],{"type":50,"value":1114},{"type":45,"tag":484,"props":7993,"children":7994},{"style":984},[7995],{"type":50,"value":7996},"Loading…",{"type":45,"tag":484,"props":7998,"children":7999},{"style":491},[8000],{"type":50,"value":4322},{"type":45,"tag":484,"props":8002,"children":8003},{"style":1066},[8004],{"type":50,"value":4309},{"type":45,"tag":484,"props":8006,"children":8007},{"style":491},[8008],{"type":50,"value":4238},{"type":45,"tag":484,"props":8010,"children":8011},{"class":486,"line":716},[8012,8016,8020,8024,8028,8032,8036,8040,8044,8048,8052,8057,8061,8065,8069],{"type":45,"tag":484,"props":8013,"children":8014},{"style":491},[8015],{"type":50,"value":7871},{"type":45,"tag":484,"props":8017,"children":8018},{"style":1066},[8019],{"type":50,"value":4211},{"type":45,"tag":484,"props":8021,"children":8022},{"style":506},[8023],{"type":50,"value":4216},{"type":45,"tag":484,"props":8025,"children":8026},{"style":491},[8027],{"type":50,"value":2737},{"type":45,"tag":484,"props":8029,"children":8030},{"style":491},[8031],{"type":50,"value":513},{"type":45,"tag":484,"props":8033,"children":8034},{"style":525},[8035],{"type":50,"value":4229},{"type":45,"tag":484,"props":8037,"children":8038},{"style":491},[8039],{"type":50,"value":513},{"type":45,"tag":484,"props":8041,"children":8042},{"style":506},[8043],{"type":50,"value":4584},{"type":45,"tag":484,"props":8045,"children":8046},{"style":491},[8047],{"type":50,"value":2737},{"type":45,"tag":484,"props":8049,"children":8050},{"style":491},[8051],{"type":50,"value":513},{"type":45,"tag":484,"props":8053,"children":8054},{"style":525},[8055],{"type":50,"value":8056},"\u002Fapp.js",{"type":45,"tag":484,"props":8058,"children":8059},{"style":491},[8060],{"type":50,"value":513},{"type":45,"tag":484,"props":8062,"children":8063},{"style":491},[8064],{"type":50,"value":4606},{"type":45,"tag":484,"props":8066,"children":8067},{"style":1066},[8068],{"type":50,"value":4211},{"type":45,"tag":484,"props":8070,"children":8071},{"style":491},[8072],{"type":50,"value":4238},{"type":45,"tag":484,"props":8074,"children":8075},{"class":486,"line":725},[8076,8080,8084],{"type":45,"tag":484,"props":8077,"children":8078},{"style":491},[8079],{"type":50,"value":4322},{"type":45,"tag":484,"props":8081,"children":8082},{"style":1066},[8083],{"type":50,"value":7951},{"type":45,"tag":484,"props":8085,"children":8086},{"style":491},[8087],{"type":50,"value":4238},{"type":45,"tag":484,"props":8089,"children":8090},{"class":486,"line":1240},[8091,8095,8099],{"type":45,"tag":484,"props":8092,"children":8093},{"style":491},[8094],{"type":50,"value":4322},{"type":45,"tag":484,"props":8096,"children":8097},{"style":1066},[8098],{"type":50,"value":4195},{"type":45,"tag":484,"props":8100,"children":8101},{"style":491},[8102],{"type":50,"value":4238},{"type":45,"tag":46,"props":8104,"children":8105},{},[8106,8112],{"type":45,"tag":53,"props":8107,"children":8109},{"className":8108},[],[8110],{"type":50,"value":8111},"public\u002Fapp.js",{"type":50,"value":473},{"type":45,"tag":410,"props":8114,"children":8118},{"className":8115,"code":8116,"language":8117,"meta":418,"style":418},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const res = await fetch(\".\u002Fapi\u002Ftime\");\nconst data = await res.json();\ndocument.getElementById(\"root\").textContent = data.now;\n\n\u002F\u002F Increment + display visit counter (server state lives in App.ctx.storage.sql)\nconst v = await fetch(\".\u002Fapi\u002Fvisit\", { method: \"POST\" }).then((r) => r.json());\ndocument.getElementById(\"root\").textContent += `  ·  visits: ${v.count}`;\n","js",[8119],{"type":45,"tag":53,"props":8120,"children":8121},{"__ignoreMap":418},[8122,8171,8212,8278,8285,8293,8422],{"type":45,"tag":484,"props":8123,"children":8124},{"class":486,"line":487},[8125,8129,8134,8138,8142,8146,8150,8154,8159,8163,8167],{"type":45,"tag":484,"props":8126,"children":8127},{"style":506},[8128],{"type":50,"value":2727},{"type":45,"tag":484,"props":8130,"children":8131},{"style":984},[8132],{"type":50,"value":8133}," res ",{"type":45,"tag":484,"props":8135,"children":8136},{"style":491},[8137],{"type":50,"value":2737},{"type":45,"tag":484,"props":8139,"children":8140},{"style":973},[8141],{"type":50,"value":1418},{"type":45,"tag":484,"props":8143,"children":8144},{"style":1144},[8145],{"type":50,"value":1069},{"type":45,"tag":484,"props":8147,"children":8148},{"style":984},[8149],{"type":50,"value":1074},{"type":45,"tag":484,"props":8151,"children":8152},{"style":491},[8153],{"type":50,"value":513},{"type":45,"tag":484,"props":8155,"children":8156},{"style":525},[8157],{"type":50,"value":8158},".\u002Fapi\u002Ftime",{"type":45,"tag":484,"props":8160,"children":8161},{"style":491},[8162],{"type":50,"value":513},{"type":45,"tag":484,"props":8164,"children":8165},{"style":984},[8166],{"type":50,"value":1169},{"type":45,"tag":484,"props":8168,"children":8169},{"style":491},[8170],{"type":50,"value":1015},{"type":45,"tag":484,"props":8172,"children":8173},{"class":486,"line":497},[8174,8178,8183,8187,8191,8196,8200,8204,8208],{"type":45,"tag":484,"props":8175,"children":8176},{"style":506},[8177],{"type":50,"value":2727},{"type":45,"tag":484,"props":8179,"children":8180},{"style":984},[8181],{"type":50,"value":8182}," data ",{"type":45,"tag":484,"props":8184,"children":8185},{"style":491},[8186],{"type":50,"value":2737},{"type":45,"tag":484,"props":8188,"children":8189},{"style":973},[8190],{"type":50,"value":1418},{"type":45,"tag":484,"props":8192,"children":8193},{"style":984},[8194],{"type":50,"value":8195}," res",{"type":45,"tag":484,"props":8197,"children":8198},{"style":491},[8199],{"type":50,"value":189},{"type":45,"tag":484,"props":8201,"children":8202},{"style":1144},[8203],{"type":50,"value":478},{"type":45,"tag":484,"props":8205,"children":8206},{"style":984},[8207],{"type":50,"value":1458},{"type":45,"tag":484,"props":8209,"children":8210},{"style":491},[8211],{"type":50,"value":1015},{"type":45,"tag":484,"props":8213,"children":8214},{"class":486,"line":540},[8215,8220,8224,8228,8232,8236,8240,8244,8248,8252,8257,8261,8266,8270,8274],{"type":45,"tag":484,"props":8216,"children":8217},{"style":984},[8218],{"type":50,"value":8219},"document",{"type":45,"tag":484,"props":8221,"children":8222},{"style":491},[8223],{"type":50,"value":189},{"type":45,"tag":484,"props":8225,"children":8226},{"style":1144},[8227],{"type":50,"value":4839},{"type":45,"tag":484,"props":8229,"children":8230},{"style":984},[8231],{"type":50,"value":1074},{"type":45,"tag":484,"props":8233,"children":8234},{"style":491},[8235],{"type":50,"value":513},{"type":45,"tag":484,"props":8237,"children":8238},{"style":525},[8239],{"type":50,"value":42},{"type":45,"tag":484,"props":8241,"children":8242},{"style":491},[8243],{"type":50,"value":513},{"type":45,"tag":484,"props":8245,"children":8246},{"style":984},[8247],{"type":50,"value":1169},{"type":45,"tag":484,"props":8249,"children":8250},{"style":491},[8251],{"type":50,"value":189},{"type":45,"tag":484,"props":8253,"children":8254},{"style":984},[8255],{"type":50,"value":8256},"textContent ",{"type":45,"tag":484,"props":8258,"children":8259},{"style":491},[8260],{"type":50,"value":2737},{"type":45,"tag":484,"props":8262,"children":8263},{"style":984},[8264],{"type":50,"value":8265}," data",{"type":45,"tag":484,"props":8267,"children":8268},{"style":491},[8269],{"type":50,"value":189},{"type":45,"tag":484,"props":8271,"children":8272},{"style":984},[8273],{"type":50,"value":3055},{"type":45,"tag":484,"props":8275,"children":8276},{"style":491},[8277],{"type":50,"value":1015},{"type":45,"tag":484,"props":8279,"children":8280},{"class":486,"line":577},[8281],{"type":45,"tag":484,"props":8282,"children":8283},{"emptyLinePlaceholder":1021},[8284],{"type":50,"value":1024},{"type":45,"tag":484,"props":8286,"children":8287},{"class":486,"line":603},[8288],{"type":45,"tag":484,"props":8289,"children":8290},{"style":964},[8291],{"type":50,"value":8292},"\u002F\u002F Increment + display visit counter (server state lives in App.ctx.storage.sql)\n",{"type":45,"tag":484,"props":8294,"children":8295},{"class":486,"line":643},[8296,8300,8305,8309,8313,8317,8321,8325,8330,8334,8338,8342,8347,8351,8355,8359,8363,8367,8371,8375,8380,8384,8388,8393,8397,8401,8406,8410,8414,8418],{"type":45,"tag":484,"props":8297,"children":8298},{"style":506},[8299],{"type":50,"value":2727},{"type":45,"tag":484,"props":8301,"children":8302},{"style":984},[8303],{"type":50,"value":8304}," v ",{"type":45,"tag":484,"props":8306,"children":8307},{"style":491},[8308],{"type":50,"value":2737},{"type":45,"tag":484,"props":8310,"children":8311},{"style":973},[8312],{"type":50,"value":1418},{"type":45,"tag":484,"props":8314,"children":8315},{"style":1144},[8316],{"type":50,"value":1069},{"type":45,"tag":484,"props":8318,"children":8319},{"style":984},[8320],{"type":50,"value":1074},{"type":45,"tag":484,"props":8322,"children":8323},{"style":491},[8324],{"type":50,"value":513},{"type":45,"tag":484,"props":8326,"children":8327},{"style":525},[8328],{"type":50,"value":8329},".\u002Fapi\u002Fvisit",{"type":45,"tag":484,"props":8331,"children":8332},{"style":491},[8333],{"type":50,"value":513},{"type":45,"tag":484,"props":8335,"children":8336},{"style":491},[8337],{"type":50,"value":1522},{"type":45,"tag":484,"props":8339,"children":8340},{"style":491},[8341],{"type":50,"value":981},{"type":45,"tag":484,"props":8343,"children":8344},{"style":1066},[8345],{"type":50,"value":8346}," method",{"type":45,"tag":484,"props":8348,"children":8349},{"style":491},[8350],{"type":50,"value":473},{"type":45,"tag":484,"props":8352,"children":8353},{"style":491},[8354],{"type":50,"value":522},{"type":45,"tag":484,"props":8356,"children":8357},{"style":525},[8358],{"type":50,"value":1374},{"type":45,"tag":484,"props":8360,"children":8361},{"style":491},[8362],{"type":50,"value":513},{"type":45,"tag":484,"props":8364,"children":8365},{"style":491},[8366],{"type":50,"value":992},{"type":45,"tag":484,"props":8368,"children":8369},{"style":984},[8370],{"type":50,"value":1169},{"type":45,"tag":484,"props":8372,"children":8373},{"style":491},[8374],{"type":50,"value":189},{"type":45,"tag":484,"props":8376,"children":8377},{"style":1144},[8378],{"type":50,"value":8379},"then",{"type":45,"tag":484,"props":8381,"children":8382},{"style":984},[8383],{"type":50,"value":1074},{"type":45,"tag":484,"props":8385,"children":8386},{"style":491},[8387],{"type":50,"value":1074},{"type":45,"tag":484,"props":8389,"children":8390},{"style":1077},[8391],{"type":50,"value":8392},"r",{"type":45,"tag":484,"props":8394,"children":8395},{"style":491},[8396],{"type":50,"value":1169},{"type":45,"tag":484,"props":8398,"children":8399},{"style":506},[8400],{"type":50,"value":2084},{"type":45,"tag":484,"props":8402,"children":8403},{"style":984},[8404],{"type":50,"value":8405}," r",{"type":45,"tag":484,"props":8407,"children":8408},{"style":491},[8409],{"type":50,"value":189},{"type":45,"tag":484,"props":8411,"children":8412},{"style":1144},[8413],{"type":50,"value":478},{"type":45,"tag":484,"props":8415,"children":8416},{"style":984},[8417],{"type":50,"value":3060},{"type":45,"tag":484,"props":8419,"children":8420},{"style":491},[8421],{"type":50,"value":1015},{"type":45,"tag":484,"props":8423,"children":8424},{"class":486,"line":681},[8425,8429,8433,8437,8441,8445,8449,8453,8457,8461,8465,8470,8475,8480,8485,8490,8494,8499,8504],{"type":45,"tag":484,"props":8426,"children":8427},{"style":984},[8428],{"type":50,"value":8219},{"type":45,"tag":484,"props":8430,"children":8431},{"style":491},[8432],{"type":50,"value":189},{"type":45,"tag":484,"props":8434,"children":8435},{"style":1144},[8436],{"type":50,"value":4839},{"type":45,"tag":484,"props":8438,"children":8439},{"style":984},[8440],{"type":50,"value":1074},{"type":45,"tag":484,"props":8442,"children":8443},{"style":491},[8444],{"type":50,"value":513},{"type":45,"tag":484,"props":8446,"children":8447},{"style":525},[8448],{"type":50,"value":42},{"type":45,"tag":484,"props":8450,"children":8451},{"style":491},[8452],{"type":50,"value":513},{"type":45,"tag":484,"props":8454,"children":8455},{"style":984},[8456],{"type":50,"value":1169},{"type":45,"tag":484,"props":8458,"children":8459},{"style":491},[8460],{"type":50,"value":189},{"type":45,"tag":484,"props":8462,"children":8463},{"style":984},[8464],{"type":50,"value":8256},{"type":45,"tag":484,"props":8466,"children":8467},{"style":491},[8468],{"type":50,"value":8469},"+=",{"type":45,"tag":484,"props":8471,"children":8472},{"style":491},[8473],{"type":50,"value":8474}," `",{"type":45,"tag":484,"props":8476,"children":8477},{"style":525},[8478],{"type":50,"value":8479},"  ·  visits: ",{"type":45,"tag":484,"props":8481,"children":8482},{"style":491},[8483],{"type":50,"value":8484},"${",{"type":45,"tag":484,"props":8486,"children":8487},{"style":984},[8488],{"type":50,"value":8489},"v",{"type":45,"tag":484,"props":8491,"children":8492},{"style":491},[8493],{"type":50,"value":189},{"type":45,"tag":484,"props":8495,"children":8496},{"style":984},[8497],{"type":50,"value":8498},"count",{"type":45,"tag":484,"props":8500,"children":8501},{"style":491},[8502],{"type":50,"value":8503},"}`",{"type":45,"tag":484,"props":8505,"children":8506},{"style":491},[8507],{"type":50,"value":1015},{"type":45,"tag":46,"props":8509,"children":8510},{},[8511,8513,8518,8520,8525],{"type":50,"value":8512},"Note ",{"type":45,"tag":53,"props":8514,"children":8516},{"className":8515},[],[8517],{"type":50,"value":8158},{"type":50,"value":8519}," (relative) in JS, ",{"type":45,"tag":53,"props":8521,"children":8523},{"className":8522},[],[8524],{"type":50,"value":7916},{"type":50,"value":8526}," (root-relative) in HTML. The HTML href is rewritten by the preview; the JS fetch resolves against the document's base URL.",{"type":45,"tag":46,"props":8528,"children":8529},{},[8530,8532,8538,8540,8546],{"type":50,"value":8531},"Commit this, call ",{"type":45,"tag":53,"props":8533,"children":8535},{"className":8534},[],[8536],{"type":50,"value":8537},"deploy_space(\"main\")",{"type":50,"value":8539},", and the preview at ",{"type":45,"tag":53,"props":8541,"children":8543},{"className":8542},[],[8544],{"type":50,"value":8545},"\u002Fspace\u002F\u003Cname>\u002Fpreview\u002Fmain\u002F",{"type":50,"value":8547}," will render the timestamp and an incrementing visit counter persisted in the App DO's SQLite.",{"type":45,"tag":8549,"props":8550,"children":8551},"style",{},[8552],{"type":50,"value":8553},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":8555,"total":1652},[8556,8571,8585,8600,8613,8627,8641,8655,8662,8678,8691,8706],{"slug":8557,"name":8557,"fn":8558,"description":8559,"org":8560,"tags":8561,"stars":8568,"repoUrl":8569,"updatedAt":8570},"code-review","review code changes for quality and risk","Review code changes for correctness, clarity, and risk. Use when the user asks for a review, a second opinion on a diff, or feedback on code they wrote.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8562,8563,8565],{"name":9,"slug":8,"type":15},{"name":8564,"slug":8557,"type":15},"Code Review",{"name":8566,"slug":8567,"type":15},"Engineering","engineering",5284,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fagents","2026-06-08T08:19:41.621858",{"slug":8572,"name":8572,"fn":8573,"description":8574,"org":8575,"tags":8576,"stars":8568,"repoUrl":8569,"updatedAt":8584},"debug-plan","create systematic debugging plans","Create a systematic debugging plan for a bug report. Use when the user asks how to investigate a failure, regression, or unexpected behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8577,8580,8583],{"name":8578,"slug":8579,"type":15},"Code Analysis","code-analysis",{"name":8581,"slug":8582,"type":15},"Debugging","debugging",{"name":8566,"slug":8567,"type":15},"2026-05-30T06:16:58.837407",{"slug":8586,"name":8586,"fn":8587,"description":8588,"org":8589,"tags":8590,"stars":8568,"repoUrl":8569,"updatedAt":8599},"escalation","escalate customer issues to human agents","Decide when and how to escalate a customer conversation to a human agent. Use when a request is high-risk, the customer is frustrated, or the issue is outside what you can resolve.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8591,8594,8597],{"name":8592,"slug":8593,"type":15},"Communications","communications",{"name":8595,"slug":8596,"type":15},"Customer Support","customer-support",{"name":8598,"slug":8586,"type":15},"Escalation","2026-06-08T08:19:43.130686",{"slug":8601,"name":8601,"fn":8602,"description":8603,"org":8604,"tags":8605,"stars":8568,"repoUrl":8569,"updatedAt":8612},"pirate-voice","rewrite text in pirate voice","Rewrite or answer in a playful pirate voice. Use when the user asks for pirate tone, nautical phrasing, or says to talk like a pirate.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8606,8609],{"name":8607,"slug":8608,"type":15},"Creative","creative",{"name":8610,"slug":8611,"type":15},"Writing","writing","2026-05-30T06:17:00.080367",{"slug":8614,"name":8614,"fn":8615,"description":8616,"org":8617,"tags":8618,"stars":8568,"repoUrl":8569,"updatedAt":8626},"release-notes","draft product release notes","Draft short release notes from a list of changes. Use when the user asks for changelogs, release notes, or a concise product update.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8619,8622,8625],{"name":8620,"slug":8621,"type":15},"Content Creation","content-creation",{"name":8623,"slug":8624,"type":15},"Documentation","documentation",{"name":8610,"slug":8611,"type":15},"2026-05-30T06:17:01.278643",{"slug":8628,"name":8628,"fn":8629,"description":8630,"org":8631,"tags":8632,"stars":8568,"repoUrl":8569,"updatedAt":8640},"test-plan","produce focused test plans","Produce a focused test plan for a change. Use when the user asks how to test a feature, what cases to cover, or for a QA checklist before shipping.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8633,8634,8637],{"name":8566,"slug":8567,"type":15},{"name":8635,"slug":8636,"type":15},"QA","qa",{"name":8638,"slug":8639,"type":15},"Testing","testing","2026-05-30T06:17:02.479863",{"slug":8642,"name":8642,"fn":8643,"description":8644,"org":8645,"tags":8646,"stars":8568,"repoUrl":8569,"updatedAt":8654},"workspace-digest","summarize files in the shared workspace","Summarize the files saved in this assistant's shared workspace. Use when the user asks what is in their workspace, for a file inventory, or a digest of saved work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8647,8648,8651],{"name":8623,"slug":8624,"type":15},{"name":8649,"slug":8650,"type":15},"Knowledge Management","knowledge-management",{"name":8652,"slug":8653,"type":15},"Summarization","summarization","2026-06-07T07:51:27.265303",{"slug":4,"name":4,"fn":5,"description":6,"org":8656,"tags":8657,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8658,8659,8660,8661],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"name":21,"slug":22,"type":15},{"slug":8663,"name":8663,"fn":8664,"description":8665,"org":8666,"tags":8667,"stars":23,"repoUrl":24,"updatedAt":8677},"frontend-design","create production-grade frontend interfaces","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8668,8671,8674,8676],{"name":8669,"slug":8670,"type":15},"Design","design",{"name":8672,"slug":8673,"type":15},"Frontend","frontend",{"name":8675,"slug":4195,"type":15},"HTML",{"name":21,"slug":22,"type":15},"2026-06-16T09:46:01.852741",{"slug":8679,"name":8679,"fn":8680,"description":8681,"org":8682,"tags":8683,"stars":23,"repoUrl":24,"updatedAt":8690},"frontend-design-landing-page","build marketing landing pages","Marketing landing page and conversion-focused product page reference. Use this skill when building hero sections, feature grids, pricing pages, testimonials, CTAs, footers, navigation bars, or any public-facing marketing surface. Covers a warm, professional, developer-friendly design language (cream backgrounds, generous whitespace, pill CTAs, corner-bracket card decorations) and a complete token set, animation system, and copy-paste component snippets. NOT for product\u002Fdashboard UIs — use frontend-design-saas for those.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8684,8685,8686,8689],{"name":8672,"slug":8673,"type":15},{"name":8675,"slug":4195,"type":15},{"name":8687,"slug":8688,"type":15},"Marketing","marketing",{"name":21,"slug":22,"type":15},"2026-06-16T09:46:00.515859",{"slug":8692,"name":8692,"fn":8693,"description":8694,"org":8695,"tags":8696,"stars":23,"repoUrl":24,"updatedAt":8705},"frontend-design-saas","build SaaS dashboard and product UIs","S-tier SaaS dashboard and product UI reference. Use this skill when building application shells, data tables, settings panels, billing pages, dashboards, auth flows, admin tools, or any internal\u002Fcustomer-facing SaaS product UI. Inspired by Stripe, Linear, Vercel, Airbnb, Notion. Covers neutral-led design tokens, sidebar+content shells, dense data UIs, form-heavy configuration pages, command palettes, empty states, and the accessibility (WCAG AA+) bar these products clear.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8697,8698,8699,8702],{"name":8669,"slug":8670,"type":15},{"name":8672,"slug":8673,"type":15},{"name":8700,"slug":8701,"type":15},"SaaS","saas",{"name":8703,"slug":8704,"type":15},"UI Components","ui-components","2026-06-16T09:45:58.956063",{"slug":8707,"name":8707,"fn":8708,"description":8709,"org":8710,"tags":8711,"stars":8721,"repoUrl":8722,"updatedAt":8723},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8712,8715,8716,8717,8720],{"name":8713,"slug":8714,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":8718,"slug":8719,"type":15},"MCP","mcp",{"name":3096,"slug":3093,"type":15},2112,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fskills","2026-04-06T18:07:36.660888",{"items":8725,"total":577},[8726,8733,8740,8747],{"slug":4,"name":4,"fn":5,"description":6,"org":8727,"tags":8728,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8729,8730,8731,8732],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"name":21,"slug":22,"type":15},{"slug":8663,"name":8663,"fn":8664,"description":8665,"org":8734,"tags":8735,"stars":23,"repoUrl":24,"updatedAt":8677},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8736,8737,8738,8739],{"name":8669,"slug":8670,"type":15},{"name":8672,"slug":8673,"type":15},{"name":8675,"slug":4195,"type":15},{"name":21,"slug":22,"type":15},{"slug":8679,"name":8679,"fn":8680,"description":8681,"org":8741,"tags":8742,"stars":23,"repoUrl":24,"updatedAt":8690},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8743,8744,8745,8746],{"name":8672,"slug":8673,"type":15},{"name":8675,"slug":4195,"type":15},{"name":8687,"slug":8688,"type":15},{"name":21,"slug":22,"type":15},{"slug":8692,"name":8692,"fn":8693,"description":8694,"org":8748,"tags":8749,"stars":23,"repoUrl":24,"updatedAt":8705},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[8750,8751,8752,8753],{"name":8669,"slug":8670,"type":15},{"name":8672,"slug":8673,"type":15},{"name":8700,"slug":8701,"type":15},{"name":8703,"slug":8704,"type":15}]