isorite 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/embed-worker.js +9 -4
  3. package/dist/main.js +4205 -3670
  4. package/docs/setup-for-agents.md +25 -1
  5. package/docs/setup.md +23 -1
  6. package/docs/terminal.md +7 -3
  7. package/package.json +1 -1
  8. package/web/_app/immutable/chunks/{BN1DRYj2.js → 8IM6BNk6.js} +1 -1
  9. package/web/_app/immutable/chunks/{BNCmWi9e.js → BHPhFydX.js} +1 -1
  10. package/web/_app/immutable/chunks/{BqrPWk6N.js → CFA70_0c.js} +1 -1
  11. package/web/_app/immutable/chunks/CGgq5NWd.js +1 -0
  12. package/web/_app/immutable/chunks/{BcrJkegU.js → CHlFgDNB.js} +1 -1
  13. package/web/_app/immutable/chunks/CMp5T_-1.js +1 -0
  14. package/web/_app/immutable/chunks/{-XH9wLvF.js → D89YN-Dr.js} +1 -1
  15. package/web/_app/immutable/chunks/DF3lgcLW.js +1 -0
  16. package/web/_app/immutable/chunks/DGVcYHaJ.js +43 -0
  17. package/web/_app/immutable/chunks/{Cr4-_2Vw.js → DmgpLvxp.js} +1 -1
  18. package/web/_app/immutable/chunks/{D8jeeZa0.js → DrsVvzvg.js} +1 -1
  19. package/web/_app/immutable/entry/{app.B9MdwZzs.js → app.hlk6OrE8.js} +2 -2
  20. package/web/_app/immutable/entry/start.BE1F0HZV.js +1 -0
  21. package/web/_app/immutable/nodes/0.DMGdYhkH.js +15 -0
  22. package/web/_app/immutable/nodes/{1.hmQ_l8t-.js → 1.Dn_0fgt7.js} +1 -1
  23. package/web/_app/immutable/nodes/2.Y1Dd5PBI.js +1 -0
  24. package/web/_app/immutable/nodes/3.BlxuRbLf.js +1 -0
  25. package/web/_app/immutable/nodes/{4.QUhLgH4i.js → 4.Bt_H0MbN.js} +1 -1
  26. package/web/_app/immutable/nodes/{5.D3JSWVyR.js → 5.BJ-EVWbz.js} +1 -1
  27. package/web/_app/immutable/nodes/6.DDIiJnwi.js +1 -0
  28. package/web/_app/version.json +1 -1
  29. package/web/index.html +15 -15
  30. package/web/_app/immutable/chunks/BZeALCyJ.js +0 -1
  31. package/web/_app/immutable/chunks/BavLcJN1.js +0 -1
  32. package/web/_app/immutable/chunks/D25FgEb3.js +0 -43
  33. package/web/_app/immutable/chunks/DsnHcTIO.js +0 -1
  34. package/web/_app/immutable/entry/start.gtQcHKDR.js +0 -1
  35. package/web/_app/immutable/nodes/0.DSajjyn5.js +0 -15
  36. package/web/_app/immutable/nodes/2.Bu6Zvx8F.js +0 -1
  37. package/web/_app/immutable/nodes/3.DcSG1nNk.js +0 -1
  38. package/web/_app/immutable/nodes/6.CWfUNDww.js +0 -1
@@ -14,12 +14,13 @@ turn off certificate checking (`NODE_TLS_REJECT_UNAUTHORIZED=0`).
14
14
 
15
15
  | Command | What it does |
16
16
  |---|---|
17
+ | `isorite new <folder>` | Makes the folder (and its parents), empty but for `.isorite/`. Refuses one with files in it already: that is opened as it is. |
17
18
  | `isorite doctor [<notes>] [--report] [--offline]` | Checks the setup a step at a time (below). Exit 1 if anything failed. `--offline`: asks the provider nothing. |
18
19
  | `isorite serve <notes> [--port <n>]` | The browser app at `http://localhost:4767/`, on 127.0.0.1 only. |
19
20
  | `isorite term [<notes>] [--port <n>]` | OpenCode 2 in this terminal, in the current folder (the code), with the notes beside it. Starts the isorite server if none answers on the port, and stops it on exit. |
20
21
  | `isorite check <notes>` | Lints the notes: frontmatter, links, cycles. |
21
22
  | `isorite --tutorial` | A tour on an example base with a scripted model: no key or network needed. Good to check the install alone. |
22
- | `isorite model [--from <folder>]` | Optional: fetches the model for search by meaning (53 MB). |
23
+ | `isorite model [--from <folder>]` | Optional: the model for search by meaning. Says which is installed and where, else fetches it (53 MB) from npm, a GitHub release, then Hugging Face, saying why each failed. `--from`: granite's files, or any compatible model (below). |
23
24
  | `isorite help setup` | Prints this. |
24
25
 
25
26
  ## Files
@@ -30,6 +31,8 @@ turn off certificate checking (`NODE_TLS_REJECT_UNAUTHORIZED=0`).
30
31
  | `~/.config/isorite/opencode/` | OpenCode's settings as isorite writes them at each `isorite term` start (`opencode.json`, theme, plugin link). Rewritten; don't edit. |
31
32
  | `~/.config/isorite/opencode/local.json` | The person's own OpenCode settings, laid over isorite's. Never rewritten. |
32
33
  | `<notes>/.isorite/` | isorite's own folder in the notes: journals of every change, `settings.toml` (`repository = "<path>"`, where code links point). Made on first open; commit it with the notes. |
34
+ | `~/.local/share/isorite/models/` (or `$XDG_DATA_HOME/isorite/models/`) | The models for search by meaning, a folder each: `granite-embedding-small-english-r2/`, and any other installed with `--from`. `use` names the one used, if not granite. |
35
+ | `~/.cache/isorite/vectors-<hash>.json` | Each base's vectors, made by the model; made again when the model changes. |
33
36
  | `$TMPDIR/isorite-term-<port>.log` | The isorite server's output, when `isorite term` started it. Look here when "the isorite server did not start". |
34
37
  | `$TMPDIR/isorite-opencode-<port>.log` | OpenCode's server's output, under `isorite term`. |
35
38
 
@@ -44,6 +47,7 @@ url = "https://…/v1" # OpenAI-compatible; /chat/completions a
44
47
  key = "…" # the key; also settable in the browser (behind the logo)
45
48
  key_header = "api-key" # send the key in this header, as it is, instead of Authorization: Bearer
46
49
  stream_usage = false # don't send stream_options (some gateways answer 400 to it)
50
+ max_tokens = 16000 # the least output budget any call gets, for models that think at length
47
51
  cache_marks = true # send Anthropic cache marks (OpenRouter-style gateways only)
48
52
  pfx = "~/certs/me.pfx" # client certificate (mTLS), PKCS#12; or cert + cert_key (PEM)
49
53
  pfx_passphrase = "$PFX_PASS" # "$NAME": read from that environment variable
@@ -82,6 +86,8 @@ Rules:
82
86
  | `ISORITE_NODE_DEFAULTS=0` | Leave Node as it is: no system authorities, no proxy unless Node is told. |
83
87
  | `NODE_EXTRA_CA_CERTS` | A .pem of extra authorities, read by Node at start. |
84
88
  | `ISORITE_GATEWAY_URL`, `ISORITE_GATEWAY_MODELS`, `ISORITE_GATEWAY_KEY` | The terminal only: OpenCode asks this OpenAI-compatible address directly, with these models (comma-separated) and key, instead of `config.toml`'s provider. No certificate or headers apply. |
89
+ | `ISORITE_EMBED_DIR` | The model for search by meaning is in this folder (and nowhere else is looked). |
90
+ | `ISORITE_EMBED=off` | No search by meaning, whatever is installed. |
85
91
  | `ISORITE_OPENCODE` | The OpenCode 2 binary to run. Otherwise `opencode2`, then `opencode`, must be version 2. |
86
92
  | `XDG_CONFIG_HOME` | Where `isorite/config.toml` is looked for. |
87
93
  | `SSH_CONNECTION` | Set over SSH: `term`, `serve` and `doctor` print the `ssh -L` command for the browser. |
@@ -96,6 +102,12 @@ Rules:
96
102
  server's relay, and with the server's token as its key. The relay adds the real key, certificate, headers and
97
103
  query, and passes `/chat/completions` and `/models` on. So whatever works for Iso works for the terminal. The
98
104
  relay answers only on 127.0.0.1, and only that token.
105
+ - **Retries.** A 502, 503 or 504, a dropped connection or a timeout is asked again up to 3 times (after about 1, 2
106
+ and 4 s), and a 429 once (after its `Retry-After`, if 10 s or less), but only before any of the reply has come.
107
+ The relay does the same before it passes anything to OpenCode (which retries on its own as well). 4xx answers
108
+ and names not found are the settings', and are not asked again.
109
+ - **An empty reply.** A reply cut off at its length limit with nothing written (a reasoning model that spent the
110
+ budget thinking) is asked once more with three times the room.
99
111
  - With no key and no certificate in `config.toml`, and no `ISORITE_GATEWAY_*`, OpenCode uses its own models.
100
112
  `isorite term` prints which models it uses, and from where.
101
113
 
@@ -131,6 +143,10 @@ Rules:
131
143
  | `ETIMEDOUT`, `UND_ERR_CONNECT_TIMEOUT` | No answer: often a proxy is needed. | Set `HTTPS_PROXY` (and `NO_PROXY` for internal hosts reached directly). |
132
144
  | `said 401` / `said 403` | The key, or where it's sent, isn't accepted. | Check the key, `key_header`, and any header the gateway wants. The gateway's own message usually names it. |
133
145
  | `said 404 … no model called X, which is OpenRouter's name for it` | No `[tiers]`. | Name the gateway's models under `[tiers]`. `doctor` lists the models `/models` offers. |
146
+ | `… is unavailable (503 …), tried 4 times over N s: it is likely …, not your settings` | The gateway, or the model behind it, is down. | Wait, and send it again (↻ under the turn). If it lasts, the gateway's status page or owner. |
147
+ | `… used its whole output budget (N tokens) thinking, and wrote nothing` | A reasoning model ran out of room before it wrote. | A lower tier, or `max_tokens` under `[provider]`. |
148
+ | `! search by meaning: no model …` | Not installed (optional). | `isorite model`. Its failures name each source; offline, `isorite model --from <folder>` with a copy. |
149
+ | `The model could not be fetched:` and a line for npm, GitHub, Hugging Face | None reachable from here. | Copy the model's folder from a machine that has it (`isorite model` there says where), then `isorite model --from <folder>`; or any compatible model. |
134
150
  | `said 400: … stream_options` | The gateway refuses `stream_options`. | `stream_usage = false`. |
135
151
  | `✗ tools: … answered without calling the tool` | The model or gateway drops tools. | Choose a model that supports tool calls. Iso and the terminal need them. |
136
152
  | `isorite term needs OpenCode 2` | OpenCode 1, or none. | `npm i -g @opencode/cli`, or `ISORITE_OPENCODE=…`. |
@@ -138,5 +154,13 @@ Rules:
138
154
  | The link doesn't open, over SSH | `localhost` is the remote machine. | `ssh -L 4767:localhost:4767 <host>` from the person's own machine. |
139
155
  | The terminal works but uses an unexpected model | Check the line `isorite term` prints: `config.toml`, `ISORITE_GATEWAY_URL`, or OpenCode's own (no key or certificate). | Fix what it names. |
140
156
 
157
+ ## Another model for search by meaning
158
+
159
+ Any ONNX model that gives 384 numbers for a text, with its `tokenizer.json`, can stand in for granite:
160
+ `isorite model --from <folder>`. It's checked by use (loaded, and asked for one vector), copied into the models
161
+ folder, and used from then on; each base's vectors are made again with it. An optional `isorite-model.json` beside
162
+ its files gives `{"name": "…", "pooling": "cls" | "mean"}`: `cls` (the default) takes the first token's state, as
163
+ granite is used; `mean` averages them all, as sentence-transformers models such as all-MiniLM-L6-v2 are used.
164
+
141
165
  If the gateway isn't OpenAI-compatible (Bedrock's or Vertex's own APIs, for example), isorite can't use it directly.
142
166
  An OpenAI-compatible proxy in front of it, such as LiteLLM, can.
package/docs/setup.md CHANGED
@@ -45,6 +45,7 @@ url = "https://llm-gateway.corp.example/v1"
45
45
  key = "…"
46
46
  key_header = "api-key" # the header the key goes in, as it is, instead of Authorization: Bearer
47
47
  stream_usage = false # for a gateway that refuses stream_options; the gauge then counts nothing
48
+ max_tokens = 16000 # the least room a reply is given, for models that think at length
48
49
 
49
50
  # A client certificate (mTLS), for a gateway that asks for one: a .pfx (or .p12) ...
50
51
  pfx = "~/certs/me.pfx"
@@ -77,12 +78,16 @@ If the company's authority isn't installed on the machine, name its certificate
77
78
 
78
79
  ## 3. Your notes
79
80
 
80
- A folder of Markdown files; empty is fine.
81
+ A folder of Markdown files. To start from nothing:
81
82
 
82
83
  ```sh
84
+ isorite new ~/notes/my-project
83
85
  isorite serve ~/notes/my-project
84
86
  ```
85
87
 
88
+ `isorite new` makes the folder, empty but for isorite's own `.isorite/`. A folder of notes you have already is
89
+ opened as it is, with `isorite serve`.
90
+
86
91
  It prints a link to click: `http://localhost:4767/`. isorite keeps what it needs in the folder's `.isorite/`.
87
92
 
88
93
  ## 4. The terminal
@@ -95,8 +100,25 @@ isorite term ~/notes/my-project
95
100
  It prints the same link, and which models the terminal uses. OpenCode uses the provider above, through isorite. More
96
101
  is in [terminal.md](terminal.md).
97
102
 
103
+ ## Search by meaning (optional)
104
+
105
+ ```sh
106
+ isorite model
107
+ ```
108
+
109
+ It says which model is installed and where, or fetches it (53 MB, once): from npm, else from a release on GitHub,
110
+ else from Hugging Face. Without it, Iso searches by words and follows links. Where none of those can be reached,
111
+ copy the model's folder from a machine that has it (`isorite model` there says where it is) and run
112
+ `isorite model --from <folder>`. Any compatible model works the same way: an ONNX model that gives 384 numbers,
113
+ with its `tokenizer.json` (for example all-MiniLM-L6-v2, with `{"pooling": "mean"}` in an `isorite-model.json`
114
+ beside it).
115
+
98
116
  ## When something fails
99
117
 
118
+ If a gateway is down for a moment (it answers 502, 503 or 504, or drops the connection), Iso and the terminal ask
119
+ it again, up to three times. When it stays down, Iso says it's likely the gateway, not your settings, and the ↻
120
+ under the turn sends it again.
121
+
100
122
  ```sh
101
123
  isorite doctor ~/notes/my-project
102
124
  ```
package/docs/terminal.md CHANGED
@@ -17,7 +17,8 @@ Setting isorite up the first time, or at work behind a company's gateway, is in
17
17
 
18
18
  ## Your notes for the project
19
19
 
20
- Keep the project's notes in a folder of their own, for example `~/notes/<project>`. It can start empty. isorite
20
+ Keep the project's notes in a folder of their own, for example `~/notes/<project>`. It can start empty:
21
+ `isorite new ~/notes/<project>` makes it. isorite
21
22
  keeps what it needs in the folder's `.isorite/` (the journals of every change, and its settings), made the first
22
23
  time the folder is opened. Commit `.isorite/` with the notes, if they're in git.
23
24
 
@@ -104,8 +105,11 @@ gateway, or a model served on your own machine). What it fetches, it fetches onc
104
105
 
105
106
  - isorite and OpenCode, from npm: through your company's npm mirror, if it has one.
106
107
  - The model for search by meaning (optional): `isorite model` gets it from npm too (`isorite-model-granite`), so the
107
- same mirror serves it; else from Hugging Face. On a machine with neither, copy its files from one that has them:
108
- `isorite model --from <folder>`. Every file is checked against its SHA-256.
108
+ same mirror serves it; else from its release on GitHub, else from Hugging Face. On a machine with none of them,
109
+ copy its folder from one that has it (`isorite model` there says where), or download the package from
110
+ `https://github.com/lachlanjs/isorite/releases/tag/model-granite-1.0.0` and unpack it, then
111
+ `isorite model --from <folder>`. Granite's files are checked against their SHA-256; any other compatible model is
112
+ checked by use ([setup-for-agents.md](setup-for-agents.md) says which).
109
113
 
110
114
  ## Who can reach it
