@gjsify/xmlhttprequest 0.1.9
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/lib/esm/index.js +236 -0
- package/lib/esm/register.js +5 -0
- package/lib/index.d.ts +48 -0
- package/lib/index.js +307 -0
- package/lib/register.d.ts +1 -0
- package/lib/register.js +11 -0
- package/package.json +44 -0
- package/src/index.ts +315 -0
- package/src/register.ts +14 -0
- package/tsconfig.json +19 -0
- package/tsconfig.tsbuildinfo +1 -0
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import GLib from "gi://GLib?version=2.0";
|
|
2
|
+
import System from "system";
|
|
3
|
+
let _blobCounter = 0;
|
|
4
|
+
class FakeBlob {
|
|
5
|
+
_tmpPath;
|
|
6
|
+
type;
|
|
7
|
+
size;
|
|
8
|
+
constructor(type, size) {
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.size = size;
|
|
11
|
+
}
|
|
12
|
+
async arrayBuffer() {
|
|
13
|
+
if (this._tmpPath) {
|
|
14
|
+
const [ok, contents] = GLib.file_get_contents(this._tmpPath);
|
|
15
|
+
if (ok) return contents.buffer;
|
|
16
|
+
}
|
|
17
|
+
return new ArrayBuffer(0);
|
|
18
|
+
}
|
|
19
|
+
async text() {
|
|
20
|
+
return new TextDecoder().decode(await this.arrayBuffer());
|
|
21
|
+
}
|
|
22
|
+
stream() {
|
|
23
|
+
const self = this;
|
|
24
|
+
return new ReadableStream({
|
|
25
|
+
async start(controller) {
|
|
26
|
+
const buf = await self.arrayBuffer();
|
|
27
|
+
controller.enqueue(new Uint8Array(buf));
|
|
28
|
+
controller.close();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function guessExt(url) {
|
|
34
|
+
const lower = url.toLowerCase();
|
|
35
|
+
if (lower.endsWith(".png")) return ".png";
|
|
36
|
+
if (lower.endsWith(".jpg") || lower.endsWith(".jpeg")) return ".jpg";
|
|
37
|
+
if (lower.endsWith(".gif")) return ".gif";
|
|
38
|
+
if (lower.endsWith(".svg")) return ".svg";
|
|
39
|
+
if (lower.endsWith(".ttf")) return ".ttf";
|
|
40
|
+
if (lower.endsWith(".otf")) return ".otf";
|
|
41
|
+
if (lower.endsWith(".woff")) return ".woff";
|
|
42
|
+
if (lower.endsWith(".woff2")) return ".woff2";
|
|
43
|
+
if (lower.endsWith(".mp3")) return ".mp3";
|
|
44
|
+
if (lower.endsWith(".wav")) return ".wav";
|
|
45
|
+
if (lower.endsWith(".ogg")) return ".ogg";
|
|
46
|
+
if (lower.endsWith(".tmx") || lower.endsWith(".xml")) return ".xml";
|
|
47
|
+
if (lower.endsWith(".json")) return ".json";
|
|
48
|
+
return ".bin";
|
|
49
|
+
}
|
|
50
|
+
function guessMime(url) {
|
|
51
|
+
const lower = url.toLowerCase();
|
|
52
|
+
if (lower.endsWith(".png")) return "image/png";
|
|
53
|
+
if (lower.endsWith(".jpg") || lower.endsWith(".jpeg")) return "image/jpeg";
|
|
54
|
+
if (lower.endsWith(".gif")) return "image/gif";
|
|
55
|
+
if (lower.endsWith(".svg")) return "image/svg+xml";
|
|
56
|
+
if (lower.endsWith(".ttf")) return "font/truetype";
|
|
57
|
+
if (lower.endsWith(".otf")) return "font/otf";
|
|
58
|
+
if (lower.endsWith(".woff")) return "font/woff";
|
|
59
|
+
if (lower.endsWith(".woff2")) return "font/woff2";
|
|
60
|
+
if (lower.endsWith(".mp3")) return "audio/mpeg";
|
|
61
|
+
if (lower.endsWith(".wav")) return "audio/wav";
|
|
62
|
+
if (lower.endsWith(".ogg")) return "audio/ogg";
|
|
63
|
+
if (lower.endsWith(".json")) return "application/json";
|
|
64
|
+
return "application/octet-stream";
|
|
65
|
+
}
|
|
66
|
+
async function readFileUrl(url) {
|
|
67
|
+
const path = GLib.filename_from_uri(url)[0];
|
|
68
|
+
const [ok, contents] = GLib.file_get_contents(path);
|
|
69
|
+
if (!ok) throw new Error(`XMLHttpRequest: cannot read file ${path}`);
|
|
70
|
+
const src = contents;
|
|
71
|
+
const copy = new Uint8Array(src.byteLength);
|
|
72
|
+
copy.set(src);
|
|
73
|
+
return copy.buffer;
|
|
74
|
+
}
|
|
75
|
+
function writeToTmp(bytes, ext) {
|
|
76
|
+
const tmpPath = GLib.build_filenamev([
|
|
77
|
+
GLib.get_tmp_dir(),
|
|
78
|
+
`gjsify-blob-${_blobCounter++}${ext}`
|
|
79
|
+
]);
|
|
80
|
+
GLib.file_set_contents(tmpPath, bytes);
|
|
81
|
+
return tmpPath;
|
|
82
|
+
}
|
|
83
|
+
class XMLHttpRequest {
|
|
84
|
+
// State
|
|
85
|
+
UNSENT = 0;
|
|
86
|
+
OPENED = 1;
|
|
87
|
+
HEADERS_RECEIVED = 2;
|
|
88
|
+
LOADING = 3;
|
|
89
|
+
DONE = 4;
|
|
90
|
+
readyState = 0;
|
|
91
|
+
status = 0;
|
|
92
|
+
statusText = "";
|
|
93
|
+
response = null;
|
|
94
|
+
responseText = "";
|
|
95
|
+
responseType = "";
|
|
96
|
+
responseURL = "";
|
|
97
|
+
timeout = 0;
|
|
98
|
+
withCredentials = false;
|
|
99
|
+
// Event handler properties
|
|
100
|
+
onloadstart = null;
|
|
101
|
+
onprogress = null;
|
|
102
|
+
onload = null;
|
|
103
|
+
onloadend = null;
|
|
104
|
+
onerror = null;
|
|
105
|
+
onabort = null;
|
|
106
|
+
ontimeout = null;
|
|
107
|
+
onreadystatechange = null;
|
|
108
|
+
_url = "";
|
|
109
|
+
_method = "GET";
|
|
110
|
+
_aborted = false;
|
|
111
|
+
_listeners = {};
|
|
112
|
+
open(method, url, _async = true) {
|
|
113
|
+
this._method = method.toUpperCase();
|
|
114
|
+
this._url = url;
|
|
115
|
+
this._aborted = false;
|
|
116
|
+
this.readyState = this.OPENED;
|
|
117
|
+
}
|
|
118
|
+
setRequestHeader(_name, _value) {
|
|
119
|
+
}
|
|
120
|
+
overrideMimeType(_mime) {
|
|
121
|
+
}
|
|
122
|
+
send(_body) {
|
|
123
|
+
let url = this._url;
|
|
124
|
+
const responseType = this.responseType;
|
|
125
|
+
const DEBUG = globalThis.__GJSIFY_DEBUG_XHR === true;
|
|
126
|
+
if (url.startsWith("/") && !url.startsWith("//")) {
|
|
127
|
+
const prog = System.programPath ?? System.programInvocationName ?? "";
|
|
128
|
+
if (prog) {
|
|
129
|
+
const programDir = GLib.path_get_dirname(prog);
|
|
130
|
+
url = `file://${programDir}${this._url}`;
|
|
131
|
+
if (DEBUG) console.log(`[xmlhttprequest] rewrite ${this._url} \u2192 ${url}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (DEBUG) console.log(`[xmlhttprequest] ${this._method} ${url} responseType=${responseType}`);
|
|
135
|
+
const doFetch = () => {
|
|
136
|
+
if (url.startsWith("file://")) {
|
|
137
|
+
return readFileUrl(url);
|
|
138
|
+
}
|
|
139
|
+
return globalThis.fetch(url, { method: this._method }).then((r) => {
|
|
140
|
+
if (DEBUG) console.log(`[xmlhttprequest] fetch ok ${url} status=${r.status}`);
|
|
141
|
+
this.status = r.status === 0 ? 200 : r.status;
|
|
142
|
+
this.statusText = r.statusText || "OK";
|
|
143
|
+
this.responseURL = r.url || url;
|
|
144
|
+
return r.arrayBuffer();
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
this.readyState = this.LOADING;
|
|
148
|
+
this._emit("loadstart", { loaded: 0, total: 0, lengthComputable: false });
|
|
149
|
+
Promise.resolve().then(doFetch).then((arrBuf) => {
|
|
150
|
+
if (this._aborted) return;
|
|
151
|
+
if (this.status === 0) this.status = 200;
|
|
152
|
+
if (!this.statusText) this.statusText = "OK";
|
|
153
|
+
this.readyState = this.DONE;
|
|
154
|
+
const bytes = new Uint8Array(arrBuf);
|
|
155
|
+
const len = bytes.byteLength;
|
|
156
|
+
this._emit("progress", { loaded: len, total: len, lengthComputable: true });
|
|
157
|
+
if (responseType === "blob" || responseType === "") {
|
|
158
|
+
const ext = guessExt(url);
|
|
159
|
+
const tmpPath = writeToTmp(bytes, ext);
|
|
160
|
+
const blob = new FakeBlob(guessMime(url), len);
|
|
161
|
+
blob._tmpPath = tmpPath;
|
|
162
|
+
this.response = blob;
|
|
163
|
+
} else if (responseType === "arraybuffer") {
|
|
164
|
+
this.response = arrBuf;
|
|
165
|
+
} else if (responseType === "json") {
|
|
166
|
+
this.response = JSON.parse(new TextDecoder().decode(bytes));
|
|
167
|
+
} else {
|
|
168
|
+
this.responseText = new TextDecoder().decode(bytes);
|
|
169
|
+
this.response = this.responseText;
|
|
170
|
+
}
|
|
171
|
+
this._emit("load", { target: this, loaded: len, total: len, lengthComputable: true });
|
|
172
|
+
this._emit("loadend", { target: this, loaded: len, total: len, lengthComputable: true });
|
|
173
|
+
if (this.onreadystatechange) this.onreadystatechange({});
|
|
174
|
+
}).catch((err) => {
|
|
175
|
+
if (this._aborted) return;
|
|
176
|
+
console.warn(`[xmlhttprequest] ${this._method} ${url} \u2014 ${err?.message ?? err}`);
|
|
177
|
+
this.readyState = this.DONE;
|
|
178
|
+
this._emit("error", { error: err });
|
|
179
|
+
this._emit("loadend", {});
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
abort() {
|
|
183
|
+
this._aborted = true;
|
|
184
|
+
this.readyState = this.DONE;
|
|
185
|
+
this._emit("abort", {});
|
|
186
|
+
this._emit("loadend", {});
|
|
187
|
+
}
|
|
188
|
+
addEventListener(type, fn) {
|
|
189
|
+
(this._listeners[type] ??= []).push(fn);
|
|
190
|
+
}
|
|
191
|
+
removeEventListener(type, fn) {
|
|
192
|
+
this._listeners[type] = (this._listeners[type] ?? []).filter((f) => f !== fn);
|
|
193
|
+
}
|
|
194
|
+
getResponseHeader(_name) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
getAllResponseHeaders() {
|
|
198
|
+
return "";
|
|
199
|
+
}
|
|
200
|
+
_emit(type, event) {
|
|
201
|
+
const handler = this["on" + type];
|
|
202
|
+
if (typeof handler === "function") handler.call(this, { type, ...event });
|
|
203
|
+
for (const fn of this._listeners[type] ?? []) fn.call(this, { type, ...event });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function installObjectURLSupport() {
|
|
207
|
+
if (typeof URL.createObjectURL !== "function" || URL.__gjsify_objecturl !== true) {
|
|
208
|
+
const _objectURLPaths = /* @__PURE__ */ new Map();
|
|
209
|
+
URL.createObjectURL = function(blob) {
|
|
210
|
+
if (blob._tmpPath) {
|
|
211
|
+
const url = `file://${blob._tmpPath}`;
|
|
212
|
+
_objectURLPaths.set(url, blob._tmpPath);
|
|
213
|
+
return url;
|
|
214
|
+
}
|
|
215
|
+
console.warn("[createObjectURL] received non-FakeBlob \u2014 cannot create file:// URL");
|
|
216
|
+
return "file:///dev/null";
|
|
217
|
+
};
|
|
218
|
+
URL.revokeObjectURL = function(url) {
|
|
219
|
+
const path = _objectURLPaths.get(url);
|
|
220
|
+
if (path) {
|
|
221
|
+
try {
|
|
222
|
+
const file = GLib.build_filenamev([path]);
|
|
223
|
+
GLib.unlink(file);
|
|
224
|
+
} catch {
|
|
225
|
+
}
|
|
226
|
+
_objectURLPaths.delete(url);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
URL.__gjsify_objecturl = true;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
export {
|
|
233
|
+
FakeBlob,
|
|
234
|
+
XMLHttpRequest,
|
|
235
|
+
installObjectURLSupport
|
|
236
|
+
};
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare class FakeBlob {
|
|
2
|
+
_tmpPath?: string;
|
|
3
|
+
readonly type: string;
|
|
4
|
+
readonly size: number;
|
|
5
|
+
constructor(type: string, size: number);
|
|
6
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
7
|
+
text(): Promise<string>;
|
|
8
|
+
stream(): ReadableStream<Uint8Array>;
|
|
9
|
+
}
|
|
10
|
+
export declare class XMLHttpRequest {
|
|
11
|
+
readonly UNSENT = 0;
|
|
12
|
+
readonly OPENED = 1;
|
|
13
|
+
readonly HEADERS_RECEIVED = 2;
|
|
14
|
+
readonly LOADING = 3;
|
|
15
|
+
readonly DONE = 4;
|
|
16
|
+
readyState: number;
|
|
17
|
+
status: number;
|
|
18
|
+
statusText: string;
|
|
19
|
+
response: any;
|
|
20
|
+
responseText: string;
|
|
21
|
+
responseType: string;
|
|
22
|
+
responseURL: string;
|
|
23
|
+
timeout: number;
|
|
24
|
+
withCredentials: boolean;
|
|
25
|
+
onloadstart: ((e: any) => void) | null;
|
|
26
|
+
onprogress: ((e: any) => void) | null;
|
|
27
|
+
onload: ((e: any) => void) | null;
|
|
28
|
+
onloadend: ((e: any) => void) | null;
|
|
29
|
+
onerror: ((e: any) => void) | null;
|
|
30
|
+
onabort: ((e: any) => void) | null;
|
|
31
|
+
ontimeout: ((e: any) => void) | null;
|
|
32
|
+
onreadystatechange: ((e: any) => void) | null;
|
|
33
|
+
private _url;
|
|
34
|
+
private _method;
|
|
35
|
+
private _aborted;
|
|
36
|
+
private _listeners;
|
|
37
|
+
open(method: string, url: string, _async?: boolean): void;
|
|
38
|
+
setRequestHeader(_name: string, _value: string): void;
|
|
39
|
+
overrideMimeType(_mime: string): void;
|
|
40
|
+
send(_body?: any): void;
|
|
41
|
+
abort(): void;
|
|
42
|
+
addEventListener(type: string, fn: (e: any) => void): void;
|
|
43
|
+
removeEventListener(type: string, fn: (e: any) => void): void;
|
|
44
|
+
getResponseHeader(_name: string): string | null;
|
|
45
|
+
getAllResponseHeaders(): string;
|
|
46
|
+
private _emit;
|
|
47
|
+
}
|
|
48
|
+
export declare function installObjectURLSupport(): void;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
// XMLHttpRequest and URL.createObjectURL/revokeObjectURL for GJS
|
|
2
|
+
// Backed by @gjsify/fetch (Soup 3.0) for HTTP and GLib for file:// + temp files.
|
|
3
|
+
// Reference: https://xhr.spec.whatwg.org/
|
|
4
|
+
import GLib from 'gi://GLib?version=2.0';
|
|
5
|
+
import System from 'system';
|
|
6
|
+
let _blobCounter = 0;
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// FakeBlob — carries raw bytes + temp file path for the createObjectURL cycle
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
export class FakeBlob {
|
|
11
|
+
_tmpPath;
|
|
12
|
+
type;
|
|
13
|
+
size;
|
|
14
|
+
constructor(type, size) {
|
|
15
|
+
this.type = type;
|
|
16
|
+
this.size = size;
|
|
17
|
+
}
|
|
18
|
+
async arrayBuffer() {
|
|
19
|
+
if (this._tmpPath) {
|
|
20
|
+
const [ok, contents] = GLib.file_get_contents(this._tmpPath);
|
|
21
|
+
if (ok)
|
|
22
|
+
return contents.buffer;
|
|
23
|
+
}
|
|
24
|
+
return new ArrayBuffer(0);
|
|
25
|
+
}
|
|
26
|
+
async text() {
|
|
27
|
+
return new TextDecoder().decode(await this.arrayBuffer());
|
|
28
|
+
}
|
|
29
|
+
stream() {
|
|
30
|
+
const self = this;
|
|
31
|
+
return new ReadableStream({
|
|
32
|
+
async start(controller) {
|
|
33
|
+
const buf = await self.arrayBuffer();
|
|
34
|
+
controller.enqueue(new Uint8Array(buf));
|
|
35
|
+
controller.close();
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Helpers
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
function guessExt(url) {
|
|
44
|
+
const lower = url.toLowerCase();
|
|
45
|
+
if (lower.endsWith('.png'))
|
|
46
|
+
return '.png';
|
|
47
|
+
if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
|
|
48
|
+
return '.jpg';
|
|
49
|
+
if (lower.endsWith('.gif'))
|
|
50
|
+
return '.gif';
|
|
51
|
+
if (lower.endsWith('.svg'))
|
|
52
|
+
return '.svg';
|
|
53
|
+
if (lower.endsWith('.ttf'))
|
|
54
|
+
return '.ttf';
|
|
55
|
+
if (lower.endsWith('.otf'))
|
|
56
|
+
return '.otf';
|
|
57
|
+
if (lower.endsWith('.woff'))
|
|
58
|
+
return '.woff';
|
|
59
|
+
if (lower.endsWith('.woff2'))
|
|
60
|
+
return '.woff2';
|
|
61
|
+
if (lower.endsWith('.mp3'))
|
|
62
|
+
return '.mp3';
|
|
63
|
+
if (lower.endsWith('.wav'))
|
|
64
|
+
return '.wav';
|
|
65
|
+
if (lower.endsWith('.ogg'))
|
|
66
|
+
return '.ogg';
|
|
67
|
+
if (lower.endsWith('.tmx') || lower.endsWith('.xml'))
|
|
68
|
+
return '.xml';
|
|
69
|
+
if (lower.endsWith('.json'))
|
|
70
|
+
return '.json';
|
|
71
|
+
return '.bin';
|
|
72
|
+
}
|
|
73
|
+
function guessMime(url) {
|
|
74
|
+
const lower = url.toLowerCase();
|
|
75
|
+
if (lower.endsWith('.png'))
|
|
76
|
+
return 'image/png';
|
|
77
|
+
if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
|
|
78
|
+
return 'image/jpeg';
|
|
79
|
+
if (lower.endsWith('.gif'))
|
|
80
|
+
return 'image/gif';
|
|
81
|
+
if (lower.endsWith('.svg'))
|
|
82
|
+
return 'image/svg+xml';
|
|
83
|
+
if (lower.endsWith('.ttf'))
|
|
84
|
+
return 'font/truetype';
|
|
85
|
+
if (lower.endsWith('.otf'))
|
|
86
|
+
return 'font/otf';
|
|
87
|
+
if (lower.endsWith('.woff'))
|
|
88
|
+
return 'font/woff';
|
|
89
|
+
if (lower.endsWith('.woff2'))
|
|
90
|
+
return 'font/woff2';
|
|
91
|
+
if (lower.endsWith('.mp3'))
|
|
92
|
+
return 'audio/mpeg';
|
|
93
|
+
if (lower.endsWith('.wav'))
|
|
94
|
+
return 'audio/wav';
|
|
95
|
+
if (lower.endsWith('.ogg'))
|
|
96
|
+
return 'audio/ogg';
|
|
97
|
+
if (lower.endsWith('.json'))
|
|
98
|
+
return 'application/json';
|
|
99
|
+
return 'application/octet-stream';
|
|
100
|
+
}
|
|
101
|
+
/** Read a file:// URL synchronously using GLib. */
|
|
102
|
+
async function readFileUrl(url) {
|
|
103
|
+
const path = GLib.filename_from_uri(url)[0];
|
|
104
|
+
const [ok, contents] = GLib.file_get_contents(path);
|
|
105
|
+
if (!ok)
|
|
106
|
+
throw new Error(`XMLHttpRequest: cannot read file ${path}`);
|
|
107
|
+
// GLib-backed Uint8Array's .buffer may not be a standard JS ArrayBuffer.
|
|
108
|
+
// Copy into a fresh Uint8Array so callers get a proper ArrayBuffer.
|
|
109
|
+
const src = contents;
|
|
110
|
+
const copy = new Uint8Array(src.byteLength);
|
|
111
|
+
copy.set(src);
|
|
112
|
+
return copy.buffer;
|
|
113
|
+
}
|
|
114
|
+
/** Write bytes to a temp file and return the path. */
|
|
115
|
+
function writeToTmp(bytes, ext) {
|
|
116
|
+
const tmpPath = GLib.build_filenamev([
|
|
117
|
+
GLib.get_tmp_dir(),
|
|
118
|
+
`gjsify-blob-${_blobCounter++}${ext}`,
|
|
119
|
+
]);
|
|
120
|
+
GLib.file_set_contents(tmpPath, bytes);
|
|
121
|
+
return tmpPath;
|
|
122
|
+
}
|
|
123
|
+
export class XMLHttpRequest {
|
|
124
|
+
// State
|
|
125
|
+
UNSENT = 0;
|
|
126
|
+
OPENED = 1;
|
|
127
|
+
HEADERS_RECEIVED = 2;
|
|
128
|
+
LOADING = 3;
|
|
129
|
+
DONE = 4;
|
|
130
|
+
readyState = 0;
|
|
131
|
+
status = 0;
|
|
132
|
+
statusText = '';
|
|
133
|
+
response = null;
|
|
134
|
+
responseText = '';
|
|
135
|
+
responseType = '';
|
|
136
|
+
responseURL = '';
|
|
137
|
+
timeout = 0;
|
|
138
|
+
withCredentials = false;
|
|
139
|
+
// Event handler properties
|
|
140
|
+
onloadstart = null;
|
|
141
|
+
onprogress = null;
|
|
142
|
+
onload = null;
|
|
143
|
+
onloadend = null;
|
|
144
|
+
onerror = null;
|
|
145
|
+
onabort = null;
|
|
146
|
+
ontimeout = null;
|
|
147
|
+
onreadystatechange = null;
|
|
148
|
+
_url = '';
|
|
149
|
+
_method = 'GET';
|
|
150
|
+
_aborted = false;
|
|
151
|
+
_listeners = {};
|
|
152
|
+
open(method, url, _async = true) {
|
|
153
|
+
this._method = method.toUpperCase();
|
|
154
|
+
this._url = url;
|
|
155
|
+
this._aborted = false;
|
|
156
|
+
this.readyState = this.OPENED;
|
|
157
|
+
}
|
|
158
|
+
setRequestHeader(_name, _value) {
|
|
159
|
+
// Not needed for the XHR→Blob→Image chain
|
|
160
|
+
}
|
|
161
|
+
overrideMimeType(_mime) { }
|
|
162
|
+
send(_body) {
|
|
163
|
+
let url = this._url;
|
|
164
|
+
const responseType = this.responseType;
|
|
165
|
+
const DEBUG = globalThis.__GJSIFY_DEBUG_XHR === true;
|
|
166
|
+
// Root-relative URLs (start with '/', not '//') have no host to
|
|
167
|
+
// resolve against in GJS. Rewrite to file:// relative to the program
|
|
168
|
+
// directory — matches how an HTTP static server would resolve them.
|
|
169
|
+
if (url.startsWith('/') && !url.startsWith('//')) {
|
|
170
|
+
const prog = System.programPath ?? System.programInvocationName ?? '';
|
|
171
|
+
if (prog) {
|
|
172
|
+
const programDir = GLib.path_get_dirname(prog);
|
|
173
|
+
url = `file://${programDir}${this._url}`;
|
|
174
|
+
if (DEBUG)
|
|
175
|
+
console.log(`[xmlhttprequest] rewrite ${this._url} → ${url}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (DEBUG)
|
|
179
|
+
console.log(`[xmlhttprequest] ${this._method} ${url} responseType=${responseType}`);
|
|
180
|
+
const doFetch = () => {
|
|
181
|
+
// Use GLib direct read for file:// URLs (avoids Soup for local files)
|
|
182
|
+
if (url.startsWith('file://')) {
|
|
183
|
+
return readFileUrl(url);
|
|
184
|
+
}
|
|
185
|
+
return globalThis.fetch(url, { method: this._method })
|
|
186
|
+
.then((r) => {
|
|
187
|
+
if (DEBUG)
|
|
188
|
+
console.log(`[xmlhttprequest] fetch ok ${url} status=${r.status}`);
|
|
189
|
+
this.status = r.status === 0 ? 200 : r.status;
|
|
190
|
+
this.statusText = r.statusText || 'OK';
|
|
191
|
+
this.responseURL = r.url || url;
|
|
192
|
+
return r.arrayBuffer();
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
this.readyState = this.LOADING;
|
|
196
|
+
this._emit('loadstart', { loaded: 0, total: 0, lengthComputable: false });
|
|
197
|
+
// Wrap doFetch() in Promise.resolve().then(...) so synchronous throws
|
|
198
|
+
// (e.g. new URL('/path') when fetch parses the input) propagate into
|
|
199
|
+
// the .catch chain instead of escaping send() as an uncaught exception.
|
|
200
|
+
Promise.resolve().then(doFetch)
|
|
201
|
+
.then((arrBuf) => {
|
|
202
|
+
if (this._aborted)
|
|
203
|
+
return;
|
|
204
|
+
if (this.status === 0)
|
|
205
|
+
this.status = 200;
|
|
206
|
+
if (!this.statusText)
|
|
207
|
+
this.statusText = 'OK';
|
|
208
|
+
this.readyState = this.DONE;
|
|
209
|
+
const bytes = new Uint8Array(arrBuf);
|
|
210
|
+
const len = bytes.byteLength;
|
|
211
|
+
this._emit('progress', { loaded: len, total: len, lengthComputable: true });
|
|
212
|
+
if (responseType === 'blob' || responseType === '') {
|
|
213
|
+
// Write to temp file so HTMLImageElement.src can load it via file://
|
|
214
|
+
const ext = guessExt(url);
|
|
215
|
+
const tmpPath = writeToTmp(bytes, ext);
|
|
216
|
+
const blob = new FakeBlob(guessMime(url), len);
|
|
217
|
+
blob._tmpPath = tmpPath;
|
|
218
|
+
this.response = blob;
|
|
219
|
+
}
|
|
220
|
+
else if (responseType === 'arraybuffer') {
|
|
221
|
+
this.response = arrBuf;
|
|
222
|
+
}
|
|
223
|
+
else if (responseType === 'json') {
|
|
224
|
+
this.response = JSON.parse(new TextDecoder().decode(bytes));
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
// 'text' or ''
|
|
228
|
+
this.responseText = new TextDecoder().decode(bytes);
|
|
229
|
+
this.response = this.responseText;
|
|
230
|
+
}
|
|
231
|
+
this._emit('load', { target: this, loaded: len, total: len, lengthComputable: true });
|
|
232
|
+
this._emit('loadend', { target: this, loaded: len, total: len, lengthComputable: true });
|
|
233
|
+
if (this.onreadystatechange)
|
|
234
|
+
this.onreadystatechange({});
|
|
235
|
+
})
|
|
236
|
+
.catch((err) => {
|
|
237
|
+
if (this._aborted)
|
|
238
|
+
return;
|
|
239
|
+
console.warn(`[xmlhttprequest] ${this._method} ${url} — ${err?.message ?? err}`);
|
|
240
|
+
this.readyState = this.DONE;
|
|
241
|
+
this._emit('error', { error: err });
|
|
242
|
+
this._emit('loadend', {});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
abort() {
|
|
246
|
+
this._aborted = true;
|
|
247
|
+
this.readyState = this.DONE;
|
|
248
|
+
this._emit('abort', {});
|
|
249
|
+
this._emit('loadend', {});
|
|
250
|
+
}
|
|
251
|
+
addEventListener(type, fn) {
|
|
252
|
+
(this._listeners[type] ??= []).push(fn);
|
|
253
|
+
}
|
|
254
|
+
removeEventListener(type, fn) {
|
|
255
|
+
this._listeners[type] = (this._listeners[type] ?? []).filter(f => f !== fn);
|
|
256
|
+
}
|
|
257
|
+
getResponseHeader(_name) {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
getAllResponseHeaders() {
|
|
261
|
+
return '';
|
|
262
|
+
}
|
|
263
|
+
_emit(type, event) {
|
|
264
|
+
const handler = this['on' + type];
|
|
265
|
+
if (typeof handler === 'function')
|
|
266
|
+
handler.call(this, { type, ...event });
|
|
267
|
+
for (const fn of this._listeners[type] ?? [])
|
|
268
|
+
fn.call(this, { type, ...event });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// ---------------------------------------------------------------------------
|
|
272
|
+
// URL.createObjectURL / revokeObjectURL
|
|
273
|
+
// These patch the existing URL global (provided by @gjsify/url / @gjsify/node-globals).
|
|
274
|
+
// HTMLImageElement.src natively handles file:// URLs via GLib.filename_from_uri + GdkPixbuf.
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
export function installObjectURLSupport() {
|
|
277
|
+
// Only install if not already a real implementation
|
|
278
|
+
if (typeof URL.createObjectURL !== 'function' ||
|
|
279
|
+
URL.__gjsify_objecturl !== true) {
|
|
280
|
+
const _objectURLPaths = new Map();
|
|
281
|
+
URL.createObjectURL = function (blob) {
|
|
282
|
+
if (blob._tmpPath) {
|
|
283
|
+
const url = `file://${blob._tmpPath}`;
|
|
284
|
+
_objectURLPaths.set(url, blob._tmpPath);
|
|
285
|
+
return url;
|
|
286
|
+
}
|
|
287
|
+
// Fallback for real Blobs (shouldn't happen in GJS but handle gracefully)
|
|
288
|
+
console.warn('[createObjectURL] received non-FakeBlob — cannot create file:// URL');
|
|
289
|
+
return 'file:///dev/null';
|
|
290
|
+
};
|
|
291
|
+
URL.revokeObjectURL = function (url) {
|
|
292
|
+
const path = _objectURLPaths.get(url);
|
|
293
|
+
if (path) {
|
|
294
|
+
try {
|
|
295
|
+
// Optionally clean up temp file
|
|
296
|
+
const file = GLib.build_filenamev([path]);
|
|
297
|
+
GLib.unlink(file);
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
// ignore cleanup errors
|
|
301
|
+
}
|
|
302
|
+
_objectURLPaths.delete(url);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
URL.__gjsify_objecturl = true;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/register.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Side-effect module: registers XMLHttpRequest, URL.createObjectURL and
|
|
2
|
+
// URL.revokeObjectURL as globals on GJS.
|
|
3
|
+
// On Node.js the alias layer routes this subpath to @gjsify/empty — the native
|
|
4
|
+
// implementations are already present there.
|
|
5
|
+
import { XMLHttpRequest, installObjectURLSupport } from './index.js';
|
|
6
|
+
if (typeof globalThis.XMLHttpRequest === 'undefined') {
|
|
7
|
+
globalThis.XMLHttpRequest = XMLHttpRequest;
|
|
8
|
+
}
|
|
9
|
+
// Patch URL.createObjectURL / revokeObjectURL
|
|
10
|
+
// URL is expected to be on globalThis already (via @gjsify/node-globals or @gjsify/url).
|
|
11
|
+
installObjectURLSupport();
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gjsify/xmlhttprequest",
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "XMLHttpRequest and URL.createObjectURL/revokeObjectURL for GJS — backed by @gjsify/fetch and GLib",
|
|
5
|
+
"module": "lib/esm/index.js",
|
|
6
|
+
"types": "lib/types/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/esm/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./register": {
|
|
14
|
+
"types": "./lib/types/register.d.ts",
|
|
15
|
+
"default": "./lib/esm/register.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"./lib/esm/register.js"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo || exit 0",
|
|
23
|
+
"check": "tsc --noEmit",
|
|
24
|
+
"build": "yarn build:gjsify && yarn build:types",
|
|
25
|
+
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
|
|
26
|
+
"build:types": "tsc"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"gjs",
|
|
30
|
+
"xmlhttprequest",
|
|
31
|
+
"xhr",
|
|
32
|
+
"web-api"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@girs/gio-2.0": "^2.88.0-4.0.0-rc.2",
|
|
36
|
+
"@girs/gjs": "^4.0.0-rc.2",
|
|
37
|
+
"@girs/glib-2.0": "^2.88.0-4.0.0-rc.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@gjsify/cli": "^0.1.9",
|
|
41
|
+
"@types/node": "^25.6.0",
|
|
42
|
+
"typescript": "^6.0.2"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
// XMLHttpRequest and URL.createObjectURL/revokeObjectURL for GJS
|
|
2
|
+
// Backed by @gjsify/fetch (Soup 3.0) for HTTP and GLib for file:// + temp files.
|
|
3
|
+
// Reference: https://xhr.spec.whatwg.org/
|
|
4
|
+
|
|
5
|
+
import GLib from 'gi://GLib?version=2.0';
|
|
6
|
+
import System from 'system';
|
|
7
|
+
|
|
8
|
+
let _blobCounter = 0;
|
|
9
|
+
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// FakeBlob — carries raw bytes + temp file path for the createObjectURL cycle
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
export class FakeBlob {
|
|
15
|
+
_tmpPath?: string;
|
|
16
|
+
readonly type: string;
|
|
17
|
+
readonly size: number;
|
|
18
|
+
|
|
19
|
+
constructor(type: string, size: number) {
|
|
20
|
+
this.type = type;
|
|
21
|
+
this.size = size;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async arrayBuffer(): Promise<ArrayBuffer> {
|
|
25
|
+
if (this._tmpPath) {
|
|
26
|
+
const [ok, contents] = GLib.file_get_contents(this._tmpPath);
|
|
27
|
+
if (ok) return (contents as Uint8Array).buffer as ArrayBuffer;
|
|
28
|
+
}
|
|
29
|
+
return new ArrayBuffer(0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async text(): Promise<string> {
|
|
33
|
+
return new TextDecoder().decode(await this.arrayBuffer());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
stream(): ReadableStream<Uint8Array> {
|
|
37
|
+
const self = this;
|
|
38
|
+
return new ReadableStream({
|
|
39
|
+
async start(controller) {
|
|
40
|
+
const buf = await self.arrayBuffer();
|
|
41
|
+
controller.enqueue(new Uint8Array(buf));
|
|
42
|
+
controller.close();
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// Helpers
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
function guessExt(url: string): string {
|
|
53
|
+
const lower = url.toLowerCase();
|
|
54
|
+
if (lower.endsWith('.png')) return '.png';
|
|
55
|
+
if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return '.jpg';
|
|
56
|
+
if (lower.endsWith('.gif')) return '.gif';
|
|
57
|
+
if (lower.endsWith('.svg')) return '.svg';
|
|
58
|
+
if (lower.endsWith('.ttf')) return '.ttf';
|
|
59
|
+
if (lower.endsWith('.otf')) return '.otf';
|
|
60
|
+
if (lower.endsWith('.woff')) return '.woff';
|
|
61
|
+
if (lower.endsWith('.woff2')) return '.woff2';
|
|
62
|
+
if (lower.endsWith('.mp3')) return '.mp3';
|
|
63
|
+
if (lower.endsWith('.wav')) return '.wav';
|
|
64
|
+
if (lower.endsWith('.ogg')) return '.ogg';
|
|
65
|
+
if (lower.endsWith('.tmx') || lower.endsWith('.xml')) return '.xml';
|
|
66
|
+
if (lower.endsWith('.json')) return '.json';
|
|
67
|
+
return '.bin';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function guessMime(url: string): string {
|
|
71
|
+
const lower = url.toLowerCase();
|
|
72
|
+
if (lower.endsWith('.png')) return 'image/png';
|
|
73
|
+
if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return 'image/jpeg';
|
|
74
|
+
if (lower.endsWith('.gif')) return 'image/gif';
|
|
75
|
+
if (lower.endsWith('.svg')) return 'image/svg+xml';
|
|
76
|
+
if (lower.endsWith('.ttf')) return 'font/truetype';
|
|
77
|
+
if (lower.endsWith('.otf')) return 'font/otf';
|
|
78
|
+
if (lower.endsWith('.woff')) return 'font/woff';
|
|
79
|
+
if (lower.endsWith('.woff2')) return 'font/woff2';
|
|
80
|
+
if (lower.endsWith('.mp3')) return 'audio/mpeg';
|
|
81
|
+
if (lower.endsWith('.wav')) return 'audio/wav';
|
|
82
|
+
if (lower.endsWith('.ogg')) return 'audio/ogg';
|
|
83
|
+
if (lower.endsWith('.json')) return 'application/json';
|
|
84
|
+
return 'application/octet-stream';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Read a file:// URL synchronously using GLib. */
|
|
88
|
+
async function readFileUrl(url: string): Promise<ArrayBuffer> {
|
|
89
|
+
const path = GLib.filename_from_uri(url)[0];
|
|
90
|
+
const [ok, contents] = GLib.file_get_contents(path);
|
|
91
|
+
if (!ok) throw new Error(`XMLHttpRequest: cannot read file ${path}`);
|
|
92
|
+
// GLib-backed Uint8Array's .buffer may not be a standard JS ArrayBuffer.
|
|
93
|
+
// Copy into a fresh Uint8Array so callers get a proper ArrayBuffer.
|
|
94
|
+
const src = contents as Uint8Array;
|
|
95
|
+
const copy = new Uint8Array(src.byteLength);
|
|
96
|
+
copy.set(src);
|
|
97
|
+
return copy.buffer;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Write bytes to a temp file and return the path. */
|
|
101
|
+
function writeToTmp(bytes: Uint8Array, ext: string): string {
|
|
102
|
+
const tmpPath = GLib.build_filenamev([
|
|
103
|
+
GLib.get_tmp_dir(),
|
|
104
|
+
`gjsify-blob-${_blobCounter++}${ext}`,
|
|
105
|
+
]);
|
|
106
|
+
GLib.file_set_contents(tmpPath, bytes);
|
|
107
|
+
return tmpPath;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
// XMLHttpRequest
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
|
|
114
|
+
type XHREventType = 'loadstart' | 'progress' | 'load' | 'loadend' | 'error' | 'abort' | 'timeout';
|
|
115
|
+
|
|
116
|
+
export class XMLHttpRequest {
|
|
117
|
+
// State
|
|
118
|
+
readonly UNSENT = 0;
|
|
119
|
+
readonly OPENED = 1;
|
|
120
|
+
readonly HEADERS_RECEIVED = 2;
|
|
121
|
+
readonly LOADING = 3;
|
|
122
|
+
readonly DONE = 4;
|
|
123
|
+
|
|
124
|
+
readyState = 0;
|
|
125
|
+
status = 0;
|
|
126
|
+
statusText = '';
|
|
127
|
+
response: any = null;
|
|
128
|
+
responseText = '';
|
|
129
|
+
responseType = '';
|
|
130
|
+
responseURL = '';
|
|
131
|
+
timeout = 0;
|
|
132
|
+
withCredentials = false;
|
|
133
|
+
|
|
134
|
+
// Event handler properties
|
|
135
|
+
onloadstart: ((e: any) => void) | null = null;
|
|
136
|
+
onprogress: ((e: any) => void) | null = null;
|
|
137
|
+
onload: ((e: any) => void) | null = null;
|
|
138
|
+
onloadend: ((e: any) => void) | null = null;
|
|
139
|
+
onerror: ((e: any) => void) | null = null;
|
|
140
|
+
onabort: ((e: any) => void) | null = null;
|
|
141
|
+
ontimeout: ((e: any) => void) | null = null;
|
|
142
|
+
onreadystatechange: ((e: any) => void) | null = null;
|
|
143
|
+
|
|
144
|
+
private _url = '';
|
|
145
|
+
private _method = 'GET';
|
|
146
|
+
private _aborted = false;
|
|
147
|
+
private _listeners: Record<string, Array<(e: any) => void>> = {};
|
|
148
|
+
|
|
149
|
+
open(method: string, url: string, _async = true): void {
|
|
150
|
+
this._method = method.toUpperCase();
|
|
151
|
+
this._url = url;
|
|
152
|
+
this._aborted = false;
|
|
153
|
+
this.readyState = this.OPENED;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
setRequestHeader(_name: string, _value: string): void {
|
|
157
|
+
// Not needed for the XHR→Blob→Image chain
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
overrideMimeType(_mime: string): void {}
|
|
161
|
+
|
|
162
|
+
send(_body?: any): void {
|
|
163
|
+
let url = this._url;
|
|
164
|
+
const responseType = this.responseType;
|
|
165
|
+
const DEBUG = (globalThis as any).__GJSIFY_DEBUG_XHR === true;
|
|
166
|
+
|
|
167
|
+
// Root-relative URLs (start with '/', not '//') have no host to
|
|
168
|
+
// resolve against in GJS. Rewrite to file:// relative to the program
|
|
169
|
+
// directory — matches how an HTTP static server would resolve them.
|
|
170
|
+
if (url.startsWith('/') && !url.startsWith('//')) {
|
|
171
|
+
const prog = (System as any).programPath ?? System.programInvocationName ?? '';
|
|
172
|
+
if (prog) {
|
|
173
|
+
const programDir = GLib.path_get_dirname(prog);
|
|
174
|
+
url = `file://${programDir}${this._url}`;
|
|
175
|
+
if (DEBUG) console.log(`[xmlhttprequest] rewrite ${this._url} → ${url}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (DEBUG) console.log(`[xmlhttprequest] ${this._method} ${url} responseType=${responseType}`);
|
|
180
|
+
|
|
181
|
+
const doFetch = (): Promise<ArrayBuffer> => {
|
|
182
|
+
// Use GLib direct read for file:// URLs (avoids Soup for local files)
|
|
183
|
+
if (url.startsWith('file://')) {
|
|
184
|
+
return readFileUrl(url);
|
|
185
|
+
}
|
|
186
|
+
return (globalThis as any).fetch(url, { method: this._method })
|
|
187
|
+
.then((r: any) => {
|
|
188
|
+
if (DEBUG) console.log(`[xmlhttprequest] fetch ok ${url} status=${r.status}`);
|
|
189
|
+
this.status = r.status === 0 ? 200 : r.status;
|
|
190
|
+
this.statusText = r.statusText || 'OK';
|
|
191
|
+
this.responseURL = r.url || url;
|
|
192
|
+
return r.arrayBuffer();
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
this.readyState = this.LOADING;
|
|
197
|
+
this._emit('loadstart', { loaded: 0, total: 0, lengthComputable: false });
|
|
198
|
+
|
|
199
|
+
// Wrap doFetch() in Promise.resolve().then(...) so synchronous throws
|
|
200
|
+
// (e.g. new URL('/path') when fetch parses the input) propagate into
|
|
201
|
+
// the .catch chain instead of escaping send() as an uncaught exception.
|
|
202
|
+
Promise.resolve().then(doFetch)
|
|
203
|
+
.then((arrBuf: ArrayBuffer) => {
|
|
204
|
+
if (this._aborted) return;
|
|
205
|
+
|
|
206
|
+
if (this.status === 0) this.status = 200;
|
|
207
|
+
if (!this.statusText) this.statusText = 'OK';
|
|
208
|
+
this.readyState = this.DONE;
|
|
209
|
+
|
|
210
|
+
const bytes = new Uint8Array(arrBuf);
|
|
211
|
+
const len = bytes.byteLength;
|
|
212
|
+
|
|
213
|
+
this._emit('progress', { loaded: len, total: len, lengthComputable: true });
|
|
214
|
+
|
|
215
|
+
if (responseType === 'blob' || responseType === '') {
|
|
216
|
+
// Write to temp file so HTMLImageElement.src can load it via file://
|
|
217
|
+
const ext = guessExt(url);
|
|
218
|
+
const tmpPath = writeToTmp(bytes, ext);
|
|
219
|
+
const blob = new FakeBlob(guessMime(url), len);
|
|
220
|
+
blob._tmpPath = tmpPath;
|
|
221
|
+
this.response = blob;
|
|
222
|
+
} else if (responseType === 'arraybuffer') {
|
|
223
|
+
this.response = arrBuf;
|
|
224
|
+
} else if (responseType === 'json') {
|
|
225
|
+
this.response = JSON.parse(new TextDecoder().decode(bytes));
|
|
226
|
+
} else {
|
|
227
|
+
// 'text' or ''
|
|
228
|
+
this.responseText = new TextDecoder().decode(bytes);
|
|
229
|
+
this.response = this.responseText;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
this._emit('load', { target: this, loaded: len, total: len, lengthComputable: true });
|
|
233
|
+
this._emit('loadend', { target: this, loaded: len, total: len, lengthComputable: true });
|
|
234
|
+
if (this.onreadystatechange) this.onreadystatechange({});
|
|
235
|
+
})
|
|
236
|
+
.catch((err: any) => {
|
|
237
|
+
if (this._aborted) return;
|
|
238
|
+
console.warn(`[xmlhttprequest] ${this._method} ${url} — ${err?.message ?? err}`);
|
|
239
|
+
this.readyState = this.DONE;
|
|
240
|
+
this._emit('error', { error: err });
|
|
241
|
+
this._emit('loadend', {});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
abort(): void {
|
|
246
|
+
this._aborted = true;
|
|
247
|
+
this.readyState = this.DONE;
|
|
248
|
+
this._emit('abort', {});
|
|
249
|
+
this._emit('loadend', {});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
addEventListener(type: string, fn: (e: any) => void): void {
|
|
253
|
+
(this._listeners[type] ??= []).push(fn);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
removeEventListener(type: string, fn: (e: any) => void): void {
|
|
257
|
+
this._listeners[type] = (this._listeners[type] ?? []).filter(f => f !== fn);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
getResponseHeader(_name: string): string | null {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
getAllResponseHeaders(): string {
|
|
265
|
+
return '';
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
private _emit(type: XHREventType, event: Record<string, any>): void {
|
|
269
|
+
const handler = (this as any)['on' + type];
|
|
270
|
+
if (typeof handler === 'function') handler.call(this, { type, ...event });
|
|
271
|
+
for (const fn of this._listeners[type] ?? []) fn.call(this, { type, ...event });
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// URL.createObjectURL / revokeObjectURL
|
|
277
|
+
// These patch the existing URL global (provided by @gjsify/url / @gjsify/node-globals).
|
|
278
|
+
// HTMLImageElement.src natively handles file:// URLs via GLib.filename_from_uri + GdkPixbuf.
|
|
279
|
+
// ---------------------------------------------------------------------------
|
|
280
|
+
|
|
281
|
+
export function installObjectURLSupport(): void {
|
|
282
|
+
// Only install if not already a real implementation
|
|
283
|
+
if (typeof (URL as any).createObjectURL !== 'function' ||
|
|
284
|
+
(URL as any).__gjsify_objecturl !== true) {
|
|
285
|
+
|
|
286
|
+
const _objectURLPaths = new Map<string, string>();
|
|
287
|
+
|
|
288
|
+
(URL as any).createObjectURL = function (blob: FakeBlob | Blob): string {
|
|
289
|
+
if ((blob as FakeBlob)._tmpPath) {
|
|
290
|
+
const url = `file://${(blob as FakeBlob)._tmpPath}`;
|
|
291
|
+
_objectURLPaths.set(url, (blob as FakeBlob)._tmpPath!);
|
|
292
|
+
return url;
|
|
293
|
+
}
|
|
294
|
+
// Fallback for real Blobs (shouldn't happen in GJS but handle gracefully)
|
|
295
|
+
console.warn('[createObjectURL] received non-FakeBlob — cannot create file:// URL');
|
|
296
|
+
return 'file:///dev/null';
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
(URL as any).revokeObjectURL = function (url: string): void {
|
|
300
|
+
const path = _objectURLPaths.get(url);
|
|
301
|
+
if (path) {
|
|
302
|
+
try {
|
|
303
|
+
// Optionally clean up temp file
|
|
304
|
+
const file = GLib.build_filenamev([path]);
|
|
305
|
+
GLib.unlink(file);
|
|
306
|
+
} catch {
|
|
307
|
+
// ignore cleanup errors
|
|
308
|
+
}
|
|
309
|
+
_objectURLPaths.delete(url);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
(URL as any).__gjsify_objecturl = true;
|
|
314
|
+
}
|
|
315
|
+
}
|
package/src/register.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Side-effect module: registers XMLHttpRequest, URL.createObjectURL and
|
|
2
|
+
// URL.revokeObjectURL as globals on GJS.
|
|
3
|
+
// On Node.js the alias layer routes this subpath to @gjsify/empty — the native
|
|
4
|
+
// implementations are already present there.
|
|
5
|
+
|
|
6
|
+
import { XMLHttpRequest, installObjectURLSupport } from './index.js';
|
|
7
|
+
|
|
8
|
+
if (typeof (globalThis as any).XMLHttpRequest === 'undefined') {
|
|
9
|
+
(globalThis as any).XMLHttpRequest = XMLHttpRequest;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Patch URL.createObjectURL / revokeObjectURL
|
|
13
|
+
// URL is expected to be on globalThis already (via @gjsify/node-globals or @gjsify/url).
|
|
14
|
+
installObjectURLSupport();
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "NodeNext",
|
|
4
|
+
"types": ["node", "@girs/glib-2.0", "@girs/gio-2.0", "@girs/gjs"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"moduleResolution": "NodeNext",
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"outDir": "lib",
|
|
9
|
+
"rootDir": "src",
|
|
10
|
+
"composite": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"checkJs": false,
|
|
14
|
+
"strict": false
|
|
15
|
+
},
|
|
16
|
+
"reflection": false,
|
|
17
|
+
"include": ["src/**/*.ts"],
|
|
18
|
+
"exclude": []
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.es2025.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.esnext.full.d.ts","./src/index.ts","./src/register.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/undici-types/utility.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client-stats.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/undici-types/h2c-client.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/path/posix.d.ts","../../../node_modules/@types/node/path/win32.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/quic.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/test/reporters.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/util/types.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@girs/glib-2.0/glib-2.0-ambient.d.ts","../../../node_modules/@girs/glib-2.0/glib-2.0-import.d.ts","../../../node_modules/@girs/gjs/gettext.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0-ambient.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0-import.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0.d.ts","../../../node_modules/@girs/gobject-2.0/index.d.ts","../../../node_modules/@girs/gjs/system.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0-ambient.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0-import.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0.d.ts","../../../node_modules/@girs/cairo-1.0/index.d.ts","../../../node_modules/@girs/gjs/cairo.d.ts","../../../node_modules/@girs/gjs/console.d.ts","../../../node_modules/@girs/gjs/gi.d.ts","../../../node_modules/@girs/gjs/gjs-ambient.d.ts","../../../node_modules/@girs/gjs/gjs.d.ts","../../../node_modules/@girs/gjs/index.d.ts","../../../node_modules/@girs/glib-2.0/glib-2.0.d.ts","../../../node_modules/@girs/glib-2.0/index.d.ts","../../../node_modules/@girs/gio-2.0/gio-2.0-ambient.d.ts","../../../node_modules/@girs/gio-2.0/gio-2.0-import.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0-ambient.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0-import.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0.d.ts","../../../node_modules/@girs/gmodule-2.0/index.d.ts","../../../node_modules/@girs/gio-2.0/gio-2.0.d.ts","../../../node_modules/@girs/gio-2.0/index.d.ts"],"fileIdsList":[[98,161,164,169,173,176,178,179,180,193,227,230,234],[98,161,164,169,173,176,178,179,180,193,230,234],[98,161,164,169,173,176,178,179,180,193,225,234,236,238],[98,161,164,169,173,176,178,179,180,193,228,229,234],[98,161,164,169,173,176,178,179,180,193,234,239,246],[98,161,164,169,173,176,178,179,180,193,234,246],[98,161,164,169,173,176,178,179,180,193,225,234,236,238,244],[98,161,164,169,173,176,178,179,180,193,234,240,245],[98,161,164,169,173,176,178,179,180,193,225,230,234],[98,161,164,169,173,176,178,179,180,193,234],[98,161,164,169,173,176,178,179,180,193,221,226,231,232,233],[98,161,164,169,173,176,178,179,180,193,221,225,226,231,234,238],[98,161,164,169,173,176,178,179,180,193,234,235],[98,161,164,169,173,176,178,179,180,193,225,234],[98,161,164,169,173,176,178,179,180,193,219,234,238],[98,161,164,169,173,176,178,179,180,193,234,238],[98,161,164,169,173,176,178,179,180,193,225,234,236],[98,161,164,169,173,176,178,179,180,193,220,234,237],[98,161,164,169,173,176,178,179,180,193,234,241,244],[98,161,164,169,173,176,178,179,180,193,234,244],[98,161,164,169,173,176,178,179,180,193,234,242,243],[98,161,164,169,173,176,178,179,180,193,222,225,234],[98,161,164,169,173,176,178,179,180,193,234,236,238],[98,161,164,169,173,176,178,179,180,193,223,224,234],[98,158,159,161,164,169,173,176,178,179,180,193,234],[98,160,161,164,169,173,176,178,179,180,193,234],[161,164,169,173,176,178,179,180,193,234],[98,161,164,169,173,176,178,179,180,193,201,234],[98,161,162,164,167,169,172,173,176,178,179,180,182,193,198,210,234],[98,161,162,163,164,169,172,173,176,178,179,180,193,234],[98,161,164,169,173,176,178,179,180,193,211,234],[98,161,164,165,166,169,173,176,178,179,180,184,193,234],[98,161,164,166,169,173,176,178,179,180,193,198,207,234],[98,161,164,167,169,172,173,176,178,179,180,182,193,234],[98,160,161,164,168,169,173,176,178,179,180,193,234],[98,161,164,169,170,173,176,178,179,180,193,234],[98,161,164,169,171,172,173,176,178,179,180,193,234],[98,160,161,164,169,172,173,176,178,179,180,193,234],[98,161,164,169,172,173,174,176,178,179,180,193,198,210,234],[98,161,164,169,172,173,174,176,178,179,180,193,198,201,234],[98,148,161,164,169,172,173,175,176,178,179,180,182,193,198,210,234],[98,161,164,169,172,173,175,176,178,179,180,182,193,198,207,210,234],[98,161,164,169,173,175,176,177,178,179,180,193,198,207,210,234],[96,97,98,99,100,101,102,103,104,105,106,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,234],[98,161,164,169,172,173,176,178,179,180,193,234],[98,161,164,169,173,176,178,180,193,234],[98,161,164,169,173,176,178,179,180,181,193,210,234],[98,161,164,169,172,173,176,178,179,180,182,193,198,234],[98,161,164,169,173,176,178,179,180,184,193,234],[98,161,164,169,173,176,178,179,180,185,193,234],[98,161,164,169,172,173,176,178,179,180,188,193,234],[98,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,234],[98,161,164,169,173,176,178,179,180,190,193,234],[98,161,164,169,173,176,178,179,180,191,193,234],[98,161,164,166,169,173,176,178,179,180,182,193,201,234],[98,161,164,169,172,173,176,178,179,180,193,194,234],[98,161,164,169,173,176,178,179,180,193,195,211,214,234],[98,161,164,169,172,173,176,178,179,180,193,198,200,201,234],[98,161,164,169,173,176,178,179,180,193,199,201,234],[98,161,164,169,173,176,178,179,180,193,201,211,234],[98,161,164,169,173,176,178,179,180,193,202,234],[98,158,161,164,169,173,176,178,179,180,193,198,204,210,234],[98,161,164,169,173,176,178,179,180,193,198,203,234],[98,161,164,169,172,173,176,178,179,180,193,205,206,234],[98,161,164,169,173,176,178,179,180,193,205,206,234],[98,161,164,166,169,173,176,178,179,180,182,193,198,207,234],[98,161,164,169,173,176,178,179,180,193,208,234],[98,161,164,169,173,176,178,179,180,182,193,209,234],[98,161,164,169,173,175,176,178,179,180,191,193,210,234],[98,161,164,169,173,176,178,179,180,193,211,212,234],[98,161,164,166,169,173,176,178,179,180,193,212,234],[98,161,164,169,173,176,178,179,180,193,198,213,234],[98,161,164,169,173,176,178,179,180,181,193,214,234],[98,161,164,169,173,176,178,179,180,193,215,234],[98,161,164,166,169,173,176,178,179,180,193,234],[98,148,161,164,169,173,176,178,179,180,193,234],[98,161,164,169,173,176,178,179,180,193,210,234],[98,161,164,169,173,176,178,179,180,193,216,234],[98,161,164,169,173,176,178,179,180,188,193,234],[98,161,164,169,173,176,178,179,180,193,206,234],[98,148,161,164,169,172,173,174,176,178,179,180,188,193,198,201,210,213,214,216,234],[98,161,164,169,173,176,178,179,180,193,198,217,234],[98,113,116,119,120,161,164,169,173,176,178,179,180,193,210,234],[98,116,161,164,169,173,176,178,179,180,193,198,210,234],[98,116,120,161,164,169,173,176,178,179,180,193,210,234],[98,161,164,169,173,176,178,179,180,193,198,234],[98,110,161,164,169,173,176,178,179,180,193,234],[98,114,161,164,169,173,176,178,179,180,193,234],[98,112,113,116,161,164,169,173,176,178,179,180,193,210,234],[98,161,164,169,173,176,178,179,180,182,193,207,234],[98,161,164,169,173,176,178,179,180,193,218,234],[98,110,161,164,169,173,176,178,179,180,193,218,234],[98,112,116,161,164,169,173,176,178,179,180,182,193,210,234],[98,107,108,109,111,115,161,164,169,172,173,176,178,179,180,193,198,210,234],[98,116,125,133,161,164,169,173,176,178,179,180,193,234],[98,108,114,161,164,169,173,176,178,179,180,193,234],[98,116,142,143,161,164,169,173,176,178,179,180,193,234],[98,108,111,116,161,164,169,173,176,178,179,180,193,201,210,218,234],[98,116,161,164,169,173,176,178,179,180,193,234],[98,112,116,161,164,169,173,176,178,179,180,193,210,234],[98,107,161,164,169,173,176,178,179,180,193,234],[98,110,111,112,114,115,116,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,147,161,164,169,173,176,178,179,180,193,234],[98,116,135,138,161,164,169,173,176,178,179,180,193,234],[98,116,125,126,127,161,164,169,173,176,178,179,180,193,234],[98,114,116,126,128,161,164,169,173,176,178,179,180,193,234],[98,115,161,164,169,173,176,178,179,180,193,234],[98,108,110,116,161,164,169,173,176,178,179,180,193,234],[98,116,120,126,128,161,164,169,173,176,178,179,180,193,234],[98,120,161,164,169,173,176,178,179,180,193,234],[98,114,116,119,161,164,169,173,176,178,179,180,193,210,234],[98,108,112,116,125,161,164,169,173,176,178,179,180,193,234],[98,116,135,161,164,169,173,176,178,179,180,193,234],[98,128,161,164,169,173,176,178,179,180,193,234],[98,110,116,142,161,164,169,173,176,178,179,180,193,201,216,218,234],[98,161,164,169,173,176,178,179,180,193,219,234],[94,98,161,164,169,173,176,178,179,180,193,234]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"ef4a897cd2a3f91000c10264e400b3667c7e51e1b7365f03b62e8081dc53bde6","impliedFormat":1},{"version":"478ff6f16d2bd515e503ccbb38a7ac292275b323a8a3c2f79c3f7cec16108b47","signature":"f627918a5894e85abc64d020d9ee5769ce155dd0150368c34ac9c119562e0e19","impliedFormat":99},{"version":"a73a271174e99d1deab561d828402791ab037197c28c7790473cce385cbc4959","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc2110f7decca6bfb9392e30421cfa1436479e4a6756e8fec6cbc22625d4f881","affectsGlobalScope":true,"impliedFormat":1},{"version":"096116f8fedc1765d5bd6ef360c257b4a9048e5415054b3bf3c41b07f8951b0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"10ec5e82144dfac6f04fa5d1d6c11763b3e4dbbac6d99101427219ab3e2ae887","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"074de5b2fdead0165a2757e3aaef20f27a6347b1c36adea27d51456795b37682","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"4137ebf04166f3a325f056aa56101adc75e9dceb30404a1844eb8604d89770e2","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"3e11fce78ad8c0e1d1db4ba5f0652285509be3acdd519529bc8fcef85f7dafd9","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"9c32412007b5662fd34a8eb04292fb5314ec370d7016d1c2fb8aa193c807fe22","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"6ebe8ebb8659aaa9d1acbf3710d7dae3e923e97610238b9511c25dc39023a166","impliedFormat":1},{"version":"e85d7f8068f6a26710bff0cc8c0fc5e47f71089c3780fbede05857331d2ddec9","impliedFormat":1},{"version":"7befaf0e76b5671be1d47b77fcc65f2b0aad91cc26529df1904f4a7c46d216e9","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"98498b101803bb3dde9f76a56e65c14b75db1cc8bec5f4db72be541570f74fc5","impliedFormat":1},{"version":"1cc2a09e1a61a5222d4174ab358a9f9de5e906afe79dbf7363d871a7edda3955","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"b64d4d1c5f877f9c666e98e833f0205edb9384acc46e98a1fef344f64d6aba44","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"c9381908473a1c92cb8c516b184e75f4d226dad95c3a85a5af35f670064d9a2f","impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2ae155afe8a01cc0ae612d99117cf8ef16692ba7c4366590156fdec1bcf2d8c","impliedFormat":1},{"version":"3f5e5d9be35913db9fea42a63f3df0b7e3c8703b97670a2125587b4dbbd56d7c","impliedFormat":1},{"version":"8caeb65fdc3bfe0d13f86f67324fcb2d858ed1c55f1f0cce892eb1acfb9f3239","impliedFormat":1},{"version":"57c23df0b5f7a8e26363a3849b0bc7763f6b241207157c8e40089d1df4116f35","affectsGlobalScope":true,"impliedFormat":1},{"version":"3b8bc0c17b54081b0878673989216229e575d67a10874e84566a21025a2461ee","impliedFormat":1},{"version":"5b0db5a58b73498792a29bfebc333438e61906fef75da898b410e24e52229e6f","impliedFormat":1},{"version":"dbe055b2b29a7bab2c1ca8f259436306adb43f469dca7e639a02cd3695d3f621","impliedFormat":1},{"version":"1678b04557dca52feab73cc67610918a7f5e25bfdba3e7fa081acd625d93106d","impliedFormat":1},{"version":"e3905f6902f0b69e5eefc230daa69fdd4ab707a973ec2d086d65af1b3ea47ef0","impliedFormat":1},{"version":"2ea729503db9793f2691162fec3dd1118cab62e96d025f8eeb376d43ec293395","impliedFormat":1},{"version":"9ec87fea42b92894b0f209931a880789d43c3397d09dd99c631ae40a2f7071d1","impliedFormat":1},{"version":"c68e88cdfadfb6c8ba5fc38e58a3a166b0beae77b1f05b7d921150a32a5ffb8d","impliedFormat":1},{"version":"2bc7aa4fba46df0bd495425a7c8201437a7d465f83854fac859df2d67f664df3","impliedFormat":1},{"version":"41d17e1ad9a002feb11c8cdd2777e5bbc0cdb1e3f595d237e4dded0b6949983b","impliedFormat":1},{"version":"07e4e61e946a9c15045539ecd5f5d2d02e7aab6fa82567826857e09cf0f37c2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c4714ccc29149efb8777a1da0b04b8d2258f5d13ddbf4cd3c3d361fb531ac86","impliedFormat":1},{"version":"3ff275f84f89f8a7c0543da838f9da9614201abc4ce74c533029825adfb4433d","impliedFormat":1},{"version":"0eb5d0cbf09de5d34542b977fd6a933bb2e0817bffe8e1a541b2f1ad1b9af1ff","impliedFormat":1},{"version":"f9713757bcdfa4d58b48c0fb249e752c94a3eee8bf4532b906094246ac49ef88","impliedFormat":1},{"version":"2c2bdaa1d8ead9f68628d6d9d250e46ee8e81aa4898b4769a36956ae15e060fe","impliedFormat":1},{"version":"c32c840c62d8bd7aeb3147aa6754cd2d922b990a6b6634530cb2ebdce5adc8e9","impliedFormat":1},{"version":"e1c1a0b4d1ead0de9eca52203aeb1f771f21e6238d6fcd15aa56ac2a02f1b7bf","impliedFormat":1},{"version":"82b91e4e42e6c41bc7fc1b6c2dc5eba6a2ba98375eb1f210e6ff6bba2d54177e","impliedFormat":1},{"version":"6fe28249ac0c7bc19a79aa9264baf00efbd080e868dbe1d3052033ad1c64f206","affectsGlobalScope":true,"impliedFormat":1},{"version":"cbed824fec91efefc7bbdcb8b43d1a531fdbebd0e2ef19481501ff365a93cb70","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"d0716593b3f2b0451bcf0c24cfa86dec2235c325c89f201934248b7c742715fc","impliedFormat":1},{"version":"ec501101c2a96133a6c695f934c8f6642149cc728571b29cbb7b770984c1088e","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"2991bca2cc0f0628a278df2a2ccdb8d6cbcb700f3761abbed62bba137d5b1790","impliedFormat":1},{"version":"ce8653341224f8b45ff46d2a06f2cacb96f841f768a886c9d8dd8ec0878b11bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"230763250f20449fa7b3c9273e1967adb0023dc890d4be1553faca658ee65971","impliedFormat":1},{"version":"c3e9078b60cb329d1221f5878e88cecfa3e74460550e605a58fcfb41a66029ff","impliedFormat":1},{"version":"a74edb3bab7394a9dbde529d60632be590def2f5f01024dbd85441587fbfbbe0","impliedFormat":1},{"version":"0ea59f7d3e51440baa64f429253759b106cfcbaf51e474cae606e02265b37cf8","impliedFormat":1},{"version":"bc18a1991ba681f03e13285fa1d7b99b03b67ee671b7bc936254467177543890","impliedFormat":1},{"version":"00049ccc87f3f37726db03c01ca68fe74fd9c0109b68c29eb9923ebec2c76b13","impliedFormat":1},{"version":"fa94bbf532b7af8f394b95fa310980d6e20bd2d4c871c6a6cb9f70f03750a44b","impliedFormat":1},{"version":"68d3f35108e2608b1f2f28b36d19d7055f31c4465cc5692cbd06c716a9fe7973","impliedFormat":1},{"version":"a6d543044570fbeed13a7f9925a868081cd2b14ef59cdd9da6ae76d41cab03d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fa2214bb0d64701bc6f9ce8cde2fd2ff8c571e0b23065fa04a8a5a6beb91511","impliedFormat":1},{"version":"f1c93e046fb3d9b7f8249629f4b63dc068dd839b824dd0aa39a5e68476dc9420","impliedFormat":1},{"version":"eab2f3179607acb3d44b2db2a76dd7d621c5039b145dc160a1ee733963f9d2f5","impliedFormat":1},{"version":"841983e39bd4cbb463be385e92fda11057cab368bf27100a801c492f1d86cbaa","impliedFormat":1},{"version":"6f5383b3df1cdf4ff1aa7fb0850f77042b5786b5e65ec9a9b6be56ebfe4d9036","impliedFormat":1},{"version":"62fc21ed9ccbd83bd1166de277a4b5daaa8d15b5fa614c75610d20f3b73fba87","impliedFormat":1},{"version":"e4156ddb25aa0e3b5303d372f26957b36778f0f6bbd4326359269873295e3058","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc1b433a84cae05ddc5672d4823170af78606ad21ecef60dbc4570190cbf1357","impliedFormat":1},{"version":"9d3821bc75c59577e52643324cec92fc2145642e8d17cf7ee07a3181f21d985d","impliedFormat":1},{"version":"7f78cfb2b343838612c192cb251746e3a7c62ac7675726a47e130d9b213f6580","impliedFormat":1},{"version":"201db9cf1687fab1adf5282fcba861f382b32303dc4f67c89d59655e78a25461","impliedFormat":1},{"version":"c77fb31bc17fd241d3922a9f88c59e3361cdf76d1328ba9412fc6bf7310b638d","impliedFormat":1},{"version":"0a20eaf2e4b1e3c1e1f87f7bccb0c936375b23b022baeea750519b7c9bc6ce83","impliedFormat":1},{"version":"b484ec11ba00e3a2235562a41898d55372ccabe607986c6fa4f4aba72093749f","impliedFormat":1},{"version":"a16b91b27bd6b706c687c88cbc8a7d4ee98e5ed6043026d6b84bda923c0aed67","impliedFormat":1},{"version":"694b812e0ed11285e8822cf8131e3ce7083a500b3b1d185fff9ed1089677bd0a","impliedFormat":1},{"version":"99ab6d0d660ce4d21efb52288a39fd35bb3f556980ec5463b1ae8f304a3bbc85","impliedFormat":1},{"version":"6eeded8c7e352be6e0efb83f4935ec752513c4d22043b52522b90849a49a3a11","impliedFormat":1},{"version":"6c1ad90050ffbb151cacc68e2d06ea1a26a945659391e32651f5d42b86fd7f2c","impliedFormat":1},{"version":"55cdbeebe76a1fa18bbd7e7bf73350a2173926bd3085bb050cf5a5397025ee4e","impliedFormat":1},{"version":"8c9787aadb580199528c52892a52d65cf5681cbf431f50c387b4452d830e8260","impliedFormat":99},{"version":"6e9045bc4cb132b149dac58eeb9689f1fdb2b2b356ebbf02b93912b7a0fdbc25","affectsGlobalScope":true,"impliedFormat":99},{"version":"2085382b07f3cd64087a991b6becb50133f01238539acfd02b4056a94a5ebb9d","impliedFormat":99},{"version":"db35eb1245b36fd3ff663811086d15cb8c68f3b3dc5f5f831db3b0eefbcb033c","impliedFormat":99},{"version":"0f3c61a292d85a2e818df1f9a7c7f37846cb1a6a3a4ecf7894f8a738d4bdb192","affectsGlobalScope":true,"impliedFormat":99},{"version":"c9529e5d9ddb7cfff0465931f0e33ed7992d5dfa60a54795bb51d507ee8d8c4c","impliedFormat":99},{"version":"86a89e907573f6d3c8ddab189817f10eff6b0c42ec08c485888d5e8b2efa1e2c","impliedFormat":99},{"version":"e73f713456ae34abd233f29196aa99fdf404cb91164c5122bc19a3d719047cd2","impliedFormat":99},{"version":"54c3513e44305cbe56ef433417d9e42104cdc317a63c43ecf72a1849ee69ccc2","impliedFormat":99},{"version":"7b0dc352c423e02893e3dbefdc5172f227c7638cd40c35c4b1b77af3008613de","affectsGlobalScope":true,"impliedFormat":99},{"version":"58fd9932dca08c73d5749118cd28214224c589fc48b41202f9ce0b5ba1423fb6","impliedFormat":99},{"version":"0add61f82f10b4bb3bf837edda13915a643fa650f577e79a03be219c656f9e18","impliedFormat":99},{"version":"4db1053ff2a3a26c56ec68803986fb9a2de7ecb26d6252e1d4b719c48398f799","impliedFormat":99},{"version":"c1bf15bba38171793cfc7112559b1714b0bcb9f79477e012dffc4bb0ef2292a1","impliedFormat":99},{"version":"6922180d916be5ec823dd103ec60bf1ec48bded8e53194a760831a877a7cff0f","impliedFormat":99},{"version":"d0cd0ed5ad50d765e2e30fd7a45ce1b054cce85ff8235d19bbe45152acd32a08","impliedFormat":99},{"version":"7a61ece44b95f226c4166f48ed58e90a7b76242588293c52bb45bd74368c7559","affectsGlobalScope":true,"impliedFormat":99},{"version":"8dd968f41e49b2b0514d16baa1199620746dd6e8017accbea9a39a4b0c2a9d28","impliedFormat":99},{"version":"8691883b1661c3ab42fd7604cad90ef572d1022241fd846301bb701a22140679","impliedFormat":99},{"version":"a1eeac57c42f81587bdb5ba17781055a64913a1b6896752b5b9e45ba007577a2","impliedFormat":99},{"version":"21ab021acdc50115128766fc952cb9265bbe1e878a6e6712f7999cfcdd3bfbba","impliedFormat":99},{"version":"a67623830d36a6c76f01ce2b51ca3206fb07de66d89b364837eb0fdb901de445","affectsGlobalScope":true,"impliedFormat":99},{"version":"090eb5c7c46bcebe0fdde327c76833c56f3f5503fa2c9b34a908c88ac3536ee6","impliedFormat":99},{"version":"54ac9f13e2b5a9bf9c0a2ceec8135b290d6d5f1b7623f2297f3e7e7f66da5aea","affectsGlobalScope":true,"impliedFormat":99},{"version":"a8fe8ba4b9226110a43330bc743d98e3e3af394e50f018dae034d11821a4b598","impliedFormat":99},{"version":"75fdff836de566cceca1fd40f365af854fbd8139e0fb33a191f8d087c9e43d90","impliedFormat":99},{"version":"51457ca4a02b1550d38d37680474f90782eb9d6771dff3d0c1a89d26f63d52d8","impliedFormat":99},{"version":"981e32c1ee850a697091171963411a0a940d5c1fa1fe3ea88fb9ea7c0f841bd1","impliedFormat":99}],"root":[94,95],"options":{"allowJs":true,"checkJs":false,"composite":true,"experimentalDecorators":true,"module":199,"outDir":"./lib","rootDir":"./src","skipLibCheck":true,"strict":false,"target":99},"referencedMap":[[227,1],[228,2],[229,3],[230,4],[239,5],[240,6],[245,7],[246,8],[231,9],[232,10],[221,10],[233,10],[234,11],[235,12],[236,13],[226,14],[219,15],[220,16],[237,17],[238,18],[241,19],[242,20],[243,3],[244,21],[222,22],[223,14],[224,23],[225,24],[158,25],[159,25],[160,26],[98,27],[161,28],[162,29],[163,30],[96,10],[164,31],[165,32],[166,33],[167,34],[168,35],[169,36],[170,36],[171,37],[172,38],[173,39],[174,40],[99,10],[97,10],[175,41],[176,42],[177,43],[218,44],[178,45],[179,46],[180,45],[181,47],[182,48],[184,49],[185,50],[186,50],[187,50],[188,51],[189,52],[190,53],[191,54],[192,55],[193,56],[194,56],[195,57],[196,10],[197,10],[198,58],[199,59],[200,58],[201,60],[202,61],[203,62],[204,63],[205,64],[206,65],[207,66],[208,67],[209,68],[210,69],[211,70],[212,71],[213,72],[214,73],[215,74],[100,45],[101,10],[102,10],[103,75],[104,10],[105,31],[106,10],[149,76],[150,77],[151,78],[152,78],[153,79],[154,10],[155,28],[156,80],[157,77],[216,81],[217,82],[183,10],[91,10],[92,10],[16,10],[14,10],[15,10],[20,10],[19,10],[2,10],[21,10],[22,10],[23,10],[24,10],[25,10],[26,10],[27,10],[28,10],[3,10],[29,10],[30,10],[4,10],[31,10],[35,10],[32,10],[33,10],[34,10],[36,10],[37,10],[38,10],[5,10],[39,10],[40,10],[41,10],[42,10],[6,10],[46,10],[43,10],[44,10],[45,10],[47,10],[7,10],[48,10],[53,10],[54,10],[49,10],[50,10],[51,10],[52,10],[8,10],[58,10],[55,10],[56,10],[57,10],[59,10],[9,10],[60,10],[61,10],[62,10],[64,10],[63,10],[65,10],[66,10],[10,10],[67,10],[68,10],[69,10],[11,10],[70,10],[71,10],[72,10],[73,10],[74,10],[75,10],[12,10],[76,10],[77,10],[78,10],[79,10],[80,10],[1,10],[81,10],[82,10],[13,10],[83,10],[84,10],[85,10],[86,10],[93,10],[87,10],[88,10],[89,10],[90,10],[18,10],[17,10],[125,83],[137,84],[122,85],[138,86],[147,87],[113,88],[114,89],[112,90],[146,91],[141,92],[145,93],[116,94],[134,95],[115,96],[144,97],[110,98],[111,92],[117,99],[118,10],[124,100],[121,99],[108,101],[148,102],[139,103],[128,104],[127,99],[129,105],[132,106],[126,107],[130,108],[142,91],[119,109],[120,110],[133,111],[109,86],[136,112],[135,99],[123,110],[131,113],[140,10],[107,10],[143,114],[94,115],[95,116]],"latestChangedDtsFile":"./lib/register.d.ts","version":"6.0.2"}
|