@aopslabs/aops-server 0.2.2 → 0.2.3
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/THIRD_PARTY_NOTICES +425 -16
- package/THIRD_PARTY_NOTICES.inventory.json +70 -10
- package/build/client/_app/immutable/chunks/B88gKiyt.js +1 -0
- package/build/client/_app/immutable/entry/{app.a0iGCm6X.js → app.DyrORum_.js} +2 -2
- package/build/client/_app/immutable/entry/start.BCM14rdL.js +1 -0
- package/build/client/_app/immutable/nodes/{1.BtbjYUHR.js → 1.DM-iOsKD.js} +1 -1
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +3 -3
- package/build/index.js +3 -3
- package/build/server/chunks/{1-UJuUicIe.js → 1-CbIMYd7N.js} +2 -2
- package/build/server/chunks/{_server.ts-6bdzoHJH.js → _server.ts-5jTLRkY0.js} +17 -6
- package/build/server/chunks/{_server.ts-u2UWBqNN.js → _server.ts-6MVYw3sO.js} +1 -1
- package/build/server/chunks/{_server.ts-DQzYSH_C.js → _server.ts-B7LBExsI.js} +12 -9
- package/build/server/chunks/{_server.ts-o9pJceJP.js → _server.ts-BF5YsxES.js} +1 -1
- package/build/server/chunks/{_server.ts-Ua5Ieisy.js → _server.ts-BUI8oOpK.js} +13 -10
- package/build/server/chunks/{_server.ts-Bz-Erv-1.js → _server.ts-BWMQcP-R.js} +1 -1
- package/build/server/chunks/{_server.ts-CRKd0KAC.js → _server.ts-Bd_TqS-J.js} +13 -10
- package/build/server/chunks/{_server.ts-BX4X0tW0.js → _server.ts-BrEAWHDb.js} +1 -1
- package/build/server/chunks/{_server.ts-DsTeOL2P.js → _server.ts-C1zRNRcN.js} +1 -1
- package/build/server/chunks/{_server.ts-DQWRrk5C.js → _server.ts-CQ436Lhs.js} +1 -1
- package/build/server/chunks/{_server.ts-N61POKjl.js → _server.ts-CX96Yo6-.js} +12 -9
- package/build/server/chunks/{_server.ts-BkxSxdd0.js → _server.ts-CkYsJYFX.js} +29 -68
- package/build/server/chunks/{_server.ts-DaIr3NkR.js → _server.ts-ClhXKSU-.js} +1 -1
- package/build/server/chunks/{_server.ts-B9gjXi95.js → _server.ts-D7mxMg8q.js} +1 -1
- package/build/server/chunks/{_server.ts-CjzSQgpk.js → _server.ts-DHaqrCbN.js} +11 -8
- package/build/server/chunks/{_server.ts-XmKDT59M.js → _server.ts-DbPb54XR.js} +13 -10
- package/build/server/chunks/{_server.ts-De9ZrSV0.js → _server.ts-P-bj5Kfv.js} +12 -9
- package/build/server/chunks/{_server.ts-AwMeEYiZ.js → _server.ts-p6Wxv_wG.js} +1 -1
- package/build/server/chunks/{agent-gateway-runtime-C7Kvvy0H.js → agent-gateway-runtime-DV-xLmJx.js} +39 -4
- package/build/server/chunks/commercial-admission-loader-ZGZHRPLe.js +480 -0
- package/build/server/chunks/{discovery-BvDEgiqC.js → discovery-DL0RzVks.js} +2 -2
- package/build/server/chunks/{error.svelte-B9R6O_Hn.js → error.svelte-BTdVSWca.js} +1 -1
- package/build/server/chunks/{handler-DurXhqww.js → handler-VLy1sI9x.js} +262 -2
- package/build/server/chunks/{hooks.server-DYGrWbgh.js → hooks.server-Zx-k_ERd.js} +1 -1
- package/build/server/chunks/{index.js-BQnOaW3H.js → index.js-CWgll4BT.js} +921 -924
- package/build/server/chunks/{manifest.js-CCJDdahY.js → manifest.js-C2lkmNzz.js} +20 -20
- package/build/server/chunks/{registry-DO8ob5o1.js → registry-DIreA2IZ.js} +132 -268
- package/cockpit/.vite/manifest.json +122 -122
- package/cockpit/community.module-inventory.json +30 -30
- package/host.config.json +140 -0
- package/npm-shrinkwrap.json +5131 -0
- package/package.json +8 -2
- package/runtime/commercial-integrity-worker.mjs +8 -1
- package/runtime-closure.package.json +12 -1
- package/build/client/_app/immutable/chunks/BlANKL2r.js +0 -1
- package/build/client/_app/immutable/entry/start.Df7u6fQ1.js +0 -1
- package/build/server/chunks/admission-snapshot-C2wGfTWE.js +0 -1034
- package/build/server/chunks/canonical-text-order-DbXJJnFD.js +0 -5
- package/build/server/chunks/commercial-admission-loader-V_vXHdVa.js +0 -2077
|
@@ -73,589 +73,331 @@ class ActionFailure {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
const text_encoder$2 = new TextEncoder();
|
|
77
|
+
|
|
78
|
+
const UNDEFINED = -1;
|
|
79
|
+
const HOLE = -2;
|
|
80
|
+
const NAN = -3;
|
|
81
|
+
const POSITIVE_INFINITY = -4;
|
|
82
|
+
const NEGATIVE_INFINITY = -5;
|
|
83
|
+
const NEGATIVE_ZERO = -6;
|
|
84
|
+
const SPARSE = -7;
|
|
85
|
+
|
|
86
|
+
// The largest valid value for a JavaScript array's `length` property,
|
|
87
|
+
// and the largest valid array index (one less than the max length).
|
|
88
|
+
const MAX_ARRAY_LEN = 2 ** 32 - 1;
|
|
89
|
+
const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
|
|
90
|
+
|
|
91
|
+
/** @type {Record<string, string>} */
|
|
92
|
+
const escaped = {
|
|
93
|
+
'<': '\\u003C',
|
|
94
|
+
'\\': '\\\\',
|
|
95
|
+
'\b': '\\b',
|
|
96
|
+
'\f': '\\f',
|
|
97
|
+
'\n': '\\n',
|
|
98
|
+
'\r': '\\r',
|
|
99
|
+
'\t': '\\t',
|
|
100
|
+
'\u2028': '\\u2028',
|
|
101
|
+
'\u2029': '\\u2029'
|
|
81
102
|
};
|
|
82
103
|
|
|
83
|
-
|
|
84
|
-
|
|
104
|
+
class DevalueError extends Error {
|
|
105
|
+
/**
|
|
106
|
+
* @param {string} message
|
|
107
|
+
* @param {string[]} keys
|
|
108
|
+
* @param {any} [value] - The value that failed to be serialized
|
|
109
|
+
* @param {any} [root] - The root value being serialized
|
|
110
|
+
*/
|
|
111
|
+
constructor(message, keys, value, root) {
|
|
112
|
+
super(message);
|
|
113
|
+
this.name = 'DevalueError';
|
|
114
|
+
this.path = keys.join('');
|
|
115
|
+
this.value = value;
|
|
116
|
+
this.root = root;
|
|
117
|
+
}
|
|
85
118
|
}
|
|
86
119
|
|
|
87
|
-
|
|
88
|
-
|
|
120
|
+
/** @param {any} thing */
|
|
121
|
+
function is_primitive(thing) {
|
|
122
|
+
return thing === null || (typeof thing !== 'object' && typeof thing !== 'function');
|
|
89
123
|
}
|
|
90
124
|
|
|
91
|
-
|
|
92
|
-
|
|
125
|
+
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)
|
|
126
|
+
.sort()
|
|
127
|
+
.join('\0');
|
|
128
|
+
|
|
129
|
+
/** @param {any} thing */
|
|
130
|
+
function is_plain_object(thing) {
|
|
131
|
+
const proto = Object.getPrototypeOf(thing);
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
proto === Object.prototype ||
|
|
135
|
+
proto === null ||
|
|
136
|
+
Object.getPrototypeOf(proto) === null ||
|
|
137
|
+
Object.getOwnPropertyNames(proto).sort().join('\0') === object_proto_names
|
|
138
|
+
);
|
|
93
139
|
}
|
|
94
140
|
|
|
95
|
-
|
|
96
|
-
|
|
141
|
+
/** @param {any} thing */
|
|
142
|
+
function get_type(thing) {
|
|
143
|
+
return Object.prototype.toString.call(thing).slice(8, -1);
|
|
144
|
+
}
|
|
97
145
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
146
|
+
/** @param {string} char */
|
|
147
|
+
function get_escaped_char(char) {
|
|
148
|
+
switch (char) {
|
|
149
|
+
case '"':
|
|
150
|
+
return '\\"';
|
|
151
|
+
case '<':
|
|
152
|
+
return '\\u003C';
|
|
153
|
+
case '\\':
|
|
154
|
+
return '\\\\';
|
|
155
|
+
case '\n':
|
|
156
|
+
return '\\n';
|
|
157
|
+
case '\r':
|
|
158
|
+
return '\\r';
|
|
159
|
+
case '\t':
|
|
160
|
+
return '\\t';
|
|
161
|
+
case '\b':
|
|
162
|
+
return '\\b';
|
|
163
|
+
case '\f':
|
|
164
|
+
return '\\f';
|
|
165
|
+
case '\u2028':
|
|
166
|
+
return '\\u2028';
|
|
167
|
+
case '\u2029':
|
|
168
|
+
return '\\u2029';
|
|
169
|
+
default:
|
|
170
|
+
return char < ' ' ? `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}` : '';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
105
173
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
174
|
+
/** @param {string} str */
|
|
175
|
+
function stringify_string(str) {
|
|
176
|
+
let result = '';
|
|
177
|
+
let last_pos = 0;
|
|
178
|
+
const len = str.length;
|
|
109
179
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
180
|
+
for (let i = 0; i < len; i += 1) {
|
|
181
|
+
const char = str[i];
|
|
182
|
+
const replacement = get_escaped_char(char);
|
|
183
|
+
if (replacement) {
|
|
184
|
+
result += str.slice(last_pos, i) + replacement;
|
|
185
|
+
last_pos = i + 1;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
113
188
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
} catch (e) {
|
|
117
|
-
console.error(
|
|
118
|
-
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
|
|
119
|
-
e
|
|
120
|
-
);
|
|
121
|
-
}
|
|
189
|
+
return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
|
|
190
|
+
}
|
|
122
191
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
192
|
+
/** @param {Record<string | symbol, any>} object */
|
|
193
|
+
function enumerable_symbols(object) {
|
|
194
|
+
return Object.getOwnPropertySymbols(object).filter(
|
|
195
|
+
(symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
|
|
196
|
+
);
|
|
197
|
+
}
|
|
126
198
|
|
|
127
|
-
|
|
128
|
-
var sides = part.split("=");
|
|
129
|
-
var key = sides.shift().trim().toLowerCase();
|
|
130
|
-
if (isForbiddenKey(key)) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
var value = sides.join("=").trim();
|
|
134
|
-
if (key === "expires") {
|
|
135
|
-
cookie.expires = new Date(value);
|
|
136
|
-
} else if (key === "max-age") {
|
|
137
|
-
var n = parseInt(value, 10);
|
|
138
|
-
if (!Number.isNaN(n)) cookie.maxAge = n;
|
|
139
|
-
} else if (key === "secure") {
|
|
140
|
-
cookie.secure = true;
|
|
141
|
-
} else if (key === "httponly") {
|
|
142
|
-
cookie.httpOnly = true;
|
|
143
|
-
} else if (key === "samesite") {
|
|
144
|
-
cookie.sameSite = value;
|
|
145
|
-
} else if (key === "partitioned") {
|
|
146
|
-
cookie.partitioned = true;
|
|
147
|
-
} else if (key) {
|
|
148
|
-
cookie[key] = value;
|
|
149
|
-
}
|
|
150
|
-
});
|
|
199
|
+
const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
151
200
|
|
|
152
|
-
|
|
201
|
+
/** @param {string} key */
|
|
202
|
+
function stringify_key(key) {
|
|
203
|
+
return is_identifier.test(key) ? '.' + key : '[' + JSON.stringify(key) + ']';
|
|
153
204
|
}
|
|
154
205
|
|
|
155
|
-
|
|
156
|
-
|
|
206
|
+
/** @param {number} n */
|
|
207
|
+
function is_valid_array_index(n) {
|
|
208
|
+
if (!Number.isInteger(n)) return false;
|
|
209
|
+
if (n < 0) return false;
|
|
210
|
+
if (n > MAX_ARRAY_INDEX) return false;
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
157
213
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
value = nameValuePairStr;
|
|
166
|
-
}
|
|
214
|
+
/** @param {number} n */
|
|
215
|
+
function is_valid_array_len(n) {
|
|
216
|
+
if (!Number.isInteger(n)) return false;
|
|
217
|
+
if (n < 0) return false;
|
|
218
|
+
if (n > MAX_ARRAY_LEN) return false;
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
167
221
|
|
|
168
|
-
|
|
222
|
+
/** @param {string} s */
|
|
223
|
+
function is_valid_array_index_string(s) {
|
|
224
|
+
if (s.length === 0) return false;
|
|
225
|
+
if (s.length > 1 && s.charCodeAt(0) === 48) return false; // leading zero
|
|
226
|
+
for (let i = 0; i < s.length; i++) {
|
|
227
|
+
const c = s.charCodeAt(i);
|
|
228
|
+
if (c < 48 || c > 57) return false;
|
|
229
|
+
}
|
|
230
|
+
// by this point we know it's a string of digits, but it has to be within
|
|
231
|
+
// the range of valid array indices
|
|
232
|
+
return is_valid_array_index(+s);
|
|
169
233
|
}
|
|
170
234
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
235
|
+
/**
|
|
236
|
+
* Returns the length of the leading run of valid array indices in `keys`.
|
|
237
|
+
* @param {readonly string[]} keys
|
|
238
|
+
*/
|
|
239
|
+
function array_index_cut(keys) {
|
|
240
|
+
for (var i = keys.length - 1; i >= 0; i--) {
|
|
241
|
+
if (is_valid_array_index_string(keys[i])) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return i + 1;
|
|
246
|
+
}
|
|
175
247
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
248
|
+
/**
|
|
249
|
+
* Finds the populated indices of an array.
|
|
250
|
+
* @param {unknown[]} array
|
|
251
|
+
*/
|
|
252
|
+
function valid_array_indices(array) {
|
|
253
|
+
const keys = Object.keys(array);
|
|
254
|
+
keys.length = array_index_cut(keys);
|
|
255
|
+
return keys;
|
|
256
|
+
}
|
|
183
257
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
input = input.headers.getSetCookie();
|
|
189
|
-
} else if (input.headers["set-cookie"]) {
|
|
190
|
-
// fast-path for node.js (which automatically normalizes header names to lower-case)
|
|
191
|
-
input = input.headers["set-cookie"];
|
|
192
|
-
} else {
|
|
193
|
-
// slow-path for other environments - see #25
|
|
194
|
-
var sch =
|
|
195
|
-
input.headers[
|
|
196
|
-
Object.keys(input.headers).find(function (key) {
|
|
197
|
-
return key.toLowerCase() === "set-cookie";
|
|
198
|
-
})
|
|
199
|
-
];
|
|
200
|
-
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
201
|
-
if (!sch && input.headers.cookie && !options.silent) {
|
|
202
|
-
console.warn(
|
|
203
|
-
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
input = sch;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
258
|
+
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
|
|
259
|
+
const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
|
|
260
|
+
const reserved =
|
|
261
|
+
/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
|
|
209
262
|
|
|
210
|
-
|
|
211
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Turn a value into the JavaScript that creates an equivalent value
|
|
265
|
+
* @param {any} value
|
|
266
|
+
* @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]
|
|
267
|
+
*/
|
|
268
|
+
function uneval(value, replacer) {
|
|
269
|
+
const counts = new Map();
|
|
212
270
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
271
|
+
/** @type {string[]} */
|
|
272
|
+
const keys = [];
|
|
216
273
|
|
|
217
|
-
|
|
218
|
-
input = [input];
|
|
219
|
-
}
|
|
274
|
+
const custom = new Map();
|
|
220
275
|
|
|
221
|
-
|
|
276
|
+
/** @param {any} thing */
|
|
277
|
+
function walk(thing) {
|
|
278
|
+
if (!is_primitive(thing)) {
|
|
279
|
+
if (counts.has(thing)) {
|
|
280
|
+
counts.set(thing, counts.get(thing) + 1);
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
222
283
|
|
|
223
|
-
|
|
224
|
-
input = input.map(splitCookiesString).flat();
|
|
225
|
-
}
|
|
284
|
+
counts.set(thing, 1);
|
|
226
285
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
.map(function (str) {
|
|
230
|
-
return parseString(str, options);
|
|
231
|
-
})
|
|
232
|
-
.filter(Boolean);
|
|
233
|
-
} else {
|
|
234
|
-
var cookies = createNullObj();
|
|
235
|
-
return input.reduce(function (cookies, str) {
|
|
236
|
-
var cookie = parseString(str, options);
|
|
237
|
-
if (cookie && !isForbiddenKey(cookie.name)) {
|
|
238
|
-
cookies[cookie.name] = cookie;
|
|
239
|
-
}
|
|
240
|
-
return cookies;
|
|
241
|
-
}, cookies);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
286
|
+
if (replacer) {
|
|
287
|
+
const str = replacer(thing, (value) => uneval(value, replacer));
|
|
244
288
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
289
|
+
if (typeof str === 'string') {
|
|
290
|
+
custom.set(thing, str);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
248
294
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
295
|
+
if (typeof thing === 'function') {
|
|
296
|
+
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
|
297
|
+
}
|
|
252
298
|
|
|
253
|
-
|
|
254
|
-
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
255
|
-
*/
|
|
256
|
-
function splitCookiesString(cookiesString) {
|
|
257
|
-
if (Array.isArray(cookiesString)) {
|
|
258
|
-
return cookiesString;
|
|
259
|
-
}
|
|
260
|
-
if (typeof cookiesString !== "string") {
|
|
261
|
-
return [];
|
|
262
|
-
}
|
|
299
|
+
const type = get_type(thing);
|
|
263
300
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
301
|
+
switch (type) {
|
|
302
|
+
case 'Number':
|
|
303
|
+
case 'BigInt':
|
|
304
|
+
case 'String':
|
|
305
|
+
case 'Boolean':
|
|
306
|
+
case 'Date':
|
|
307
|
+
case 'RegExp':
|
|
308
|
+
case 'URL':
|
|
309
|
+
case 'URLSearchParams':
|
|
310
|
+
return;
|
|
271
311
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
312
|
+
case 'Array':
|
|
313
|
+
/** @type {any[]} */ (thing).forEach((value, i) => {
|
|
314
|
+
keys.push(`[${i}]`);
|
|
315
|
+
walk(value);
|
|
316
|
+
keys.pop();
|
|
317
|
+
});
|
|
318
|
+
break;
|
|
278
319
|
|
|
279
|
-
|
|
280
|
-
|
|
320
|
+
case 'Set':
|
|
321
|
+
Array.from(thing).forEach(walk);
|
|
322
|
+
break;
|
|
281
323
|
|
|
282
|
-
|
|
283
|
-
|
|
324
|
+
case 'Map':
|
|
325
|
+
for (const [key, value] of thing) {
|
|
326
|
+
keys.push(`.get(${is_primitive(key) ? stringify_primitive$1(key) : '...'})`);
|
|
327
|
+
walk(key);
|
|
328
|
+
walk(value);
|
|
329
|
+
keys.pop();
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
284
332
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
333
|
+
case 'Int8Array':
|
|
334
|
+
case 'Uint8Array':
|
|
335
|
+
case 'Uint8ClampedArray':
|
|
336
|
+
case 'Int16Array':
|
|
337
|
+
case 'Uint16Array':
|
|
338
|
+
case 'Float16Array':
|
|
339
|
+
case 'Int32Array':
|
|
340
|
+
case 'Uint32Array':
|
|
341
|
+
case 'Float32Array':
|
|
342
|
+
case 'Float64Array':
|
|
343
|
+
case 'BigInt64Array':
|
|
344
|
+
case 'BigUint64Array':
|
|
345
|
+
case 'DataView':
|
|
346
|
+
walk(thing.buffer);
|
|
347
|
+
return;
|
|
288
348
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
if (ch === ",") {
|
|
292
|
-
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
293
|
-
lastComma = pos;
|
|
294
|
-
pos += 1;
|
|
349
|
+
case 'ArrayBuffer':
|
|
350
|
+
return;
|
|
295
351
|
|
|
296
|
-
|
|
297
|
-
|
|
352
|
+
case 'Temporal.Duration':
|
|
353
|
+
case 'Temporal.Instant':
|
|
354
|
+
case 'Temporal.PlainDate':
|
|
355
|
+
case 'Temporal.PlainTime':
|
|
356
|
+
case 'Temporal.PlainDateTime':
|
|
357
|
+
case 'Temporal.PlainMonthDay':
|
|
358
|
+
case 'Temporal.PlainYearMonth':
|
|
359
|
+
case 'Temporal.ZonedDateTime':
|
|
360
|
+
return;
|
|
298
361
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
362
|
+
default:
|
|
363
|
+
if (!is_plain_object(thing)) {
|
|
364
|
+
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
365
|
+
}
|
|
302
366
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
cookiesSeparatorFound = true;
|
|
307
|
-
// pos is inside the next cookie, so back up and return it.
|
|
308
|
-
pos = nextStart;
|
|
309
|
-
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
310
|
-
start = pos;
|
|
311
|
-
} else {
|
|
312
|
-
// in param ',' or param separator ';',
|
|
313
|
-
// we continue from that comma
|
|
314
|
-
pos = lastComma + 1;
|
|
315
|
-
}
|
|
316
|
-
} else {
|
|
317
|
-
pos += 1;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
367
|
+
if (enumerable_symbols(thing).length > 0) {
|
|
368
|
+
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
369
|
+
}
|
|
320
370
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
371
|
+
for (const key of Object.keys(thing)) {
|
|
372
|
+
if (key === '__proto__') {
|
|
373
|
+
throw new DevalueError(
|
|
374
|
+
`Cannot stringify objects with __proto__ keys`,
|
|
375
|
+
keys,
|
|
376
|
+
thing,
|
|
377
|
+
value
|
|
378
|
+
);
|
|
379
|
+
}
|
|
325
380
|
|
|
326
|
-
|
|
327
|
-
|
|
381
|
+
keys.push(stringify_key(key));
|
|
382
|
+
walk(thing[key]);
|
|
383
|
+
keys.pop();
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
} else if (typeof thing === 'symbol') {
|
|
387
|
+
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
328
390
|
|
|
329
|
-
|
|
330
|
-
parseSetCookie.parseSetCookie = parseSetCookie;
|
|
331
|
-
// for backwards compatibility
|
|
332
|
-
parseSetCookie.parse = parseSetCookie;
|
|
333
|
-
parseSetCookie.parseString = parseString;
|
|
334
|
-
parseSetCookie.splitCookiesString = splitCookiesString;
|
|
391
|
+
walk(value);
|
|
335
392
|
|
|
336
|
-
const
|
|
337
|
-
const HOLE = -2;
|
|
338
|
-
const NAN = -3;
|
|
339
|
-
const POSITIVE_INFINITY = -4;
|
|
340
|
-
const NEGATIVE_INFINITY = -5;
|
|
341
|
-
const NEGATIVE_ZERO = -6;
|
|
342
|
-
const SPARSE = -7;
|
|
393
|
+
const names = new Map();
|
|
343
394
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
const escaped = {
|
|
351
|
-
'<': '\\u003C',
|
|
352
|
-
'\\': '\\\\',
|
|
353
|
-
'\b': '\\b',
|
|
354
|
-
'\f': '\\f',
|
|
355
|
-
'\n': '\\n',
|
|
356
|
-
'\r': '\\r',
|
|
357
|
-
'\t': '\\t',
|
|
358
|
-
'\u2028': '\\u2028',
|
|
359
|
-
'\u2029': '\\u2029'
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
class DevalueError extends Error {
|
|
363
|
-
/**
|
|
364
|
-
* @param {string} message
|
|
365
|
-
* @param {string[]} keys
|
|
366
|
-
* @param {any} [value] - The value that failed to be serialized
|
|
367
|
-
* @param {any} [root] - The root value being serialized
|
|
368
|
-
*/
|
|
369
|
-
constructor(message, keys, value, root) {
|
|
370
|
-
super(message);
|
|
371
|
-
this.name = 'DevalueError';
|
|
372
|
-
this.path = keys.join('');
|
|
373
|
-
this.value = value;
|
|
374
|
-
this.root = root;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/** @param {any} thing */
|
|
379
|
-
function is_primitive(thing) {
|
|
380
|
-
return thing === null || (typeof thing !== 'object' && typeof thing !== 'function');
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)
|
|
384
|
-
.sort()
|
|
385
|
-
.join('\0');
|
|
386
|
-
|
|
387
|
-
/** @param {any} thing */
|
|
388
|
-
function is_plain_object(thing) {
|
|
389
|
-
const proto = Object.getPrototypeOf(thing);
|
|
390
|
-
|
|
391
|
-
return (
|
|
392
|
-
proto === Object.prototype ||
|
|
393
|
-
proto === null ||
|
|
394
|
-
Object.getPrototypeOf(proto) === null ||
|
|
395
|
-
Object.getOwnPropertyNames(proto).sort().join('\0') === object_proto_names
|
|
396
|
-
);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/** @param {any} thing */
|
|
400
|
-
function get_type(thing) {
|
|
401
|
-
return Object.prototype.toString.call(thing).slice(8, -1);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/** @param {string} char */
|
|
405
|
-
function get_escaped_char(char) {
|
|
406
|
-
switch (char) {
|
|
407
|
-
case '"':
|
|
408
|
-
return '\\"';
|
|
409
|
-
case '<':
|
|
410
|
-
return '\\u003C';
|
|
411
|
-
case '\\':
|
|
412
|
-
return '\\\\';
|
|
413
|
-
case '\n':
|
|
414
|
-
return '\\n';
|
|
415
|
-
case '\r':
|
|
416
|
-
return '\\r';
|
|
417
|
-
case '\t':
|
|
418
|
-
return '\\t';
|
|
419
|
-
case '\b':
|
|
420
|
-
return '\\b';
|
|
421
|
-
case '\f':
|
|
422
|
-
return '\\f';
|
|
423
|
-
case '\u2028':
|
|
424
|
-
return '\\u2028';
|
|
425
|
-
case '\u2029':
|
|
426
|
-
return '\\u2029';
|
|
427
|
-
default:
|
|
428
|
-
return char < ' ' ? `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}` : '';
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/** @param {string} str */
|
|
433
|
-
function stringify_string(str) {
|
|
434
|
-
let result = '';
|
|
435
|
-
let last_pos = 0;
|
|
436
|
-
const len = str.length;
|
|
437
|
-
|
|
438
|
-
for (let i = 0; i < len; i += 1) {
|
|
439
|
-
const char = str[i];
|
|
440
|
-
const replacement = get_escaped_char(char);
|
|
441
|
-
if (replacement) {
|
|
442
|
-
result += str.slice(last_pos, i) + replacement;
|
|
443
|
-
last_pos = i + 1;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/** @param {Record<string | symbol, any>} object */
|
|
451
|
-
function enumerable_symbols(object) {
|
|
452
|
-
return Object.getOwnPropertySymbols(object).filter(
|
|
453
|
-
(symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
|
|
454
|
-
);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
458
|
-
|
|
459
|
-
/** @param {string} key */
|
|
460
|
-
function stringify_key(key) {
|
|
461
|
-
return is_identifier.test(key) ? '.' + key : '[' + JSON.stringify(key) + ']';
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
/** @param {number} n */
|
|
465
|
-
function is_valid_array_index(n) {
|
|
466
|
-
if (!Number.isInteger(n)) return false;
|
|
467
|
-
if (n < 0) return false;
|
|
468
|
-
if (n > MAX_ARRAY_INDEX) return false;
|
|
469
|
-
return true;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
/** @param {number} n */
|
|
473
|
-
function is_valid_array_len(n) {
|
|
474
|
-
if (!Number.isInteger(n)) return false;
|
|
475
|
-
if (n < 0) return false;
|
|
476
|
-
if (n > MAX_ARRAY_LEN) return false;
|
|
477
|
-
return true;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/** @param {string} s */
|
|
481
|
-
function is_valid_array_index_string(s) {
|
|
482
|
-
if (s.length === 0) return false;
|
|
483
|
-
if (s.length > 1 && s.charCodeAt(0) === 48) return false; // leading zero
|
|
484
|
-
for (let i = 0; i < s.length; i++) {
|
|
485
|
-
const c = s.charCodeAt(i);
|
|
486
|
-
if (c < 48 || c > 57) return false;
|
|
487
|
-
}
|
|
488
|
-
// by this point we know it's a string of digits, but it has to be within
|
|
489
|
-
// the range of valid array indices
|
|
490
|
-
return is_valid_array_index(+s);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Returns the length of the leading run of valid array indices in `keys`.
|
|
495
|
-
* @param {readonly string[]} keys
|
|
496
|
-
*/
|
|
497
|
-
function array_index_cut(keys) {
|
|
498
|
-
for (var i = keys.length - 1; i >= 0; i--) {
|
|
499
|
-
if (is_valid_array_index_string(keys[i])) {
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
return i + 1;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Finds the populated indices of an array.
|
|
508
|
-
* @param {unknown[]} array
|
|
509
|
-
*/
|
|
510
|
-
function valid_array_indices(array) {
|
|
511
|
-
const keys = Object.keys(array);
|
|
512
|
-
keys.length = array_index_cut(keys);
|
|
513
|
-
return keys;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
|
|
517
|
-
const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
|
|
518
|
-
const reserved =
|
|
519
|
-
/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Turn a value into the JavaScript that creates an equivalent value
|
|
523
|
-
* @param {any} value
|
|
524
|
-
* @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]
|
|
525
|
-
*/
|
|
526
|
-
function uneval(value, replacer) {
|
|
527
|
-
const counts = new Map();
|
|
528
|
-
|
|
529
|
-
/** @type {string[]} */
|
|
530
|
-
const keys = [];
|
|
531
|
-
|
|
532
|
-
const custom = new Map();
|
|
533
|
-
|
|
534
|
-
/** @param {any} thing */
|
|
535
|
-
function walk(thing) {
|
|
536
|
-
if (!is_primitive(thing)) {
|
|
537
|
-
if (counts.has(thing)) {
|
|
538
|
-
counts.set(thing, counts.get(thing) + 1);
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
counts.set(thing, 1);
|
|
543
|
-
|
|
544
|
-
if (replacer) {
|
|
545
|
-
const str = replacer(thing, (value) => uneval(value, replacer));
|
|
546
|
-
|
|
547
|
-
if (typeof str === 'string') {
|
|
548
|
-
custom.set(thing, str);
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
if (typeof thing === 'function') {
|
|
554
|
-
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
const type = get_type(thing);
|
|
558
|
-
|
|
559
|
-
switch (type) {
|
|
560
|
-
case 'Number':
|
|
561
|
-
case 'BigInt':
|
|
562
|
-
case 'String':
|
|
563
|
-
case 'Boolean':
|
|
564
|
-
case 'Date':
|
|
565
|
-
case 'RegExp':
|
|
566
|
-
case 'URL':
|
|
567
|
-
case 'URLSearchParams':
|
|
568
|
-
return;
|
|
569
|
-
|
|
570
|
-
case 'Array':
|
|
571
|
-
/** @type {any[]} */ (thing).forEach((value, i) => {
|
|
572
|
-
keys.push(`[${i}]`);
|
|
573
|
-
walk(value);
|
|
574
|
-
keys.pop();
|
|
575
|
-
});
|
|
576
|
-
break;
|
|
577
|
-
|
|
578
|
-
case 'Set':
|
|
579
|
-
Array.from(thing).forEach(walk);
|
|
580
|
-
break;
|
|
581
|
-
|
|
582
|
-
case 'Map':
|
|
583
|
-
for (const [key, value] of thing) {
|
|
584
|
-
keys.push(`.get(${is_primitive(key) ? stringify_primitive$1(key) : '...'})`);
|
|
585
|
-
walk(key);
|
|
586
|
-
walk(value);
|
|
587
|
-
keys.pop();
|
|
588
|
-
}
|
|
589
|
-
break;
|
|
590
|
-
|
|
591
|
-
case 'Int8Array':
|
|
592
|
-
case 'Uint8Array':
|
|
593
|
-
case 'Uint8ClampedArray':
|
|
594
|
-
case 'Int16Array':
|
|
595
|
-
case 'Uint16Array':
|
|
596
|
-
case 'Float16Array':
|
|
597
|
-
case 'Int32Array':
|
|
598
|
-
case 'Uint32Array':
|
|
599
|
-
case 'Float32Array':
|
|
600
|
-
case 'Float64Array':
|
|
601
|
-
case 'BigInt64Array':
|
|
602
|
-
case 'BigUint64Array':
|
|
603
|
-
case 'DataView':
|
|
604
|
-
walk(thing.buffer);
|
|
605
|
-
return;
|
|
606
|
-
|
|
607
|
-
case 'ArrayBuffer':
|
|
608
|
-
return;
|
|
609
|
-
|
|
610
|
-
case 'Temporal.Duration':
|
|
611
|
-
case 'Temporal.Instant':
|
|
612
|
-
case 'Temporal.PlainDate':
|
|
613
|
-
case 'Temporal.PlainTime':
|
|
614
|
-
case 'Temporal.PlainDateTime':
|
|
615
|
-
case 'Temporal.PlainMonthDay':
|
|
616
|
-
case 'Temporal.PlainYearMonth':
|
|
617
|
-
case 'Temporal.ZonedDateTime':
|
|
618
|
-
return;
|
|
619
|
-
|
|
620
|
-
default:
|
|
621
|
-
if (!is_plain_object(thing)) {
|
|
622
|
-
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
if (enumerable_symbols(thing).length > 0) {
|
|
626
|
-
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
for (const key of Object.keys(thing)) {
|
|
630
|
-
if (key === '__proto__') {
|
|
631
|
-
throw new DevalueError(
|
|
632
|
-
`Cannot stringify objects with __proto__ keys`,
|
|
633
|
-
keys,
|
|
634
|
-
thing,
|
|
635
|
-
value
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
keys.push(stringify_key(key));
|
|
640
|
-
walk(thing[key]);
|
|
641
|
-
keys.pop();
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
} else if (typeof thing === 'symbol') {
|
|
645
|
-
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
walk(value);
|
|
650
|
-
|
|
651
|
-
const names = new Map();
|
|
652
|
-
|
|
653
|
-
Array.from(counts)
|
|
654
|
-
.filter((entry) => entry[1] > 1)
|
|
655
|
-
.sort((a, b) => b[1] - a[1])
|
|
656
|
-
.forEach((entry, i) => {
|
|
657
|
-
names.set(entry[0], get_name(i));
|
|
658
|
-
});
|
|
395
|
+
Array.from(counts)
|
|
396
|
+
.filter((entry) => entry[1] > 1)
|
|
397
|
+
.sort((a, b) => b[1] - a[1])
|
|
398
|
+
.forEach((entry, i) => {
|
|
399
|
+
names.set(entry[0], get_name(i));
|
|
400
|
+
});
|
|
659
401
|
|
|
660
402
|
/**
|
|
661
403
|
* @param {any} thing
|
|
@@ -1864,317 +1606,575 @@ function run(async, value, reducers, options) {
|
|
|
1864
1606
|
break;
|
|
1865
1607
|
}
|
|
1866
1608
|
|
|
1867
|
-
case 'Temporal.Duration':
|
|
1868
|
-
case 'Temporal.Instant':
|
|
1869
|
-
case 'Temporal.PlainDate':
|
|
1870
|
-
case 'Temporal.PlainTime':
|
|
1871
|
-
case 'Temporal.PlainDateTime':
|
|
1872
|
-
case 'Temporal.PlainMonthDay':
|
|
1873
|
-
case 'Temporal.PlainYearMonth':
|
|
1874
|
-
case 'Temporal.ZonedDateTime':
|
|
1875
|
-
str = `["${tag}",${stringify_string(ops.toStringValue(thing))}]`;
|
|
1876
|
-
break;
|
|
1609
|
+
case 'Temporal.Duration':
|
|
1610
|
+
case 'Temporal.Instant':
|
|
1611
|
+
case 'Temporal.PlainDate':
|
|
1612
|
+
case 'Temporal.PlainTime':
|
|
1613
|
+
case 'Temporal.PlainDateTime':
|
|
1614
|
+
case 'Temporal.PlainMonthDay':
|
|
1615
|
+
case 'Temporal.PlainYearMonth':
|
|
1616
|
+
case 'Temporal.ZonedDateTime':
|
|
1617
|
+
str = `["${tag}",${stringify_string(ops.toStringValue(thing))}]`;
|
|
1618
|
+
break;
|
|
1619
|
+
|
|
1620
|
+
default: {
|
|
1621
|
+
const shape = ops.shapeOf(thing);
|
|
1622
|
+
|
|
1623
|
+
if (shape.kind === 'not-plain') {
|
|
1624
|
+
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
if (shape.kind === 'symbol-keys') {
|
|
1628
|
+
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
if (shape.kind === 'null-proto') {
|
|
1632
|
+
str = '["null"';
|
|
1633
|
+
for (const key of shape.keys) {
|
|
1634
|
+
if (key === '__proto__') {
|
|
1635
|
+
throw new DevalueError(
|
|
1636
|
+
`Cannot stringify objects with __proto__ keys`,
|
|
1637
|
+
keys,
|
|
1638
|
+
thing,
|
|
1639
|
+
value
|
|
1640
|
+
);
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
keys.push(stringify_key(key));
|
|
1644
|
+
str += `,${stringify_string(key)},${flatten(ops.get(thing, key))}`;
|
|
1645
|
+
keys.pop();
|
|
1646
|
+
}
|
|
1647
|
+
str += ']';
|
|
1648
|
+
} else {
|
|
1649
|
+
str = '{';
|
|
1650
|
+
let started = false;
|
|
1651
|
+
for (const key of shape.keys) {
|
|
1652
|
+
if (key === '__proto__') {
|
|
1653
|
+
throw new DevalueError(
|
|
1654
|
+
`Cannot stringify objects with __proto__ keys`,
|
|
1655
|
+
keys,
|
|
1656
|
+
thing,
|
|
1657
|
+
value
|
|
1658
|
+
);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
if (started) str += ',';
|
|
1662
|
+
started = true;
|
|
1663
|
+
keys.push(stringify_key(key));
|
|
1664
|
+
str += `${stringify_string(key)}:${flatten(ops.get(thing, key))}`;
|
|
1665
|
+
keys.pop();
|
|
1666
|
+
}
|
|
1667
|
+
str += '}';
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
stringified[index] = str;
|
|
1674
|
+
return index;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
const index = flatten(value);
|
|
1678
|
+
|
|
1679
|
+
// special case — value is represented as a negative index
|
|
1680
|
+
if (index < 0) return `${index}`;
|
|
1681
|
+
|
|
1682
|
+
return stringified;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* @param {any} thing
|
|
1687
|
+
* @returns {string}
|
|
1688
|
+
*/
|
|
1689
|
+
function stringify_primitive(thing) {
|
|
1690
|
+
const type = typeof thing;
|
|
1691
|
+
if (type === 'string') return stringify_string(thing);
|
|
1692
|
+
if (thing === void 0) return UNDEFINED.toString();
|
|
1693
|
+
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
1694
|
+
if (type === 'bigint') return `["BigInt","${thing}"]`;
|
|
1695
|
+
return String(thing);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
const text_encoder$1 = new TextEncoder();
|
|
1699
|
+
function get_relative_path(from, to) {
|
|
1700
|
+
const from_parts = from.split(/[/\\]/);
|
|
1701
|
+
const to_parts = to.split(/[/\\]/);
|
|
1702
|
+
from_parts.pop();
|
|
1703
|
+
while (from_parts[0] === to_parts[0]) {
|
|
1704
|
+
from_parts.shift();
|
|
1705
|
+
to_parts.shift();
|
|
1706
|
+
}
|
|
1707
|
+
let i = from_parts.length;
|
|
1708
|
+
while (i--) from_parts[i] = "..";
|
|
1709
|
+
return from_parts.concat(to_parts).join("/");
|
|
1710
|
+
}
|
|
1711
|
+
function base64_encode$1(bytes) {
|
|
1712
|
+
if (globalThis.Buffer) {
|
|
1713
|
+
return globalThis.Buffer.from(bytes).toString("base64");
|
|
1714
|
+
}
|
|
1715
|
+
let binary = "";
|
|
1716
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
1717
|
+
binary += String.fromCharCode(bytes[i]);
|
|
1718
|
+
}
|
|
1719
|
+
return btoa(binary);
|
|
1720
|
+
}
|
|
1721
|
+
function base64_decode(encoded) {
|
|
1722
|
+
if (globalThis.Buffer) {
|
|
1723
|
+
const buffer = globalThis.Buffer.from(encoded, "base64");
|
|
1724
|
+
return new Uint8Array(buffer);
|
|
1725
|
+
}
|
|
1726
|
+
const binary = atob(encoded);
|
|
1727
|
+
const bytes = new Uint8Array(binary.length);
|
|
1728
|
+
for (let i = 0; i < binary.length; i++) {
|
|
1729
|
+
bytes[i] = binary.charCodeAt(i);
|
|
1730
|
+
}
|
|
1731
|
+
return bytes;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)
|
|
1738
|
+
/**
|
|
1739
|
+
* @template {number} TNumber
|
|
1740
|
+
* @template {any[]} [TArray=[]]
|
|
1741
|
+
* @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan
|
|
1742
|
+
*/
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* @template {number} TStart
|
|
1746
|
+
* @template {number} TEnd
|
|
1747
|
+
* @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange
|
|
1748
|
+
*/
|
|
1749
|
+
|
|
1750
|
+
// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits
|
|
1751
|
+
// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780
|
|
1752
|
+
|
|
1753
|
+
// we have to repeat the JSDoc because the display for function overloads is broken
|
|
1754
|
+
// see https://github.com/microsoft/TypeScript/issues/55056
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
1758
|
+
* When called during request handling, this will cause SvelteKit to
|
|
1759
|
+
* return an error response without invoking `handleError`.
|
|
1760
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
1761
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1762
|
+
* @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
1763
|
+
* @overload
|
|
1764
|
+
* @param {number} status
|
|
1765
|
+
* @param {App.Error} body
|
|
1766
|
+
* @return {never}
|
|
1767
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
1768
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
1769
|
+
*/
|
|
1770
|
+
/**
|
|
1771
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
1772
|
+
* When called during request handling, this will cause SvelteKit to
|
|
1773
|
+
* return an error response without invoking `handleError`.
|
|
1774
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
1775
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1776
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
1777
|
+
* @overload
|
|
1778
|
+
* @param {number} status
|
|
1779
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]
|
|
1780
|
+
* @return {never}
|
|
1781
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
1782
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
1783
|
+
*/
|
|
1784
|
+
/**
|
|
1785
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
1786
|
+
* When called during request handling, this will cause SvelteKit to
|
|
1787
|
+
* return an error response without invoking `handleError`.
|
|
1788
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
1789
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1790
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
1791
|
+
* @return {never}
|
|
1792
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
1793
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
1794
|
+
*/
|
|
1795
|
+
function error$1(status, body) {
|
|
1796
|
+
if ((isNaN(status) || status < 400 || status > 599)) {
|
|
1797
|
+
throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
throw new HttpError(status, body);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Checks whether this is a redirect thrown by {@link redirect}.
|
|
1805
|
+
* @param {unknown} e The object to check.
|
|
1806
|
+
* @return {e is Redirect}
|
|
1807
|
+
*/
|
|
1808
|
+
function isRedirect(e) {
|
|
1809
|
+
return e instanceof Redirect;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* Create a JSON `Response` object from the supplied data.
|
|
1814
|
+
* @param {any} data The value that will be serialized as JSON.
|
|
1815
|
+
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
|
|
1816
|
+
*/
|
|
1817
|
+
function json(data, init) {
|
|
1818
|
+
// TODO deprecate this in favour of `Response.json` when it's
|
|
1819
|
+
// more widely supported
|
|
1820
|
+
const body = JSON.stringify(data);
|
|
1821
|
+
|
|
1822
|
+
// we can't just do `text(JSON.stringify(data), init)` because
|
|
1823
|
+
// it will set a default `content-type` header. duplicated code
|
|
1824
|
+
// means less duplicated work
|
|
1825
|
+
const headers = new Headers(init?.headers);
|
|
1826
|
+
if (!headers.has('content-length')) {
|
|
1827
|
+
headers.set('content-length', text_encoder$2.encode(body).byteLength.toString());
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
if (!headers.has('content-type')) {
|
|
1831
|
+
headers.set('content-type', 'application/json');
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
return new Response(body, {
|
|
1835
|
+
...init,
|
|
1836
|
+
headers
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
/**
|
|
1841
|
+
* Create a `Response` object from the supplied body.
|
|
1842
|
+
* @param {string} body The value that will be used as-is.
|
|
1843
|
+
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
|
|
1844
|
+
*/
|
|
1845
|
+
function text(body, init) {
|
|
1846
|
+
const headers = new Headers(init?.headers);
|
|
1847
|
+
if (!headers.has('content-length')) {
|
|
1848
|
+
const encoded = text_encoder$2.encode(body);
|
|
1849
|
+
headers.set('content-length', encoded.byteLength.toString());
|
|
1850
|
+
return new Response(encoded, {
|
|
1851
|
+
...init,
|
|
1852
|
+
headers
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
return new Response(body, {
|
|
1857
|
+
...init,
|
|
1858
|
+
headers
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
// eslint-disable-next-line n/prefer-global/process
|
|
1863
|
+
const IN_WEBCONTAINER$1 = !!globalThis.process?.versions?.webcontainer;
|
|
1877
1864
|
|
|
1878
|
-
|
|
1879
|
-
|
|
1865
|
+
/** @import { RequestEvent } from '@sveltejs/kit' */
|
|
1866
|
+
/** @import { RequestStore } from 'types' */
|
|
1867
|
+
/** @import { AsyncLocalStorage } from 'node:async_hooks' */
|
|
1880
1868
|
|
|
1881
|
-
if (shape.kind === 'not-plain') {
|
|
1882
|
-
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
1883
|
-
}
|
|
1884
1869
|
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
}
|
|
1870
|
+
/** @type {RequestStore | null} */
|
|
1871
|
+
let sync_store = null;
|
|
1888
1872
|
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
for (const key of shape.keys) {
|
|
1892
|
-
if (key === '__proto__') {
|
|
1893
|
-
throw new DevalueError(
|
|
1894
|
-
`Cannot stringify objects with __proto__ keys`,
|
|
1895
|
-
keys,
|
|
1896
|
-
thing,
|
|
1897
|
-
value
|
|
1898
|
-
);
|
|
1899
|
-
}
|
|
1873
|
+
/** @type {AsyncLocalStorage<RequestStore | null> | null} */
|
|
1874
|
+
let als$1;
|
|
1900
1875
|
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
let started = false;
|
|
1909
|
-
for (const key of shape.keys) {
|
|
1910
|
-
if (key === '__proto__') {
|
|
1911
|
-
throw new DevalueError(
|
|
1912
|
-
`Cannot stringify objects with __proto__ keys`,
|
|
1913
|
-
keys,
|
|
1914
|
-
thing,
|
|
1915
|
-
value
|
|
1916
|
-
);
|
|
1917
|
-
}
|
|
1876
|
+
import('node:async_hooks')
|
|
1877
|
+
.then((hooks) => (als$1 = new hooks.AsyncLocalStorage()))
|
|
1878
|
+
.catch(() => {
|
|
1879
|
+
// can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
|
|
1880
|
+
// this isn't behind `supports` because it's basically just StackBlitz (i.e.
|
|
1881
|
+
// in-browser usage) that doesn't support it AFAICT
|
|
1882
|
+
});
|
|
1918
1883
|
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1884
|
+
/**
|
|
1885
|
+
* @template T
|
|
1886
|
+
* @param {RequestStore | null} store
|
|
1887
|
+
* @param {() => T} fn
|
|
1888
|
+
*/
|
|
1889
|
+
function with_request_store(store, fn) {
|
|
1890
|
+
try {
|
|
1891
|
+
sync_store = store;
|
|
1892
|
+
return als$1 ? als$1.run(store, fn) : fn();
|
|
1893
|
+
} finally {
|
|
1894
|
+
// Since AsyncLocalStorage is not working in webcontainers, we don't reset `sync_store`
|
|
1895
|
+
// and handle only one request at a time in `src/runtime/server/index.js`.
|
|
1896
|
+
if (!IN_WEBCONTAINER$1) {
|
|
1897
|
+
sync_store = null;
|
|
1929
1898
|
}
|
|
1930
|
-
|
|
1931
|
-
stringified[index] = str;
|
|
1932
|
-
return index;
|
|
1933
1899
|
}
|
|
1900
|
+
}
|
|
1934
1901
|
|
|
1935
|
-
|
|
1902
|
+
/**
|
|
1903
|
+
* @template {{ tracing: { enabled: boolean, root: import('@opentelemetry/api').Span, current: import('@opentelemetry/api').Span } }} T
|
|
1904
|
+
* @param {T} event_like
|
|
1905
|
+
* @param {import('@opentelemetry/api').Span} current
|
|
1906
|
+
* @returns {T}
|
|
1907
|
+
*/
|
|
1908
|
+
function merge_tracing(event_like, current) {
|
|
1909
|
+
return {
|
|
1910
|
+
...event_like,
|
|
1911
|
+
tracing: {
|
|
1912
|
+
...event_like.tracing,
|
|
1913
|
+
current
|
|
1914
|
+
}
|
|
1915
|
+
};
|
|
1916
|
+
}
|
|
1936
1917
|
|
|
1937
|
-
|
|
1938
|
-
|
|
1918
|
+
var defaultParseOptions = {
|
|
1919
|
+
decodeValues: true,
|
|
1920
|
+
map: false,
|
|
1921
|
+
silent: false,
|
|
1922
|
+
split: "auto", // auto = split strings but not arrays
|
|
1923
|
+
};
|
|
1939
1924
|
|
|
1940
|
-
|
|
1925
|
+
function isForbiddenKey(key) {
|
|
1926
|
+
return typeof key !== "string" || key in {};
|
|
1941
1927
|
}
|
|
1942
1928
|
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
* @returns {string}
|
|
1946
|
-
*/
|
|
1947
|
-
function stringify_primitive(thing) {
|
|
1948
|
-
const type = typeof thing;
|
|
1949
|
-
if (type === 'string') return stringify_string(thing);
|
|
1950
|
-
if (thing === void 0) return UNDEFINED.toString();
|
|
1951
|
-
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
1952
|
-
if (type === 'bigint') return `["BigInt","${thing}"]`;
|
|
1953
|
-
return String(thing);
|
|
1929
|
+
function createNullObj() {
|
|
1930
|
+
return Object.create(null);
|
|
1954
1931
|
}
|
|
1955
1932
|
|
|
1956
|
-
|
|
1933
|
+
function isNonEmptyString(str) {
|
|
1934
|
+
return typeof str === "string" && !!str.trim();
|
|
1935
|
+
}
|
|
1957
1936
|
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
from_parts.shift();
|
|
1965
|
-
to_parts.shift();
|
|
1937
|
+
function parseString(setCookieValue, options) {
|
|
1938
|
+
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
1939
|
+
|
|
1940
|
+
var nameValuePairStr = parts.shift();
|
|
1941
|
+
if (!nameValuePairStr) {
|
|
1942
|
+
return null;
|
|
1966
1943
|
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1944
|
+
var parsed = parseNameValuePair(nameValuePairStr);
|
|
1945
|
+
var name = parsed.name;
|
|
1946
|
+
var value = parsed.value;
|
|
1947
|
+
|
|
1948
|
+
options = options
|
|
1949
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
1950
|
+
: defaultParseOptions;
|
|
1951
|
+
|
|
1952
|
+
if (isForbiddenKey(name)) {
|
|
1953
|
+
return null;
|
|
1974
1954
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1955
|
+
|
|
1956
|
+
try {
|
|
1957
|
+
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
1958
|
+
} catch (e) {
|
|
1959
|
+
console.error(
|
|
1960
|
+
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
|
|
1961
|
+
e
|
|
1962
|
+
);
|
|
1978
1963
|
}
|
|
1979
|
-
|
|
1964
|
+
|
|
1965
|
+
var cookie = createNullObj();
|
|
1966
|
+
cookie.name = name;
|
|
1967
|
+
cookie.value = value;
|
|
1968
|
+
|
|
1969
|
+
parts.forEach(function (part) {
|
|
1970
|
+
var sides = part.split("=");
|
|
1971
|
+
var key = sides.shift().trim().toLowerCase();
|
|
1972
|
+
if (isForbiddenKey(key)) {
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
var value = sides.join("=").trim();
|
|
1976
|
+
if (key === "expires") {
|
|
1977
|
+
cookie.expires = new Date(value);
|
|
1978
|
+
} else if (key === "max-age") {
|
|
1979
|
+
var n = parseInt(value, 10);
|
|
1980
|
+
if (!Number.isNaN(n)) cookie.maxAge = n;
|
|
1981
|
+
} else if (key === "secure") {
|
|
1982
|
+
cookie.secure = true;
|
|
1983
|
+
} else if (key === "httponly") {
|
|
1984
|
+
cookie.httpOnly = true;
|
|
1985
|
+
} else if (key === "samesite") {
|
|
1986
|
+
cookie.sameSite = value;
|
|
1987
|
+
} else if (key === "partitioned") {
|
|
1988
|
+
cookie.partitioned = true;
|
|
1989
|
+
} else if (key) {
|
|
1990
|
+
cookie[key] = value;
|
|
1991
|
+
}
|
|
1992
|
+
});
|
|
1993
|
+
|
|
1994
|
+
return cookie;
|
|
1980
1995
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1996
|
+
|
|
1997
|
+
function parseNameValuePair(nameValuePairStr) {
|
|
1998
|
+
// Parses name-value-pair according to rfc6265bis draft
|
|
1999
|
+
|
|
2000
|
+
var name = "";
|
|
2001
|
+
var value = "";
|
|
2002
|
+
var nameValueArr = nameValuePairStr.split("=");
|
|
2003
|
+
if (nameValueArr.length > 1) {
|
|
2004
|
+
name = nameValueArr.shift();
|
|
2005
|
+
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
|
|
2006
|
+
} else {
|
|
2007
|
+
value = nameValuePairStr;
|
|
1985
2008
|
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
2009
|
+
|
|
2010
|
+
return { name: name, value: value };
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
function parseSetCookie(input, options) {
|
|
2014
|
+
options = options
|
|
2015
|
+
? Object.assign({}, defaultParseOptions, options)
|
|
2016
|
+
: defaultParseOptions;
|
|
2017
|
+
|
|
2018
|
+
if (!input) {
|
|
2019
|
+
if (!options.map) {
|
|
2020
|
+
return [];
|
|
2021
|
+
} else {
|
|
2022
|
+
return createNullObj();
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
if (input.headers) {
|
|
2027
|
+
if (typeof input.headers.getSetCookie === "function") {
|
|
2028
|
+
// for fetch responses - they combine headers of the same type in the headers array,
|
|
2029
|
+
// but getSetCookie returns an uncombined array
|
|
2030
|
+
input = input.headers.getSetCookie();
|
|
2031
|
+
} else if (input.headers["set-cookie"]) {
|
|
2032
|
+
// fast-path for node.js (which automatically normalizes header names to lower-case)
|
|
2033
|
+
input = input.headers["set-cookie"];
|
|
2034
|
+
} else {
|
|
2035
|
+
// slow-path for other environments - see #25
|
|
2036
|
+
var sch =
|
|
2037
|
+
input.headers[
|
|
2038
|
+
Object.keys(input.headers).find(function (key) {
|
|
2039
|
+
return key.toLowerCase() === "set-cookie";
|
|
2040
|
+
})
|
|
2041
|
+
];
|
|
2042
|
+
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
2043
|
+
if (!sch && input.headers.cookie && !options.silent) {
|
|
2044
|
+
console.warn(
|
|
2045
|
+
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
input = sch;
|
|
2049
|
+
}
|
|
1990
2050
|
}
|
|
1991
|
-
return bytes;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)
|
|
1998
|
-
/**
|
|
1999
|
-
* @template {number} TNumber
|
|
2000
|
-
* @template {any[]} [TArray=[]]
|
|
2001
|
-
* @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan
|
|
2002
|
-
*/
|
|
2003
2051
|
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
* @template {number} TEnd
|
|
2007
|
-
* @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange
|
|
2008
|
-
*/
|
|
2052
|
+
var split = options.split;
|
|
2053
|
+
var isArray = Array.isArray(input);
|
|
2009
2054
|
|
|
2010
|
-
|
|
2011
|
-
|
|
2055
|
+
if (split === "auto") {
|
|
2056
|
+
split = !isArray;
|
|
2057
|
+
}
|
|
2012
2058
|
|
|
2013
|
-
|
|
2014
|
-
|
|
2059
|
+
if (!isArray) {
|
|
2060
|
+
input = [input];
|
|
2061
|
+
}
|
|
2015
2062
|
|
|
2016
|
-
|
|
2017
|
-
* Throws an error with a HTTP status code and an optional message.
|
|
2018
|
-
* When called during request handling, this will cause SvelteKit to
|
|
2019
|
-
* return an error response without invoking `handleError`.
|
|
2020
|
-
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
2021
|
-
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
2022
|
-
* @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
2023
|
-
* @overload
|
|
2024
|
-
* @param {number} status
|
|
2025
|
-
* @param {App.Error} body
|
|
2026
|
-
* @return {never}
|
|
2027
|
-
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
2028
|
-
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
2029
|
-
*/
|
|
2030
|
-
/**
|
|
2031
|
-
* Throws an error with a HTTP status code and an optional message.
|
|
2032
|
-
* When called during request handling, this will cause SvelteKit to
|
|
2033
|
-
* return an error response without invoking `handleError`.
|
|
2034
|
-
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
2035
|
-
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
2036
|
-
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
2037
|
-
* @overload
|
|
2038
|
-
* @param {number} status
|
|
2039
|
-
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]
|
|
2040
|
-
* @return {never}
|
|
2041
|
-
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
2042
|
-
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
2043
|
-
*/
|
|
2044
|
-
/**
|
|
2045
|
-
* Throws an error with a HTTP status code and an optional message.
|
|
2046
|
-
* When called during request handling, this will cause SvelteKit to
|
|
2047
|
-
* return an error response without invoking `handleError`.
|
|
2048
|
-
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
2049
|
-
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
2050
|
-
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
2051
|
-
* @return {never}
|
|
2052
|
-
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
2053
|
-
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
2054
|
-
*/
|
|
2055
|
-
function error$1(status, body) {
|
|
2056
|
-
if ((isNaN(status) || status < 400 || status > 599)) {
|
|
2057
|
-
throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
|
|
2058
|
-
}
|
|
2063
|
+
input = input.filter(isNonEmptyString);
|
|
2059
2064
|
|
|
2060
|
-
|
|
2061
|
-
|
|
2065
|
+
if (split) {
|
|
2066
|
+
input = input.map(splitCookiesString).flat();
|
|
2067
|
+
}
|
|
2062
2068
|
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2069
|
+
if (!options.map) {
|
|
2070
|
+
return input
|
|
2071
|
+
.map(function (str) {
|
|
2072
|
+
return parseString(str, options);
|
|
2073
|
+
})
|
|
2074
|
+
.filter(Boolean);
|
|
2075
|
+
} else {
|
|
2076
|
+
var cookies = createNullObj();
|
|
2077
|
+
return input.reduce(function (cookies, str) {
|
|
2078
|
+
var cookie = parseString(str, options);
|
|
2079
|
+
if (cookie && !isForbiddenKey(cookie.name)) {
|
|
2080
|
+
cookies[cookie.name] = cookie;
|
|
2081
|
+
}
|
|
2082
|
+
return cookies;
|
|
2083
|
+
}, cookies);
|
|
2084
|
+
}
|
|
2070
2085
|
}
|
|
2071
2086
|
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
|
|
2076
|
-
*/
|
|
2077
|
-
function json(data, init) {
|
|
2078
|
-
// TODO deprecate this in favour of `Response.json` when it's
|
|
2079
|
-
// more widely supported
|
|
2080
|
-
const body = JSON.stringify(data);
|
|
2081
|
-
|
|
2082
|
-
// we can't just do `text(JSON.stringify(data), init)` because
|
|
2083
|
-
// it will set a default `content-type` header. duplicated code
|
|
2084
|
-
// means less duplicated work
|
|
2085
|
-
const headers = new Headers(init?.headers);
|
|
2086
|
-
if (!headers.has('content-length')) {
|
|
2087
|
-
headers.set('content-length', text_encoder$2.encode(body).byteLength.toString());
|
|
2088
|
-
}
|
|
2087
|
+
/*
|
|
2088
|
+
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
|
|
2089
|
+
that are within a single set-cookie field-value, such as in the Expires portion.
|
|
2089
2090
|
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2091
|
+
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
|
|
2092
|
+
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
|
|
2093
|
+
React Native's fetch does this for *every* header, including set-cookie.
|
|
2093
2094
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2095
|
+
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
|
|
2096
|
+
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
2097
|
+
*/
|
|
2098
|
+
function splitCookiesString(cookiesString) {
|
|
2099
|
+
if (Array.isArray(cookiesString)) {
|
|
2100
|
+
return cookiesString;
|
|
2101
|
+
}
|
|
2102
|
+
if (typeof cookiesString !== "string") {
|
|
2103
|
+
return [];
|
|
2104
|
+
}
|
|
2099
2105
|
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
if (!headers.has('content-length')) {
|
|
2108
|
-
const encoded = text_encoder$2.encode(body);
|
|
2109
|
-
headers.set('content-length', encoded.byteLength.toString());
|
|
2110
|
-
return new Response(encoded, {
|
|
2111
|
-
...init,
|
|
2112
|
-
headers
|
|
2113
|
-
});
|
|
2114
|
-
}
|
|
2106
|
+
var cookiesStrings = [];
|
|
2107
|
+
var pos = 0;
|
|
2108
|
+
var start;
|
|
2109
|
+
var ch;
|
|
2110
|
+
var lastComma;
|
|
2111
|
+
var nextStart;
|
|
2112
|
+
var cookiesSeparatorFound;
|
|
2115
2113
|
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2114
|
+
function skipWhitespace() {
|
|
2115
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
2116
|
+
pos += 1;
|
|
2117
|
+
}
|
|
2118
|
+
return pos < cookiesString.length;
|
|
2119
|
+
}
|
|
2121
2120
|
|
|
2122
|
-
|
|
2123
|
-
|
|
2121
|
+
function notSpecialChar() {
|
|
2122
|
+
ch = cookiesString.charAt(pos);
|
|
2124
2123
|
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
/** @import { AsyncLocalStorage } from 'node:async_hooks' */
|
|
2124
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
2125
|
+
}
|
|
2128
2126
|
|
|
2127
|
+
while (pos < cookiesString.length) {
|
|
2128
|
+
start = pos;
|
|
2129
|
+
cookiesSeparatorFound = false;
|
|
2129
2130
|
|
|
2130
|
-
|
|
2131
|
-
|
|
2131
|
+
while (skipWhitespace()) {
|
|
2132
|
+
ch = cookiesString.charAt(pos);
|
|
2133
|
+
if (ch === ",") {
|
|
2134
|
+
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
2135
|
+
lastComma = pos;
|
|
2136
|
+
pos += 1;
|
|
2132
2137
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2138
|
+
skipWhitespace();
|
|
2139
|
+
nextStart = pos;
|
|
2135
2140
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
// can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
|
|
2140
|
-
// this isn't behind `supports` because it's basically just StackBlitz (i.e.
|
|
2141
|
-
// in-browser usage) that doesn't support it AFAICT
|
|
2142
|
-
});
|
|
2141
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
2142
|
+
pos += 1;
|
|
2143
|
+
}
|
|
2143
2144
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
}
|
|
2145
|
+
// currently special character
|
|
2146
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
2147
|
+
// we found cookies separator
|
|
2148
|
+
cookiesSeparatorFound = true;
|
|
2149
|
+
// pos is inside the next cookie, so back up and return it.
|
|
2150
|
+
pos = nextStart;
|
|
2151
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
2152
|
+
start = pos;
|
|
2153
|
+
} else {
|
|
2154
|
+
// in param ',' or param separator ';',
|
|
2155
|
+
// we continue from that comma
|
|
2156
|
+
pos = lastComma + 1;
|
|
2157
|
+
}
|
|
2158
|
+
} else {
|
|
2159
|
+
pos += 1;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2161
2162
|
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
function merge_tracing(event_like, current) {
|
|
2169
|
-
return {
|
|
2170
|
-
...event_like,
|
|
2171
|
-
tracing: {
|
|
2172
|
-
...event_like.tracing,
|
|
2173
|
-
current
|
|
2174
|
-
}
|
|
2175
|
-
};
|
|
2163
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
2164
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
return cookiesStrings;
|
|
2176
2169
|
}
|
|
2177
2170
|
|
|
2171
|
+
// named export for CJS
|
|
2172
|
+
parseSetCookie.parseSetCookie = parseSetCookie;
|
|
2173
|
+
// for backwards compatibility
|
|
2174
|
+
parseSetCookie.parse = parseSetCookie;
|
|
2175
|
+
parseSetCookie.parseString = parseString;
|
|
2176
|
+
parseSetCookie.splitCookiesString = splitCookiesString;
|
|
2177
|
+
|
|
2178
2178
|
const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
|
|
2179
2179
|
const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
|
|
2180
2180
|
const PAGE_METHODS = ["GET", "POST", "HEAD"];
|
|
@@ -7211,14 +7211,128 @@ const validate_page_exports = validator(valid_page_exports);
|
|
|
7211
7211
|
const validate_layout_server_exports = validator(valid_layout_server_exports);
|
|
7212
7212
|
const validate_page_server_exports = validator(valid_page_server_exports);
|
|
7213
7213
|
|
|
7214
|
-
let
|
|
7214
|
+
let read_implementation = null;
|
|
7215
|
+
function set_read_implementation(fn) {
|
|
7216
|
+
read_implementation = fn;
|
|
7217
|
+
}
|
|
7215
7218
|
let public_env = {};
|
|
7216
7219
|
function set_private_env(environment) {
|
|
7217
|
-
private_env = environment;
|
|
7218
7220
|
}
|
|
7219
7221
|
function set_public_env(environment) {
|
|
7220
7222
|
public_env = environment;
|
|
7221
7223
|
}
|
|
7224
|
+
const error = ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
|
7225
|
+
|
|
7226
|
+
<style>
|
|
7227
|
+
body {
|
|
7228
|
+
--bg: white;
|
|
7229
|
+
--fg: #222;
|
|
7230
|
+
--divider: #ccc;
|
|
7231
|
+
background: var(--bg);
|
|
7232
|
+
color: var(--fg);
|
|
7233
|
+
font-family:
|
|
7234
|
+
system-ui,
|
|
7235
|
+
-apple-system,
|
|
7236
|
+
BlinkMacSystemFont,
|
|
7237
|
+
'Segoe UI',
|
|
7238
|
+
Roboto,
|
|
7239
|
+
Oxygen,
|
|
7240
|
+
Ubuntu,
|
|
7241
|
+
Cantarell,
|
|
7242
|
+
'Open Sans',
|
|
7243
|
+
'Helvetica Neue',
|
|
7244
|
+
sans-serif;
|
|
7245
|
+
display: flex;
|
|
7246
|
+
align-items: center;
|
|
7247
|
+
justify-content: center;
|
|
7248
|
+
height: 100vh;
|
|
7249
|
+
margin: 0;
|
|
7250
|
+
}
|
|
7251
|
+
|
|
7252
|
+
.error {
|
|
7253
|
+
display: flex;
|
|
7254
|
+
align-items: center;
|
|
7255
|
+
max-width: 32rem;
|
|
7256
|
+
margin: 0 1rem;
|
|
7257
|
+
}
|
|
7258
|
+
|
|
7259
|
+
.status {
|
|
7260
|
+
font-weight: 200;
|
|
7261
|
+
font-size: 3rem;
|
|
7262
|
+
line-height: 1;
|
|
7263
|
+
position: relative;
|
|
7264
|
+
top: -0.05rem;
|
|
7265
|
+
}
|
|
7266
|
+
|
|
7267
|
+
.message {
|
|
7268
|
+
border-left: 1px solid var(--divider);
|
|
7269
|
+
padding: 0 0 0 1rem;
|
|
7270
|
+
margin: 0 0 0 1rem;
|
|
7271
|
+
min-height: 2.5rem;
|
|
7272
|
+
display: flex;
|
|
7273
|
+
align-items: center;
|
|
7274
|
+
}
|
|
7275
|
+
|
|
7276
|
+
.message h1 {
|
|
7277
|
+
font-weight: 400;
|
|
7278
|
+
font-size: 1em;
|
|
7279
|
+
margin: 0;
|
|
7280
|
+
}
|
|
7281
|
+
|
|
7282
|
+
@media (prefers-color-scheme: dark) {
|
|
7283
|
+
body {
|
|
7284
|
+
--bg: #222;
|
|
7285
|
+
--fg: #ddd;
|
|
7286
|
+
--divider: #666;
|
|
7287
|
+
}
|
|
7288
|
+
}
|
|
7289
|
+
</style>
|
|
7290
|
+
</head>
|
|
7291
|
+
<body>
|
|
7292
|
+
<div class="error">
|
|
7293
|
+
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
|
|
7294
|
+
const options = {
|
|
7295
|
+
app_template_contains_nonce: false,
|
|
7296
|
+
async: false,
|
|
7297
|
+
csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
|
|
7298
|
+
csrf_check_origin: true,
|
|
7299
|
+
csrf_trusted_origins: [],
|
|
7300
|
+
embedded: false,
|
|
7301
|
+
env_public_prefix: "PUBLIC_",
|
|
7302
|
+
env_private_prefix: "",
|
|
7303
|
+
hash_routing: false,
|
|
7304
|
+
hooks: null,
|
|
7305
|
+
// added lazily, via `get_hooks`
|
|
7306
|
+
preload_strategy: "modulepreload",
|
|
7307
|
+
root,
|
|
7308
|
+
service_worker: false,
|
|
7309
|
+
service_worker_options: null,
|
|
7310
|
+
server_error_boundaries: false,
|
|
7311
|
+
templates: {
|
|
7312
|
+
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
|
7313
|
+
error
|
|
7314
|
+
},
|
|
7315
|
+
version_hash: "141pzln"
|
|
7316
|
+
};
|
|
7317
|
+
async function get_hooks() {
|
|
7318
|
+
let handle;
|
|
7319
|
+
let handleFetch;
|
|
7320
|
+
let handleError;
|
|
7321
|
+
let handleValidationError;
|
|
7322
|
+
let init;
|
|
7323
|
+
({ handle, handleFetch, handleError, handleValidationError, init } = await import('./hooks.server-Zx-k_ERd.js'));
|
|
7324
|
+
let reroute;
|
|
7325
|
+
let transport;
|
|
7326
|
+
return {
|
|
7327
|
+
handle,
|
|
7328
|
+
handleFetch,
|
|
7329
|
+
handleError,
|
|
7330
|
+
handleValidationError,
|
|
7331
|
+
init,
|
|
7332
|
+
reroute,
|
|
7333
|
+
transport
|
|
7334
|
+
};
|
|
7335
|
+
}
|
|
7222
7336
|
|
|
7223
7337
|
var cookie = {};
|
|
7224
7338
|
|
|
@@ -7505,123 +7619,6 @@ function requireCookie () {
|
|
|
7505
7619
|
|
|
7506
7620
|
var cookieExports = requireCookie();
|
|
7507
7621
|
|
|
7508
|
-
let read_implementation = null;
|
|
7509
|
-
function set_read_implementation(fn) {
|
|
7510
|
-
read_implementation = fn;
|
|
7511
|
-
}
|
|
7512
|
-
const error = ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
|
7513
|
-
|
|
7514
|
-
<style>
|
|
7515
|
-
body {
|
|
7516
|
-
--bg: white;
|
|
7517
|
-
--fg: #222;
|
|
7518
|
-
--divider: #ccc;
|
|
7519
|
-
background: var(--bg);
|
|
7520
|
-
color: var(--fg);
|
|
7521
|
-
font-family:
|
|
7522
|
-
system-ui,
|
|
7523
|
-
-apple-system,
|
|
7524
|
-
BlinkMacSystemFont,
|
|
7525
|
-
'Segoe UI',
|
|
7526
|
-
Roboto,
|
|
7527
|
-
Oxygen,
|
|
7528
|
-
Ubuntu,
|
|
7529
|
-
Cantarell,
|
|
7530
|
-
'Open Sans',
|
|
7531
|
-
'Helvetica Neue',
|
|
7532
|
-
sans-serif;
|
|
7533
|
-
display: flex;
|
|
7534
|
-
align-items: center;
|
|
7535
|
-
justify-content: center;
|
|
7536
|
-
height: 100vh;
|
|
7537
|
-
margin: 0;
|
|
7538
|
-
}
|
|
7539
|
-
|
|
7540
|
-
.error {
|
|
7541
|
-
display: flex;
|
|
7542
|
-
align-items: center;
|
|
7543
|
-
max-width: 32rem;
|
|
7544
|
-
margin: 0 1rem;
|
|
7545
|
-
}
|
|
7546
|
-
|
|
7547
|
-
.status {
|
|
7548
|
-
font-weight: 200;
|
|
7549
|
-
font-size: 3rem;
|
|
7550
|
-
line-height: 1;
|
|
7551
|
-
position: relative;
|
|
7552
|
-
top: -0.05rem;
|
|
7553
|
-
}
|
|
7554
|
-
|
|
7555
|
-
.message {
|
|
7556
|
-
border-left: 1px solid var(--divider);
|
|
7557
|
-
padding: 0 0 0 1rem;
|
|
7558
|
-
margin: 0 0 0 1rem;
|
|
7559
|
-
min-height: 2.5rem;
|
|
7560
|
-
display: flex;
|
|
7561
|
-
align-items: center;
|
|
7562
|
-
}
|
|
7563
|
-
|
|
7564
|
-
.message h1 {
|
|
7565
|
-
font-weight: 400;
|
|
7566
|
-
font-size: 1em;
|
|
7567
|
-
margin: 0;
|
|
7568
|
-
}
|
|
7569
|
-
|
|
7570
|
-
@media (prefers-color-scheme: dark) {
|
|
7571
|
-
body {
|
|
7572
|
-
--bg: #222;
|
|
7573
|
-
--fg: #ddd;
|
|
7574
|
-
--divider: #666;
|
|
7575
|
-
}
|
|
7576
|
-
}
|
|
7577
|
-
</style>
|
|
7578
|
-
</head>
|
|
7579
|
-
<body>
|
|
7580
|
-
<div class="error">
|
|
7581
|
-
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
|
|
7582
|
-
const options = {
|
|
7583
|
-
app_template_contains_nonce: false,
|
|
7584
|
-
async: false,
|
|
7585
|
-
csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
|
|
7586
|
-
csrf_check_origin: true,
|
|
7587
|
-
csrf_trusted_origins: [],
|
|
7588
|
-
embedded: false,
|
|
7589
|
-
env_public_prefix: "PUBLIC_",
|
|
7590
|
-
env_private_prefix: "",
|
|
7591
|
-
hash_routing: false,
|
|
7592
|
-
hooks: null,
|
|
7593
|
-
// added lazily, via `get_hooks`
|
|
7594
|
-
preload_strategy: "modulepreload",
|
|
7595
|
-
root,
|
|
7596
|
-
service_worker: false,
|
|
7597
|
-
service_worker_options: null,
|
|
7598
|
-
server_error_boundaries: false,
|
|
7599
|
-
templates: {
|
|
7600
|
-
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
|
7601
|
-
error
|
|
7602
|
-
},
|
|
7603
|
-
version_hash: "iei8u2"
|
|
7604
|
-
};
|
|
7605
|
-
async function get_hooks() {
|
|
7606
|
-
let handle;
|
|
7607
|
-
let handleFetch;
|
|
7608
|
-
let handleError;
|
|
7609
|
-
let handleValidationError;
|
|
7610
|
-
let init;
|
|
7611
|
-
({ handle, handleFetch, handleError, handleValidationError, init } = await import('./hooks.server-DYGrWbgh.js'));
|
|
7612
|
-
let reroute;
|
|
7613
|
-
let transport;
|
|
7614
|
-
return {
|
|
7615
|
-
handle,
|
|
7616
|
-
handleFetch,
|
|
7617
|
-
handleError,
|
|
7618
|
-
handleValidationError,
|
|
7619
|
-
init,
|
|
7620
|
-
reroute,
|
|
7621
|
-
transport
|
|
7622
|
-
};
|
|
7623
|
-
}
|
|
7624
|
-
|
|
7625
7622
|
const s = JSON.stringify;
|
|
7626
7623
|
function exec(match, params, matchers) {
|
|
7627
7624
|
const result = {};
|
|
@@ -11570,4 +11567,4 @@ class Server {
|
|
|
11570
11567
|
}
|
|
11571
11568
|
}
|
|
11572
11569
|
|
|
11573
|
-
export { SvelteKitError as S, Server as a, escape_html as e, getContext as g, json as j, noop as n,
|
|
11570
|
+
export { SvelteKitError as S, Server as a, escape_html as e, getContext as g, json as j, noop as n, writable as w };
|