mebubo commited on
Commit
8214506
·
1 Parent(s): 2ab6475
frontend/esbuild.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as esbuild from 'esbuild'
2
+
3
+ esbuild
4
+ .build({
5
+ entryPoints: [
6
+ "./src/index.tsx",
7
+ ],
8
+ bundle: true,
9
+ minify: false,
10
+ sourcemap: process.env.NODE_ENV !== "production",
11
+ target: ["chrome120", "firefox110"],
12
+ outdir: "public",
13
+ outbase: "src",
14
+ define: {
15
+ "process.env.NODE_ENV": `"${process.env.NODE_ENV}"`
16
+ }
17
+ })
18
+ .catch(() => process.exit(1))
frontend/package-lock.json ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "frontend",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "frontend",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@types/react": "^18.3.11",
17
+ "@types/react-dom": "^18.3.1",
18
+ "esbuild": "^0.24.0",
19
+ "typescript": "^5.6.3"
20
+ }
21
+ },
22
+ "node_modules/@esbuild/aix-ppc64": {
23
+ "version": "0.24.0",
24
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz",
25
+ "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==",
26
+ "cpu": [
27
+ "ppc64"
28
+ ],
29
+ "dev": true,
30
+ "license": "MIT",
31
+ "optional": true,
32
+ "os": [
33
+ "aix"
34
+ ],
35
+ "engines": {
36
+ "node": ">=18"
37
+ }
38
+ },
39
+ "node_modules/@esbuild/android-arm": {
40
+ "version": "0.24.0",
41
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz",
42
+ "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==",
43
+ "cpu": [
44
+ "arm"
45
+ ],
46
+ "dev": true,
47
+ "license": "MIT",
48
+ "optional": true,
49
+ "os": [
50
+ "android"
51
+ ],
52
+ "engines": {
53
+ "node": ">=18"
54
+ }
55
+ },
56
+ "node_modules/@esbuild/android-arm64": {
57
+ "version": "0.24.0",
58
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz",
59
+ "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==",
60
+ "cpu": [
61
+ "arm64"
62
+ ],
63
+ "dev": true,
64
+ "license": "MIT",
65
+ "optional": true,
66
+ "os": [
67
+ "android"
68
+ ],
69
+ "engines": {
70
+ "node": ">=18"
71
+ }
72
+ },
73
+ "node_modules/@esbuild/android-x64": {
74
+ "version": "0.24.0",
75
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz",
76
+ "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==",
77
+ "cpu": [
78
+ "x64"
79
+ ],
80
+ "dev": true,
81
+ "license": "MIT",
82
+ "optional": true,
83
+ "os": [
84
+ "android"
85
+ ],
86
+ "engines": {
87
+ "node": ">=18"
88
+ }
89
+ },
90
+ "node_modules/@esbuild/darwin-arm64": {
91
+ "version": "0.24.0",
92
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz",
93
+ "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==",
94
+ "cpu": [
95
+ "arm64"
96
+ ],
97
+ "dev": true,
98
+ "license": "MIT",
99
+ "optional": true,
100
+ "os": [
101
+ "darwin"
102
+ ],
103
+ "engines": {
104
+ "node": ">=18"
105
+ }
106
+ },
107
+ "node_modules/@esbuild/darwin-x64": {
108
+ "version": "0.24.0",
109
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz",
110
+ "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==",
111
+ "cpu": [
112
+ "x64"
113
+ ],
114
+ "dev": true,
115
+ "license": "MIT",
116
+ "optional": true,
117
+ "os": [
118
+ "darwin"
119
+ ],
120
+ "engines": {
121
+ "node": ">=18"
122
+ }
123
+ },
124
+ "node_modules/@esbuild/freebsd-arm64": {
125
+ "version": "0.24.0",
126
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz",
127
+ "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==",
128
+ "cpu": [
129
+ "arm64"
130
+ ],
131
+ "dev": true,
132
+ "license": "MIT",
133
+ "optional": true,
134
+ "os": [
135
+ "freebsd"
136
+ ],
137
+ "engines": {
138
+ "node": ">=18"
139
+ }
140
+ },
141
+ "node_modules/@esbuild/freebsd-x64": {
142
+ "version": "0.24.0",
143
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz",
144
+ "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==",
145
+ "cpu": [
146
+ "x64"
147
+ ],
148
+ "dev": true,
149
+ "license": "MIT",
150
+ "optional": true,
151
+ "os": [
152
+ "freebsd"
153
+ ],
154
+ "engines": {
155
+ "node": ">=18"
156
+ }
157
+ },
158
+ "node_modules/@esbuild/linux-arm": {
159
+ "version": "0.24.0",
160
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz",
161
+ "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==",
162
+ "cpu": [
163
+ "arm"
164
+ ],
165
+ "dev": true,
166
+ "license": "MIT",
167
+ "optional": true,
168
+ "os": [
169
+ "linux"
170
+ ],
171
+ "engines": {
172
+ "node": ">=18"
173
+ }
174
+ },
175
+ "node_modules/@esbuild/linux-arm64": {
176
+ "version": "0.24.0",
177
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz",
178
+ "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==",
179
+ "cpu": [
180
+ "arm64"
181
+ ],
182
+ "dev": true,
183
+ "license": "MIT",
184
+ "optional": true,
185
+ "os": [
186
+ "linux"
187
+ ],
188
+ "engines": {
189
+ "node": ">=18"
190
+ }
191
+ },
192
+ "node_modules/@esbuild/linux-ia32": {
193
+ "version": "0.24.0",
194
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz",
195
+ "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==",
196
+ "cpu": [
197
+ "ia32"
198
+ ],
199
+ "dev": true,
200
+ "license": "MIT",
201
+ "optional": true,
202
+ "os": [
203
+ "linux"
204
+ ],
205
+ "engines": {
206
+ "node": ">=18"
207
+ }
208
+ },
209
+ "node_modules/@esbuild/linux-loong64": {
210
+ "version": "0.24.0",
211
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz",
212
+ "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==",
213
+ "cpu": [
214
+ "loong64"
215
+ ],
216
+ "dev": true,
217
+ "license": "MIT",
218
+ "optional": true,
219
+ "os": [
220
+ "linux"
221
+ ],
222
+ "engines": {
223
+ "node": ">=18"
224
+ }
225
+ },
226
+ "node_modules/@esbuild/linux-mips64el": {
227
+ "version": "0.24.0",
228
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz",
229
+ "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==",
230
+ "cpu": [
231
+ "mips64el"
232
+ ],
233
+ "dev": true,
234
+ "license": "MIT",
235
+ "optional": true,
236
+ "os": [
237
+ "linux"
238
+ ],
239
+ "engines": {
240
+ "node": ">=18"
241
+ }
242
+ },
243
+ "node_modules/@esbuild/linux-ppc64": {
244
+ "version": "0.24.0",
245
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz",
246
+ "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==",
247
+ "cpu": [
248
+ "ppc64"
249
+ ],
250
+ "dev": true,
251
+ "license": "MIT",
252
+ "optional": true,
253
+ "os": [
254
+ "linux"
255
+ ],
256
+ "engines": {
257
+ "node": ">=18"
258
+ }
259
+ },
260
+ "node_modules/@esbuild/linux-riscv64": {
261
+ "version": "0.24.0",
262
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz",
263
+ "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==",
264
+ "cpu": [
265
+ "riscv64"
266
+ ],
267
+ "dev": true,
268
+ "license": "MIT",
269
+ "optional": true,
270
+ "os": [
271
+ "linux"
272
+ ],
273
+ "engines": {
274
+ "node": ">=18"
275
+ }
276
+ },
277
+ "node_modules/@esbuild/linux-s390x": {
278
+ "version": "0.24.0",
279
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz",
280
+ "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==",
281
+ "cpu": [
282
+ "s390x"
283
+ ],
284
+ "dev": true,
285
+ "license": "MIT",
286
+ "optional": true,
287
+ "os": [
288
+ "linux"
289
+ ],
290
+ "engines": {
291
+ "node": ">=18"
292
+ }
293
+ },
294
+ "node_modules/@esbuild/linux-x64": {
295
+ "version": "0.24.0",
296
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz",
297
+ "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==",
298
+ "cpu": [
299
+ "x64"
300
+ ],
301
+ "dev": true,
302
+ "license": "MIT",
303
+ "optional": true,
304
+ "os": [
305
+ "linux"
306
+ ],
307
+ "engines": {
308
+ "node": ">=18"
309
+ }
310
+ },
311
+ "node_modules/@esbuild/netbsd-x64": {
312
+ "version": "0.24.0",
313
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz",
314
+ "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==",
315
+ "cpu": [
316
+ "x64"
317
+ ],
318
+ "dev": true,
319
+ "license": "MIT",
320
+ "optional": true,
321
+ "os": [
322
+ "netbsd"
323
+ ],
324
+ "engines": {
325
+ "node": ">=18"
326
+ }
327
+ },
328
+ "node_modules/@esbuild/openbsd-arm64": {
329
+ "version": "0.24.0",
330
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz",
331
+ "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==",
332
+ "cpu": [
333
+ "arm64"
334
+ ],
335
+ "dev": true,
336
+ "license": "MIT",
337
+ "optional": true,
338
+ "os": [
339
+ "openbsd"
340
+ ],
341
+ "engines": {
342
+ "node": ">=18"
343
+ }
344
+ },
345
+ "node_modules/@esbuild/openbsd-x64": {
346
+ "version": "0.24.0",
347
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz",
348
+ "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==",
349
+ "cpu": [
350
+ "x64"
351
+ ],
352
+ "dev": true,
353
+ "license": "MIT",
354
+ "optional": true,
355
+ "os": [
356
+ "openbsd"
357
+ ],
358
+ "engines": {
359
+ "node": ">=18"
360
+ }
361
+ },
362
+ "node_modules/@esbuild/sunos-x64": {
363
+ "version": "0.24.0",
364
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz",
365
+ "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==",
366
+ "cpu": [
367
+ "x64"
368
+ ],
369
+ "dev": true,
370
+ "license": "MIT",
371
+ "optional": true,
372
+ "os": [
373
+ "sunos"
374
+ ],
375
+ "engines": {
376
+ "node": ">=18"
377
+ }
378
+ },
379
+ "node_modules/@esbuild/win32-arm64": {
380
+ "version": "0.24.0",
381
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz",
382
+ "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==",
383
+ "cpu": [
384
+ "arm64"
385
+ ],
386
+ "dev": true,
387
+ "license": "MIT",
388
+ "optional": true,
389
+ "os": [
390
+ "win32"
391
+ ],
392
+ "engines": {
393
+ "node": ">=18"
394
+ }
395
+ },
396
+ "node_modules/@esbuild/win32-ia32": {
397
+ "version": "0.24.0",
398
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz",
399
+ "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==",
400
+ "cpu": [
401
+ "ia32"
402
+ ],
403
+ "dev": true,
404
+ "license": "MIT",
405
+ "optional": true,
406
+ "os": [
407
+ "win32"
408
+ ],
409
+ "engines": {
410
+ "node": ">=18"
411
+ }
412
+ },
413
+ "node_modules/@esbuild/win32-x64": {
414
+ "version": "0.24.0",
415
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz",
416
+ "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==",
417
+ "cpu": [
418
+ "x64"
419
+ ],
420
+ "dev": true,
421
+ "license": "MIT",
422
+ "optional": true,
423
+ "os": [
424
+ "win32"
425
+ ],
426
+ "engines": {
427
+ "node": ">=18"
428
+ }
429
+ },
430
+ "node_modules/@types/prop-types": {
431
+ "version": "15.7.13",
432
+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz",
433
+ "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==",
434
+ "dev": true,
435
+ "license": "MIT"
436
+ },
437
+ "node_modules/@types/react": {
438
+ "version": "18.3.11",
439
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz",
440
+ "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==",
441
+ "dev": true,
442
+ "license": "MIT",
443
+ "dependencies": {
444
+ "@types/prop-types": "*",
445
+ "csstype": "^3.0.2"
446
+ }
447
+ },
448
+ "node_modules/@types/react-dom": {
449
+ "version": "18.3.1",
450
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz",
451
+ "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==",
452
+ "dev": true,
453
+ "license": "MIT",
454
+ "dependencies": {
455
+ "@types/react": "*"
456
+ }
457
+ },
458
+ "node_modules/csstype": {
459
+ "version": "3.1.3",
460
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
461
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
462
+ "dev": true,
463
+ "license": "MIT"
464
+ },
465
+ "node_modules/esbuild": {
466
+ "version": "0.24.0",
467
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz",
468
+ "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==",
469
+ "dev": true,
470
+ "hasInstallScript": true,
471
+ "license": "MIT",
472
+ "bin": {
473
+ "esbuild": "bin/esbuild"
474
+ },
475
+ "engines": {
476
+ "node": ">=18"
477
+ },
478
+ "optionalDependencies": {
479
+ "@esbuild/aix-ppc64": "0.24.0",
480
+ "@esbuild/android-arm": "0.24.0",
481
+ "@esbuild/android-arm64": "0.24.0",
482
+ "@esbuild/android-x64": "0.24.0",
483
+ "@esbuild/darwin-arm64": "0.24.0",
484
+ "@esbuild/darwin-x64": "0.24.0",
485
+ "@esbuild/freebsd-arm64": "0.24.0",
486
+ "@esbuild/freebsd-x64": "0.24.0",
487
+ "@esbuild/linux-arm": "0.24.0",
488
+ "@esbuild/linux-arm64": "0.24.0",
489
+ "@esbuild/linux-ia32": "0.24.0",
490
+ "@esbuild/linux-loong64": "0.24.0",
491
+ "@esbuild/linux-mips64el": "0.24.0",
492
+ "@esbuild/linux-ppc64": "0.24.0",
493
+ "@esbuild/linux-riscv64": "0.24.0",
494
+ "@esbuild/linux-s390x": "0.24.0",
495
+ "@esbuild/linux-x64": "0.24.0",
496
+ "@esbuild/netbsd-x64": "0.24.0",
497
+ "@esbuild/openbsd-arm64": "0.24.0",
498
+ "@esbuild/openbsd-x64": "0.24.0",
499
+ "@esbuild/sunos-x64": "0.24.0",
500
+ "@esbuild/win32-arm64": "0.24.0",
501
+ "@esbuild/win32-ia32": "0.24.0",
502
+ "@esbuild/win32-x64": "0.24.0"
503
+ }
504
+ },
505
+ "node_modules/js-tokens": {
506
+ "version": "4.0.0",
507
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
508
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
509
+ "license": "MIT"
510
+ },
511
+ "node_modules/loose-envify": {
512
+ "version": "1.4.0",
513
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
514
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
515
+ "license": "MIT",
516
+ "dependencies": {
517
+ "js-tokens": "^3.0.0 || ^4.0.0"
518
+ },
519
+ "bin": {
520
+ "loose-envify": "cli.js"
521
+ }
522
+ },
523
+ "node_modules/react": {
524
+ "version": "18.3.1",
525
+ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
526
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
527
+ "license": "MIT",
528
+ "dependencies": {
529
+ "loose-envify": "^1.1.0"
530
+ },
531
+ "engines": {
532
+ "node": ">=0.10.0"
533
+ }
534
+ },
535
+ "node_modules/react-dom": {
536
+ "version": "18.3.1",
537
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
538
+ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
539
+ "license": "MIT",
540
+ "dependencies": {
541
+ "loose-envify": "^1.1.0",
542
+ "scheduler": "^0.23.2"
543
+ },
544
+ "peerDependencies": {
545
+ "react": "^18.3.1"
546
+ }
547
+ },
548
+ "node_modules/scheduler": {
549
+ "version": "0.23.2",
550
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
551
+ "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
552
+ "license": "MIT",
553
+ "dependencies": {
554
+ "loose-envify": "^1.1.0"
555
+ }
556
+ },
557
+ "node_modules/typescript": {
558
+ "version": "5.6.3",
559
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
560
+ "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
561
+ "dev": true,
562
+ "license": "Apache-2.0",
563
+ "bin": {
564
+ "tsc": "bin/tsc",
565
+ "tsserver": "bin/tsserver"
566
+ },
567
+ "engines": {
568
+ "node": ">=14.17"
569
+ }
570
+ }
571
+ }
572
+ }
frontend/package.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "frontend",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "node esbuild.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": "",
12
+ "dependencies": {
13
+ "react": "^18.3.1",
14
+ "react-dom": "^18.3.1"
15
+ },
16
+ "devDependencies": {
17
+ "@types/react": "^18.3.11",
18
+ "@types/react-dom": "^18.3.1",
19
+ "esbuild": "^0.24.0",
20
+ "typescript": "^5.6.3"
21
+ }
22
+ }
frontend/public/index.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ main {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1rem;
5
+ width: 100%;
6
+ }
7
+
8
+ label {
9
+ display: flex;
10
+ flex-flow: row wrap;
11
+ align-items: center;
12
+ gap: 0.5rem;
13
+ text-align: left;
14
+ }
15
+
16
+ label.missing > input {
17
+ border: 1px solid red;
18
+ }
19
+
20
+ label > textarea {
21
+ flex-basis: 100%;
22
+ }
23
+
24
+ #api-token > button {
25
+ width: 5rem;
26
+ padding: 0.2rem;
27
+ }
28
+
29
+ details > summary {
30
+ text-align: left;
31
+ }
32
+
33
+ #inner {
34
+ flex: 1;
35
+ display: flex;
36
+ flex-direction: column;
37
+ }
38
+
39
+ #inner > *:first-child {
40
+ min-height: 20ch;
41
+ border: 1px solid black;
42
+ padding: 0.5rem;
43
+ }
44
+
45
+ .result {
46
+ text-align: left;
47
+ }
48
+
49
+ .error {
50
+ text-align: left;
51
+ font-family: monospace;
52
+ color: red;
53
+ }
frontend/public/index.html ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>GPTed</title>
5
+ <link rel="stylesheet" href="index.css">
6
+ </head>
7
+ <body>
8
+ <h1>GPTed with suggestions</h1>
9
+ <div id="app"></div>
10
+ <script src="index.js"></script>
11
+ </body>
12
+ </html>
frontend/src/components/app.tsx ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { useState } from "react"
2
+
3
+ export default function App() {
4
+ const [threshold, setThreshold] = useState(0.0)
5
+ const [context, setContext] = useState("")
6
+ const [wordlist, setWordlist] = useState("")
7
+ const [showWholePrompt, setShowWholePrompt] = useState(false)
8
+ const [checked, setChecked] = useState(false)
9
+ const [text, setText] = useState("")
10
+
11
+ const click = () => {
12
+ setChecked(true)
13
+ }
14
+
15
+ let result
16
+
17
+ if (checked === null) {
18
+ result = <textarea value={text} />
19
+ } else {
20
+ result = <div className="result">
21
+ {text}
22
+ </div>
23
+ }
24
+
25
+ return (
26
+ <>
27
+ <h1>GPTed</h1>
28
+
29
+ <details>
30
+ <summary>Advanced settings</summary>
31
+ <label>
32
+ <strong>Threshold:</strong> <input type="number" step="0.1" value={threshold} />
33
+ <small>
34
+ The <a href="https://en.wikipedia.org/wiki/Log_probability" target="_blank" rel="noreferrer">logprob</a> threshold.
35
+ Tokens with logprobs smaller than this will be marked red.
36
+ </small>
37
+ </label>
38
+ <label>
39
+ <strong>Context:</strong> <small>Context for the text, which can help GPT3 better rank certain words.</small>
40
+ <textarea placeholder="A short essay about picnics" value={context} />
41
+ </label>
42
+ <label>
43
+ <strong>Dictionary:</strong>
44
+ <small>Known words or phrases. Helpful for uncommon or invented words and names.</small>
45
+ <textarea placeholder="jujubu eschaton Frodo Baggins" value={wordlist} />
46
+ </label>
47
+ <label>
48
+ <strong>Show whole prompt:</strong> <input type="checkbox" checked={showWholePrompt} />
49
+ <small>
50
+ Show the whole prompt in the token view, instead of just your text. Mostly useful for debugging or curiosity.
51
+ </small>
52
+ </label>
53
+ </details>
54
+
55
+ <section id="inner">
56
+ {result}
57
+ <button onClick={click}>
58
+ {checked ? "Check" : "Edit"}
59
+ </button>
60
+
61
+ <p>
62
+ <small>
63
+ Made by <a href="https://vgel.me">Theia Vogel</a> (<a href="https://twitter.com/voooooogel">@voooooogel</a>).
64
+ Made with Svelte, GPT-3, and transitively, most of the web.
65
+ <br />
66
+ This software is provided with absolutely no warranty.
67
+ </small>
68
+ </p>
69
+ </section>
70
+ </>
71
+ )
72
+ }
frontend/src/index.tsx ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import { createRoot } from "react-dom/client"
2
+ import App from "./components/app"
3
+
4
+ const app = document.getElementById("app")
5
+
6
+ const root = createRoot(app!)
7
+
8
+ root.render(App())
frontend/tsconfig.json ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ "jsx": "react", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "ESNext", /* Specify what module code is generated. */
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
43
+ // "resolveJsonModule": true, /* Enable importing .json files. */
44
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
45
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
46
+
47
+ /* JavaScript Support */
48
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
49
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
50
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
51
+
52
+ /* Emit */
53
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
54
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
55
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
57
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
58
+ // "noEmit": true, /* Disable emitting files from a compilation. */
59
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
60
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
61
+ // "removeComments": true, /* Disable emitting comments. */
62
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
63
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
69
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
+
75
+ /* Interop Constraints */
76
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
77
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
78
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
79
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
+
84
+ /* Type Checking */
85
+ "strict": true, /* Enable all strict type-checking options. */
86
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
92
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
93
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
94
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
95
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
96
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
97
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
98
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
99
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
100
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
101
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
102
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
103
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
104
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
105
+
106
+ /* Completeness */
107
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
108
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
109
+ }
110
+ }