111
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isorite",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "An agentic harness for understanding: your notes as a knowledge base, an Atlas of them, an agent that reads them, and study.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- import{F as e,X as t,Y as n,Z as r,dt as i,ft as a,pt as o}from"./Bze-M_kr.js";import{t as s}from"./BavLcJN1.js";import{i as c}from"./BcrJkegU.js";var l=Symbol.for(`yaml.alias`),u=Symbol.for(`yaml.document`),d=Symbol.for(`yaml.map`),f=Symbol.for(`yaml.pair`),p=Symbol.for(`yaml.scalar`),m=Symbol.for(`yaml.seq`),h=Symbol.for(`yaml.node.type`),g=e=>!!e&&typeof e==`object`&&e[h]===l,_=e=>!!e&&typeof e==`object`&&e[h]===u,v=e=>!!e&&typeof e==`object`&&e[h]===d,y=e=>!!e&&typeof e==`object`&&e[h]===f,b=e=>!!e&&typeof e==`object`&&e[h]===p,ee=e=>!!e&&typeof e==`object`&&e[h]===m;function x(e){if(e&&typeof e==`object`)switch(e[h]){case d:case m:return!0}return!1}function S(e){if(e&&typeof e==`object`)switch(e[h]){case l:case d:case p:case m:return!0}return!1}var te=e=>(b(e)||x(e))&&!!e.anchor,C=Symbol(`break visit`),w=Symbol(`skip children`),ne=Symbol(`remove node`);function re(e,t){let n=ae(t);_(e)?ie(null,e.contents,n,Object.freeze([e]))===ne&&(e.contents=null):ie(null,e,n,Object.freeze([]))}re.BREAK=C,re.SKIP=w,re.REMOVE=ne;function ie(e,t,n,r){let i=oe(e,t,n,r);if(S(i)||y(i))return se(e,r,i),ie(e,i,n,r);if(typeof i!=`symbol`){if(x(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ie(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===C)return C;else i===ne&&(t.items.splice(e,1),--e)}}else if(y(t)){r=Object.freeze(r.concat(t));let e=ie(`key`,t.key,n,r);if(e===C)return C;e===ne&&(t.key=null);let i=ie(`value`,t.value,n,r);if(i===C)return C;i===ne&&(t.value=null)}}return i}function ae(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function oe(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(v(t))return n.Map?.(e,t,r);if(ee(t))return n.Seq?.(e,t,r);if(y(t))return n.Pair?.(e,t,r);if(b(t))return n.Scalar?.(e,t,r);if(g(t))return n.Alias?.(e,t,r)}function se(e,t,n){let r=t[t.length-1];if(x(r))r.items[e]=n;else if(y(r))e===`key`?r.key=n:r.value=n;else if(_(r))r.contents=n;else{let e=g(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ce={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},le=e=>e.replace(/[!,[\]{}]/g,e=>ce[e]),ue=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+le(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&S(e.contents)){let t={};re(e.contents,(e,n)=>{S(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
1
+ import{F as e,X as t,Y as n,Z as r,dt as i,ft as a,pt as o}from"./Bze-M_kr.js";import{t as s}from"./DF3lgcLW.js";import{i as c}from"./CHlFgDNB.js";var l=Symbol.for(`yaml.alias`),u=Symbol.for(`yaml.document`),d=Symbol.for(`yaml.map`),f=Symbol.for(`yaml.pair`),p=Symbol.for(`yaml.scalar`),m=Symbol.for(`yaml.seq`),h=Symbol.for(`yaml.node.type`),g=e=>!!e&&typeof e==`object`&&e[h]===l,_=e=>!!e&&typeof e==`object`&&e[h]===u,v=e=>!!e&&typeof e==`object`&&e[h]===d,y=e=>!!e&&typeof e==`object`&&e[h]===f,b=e=>!!e&&typeof e==`object`&&e[h]===p,ee=e=>!!e&&typeof e==`object`&&e[h]===m;function x(e){if(e&&typeof e==`object`)switch(e[h]){case d:case m:return!0}return!1}function S(e){if(e&&typeof e==`object`)switch(e[h]){case l:case d:case p:case m:return!0}return!1}var te=e=>(b(e)||x(e))&&!!e.anchor,C=Symbol(`break visit`),w=Symbol(`skip children`),ne=Symbol(`remove node`);function re(e,t){let n=ae(t);_(e)?ie(null,e.contents,n,Object.freeze([e]))===ne&&(e.contents=null):ie(null,e,n,Object.freeze([]))}re.BREAK=C,re.SKIP=w,re.REMOVE=ne;function ie(e,t,n,r){let i=oe(e,t,n,r);if(S(i)||y(i))return se(e,r,i),ie(e,i,n,r);if(typeof i!=`symbol`){if(x(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ie(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===C)return C;else i===ne&&(t.items.splice(e,1),--e)}}else if(y(t)){r=Object.freeze(r.concat(t));let e=ie(`key`,t.key,n,r);if(e===C)return C;e===ne&&(t.key=null);let i=ie(`value`,t.value,n,r);if(i===C)return C;i===ne&&(t.value=null)}}return i}function ae(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function oe(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(v(t))return n.Map?.(e,t,r);if(ee(t))return n.Seq?.(e,t,r);if(y(t))return n.Pair?.(e,t,r);if(b(t))return n.Scalar?.(e,t,r);if(g(t))return n.Alias?.(e,t,r)}function se(e,t,n){let r=t[t.length-1];if(x(r))r.items[e]=n;else if(y(r))e===`key`?r.key=n:r.value=n;else if(_(r))r.contents=n;else{let e=g(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ce={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},le=e=>e.replace(/[!,[\]{}]/g,e=>ce[e]),ue=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+le(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&S(e.contents)){let t={};re(e.contents,(e,n)=>{S(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
2
2
  `)}};ue.defaultYaml={explicit:!1,version:`1.2`},ue.defaultTags={"!!":`tag:yaml.org,2002:`};function de(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function fe(e){let t=new Set;return re(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function pe(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function me(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=fe(e);let a=pe(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(b(t.node)||x(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function he(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=he(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=he(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=he(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=he(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ge(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ge(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!te(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var _e=class{constructor(e){Object.defineProperty(this,h,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!_(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=ge(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?he(i,{"":o},``,o):o}},ve=class extends _e{constructor(e){super(l),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],re(e,{Node:(e,t)=>{(g(t)||te(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(ge(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ye(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(de(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function ye(e,t,n){if(g(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(x(t)){let r=0;for(let i of t.items){let t=ye(e,i,n);t>r&&(r=t)}return r}if(y(t)){let r=ye(e,t.key,n),i=ye(e,t.value,n);return Math.max(r,i)}return 1}var be=e=>!e||typeof e!=`function`&&typeof e!=`object`,T=class extends _e{constructor(e){super(p),this.value=e}toJSON(e,t){return t?.keep?this.value:ge(this.value,e,t)}toString(){return String(this.value)}};T.BLOCK_FOLDED=`BLOCK_FOLDED`,T.BLOCK_LITERAL=`BLOCK_LITERAL`,T.PLAIN=`PLAIN`,T.QUOTE_DOUBLE=`QUOTE_DOUBLE`,T.QUOTE_SINGLE=`QUOTE_SINGLE`;var xe=`tag:yaml.org,2002:`;function Se(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function E(e,t,n){if(_(e)&&(e=e.contents),S(e))return e;if(y(e)){let t=n.schema[d].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ve(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=xe+t.slice(2));let l=Se(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new T(e);return c&&(c.node=t),t}l=e instanceof Map?o[d]:Symbol.iterator in Object(e)?o[m]:o[d]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new T(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ce(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return E(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var we=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Te=class extends _e{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>S(t)||y(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(we(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(x(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ce(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(x(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&b(i)?i.value:i:x(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!y(t))return!1;let n=t.value;return n==null||e&&b(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return x(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(x(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ce(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Ee=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function De(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Oe=(e,t,n)=>e.endsWith(`
3
3
  `)?De(n,t):n.includes(`
4
4
  `)?`
@@ -1 +1 @@
1
- import"./Bze-M_kr.js";import{i as e}from"./BZeALCyJ.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
1
+ import"./Bze-M_kr.js";import{i as e}from"./CMp5T_-1.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
@@ -1,4 +1,4 @@
1
- import{$ as e,B as t,D as n,E as r,F as i,G as a,J as o,K as s,L as c,M as l,N as u,O as d,R as f,S as p,T as m,V as h,X as g,Z as _,c as v,ct as y,i as b,it as x,k as S,n as ee,p as te,q as ne,rt as re,s as ie,tt as ae,u as oe,v as se,w as ce,y as le}from"./Bze-M_kr.js";import{t as ue}from"./BZeALCyJ.js";import"./xihTtKlq.js";import{a as de,n as fe,r as pe,t as C}from"./BavLcJN1.js";import{_ as me,a as he,c as ge,f as _e,i as ve,l as ye,n as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,y as Oe}from"./BN1DRYj2.js";import{i as ke}from"./BcrJkegU.js";var Ae=class{note;#e=_([]);get entries(){return i(this.#e)}set entries(e){g(this.#e,e)}#t=_(null);get prompt(){return i(this.#t)}set prompt(e){g(this.#t,e)}#n=_(null);get asking(){return i(this.#n)}set asking(e){g(this.#n,e)}#r=_(null);get failed(){return i(this.#r)}set failed(e){g(this.#r,e)}get tier(){return Se.tier}#i=_(null);get cursor(){return i(this.#i)}set cursor(e){g(this.#i,e)}#a=_(``);get busy(){return i(this.#a)}set busy(e){g(this.#a,e,!0)}#o=_(null);get editing(){return i(this.#o)}set editing(e){g(this.#o,e,!0)}stop=null;constructor(e){this.note=e}#s=e(()=>xe(this.entries));get waiting(){return i(this.#s)}set waiting(e){g(this.#s,e)}#c=e(()=>this.waiting.filter(e=>e.form===`insert`));get proposals(){return i(this.#c)}set proposals(e){g(this.#c,e)}#l=e(()=>{let e=[],t=me(this.note.text);for(let n of this.waiting)if(n.form===`rewrite`)for(let r of n.open??[]){let i=n.regions[r],a=Ce(this.note.text,i.old),o=a?this.note.text.slice(0,a.from).split(`
1
+ import{$ as e,B as t,D as n,E as r,F as i,G as a,J as o,K as s,L as c,M as l,N as u,O as d,R as f,S as p,T as m,V as h,X as g,Z as _,c as v,ct as y,i as b,it as x,k as S,n as ee,p as te,q as ne,rt as re,s as ie,tt as ae,u as oe,v as se,w as ce,y as le}from"./Bze-M_kr.js";import{t as ue}from"./CMp5T_-1.js";import"./xihTtKlq.js";import{a as de,n as fe,r as pe,t as C}from"./DF3lgcLW.js";import{_ as me,a as he,c as ge,f as _e,i as ve,l as ye,n as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,y as Oe}from"./8IM6BNk6.js";import{i as ke}from"./CHlFgDNB.js";var Ae=class{note;#e=_([]);get entries(){return i(this.#e)}set entries(e){g(this.#e,e)}#t=_(null);get prompt(){return i(this.#t)}set prompt(e){g(this.#t,e)}#n=_(null);get asking(){return i(this.#n)}set asking(e){g(this.#n,e)}#r=_(null);get failed(){return i(this.#r)}set failed(e){g(this.#r,e)}get tier(){return Se.tier}#i=_(null);get cursor(){return i(this.#i)}set cursor(e){g(this.#i,e)}#a=_(``);get busy(){return i(this.#a)}set busy(e){g(this.#a,e,!0)}#o=_(null);get editing(){return i(this.#o)}set editing(e){g(this.#o,e,!0)}stop=null;constructor(e){this.note=e}#s=e(()=>xe(this.entries));get waiting(){return i(this.#s)}set waiting(e){g(this.#s,e)}#c=e(()=>this.waiting.filter(e=>e.form===`insert`));get proposals(){return i(this.#c)}set proposals(e){g(this.#c,e)}#l=e(()=>{let e=[],t=me(this.note.text);for(let n of this.waiting)if(n.form===`rewrite`)for(let r of n.open??[]){let i=n.regions[r],a=Ce(this.note.text,i.old),o=a?this.note.text.slice(0,a.from).split(`
2
2
  `).length-1:-1,s=t.find(e=>e.from<=o&&o<e.to);e.push({key:`r:${n.id}:${r}`,proposal:n,k:r,at:a,block:/\n/.test(i.old.text.trim())||/\n/.test(i.new.trim()),code:!!(s&&/^\s*(```|~~~)/.test(s.text))})}return e.sort((e,t)=>(e.at?.from??1/0)-(t.at?.from??1/0))});get changes(){return i(this.#l)}set changes(e){g(this.#l,e)}#u=e(()=>{try{let e=Oe(this.note.text)[0];return{lines:e.split(`
3
3
  `).length-1,chars:e.length}}catch{return{lines:0,chars:0}}});get head(){return i(this.#u)}set head(e){g(this.#u,e)}get foot(){return this.note.text.split(`
4
4
  `).length}spans(e){return e.flatMap(e=>{let t=Ce(this.note.text,e);return t?[t]:[]})}placed(e){return Te(this.note.text,e)!==null}#d=e(()=>{let e=[];for(let t of this.proposals){let n=Te(this.note.text,t);e.push({key:`p:${t.id}`,line:n?.form===`insert`?n.line:this.foot})}this.changes.some(e=>!e.at)&&e.push({key:`lost`,line:this.foot}),this.asking&&e.push({key:`asking`,line:this.asking.line}),this.failed&&e.push({key:`failed`,line:this.failed.line}),this.prompt&&e.push({key:`prompt`,line:this.prompt.line});let t=this.changes.filter(e=>e.at);for(let n of t)n.block&&e.push({key:n.key,line:this.note.text.slice(0,n.at.to).split(`
@@ -0,0 +1 @@
1
+ import{F as e,X as t,Z as n}from"./Bze-M_kr.js";import{t as r}from"./DF3lgcLW.js";import{i,r as a}from"./8IM6BNk6.js";import{i as o}from"./CHlFgDNB.js";var s=new class{#e=n(``);get id(){return e(this.#e)}set id(e){t(this.#e,e,!0)}#t=n([]);get turns(){return e(this.#t)}set turns(e){t(this.#t,e)}#n=n(``);get streaming(){return e(this.#n)}set streaming(e){t(this.#n,e,!0)}#r=n(null);get retrying(){return e(this.#r)}set retrying(e){t(this.#r,e)}#i=n(``);get problem(){return e(this.#i)}set problem(e){t(this.#i,e,!0)}#a=n(null);get report(){return e(this.#a)}set report(e){t(this.#a,e)}#o=n(`chat`);get view(){return e(this.#o)}set view(e){t(this.#o,e,!0)}#s=n([]);get off(){return e(this.#s)}set off(e){t(this.#s,e)}toggleTurn(e){this.off=this.off.includes(e)?this.off.filter(t=>t!==e):[...this.off,e],this.measure()}sizeOf(e){let t=this.report?.given?.find(t=>t.kind===e.kind&&t.id===e.id&&(e.kind!==`passage`||t.text===e.text));return t?t.tokens:null}started=!1;timer;get running(){let e=this.turns.at(-1);return e?.state===`running`?e:null}start(){!this.started&&r.api&&(this.started=!0,r.api.conversation().then(e=>{e&&!this.id&&this.show(e)},()=>void 0),r.on(e=>this.follow(e)),this.measure())}async again(e){if(this.problem=``,this.running||e.state!==`failed`)return!1;this.off=this.off.includes(e.id)?this.off:[...this.off,e.id];try{let{conversation:t}=await r.api.converse({conversation:e.conversation,mode:e.mode,asked:e.asked,given:e.given,tier:e.tier,off:this.off});return this.id=t,!0}catch(e){return this.problem=e.message,!1}}show(e){this.id=e.id,this.turns=e.turns}fresh(){this.running||(this.id=``,this.turns=[],this.streaming=``,this.off=[],this.measure())}async send(e){if(this.problem=``,!e.trim()||this.running)return!1;try{let t=i.sent.map(e=>e.kind===`passage`?{kind:e.kind,id:e.id,text:e.text}:{kind:e.kind,id:e.id}),{conversation:n}=await r.api.converse({...this.id?{conversation:this.id}:{},mode:o.mode,asked:e.trim(),given:t,tier:a.tier,...this.off.length?{off:this.off}:{}});return this.id=n,!0}catch(e){return this.problem=e.message,!1}}async stop(){let e=this.running;e&&await r.api.stop(e.id)}async undo(e){this.problem=``;try{await r.api.undoTurn(this.id,e)}catch(e){this.problem=e.message}}async take(e,t){this.problem=``;try{await r.api.takeItem(this.id,e,t)}catch(e){this.problem=e.message}}async answer(e,t){let n=this.running;n&&await r.api.answer(n.id,e,t)}follow(e){if(e.type===`iso-start`&&e.place.form===`turn`){if(this.id&&e.place.conversation!==this.id)return;this.id=e.place.conversation,this.streaming=``,this.turns=[...this.turns.filter(t=>t.id!==e.request),{id:e.request,conversation:e.place.conversation,at:new Date().toISOString(),mode:e.place.mode,asked:e.asked,given:e.place.given,tier:e.tier,items:[],state:`running`}];return}if(!(`request`in e)){(e.type===`note-changed`||e.type===`journal`)&&this.measure();return}let t=this.turns.findIndex(t=>t.id===e.request);if(t<0)return;let n=this.turns[t],r=e=>{this.turns=this.turns.map((n,r)=>r===t?e:n)};e.type===`iso-retry`?this.retrying={retry:e.retry,of:e.of}:(this.retrying=null,e.type===`iso-text`?this.streaming=e.again?e.delta:this.streaming+e.delta:e.type===`iso-item`?(e.item.kind===`text`&&(this.streaming=``),r({...n,items:[...n.items,e.item]})):e.type===`iso-taken`?r({...n,items:n.items.map(t=>t.kind===`question`&&t.id===e.item?{...t,made:e.note}:t.kind===`offer`&&t.id===e.item?{...t,taken:!0}:t)}):e.type===`iso-answer`?r({...n,items:n.items.map(t=>t.kind===`permission`&&t.id===e.permission?{...t,answer:e.decision}:t)}):e.type===`iso-done`?(r({...n,state:`done`,cost:e.cost}),this.streaming=``,this.measure()):e.type===`iso-stopped`?(r({...n,state:`stopped`,...this.streaming?{items:[...n.items,{kind:`text`,text:this.streaming}]}:{}}),this.streaming=``):e.type===`iso-failed`&&(r({...n,state:`failed`,message:e.message}),this.streaming=``))}measure(){clearTimeout(this.timer),this.timer=setTimeout(()=>{if(!r.api)return;let e=i.sent.map(e=>e.kind===`passage`?{kind:e.kind,id:e.id,text:e.text}:{kind:e.kind,id:e.id});r.api.turnContext({...this.id?{conversation:this.id}:{},mode:o.mode,given:e,tier:a.tier,...this.off.length?{off:this.off}:{}}).then(e=>this.report=e,()=>void 0)},250)}};export{s as t};
@@ -1 +1 @@
1
- import{F as e,X as t,Y as n,Z as r}from"./Bze-M_kr.js";import{o as i,t as a}from"./BZeALCyJ.js";import{r as o}from"./BavLcJN1.js";var s=(e,t)=>{try{return localStorage.getItem(e)??t}catch{return t}},c=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},l=(e,t)=>{try{return{...t,...JSON.parse(s(e,`{}`))}}catch{return t}},u=[`note`,`atlas`,`iso`],d=[`cols`,`stack`,`one`],f={note:[`provenance`,`timeline`],atlas:[`questions`,`problems`,`web`,`code`,`context`],iso:[`notes`,`files`,`run`]},p={provenance:!1,timeline:!1,questions:!0,problems:!0,web:!1,code:!1,context:!1,notes:!1,files:!1,run:!1},m={note:1.25,atlas:1,iso:1.05},h={min:.4,max:3},g=new class{#e=r(n(d.includes(s(`isorite.layout`,``))?s(`isorite.layout`,``):`cols`));get layout(){return e(this.#e)}set layout(e){t(this.#e,e,!0)}#t=r(n(l(`isorite.show`,{note:!0,atlas:!0,iso:!0})));get show(){return e(this.#t)}set show(e){t(this.#t,e,!0)}#n=r(n(l(`isorite.widths`,m)));get widths(){return e(this.#n)}set widths(e){t(this.#n,e,!0)}#r=r(n(l(`isorite.switches`,p)));get on(){return e(this.#r)}set on(e){t(this.#r,e,!0)}#i=r(s(`isorite.understanding`,``)===`1`);get understanding(){return e(this.#i)}set understanding(e){t(this.#i,e,!0)}#a=r(`note`);get focus(){return e(this.#a)}set focus(e){t(this.#a,e,!0)}#o=r(!1);get narrow(){return e(this.#o)}set narrow(e){t(this.#o,e,!0)}#s=r(0);get unseen(){return e(this.#s)}set unseen(e){t(this.#s,e,!0)}#c=r(!1);get tree(){return e(this.#c)}set tree(e){t(this.#c,e,!0)}#l=r(``);get fresh(){return e(this.#l)}set fresh(e){t(this.#l,e,!0)}#u=r(null);get settings(){return e(this.#u)}set settings(e){t(this.#u,e,!0)}#d=r(n(s(`isorite.last`,``)));get last(){return e(this.#d)}set last(e){t(this.#d,e,!0)}get standing(){if(this.narrow)return[...u];let e=u.filter(e=>this.show[e]);return this.layout===`one`?[e.includes(this.focus)?this.focus:e[0]??`note`]:e}layoutChanges=0;setLayout(e){e!==this.layout&&this.layoutChanges++,this.layout=e,c(`isorite.layout`,e)}nextLayout(){this.setLayout(d[(d.indexOf(this.layout)+1)%d.length])}toggle(e){this.show[e]&&u.filter(e=>this.show[e]).length===1||(this.show[e]=!this.show[e],c(`isorite.show`,JSON.stringify(this.show)),!this.show[e]&&this.focus===e&&(this.focus=u.find(e=>this.show[e])))}setWidth(e,t){this.widths[e]=Math.min(h.max,Math.max(h.min,t)),c(`isorite.widths`,JSON.stringify(this.widths))}to(e){!this.narrow&&!this.show[e]&&this.toggle(e),this.focus=e,e===`iso`&&(this.unseen=0),this.scroll?.(e)}scroll=null;step(e){let t=this.narrow?[...u]:u.filter(e=>this.show[e]),n=t.indexOf(this.focus);this.to(t[(n+e+t.length)%t.length])}flip(e,t=!this.on[e]){this.on[e]=t,c(`isorite.switches`,JSON.stringify(this.on)),(e===`notes`||e===`files`||e===`run`)&&this.onMode?.()}showUnderstanding(e=!this.understanding){this.understanding=e,c(`isorite.understanding`,e?`1`:``),this.onMode?.()}busy(e){let t=typeof document>`u`?null:document.activeElement;return!!t&&!!t.closest(`[data-pane="${e}"]`)&&(t.matches(`input, textarea, [contenteditable=true]`)||!!t.closest(`.cm-editor`))}#f=r(!1);get terminal(){return e(this.#f)}set terminal(e){t(this.#f,e,!0)}setTerminal(e){this.terminal=e}get mode(){return this.terminal&&(this.on.files||this.on.run)?`build`:this.on.notes?`write`:`ask`}onMode=null;setLast(e){e&&!e.startsWith(`@`)&&(this.last=e,c(`isorite.last`,e))}async open(e,t=this.narrow){await a(o(e)),t&&this.to(`note`)}async home(){await a(i(`/notes`))}};export{g as i,u as n,f as r,d as t};
1
+ import{F as e,X as t,Y as n,Z as r}from"./Bze-M_kr.js";import{o as i,t as a}from"./CMp5T_-1.js";import{r as o}from"./DF3lgcLW.js";var s=(e,t)=>{try{return localStorage.getItem(e)??t}catch{return t}},c=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},l=(e,t)=>{try{return{...t,...JSON.parse(s(e,`{}`))}}catch{return t}},u=[`note`,`atlas`,`iso`],d=[`cols`,`stack`,`one`],f={note:[`provenance`,`timeline`],atlas:[`questions`,`problems`,`web`,`code`,`context`],iso:[`notes`,`files`,`run`]},p={provenance:!1,timeline:!1,questions:!0,problems:!0,web:!1,code:!1,context:!1,notes:!1,files:!1,run:!1},m={note:1.25,atlas:1,iso:1.05},h={min:.4,max:3},g=new class{#e=r(n(d.includes(s(`isorite.layout`,``))?s(`isorite.layout`,``):`cols`));get layout(){return e(this.#e)}set layout(e){t(this.#e,e,!0)}#t=r(n(l(`isorite.show`,{note:!0,atlas:!0,iso:!0})));get show(){return e(this.#t)}set show(e){t(this.#t,e,!0)}#n=r(n(l(`isorite.widths`,m)));get widths(){return e(this.#n)}set widths(e){t(this.#n,e,!0)}#r=r(n(l(`isorite.switches`,p)));get on(){return e(this.#r)}set on(e){t(this.#r,e,!0)}#i=r(s(`isorite.understanding`,``)===`1`);get understanding(){return e(this.#i)}set understanding(e){t(this.#i,e,!0)}#a=r(`note`);get focus(){return e(this.#a)}set focus(e){t(this.#a,e,!0)}#o=r(!1);get narrow(){return e(this.#o)}set narrow(e){t(this.#o,e,!0)}#s=r(0);get unseen(){return e(this.#s)}set unseen(e){t(this.#s,e,!0)}#c=r(!1);get tree(){return e(this.#c)}set tree(e){t(this.#c,e,!0)}#l=r(``);get fresh(){return e(this.#l)}set fresh(e){t(this.#l,e,!0)}#u=r(null);get settings(){return e(this.#u)}set settings(e){t(this.#u,e,!0)}#d=r(n(s(`isorite.last`,``)));get last(){return e(this.#d)}set last(e){t(this.#d,e,!0)}get standing(){if(this.narrow)return[...u];let e=u.filter(e=>this.show[e]);return this.layout===`one`?[e.includes(this.focus)?this.focus:e[0]??`note`]:e}layoutChanges=0;setLayout(e){e!==this.layout&&this.layoutChanges++,this.layout=e,c(`isorite.layout`,e)}nextLayout(){this.setLayout(d[(d.indexOf(this.layout)+1)%d.length])}toggle(e){this.show[e]&&u.filter(e=>this.show[e]).length===1||(this.show[e]=!this.show[e],c(`isorite.show`,JSON.stringify(this.show)),!this.show[e]&&this.focus===e&&(this.focus=u.find(e=>this.show[e])))}setWidth(e,t){this.widths[e]=Math.min(h.max,Math.max(h.min,t)),c(`isorite.widths`,JSON.stringify(this.widths))}to(e){!this.narrow&&!this.show[e]&&this.toggle(e),this.focus=e,e===`iso`&&(this.unseen=0),this.scroll?.(e)}scroll=null;step(e){let t=this.narrow?[...u]:u.filter(e=>this.show[e]),n=t.indexOf(this.focus);this.to(t[(n+e+t.length)%t.length])}flip(e,t=!this.on[e]){this.on[e]=t,c(`isorite.switches`,JSON.stringify(this.on)),(e===`notes`||e===`files`||e===`run`)&&this.onMode?.()}showUnderstanding(e=!this.understanding){this.understanding=e,c(`isorite.understanding`,e?`1`:``),this.onMode?.()}busy(e){let t=typeof document>`u`?null:document.activeElement;return!!t&&!!t.closest(`[data-pane="${e}"]`)&&(t.matches(`input, textarea, [contenteditable=true]`)||!!t.closest(`.cm-editor`))}#f=r(!1);get terminal(){return e(this.#f)}set terminal(e){t(this.#f,e,!0)}setTerminal(e){this.terminal=e}get mode(){return this.terminal&&(this.on.files||this.on.run)?`build`:this.on.notes?`write`:`ask`}onMode=null;setLast(e){e&&!e.startsWith(`@`)&&(this.last=e,c(`isorite.last`,e))}async open(e,t=this.narrow){await a(o(e)),t&&this.to(`note`)}async home(){await a(i(`/notes`))}};export{g as i,u as n,f as r,d as t};
@@ -0,0 +1 @@
1
+ import{F as e,I as t,L as n,X as r,Z as i,a,n as o,t as s}from"./Bze-M_kr.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0)}else if(s.optional&&s.chained)o++;else return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_3lddy6?.base??``,he=globalThis.__sveltekit_3lddy6?.assets??x??``,ge=`#`;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return x+ge+de(e[0],e[1])}var ve=`1792983275884`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Se=location.origin;function Ce(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...w,"":w.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||D(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Se&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Oe(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function ke(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var Ae={v:h};function je(){let{set:e,subscribe:t}=a(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),Ae.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function D(e,t,n){return e.origin!==Se||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function O(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var k,A,Le,Re=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),ze=`a:`;Re?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},A={current:null},Le={current:!1}):(k=new class{#e=i({});get data(){return e(this.#e)}set data(e){r(this.#e,e)}#t=i(null);get form(){return e(this.#t)}set form(e){r(this.#t,e)}#n=i(null);get error(){return e(this.#n)}set error(e){r(this.#n,e)}#r=i({});get params(){return e(this.#r)}set params(e){r(this.#r,e)}#i=i({id:null});get route(){return e(this.#i)}set route(e){r(this.#i,e)}#a=i({});get state(){return e(this.#a)}set state(e){r(this.#a,e)}#o=i(-1);get status(){return e(this.#o)}set status(e){r(this.#o,e)}#s=i(new URL(ze));get url(){return e(this.#s)}set url(e){r(this.#s,e)}},A=new class{#e=i(null);get current(){return e(this.#e)}set current(e){r(this.#e,e)}},Le=new class{#e=i(!1);get current(){return e(this.#e)}set current(e){r(this.#e,e)}},Ae.v=()=>Le.current=!0);function Be(e){Object.assign(k,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=s,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:ke({}),page:ke({}),navigating:a(null),updated:je()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,Qe={},$e={},z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,G=!1,K=!1,ot=!1,st=!1,ct,q,J,Y,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_3lddy6.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_3lddy6.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),q=history.state?.[S],J=history.state?.[C],q||(q=J=Date.now(),history.replaceState({...history.state,[S]:q,[C]:J},``));let r=M[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Z({type:`enter`,url:Ce(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function pt(){z.length=0,st=!1}function mt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ht(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function gt(){Ke(q),me(be,M),mt(J),me(ye,N)}async function _t(e,t,r,i){let a,o;t.invalidateAll&&H(),await Z({type:`goto`,url:Ce(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:i,accept:()=>{if(t.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(O(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(O(e,n))}t.invalidate&&t.invalidate.forEach(Rt)}}),t.invalidateAll&&n().then(n).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(O(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(O(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==V?.id){H();let t={};lt.add(t),V={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function yt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Be(e.props.page),ct=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:M[q]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}ht(J),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?ne(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return lt.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Nt(W.url):!1,p=W.route?i.id!==W.route.id:!1,m=Et(W.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await P.updated.check())return await Je(),await F(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ft(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await R.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function X(e,t){if(e&&!D(e,x,R.hash)){let n=await jt(e);if(!n)return;let r=Mt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Nt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Mt(e){return f(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Nt(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Pt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||tt.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await X(r,!1),_=e===`enter`?Wt(W,g,r,e):Pt({url:r,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let te=q,v=J;f(),G=!0,it&&_.navigation.type!==`enter`&&P.navigating.set(A.current=_.navigation);let y=g&&await Ot(g);if(!y){if(D(r,x,R.hash))return await F(r,s);y=await Ft(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,Y!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:e,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await P.updated.check())return await Je(),await F(r,s);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:q+=e,[C]:J+=e,[xe]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(q,J)}let ne=g&&V?.id===g.id?V.fork:null;V?.fork&&!ne?H():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let n=_.navigation.to;W={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(j=null,ct.$set(y.props),j&&Object.assign(y.props.page,j),Be(y.props.page),b=t?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:re}=document;if(await b,await n(),await n(),Y!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&j&&Object.assign(y.props.page,j);let ie=null;if(at){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=r.hash&&document.getElementById(qt(r)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Ut(r,!ie),at=!0,G=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),e===`popstate`&&ht(J),P.navigating.set(A.current=null)}async function Ft(e,t,n,r,i){return e.origin===Se&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await F(e,i)}var Q={element:void 0,href:void 0};function It(){let e,t;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}L.addEventListener(`mousedown`,n),L.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,L),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,x,R.hash);if(o||s)return;let c=Oe(r),l=a&&Nt(W.url)===Nt(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await X(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}}function a(){r.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,x,R.hash);if(n||i)continue;let a=Oe(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&yt(t))}}U.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Lt(e,t={}){return e=new URL(Ce(e)),e.origin===Se?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Rt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!G){let e=Wt(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||It(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=De(n,x,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Oe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l))Pt({url:r,type:`link`,event:t})?G=!0:t.preventDefault();else{if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,Ke(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(D(r,x,!1))return;let i=e.target,a=Oe(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Y={},n===q)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ot||s)){i!==k.state&&(k.state=i),e(a),M[q]=T(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),R.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[S]:++q,[C]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){W.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),St({loader:R.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await F(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Me as a,k as i,ft as n,_e as o,A as r,Lt as t};
@@ -1 +1 @@
1
- import{$ as e,B as t,D as n,F as r,G as i,J as a,M as o,N as s,P as c,S as l,T as u,X as d,Z as f,c as p,ct as m,i as h,it as g,k as _,l as v,p as y,q as b,rt as x,u as S,y as C}from"./Bze-M_kr.js";import"./xihTtKlq.js";import{t as w}from"./BavLcJN1.js";var T=_(`<li role="option"><button type="button" tabindex="-1" class="svelte-35e6rs"><span class="dir svelte-35e6rs"> </span><span class="detail svelte-35e6rs"> </span></button></li>`),E=_(`<ul class="suggest svelte-35e6rs" role="listbox" aria-label="folders"></ul>`),D=_(`<span class="field-wrap svelte-35e6rs"><input autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list"/> <!></span>`);function O(o,_){g(_,!0);let O=h(_,`value`,15,``),k=h(_,`placeholder`,3,``),A=h(_,`id`,3,`folder`),j=h(_,`quiet`,3,!1),M=f(!1),N=f(0),P=e(()=>O().trim().replace(/^\/+|\/+$/g,``).toLowerCase()),F=e=>w.listing.notes.filter(t=>t.dir===e).length,I=e(()=>{let e=w.listing.dirs.filter(e=>e.toLowerCase().includes(r(P))),t=e=>e.split(`/`).at(-1).toLowerCase().startsWith(r(P))?0:e.toLowerCase().startsWith(r(P))?1:2,n=e.sort((e,n)=>t(e)-t(n)||e.localeCompare(n)).map(e=>({dir:e,made:!1}));return r(P)&&!w.listing.dirs.some(e=>e.toLowerCase()===r(P))&&n.push({dir:O().trim().replace(/^\/+|\/+$/g,``),made:!0}),n.slice(0,8)});function L(e){O(e),d(M,!1),_.onpick?.(e)}function R(e){if(r(M)&&r(I).length){if(e.key===`ArrowDown`){d(N,(r(N)+1)%r(I).length),e.preventDefault();return}if(e.key===`ArrowUp`){d(N,(r(N)-1+r(I).length)%r(I).length),e.preventDefault();return}if((e.key===`Enter`||e.key===`Tab`)&&r(I)[r(N)]&&(e.key===`Enter`||r(P))){e.key===`Enter`&&e.preventDefault(),L(r(I)[r(N)].dir);return}if(e.key===`Escape`){d(M,!1),e.stopPropagation();return}}_.onkeydown?.(e)}var z=D(),B=i(z);v(B);let V;var H=a(B,2),U=e=>{var o=E();C(o,23,()=>r(I),e=>e.dir+e.made,(e,o,l)=>{var f=T();let p;var h=i(f),g=i(h),_=b(g,!0),v=a(g),x=b(v,!0);m(h),m(f),t(e=>{S(f,`id`,`${A()??``}-opt-${r(l)??``}`),S(f,`aria-selected`,r(l)===r(N)),p=y(f,1,`svelte-35e6rs`,null,p,{at:r(l)===r(N)}),u(_,r(o).dir),u(x,e)},[()=>r(o).made?`new folder`:`${F(r(o).dir)} ${F(r(o).dir)===1?`note`:`notes`}`]),s(`mousedown`,h,e=>e.preventDefault()),s(`click`,h,()=>L(r(o).dir)),c(`mouseenter`,h,()=>d(N,r(l),!0)),n(e,f)}),m(o),t(()=>S(o,`id`,`${A()??``}-list`)),n(e,o)};l(H,e=>{r(M)&&r(I).length&&e(U)}),m(z),t(()=>{S(B,`id`,A()),V=y(B,1,`mono svelte-35e6rs`,null,V,{field:!j(),quiet:j()}),S(B,`placeholder`,k()),S(B,`aria-label`,_.label),S(B,`aria-expanded`,r(M)&&r(I).length>0),S(B,`aria-controls`,`${A()??``}-list`),S(B,`aria-activedescendant`,r(M)&&r(I)[r(N)]?`${A()}-opt-${r(N)}`:void 0)}),c(`focus`,B,()=>{d(M,!0),d(N,0)}),s(`input`,B,()=>{d(M,!0),d(N,0)}),c(`blur`,B,()=>setTimeout(()=>d(M,!1),120)),s(`keydown`,B,R),p(B,O),n(o,z),x()}o([`input`,`keydown`,`mousedown`,`click`]);export{O as t};
1
+ import{$ as e,B as t,D as n,F as r,G as i,J as a,M as o,N as s,P as c,S as l,T as u,X as d,Z as f,c as p,ct as m,i as h,it as g,k as _,l as v,p as y,q as b,rt as x,u as S,y as C}from"./Bze-M_kr.js";import"./xihTtKlq.js";import{t as w}from"./DF3lgcLW.js";var T=_(`<li role="option"><button type="button" tabindex="-1" class="svelte-35e6rs"><span class="dir svelte-35e6rs"> </span><span class="detail svelte-35e6rs"> </span></button></li>`),E=_(`<ul class="suggest svelte-35e6rs" role="listbox" aria-label="folders"></ul>`),D=_(`<span class="field-wrap svelte-35e6rs"><input autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list"/> <!></span>`);function O(o,_){g(_,!0);let O=h(_,`value`,15,``),k=h(_,`placeholder`,3,``),A=h(_,`id`,3,`folder`),j=h(_,`quiet`,3,!1),M=f(!1),N=f(0),P=e(()=>O().trim().replace(/^\/+|\/+$/g,``).toLowerCase()),F=e=>w.listing.notes.filter(t=>t.dir===e).length,I=e(()=>{let e=w.listing.dirs.filter(e=>e.toLowerCase().includes(r(P))),t=e=>e.split(`/`).at(-1).toLowerCase().startsWith(r(P))?0:e.toLowerCase().startsWith(r(P))?1:2,n=e.sort((e,n)=>t(e)-t(n)||e.localeCompare(n)).map(e=>({dir:e,made:!1}));return r(P)&&!w.listing.dirs.some(e=>e.toLowerCase()===r(P))&&n.push({dir:O().trim().replace(/^\/+|\/+$/g,``),made:!0}),n.slice(0,8)});function L(e){O(e),d(M,!1),_.onpick?.(e)}function R(e){if(r(M)&&r(I).length){if(e.key===`ArrowDown`){d(N,(r(N)+1)%r(I).length),e.preventDefault();return}if(e.key===`ArrowUp`){d(N,(r(N)-1+r(I).length)%r(I).length),e.preventDefault();return}if((e.key===`Enter`||e.key===`Tab`)&&r(I)[r(N)]&&(e.key===`Enter`||r(P))){e.key===`Enter`&&e.preventDefault(),L(r(I)[r(N)].dir);return}if(e.key===`Escape`){d(M,!1),e.stopPropagation();return}}_.onkeydown?.(e)}var z=D(),B=i(z);v(B);let V;var H=a(B,2),U=e=>{var o=E();C(o,23,()=>r(I),e=>e.dir+e.made,(e,o,l)=>{var f=T();let p;var h=i(f),g=i(h),_=b(g,!0),v=a(g),x=b(v,!0);m(h),m(f),t(e=>{S(f,`id`,`${A()??``}-opt-${r(l)??``}`),S(f,`aria-selected`,r(l)===r(N)),p=y(f,1,`svelte-35e6rs`,null,p,{at:r(l)===r(N)}),u(_,r(o).dir),u(x,e)},[()=>r(o).made?`new folder`:`${F(r(o).dir)} ${F(r(o).dir)===1?`note`:`notes`}`]),s(`mousedown`,h,e=>e.preventDefault()),s(`click`,h,()=>L(r(o).dir)),c(`mouseenter`,h,()=>d(N,r(l),!0)),n(e,f)}),m(o),t(()=>S(o,`id`,`${A()??``}-list`)),n(e,o)};l(H,e=>{r(M)&&r(I).length&&e(U)}),m(z),t(()=>{S(B,`id`,A()),V=y(B,1,`mono svelte-35e6rs`,null,V,{field:!j(),quiet:j()}),S(B,`placeholder`,k()),S(B,`aria-label`,_.label),S(B,`aria-expanded`,r(M)&&r(I).length>0),S(B,`aria-controls`,`${A()??``}-list`),S(B,`aria-activedescendant`,r(M)&&r(I)[r(N)]?`${A()}-opt-${r(N)}`:void 0)}),c(`focus`,B,()=>{d(M,!0),d(N,0)}),s(`input`,B,()=>{d(M,!0),d(N,0)}),c(`blur`,B,()=>setTimeout(()=>d(M,!1),120)),s(`keydown`,B,R),p(B,O),n(o,z),x()}o([`input`,`keydown`,`mousedown`,`click`]);export{O as t};
@@ -0,0 +1 @@
1
+ import{F as e,X as t,Z as n}from"./Bze-M_kr.js";import{o as r}from"./CMp5T_-1.js";var i=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function a(e=new URL(`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new i(`isorite is not answering`,0)}let a=await r.json().catch(()=>({}));if(!r.ok)throw new i(a.error??r.statusText,r.status,a.current);return a},r=()=>n(`session`),a=async(e,i,a)=>{t??=r().then(e=>e.token);let o={"Content-Type":`application/json`,"x-isorite-token":await t};return n(i,{method:e,headers:o,body:JSON.stringify(a)})},o=e=>`?id=${encodeURIComponent(e)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+o(e)),saveNote:(e,t)=>a(`PUT`,`note`+o(e),t),createNote:(e,t)=>a(`POST`,`note`+o(e),{text:t}),journal:e=>n(`journal`+o(e)),version:async(e,t)=>(await n(`version`+o(e)+`&entry=`+encodeURIComponent(t))).text,moveNote:(e,t,n)=>a(`POST`,`note/move`+o(e),{to:t,base:n}),deleteNote:async(e,t)=>{await a(`POST`,`note/delete`+o(e),{base:t})},restore:(e,t,n)=>a(`POST`,`note/restore`+o(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),ask:e=>a(`POST`,`iso/ask`,e),converse:e=>a(`POST`,`iso/converse`,e),understanding:e=>n(`understanding`+o(e)),saveScratchpad:(e,t,n)=>a(`POST`,`understanding/scratchpad`+o(e),{scratchpad:t,base:n}),undoTurn:(e,t)=>a(`POST`,`iso/undo`,{conversation:e,turn:t}),takeItem:(e,t,n)=>a(`POST`,`iso/take`,{conversation:e,turn:t,item:n}),nameRepository:async()=>!1,brokenNews:async()=>[],answer:async(e,t,n)=>{await a(`POST`,`iso/answer`,{turn:e,permission:t,decision:n})},conversation:async e=>{let t=await n(`conversation`+(e?o(e):``));return t.id?t:null},turnContext:e=>n(`turn/context?turn=${encodeURIComponent(JSON.stringify(e))}`),stop:async e=>{await a(`POST`,`iso/stop`,{request:e})},keep:(e,t,n)=>a(`POST`,`proposal/keep`+o(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await a(`POST`,`proposal/revise`+o(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await a(`POST`,`proposal/discard`+o(e),{proposal:t,...n===void 0?{}:{region:n}})},drafts:()=>n(`drafts`),createDraft:()=>a(`POST`,`drafts`,{}),keepDraft:(e,t,n)=>a(`POST`,`draft/keep`+o(e),{proposal:t,folder:n}),discardDraft:async e=>{await a(`POST`,`draft/discard`+o(e),{})},setDone:(e,t,n)=>a(`POST`,`note/done`+o(e),{done:t,base:n}),context:(e,t)=>n(`context`+(e?o(e):``)+(t?`${e?`&`:`?`}choice=${encodeURIComponent(JSON.stringify(t))}`:``)),clearConversation:async()=>{await a(`POST`,`context/clear`,{})},settings:()=>n(`settings`),setKey:e=>a(`PUT`,`settings/key`,{key:e}),spend:()=>n(`spend`),setSpendCap:e=>a(`PUT`,`settings/spend-cap`,{usd:e}),connect:e=>a(`POST`,`settings/connect`,{callback:e}),connected:(e,t)=>a(`POST`,`settings/connected`,{code:e,state:t}),agentTools:()=>n(`agent/tools`),agentLook:e=>a(`POST`,`agent/look`,e),agentWrite:e=>a(`POST`,`agent/write`,e),agentSend:e=>a(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await a(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await a(`POST`,`agent/status`,{agent:e,session:t,busy:n})},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await a(`POST`,`terminal/prompt`,{asked:e,given:t})},stop:async()=>{await a(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await a(`POST`,`terminal/permission`,{id:e,decision:t})}},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`record`,`iso-start`,`iso-step`,`iso-text`,`iso-item`,`iso-answer`,`iso-taken`,`iso-done`,`iso-stopped`,`iso-failed`,`iso-retry`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var o=class{api;#e=n(null);get session(){return e(this.#e)}set session(e){t(this.#e,e)}#t=n({notes:[],dirs:[]});get listing(){return e(this.#t)}set listing(e){t(this.#t,e)}#n=n(``);get error(){return e(this.#n)}set error(e){t(this.#n,e,!0)}#r=n(``);get open(){return e(this.#r)}set open(e){t(this.#r,e,!0)}#i=n(``);get here(){return e(this.#i)}set here(e){t(this.#i,e,!0)}#a=n(null);get saving(){return e(this.#a)}set saving(e){t(this.#a,e,!0)}#o=n(null);get atlas(){return e(this.#o)}set atlas(e){t(this.#o,e)}#s=n(null);get signIn(){return e(this.#s)}set signIn(e){t(this.#s,e)}#c=n(null);get iso(){return e(this.#c)}set iso(e){t(this.#c,e)}watching=``;listeners=new Set;relist=null;async load(e=a()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}await this.signedIn(),e.events(e=>{this.follow(e);for(let t of this.listeners)t(e);e.type===`note-changed`&&(this.relist&&clearTimeout(this.relist),this.relist=setTimeout(()=>{this.refresh()},300))})}async startSignIn(){let{url:e}=await this.api.connect(location.origin+location.pathname);try{sessionStorage.setItem(s,location.hash)}catch{}location.assign(e)}async signedIn(){let e=new URLSearchParams(location.search),t,n;try{if(e.has(`code`)||e.has(`state`)||e.has(`error`)){let t=sessionStorage.getItem(s)??location.hash;return sessionStorage.removeItem(s),sessionStorage.setItem(c,JSON.stringify({code:e.get(`code`),state:e.get(`state`)})),location.replace(location.pathname+t),new Promise(()=>void 0)}let r=sessionStorage.getItem(c);if(r===null)return;sessionStorage.removeItem(c),{code:t,state:n}=JSON.parse(r)}catch{if({code:t,state:n}={code:e.get(`code`),state:e.get(`state`)},!t&&!n)return}if(!t||!n)this.signIn={ok:!1,message:`No key was made: the sign-in was left or refused.`};else try{let e=await this.api.connected(t,n);this.signIn={ok:!0,message:`Signed in at ${e.provider}: a key was made for isorite, and is held on this device.`}}catch(e){this.signIn={ok:!1,message:e.message}}}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){if(e.type===`iso-start`){this.iso={request:e.request,note:e.note,agent:null,state:`reading`,steps:[],message:``,start:e,text:``};return}if((e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request){if(this.iso&&!this.iso.agent&&(this.iso.state===`reading`||this.iso.state===`writing`))return;this.iso={request:e.request,note:``,agent:e.agent,state:`reading`,steps:[],message:``}}let t=this.iso;t&&`request`in e&&e.request===t.request&&(e.type===`iso-step`||e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`iso-text`?this.iso={...t,state:`writing`,text:e.again?e.delta:(t.text??``)+e.delta}:e.type===`iso-done`||e.type===`agent-done`?this.iso={...t,state:`done`}:e.type===`iso-stopped`?this.iso={...t,state:`stopped`}:e.type===`iso-failed`&&(this.iso={...t,state:`failed`,message:e.message}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},s=`isorite.sign-in.back`,c=`isorite.sign-in.code`,l=new o,u=e=>r(`/n/[...id]`,{id:e});function d(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function f(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?l.listing.notes.filter(e=>e.id===t):l.listing.notes.filter(e=>e.id.split(`/`).at(-1)===t),r=n.length===1?n[0]:null;return r?{id:r.id,title:r.title,kind:r.kind??`note`,done:!!r.done}:null}export{i as a,d as i,f as n,u as r,l as t};
@@ -0,0 +1,43 @@
1
+ import{$ as e,A as t,B as n,D as r,F as i,G as a,J as o,K as s,M as c,N as l,O as u,S as d,T as f,X as p,Y as m,Z as h,b as g,ct as _,f as ee,it as v,j as te,k as y,n as b,p as x,q as S,rt as ne,s as re,st as ie,u as ae,y as oe}from"./Bze-M_kr.js";import{t as se}from"./CMp5T_-1.js";import"./xihTtKlq.js";import{t as C}from"./DF3lgcLW.js";import{i as w}from"./8IM6BNk6.js";import{i as T}from"./CHlFgDNB.js";import{t as E}from"./CGgq5NWd.js";async function ce(){let{notes:e}=await C.api.notes(),t=await Promise.all(e.map(async e=>[e.id,(await C.api.readNote(e.id)).text]));return new Map(t)}async function le(e){let t=await ce(),n=[...e.keys()].filter(e=>!t.has(e));for(let[r,i]of t){if(e.has(r))continue;let t=n.find(t=>e.get(t)===i),{version:a}=await C.api.readNote(r);t?(await C.api.moveNote(r,t,a),n.splice(n.indexOf(t),1)):await C.api.deleteNote(r,a)}for(let t of n)await C.api.createNote(t,e.get(t));for(let[t,r]of e){if(n.includes(t))continue;let e=await C.api.readNote(t);e.text!==r&&await C.api.saveNote(t,{base:e.version,text:r})}await C.refresh()}var D={type:`string`};({...D}),{...D},{...D},{...D},{...D};var O={type:`string`};({...O}),{...O},{...O},{...O},{...O},{...O},{...O},{...O},{...O},{...O},{...O},{...O},{...O};var ue=`The change is written at once, under your name: the person sees your words marked in the note, and can undo it from the browser. Use this, never edit or write, for any note of the knowledge base.`;`${ue}`,`${ue}`;var k={insert:`how is a body inserted, and what does each node keep?`,rewrite:`answer my TODO`,speed:`how much faster is Barnes–Hut at N = 5000?`,octree:`How does the quadtree become an octree for 3D, and what changes in Barnes–Hut?`,close:`What goes wrong when two bodies pass close?`,octreeWrite:`write a note in algorithms on the octree: how the quadtree becomes one for 3D, and what changes in Barnes–Hut`,understand:`help me see why leapfrog's energy error stays bounded`,answer:`run backwards with −Δt, it retraces its steps`},A=`physics`,j=`integrators`,M=`algorithms`,N=`simulation`,P=(e,t)=>`${e}/${t}`,F=P(A,`newtons-law-of-gravitation`);P(A,`the-n-body-problem`);var I=P(A,`units`),L=P(A,`energy-conservation`),R=P(A,`softening`),z=P(j,`eulers-method`),B=P(j,`leapfrog`),de=P(j,`symplectic-integrators`),fe=P(j,`choosing-the-timestep`),pe=P(M,`direct-summation`),me=P(M,`centre-of-mass`),V=P(M,`the-quadtree`),H=P(M,`barnes-hut`),he=P(M,`cost-and-accuracy`),ge=P(N,`the-main-loop`);P(N,`initial-conditions`);var _e=P(N,`diagnostics`),U=P(N,`two-galaxies-colliding`),ve=`$F = G m_1 m_2 / d^2 = 1 \\cdot \\tfrac12 \\cdot \\tfrac12 / 1 = \\tfrac14$.
2
+
3
+ Each accelerates at $a = F/m = \\tfrac14 / \\tfrac12$.
4
+
5
+ So each accelerates at $\\tfrac12$, towards the other.`,ye=`$K = \\tfrac12 \\cdot \\tfrac12 \\cdot (\\tfrac12)^2 = \\tfrac1{16}$.
6
+
7
+ $U = -G m_1 m_2 / d = -\\tfrac14$.
8
+
9
+ So $E = \\tfrac1{16} - \\tfrac14 = -\\tfrac3{16}$.`,be=`$K = 2 \\times \\tfrac12 \\cdot \\tfrac12 \\cdot (\\tfrac12)^2 = \\tfrac18$, both bodies moving.
10
+
11
+ $U = -G m_1 m_2 / d = -\\tfrac14$.
12
+
13
+ So $E = \\tfrac18 - \\tfrac14 = -\\tfrac18$.`,xe=`After the step, $\\mathbf{r}' = \\mathbf{R} + \\mathbf{v}\\,\\Delta t$.
14
+
15
+ So $|\\mathbf{r}'| = R + v\\,\\Delta t$.`,Se=`After the step, $\\mathbf{r}' = \\mathbf{R} + \\mathbf{v}\\,\\Delta t$, with $\\mathbf{v}$ at right angles to $\\mathbf{R}$.
16
+
17
+ So $|\\mathbf{r}'|^2 = R^2 + v^2 \\Delta t^2$.
18
+
19
+ So $|\\mathbf{r}'| \\approx R\\,(1 + v^2 \\Delta t^2 / 2R^2)$: larger, every step, whatever the sign of $\\Delta t$.`,Ce=`Kick: $\\mathbf{v} \\mathrel{+}= \\Delta t\\, \\mathbf{a}$.
20
+
21
+ Drift: $\\mathbf{r} \\mathrel{+}= \\Delta t\\, \\mathbf{v}$.
22
+
23
+ Kick: $\\mathbf{v} \\mathrel{+}= \\Delta t\\, \\mathbf{a}$, with the new $\\mathbf{a}$.`,we=`Kick: $\\mathbf{v} \\mathrel{+}= \\tfrac12 \\Delta t\\, \\mathbf{a}$.
24
+
25
+ Drift: $\\mathbf{r} \\mathrel{+}= \\Delta t\\, \\mathbf{v}$.
26
+
27
+ Kick: $\\mathbf{v} \\mathrel{+}= \\tfrac12 \\Delta t\\, \\mathbf{a}$, with the new $\\mathbf{a}$: two half kicks make one whole.`,W=`Leapfrog keeps a nearby energy $\\tilde H = H + O(\\Delta t^2)$ exactly.
28
+
29
+ So $H$ can only wobble around $\\tilde H$, never drift.
30
+
31
+ RK4 keeps no such quantity, so its small errors add up.`,Te=`$M = 1 + 2 + 1 = 4$.
32
+
33
+ $\\mathbf{R} = (1 \\cdot (0,0) + 2 \\cdot (3,0) + 1 \\cdot (0,4)) / 4 = (6, 4)/4$.
34
+
35
+ So $\\mathbf{R} = (1.5, 1)$, with $M = 4$.`,Ee=`The drift falls as $\\Delta t^2$; at $T/100$ it is a few parts in a million.
36
+
37
+ So $\\Delta t = 2\\pi/100 \\approx 0.06$ is enough.
38
+
39
+ Check: record $E$ every 100 steps and plot the drift; halve $\\Delta t$ and it should fall by four.`,De=[{folder:A,name:`the-pull-between-two-bodies`,title:`The pull between two bodies`,uses:[F,I],made:20,question:`In units with $G = 1$, two bodies of mass $\\tfrac12$ are 1 apart. How fast does each accelerate, and which way?`,attempts:[20,17,12,5,2].map(e=>({day:e,working:ve}))},{folder:A,name:`the-energy-of-the-orbit`,title:`The energy of the two-body orbit`,uses:[L,F],made:16,question:`For the two-body orbit of the notes (masses $\\tfrac12$, 1 apart, each moving at $\\tfrac12$), find $K$, $U$ and $E$.`,attempts:[{day:16,working:ye},{day:14,working:be},{day:9,working:be},{day:3,working:be}]},{folder:j,name:`why-eulers-orbit-spirals-out`,title:`Why Euler's orbit spirals out`,uses:[z,L],made:15,question:`A body on a circular orbit of radius $R$ takes one Euler step. Show that its distance from the centre grows, and by how much, to leading order in $\\Delta t$.`,attempts:[{day:15,working:xe},{day:13,working:Se},{day:6,working:Se},{day:3,working:Se}]},{folder:j,name:`one-leapfrog-step`,title:`One leapfrog step`,uses:[B],made:12,question:`Write one leapfrog step as kick, drift and kick, and say how many times the accelerations are computed.`,attempts:[{day:12,working:Ce},{day:8,working:we},{day:3,working:we}]},{folder:j,name:`why-leapfrog-does-not-drift`,title:`Why leapfrog does not drift`,uses:[de,B],made:10,question:`RK4 is more accurate than leapfrog over one step. Why, then, does its energy drift over a long run while leapfrog's does not?`,attempts:[{day:10,working:W},{day:1,working:W}]},{folder:M,name:`the-centre-of-mass-of-a-node`,title:`The centre of mass of a node`,uses:[me],made:6,question:`A node holds bodies of mass 1 at $(0,0)$, 2 at $(3,0)$ and 1 at $(0,4)$. What is its total mass, and where is its centre of mass?`,attempts:[6,4,2,1].map(e=>({day:e,working:Te}))},{folder:M,name:`the-cost-of-direct-summation`,title:`The cost of direct summation`,uses:[pe],made:1,question:`Using Newton's third law, how many pairs does direct summation compute each step for $N$ bodies? At 20 ns a pair, how long is a step at $N = 2000$?`,attempts:[],unsent:`Each body feels the other $N - 1$.
40
+
41
+ So there are $N(N-1)$ pairs: $2000 \\times 1999 \\approx 4 \\times 10^6$.
42
+
43
+ At 20 ns a pair, a step takes 0.08 s.`},{folder:N,name:`a-timestep-for-the-orbit`,title:`A timestep for the orbit`,uses:[fe,_e],made:11,question:`For the two-body orbit (period $2\\pi$), choose $\\Delta t$ for leapfrog so that the energy drift stays below $10^{-5}$, and say how you would check it.`,attempts:[11,7].map(e=>({day:e,working:Ee}))}],G=`surfaces`,K=`curvature`,q=`global`,J=(e,t)=>`${e}/${t}`;J(G,`regular-surfaces`),J(G,`first-ff`),J(G,`second-ff`),J(G,`orientable`),J(K,`gaussian-curvature`),J(K,`egregium`),J(K,`gauss-equation`),J(K,`geodesic-curvature`),J(q,`euler`);var Y=J(q,`gauss-bonnet`);J(q,`triangulations`);var Oe=J(q,`where-is-compactness-used`);J(G,`why-ii-changes-sign`),J(K,`derivatives-when-f-is-zero`),J(q,`kg-at-the-corners`);var ke=J(q,`total-curvature-of-the-torus`),Ae=J(q,`angles-of-a-geodesic-triangle`);J(q,`gauss-bonnet-and-the-mobius-band`),J(K,`curvature-of-a-sphere`),J(K,`curvature-of-the-saddle`),J(K,`the-cylinder-and-the-plane`),J(K,`k-from-e-and-g-alone`),J(K,`catenoid-and-helicoid`),J(q,`chi-of-a-surface-of-genus-g`),`${Y}${ke}${Y}${Oe}${Ae}`;var je={back:`where is compactness used in the proof?`,remark:`put my answers on compactness together as a remark for the note`},Me=18+De.length,Ne=new Map,Pe=0,Fe=(e,t)=>n=>n.type===`iso-start`&&n.place.form===`turn`&&n.place.mode===e&&t.test(n.asked.toLowerCase()),Ie=(e,t,n=()=>!0)=>r=>{if(r.type!==`iso-done`)return!1;let i=Ne.get(r.request);return!!i&&i.mode===e&&t.test(i.asked.toLowerCase())&&n(i)},Le=e=>t=>t.type===`iso-done`&&e.test(Ne.get(t.request)?.asked.toLowerCase()??``),Re=0,ze=e=>()=>decodeURIComponent(location.hash).startsWith(e),Be=e=>()=>document.querySelector(e)!==null,Ve=e=>()=>document.querySelector(`[data-note="${e}"]`)?.classList.contains(`at`)??!1,He=e=>C.listing.notes.find(t=>e.test(t.title)),X=new Map,Ue=new Map;function We(e){C.api.readNote(e).then(t=>{X.set(e,t.text),Ue.has(e)||Ue.set(e,t.text)},()=>X.delete(e))}var Z=e=>(X.has(e)||(X.set(e,``),We(e)),X.get(e)??``),Ge=e=>(Z(e),Ue.get(e)??``),Ke=!1;function qe(){!Ke&&C.api&&(Ke=!0,C.on(e=>{e.type===`note-changed`&&X.has(e.id)&&We(e.id),e.type===`iso-start`&&e.place.form===`turn`&&Ne.set(e.request,{mode:e.place.mode,asked:e.asked,understanding:e.place.given.some(e=>e.kind===`understanding`)}),e.type===`iso-item`&&e.item.kind===`undone`&&Pe++,Ie(`write`,/todo/)(e)&&Re++}))}var Je=(e,t)=>(qe(),e.match(t)?.length??0),Ye=(e,t)=>Je(e,RegExp(`\\]\\(/${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}\\.md`,`g`)),Xe=()=>C.atlas?.chosenId?[...document.querySelectorAll(`.atlas`)]:[],Ze=!1,Qe=``,$e=0,et=()=>T.layoutChanges>$e&&T.layout===Qe;function tt(e){let t=!1,n=0;return()=>{let r=document.querySelector(`[data-folder="${e}"]`)?.getBoundingClientRect(),i=document.querySelector(`.atlas`)?.getBoundingClientRect();if(!r||!i?.width)return!1;let a=Math.max(r.width/i.width,r.height/i.height);return n||=a,(C.atlas?.here===e||a>Math.max(.5,n*1.6))&&(t=!0),t&&C.atlas?.here!==e&&a<n*1.3}}var Q=`[data-pane="iso"]`,nt=new Set;function rt(){if(qe(),!nt.size)for(let e of C.listing.notes)nt.add(e.id);Qe=T.layout,$e=T.layoutChanges}var it=()=>C.listing.notes.filter(e=>nt.size&&!nt.has(e.id)),at=[{key:`L1`,title:`The isorite knowledge base`,about:`Understand the basics of an isorite knowledge base in its three panes: the note, the Atlas, and Iso. Edit Markdown, link notes, and see the links on the Atlas.`,steps:[{go:`/atlas`,target:`[data-pane="note"] [data-settings="note"], [role="dialog"][aria-label="Note settings"]`,check:et,title:`Three panes`,text:`The Note pane is for thinking and writing, the Atlas for connecting, Iso for building and talking. The layouts are in the Note pane's settings, at the right of its header: try another, then come back to this one.`,phone:{go:`/notes`,target:`nav[aria-label="Panes"]`,check:()=>T.focus===`atlas`,text:`The Note pane is for thinking and writing, the Atlas for connecting, Iso for building and talking. On a phone they are the tabs at the foot: tap Atlas.`}},{go:`/atlas`,target:`[data-folder="integrators"]`,check:tt(`integrators`),title:`This is the Atlas`,text:`Each block is a note, each bubble a folder, each line a link. Step into integrators: click inside it, or scroll in. Then click open ground to step out.`,phone:{text:`Each block is a note, each bubble a folder, each line a link. Tap inside integrators to step in, then ↑ out at the top.`}},{go:`/atlas`,target:`[data-note="${B}"]`,check:Ve(B),title:`What a note rests on`,wrong:()=>C.atlas?.chosenId&&C.atlas.chosenId!==B?`That is ${C.atlas.chosen}. Choose Leapfrog, in integrators.`:null,text:`Click Leapfrog. What it requires, and what builds on it, light up.`,phone:{text:`Tap Leapfrog. What it requires, and what builds on it, light up.`}},{target:Xe,check:ze(`#/n/${B}`),title:`Open it`,text:`Click Leapfrog again. It opens in the Note pane.`,phone:{text:`Tap Leapfrog again. It opens in the Note pane, and the Note tab comes forward.`}},{go:`/n/${B}`,target:`[data-pane="note"] .cm-content`,check:()=>Je(Z(B),/\*\*[^*\n]+\*\*/g)>Je(Ge(B),/\*\*[^*\n]+\*\*/g),title:`A note is Markdown`,text:`Select a word and press Ctrl+B. Changes save as you type: the dot in the Note pane's header says so.`,phone:{text:`Make a word bold: type ** on each side of it. Changes save as you type.`}},{target:`[data-pane="note"] .cm-content`,check:()=>Ye(Z(B),L)>Ye(Ge(B),L),title:`Link a note`,text:`At the end of the last paragraph, type [[ener and choose Energy and its conservation.`},{target:()=>[...Xe(),...document.querySelectorAll(`path.grown`)],title:`The link, on the Atlas`,text:`Watch the Atlas: the new link is drawn from Leapfrog to Energy and its conservation.`,phone:{go:`/atlas`,target:`[data-note="${L}"]`,text:`On the Atlas, the new link runs from Leapfrog to Energy and its conservation.`}},{go:`/n/${B}`,target:`[data-pane="note"] .cm-content`,check:()=>/\]\(\/physics\/energy-conservation\.md "requires"\)/.test(Z(B)),title:`Its kind`,text:`Click in the new link, press Alt+L, and choose Requires.`,phone:{text:`Tap the button beside the new link and choose Requires.`}},{target:Xe,title:`The kind, on the Atlas`,text:`On the Atlas, requires is drawn strongest.`,phone:{go:`/atlas`,target:`[data-note="${L}"]`,text:`On the Atlas, requires is drawn strongest.`}},{go:`/n/${B}`,target:()=>[...document.querySelectorAll(`[data-pane="note"] .sw[data-switch="timeline"], .timeline, .atbar`)],check:()=>(Be(`.atbar`)()&&(Ze=!0),Ze&&!Be(`.atbar`)()),title:`Every change is kept`,text:`Switch on the timeline in the Note pane's header, then click its first mark: the note as it was. The → at the right of the bar brings you back.`,phone:{text:`Switch on the timeline in the Note pane's header, then tap its first mark: the note as it was. The → at the right of the bar brings you back.`}},{go:`/n/${B}`,target:`[data-pane="note"] .cm-content`,check:ze(`#/n/${L}`),title:`Follow the link`,wrong:()=>{let e=decodeURIComponent(location.hash).match(/^#\/n\/([^?]+)/)?.[1];return e&&e!==B&&e!==L?`That is another note. Go back, and follow the link to Energy and its conservation.`:null},text:`Ctrl+click (⌘ on a Mac) the link to Energy and its conservation.`,phone:{go:`/atlas`,target:`[data-note="${L}"]`,text:`Tap Energy and its conservation on the Atlas, then tap it again.`}},{go:`/n/${L}`,target:`[data-pane="note"] button[aria-label="All notes"], [data-pane="note"] .tree`,check:ze(`#/n/${R}`),title:`All the notes`,text:`The icon by the settings, in the Note pane's header, opens every note. Type soft to find Softening, and open it.`},{go:`/n/${R}`,target:()=>[...document.querySelectorAll(`[data-pane="note"] .tools, [data-pane="note"] .details`)],check:()=>/^tags:/m.test(Z(R))&&!/^tags:/m.test(Ge(R)),title:`Its details`,text:`Open details above the text and add a tag, say numerics.`},{go:`/atlas`,target:`[data-folder="physics"]`,check:()=>He(/^plummer sphere$/i)?.dir===`physics`,wrong:()=>{let e=He(/^plummer sphere$/i);return e&&e.dir!==`physics`?`It went into ${e.dir||`the top of the base`}. Redo, and hold inside physics.`:null},title:`A new note, where you hold`,text:`On the Atlas, press and hold inside physics until a note's icon is marked, and let go. An untitled note opens with its title chosen: type Plummer sphere, and press Enter.`},{target:()=>[...document.querySelectorAll(`[data-pane="note"] .details, [data-pane="note"] .tools`)],check:()=>it().length>0&&it().every(e=>e.dir===`galaxies`),title:`Move it`,wrong:()=>{let e=it().find(e=>e.dir!==`physics`&&e.dir!==`galaxies`);return e?`It went into ${e.dir||`the top of the base`}. Type galaxies: a new folder is made for it.`:null},text:`In details, change its folder to galaxies, a folder the base does not have yet: it is made for the note.`},{target:()=>[...document.querySelectorAll(`[data-pane="note"] .details, [data-pane="note"] .tools`)],check:()=>nt.size>0&&it().length===0&&C.listing.notes.length===Me,title:`Delete it`,text:`In details, click delete, then confirm.`},{title:`That is the base`,text:`The base is a folder of Markdown files: any editor opens them. Next, Iso, in L2.`}]},{key:`L2`,title:`Iso`,about:`Iso is an agent who knows your knowledge base. Talk with it in its own pane: ask, give it notes and passages, and let it write, with every change marked and undoable.`,steps:[{go:`/n/${V}`,target:`${Q}`,fill:k.insert,until:Fe(`ask`,/inserted/),title:`Ask Iso`,text:`Iso has a pane of its own. With the quill in its header off, it reads your notes and changes nothing. Your question from the quadtree is written in its box: press Enter.`,phone:{text:`Iso has a pane of its own: tap its tab. With the quill in its header off, it reads your notes and changes nothing. Your question from the quadtree is written in its box: send it with the arrow.`}},{target:()=>[...document.querySelectorAll(`[data-pane="atlas"] .sw[data-switch="context"], ${Q}`)],until:Ie(`ask`,/inserted/),title:`Watch it read`,text:`Switch on Iso's context, the diamond in the Atlas's header: what Iso reads is numbered on the map in order, as it reads it. In Iso's pane, each note it read opens with a click.`,phone:{target:Q,text:`Each note Iso reads is said in its pane as it reads it. On the Atlas, with the diamond in its header on, what it read is numbered in order.`}},{go:`/n/${V}`,target:()=>[...document.querySelectorAll(`[data-note="${H}"], [data-pane="note"] .cm-content`)],check:()=>w.parts.some(e=>e.kind===`note`&&e.id===H)&&w.parts.some(e=>e.kind===`passage`&&e.id===V),title:`Give Iso a note, and a passage`,text:`Iso answers from what it finds. To give it what you mean: hold Barnes–Hut on the Atlas (or shift+click it, or drag it onto Iso's pane). Then select a sentence of the quadtree, and click send to Iso beside it.`,phone:{text:`Iso answers from what it finds. To give it what you mean: on the Atlas, hold Barnes–Hut and choose Give to Iso. Then select a sentence of the quadtree, and tap send to Iso under it.`}},{target:`${Q} .ctx, ${Q} .context`,check:()=>E.view===`context`&&E.off.length>0&&!w.parts.some(e=>e.kind===`passage`),title:`What Iso is sent`,text:`The icon in Iso's header counts what you gave: click it. Here is what Iso is sent, part by part, each with its size. Switch off your first question, and take the sentence out with its ×.`},{go:`/n/${H}`,target:()=>[...document.querySelectorAll(`${Q} .sw[data-switch="notes"], #iso-box`)],fill:k.rewrite,until:Ie(`write`,/todo/),title:`Let it write`,text:`Click the Context icon again for the conversation. Switch on the quill in Iso's header: Iso may change your notes. Barnes–Hut is open, with its TODO; the request is written for you: send it.`},{target:()=>[...document.querySelectorAll(`[data-pane="note"] .sw[data-switch="provenance"], [data-pane="note"] .cm-content`)],title:`Its words, marked`,text:`The change went straight into the note. Switch on provenance, the half-filled square in the Note pane's header: Iso's words are marked.`},{target:()=>[...document.querySelectorAll(`${Q} button[aria-label="Undo this turn's changes"], [data-pane="note"] .cm-content`)],check:()=>Pe>0&&Re>=2&&!/TODO:/.test(Z(H)),title:`Undo, and again`,text:`Under Iso's reply, ↺ puts back everything the turn changed: the TODO is back. Then send the request again, and leave the answer this time.`},{title:`Iso, in short`,text:`With the quill off Iso reads; on, it writes, and every change it makes is marked and can be undone. What it is sent is yours to choose. Next: L3, questions and problems.`}]},{key:`E1`,title:`Knowledge work with isorite`,earlier:!0,about:`isorite provides a home for structured project knowledge work. This walkthrough shows how isorite can be used in an example knowledge base on an N-body simulation.`,steps:[{go:`/n/${U}`,target:`[data-pane="note"] .cm-content`,title:`The goal`,text:`Two galaxies colliding, at N = 5000: where the tidal tails start to look right, and where direct summation is too slow. This evening's work is to get there with Barnes–Hut.`},{go:`/atlas`,target:`[data-note="${U}"]`,check:Ve(U),title:`What it rests on`,text:`Choose Two galaxies colliding: what it requires is lit, and a click on one of those steps back to it, and on, back to Newton's law. That is the reading list for tonight.`},{go:`/n/${he}`,target:Q,fill:k.speed,until:Ie(`ask`,/faster/),title:`How much faster?`,text:`Cost and accuracy is open. With the quill off, ask Iso how much faster Barnes–Hut is at N = 5000: the question is written for you.`},{target:Q,title:`Checked against your notes`,text:`Iso checked its arithmetic against direct summation and Barnes–Hut, and says to measure, as your note says.`},{target:Q,fill:k.octreeWrite,until:Ie(`write`,/octree/),title:`Plan the octree`,text:`The simulation is 3D, and the quadtree is 2D. With the quill on, ask Iso to write a note on the octree, in algorithms: the request is written for you.`},{target:`${Q} .change`,check:()=>ze(`#/n/algorithms/the-octree`)(),title:`Its note`,text:`Iso made The octree. Click it in Iso's pane to open it: it is one of your notes now, linked to the quadtree and Barnes–Hut.`},{go:`/n/${ge}`,target:`[data-pane="note"] .cm-content`,check:()=>/octree/i.test(document.querySelector(`[data-pane="note"] .cm-content`)?.textContent??``),title:`Link it in`,text:`The main loop is where it will be used. At the end of the first paragraph, type [[oct and choose the octree.`}]},{key:`L3`,base:`geometry`,title:`Questions and problems`,about:`Open questions and problems are notes of their own, beside the notes they are about. See who wrote what, follow them on the Atlas, let Iso ask you back and put your own answers together, and read how Iso reads you. On notes about the geometry of surfaces.`,steps:[{go:`/n/${Y}`,target:()=>[...document.querySelectorAll(`[data-pane="note"] .sw[data-switch="provenance"], [data-pane="note"] .cm-content`)],check:()=>T.on.provenance,title:`Whose words`,text:`These are notes on the geometry of surfaces. Gauss–Bonnet is open. Switch on provenance, the half-filled square in the Note pane's header: the proof sketch is Iso's, untouched, and the examples are yours.`},{target:()=>[...document.querySelectorAll(`[data-pane="note"] .sw[data-switch="timeline"], .timeline`)],check:()=>T.on.timeline,title:`Every change is kept`,text:`Switch on the timeline, beside it: each mark is a moment in the note's life, Iso's sketch among them.`},{target:`.cm-lp-embed`,check:ze(`#/n/${Oe}`),title:`A question in a note`,text:`After Compact: stands a question of yours, embedded. Click it: it opens as a note of its own.`,phone:{text:`After Compact: stands a question of yours, embedded. Tap it: it opens as a note of its own.`}},{go:`/atlas`,target:`.atlas a.n.question`,check:Ve(Oe),title:`Questions on the Atlas`,text:`Open questions are blocks on the Atlas with a ? in the notch, each beside what it is about. Click Where is compactness used?: its note lights, and the note it asks about.`,phone:{text:`Open questions are blocks on the Atlas with a ? in the notch, each beside what it is about. Tap Where is compactness used?: its note lights, and the note it asks about.`}},{target:()=>[...document.querySelectorAll(`[data-pane="atlas"] .sw[data-switch="web"], [data-pane="atlas"] .sw[data-switch="code"], .sat`)],check:()=>T.on.web&&T.on.code,title:`Links out of the base`,text:`Switch on web and code in the Atlas's header: links to a page and to code stand beside their note as small blocks. geodesics.jl is struck through: it is not in the repository.`},{go:`/atlas`,target:`[data-note="${Y}"]`,check:()=>w.parts.some(e=>e.kind===`note`&&e.id===Y),title:`Give Iso the note`,text:`Hold Gauss–Bonnet on the Atlas (or drag it onto Iso's pane). Its open questions go with it.`,phone:{text:`On the Atlas, hold Gauss–Bonnet and choose Give to Iso. Its open questions go with it.`}},{target:Q,fill:je.back,until:Le(/compactness is used|compactness used/),title:`Iso asks you back`,text:`Gauss–Bonnet is in Iso's context with its question. The request is written for you: send it. Given an open question, Iso asks before it explains.`},{target:Q,fill:je.remark,until:Le(/answers on compactness/),title:`Your answers, put together`,text:`Under Where is compactness used? are two answers of yours. Ask Iso to put them together: the request is written for you.`},{target:()=>[...document.querySelectorAll(`${Q} [data-offer]`)],check:()=>Je(Z(Y),/\*\*Compact:\*\*/g)>=2,title:`Inserted as yours`,text:`Iso offers the remark in your words. The arrow inserts it at the end of Gauss–Bonnet, as yours: Iso's offer is not in the note until you say.`},{go:`/n/${Y}`,target:`[data-tour="understanding"], [data-pane="note"] .u`,check:()=>T.understanding,title:`How Iso reads you`,text:`Open Gauss–Bonnet's Understanding note, the sprig in the Note pane's header. Each sentence of Iso's reading rests on something you can open: your examples, the torus you solved, the question still open.`},{go:`/n/${Oe}`,target:`[data-tour="understanding"], [data-pane="note"] .titlerow`,check:()=>/^resolved:/m.test(Z(Oe)),title:`Resolve it`,text:`Your remark is in the note. Close the Understanding note with the sprig, then press the ✓ in the question's title row: it resolves it, yours to press and never Iso's.`},{title:`Questions and problems, in short`,text:`A question or a problem is a note with a type, kept beside the notes it is about. Iso asks you back, checks a solution without marking it, and offers your own answers for you to insert. Resolving and solving are yours.`}]},{key:`E2`,title:`Learning with isorite`,steps:[],about:`How isorite gets you up to speed quickly, on the same N-body simulation project.`},{key:`L4`,title:`The terminal interface`,earlier:!0,about:`Iso shares a common substrate of understanding with you as you build together. Extending the familiar OpenCode 2, learn to use isorite's terminal and web interfaces jointly.`,steps:[{title:`isorite in the terminal`,text:`For work that needs more than notes: code. isorite term runs OpenCode, an agent that edits code, with your base beside it. To walk through it on your machine, with OpenCode 2 installed: isorite --tutorial.`},{title:`It looks before it codes`,text:`The agent has your base as tools: brief_base, search_notes, find_similar, outline_note and read_note. Asked to write Barnes–Hut, it reads your notes on it first, and cites them.`},{go:`/atlas`,target:`.atlas-world`,title:`Watched from here`,text:`While it works, this Atlas follows it: what it found and read is drawn as Iso's path is, and what it used.`},{title:`Its changes to notes wait`,text:`edit_note and write_note: what the agent changes in your notes is written at once under its name, its words marked as Iso's are, and undone the same way. Its changes to code are OpenCode's own, which asks before it writes.`},{title:`From here to there`,text:`In the terminal, /note opens a note and /atlas shows what it requires and what builds on it.`},{title:`Its tour, replayed`,link:{href:`#/terminal`,text:`isorite in the terminal: its tour, replayed`},text:`Every screen of the terminal's tour, as OpenCode drew it.`}],local:{about:`The agent in OpenCode, in the terminal beside this page, with your notes as its tools; this page follows it.`,steps:[{title:`The terminal beside this page`,text:`The terminal you ran isorite --tutorial in is this part: its own card leads, a step at a time. This page follows it. Keep the Atlas open where you can see both.`},{go:`/atlas`,target:`.atlas-world`,until:e=>e.type===`agent-done`,title:`Watched from here`,text:`In the terminal, ask the agent for code, as its card says. It looks in your notes first: watch its path drawn here as it reads, found by words, by meaning, or along a link.`},{go:`/n/${U}`,title:`Its changes to notes wait here too`,text:`When the agent would change a note, the change waits in the note, here as in the terminal, under its name. Keep it in either; the other sees it.`},{title:`On your own notes`,text:`In your project's folder: isorite term <your base>, and the browser at the address it gives. isorite serve <your base> opens the browser alone.`}]}},{key:`E3`,title:`Building with isorite`,steps:[],about:`Putting it all together: rewrite the N-body simulation to use the Barnes–Hut algorithm, with structured agentic awareness of the project.`}],ot=()=>new URLSearchParams(location.search).get(`base`)===`geometry`?`geometry`:`nbody`,st=(e,t)=>`${location.pathname}${e===`geometry`?`?base=geometry`:``}#${t}`,$=m({part:-1,at:0,left:!1,ticks:{},mistake:``}),ct=`isorite.tour`;function lt(e,t){try{sessionStorage.setItem(ct,JSON.stringify({part:e,at:t,left:!1,ticks:$.ticks}))}catch{}}function ut(){try{let e=JSON.parse(sessionStorage.getItem(ct)??`null`);return sessionStorage.removeItem(ct),e?(Object.assign($,{part:e.part,at:e.at,left:e.left,ticks:e.ticks}),e.part>=0):!1}catch{return!1}}var dt={snap:null};function ft(e,t){$.ticks[e]??=[],$.ticks[e].includes(t)||$.ticks[e].push(t)}var pt=e=>{var t=mt();r(e,t)},mt=t(`<svg class="tick svelte-1195hbs" viewBox="0 0 12 12" width="12" height="12" aria-hidden="true"><path d="M2 6.5l2.6 2.6L10 3.4" fill="none" stroke="currentColor" stroke-width="1.6"></path></svg>`),ht=y(`<button class="back btn quiet svelte-1195hbs" type="button">the tutorial</button>`),gt=y(`<span class="note svelte-1195hbs">an earlier version, being rewritten</span>`),_t=y(`<button type="button" class="section svelte-1195hbs"><span class="key svelte-1195hbs"> </span> <span class="what svelte-1195hbs"><span class="t svelte-1195hbs"> </span><span class="about svelte-1195hbs"> </span><!></span> <span class="progress svelte-1195hbs"><!><span class="go svelte-1195hbs" aria-hidden="true">›</span></span></button>`),vt=y(`<div class="section coming svelte-1195hbs"><span class="key svelte-1195hbs"> </span> <span class="what svelte-1195hbs"><span class="t svelte-1195hbs"> </span><span class="about svelte-1195hbs"> </span><span class="note svelte-1195hbs">coming</span></span></div>`),yt=y(`<li><!></li>`),bt=y(`<div class="coach frame parts svelte-1195hbs" role="dialog" aria-label="The tutorial" aria-live="polite"><span class="label">isorite, tutorial</span> <p class="svelte-1195hbs">This is a demo of isorite on example projects: an N-body simulation, and notes on the geometry of surfaces. Explore and read the knowledge base as you like, or follow the sections below for an interactive walkthrough.</p> <p class="faint svelte-1195hbs"><!></p> <ol class="list svelte-1195hbs"></ol> <div class="row actions svelte-1195hbs"><span class="grow"></span><button class="btn quiet svelte-1195hbs" type="button">leave</button></div></div>`),xt=y(`<div aria-hidden="true"></div>`),St=y(`<i></i>`),Ct=y(`<button class="fold svelte-1195hbs" type="button"> </button>`),wt=y(`<p class="svelte-1195hbs"> </p>`),Tt=y(`<p class="svelte-1195hbs"><a> </a></p>`),Et=y(`<p class="mistake svelte-1195hbs" role="status"> </p>`),Dt=y(`<button class="btn quiet svelte-1195hbs" type="button" aria-label="back a step">‹ back</button>`),Ot=y(`<span class="label done svelte-1195hbs"><!> done</span>`),kt=y(`<button class="btn quiet svelte-1195hbs" type="button" title="put the base back as this step found it"> </button>`),At=y(`<!> <div role="dialog" aria-label="The tutorial" aria-live="polite"><div class="row head svelte-1195hbs"><span class="label"> </span><span class="grow"></span> <span class="seg svelte-1195hbs"></span> <button class="link svelte-1195hbs" type="button">sections</button> <button class="link svelte-1195hbs" type="button">leave</button></div> <h2 class="svelte-1195hbs"><!></h2> <!> <!> <!> <div><!> <!> <span class="grow"></span> <!> <button type="button"> </button></div></div>`,1);function jt(t,c){v(c,!0);let m=!!C.session?.tutorial,y=at.filter(e=>!(m&&e.base)).map(e=>m&&e.local?{...e,...e.local}:e),w=e(()=>$.left),T=e(()=>$.part>=0?y[$.part]:null),E=h(!1),D=e(()=>{let e=i(T)?.steps[$.at];return e?{...e,...i(E)?e.phone:{}}:null}),O=e(()=>!!(i(D)?.until||i(D)?.check)),ue=e(()=>i(T)!==null&&$.at===i(T).steps.length-1),k=(e,t)=>$.ticks[e]?.includes(t)??!1,A=e(()=>i(T)!==null&&k(i(T).key,$.at)),j=h(null),M=h(void 0),N=h(!1),P=h(!1),F=h(!1),I=h(0),L=h(!1);async function R(e,t){let n=y[e].steps[t],r=(i(E)?n.phone?.go:void 0)??n.go,a=y[e].base??`nbody`;return m||a===ot()?!1:(lt(e,t),location.assign(st(a,r?typeof r==`string`?r:await r():`/`)),!0)}async function z(e){if(await R($.part,e))return;$.at=e,$.mistake=``,p(L,!1),p(P,!0),setTimeout(()=>p(P,!1),200);let t=y[$.part].steps[e],n=(i(E)?t.phone?.go:void 0)??t.go;n&&await se(`#${typeof n==`string`?n:await n()}`),dt.snap=ce().catch(()=>null)}async function B(e){rt(),!await R(e,0)&&($.part=e,$.left=!1,z(0))}function de(){i(T)&&(i(O)||ft(i(T).key,$.at),i(ue)?$.part=-1:z($.at+1))}function fe(){$.at>0&&z($.at-1)}async function pe(){let e=await dt.snap;if(e&&!i(F)){p(F,!0);try{await le(e)}finally{p(F,!1)}await z($.at)}}function me(e){return e?typeof e==`function`?e():[...document.querySelectorAll(e)]:[]}b(()=>{ut()&&(rt(),z($.at));let e=matchMedia(`(max-width: 600px)`);p(E,e.matches,!0);let t=()=>{p(E,e.matches,!0)};e.addEventListener(`change`,t);let n=()=>{i(T)&&ft(i(T).key,$.at),de()},r=C.on(e=>{!i(w)&&i(D)?.until?.(e)&&n()}),a=0,o=()=>{if(a=requestAnimationFrame(o),i(w)||!i(D)){p(j,null);return}if(p(I,0),i(E))for(let e of document.querySelectorAll(`.seed, .foot, .changes, .deck, [data-pane="iso"] .composer`)){let t=e.getBoundingClientRect();t.height&&t.top>innerHeight/2&&t.left<innerWidth&&t.right>0&&p(I,Math.max(i(I),innerHeight-t.top+8),!0)}let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let a of me(i(D).target)){let i=a.getBoundingClientRect();i.width&&i.height&&(e=Math.min(e,i.left),t=Math.min(t,i.top),n=Math.max(n,i.right),r=Math.max(r,i.bottom))}if(p(j,e<n?{x:e,y:t,w:n-e,h:r-t}:null),!i(E)&&i(M)){let e=i(M).getBoundingClientRect(),t=e.width,n=e.height,r=innerHeight-48-n,a=e=>i(j)?Math.max(0,Math.min(e+t,i(j).x+i(j).w)-Math.max(e,i(j).x))*Math.max(0,Math.min(r+n,i(j).y+i(j).h)-Math.max(r,i(j).y)):0,o=a(innerWidth-24-t),s=a(24);p(N,o>0&&s<o,!0)}};o();let s=setInterval(()=>{if(!(i(w)||!i(D)||i(F))){if(i(D).fill){let e=document.querySelector(`#iso-box`);e&&!e.value&&e.dataset.filled!==i(D).fill&&(e.dataset.filled=i(D).fill,e.value=i(D).fill,e.dispatchEvent(new Event(`input`,{bubbles:!0})))}i(D).check?.()?n():$.mistake=i(D).wrong?.()??``}},250);return()=>{r(),cancelAnimationFrame(a),clearInterval(s),e.removeEventListener(`change`,t)}});var V=u(),H=s(V),he=e=>{var t=ht();l(`click`,t,()=>{$.left=!1,$.part=-1}),r(e,t)},ge=t=>{var s=bt(),c=o(a(s),4),u=a(c),p=e=>{var t=te(`Iso and the agent are scripted, and nothing leaves your machine; what you change is kept in the tutorial's folder.`);r(e,t)},h=e=>{var t=te(`Iso is scripted, and nothing leaves this page; a reload starts it all again.`);r(e,t)};d(u,e=>{m?e(p):e(h,-1)}),_(c);var g=o(c,2);oe(g,23,()=>y,e=>e.key,(t,s,c)=>{let u=e(()=>$.ticks[i(s).key]?.length??0);var p=yt(),m=a(p),h=e=>{var t=_t(),p=a(t),m=S(p,!0),h=o(p,2),g=a(h),ee=S(g,!0),v=o(g),y=S(v,!0),b=o(v),x=e=>{var t=gt();r(e,t)};d(b,e=>{i(s).earlier&&e(x)}),_(h);var ne=o(h,2),re=a(ne),oe=e=>{pt(e)},se=e=>{var t=te();n(()=>f(t,`${i(u)??``} of ${i(s).steps.length??``}`)),r(e,t)};d(re,e=>{i(u)===i(s).steps.length?e(oe):i(u)&&e(se,1)}),ie(),_(ne),_(t),n(()=>{ae(t,`aria-label`,`${i(s).key??``}: ${i(s).title??``}${i(u)?`, ${i(u)} of ${i(s).steps.length} done`:``}`),f(m,i(s).key),f(ee,i(s).title),f(y,i(s).about)}),l(`click`,t,()=>B(i(c))),r(e,t)},g=e=>{var t=vt(),c=a(t),l=S(c,!0),u=o(c,2),d=a(u),p=S(d,!0),m=o(d),h=S(m,!0);ie(),_(u),_(t),n(()=>{ae(t,`aria-label`,`${i(s).key??``}: ${i(s).title??``}, coming`),f(l,i(s).key),f(p,i(s).title),f(h,i(s).about)}),r(e,t)};d(m,e=>{i(s).steps.length?e(h):e(g,-1)}),_(p),r(t,p)}),_(g);var ee=o(g,2),v=o(a(ee));_(ee),_(s),l(`click`,v,()=>$.left=!0),r(t,s)},_e=e=>{var t=At(),c=s(t),m=e=>{var t=xt();let a;n(()=>{a=x(t,1,`spot svelte-1195hbs`,null,a,{easing:i(P)}),ee(t,`left:${i(j).x-8}px;top:${i(j).y-8}px;width:${i(j).w+16}px;height:${i(j).h+16}px`)}),r(e,t)};d(c,e=>{i(j)&&e(m)});var h=o(c,2);let v,y;var b=a(h),ne=a(b),se=S(ne),C=o(ne,3);oe(C,21,()=>i(T).steps,g,(e,t,a)=>{var o=St();let s;n(e=>s=x(o,1,`svelte-1195hbs`,null,s,{d:e,at:a===$.at}),[()=>k(i(T).key,a)]),r(e,o)}),_(C);var w=o(C,2),ce=o(w,2);_(b);var le=o(b,2),R=a(le),z=e=>{var t=Ct(),a=S(t,!0);n(()=>{ae(t,`aria-expanded`,!i(L)),f(a,i(D).title)}),l(`click`,t,()=>p(L,!i(L))),r(e,t)},B=e=>{var t=te();n(()=>f(t,i(D).title)),r(e,t)};d(R,e=>{i(E)?e(z):e(B,-1)}),_(le);var me=o(le,2),V=e=>{var t=wt(),a=S(t,!0);n(()=>f(a,i(D).text)),r(e,t)};d(me,e=>{i(L)||e(V)});var H=o(me,2),he=e=>{var t=Tt(),o=a(t),s=S(o,!0);_(t),n(()=>{ae(o,`href`,i(D).link.href),f(s,i(D).link.text)}),r(e,t)};d(H,e=>{i(D).link&&!i(L)&&e(he)});var ge=o(H,2),_e=e=>{var t=Et(),i=S(t,!0);n(()=>f(i,$.mistake)),r(e,t)};d(ge,e=>{$.mistake&&!i(L)&&e(_e)});var U=o(ge,2);let ve;var ye=a(U),be=e=>{var t=Dt();l(`click`,t,fe),r(e,t)};d(ye,e=>{$.at>0&&e(be)});var xe=o(ye,2),Se=e=>{var t=u(),n=s(t),o=e=>{var t=Ot();pt(a(t)),ie(),_(t),r(e,t)};d(n,e=>{i(A)&&e(o)}),r(e,t)};d(xe,e=>{i(O)&&e(Se)});var Ce=o(xe,4),we=e=>{var t=kt(),a=S(t,!0);n(()=>{t.disabled=i(F),f(a,i(F)?`redoing…`:`redo`)}),l(`click`,t,pe),r(e,t)};d(Ce,e=>{i(O)&&e(we)});var W=o(Ce,2),Te=S(W,!0);_(U),_(h),re(h,e=>p(M,e),()=>i(M)),n(e=>{v=x(h,1,`coach frame svelte-1195hbs`,null,v,{small:i(L),left:i(N)&&!i(E)}),y=ee(h,``,y,{bottom:i(I)?`${i(I)}px`:null}),f(se,`${i(T).key??``} · ${e??``}`),ae(C,`aria-label`,`step ${$.at+1} of ${i(T).steps.length??``}, ${$.ticks[i(T).key]?.length??0??``} done`),ve=x(U,1,`row actions svelte-1195hbs`,null,ve,{hidden:i(L)}),x(W,1,`btn ${i(O)&&!i(A)?`quiet`:`primary`}`,`svelte-1195hbs`),f(Te,i(ue)?`done`:`next ›`)},[()=>i(T).title.toLowerCase()]),l(`click`,w,()=>$.part=-1),l(`click`,ce,()=>$.left=!0),l(`click`,W,de),r(e,t)};d(H,e=>{i(w)?e(he):i(T)?i(D)&&e(_e,2):e(ge,1)}),r(t,V),ne()}c([`click`]);export{jt as default};
@@ -1 +1 @@
1
- import{$ as e,B as t,D as n,F as r,G as i,J as a,M as o,N as s,P as c,S as l,T as u,V as d,X as f,Z as p,c as m,ct as h,et as g,it as _,k as v,l as y,q as b,rt as x,u as S,ut as C,y as w}from"./Bze-M_kr.js";import{t as T}from"./BZeALCyJ.js";import"./xihTtKlq.js";import{i as E,r as D,t as O}from"./BavLcJN1.js";import{t as k}from"./-XH9wLvF.js";var A=v(`<p class="problem svelte-btgyzc" role="alert"> </p>`),j=v(`<form class="frame new svelte-btgyzc"><span class="frame-title">a new note</span> <label class="svelte-btgyzc"><span class="label">title</span> <input class="field" placeholder="Entropy" autocomplete="off"/></label> <label for="new-folder" class="svelte-btgyzc"><span class="label">folder</span></label> <!> <p class="faint path svelte-btgyzc"> </p> <!> <div class="row svelte-btgyzc"><button class="btn primary" type="submit">make it</button><button class="btn quiet" type="button">cancel</button></div></form>`),M=v(`<p class="soft empty svelte-btgyzc">This base has no notes yet. Make the first one.</p>`),N=v(`<span class="soft desc svelte-btgyzc"> </span>`),ee=v(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><!></a></li>`),te=v(`<section><h2 class="svelte-btgyzc"><span class="label"> </span><button class="btn quiet add svelte-btgyzc" type="button">+</button></h2> <ul class="svelte-btgyzc"></ul></section>`),ne=v(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><span class="soft desc svelte-btgyzc"> </span></a></li>`),re=v(`<section><h2 class="svelte-btgyzc"><span class="label">in the text</span></h2> <ul class="svelte-btgyzc"></ul></section>`),ie=v(`<p class="soft empty svelte-btgyzc">No note matches.</p>`),ae=v(`<div class="notes svelte-btgyzc"><div class="top svelte-btgyzc"><label class="hidden-label" for="filter">Find a note</label> <input id="filter" class="field grow" type="search" placeholder="find a note" autocomplete="off"/> <button class="btn primary" type="button" data-tour="new-note">new note</button></div> <!> <!> <!> <!> <!></div>`);function P(o,v){_(v,!0);let P=p(``),F=p([]),I=p(!1),L=p(``),R=p(``),z=p(``),B=e(()=>r(P).trim().toLowerCase().split(/\s+/).filter(Boolean)),V=e=>r(B).every(t=>`${e.title}\n${e.id}\n${e.description}`.toLowerCase().includes(t)),H=e(()=>r(B).length?O.listing.notes.filter(V):O.listing.notes),U=e(()=>{let e=new Map;if(!r(B).length)for(let t of O.listing.dirs)e.set(t,[]);for(let t of r(H))e.set(t.dir,[...e.get(t.dir)??[],t]);return[...e].sort(([e],[t])=>e<t?-1:+(e>t))}),W=e(()=>r(B).length?r(F).filter(e=>!r(H).some(t=>t.id===e.id)):[]);d(()=>{let e=r(P).trim();if(e.length<2){f(F,[]);return}let t=setTimeout(()=>{O.api.search(e).then(t=>{r(P).trim()===e&&f(F,t)},()=>void 0)},200);return()=>clearTimeout(t)});let G=e(()=>[r(R).trim().replace(/^\/+|\/+$/g,``),E(r(L))].filter(Boolean).join(`/`));function K(e=``){f(I,!0),f(R,e,!0),f(L,``),f(z,``)}async function oe(e){if(e.preventDefault(),!E(r(L)))f(z,`Give the note a title.`);else try{await O.api.createNote(r(G),`---\ntype: Concept\ntitle: ${JSON.stringify(r(L).trim())}\n---\n\n`),await O.refresh(),await T(D(r(G)))}catch(e){f(z,e.message,!0)}}var q=ae(),J=i(q),Y=a(i(J),2);y(Y),g(Y,!0);var se=a(Y,2);h(J);var X=a(J,2),ce=e=>{var o=j(),d=a(i(o),2),p=a(i(d),2);y(p),g(p,!0),h(d);var _=a(d,4);k(_,{id:`new-folder`,label:`folder`,placeholder:`none: the top of the base`,get value(){return r(R)},set value(e){f(R,e,!0)}});var v=a(_,2),x=b(v,!0),S=a(v,2),C=e=>{var i=A(),a=b(i,!0);t(()=>u(a,r(z))),n(e,i)};l(S,e=>{r(z)&&e(C)});var w=a(S,2),T=a(i(w));h(w),h(o),t(()=>u(x,r(G)?`${r(G)}.md`:` `)),c(`submit`,o,oe),m(p,()=>r(L),e=>f(L,e)),s(`click`,T,()=>f(I,!1)),n(e,o)};l(X,e=>{r(I)&&e(ce)});var Z=a(X,2),le=e=>{var t=M();n(e,t)};l(Z,e=>{!O.listing.notes.length&&!r(I)&&e(le)});var Q=a(Z,2);w(Q,17,()=>r(U),([e,t])=>e,(o,c)=>{var d=e(()=>C(r(c),2));let f=()=>r(d)[0],p=()=>r(d)[1];var m=te(),g=i(m),_=i(g),v=b(_,!0),y=a(_);h(g);var x=a(g,2);w(x,21,p,e=>e.id,(e,o)=>{var s=ee(),c=i(s),d=i(c),f=b(d,!0),p=a(d),m=e=>{var i=N(),a=b(i,!0);t(()=>u(a,r(o).description)),n(e,i)};l(p,e=>{r(o).description&&e(m)}),h(c),h(s),t(e=>{S(c,`href`,e),u(f,r(o).title)},[()=>D(r(o).id)]),n(e,s)}),h(x),h(m),t(()=>{u(v,f()||`the top of the base`),S(y,`aria-label`,`New note in ${f()||`the top of the base`}`)}),s(`click`,y,()=>K(f())),n(o,m)});var $=a(Q,2),ue=e=>{var o=re(),s=a(i(o),2);w(s,21,()=>r(W),e=>e.id,(e,o)=>{var s=ne(),c=i(s),l=i(c),d=b(l,!0),f=a(l),p=b(f,!0);h(c),h(s),t(e=>{S(c,`href`,e),u(d,r(o).title),u(p,r(o).snippet)},[()=>D(r(o).id)]),n(e,s)}),h(s),h(o),n(e,o)};l($,e=>{r(W).length&&e(ue)});var de=a($,2),fe=e=>{var t=ie();n(e,t)};l(de,e=>{r(B).length&&!r(H).length&&!r(W).length&&e(fe)}),h(q),m(Y,()=>r(P),e=>f(P,e)),s(`click`,se,()=>K()),n(o,q),x()}o([`click`]);export{P as t};
1
+ import{$ as e,B as t,D as n,F as r,G as i,J as a,M as o,N as s,P as c,S as l,T as u,V as d,X as f,Z as p,c as m,ct as h,et as g,it as _,k as v,l as y,q as b,rt as x,u as S,ut as C,y as w}from"./Bze-M_kr.js";import{t as T}from"./CMp5T_-1.js";import"./xihTtKlq.js";import{i as E,r as D,t as O}from"./DF3lgcLW.js";import{t as k}from"./D89YN-Dr.js";var A=v(`<p class="problem svelte-btgyzc" role="alert"> </p>`),j=v(`<form class="frame new svelte-btgyzc"><span class="frame-title">a new note</span> <label class="svelte-btgyzc"><span class="label">title</span> <input class="field" placeholder="Entropy" autocomplete="off"/></label> <label for="new-folder" class="svelte-btgyzc"><span class="label">folder</span></label> <!> <p class="faint path svelte-btgyzc"> </p> <!> <div class="row svelte-btgyzc"><button class="btn primary" type="submit">make it</button><button class="btn quiet" type="button">cancel</button></div></form>`),M=v(`<p class="soft empty svelte-btgyzc">This base has no notes yet. Make the first one.</p>`),N=v(`<span class="soft desc svelte-btgyzc"> </span>`),ee=v(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><!></a></li>`),te=v(`<section><h2 class="svelte-btgyzc"><span class="label"> </span><button class="btn quiet add svelte-btgyzc" type="button">+</button></h2> <ul class="svelte-btgyzc"></ul></section>`),ne=v(`<li class="svelte-btgyzc"><a class="svelte-btgyzc"><span class="serif title svelte-btgyzc"> </span><span class="soft desc svelte-btgyzc"> </span></a></li>`),re=v(`<section><h2 class="svelte-btgyzc"><span class="label">in the text</span></h2> <ul class="svelte-btgyzc"></ul></section>`),ie=v(`<p class="soft empty svelte-btgyzc">No note matches.</p>`),ae=v(`<div class="notes svelte-btgyzc"><div class="top svelte-btgyzc"><label class="hidden-label" for="filter">Find a note</label> <input id="filter" class="field grow" type="search" placeholder="find a note" autocomplete="off"/> <button class="btn primary" type="button" data-tour="new-note">new note</button></div> <!> <!> <!> <!> <!></div>`);function P(o,v){_(v,!0);let P=p(``),F=p([]),I=p(!1),L=p(``),R=p(``),z=p(``),B=e(()=>r(P).trim().toLowerCase().split(/\s+/).filter(Boolean)),V=e=>r(B).every(t=>`${e.title}\n${e.id}\n${e.description}`.toLowerCase().includes(t)),H=e(()=>r(B).length?O.listing.notes.filter(V):O.listing.notes),U=e(()=>{let e=new Map;if(!r(B).length)for(let t of O.listing.dirs)e.set(t,[]);for(let t of r(H))e.set(t.dir,[...e.get(t.dir)??[],t]);return[...e].sort(([e],[t])=>e<t?-1:+(e>t))}),W=e(()=>r(B).length?r(F).filter(e=>!r(H).some(t=>t.id===e.id)):[]);d(()=>{let e=r(P).trim();if(e.length<2){f(F,[]);return}let t=setTimeout(()=>{O.api.search(e).then(t=>{r(P).trim()===e&&f(F,t)},()=>void 0)},200);return()=>clearTimeout(t)});let G=e(()=>[r(R).trim().replace(/^\/+|\/+$/g,``),E(r(L))].filter(Boolean).join(`/`));function K(e=``){f(I,!0),f(R,e,!0),f(L,``),f(z,``)}async function oe(e){if(e.preventDefault(),!E(r(L)))f(z,`Give the note a title.`);else try{await O.api.createNote(r(G),`---\ntype: Concept\ntitle: ${JSON.stringify(r(L).trim())}\n---\n\n`),await O.refresh(),await T(D(r(G)))}catch(e){f(z,e.message,!0)}}var q=ae(),J=i(q),Y=a(i(J),2);y(Y),g(Y,!0);var se=a(Y,2);h(J);var X=a(J,2),ce=e=>{var o=j(),d=a(i(o),2),p=a(i(d),2);y(p),g(p,!0),h(d);var _=a(d,4);k(_,{id:`new-folder`,label:`folder`,placeholder:`none: the top of the base`,get value(){return r(R)},set value(e){f(R,e,!0)}});var v=a(_,2),x=b(v,!0),S=a(v,2),C=e=>{var i=A(),a=b(i,!0);t(()=>u(a,r(z))),n(e,i)};l(S,e=>{r(z)&&e(C)});var w=a(S,2),T=a(i(w));h(w),h(o),t(()=>u(x,r(G)?`${r(G)}.md`:` `)),c(`submit`,o,oe),m(p,()=>r(L),e=>f(L,e)),s(`click`,T,()=>f(I,!1)),n(e,o)};l(X,e=>{r(I)&&e(ce)});var Z=a(X,2),le=e=>{var t=M();n(e,t)};l(Z,e=>{!O.listing.notes.length&&!r(I)&&e(le)});var Q=a(Z,2);w(Q,17,()=>r(U),([e,t])=>e,(o,c)=>{var d=e(()=>C(r(c),2));let f=()=>r(d)[0],p=()=>r(d)[1];var m=te(),g=i(m),_=i(g),v=b(_,!0),y=a(_);h(g);var x=a(g,2);w(x,21,p,e=>e.id,(e,o)=>{var s=ee(),c=i(s),d=i(c),f=b(d,!0),p=a(d),m=e=>{var i=N(),a=b(i,!0);t(()=>u(a,r(o).description)),n(e,i)};l(p,e=>{r(o).description&&e(m)}),h(c),h(s),t(e=>{S(c,`href`,e),u(f,r(o).title)},[()=>D(r(o).id)]),n(e,s)}),h(x),h(m),t(()=>{u(v,f()||`the top of the base`),S(y,`aria-label`,`New note in ${f()||`the top of the base`}`)}),s(`click`,y,()=>K(f())),n(o,m)});var $=a(Q,2),ue=e=>{var o=re(),s=a(i(o),2);w(s,21,()=>r(W),e=>e.id,(e,o)=>{var s=ne(),c=i(s),l=i(c),d=b(l,!0),f=a(l),p=b(f,!0);h(c),h(s),t(e=>{S(c,`href`,e),u(d,r(o).title),u(p,r(o).snippet)},[()=>D(r(o).id)]),n(e,s)}),h(s),h(o),n(e,o)};l($,e=>{r(W).length&&e(ue)});var de=a($,2),fe=e=>{var t=ie();n(e,t)};l(de,e=>{r(B).length&&!r(H).length&&!r(W).length&&e(fe)}),h(q),m(Y,()=>r(P),e=>f(P,e)),s(`click`,se,()=>K()),n(o,q),x()}o([`click`]);export{P as t};
@@ -1 +1 @@
1
- import{$ as e,B as t,D as n,F as r,G as i,J as a,K as o,M as s,N as c,O as l,P as u,S as d,T as f,ct as p,i as m,it as h,k as g,p as _,q as v,rt as y,u as b,y as x}from"./Bze-M_kr.js";import"./xihTtKlq.js";import{a as S}from"./BN1DRYj2.js";var C={wrote:`wrote the note`,found:`found`,edited:`edited`,kept:`kept`,offered:`offered`,discarded:`removed`,restored:`restored an earlier version`,moved:`moved the note`,"changed elsewhere":`changed elsewhere`};function w(e){let t=e.who===`you`?`you`:e.who===`external`?`outside isorite`:e.who.startsWith(`agent:`)?S(e.who):`Iso`;return e.asked===void 0?e.who===`external`?e.what===`found`?`found as it was, outside isorite`:`changed outside isorite`:`${t} ${C[e.what]}`:`${t} · “${e.asked.length>80?e.asked.slice(0,80)+`…`:e.asked}” · ${e.what===`offered`?`not kept yet`:C[e.what]}`}function T(e,t=Date.now()){let n=Math.max(0,(t-Date.parse(e))/1e3),[r,i]=n<90?[0,`now`]:n<5400?[Math.round(n/60),`minute`]:n<129600?[Math.round(n/3600),`hour`]:[Math.round(n/86400),`day`];return i===`now`?`just now`:`${r} ${i}${r===1?``:`s`} ago`}var E=e=>e.ids.at(-1),D=g(`<i aria-hidden="true"></i>`);function O(i,a){h(a,!0);let s=e(()=>a.moment.who.startsWith(`iso:`)),c=e(()=>a.moment.who.startsWith(`agent:`));var u=l(),f=o(u),p=e=>{var i=D();let o;t(()=>o=_(i,1,`dia svelte-1jroppb`,null,o,{open:a.moment.what===`offered`||a.moment.what===`discarded`,gone:a.moment.what===`discarded`,agent:r(c)})),n(e,i)},m=e=>{var r=D();let i;t(()=>i=_(r,1,`sq`,null,i,{empty:a.moment.who===`external`})),n(e,r)};d(f,e=>{r(s)||r(c)?e(p):e(m,-1)}),n(i,u),y()}var k=g(`<span class="asked svelte-112n2zp" aria-hidden="true"> </span>`),A=g(`<li class="svelte-112n2zp"><button type="button"><!></button> <!></li>`),j=g(`<ol></ol>`);function M(o,s){h(s,!0);let l=m(s,`label`,3,e=>e.asked===void 0?void 0:`“${e.asked}”`),g=m(s,`name`,3,`The note's timeline`),S=m(s,`leftward`,3,!1);var C=j();let D;x(C,21,()=>s.moments,e=>e.ids[0],(o,m)=>{var h=A(),g=i(h);let y;O(i(g),{get moment(){return r(m)}}),p(g);var x=a(g,2),S=e=>{var i=k(),a=v(i,!0);t(e=>f(a,e),[()=>l()(r(m))]),n(e,i)},C=e(()=>s.pointed===r(m)&&l()(r(m))!==void 0);d(x,e=>{r(C)&&e(S)}),p(h),t((e,t,n,r)=>{y=_(g,1,`moment svelte-112n2zp`,null,y,{at:e}),b(g,`aria-current`,t),b(g,`aria-label`,`${n??``}, ${r??``}`)},[()=>s.at===E(r(m)),()=>s.at===E(r(m))?`step`:void 0,()=>w(r(m)),()=>T(r(m).at)]),u(`pointerenter`,g,()=>s.point(r(m))),u(`pointerleave`,g,()=>s.point(null)),u(`focus`,g,()=>s.point(r(m))),u(`blur`,g,()=>s.point(null)),c(`click`,g,()=>s.pick(r(m))),n(o,h)}),p(C),t(()=>{D=_(C,1,`timeline svelte-112n2zp`,null,D,{leftward:S()}),b(C,`aria-label`,g())}),n(o,C),y()}s([`click`]);export{E as i,T as n,w as r,M as t};
1
+ import{$ as e,B as t,D as n,F as r,G as i,J as a,K as o,M as s,N as c,O as l,P as u,S as d,T as f,ct as p,i as m,it as h,k as g,p as _,q as v,rt as y,u as b,y as x}from"./Bze-M_kr.js";import"./xihTtKlq.js";import{a as S}from"./8IM6BNk6.js";var C={wrote:`wrote the note`,found:`found`,edited:`edited`,kept:`kept`,offered:`offered`,discarded:`removed`,restored:`restored an earlier version`,moved:`moved the note`,"changed elsewhere":`changed elsewhere`};function w(e){let t=e.who===`you`?`you`:e.who===`external`?`outside isorite`:e.who.startsWith(`agent:`)?S(e.who):`Iso`;return e.asked===void 0?e.who===`external`?e.what===`found`?`found as it was, outside isorite`:`changed outside isorite`:`${t} ${C[e.what]}`:`${t} · “${e.asked.length>80?e.asked.slice(0,80)+`…`:e.asked}” · ${e.what===`offered`?`not kept yet`:C[e.what]}`}function T(e,t=Date.now()){let n=Math.max(0,(t-Date.parse(e))/1e3),[r,i]=n<90?[0,`now`]:n<5400?[Math.round(n/60),`minute`]:n<129600?[Math.round(n/3600),`hour`]:[Math.round(n/86400),`day`];return i===`now`?`just now`:`${r} ${i}${r===1?``:`s`} ago`}var E=e=>e.ids.at(-1),D=g(`<i aria-hidden="true"></i>`);function O(i,a){h(a,!0);let s=e(()=>a.moment.who.startsWith(`iso:`)),c=e(()=>a.moment.who.startsWith(`agent:`));var u=l(),f=o(u),p=e=>{var i=D();let o;t(()=>o=_(i,1,`dia svelte-1jroppb`,null,o,{open:a.moment.what===`offered`||a.moment.what===`discarded`,gone:a.moment.what===`discarded`,agent:r(c)})),n(e,i)},m=e=>{var r=D();let i;t(()=>i=_(r,1,`sq`,null,i,{empty:a.moment.who===`external`})),n(e,r)};d(f,e=>{r(s)||r(c)?e(p):e(m,-1)}),n(i,u),y()}var k=g(`<span class="asked svelte-112n2zp" aria-hidden="true"> </span>`),A=g(`<li class="svelte-112n2zp"><button type="button"><!></button> <!></li>`),j=g(`<ol></ol>`);function M(o,s){h(s,!0);let l=m(s,`label`,3,e=>e.asked===void 0?void 0:`“${e.asked}”`),g=m(s,`name`,3,`The note's timeline`),S=m(s,`leftward`,3,!1);var C=j();let D;x(C,21,()=>s.moments,e=>e.ids[0],(o,m)=>{var h=A(),g=i(h);let y;O(i(g),{get moment(){return r(m)}}),p(g);var x=a(g,2),S=e=>{var i=k(),a=v(i,!0);t(e=>f(a,e),[()=>l()(r(m))]),n(e,i)},C=e(()=>s.pointed===r(m)&&l()(r(m))!==void 0);d(x,e=>{r(C)&&e(S)}),p(h),t((e,t,n,r)=>{y=_(g,1,`moment svelte-112n2zp`,null,y,{at:e}),b(g,`aria-current`,t),b(g,`aria-label`,`${n??``}, ${r??``}`)},[()=>s.at===E(r(m)),()=>s.at===E(r(m))?`step`:void 0,()=>w(r(m)),()=>T(r(m).at)]),u(`pointerenter`,g,()=>s.point(r(m))),u(`pointerleave`,g,()=>s.point(null)),u(`focus`,g,()=>s.point(r(m))),u(`blur`,g,()=>s.point(null)),c(`click`,g,()=>s.pick(r(m))),n(o,h)}),p(C),t(()=>{D=_(C,1,`timeline svelte-112n2zp`,null,D,{leftward:S()}),b(C,`aria-label`,g())}),n(o,C),y()}s([`click`]);export{E as i,T as n,w as r,M as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DSajjyn5.js","../chunks/Bze-M_kr.js","../chunks/BZeALCyJ.js","../chunks/CRzLMJPS.js","../chunks/xihTtKlq.js","../chunks/BavLcJN1.js","../chunks/BN1DRYj2.js","../chunks/BcrJkegU.js","../chunks/D8jeeZa0.js","../assets/Timeline.KTc3LKuK.css","../chunks/BNCmWi9e.js","../chunks/DsnHcTIO.js","../chunks/Cr4-_2Vw.js","../chunks/-XH9wLvF.js","../assets/FolderField._A4_sc1Z.css","../assets/NoteList.F579Zvj_.css","../chunks/B_AYGp9o.js","../assets/0.IOi79DXH.css","../nodes/1.hmQ_l8t-.js","../nodes/2.Bu6Zvx8F.js","../chunks/DHMLhlug.js","../nodes/3.DcSG1nNk.js","../nodes/4.QUhLgH4i.js","../chunks/BqrPWk6N.js","../assets/NoteEditor.BCjOff8L.css","../assets/4.CUdclsPi.css","../nodes/5.D3JSWVyR.js","../assets/5.TsqJFEFF.css","../nodes/6.CWfUNDww.js","../nodes/7.DmPPLDvb.js","../assets/7.ljiu9bn5.css","../nodes/8.CwMTBog4.js","../assets/8.CFA9_nYZ.css"])))=>i.map(i=>d[i]);
2
- import{$ as e,B as t,D as n,F as r,G as i,H as a,J as o,K as s,L as c,O as l,S as u,T as d,V as f,X as p,Z as m,ct as h,g,i as _,it as v,j as y,k as b,n as x,r as S,rt as C,s as w}from"../chunks/Bze-M_kr.js";import{t as T}from"../chunks/CRzLMJPS.js";import"../chunks/xihTtKlq.js";var E={},D=b(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=b(`<!> <!>`,1);function k(b,S){v(S,!0);let T=_(S,`components`,23,()=>[]),E=_(S,`data_0`,3,null),k=_(S,`data_1`,3,null);a(()=>S.stores.page.set(S.page)),f(()=>{S.stores,S.page,S.constructors,T(),S.form,E(),k(),S.stores.page.notify()});let A=m(!1),j=m(!1),M=m(null);x(()=>{let e=S.stores.page.subscribe(()=>{r(A)&&(p(j,!0),c().then(()=>{p(M,document.title||`untitled page`,!0)}))});return p(A,!0),e});let N=e(()=>S.constructors[1]);var P=O(),F=s(P),I=t=>{let i=e(()=>S.constructors[0]);var a=l(),o=s(a);g(o,()=>r(i),(e,t)=>{w(t(e,{get data(){return E()},get form(){return S.form},get params(){return S.page.params},children:(e,t)=>{var i=l(),a=s(i);g(a,()=>r(N),(e,t)=>{w(t(e,{get data(){return k()},get form(){return S.form},get params(){return S.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),n(e,i)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),n(t,a)},L=t=>{let i=e(()=>S.constructors[0]);var a=l(),o=s(a);g(o,()=>r(i),(e,t)=>{w(t(e,{get data(){return E()},get form(){return S.form},get params(){return S.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),n(t,a)};u(F,e=>{S.constructors[1]?e(I):e(L,-1)});var R=o(F,2),z=e=>{var a=D(),o=i(a),s=e=>{var i=y();t(()=>d(i,r(M))),n(e,i)};u(o,e=>{r(j)&&e(s)}),h(a),n(e,a)};u(R,e=>{r(A)&&e(z)}),n(b,P),C()}var A=S(k),j=[()=>T(()=>import(`../nodes/0.DSajjyn5.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),()=>T(()=>import(`../nodes/1.hmQ_l8t-.js`),__vite__mapDeps([18,1,4,10,2]),import.meta.url),()=>T(()=>import(`../nodes/2.Bu6Zvx8F.js`),__vite__mapDeps([19,1,2,4,5,7,20]),import.meta.url),()=>T(()=>import(`../nodes/3.DcSG1nNk.js`),__vite__mapDeps([21,1,2,4,5,10,7,20]),import.meta.url),()=>T(()=>import(`../nodes/4.QUhLgH4i.js`),__vite__mapDeps([22,1,2,4,5,6,7,10,20,23,24,25]),import.meta.url),()=>T(()=>import(`../nodes/5.D3JSWVyR.js`),__vite__mapDeps([26,1,2,4,5,6,7,8,9,10,13,14,23,24,27]),import.meta.url),()=>T(()=>import(`../nodes/6.CWfUNDww.js`),__vite__mapDeps([28,1,4,12,2,5,13,14,15,20]),import.meta.url),()=>T(()=>import(`../nodes/7.DmPPLDvb.js`),__vite__mapDeps([29,1,4,16,20,30]),import.meta.url),()=>T(()=>import(`../nodes/8.CwMTBog4.js`),__vite__mapDeps([31,1,4,32]),import.meta.url)],M=[],N={"/":[2],"/atlas":[3],"/draft/[id]":[4],"/notes":[6],"/n/[...id]":[5],"/parts":[7],"/terminal":[8]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!0,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DMGdYhkH.js","../chunks/Bze-M_kr.js","../chunks/CMp5T_-1.js","../chunks/CRzLMJPS.js","../chunks/xihTtKlq.js","../chunks/DF3lgcLW.js","../chunks/8IM6BNk6.js","../chunks/CHlFgDNB.js","../chunks/DrsVvzvg.js","../assets/Timeline.KTc3LKuK.css","../chunks/BHPhFydX.js","../chunks/CGgq5NWd.js","../chunks/DmgpLvxp.js","../chunks/D89YN-Dr.js","../assets/FolderField._A4_sc1Z.css","../assets/NoteList.F579Zvj_.css","../chunks/B_AYGp9o.js","../assets/0.IOi79DXH.css","../nodes/1.Dn_0fgt7.js","../nodes/2.Y1Dd5PBI.js","../chunks/DHMLhlug.js","../nodes/3.BlxuRbLf.js","../nodes/4.Bt_H0MbN.js","../chunks/CFA70_0c.js","../assets/NoteEditor.BCjOff8L.css","../assets/4.CUdclsPi.css","../nodes/5.BJ-EVWbz.js","../assets/5.TsqJFEFF.css","../nodes/6.DDIiJnwi.js","../nodes/7.DmPPLDvb.js","../assets/7.ljiu9bn5.css","../nodes/8.CwMTBog4.js","../assets/8.CFA9_nYZ.css"])))=>i.map(i=>d[i]);
2
+ import{$ as e,B as t,D as n,F as r,G as i,H as a,J as o,K as s,L as c,O as l,S as u,T as d,V as f,X as p,Z as m,ct as h,g,i as _,it as v,j as y,k as b,n as x,r as S,rt as C,s as w}from"../chunks/Bze-M_kr.js";import{t as T}from"../chunks/CRzLMJPS.js";import"../chunks/xihTtKlq.js";var E={},D=b(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=b(`<!> <!>`,1);function k(b,S){v(S,!0);let T=_(S,`components`,23,()=>[]),E=_(S,`data_0`,3,null),k=_(S,`data_1`,3,null);a(()=>S.stores.page.set(S.page)),f(()=>{S.stores,S.page,S.constructors,T(),S.form,E(),k(),S.stores.page.notify()});let A=m(!1),j=m(!1),M=m(null);x(()=>{let e=S.stores.page.subscribe(()=>{r(A)&&(p(j,!0),c().then(()=>{p(M,document.title||`untitled page`,!0)}))});return p(A,!0),e});let N=e(()=>S.constructors[1]);var P=O(),F=s(P),I=t=>{let i=e(()=>S.constructors[0]);var a=l(),o=s(a);g(o,()=>r(i),(e,t)=>{w(t(e,{get data(){return E()},get form(){return S.form},get params(){return S.page.params},children:(e,t)=>{var i=l(),a=s(i);g(a,()=>r(N),(e,t)=>{w(t(e,{get data(){return k()},get form(){return S.form},get params(){return S.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),n(e,i)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),n(t,a)},L=t=>{let i=e(()=>S.constructors[0]);var a=l(),o=s(a);g(o,()=>r(i),(e,t)=>{w(t(e,{get data(){return E()},get form(){return S.form},get params(){return S.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),n(t,a)};u(F,e=>{S.constructors[1]?e(I):e(L,-1)});var R=o(F,2),z=e=>{var a=D(),o=i(a),s=e=>{var i=y();t(()=>d(i,r(M))),n(e,i)};u(o,e=>{r(j)&&e(s)}),h(a),n(e,a)};u(R,e=>{r(A)&&e(z)}),n(b,P),C()}var A=S(k),j=[()=>T(()=>import(`../nodes/0.DMGdYhkH.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),()=>T(()=>import(`../nodes/1.Dn_0fgt7.js`),__vite__mapDeps([18,1,4,10,2]),import.meta.url),()=>T(()=>import(`../nodes/2.Y1Dd5PBI.js`),__vite__mapDeps([19,1,2,4,5,7,20]),import.meta.url),()=>T(()=>import(`../nodes/3.BlxuRbLf.js`),__vite__mapDeps([21,1,2,4,5,10,7,20]),import.meta.url),()=>T(()=>import(`../nodes/4.Bt_H0MbN.js`),__vite__mapDeps([22,1,2,4,5,6,7,10,20,23,24,25]),import.meta.url),()=>T(()=>import(`../nodes/5.BJ-EVWbz.js`),__vite__mapDeps([26,1,2,4,5,6,7,8,9,10,13,14,23,24,27]),import.meta.url),()=>T(()=>import(`../nodes/6.DDIiJnwi.js`),__vite__mapDeps([28,1,4,12,2,5,13,14,15,20]),import.meta.url),()=>T(()=>import(`../nodes/7.DmPPLDvb.js`),__vite__mapDeps([29,1,4,16,20,30]),import.meta.url),()=>T(()=>import(`../nodes/8.CwMTBog4.js`),__vite__mapDeps([31,1,4,32]),import.meta.url)],M=[],N={"/":[2],"/atlas":[3],"/draft/[id]":[4],"/notes":[6],"/n/[...id]":[5],"/parts":[7],"/terminal":[8]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!0,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
@@ -0,0 +1 @@
1
+ export{a as load_css,n as start}from"../chunks/CMp5T_-1.js";