gemi 0.183.1 → 0.185.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/generate.d.ts +29 -0
- package/dist/ai/generate.d.ts.map +1 -1
- package/dist/ai/index.d.ts +3 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +90 -90
- package/dist/ai/index.js.map +2 -2
- package/dist/ai/partialJson.d.ts +68 -0
- package/dist/ai/partialJson.d.ts.map +1 -0
- package/dist/app/index.js +1 -1
- package/dist/auth/AuthController.d.ts.map +1 -1
- package/dist/auth/oauth/GitHubOAuthProvider.d.ts +60 -0
- package/dist/auth/oauth/GitHubOAuthProvider.d.ts.map +1 -0
- package/dist/auth/oauth/GoogleOAuthProvider.d.ts +18 -3
- package/dist/auth/oauth/GoogleOAuthProvider.d.ts.map +1 -1
- package/dist/auth/oauth/InstagramOAuthProvider.d.ts +12 -1
- package/dist/auth/oauth/InstagramOAuthProvider.d.ts.map +1 -1
- package/dist/auth/oauth/OAuthProvider.d.ts +23 -0
- package/dist/auth/oauth/OAuthProvider.d.ts.map +1 -1
- package/dist/auth/oauth/XOAuthProvider.d.ts +12 -1
- package/dist/auth/oauth/XOAuthProvider.d.ts.map +1 -1
- package/dist/auth/oauth/client.d.ts +69 -0
- package/dist/auth/oauth/client.d.ts.map +1 -0
- package/dist/auth/oauth/oauthState.d.ts +7 -1
- package/dist/auth/oauth/oauthState.d.ts.map +1 -1
- package/dist/auth/oauth/providers.d.ts +3 -2
- package/dist/auth/oauth/providers.d.ts.map +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-adsbv4rm.js → chunk-00sj67nx.js} +2 -2
- package/dist/{chunk-adsbv4rm.js.map → chunk-00sj67nx.js.map} +1 -1
- package/dist/{chunk-r1sjx2q9.js → chunk-0ahecas6.js} +2 -2
- package/dist/{chunk-r1sjx2q9.js.map → chunk-0ahecas6.js.map} +1 -1
- package/dist/{chunk-f54p1qc9.js → chunk-0rkastve.js} +5 -5
- package/dist/{chunk-f54p1qc9.js.map → chunk-0rkastve.js.map} +6 -6
- package/dist/{chunk-vm3ayd1b.js → chunk-2qac05gb.js} +3 -3
- package/dist/{chunk-vm3ayd1b.js.map → chunk-2qac05gb.js.map} +1 -1
- package/dist/{chunk-k6x35rn5.js → chunk-2rpz1p8g.js} +1 -1
- package/dist/{chunk-ztvewkks.js → chunk-3derdn99.js} +3 -3
- package/dist/{chunk-ztvewkks.js.map → chunk-3derdn99.js.map} +1 -1
- package/dist/{chunk-g57cg31m.js → chunk-3fm7gmp5.js} +2 -2
- package/dist/{chunk-g57cg31m.js.map → chunk-3fm7gmp5.js.map} +1 -1
- package/dist/{chunk-yrd14jjt.js → chunk-3jpj6hjh.js} +1 -1
- package/dist/{chunk-ynrqt4gq.js → chunk-4q505by7.js} +2 -2
- package/dist/{chunk-ynrqt4gq.js.map → chunk-4q505by7.js.map} +1 -1
- package/dist/{chunk-7g90w0t6.js → chunk-64r5cs5g.js} +1 -1
- package/dist/{chunk-6s7bb50m.js → chunk-6d3527qt.js} +3 -3
- package/dist/{chunk-6s7bb50m.js.map → chunk-6d3527qt.js.map} +1 -1
- package/dist/{chunk-3jnnma7m.js → chunk-6daabbfj.js} +2 -2
- package/dist/{chunk-3jnnma7m.js.map → chunk-6daabbfj.js.map} +1 -1
- package/dist/{chunk-am9gmm5a.js → chunk-6tferehw.js} +2 -2
- package/dist/{chunk-am9gmm5a.js.map → chunk-6tferehw.js.map} +1 -1
- package/dist/{chunk-q9xsgn2s.js → chunk-7b10n8m8.js} +2 -2
- package/dist/{chunk-q9xsgn2s.js.map → chunk-7b10n8m8.js.map} +1 -1
- package/dist/{chunk-rz6npg3r.js → chunk-7bz43qbt.js} +3 -3
- package/dist/{chunk-rz6npg3r.js.map → chunk-7bz43qbt.js.map} +1 -1
- package/dist/{chunk-07ttfngb.js → chunk-7dhvb6nn.js} +2 -2
- package/dist/{chunk-07ttfngb.js.map → chunk-7dhvb6nn.js.map} +1 -1
- package/dist/{chunk-ambptjfh.js → chunk-7gnspwra.js} +2 -2
- package/dist/{chunk-ambptjfh.js.map → chunk-7gnspwra.js.map} +1 -1
- package/dist/{chunk-njrnn5dw.js → chunk-7tm669mw.js} +2 -2
- package/dist/{chunk-njrnn5dw.js.map → chunk-7tm669mw.js.map} +1 -1
- package/dist/{chunk-btt706nx.js → chunk-810nrvt4.js} +2 -2
- package/dist/{chunk-btt706nx.js.map → chunk-810nrvt4.js.map} +1 -1
- package/dist/{chunk-7fzwgvyg.js → chunk-84j5b07n.js} +1 -1
- package/dist/{chunk-tr8s1z7k.js → chunk-87nekrjj.js} +3 -3
- package/dist/{chunk-tr8s1z7k.js.map → chunk-87nekrjj.js.map} +1 -1
- package/dist/{chunk-1kcv4dyh.js → chunk-87pn20z5.js} +2 -2
- package/dist/{chunk-1kcv4dyh.js.map → chunk-87pn20z5.js.map} +1 -1
- package/dist/{chunk-t797crcj.js → chunk-96r16t57.js} +3 -3
- package/dist/{chunk-t797crcj.js.map → chunk-96r16t57.js.map} +1 -1
- package/dist/{chunk-vfaen5tf.js → chunk-9mf6qzxy.js} +2 -2
- package/dist/{chunk-vfaen5tf.js.map → chunk-9mf6qzxy.js.map} +1 -1
- package/dist/{chunk-fzwaybhd.js → chunk-a1414jdv.js} +3 -3
- package/dist/{chunk-fzwaybhd.js.map → chunk-a1414jdv.js.map} +1 -1
- package/dist/chunk-a1r1r1z7.js +42 -0
- package/dist/{chunk-91vxf94n.js.map → chunk-a1r1r1z7.js.map} +5 -4
- package/dist/{chunk-pt159v3n.js → chunk-b55zt46z.js} +2 -2
- package/dist/{chunk-pt159v3n.js.map → chunk-b55zt46z.js.map} +1 -1
- package/dist/{chunk-1863jd18.js → chunk-beqhakdf.js} +2 -2
- package/dist/{chunk-1863jd18.js.map → chunk-beqhakdf.js.map} +1 -1
- package/dist/{chunk-s9etcqcq.js → chunk-bg2e7stx.js} +2 -2
- package/dist/{chunk-s9etcqcq.js.map → chunk-bg2e7stx.js.map} +1 -1
- package/dist/{chunk-skyt9hyg.js → chunk-bm3pyh9m.js} +2 -2
- package/dist/{chunk-skyt9hyg.js.map → chunk-bm3pyh9m.js.map} +1 -1
- package/dist/{chunk-wa7rtfkk.js → chunk-c07s6w45.js} +1 -1
- package/dist/{chunk-g09qz75d.js → chunk-cf5a958j.js} +2 -2
- package/dist/{chunk-g09qz75d.js.map → chunk-cf5a958j.js.map} +1 -1
- package/dist/{chunk-5d6h1znx.js → chunk-d5ftst76.js} +2 -2
- package/dist/{chunk-5d6h1znx.js.map → chunk-d5ftst76.js.map} +1 -1
- package/dist/{chunk-tvvqhwa3.js → chunk-d9pnjkxr.js} +2 -2
- package/dist/{chunk-tvvqhwa3.js.map → chunk-d9pnjkxr.js.map} +1 -1
- package/dist/{chunk-7pbwmt7j.js → chunk-dezd1fn5.js} +2 -2
- package/dist/{chunk-7pbwmt7j.js.map → chunk-dezd1fn5.js.map} +1 -1
- package/dist/{chunk-6dzm2pv7.js → chunk-dh4ax9cj.js} +2 -2
- package/dist/{chunk-6dzm2pv7.js.map → chunk-dh4ax9cj.js.map} +1 -1
- package/dist/{chunk-0hr6k996.js → chunk-e38xa29v.js} +2 -2
- package/dist/{chunk-0hr6k996.js.map → chunk-e38xa29v.js.map} +1 -1
- package/dist/{chunk-h5s56wzw.js → chunk-ecv4mtgh.js} +2 -2
- package/dist/{chunk-h5s56wzw.js.map → chunk-ecv4mtgh.js.map} +1 -1
- package/dist/chunk-f25x1sn1.js +5 -0
- package/dist/{chunk-y82d4w0m.js.map → chunk-f25x1sn1.js.map} +1 -1
- package/dist/{chunk-9beqhac6.js → chunk-f2tjtwm0.js} +2 -2
- package/dist/{chunk-9beqhac6.js.map → chunk-f2tjtwm0.js.map} +1 -1
- package/dist/{chunk-vgmmftm2.js → chunk-fdpvgeey.js} +2 -2
- package/dist/{chunk-vgmmftm2.js.map → chunk-fdpvgeey.js.map} +1 -1
- package/dist/{chunk-3m791vwf.js → chunk-g32mpf79.js} +2 -2
- package/dist/{chunk-3m791vwf.js.map → chunk-g32mpf79.js.map} +1 -1
- package/dist/{chunk-gprc53rf.js → chunk-gtdf51jz.js} +1 -1
- package/dist/{chunk-xnfkz18n.js → chunk-h2t135y3.js} +3 -3
- package/dist/{chunk-xnfkz18n.js.map → chunk-h2t135y3.js.map} +1 -1
- package/dist/{chunk-9brq77q6.js → chunk-hq710s2a.js} +3 -3
- package/dist/{chunk-9brq77q6.js.map → chunk-hq710s2a.js.map} +1 -1
- package/dist/{chunk-k1v0xgwe.js → chunk-kcvzs31p.js} +2 -2
- package/dist/{chunk-k1v0xgwe.js.map → chunk-kcvzs31p.js.map} +1 -1
- package/dist/{chunk-5f4k3n9x.js → chunk-krgwft9w.js} +2 -2
- package/dist/{chunk-5f4k3n9x.js.map → chunk-krgwft9w.js.map} +1 -1
- package/dist/{chunk-7rmsc511.js → chunk-kzv3v0tm.js} +3 -3
- package/dist/{chunk-7rmsc511.js.map → chunk-kzv3v0tm.js.map} +1 -1
- package/dist/{chunk-8z1z4zbq.js → chunk-m906xc76.js} +2 -2
- package/dist/{chunk-8z1z4zbq.js.map → chunk-m906xc76.js.map} +1 -1
- package/dist/{chunk-xh3qqmbk.js → chunk-mpreff3t.js} +2 -2
- package/dist/{chunk-xh3qqmbk.js.map → chunk-mpreff3t.js.map} +1 -1
- package/dist/{chunk-6bf04rk5.js → chunk-mpt1zsfv.js} +2 -2
- package/dist/{chunk-6bf04rk5.js.map → chunk-mpt1zsfv.js.map} +1 -1
- package/dist/{chunk-ry9jard2.js → chunk-nadkwh8a.js} +3 -3
- package/dist/{chunk-ry9jard2.js.map → chunk-nadkwh8a.js.map} +1 -1
- package/dist/{chunk-g0ps09h7.js → chunk-przahq2e.js} +2 -2
- package/dist/{chunk-g0ps09h7.js.map → chunk-przahq2e.js.map} +1 -1
- package/dist/{chunk-y16jhwrv.js → chunk-q19cs1qf.js} +2 -2
- package/dist/{chunk-y16jhwrv.js.map → chunk-q19cs1qf.js.map} +1 -1
- package/dist/{chunk-p9avgpzd.js → chunk-q6rse2fh.js} +2 -2
- package/dist/{chunk-p9avgpzd.js.map → chunk-q6rse2fh.js.map} +1 -1
- package/dist/{chunk-62v0y132.js → chunk-rdnxkecg.js} +2 -2
- package/dist/{chunk-62v0y132.js.map → chunk-rdnxkecg.js.map} +1 -1
- package/dist/{chunk-n6hd9swg.js → chunk-skq4g7qa.js} +2 -2
- package/dist/{chunk-n6hd9swg.js.map → chunk-skq4g7qa.js.map} +1 -1
- package/dist/{chunk-n31hppcx.js → chunk-spmxhsze.js} +2 -2
- package/dist/{chunk-n31hppcx.js.map → chunk-spmxhsze.js.map} +1 -1
- package/dist/{chunk-f3s8pz3m.js → chunk-srsmhbpt.js} +2 -2
- package/dist/{chunk-f3s8pz3m.js.map → chunk-srsmhbpt.js.map} +1 -1
- package/dist/{chunk-hbhrhspx.js → chunk-tbss13e8.js} +2 -2
- package/dist/{chunk-hbhrhspx.js.map → chunk-tbss13e8.js.map} +1 -1
- package/dist/{chunk-zscd52sv.js → chunk-tvkdqnhv.js} +3 -3
- package/dist/{chunk-zscd52sv.js.map → chunk-tvkdqnhv.js.map} +1 -1
- package/dist/{chunk-fagkv8sm.js → chunk-ty3kycy4.js} +2 -2
- package/dist/{chunk-fagkv8sm.js.map → chunk-ty3kycy4.js.map} +1 -1
- package/dist/{chunk-4b5rpya9.js → chunk-vhyabcw9.js} +2 -2
- package/dist/{chunk-4b5rpya9.js.map → chunk-vhyabcw9.js.map} +1 -1
- package/dist/{chunk-dcwsya9e.js → chunk-vv8vjjez.js} +2 -2
- package/dist/{chunk-dcwsya9e.js.map → chunk-vv8vjjez.js.map} +1 -1
- package/dist/{chunk-5467avf1.js → chunk-vvg3yxrc.js} +2 -2
- package/dist/{chunk-5467avf1.js.map → chunk-vvg3yxrc.js.map} +1 -1
- package/dist/{chunk-73svx8gr.js → chunk-wtdmwmm7.js} +3 -3
- package/dist/{chunk-73svx8gr.js.map → chunk-wtdmwmm7.js.map} +1 -1
- package/dist/{chunk-syqvk994.js → chunk-xgg9w7ep.js} +2 -2
- package/dist/{chunk-syqvk994.js.map → chunk-xgg9w7ep.js.map} +1 -1
- package/dist/{chunk-0jery7ys.js → chunk-xjb2kzkj.js} +4 -4
- package/dist/{chunk-0jery7ys.js.map → chunk-xjb2kzkj.js.map} +1 -1
- package/dist/{chunk-5sjteb6f.js → chunk-xmjzyzn6.js} +3 -3
- package/dist/{chunk-5sjteb6f.js.map → chunk-xmjzyzn6.js.map} +1 -1
- package/dist/{chunk-jc48hhha.js → chunk-yaacfbky.js} +2 -2
- package/dist/{chunk-jc48hhha.js.map → chunk-yaacfbky.js.map} +1 -1
- package/dist/{chunk-j1j0438r.js → chunk-ye72q3kx.js} +2 -2
- package/dist/{chunk-j1j0438r.js.map → chunk-ye72q3kx.js.map} +1 -1
- package/dist/{chunk-fhw4phyh.js → chunk-ykpc18d1.js} +2 -2
- package/dist/{chunk-fhw4phyh.js.map → chunk-ykpc18d1.js.map} +1 -1
- package/dist/{chunk-cxh9qe1c.js → chunk-yx03gndz.js} +2 -2
- package/dist/{chunk-cxh9qe1c.js.map → chunk-yx03gndz.js.map} +1 -1
- package/dist/{chunk-7stvx6x7.js → chunk-z2k8m02z.js} +2 -2
- package/dist/{chunk-7stvx6x7.js.map → chunk-z2k8m02z.js.map} +1 -1
- package/dist/{chunk-7n6vnmtv.js → chunk-z65e3vdy.js} +2 -2
- package/dist/{chunk-7n6vnmtv.js.map → chunk-z65e3vdy.js.map} +1 -1
- package/dist/{chunk-5nqwxjf1.js → chunk-zenfs4e2.js} +3 -3
- package/dist/{chunk-5nqwxjf1.js.map → chunk-zenfs4e2.js.map} +1 -1
- package/dist/{chunk-xwvm54dx.js → chunk-zyzhqnbm.js} +2 -2
- package/dist/{chunk-xwvm54dx.js.map → chunk-zyzhqnbm.js.map} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/probe/index.js +2 -2
- package/dist/probe/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +13 -13
- package/dist/services/index.js.map +8 -6
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/stats/route-table.js +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-91vxf94n.js +0 -41
- package/dist/chunk-y82d4w0m.js +0 -5
- /package/dist/{chunk-k6x35rn5.js.map → chunk-2rpz1p8g.js.map} +0 -0
- /package/dist/{chunk-yrd14jjt.js.map → chunk-3jpj6hjh.js.map} +0 -0
- /package/dist/{chunk-7g90w0t6.js.map → chunk-64r5cs5g.js.map} +0 -0
- /package/dist/{chunk-7fzwgvyg.js.map → chunk-84j5b07n.js.map} +0 -0
- /package/dist/{chunk-wa7rtfkk.js.map → chunk-c07s6w45.js.map} +0 -0
- /package/dist/{chunk-gprc53rf.js.map → chunk-gtdf51jz.js.map} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lenient, incremental parsing of a JSON document that is still arriving
|
|
3
|
+
* (#1149): what `generate({ onPartial })` hands the caller after each delta,
|
|
4
|
+
* and `parsePartialJson` for an app's own streams (tool-call arguments, say).
|
|
5
|
+
*
|
|
6
|
+
* WHAT "LENIENT" MEANS HERE. The value is the document so far with every open
|
|
7
|
+
* string, object and array closed. What could still turn out to be something
|
|
8
|
+
* else is left out: a key whose value has not started, a number (`12` may be
|
|
9
|
+
* the start of `125`), and a half-written `true`/`false`/`null`. So a field
|
|
10
|
+
* appears once its value has begun, and a number once something follows it.
|
|
11
|
+
*
|
|
12
|
+
* WHY NOT `bestEffortParse`. That one re-parses the whole text on every call,
|
|
13
|
+
* which is fine for the agent's snapshot but quadratic for a long answer heard
|
|
14
|
+
* delta by delta, and it cannot say which containers a delta closed. This one
|
|
15
|
+
* keeps its place: `push` reads only the new text, and a snapshot copies only
|
|
16
|
+
* the containers still open — closed ones are shared between snapshots.
|
|
17
|
+
*/
|
|
18
|
+
/** Every field optional, all the way down: what a partial answer can be. */
|
|
19
|
+
export type DeepPartial<T> = T extends readonly (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
20
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
21
|
+
} : T;
|
|
22
|
+
/**
|
|
23
|
+
* The best parse of `text`, a JSON document that may be cut off anywhere.
|
|
24
|
+
* Unterminated strings, objects and arrays are closed; a key with no value
|
|
25
|
+
* yet, a number with nothing after it and a half-written literal are dropped.
|
|
26
|
+
* `undefined` when nothing usable has arrived (empty text, a lone number), and
|
|
27
|
+
* the value read so far when the text stops being JSON. Never throws.
|
|
28
|
+
*
|
|
29
|
+
* parsePartialJson('{"title": "Hel') // { title: "Hel" }
|
|
30
|
+
* parsePartialJson('{"items": [1, 2, 3') // { items: [1, 2] }
|
|
31
|
+
* parsePartialJson('{"done": tr') // {}
|
|
32
|
+
*/
|
|
33
|
+
export declare function parsePartialJson(text: string): unknown;
|
|
34
|
+
/**
|
|
35
|
+
* The incremental parser behind `parsePartialJson` and `onPartial`. `push`
|
|
36
|
+
* feeds it the next piece of text and returns the paths of the arrays and
|
|
37
|
+
* objects that piece closed; `snapshot` is the value so far; `changed` says
|
|
38
|
+
* whether the value differs from the one the previous `snapshot` returned.
|
|
39
|
+
*/
|
|
40
|
+
export declare class PartialJsonParser {
|
|
41
|
+
private frames;
|
|
42
|
+
private scalar;
|
|
43
|
+
private root;
|
|
44
|
+
private done;
|
|
45
|
+
private failed;
|
|
46
|
+
private dirty;
|
|
47
|
+
private shownOpen;
|
|
48
|
+
/** Reads `text` and returns the JSON paths (`$`, `$.items[0]`, …) of the
|
|
49
|
+
* arrays and objects it closed, outermost last. */
|
|
50
|
+
push(text: string): string[];
|
|
51
|
+
/** Whether the value changed since the last `snapshot()`. */
|
|
52
|
+
get changed(): boolean;
|
|
53
|
+
snapshot(): unknown;
|
|
54
|
+
private build;
|
|
55
|
+
/** The decoded text of a string value still being written, if one is. */
|
|
56
|
+
private openStringValue;
|
|
57
|
+
private read;
|
|
58
|
+
private startValue;
|
|
59
|
+
private checkLiteral;
|
|
60
|
+
private gotKey;
|
|
61
|
+
/** A finished value: attached to the open container, or the root. `visible`
|
|
62
|
+
* is whether the value was not already showing (a string was, open). */
|
|
63
|
+
private gotValue;
|
|
64
|
+
private close;
|
|
65
|
+
/** Not JSON: keep what was read and ignore the rest. */
|
|
66
|
+
private fail;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=partialJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partialJson.d.ts","sourceRoot":"","sources":["../../ai/partialJson.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACvD,WAAW,CAAC,CAAC,CAAC,EAAE,GAChB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACtC,CAAC,CAAC;AAER;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAItD;AAsCD;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAS;IAGtB,OAAO,CAAC,SAAS,CAAqB;IAEtC;wDACoD;IACpD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAQ5B,6DAA6D;IAC7D,IAAI,OAAO,IAAI,OAAO,CAIrB;IAED,QAAQ,IAAI,OAAO;IAQnB,OAAO,CAAC,KAAK;IAeb,yEAAyE;IACzE,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,IAAI;IA6FZ,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,MAAM;IAMd;6EACyE;IACzE,OAAO,CAAC,QAAQ;IAehB,OAAO,CAAC,KAAK;IAOb,wDAAwD;IACxD,OAAO,CAAC,IAAI;CAIb"}
|
package/dist/app/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ea as a}from"../chunk-
|
|
2
|
+
import{Ea as a}from"../chunk-6daabbfj.js";import"../chunk-0ahecas6.js";import"../chunk-mpreff3t.js";export{a as App};
|
|
3
3
|
|
|
4
4
|
//# debugId=A7FB3B2CC8B73BFE64756E2164756E21
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthController.d.ts","sourceRoot":"","sources":["../../auth/AuthController.ts"],"names":[],"mappings":"A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,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,2CAA2C;QAC3C,KAAK,EAAE,MAAM,CAAC;QACd,mFAAmF;QACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,GAAG,OAAO,CACT;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAA;KAAE,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,IAAI,CAC1F;IAsGK,oBAAoB,CAAC,GAAG;eAA4B,MAAM;6BAAK;;;IA2BrE;;;;;;;OAOG;IACG,gBAAgB,CAAC,GAAG;eAA4B,MAAM;6BAAK;;;IAqBjE;;;;;;;;;OASG;IACG,eAAe,CACnB,GAAG;eAA4B,MAAM;cAAQ,MAAM;eAAS,MAAM;6BAAK;;;;CAyF1E"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { HttpRequest } from "../../http/HttpRequest";
|
|
2
|
+
import { type OAuthClientResolver, type ResolvedOAuthClient } from "./client";
|
|
3
|
+
import { type OAuthAuthorizationContext, type OAuthCallbackContext, OAuthProvider, type OAuthProfile } from "./OAuthProvider";
|
|
4
|
+
export interface GitHubOAuthProviderConfig {
|
|
5
|
+
/** The OAuth app's client id. Default `process.env.GITHUB_CLIENT_ID`. */
|
|
6
|
+
clientId: string;
|
|
7
|
+
/** The OAuth app's client secret. Default `process.env.GITHUB_CLIENT_SECRET`. */
|
|
8
|
+
clientSecret: string;
|
|
9
|
+
/**
|
|
10
|
+
* The callback path, on `HOST_NAME` (or the origin `resolve` answers): the
|
|
11
|
+
* `redirect_uri` of both the authorization URL and the code exchange.
|
|
12
|
+
* Default `/auth/oauth/github/callback`.
|
|
13
|
+
*/
|
|
14
|
+
redirectPath: string;
|
|
15
|
+
/** Default `read:user user:email`: the profile, and the addresses to find the verified primary one. */
|
|
16
|
+
scope: string;
|
|
17
|
+
/**
|
|
18
|
+
* Extra parameters for GitHub's authorization URL, such as
|
|
19
|
+
* `{ allow_signup: "false" }` or `{ prompt: "select_account" }`. They cannot
|
|
20
|
+
* replace `state`, the PKCE challenge, `redirect_uri` or `client_id`.
|
|
21
|
+
*/
|
|
22
|
+
authorizationParams: Record<string, string>;
|
|
23
|
+
/**
|
|
24
|
+
* The client and callback origin per request (#1140):
|
|
25
|
+
* `({ req, origin }) => ({ clientId, clientSecret, origin })`. What it
|
|
26
|
+
* leaves out comes from the options above; `null` turns the provider off
|
|
27
|
+
* for the request.
|
|
28
|
+
*/
|
|
29
|
+
resolve?: OAuthClientResolver;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* "Sign in with GitHub", through a GitHub OAuth app.
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* oauthProviders: { github: new GitHubOAuthProvider() }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* The account's identity (`providerId`) is its numeric GitHub user id, as a
|
|
39
|
+
* string, never the login, which its owner can change and someone else can
|
|
40
|
+
* then take. The email is the account's **primary, verified** address from
|
|
41
|
+
* `GET /user/emails` (the `user:email` scope), reported with
|
|
42
|
+
* `emailVerified: true`. Without one (no verified primary address, or the
|
|
43
|
+
* scope was not granted) the profile's public email is returned, if any, as
|
|
44
|
+
* unverified, which the callback does not sign into an existing user by.
|
|
45
|
+
*/
|
|
46
|
+
export declare class GitHubOAuthProvider extends OAuthProvider {
|
|
47
|
+
config: GitHubOAuthProviderConfig;
|
|
48
|
+
constructor(config?: Partial<GitHubOAuthProviderConfig>);
|
|
49
|
+
/** The app origin (`HOST_NAME`, else `APP_URL`) + `redirectPath`, the same for the authorization and the exchange. */
|
|
50
|
+
redirectUri(): string;
|
|
51
|
+
protected clientFor(req: HttpRequest<any, any> | null): Promise<ResolvedOAuthClient>;
|
|
52
|
+
private staticClient;
|
|
53
|
+
/** Synchronous without `resolve`. */
|
|
54
|
+
getRedirectUrl(req?: HttpRequest, ctx?: OAuthAuthorizationContext): string | Promise<string>;
|
|
55
|
+
private authorizationUrl;
|
|
56
|
+
onCallback(req: HttpRequest, ctx?: OAuthCallbackContext): Promise<OAuthProfile>;
|
|
57
|
+
/** The primary address from `GET /user/emails` when it is verified, else `undefined`. */
|
|
58
|
+
private primaryVerifiedEmail;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=GitHubOAuthProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitHubOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/GitHubOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAsB,MAAM,UAAU,CAAC;AAClG,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAEzB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,yBAAyB;IACxC,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,uGAAuG;IACvG,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAiBD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,MAAM,EAAE,yBAAyB,CAAC;gBAEtB,MAAM,GAAE,OAAO,CAAC,yBAAyB,CAAM;IAY3D,sHAAsH;IACtH,WAAW;cAIQ,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAY9D,OAAO,CAAC,YAAY;IAQpB,qCAAqC;IACrC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,yBAAyB,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,gBAAgB;IAkBlB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqErF,yFAAyF;YAC3E,oBAAoB;CAanC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { HttpRequest } from "../../http/HttpRequest";
|
|
2
2
|
import { type OAuthAuthorizationContext, type OAuthCallbackContext, OAuthProvider, type OAuthProfile } from "./OAuthProvider";
|
|
3
|
+
import { type OAuthClientResolver, type ResolvedOAuthClient } from "./client";
|
|
3
4
|
type Config = {
|
|
4
5
|
clientId: string;
|
|
5
6
|
scope: string;
|
|
6
7
|
clientSecret: string;
|
|
7
8
|
/**
|
|
8
|
-
* The callback path, on `HOST_NAME
|
|
9
|
-
*
|
|
9
|
+
* The callback path, on `HOST_NAME` (or the origin `resolve` answers). Used
|
|
10
|
+
* for the `redirect_uri` of both the authorization URL and the token
|
|
11
|
+
* exchange, which Google requires to match.
|
|
10
12
|
*/
|
|
11
13
|
redirectPath: string;
|
|
12
14
|
/**
|
|
@@ -15,13 +17,26 @@ type Config = {
|
|
|
15
17
|
* replace `state`, the PKCE challenge, `redirect_uri` or `client_id`.
|
|
16
18
|
*/
|
|
17
19
|
authorizationParams: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* The client and callback origin per request (#1140), for an app that
|
|
22
|
+
* serves several hosts with a Google client each:
|
|
23
|
+
* `({ req, origin }) => ({ clientId, clientSecret, origin })`. What it
|
|
24
|
+
* leaves out comes from the options above; `null` turns the provider off
|
|
25
|
+
* for the request. Without it, every request uses the static client and
|
|
26
|
+
* `HOST_NAME`.
|
|
27
|
+
*/
|
|
28
|
+
resolve?: OAuthClientResolver;
|
|
18
29
|
};
|
|
19
30
|
export declare class GoogleOAuthProvider extends OAuthProvider {
|
|
20
31
|
config: Config;
|
|
21
32
|
constructor(config?: Partial<Config>);
|
|
22
33
|
/** The app origin (`HOST_NAME`, else `APP_URL`) + `redirectPath`, the same for the authorization and the exchange. */
|
|
23
34
|
redirectUri(): string;
|
|
24
|
-
|
|
35
|
+
protected clientFor(req: HttpRequest<any, any> | null): Promise<ResolvedOAuthClient>;
|
|
36
|
+
/** Synchronous without `resolve`, as it has always been. */
|
|
37
|
+
getRedirectUrl(req?: HttpRequest, ctx?: OAuthAuthorizationContext): string | Promise<string>;
|
|
38
|
+
private staticClient;
|
|
39
|
+
private authorizationUrl;
|
|
25
40
|
onCallback(req: HttpRequest, ctx?: OAuthCallbackContext): Promise<OAuthProfile>;
|
|
26
41
|
}
|
|
27
42
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/GoogleOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAEzB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/GoogleOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAEzB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAsB,MAAM,UAAU,CAAC;AAElG,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAAC;AAgBF,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,MAAM,EAAE,MAAM,CAAC;gBACH,MAAM,GAAE,OAAO,CAAC,MAAM,CAAM;IAKxC,sHAAsH;IACtH,WAAW;cAIQ,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAY9D,4DAA4D;IAC5D,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,yBAAyB,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAU5F,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,gBAAgB;IAuBlB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;CA0DtF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { HttpRequest } from "../../http/HttpRequest";
|
|
2
2
|
import { type InstagramEndpoints } from "./instagram";
|
|
3
3
|
import { type OAuthAuthorizationContext, OAuthProvider, type OAuthProfile } from "./OAuthProvider";
|
|
4
|
+
import { type OAuthClientResolver, type ResolvedOAuthClient } from "./client";
|
|
4
5
|
export interface InstagramOAuthProviderConfig extends InstagramEndpoints {
|
|
5
6
|
/** The Instagram app id. Default `process.env.INSTAGRAM_CLIENT_ID`. */
|
|
6
7
|
clientId: string;
|
|
@@ -15,6 +16,13 @@ export interface InstagramOAuthProviderConfig extends InstagramEndpoints {
|
|
|
15
16
|
redirectPath: string;
|
|
16
17
|
/** Extra authorization URL parameters, e.g. `{ enable_fb_login: "false" }` or `{ force_reauth: "true" }`. */
|
|
17
18
|
authorizationParams: Record<string, string>;
|
|
19
|
+
/**
|
|
20
|
+
* The app and callback origin per request (#1140):
|
|
21
|
+
* `({ req, origin }) => ({ clientId, clientSecret, origin })`. What it
|
|
22
|
+
* leaves out comes from the options above; `null` turns the provider off
|
|
23
|
+
* for the request.
|
|
24
|
+
*/
|
|
25
|
+
resolve?: OAuthClientResolver;
|
|
18
26
|
}
|
|
19
27
|
/**
|
|
20
28
|
* "Sign in with Instagram", through the Instagram API with Instagram Login.
|
|
@@ -40,7 +48,10 @@ export declare class InstagramOAuthProvider extends OAuthProvider {
|
|
|
40
48
|
constructor(config?: Partial<InstagramOAuthProviderConfig>);
|
|
41
49
|
/** The app origin (`HOST_NAME`, else `APP_URL`) + `redirectPath`, the same for the authorization and the exchange. */
|
|
42
50
|
redirectUri(): string;
|
|
43
|
-
|
|
51
|
+
protected clientFor(req: HttpRequest<any, any> | null): Promise<ResolvedOAuthClient>;
|
|
52
|
+
private staticClient;
|
|
53
|
+
getRedirectUrl(req?: HttpRequest, ctx?: OAuthAuthorizationContext): string | Promise<string>;
|
|
54
|
+
private authorizationUrl;
|
|
44
55
|
onCallback(req: HttpRequest): Promise<OAuthProfile>;
|
|
45
56
|
}
|
|
46
57
|
//# sourceMappingURL=InstagramOAuthProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstagramOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/InstagramOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAGL,KAAK,kBA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WAAW,EAAE,GAAG,CAAC,EAAE,yBAAyB,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,gBAAgB;IAgBlB,UAAU,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;CAoC1D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpRequest } from "../../http/HttpRequest";
|
|
2
|
+
import type { ResolvedOAuthClient } from "./client";
|
|
2
3
|
/**
|
|
3
4
|
* What `oauthRedirect` hands `getRedirectUrl`: the round trip's `state` and
|
|
4
5
|
* PKCE challenge, which gemi has already stored for the callback to check.
|
|
@@ -83,6 +84,28 @@ export declare abstract class OAuthProvider {
|
|
|
83
84
|
* email. `createUsers = false` still refuses them with `signup_disabled`.
|
|
84
85
|
*/
|
|
85
86
|
createUsersWithoutEmail?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The client this provider uses for `req`, for a provider whose client or
|
|
89
|
+
* callback origin depends on the request (#1140). The built-in providers
|
|
90
|
+
* answer from their `resolve` option, else their static config. `null`:
|
|
91
|
+
* the provider is not offered on this request, so its routes answer 404 and
|
|
92
|
+
* `Auth.oauthProviders()` leaves it out. `undefined` (the default): the
|
|
93
|
+
* provider has no per-request client, and is always offered.
|
|
94
|
+
*
|
|
95
|
+
* `req` is `null` outside a request, where a per-request client cannot be
|
|
96
|
+
* resolved.
|
|
97
|
+
*/
|
|
98
|
+
protected clientFor(_req: HttpRequest<any, any> | null): Promise<ResolvedOAuthClient | null | undefined>;
|
|
99
|
+
/** Whether this provider is offered on `req`: `clientFor` does not answer `null`. */
|
|
100
|
+
isAvailable(req: HttpRequest<any, any> | null): Promise<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* The `redirect_uri` this provider sends for `req`, when it has one to
|
|
103
|
+
* report. `oauthRedirect` keeps it with the round trip's state, and
|
|
104
|
+
* `oauthCallback` refuses a callback for which it answers otherwise
|
|
105
|
+
* (`redirect_mismatch`): the code is then exchanged by the client, and with
|
|
106
|
+
* the `redirect_uri`, that asked for it.
|
|
107
|
+
*/
|
|
108
|
+
redirectUriFor(req: HttpRequest<any, any>): Promise<string | undefined>;
|
|
86
109
|
/**
|
|
87
110
|
* The provider's authorization URL. Put `ctx.state` on it unchanged — a
|
|
88
111
|
* callback whose `state` does not match is refused — and `ctx.codeChallenge`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/OAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"OAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/OAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,IAAI,EAAE,MAAM,CAAC;gBACD,IAAI,EAAE,MAAM,EAAE,OAAO,SAAmC;CAKrE;AAED,8BAAsB,aAAa;IACjC;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,OAAO,CAAQ;IAE7B;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAQ;IAE7B;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAS;IAE1C;;;;;;;;;;OAUG;IACH,SAAS,CAAC,SAAS,CACjB,IAAI,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,GACjC,OAAO,CAAC,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IAIlD,qFAAqF;IAC/E,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAItE;;;;;;OAMG;IACG,cAAc,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI7E;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CACrB,GAAG,EAAE,WAAW,EAChB,GAAG,CAAC,EAAE,yBAAyB,GAC9B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;CACzF"}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
import { type TOAuth2Scope, TwitterApi } from "twitter-api-v2";
|
|
2
2
|
import { HttpRequest } from "../../http/HttpRequest";
|
|
3
3
|
import { type OAuthAuthorizationContext, type OAuthCallbackContext, OAuthProvider, type OAuthProfile } from "./OAuthProvider";
|
|
4
|
+
import { type OAuthClientResolver, type ResolvedOAuthClient } from "./client";
|
|
4
5
|
type Config = {
|
|
5
6
|
clientId: string;
|
|
6
7
|
scope: TOAuth2Scope[];
|
|
7
8
|
clientSecret: string;
|
|
8
9
|
redirectPath: string;
|
|
10
|
+
/**
|
|
11
|
+
* The client and callback origin per request (#1140):
|
|
12
|
+
* `({ req, origin }) => ({ clientId, clientSecret, origin })`. What it
|
|
13
|
+
* leaves out comes from the options above; `null` turns the provider off
|
|
14
|
+
* for the request.
|
|
15
|
+
*/
|
|
16
|
+
resolve?: OAuthClientResolver;
|
|
9
17
|
};
|
|
10
18
|
export declare class XOAuthProvider extends OAuthProvider {
|
|
11
19
|
config: Config;
|
|
12
20
|
client: TwitterApi;
|
|
13
21
|
constructor(config?: Partial<Config>);
|
|
14
22
|
redirectUri(): string;
|
|
23
|
+
protected clientFor(req: HttpRequest<any, any> | null): Promise<ResolvedOAuthClient>;
|
|
24
|
+
private staticClient;
|
|
15
25
|
/**
|
|
16
26
|
* Built here rather than with `generateOAuth2AuthLink`, which mints its own
|
|
17
27
|
* state and verifier: the round trip's are gemi's, kept in a cookie so that
|
|
18
28
|
* any process can finish it. They used to be kept in a `Map` on this
|
|
19
29
|
* instance, which a callback reaching another process could not find.
|
|
20
30
|
*/
|
|
21
|
-
getRedirectUrl(
|
|
31
|
+
getRedirectUrl(req?: HttpRequest, ctx?: OAuthAuthorizationContext): string | Promise<string>;
|
|
32
|
+
private authorizationUrl;
|
|
22
33
|
onCallback(req: HttpRequest, ctx?: OAuthCallbackContext): Promise<OAuthProfile>;
|
|
23
34
|
}
|
|
24
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/XOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAEzB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"XOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/XOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAEzB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAsB,MAAM,UAAU,CAAC;AAElG,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAAC;AASF,qBAAa,cAAe,SAAQ,aAAa;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;gBAEP,MAAM,GAAE,OAAO,CAAC,MAAM,CAAM;IASxC,WAAW;cAIQ,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAY9D,OAAO,CAAC,YAAY;IAQpB;;;;;OAKG;IACH,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,yBAAyB,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW5F,OAAO,CAAC,gBAAgB;IAiBlB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;CA8BtF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { HttpRequest } from "../../http/HttpRequest";
|
|
2
|
+
/**
|
|
3
|
+
* What a provider's `resolve` is asked with (#1140): the request that starts
|
|
4
|
+
* or finishes the sign-in, and the origin its client addressed.
|
|
5
|
+
*/
|
|
6
|
+
export interface OAuthClientContext {
|
|
7
|
+
req: HttpRequest<any, any>;
|
|
8
|
+
/**
|
|
9
|
+
* The request's public origin, `https://acme.example.com`: the one
|
|
10
|
+
* `route.domains` routes by, so behind a `trustProxy` proxy it is the
|
|
11
|
+
* forwarded host, not the one the proxy reached the app on. Without
|
|
12
|
+
* `route.domains`, the request URL's host, with the scheme of
|
|
13
|
+
* `X-Forwarded-Proto` when one is sent.
|
|
14
|
+
*/
|
|
15
|
+
origin: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A provider's client for one request. Anything left out comes from the
|
|
19
|
+
* provider's static config: `clientId` and `clientSecret` from its options (or
|
|
20
|
+
* the environment), `origin` from `HOST_NAME` / `APP_URL`.
|
|
21
|
+
*/
|
|
22
|
+
export interface OAuthClient {
|
|
23
|
+
clientId?: string;
|
|
24
|
+
clientSecret?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The origin the provider sends the browser back to: the `redirect_uri` is
|
|
27
|
+
* this + `redirectPath`. Pass `ctx.origin` to bring the user back to the host
|
|
28
|
+
* they started on, which the round trip's cookie needs (it is host-only).
|
|
29
|
+
*/
|
|
30
|
+
origin?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Picks a provider's client per request. `null` (or `undefined`) means the
|
|
34
|
+
* provider is not offered on this request: its routes answer 404 and
|
|
35
|
+
* `Auth.oauthProviders()` leaves it out, as with an `enabled` that is off.
|
|
36
|
+
*/
|
|
37
|
+
export type OAuthClientResolver = (ctx: OAuthClientContext) => OAuthClient | null | undefined | Promise<OAuthClient | null | undefined>;
|
|
38
|
+
/** The client a built-in provider uses for one request. */
|
|
39
|
+
export interface ResolvedOAuthClient {
|
|
40
|
+
clientId: string;
|
|
41
|
+
clientSecret: string;
|
|
42
|
+
/** Origin + `redirectPath`, the same for the authorization and the exchange. */
|
|
43
|
+
redirectUri: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The origin the client addressed, through the proxy in front if there is
|
|
47
|
+
* one: `route.domains`' resolver when the app has one, else the request URL's
|
|
48
|
+
* host with `X-Forwarded-Proto`'s scheme (TLS is nearly always terminated
|
|
49
|
+
* before the app, and a forged scheme only spoils the forger's own links).
|
|
50
|
+
*/
|
|
51
|
+
export declare function requestPublicOrigin(request: Request): string;
|
|
52
|
+
/**
|
|
53
|
+
* The client `provider` uses for `req`: its static one when it has no
|
|
54
|
+
* `resolve`, else what `resolve` answers over it, asked once per request
|
|
55
|
+
* (the availability check, the authorization URL and the exchange share it).
|
|
56
|
+
* `null` when `resolve` answers that the provider is not offered, or when
|
|
57
|
+
* there is no request to ask it with.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveOAuthClient(provider: object, req: HttpRequest<any, any> | null | undefined, args: {
|
|
60
|
+
name: string;
|
|
61
|
+
resolve?: OAuthClientResolver;
|
|
62
|
+
clientId: string;
|
|
63
|
+
clientSecret: string;
|
|
64
|
+
redirectPath: string;
|
|
65
|
+
/** The static `redirect_uri`, the provider's `redirectUri()`. */
|
|
66
|
+
staticRedirectUri: () => string;
|
|
67
|
+
staticOrigin: () => string;
|
|
68
|
+
}): Promise<ResolvedOAuthClient | null>;
|
|
69
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../auth/oauth/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3B;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,GAAG,EAAE,kBAAkB,KACpB,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE9E,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAe5D;AAgBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EAC7C,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,MAAM,CAAC;CAC5B,GACA,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAiCrC"}
|
|
@@ -48,9 +48,15 @@ export interface OAuthStatePayload {
|
|
|
48
48
|
subject?: string;
|
|
49
49
|
/** A same-origin path to return to after the callback. */
|
|
50
50
|
returnTo?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The `redirect_uri` the authorization URL carried, when the provider
|
|
53
|
+
* reports one (#1140). The callback is refused if the provider answers
|
|
54
|
+
* another for it.
|
|
55
|
+
*/
|
|
56
|
+
redirectUri?: string;
|
|
51
57
|
}
|
|
52
58
|
/** A fresh `state` and PKCE pair. */
|
|
53
|
-
export declare function createOAuthState(provider: string, now?: number, extra?: Pick<OAuthStatePayload, "subject" | "returnTo">): {
|
|
59
|
+
export declare function createOAuthState(provider: string, now?: number, extra?: Pick<OAuthStatePayload, "subject" | "returnTo" | "redirectUri">): {
|
|
54
60
|
state: string;
|
|
55
61
|
codeVerifier: string;
|
|
56
62
|
codeChallenge: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthState.d.ts","sourceRoot":"","sources":["../../../auth/oauth/oauthState.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,uBAAuB,QAAU,CAAC;AAK/C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,GAAE,MAAoB,GAAG,MAAM,CAGxF;AAED,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"oauthState.d.ts","sourceRoot":"","sources":["../../../auth/oauth/oauthState.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,uBAAuB,QAAU,CAAC;AAK/C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,GAAE,MAAoB,GAAG,MAAM,CAGxF;AAED,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,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viderEntry } from "../config";
|
|
|
3
3
|
import type { OAuthProvider } from "./OAuthProvider";
|
|
4
4
|
/**
|
|
5
5
|
* The sign-in provider `name` names in `auth.oauthProviders`, or `null` when
|
|
6
|
-
* there is none, its `feature` is off for this request (#885),
|
|
7
|
-
* `enabled` answers false for it (#1135)
|
|
6
|
+
* there is none, its `feature` is off for this request (#885), its
|
|
7
|
+
* `enabled` answers false for it (#1135), or the provider itself is not
|
|
8
|
+
* offered on it (its `resolve` answers `null`, #1140).
|
|
8
9
|
*
|
|
9
10
|
* An `enabled` function is asked with `req`, else the ambient request. With
|
|
10
11
|
* no request at all it answers off, as a feature read outside one does.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../auth/oauth/providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWrD
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../auth/oauth/providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWrD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC7C,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAuB,GACnD,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAa/B;AAED,qFAAqF;AACrF,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC7C,GAAG,GAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAuB,GACnD,OAAO,CAAC,MAAM,EAAE,CAAC,CAMnB"}
|
package/dist/bun/plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fa as a}from"../chunk-
|
|
2
|
+
import{fa as a}from"../chunk-c07s6w45.js";import"../chunk-h2t135y3.js";import"../chunk-d9pnjkxr.js";import"../chunk-00sj67nx.js";import"../chunk-mpreff3t.js";export{a as gemiPlugin};
|
|
3
3
|
|
|
4
4
|
//# debugId=36D1825891C6658464756E2164756E21
|
package/dist/bun/preload.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fa as k}from"../chunk-
|
|
2
|
+
import{fa as k}from"../chunk-c07s6w45.js";import"../chunk-h2t135y3.js";import"../chunk-d9pnjkxr.js";import"../chunk-00sj67nx.js";import{za as j}from"../chunk-7txst143.js";import"../chunk-mpreff3t.js";var{plugin:q}=globalThis.Bun;q(k());var y=await j(process.cwd());for(let x of y.bun?.plugins??[])q(x);
|
|
3
3
|
|
|
4
4
|
//# debugId=FF5AD9F96BE6CCA964756E2164756E21
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Hl as LC}from"./chunk-xh3qqmbk.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
|
|
2
|
+
import{Il as LC}from"./chunk-mpreff3t.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
|
|
3
3
|
export{OC as ma};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=84B9F8D9723C0EFA64756E2164756E21
|