@drmhse/authos-vue 0.2.3 → 0.2.5
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/README.md +27 -421
- package/dist/chunk-5OCDR7QV.mjs +68 -0
- package/dist/chunk-I3MWU7CX.mjs +405 -0
- package/dist/chunk-IUIUWQYL.mjs +700 -0
- package/dist/chunk-IYGVWWRW.mjs +448 -0
- package/dist/chunk-JN6U6SKP.mjs +973 -0
- package/dist/chunk-T7GBCGRZ.mjs +734 -0
- package/dist/chunk-VVJVQ4JO.mjs +15 -0
- package/dist/dist-XLLRDJPJ.mjs +505 -0
- package/dist/index.d.mts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +72 -0
- package/dist/index.mjs +72 -1
- package/dist/json5-XBNSJCDA.mjs +3 -0
- package/dist/jsonc-H6LEPRFY.mjs +3 -0
- package/dist/nuxt.d.mts +1 -2
- package/dist/nuxt.d.ts +1 -2
- package/dist/nuxt.js +6724 -5905
- package/dist/nuxt.mjs +4140 -2052
- package/dist/nypm-5BYDGLH7.mjs +3 -0
- package/dist/tar-A5SPYDDD.mjs +3289 -0
- package/dist/toml-QZCHCWUM.mjs +3 -0
- package/dist/yaml-6OXYI3W7.mjs +3 -0
- package/package.json +5 -4
- package/dist/chunk-EI6D7ZL6.mjs +0 -741
- package/dist/chunk-EO7XHAPG.mjs +0 -452
- package/dist/chunk-EX36KPG5.mjs +0 -986
- package/dist/chunk-F4XRLJHQ.mjs +0 -408
- package/dist/chunk-HVM6PT6I.mjs +0 -3602
- package/dist/chunk-N667TIER.mjs +0 -66
- package/dist/chunk-XP4GDQVV.mjs +0 -1272
- package/dist/dist-C3JS2B76.mjs +0 -12545
- package/dist/json5-JAQYEGVI.mjs +0 -3
- package/dist/jsonc-UUIPUC5H.mjs +0 -3
- package/dist/multipart-parser-SFUPTK6X.mjs +0 -173
- package/dist/toml-VZVKMGHP.mjs +0 -3
- package/dist/yaml-G5PP6BGH.mjs +0 -3
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { a, o } from './chunk-5OCDR7QV.mjs';
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/confbox/dist/_chunks/libs/smol-toml.mjs
|
|
4
|
+
function e(e3, t2) {
|
|
5
|
+
let n2 = e3.slice(0, t2).split(/\r\n|\n|\r/g);
|
|
6
|
+
return [n2.length, n2.pop().length + 1];
|
|
7
|
+
}
|
|
8
|
+
function t(e3, t2, n2) {
|
|
9
|
+
let r2 = e3.split(/\r\n|\n|\r/g), i3 = ``, a4 = (Math.log10(t2 + 1) | 0) + 1;
|
|
10
|
+
for (let e4 = t2 - 1; e4 <= t2 + 1; e4++) {
|
|
11
|
+
let o3 = r2[e4 - 1];
|
|
12
|
+
o3 && (i3 += e4.toString().padEnd(a4, ` `), i3 += `: `, i3 += o3, i3 += `
|
|
13
|
+
`, e4 === t2 && (i3 += ` `.repeat(a4 + n2 + 2), i3 += `^
|
|
14
|
+
`));
|
|
15
|
+
}
|
|
16
|
+
return i3;
|
|
17
|
+
}
|
|
18
|
+
var n = class extends Error {
|
|
19
|
+
line;
|
|
20
|
+
column;
|
|
21
|
+
codeblock;
|
|
22
|
+
constructor(n2, r2) {
|
|
23
|
+
let [i3, a4] = e(r2.toml, r2.ptr), o3 = t(r2.toml, i3, a4);
|
|
24
|
+
super(`Invalid TOML document: ${n2}
|
|
25
|
+
|
|
26
|
+
${o3}`, r2), this.line = i3, this.column = a4, this.codeblock = o3;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function r(e3, t2) {
|
|
30
|
+
let n2 = 0;
|
|
31
|
+
for (; e3[t2 - ++n2] === `\\`; ) ;
|
|
32
|
+
return --n2 && n2 % 2;
|
|
33
|
+
}
|
|
34
|
+
function i(e3, t2 = 0, n2 = e3.length) {
|
|
35
|
+
let r2 = e3.indexOf(`
|
|
36
|
+
`, t2);
|
|
37
|
+
return e3[r2 - 1] === `\r` && r2--, r2 <= n2 ? r2 : -1;
|
|
38
|
+
}
|
|
39
|
+
function a2(e3, t2) {
|
|
40
|
+
for (let r2 = t2; r2 < e3.length; r2++) {
|
|
41
|
+
let i3 = e3[r2];
|
|
42
|
+
if (i3 === `
|
|
43
|
+
`) return r2;
|
|
44
|
+
if (i3 === `\r` && e3[r2 + 1] === `
|
|
45
|
+
`) return r2 + 1;
|
|
46
|
+
if (i3 < ` ` && i3 !== ` ` || i3 === `\x7F`) throw new n(`control characters are not allowed in comments`, { toml: e3, ptr: t2 });
|
|
47
|
+
}
|
|
48
|
+
return e3.length;
|
|
49
|
+
}
|
|
50
|
+
function o2(e3, t2, n2, r2) {
|
|
51
|
+
let i3;
|
|
52
|
+
for (; (i3 = e3[t2]) === ` ` || i3 === ` ` || !n2 && (i3 === `
|
|
53
|
+
` || i3 === `\r` && e3[t2 + 1] === `
|
|
54
|
+
`); ) t2++;
|
|
55
|
+
return r2 || i3 !== `#` ? t2 : o2(e3, a2(e3, t2), n2);
|
|
56
|
+
}
|
|
57
|
+
function s(e3, t2, r2, a4, o3 = false) {
|
|
58
|
+
if (!a4) return t2 = i(e3, t2), t2 < 0 ? e3.length : t2;
|
|
59
|
+
for (let n2 = t2; n2 < e3.length; n2++) {
|
|
60
|
+
let t3 = e3[n2];
|
|
61
|
+
if (t3 === `#`) n2 = i(e3, n2);
|
|
62
|
+
else if (t3 === r2) return n2 + 1;
|
|
63
|
+
else if (t3 === a4 || o3 && (t3 === `
|
|
64
|
+
` || t3 === `\r` && e3[n2 + 1] === `
|
|
65
|
+
`)) return n2;
|
|
66
|
+
}
|
|
67
|
+
throw new n(`cannot find end of structure`, { toml: e3, ptr: t2 });
|
|
68
|
+
}
|
|
69
|
+
function c(e3, t2) {
|
|
70
|
+
let n2 = e3[t2], i3 = n2 === e3[t2 + 1] && e3[t2 + 1] === e3[t2 + 2] ? e3.slice(t2, t2 + 3) : n2;
|
|
71
|
+
t2 += i3.length - 1;
|
|
72
|
+
do
|
|
73
|
+
t2 = e3.indexOf(i3, ++t2);
|
|
74
|
+
while (t2 > -1 && n2 !== `'` && r(e3, t2));
|
|
75
|
+
return t2 > -1 && (t2 += i3.length, i3.length > 1 && (e3[t2] === n2 && t2++, e3[t2] === n2 && t2++)), t2;
|
|
76
|
+
}
|
|
77
|
+
var l = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
78
|
+
var u = class e2 extends Date {
|
|
79
|
+
#e = false;
|
|
80
|
+
#t = false;
|
|
81
|
+
#n = null;
|
|
82
|
+
constructor(e3) {
|
|
83
|
+
let t2 = true, n2 = true, r2 = `Z`;
|
|
84
|
+
if (typeof e3 == `string`) {
|
|
85
|
+
let i3 = e3.match(l);
|
|
86
|
+
i3 ? (i3[1] || (t2 = false, e3 = `0000-01-01T${e3}`), n2 = !!i3[2], n2 && e3[10] === ` ` && (e3 = e3.replace(` `, `T`)), i3[2] && +i3[2] > 23 ? e3 = `` : (r2 = i3[3] || null, e3 = e3.toUpperCase(), !r2 && n2 && (e3 += `Z`))) : e3 = ``;
|
|
87
|
+
}
|
|
88
|
+
super(e3), isNaN(this.getTime()) || (this.#e = t2, this.#t = n2, this.#n = r2);
|
|
89
|
+
}
|
|
90
|
+
isDateTime() {
|
|
91
|
+
return this.#e && this.#t;
|
|
92
|
+
}
|
|
93
|
+
isLocal() {
|
|
94
|
+
return !this.#e || !this.#t || !this.#n;
|
|
95
|
+
}
|
|
96
|
+
isDate() {
|
|
97
|
+
return this.#e && !this.#t;
|
|
98
|
+
}
|
|
99
|
+
isTime() {
|
|
100
|
+
return this.#t && !this.#e;
|
|
101
|
+
}
|
|
102
|
+
isValid() {
|
|
103
|
+
return this.#e || this.#t;
|
|
104
|
+
}
|
|
105
|
+
toISOString() {
|
|
106
|
+
let e3 = super.toISOString();
|
|
107
|
+
if (this.isDate()) return e3.slice(0, 10);
|
|
108
|
+
if (this.isTime()) return e3.slice(11, 23);
|
|
109
|
+
if (this.#n === null) return e3.slice(0, -1);
|
|
110
|
+
if (this.#n === `Z`) return e3;
|
|
111
|
+
let t2 = this.#n.slice(1, 3) * 60 + +this.#n.slice(4, 6);
|
|
112
|
+
return t2 = this.#n[0] === `-` ? t2 : -t2, new Date(this.getTime() - t2 * 6e4).toISOString().slice(0, -1) + this.#n;
|
|
113
|
+
}
|
|
114
|
+
static wrapAsOffsetDateTime(t2, n2 = `Z`) {
|
|
115
|
+
let r2 = new e2(t2);
|
|
116
|
+
return r2.#n = n2, r2;
|
|
117
|
+
}
|
|
118
|
+
static wrapAsLocalDateTime(t2) {
|
|
119
|
+
let n2 = new e2(t2);
|
|
120
|
+
return n2.#n = null, n2;
|
|
121
|
+
}
|
|
122
|
+
static wrapAsLocalDate(t2) {
|
|
123
|
+
let n2 = new e2(t2);
|
|
124
|
+
return n2.#t = false, n2.#n = null, n2;
|
|
125
|
+
}
|
|
126
|
+
static wrapAsLocalTime(t2) {
|
|
127
|
+
let n2 = new e2(t2);
|
|
128
|
+
return n2.#e = false, n2.#n = null, n2;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var d = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
132
|
+
var f = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
133
|
+
var p = /^[+-]?0[0-9_]/;
|
|
134
|
+
var m = /^[0-9a-f]{2,8}$/i;
|
|
135
|
+
var h = { b: `\b`, t: ` `, n: `
|
|
136
|
+
`, f: `\f`, r: `\r`, e: `\x1B`, '"': `"`, "\\": `\\` };
|
|
137
|
+
function g(e3, t2 = 0, r2 = e3.length) {
|
|
138
|
+
let i3 = e3[t2] === `'`, a4 = e3[t2++] === e3[t2] && e3[t2] === e3[t2 + 1];
|
|
139
|
+
a4 && (r2 -= 2, e3[t2 += 2] === `\r` && t2++, e3[t2] === `
|
|
140
|
+
` && t2++);
|
|
141
|
+
let s2 = 0, c2, l2 = ``, u2 = t2;
|
|
142
|
+
for (; t2 < r2 - 1; ) {
|
|
143
|
+
let r3 = e3[t2++];
|
|
144
|
+
if (r3 === `
|
|
145
|
+
` || r3 === `\r` && e3[t2] === `
|
|
146
|
+
`) {
|
|
147
|
+
if (!a4) throw new n(`newlines are not allowed in strings`, { toml: e3, ptr: t2 - 1 });
|
|
148
|
+
} else if (r3 < ` ` && r3 !== ` ` || r3 === `\x7F`) throw new n(`control characters are not allowed in strings`, { toml: e3, ptr: t2 - 1 });
|
|
149
|
+
if (c2) {
|
|
150
|
+
if (c2 = false, r3 === `x` || r3 === `u` || r3 === `U`) {
|
|
151
|
+
let i4 = e3.slice(t2, t2 += r3 === `x` ? 2 : r3 === `u` ? 4 : 8);
|
|
152
|
+
if (!m.test(i4)) throw new n(`invalid unicode escape`, { toml: e3, ptr: s2 });
|
|
153
|
+
try {
|
|
154
|
+
l2 += String.fromCodePoint(parseInt(i4, 16));
|
|
155
|
+
} catch {
|
|
156
|
+
throw new n(`invalid unicode escape`, { toml: e3, ptr: s2 });
|
|
157
|
+
}
|
|
158
|
+
} else if (a4 && (r3 === `
|
|
159
|
+
` || r3 === ` ` || r3 === ` ` || r3 === `\r`)) {
|
|
160
|
+
if (t2 = o2(e3, t2 - 1, true), e3[t2] !== `
|
|
161
|
+
` && e3[t2] !== `\r`) throw new n(`invalid escape: only line-ending whitespace may be escaped`, { toml: e3, ptr: s2 });
|
|
162
|
+
t2 = o2(e3, t2);
|
|
163
|
+
} else if (r3 in h) l2 += h[r3];
|
|
164
|
+
else throw new n(`unrecognized escape sequence`, { toml: e3, ptr: s2 });
|
|
165
|
+
u2 = t2;
|
|
166
|
+
} else !i3 && r3 === `\\` && (s2 = t2 - 1, c2 = true, l2 += e3.slice(u2, s2));
|
|
167
|
+
}
|
|
168
|
+
return l2 + e3.slice(u2, r2 - 1);
|
|
169
|
+
}
|
|
170
|
+
function _(e3, t2, r2, i3) {
|
|
171
|
+
if (e3 === `true`) return true;
|
|
172
|
+
if (e3 === `false`) return false;
|
|
173
|
+
if (e3 === `-inf`) return -1 / 0;
|
|
174
|
+
if (e3 === `inf` || e3 === `+inf`) return 1 / 0;
|
|
175
|
+
if (e3 === `nan` || e3 === `+nan` || e3 === `-nan`) return NaN;
|
|
176
|
+
if (e3 === `-0`) return i3 ? 0n : 0;
|
|
177
|
+
let a4 = d.test(e3);
|
|
178
|
+
if (a4 || f.test(e3)) {
|
|
179
|
+
if (p.test(e3)) throw new n(`leading zeroes are not allowed`, { toml: t2, ptr: r2 });
|
|
180
|
+
e3 = e3.replace(/_/g, ``);
|
|
181
|
+
let o4 = +e3;
|
|
182
|
+
if (isNaN(o4)) throw new n(`invalid number`, { toml: t2, ptr: r2 });
|
|
183
|
+
if (a4) {
|
|
184
|
+
if ((a4 = !Number.isSafeInteger(o4)) && !i3) throw new n(`integer value cannot be represented losslessly`, { toml: t2, ptr: r2 });
|
|
185
|
+
(a4 || i3 === true) && (o4 = BigInt(e3));
|
|
186
|
+
}
|
|
187
|
+
return o4;
|
|
188
|
+
}
|
|
189
|
+
let o3 = new u(e3);
|
|
190
|
+
if (!o3.isValid()) throw new n(`invalid value`, { toml: t2, ptr: r2 });
|
|
191
|
+
return o3;
|
|
192
|
+
}
|
|
193
|
+
function v(e3, t2, n2) {
|
|
194
|
+
let r2 = e3.slice(t2, n2), i3 = r2.indexOf(`#`);
|
|
195
|
+
return i3 > -1 && (a2(e3, i3), r2 = r2.slice(0, i3)), [r2.trimEnd(), i3];
|
|
196
|
+
}
|
|
197
|
+
function y(e3, t2, r2, i3, a4) {
|
|
198
|
+
if (i3 === 0) throw new n(`document contains excessively nested structures. aborting.`, { toml: e3, ptr: t2 });
|
|
199
|
+
let l2 = e3[t2];
|
|
200
|
+
if (l2 === `[` || l2 === `{`) {
|
|
201
|
+
let [s2, c2] = l2 === `[` ? C(e3, t2, i3, a4) : S(e3, t2, i3, a4);
|
|
202
|
+
if (r2) {
|
|
203
|
+
if (c2 = o2(e3, c2), e3[c2] === `,`) c2++;
|
|
204
|
+
else if (e3[c2] !== r2) throw new n(`expected comma or end of structure`, { toml: e3, ptr: c2 });
|
|
205
|
+
}
|
|
206
|
+
return [s2, c2];
|
|
207
|
+
}
|
|
208
|
+
let u2;
|
|
209
|
+
if (l2 === `"` || l2 === `'`) {
|
|
210
|
+
u2 = c(e3, t2);
|
|
211
|
+
let i4 = g(e3, t2, u2);
|
|
212
|
+
if (r2) {
|
|
213
|
+
if (u2 = o2(e3, u2), e3[u2] && e3[u2] !== `,` && e3[u2] !== r2 && e3[u2] !== `
|
|
214
|
+
` && e3[u2] !== `\r`) throw new n(`unexpected character encountered`, { toml: e3, ptr: u2 });
|
|
215
|
+
u2 += +(e3[u2] === `,`);
|
|
216
|
+
}
|
|
217
|
+
return [i4, u2];
|
|
218
|
+
}
|
|
219
|
+
u2 = s(e3, t2, `,`, r2);
|
|
220
|
+
let d2 = v(e3, t2, u2 - +(e3[u2 - 1] === `,`));
|
|
221
|
+
if (!d2[0]) throw new n(`incomplete key-value declaration: no value specified`, { toml: e3, ptr: t2 });
|
|
222
|
+
return r2 && d2[1] > -1 && (u2 = o2(e3, t2 + d2[1]), u2 += +(e3[u2] === `,`)), [_(d2[0], e3, t2, a4), u2];
|
|
223
|
+
}
|
|
224
|
+
var b = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
225
|
+
function x(e3, t2, r2 = `=`) {
|
|
226
|
+
let a4 = t2 - 1, s2 = [], l2 = e3.indexOf(r2, t2);
|
|
227
|
+
if (l2 < 0) throw new n(`incomplete key-value: cannot find end of key`, { toml: e3, ptr: t2 });
|
|
228
|
+
do {
|
|
229
|
+
let o3 = e3[t2 = ++a4];
|
|
230
|
+
if (o3 !== ` ` && o3 !== ` `) if (o3 === `"` || o3 === `'`) {
|
|
231
|
+
if (o3 === e3[t2 + 1] && o3 === e3[t2 + 2]) throw new n(`multiline strings are not allowed in keys`, { toml: e3, ptr: t2 });
|
|
232
|
+
let u2 = c(e3, t2);
|
|
233
|
+
if (u2 < 0) throw new n(`unfinished string encountered`, { toml: e3, ptr: t2 });
|
|
234
|
+
a4 = e3.indexOf(`.`, u2);
|
|
235
|
+
let d2 = e3.slice(u2, a4 < 0 || a4 > l2 ? l2 : a4), f2 = i(d2);
|
|
236
|
+
if (f2 > -1) throw new n(`newlines are not allowed in keys`, { toml: e3, ptr: t2 + a4 + f2 });
|
|
237
|
+
if (d2.trimStart()) throw new n(`found extra tokens after the string part`, { toml: e3, ptr: u2 });
|
|
238
|
+
if (l2 < u2 && (l2 = e3.indexOf(r2, u2), l2 < 0)) throw new n(`incomplete key-value: cannot find end of key`, { toml: e3, ptr: t2 });
|
|
239
|
+
s2.push(g(e3, t2, u2));
|
|
240
|
+
} else {
|
|
241
|
+
a4 = e3.indexOf(`.`, t2);
|
|
242
|
+
let r3 = e3.slice(t2, a4 < 0 || a4 > l2 ? l2 : a4);
|
|
243
|
+
if (!b.test(r3)) throw new n(`only letter, numbers, dashes and underscores are allowed in keys`, { toml: e3, ptr: t2 });
|
|
244
|
+
s2.push(r3.trimEnd());
|
|
245
|
+
}
|
|
246
|
+
} while (a4 + 1 && a4 < l2);
|
|
247
|
+
return [s2, o2(e3, l2 + 1, true, true)];
|
|
248
|
+
}
|
|
249
|
+
function S(e3, t2, r2, i3) {
|
|
250
|
+
let o3 = {}, s2 = /* @__PURE__ */ new Set(), c2;
|
|
251
|
+
for (t2++; (c2 = e3[t2++]) !== `}` && c2; ) if (c2 === `,`) throw new n(`expected value, found comma`, { toml: e3, ptr: t2 - 1 });
|
|
252
|
+
else if (c2 === `#`) t2 = a2(e3, t2);
|
|
253
|
+
else if (c2 !== ` ` && c2 !== ` ` && c2 !== `
|
|
254
|
+
` && c2 !== `\r`) {
|
|
255
|
+
let a4, c3 = o3, l2 = false, [u2, d2] = x(e3, t2 - 1);
|
|
256
|
+
for (let r3 = 0; r3 < u2.length; r3++) {
|
|
257
|
+
if (r3 && (c3 = l2 ? c3[a4] : c3[a4] = {}), a4 = u2[r3], (l2 = Object.hasOwn(c3, a4)) && (typeof c3[a4] != `object` || s2.has(c3[a4]))) throw new n(`trying to redefine an already defined value`, { toml: e3, ptr: t2 });
|
|
258
|
+
!l2 && a4 === `__proto__` && Object.defineProperty(c3, a4, { enumerable: true, configurable: true, writable: true });
|
|
259
|
+
}
|
|
260
|
+
if (l2) throw new n(`trying to redefine an already defined value`, { toml: e3, ptr: t2 });
|
|
261
|
+
let [f2, p2] = y(e3, d2, `}`, r2 - 1, i3);
|
|
262
|
+
s2.add(f2), c3[a4] = f2, t2 = p2;
|
|
263
|
+
}
|
|
264
|
+
if (!c2) throw new n(`unfinished table encountered`, { toml: e3, ptr: t2 });
|
|
265
|
+
return [o3, t2];
|
|
266
|
+
}
|
|
267
|
+
function C(e3, t2, r2, i3) {
|
|
268
|
+
let o3 = [], s2;
|
|
269
|
+
for (t2++; (s2 = e3[t2++]) !== `]` && s2; ) if (s2 === `,`) throw new n(`expected value, found comma`, { toml: e3, ptr: t2 - 1 });
|
|
270
|
+
else if (s2 === `#`) t2 = a2(e3, t2);
|
|
271
|
+
else if (s2 !== ` ` && s2 !== ` ` && s2 !== `
|
|
272
|
+
` && s2 !== `\r`) {
|
|
273
|
+
let n2 = y(e3, t2 - 1, `]`, r2 - 1, i3);
|
|
274
|
+
o3.push(n2[0]), t2 = n2[1];
|
|
275
|
+
}
|
|
276
|
+
if (!s2) throw new n(`unfinished array encountered`, { toml: e3, ptr: t2 });
|
|
277
|
+
return [o3, t2];
|
|
278
|
+
}
|
|
279
|
+
function w(e3, t2, n2, r2) {
|
|
280
|
+
let i3 = t2, a4 = n2, o3, s2 = false, c2;
|
|
281
|
+
for (let t3 = 0; t3 < e3.length; t3++) {
|
|
282
|
+
if (t3) {
|
|
283
|
+
if (i3 = s2 ? i3[o3] : i3[o3] = {}, a4 = (c2 = a4[o3]).c, r2 === 0 && (c2.t === 1 || c2.t === 2)) return null;
|
|
284
|
+
if (c2.t === 2) {
|
|
285
|
+
let e4 = i3.length - 1;
|
|
286
|
+
i3 = i3[e4], a4 = a4[e4].c;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (o3 = e3[t3], (s2 = Object.hasOwn(i3, o3)) && a4[o3]?.t === 0 && a4[o3]?.d) return null;
|
|
290
|
+
s2 || (o3 === `__proto__` && (Object.defineProperty(i3, o3, { enumerable: true, configurable: true, writable: true }), Object.defineProperty(a4, o3, { enumerable: true, configurable: true, writable: true })), a4[o3] = { t: t3 < e3.length - 1 && r2 === 2 ? 3 : r2, d: false, i: 0, c: {} });
|
|
291
|
+
}
|
|
292
|
+
if (c2 = a4[o3], c2.t !== r2 && !(r2 === 1 && c2.t === 3) || (r2 === 2 && (c2.d || (c2.d = true, i3[o3] = []), i3[o3].push(i3 = {}), c2.c[c2.i++] = c2 = { t: 1, d: false, i: 0, c: {} }), c2.d)) return null;
|
|
293
|
+
if (c2.d = true, r2 === 1) i3 = s2 ? i3[o3] : i3[o3] = {};
|
|
294
|
+
else if (r2 === 0 && s2) return null;
|
|
295
|
+
return [o3, i3, c2.c];
|
|
296
|
+
}
|
|
297
|
+
function T(e3, { maxDepth: t2 = 1e3, integersAsBigInt: r2 } = {}) {
|
|
298
|
+
let i3 = {}, a4 = {}, s2 = i3, c2 = a4;
|
|
299
|
+
for (let l2 = o2(e3, 0); l2 < e3.length; ) {
|
|
300
|
+
if (e3[l2] === `[`) {
|
|
301
|
+
let t3 = e3[++l2] === `[`, r3 = x(e3, l2 += +t3, `]`);
|
|
302
|
+
if (t3) {
|
|
303
|
+
if (e3[r3[1] - 1] !== `]`) throw new n(`expected end of table declaration`, { toml: e3, ptr: r3[1] - 1 });
|
|
304
|
+
r3[1]++;
|
|
305
|
+
}
|
|
306
|
+
let o3 = w(r3[0], i3, a4, t3 ? 2 : 1);
|
|
307
|
+
if (!o3) throw new n(`trying to redefine an already defined table or value`, { toml: e3, ptr: l2 });
|
|
308
|
+
c2 = o3[2], s2 = o3[1], l2 = r3[1];
|
|
309
|
+
} else {
|
|
310
|
+
let i4 = x(e3, l2), a5 = w(i4[0], s2, c2, 0);
|
|
311
|
+
if (!a5) throw new n(`trying to redefine an already defined table or value`, { toml: e3, ptr: l2 });
|
|
312
|
+
let o3 = y(e3, i4[1], void 0, t2, r2);
|
|
313
|
+
a5[1][a5[0]] = o3[0], l2 = o3[1];
|
|
314
|
+
}
|
|
315
|
+
if (l2 = o2(e3, l2, true), e3[l2] && e3[l2] !== `
|
|
316
|
+
` && e3[l2] !== `\r`) throw new n(`each key-value declaration must be followed by an end-of-line`, { toml: e3, ptr: l2 });
|
|
317
|
+
l2 = o2(e3, l2);
|
|
318
|
+
}
|
|
319
|
+
return i3;
|
|
320
|
+
}
|
|
321
|
+
var E = /^[a-z0-9-_]+$/i;
|
|
322
|
+
function D(e3) {
|
|
323
|
+
let t2 = typeof e3;
|
|
324
|
+
if (t2 === `object`) {
|
|
325
|
+
if (Array.isArray(e3)) return `array`;
|
|
326
|
+
if (e3 instanceof Date) return `date`;
|
|
327
|
+
}
|
|
328
|
+
return t2;
|
|
329
|
+
}
|
|
330
|
+
function O(e3) {
|
|
331
|
+
for (let t2 = 0; t2 < e3.length; t2++) if (D(e3[t2]) !== `object`) return false;
|
|
332
|
+
return e3.length != 0;
|
|
333
|
+
}
|
|
334
|
+
function k(e3) {
|
|
335
|
+
return JSON.stringify(e3).replace(/\x7f/g, `\\u007f`);
|
|
336
|
+
}
|
|
337
|
+
function A(e3, t2, n2, r2) {
|
|
338
|
+
if (n2 === 0) throw Error(`Could not stringify the object: maximum object depth exceeded`);
|
|
339
|
+
if (t2 === `number`) return isNaN(e3) ? `nan` : e3 === 1 / 0 ? `inf` : e3 === -1 / 0 ? `-inf` : r2 && Number.isInteger(e3) ? e3.toFixed(1) : e3.toString();
|
|
340
|
+
if (t2 === `bigint` || t2 === `boolean`) return e3.toString();
|
|
341
|
+
if (t2 === `string`) return k(e3);
|
|
342
|
+
if (t2 === `date`) {
|
|
343
|
+
if (isNaN(e3.getTime())) throw TypeError(`cannot serialize invalid date`);
|
|
344
|
+
return e3.toISOString();
|
|
345
|
+
}
|
|
346
|
+
if (t2 === `object`) return j(e3, n2, r2);
|
|
347
|
+
if (t2 === `array`) return M(e3, n2, r2);
|
|
348
|
+
}
|
|
349
|
+
function j(e3, t2, n2) {
|
|
350
|
+
let r2 = Object.keys(e3);
|
|
351
|
+
if (r2.length === 0) return `{}`;
|
|
352
|
+
let i3 = `{ `;
|
|
353
|
+
for (let a4 = 0; a4 < r2.length; a4++) {
|
|
354
|
+
let o3 = r2[a4];
|
|
355
|
+
a4 && (i3 += `, `), i3 += E.test(o3) ? o3 : k(o3), i3 += ` = `, i3 += A(e3[o3], D(e3[o3]), t2 - 1, n2);
|
|
356
|
+
}
|
|
357
|
+
return i3 + ` }`;
|
|
358
|
+
}
|
|
359
|
+
function M(e3, t2, n2) {
|
|
360
|
+
if (e3.length === 0) return `[]`;
|
|
361
|
+
let r2 = `[ `;
|
|
362
|
+
for (let i3 = 0; i3 < e3.length; i3++) {
|
|
363
|
+
if (i3 && (r2 += `, `), e3[i3] === null || e3[i3] === void 0) throw TypeError(`arrays cannot contain null or undefined values`);
|
|
364
|
+
r2 += A(e3[i3], D(e3[i3]), t2 - 1, n2);
|
|
365
|
+
}
|
|
366
|
+
return r2 + ` ]`;
|
|
367
|
+
}
|
|
368
|
+
function N(e3, t2, n2, r2) {
|
|
369
|
+
if (n2 === 0) throw Error(`Could not stringify the object: maximum object depth exceeded`);
|
|
370
|
+
let i3 = ``;
|
|
371
|
+
for (let a4 = 0; a4 < e3.length; a4++) i3 += `${i3 && `
|
|
372
|
+
`}[[${t2}]]
|
|
373
|
+
`, i3 += P(0, e3[a4], t2, n2, r2);
|
|
374
|
+
return i3;
|
|
375
|
+
}
|
|
376
|
+
function P(e3, t2, n2, r2, i3) {
|
|
377
|
+
if (r2 === 0) throw Error(`Could not stringify the object: maximum object depth exceeded`);
|
|
378
|
+
let a4 = ``, o3 = ``, s2 = Object.keys(t2);
|
|
379
|
+
for (let e4 = 0; e4 < s2.length; e4++) {
|
|
380
|
+
let c2 = s2[e4];
|
|
381
|
+
if (t2[c2] !== null && t2[c2] !== void 0) {
|
|
382
|
+
let e5 = D(t2[c2]);
|
|
383
|
+
if (e5 === `symbol` || e5 === `function`) throw TypeError(`cannot serialize values of type '${e5}'`);
|
|
384
|
+
let s3 = E.test(c2) ? c2 : k(c2);
|
|
385
|
+
if (e5 === `array` && O(t2[c2])) o3 += (o3 && `
|
|
386
|
+
`) + N(t2[c2], n2 ? `${n2}.${s3}` : s3, r2 - 1, i3);
|
|
387
|
+
else if (e5 === `object`) {
|
|
388
|
+
let e6 = n2 ? `${n2}.${s3}` : s3;
|
|
389
|
+
o3 += (o3 && `
|
|
390
|
+
`) + P(e6, t2[c2], e6, r2 - 1, i3);
|
|
391
|
+
} else a4 += s3, a4 += ` = `, a4 += A(t2[c2], e5, r2, i3), a4 += `
|
|
392
|
+
`;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return e3 && (a4 || !o3) && (a4 = a4 ? `[${e3}]
|
|
396
|
+
${a4}` : `[${e3}]`), a4 && o3 ? `${a4}
|
|
397
|
+
${o3}` : a4 || o3;
|
|
398
|
+
}
|
|
399
|
+
function F(e3, { maxDepth: t2 = 1e3, numbersAsFloat: n2 = false } = {}) {
|
|
400
|
+
if (D(e3) !== `object`) throw TypeError(`stringify can only be called with an object`);
|
|
401
|
+
let r2 = P(0, e3, ``, t2, n2);
|
|
402
|
+
return r2[r2.length - 1] === `
|
|
403
|
+
` ? r2 : r2 + `
|
|
404
|
+
`;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// ../../node_modules/confbox/dist/toml.mjs
|
|
408
|
+
function i2(t2) {
|
|
409
|
+
let r2 = T(t2);
|
|
410
|
+
return a(t2, r2, { preserveIndentation: false }), r2;
|
|
411
|
+
}
|
|
412
|
+
function a3(e3) {
|
|
413
|
+
let n2 = o(e3, { preserveIndentation: false }), i3 = F(e3);
|
|
414
|
+
return n2.whitespace.start + i3 + n2.whitespace.end;
|
|
415
|
+
}
|
|
416
|
+
/*! Bundled license information:
|
|
417
|
+
|
|
418
|
+
confbox/dist/_chunks/libs/smol-toml.mjs:
|
|
419
|
+
(*!
|
|
420
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
421
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
422
|
+
*
|
|
423
|
+
* Redistribution and use in source and binary forms, with or without
|
|
424
|
+
* modification, are permitted provided that the following conditions are met:
|
|
425
|
+
*
|
|
426
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
427
|
+
* list of conditions and the following disclaimer.
|
|
428
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
429
|
+
* this list of conditions and the following disclaimer in the
|
|
430
|
+
* documentation and/or other materials provided with the distribution.
|
|
431
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
432
|
+
* may be used to endorse or promote products derived from this software without
|
|
433
|
+
* specific prior written permission.
|
|
434
|
+
*
|
|
435
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
436
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
437
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
438
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
439
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
440
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
441
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
442
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
443
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
444
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
445
|
+
*)
|
|
446
|
+
*/
|
|
447
|
+
|
|
448
|
+
export { a3 as a, i2 as i };
|