lakutata 2.0.33 → 2.0.34

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/helper.cjs CHANGED
@@ -44,11 +44,11 @@ const I = require("./src/lib/helpers/ObjectConstructor.cjs");
44
44
 
45
45
  const g = require("./src/lib/helpers/ObjectHash.cjs");
46
46
 
47
- const S = require("./src/lib/helpers/ObjectParentConstructor.cjs");
47
+ const d = require("./src/lib/helpers/ObjectParentConstructor.cjs");
48
48
 
49
- const y = require("./src/lib/helpers/ObjectParentConstructors.cjs");
49
+ const S = require("./src/lib/helpers/ObjectParentConstructors.cjs");
50
50
 
51
- const d = require("./src/lib/helpers/ObjectPrototype.cjs");
51
+ const y = require("./src/lib/helpers/ObjectPrototype.cjs");
52
52
 
53
53
  const T = require("./src/lib/helpers/SetToArray.cjs");
54
54
 
@@ -72,9 +72,9 @@ const k = require("./src/lib/helpers/MergeMap.cjs");
72
72
 
73
73
  const C = require("./src/lib/helpers/SortArray.cjs");
74
74
 
75
- const D = require("./src/lib/helpers/SortKeys.cjs");
75
+ const L = require("./src/lib/helpers/SortKeys.cjs");
76
76
 
77
- const L = require("./src/lib/helpers/SortObject.cjs");
77
+ const D = require("./src/lib/helpers/SortObject.cjs");
78
78
 
79
79
  const N = require("./src/lib/helpers/RandomString.cjs");
80
80
 
@@ -82,21 +82,21 @@ const G = require("./src/lib/helpers/NonceStr.cjs");
82
82
 
83
83
  const U = require("./src/lib/helpers/IsAbortError.cjs");
84
84
 
85
- const f = require("./src/lib/helpers/Glob.cjs");
85
+ const R = require("./src/lib/helpers/Glob.cjs");
86
86
 
87
- const V = require("./src/lib/helpers/IPToolkit.cjs");
87
+ const f = require("./src/lib/helpers/IPToolkit.cjs");
88
88
 
89
- const K = require("./src/lib/helpers/HexToUnsigned.cjs");
89
+ const V = require("./src/lib/helpers/HexToUnsigned.cjs");
90
90
 
91
- const w = require("./src/lib/helpers/UnsignedToHex.cjs");
91
+ const B = require("./src/lib/helpers/UnsignedToHex.cjs");
92
92
 
93
- const F = require("./src/lib/helpers/HexToSigned.cjs");
93
+ const K = require("./src/lib/helpers/HexToSigned.cjs");
94
94
 
95
- const R = require("./src/lib/helpers/SignedToHex.cjs");
95
+ const w = require("./src/lib/helpers/SignedToHex.cjs");
96
96
 
97
- const X = require("./src/lib/helpers/HexToIEEE754.cjs");
97
+ const F = require("./src/lib/helpers/HexToIEEE754.cjs");
98
98
 
99
- const B = require("./src/lib/helpers/IEEE754ToHex.cjs");
99
+ const X = require("./src/lib/helpers/IEEE754ToHex.cjs");
100
100
 
101
101
  const W = require("./src/lib/helpers/MD5.cjs");
102
102
 
@@ -104,6 +104,8 @@ const _ = require("./src/lib/helpers/SHA1.cjs");
104
104
 
105
105
  const z = require("./src/lib/helpers/SHA256.cjs");
106
106
 
107
+ const J = require("./src/lib/helpers/URLBuilder.cjs");
108
+
107
109
  require("./vendor/Package.5.cjs");
108
110
 
109
111
  require("fs");
@@ -210,11 +212,11 @@ exports.ObjectConstructor = I.ObjectConstructor;
210
212
 
211
213
  exports.ObjectHash = g.ObjectHash;
212
214
 
213
- exports.ObjectParentConstructor = S.ObjectParentConstructor;
215
+ exports.ObjectParentConstructor = d.ObjectParentConstructor;
214
216
 
215
- exports.ObjectParentConstructors = y.ObjectParentConstructors;
217
+ exports.ObjectParentConstructors = S.ObjectParentConstructors;
216
218
 
217
- exports.ObjectPrototype = d.ObjectPrototype;
219
+ exports.ObjectPrototype = y.ObjectPrototype;
218
220
 
219
221
  exports.SetToArray = T.SetToArray;
220
222
 
@@ -240,9 +242,9 @@ exports.MergeMap = k.MergeMap;
240
242
 
241
243
  exports.SortArray = C.SortArray;
242
244
 
243
- exports.SortKeys = D.SortKeys;
245
+ exports.SortKeys = L.SortKeys;
244
246
 
245
- exports.SortObject = L.SortObject;
247
+ exports.SortObject = D.SortObject;
246
248
 
247
249
  exports.RandomString = N.RandomString;
248
250
 
@@ -250,28 +252,30 @@ exports.NonceStr = G.NonceStr;
250
252
 
251
253
  exports.IsAbortError = U.IsAbortError;
252
254
 
253
- exports.Glob = f.Glob;
255
+ exports.Glob = R.Glob;
254
256
 
255
- exports.IP = V.IP;
257
+ exports.IP = f.IP;
256
258
 
257
- exports.IPv4 = V.IPv4;
259
+ exports.IPv4 = f.IPv4;
258
260
 
259
- exports.IPv6 = V.IPv6;
261
+ exports.IPv6 = f.IPv6;
260
262
 
261
- exports.HexToUnsigned = K.HexToUnsigned;
263
+ exports.HexToUnsigned = V.HexToUnsigned;
262
264
 
263
- exports.UnsignedToHex = w.UnsignedToHex;
265
+ exports.UnsignedToHex = B.UnsignedToHex;
264
266
 
265
- exports.HexToSigned = F.HexToSigned;
267
+ exports.HexToSigned = K.HexToSigned;
266
268
 
267
- exports.SignedToHex = R.SignedToHex;
269
+ exports.SignedToHex = w.SignedToHex;
268
270
 
269
- exports.HexToIEEE754 = X.HexToIEEE754;
271
+ exports.HexToIEEE754 = F.HexToIEEE754;
270
272
 
271
- exports.IEEE754ToHex = B.IEEE754ToHex;
273
+ exports.IEEE754ToHex = X.IEEE754ToHex;
272
274
 
273
275
  exports.MD5 = W.MD5;
274
276
 
275
277
  exports.SHA1 = _.SHA1;
276
278
 
277
279
  exports.SHA256 = z.SHA256;
280
+
281
+ exports.URLBuilder = J.URLBuilder;
package/helper.d.ts CHANGED
@@ -4379,5 +4379,40 @@ declare function SHA1(message: string): Buffer;
4379
4379
  */
4380
4380
  declare function SHA256(message: string): Buffer;
4381
4381
 
4382
- export { ArrayToSet, As, ConvertArrayLikeToIterable, ConvertArrayLikeToStream, Delay, DevNull, GetObjectNestingDepth, GetObjectPropertyPaths, Glob, GraceExit, HexToIEEE754, HexToSigned, HexToUnsigned, IEEE754ToHex, IP, IPv4, IPv6, IsAbortError, IsEmptyObject, IsExists, IsGlobString, IsHtml, IsNativeFunction, IsPath, IsPromise, IsPromiseLike, IsSymbol, IsXML, MD5, MergeArray, MergeMap, MergeSet, MissingValueError, NoCase, NonceStr, ObjectConstructor, ObjectHash, ObjectParentConstructor, ObjectParentConstructors, ObjectPrototype, ObjectToMap, RandomString, SHA1, SHA256, SetToArray, SignedToHex, SortArray, SortKeys, SortObject, Split, Templating, ToLower, ToUpper, UniqueArray, UnsignedToHex };
4383
- export type { IPBinHex, IPv4SubNet, IPv6Result, IPv6SubNet, NoCaseOptions, ObjectHashOptions, SortKeysOptions, SortObjectOptions, SortOptions, SplitOptions, TemplatingOptions };
4382
+ interface URLAttributes {
4383
+ auth?: string;
4384
+ hash?: string;
4385
+ host?: string;
4386
+ hostname?: string;
4387
+ href?: string;
4388
+ origin?: string;
4389
+ password?: string;
4390
+ pathname?: string;
4391
+ port?: string;
4392
+ protocol?: string;
4393
+ query?: Record<string, string>;
4394
+ slashes?: boolean;
4395
+ username?: string;
4396
+ }
4397
+ declare class URLBuilder {
4398
+ #private;
4399
+ static parse(url: string): URLBuilder;
4400
+ auth?: string;
4401
+ hash?: string;
4402
+ host?: string;
4403
+ hostname?: string;
4404
+ href?: string;
4405
+ origin?: string;
4406
+ password?: string;
4407
+ pathname?: string;
4408
+ port?: string | number;
4409
+ protocol?: string;
4410
+ query?: Record<string, string>;
4411
+ slashes?: boolean;
4412
+ username?: string;
4413
+ constructor(options?: URLAttributes);
4414
+ toString(): string;
4415
+ }
4416
+
4417
+ export { ArrayToSet, As, ConvertArrayLikeToIterable, ConvertArrayLikeToStream, Delay, DevNull, GetObjectNestingDepth, GetObjectPropertyPaths, Glob, GraceExit, HexToIEEE754, HexToSigned, HexToUnsigned, IEEE754ToHex, IP, IPv4, IPv6, IsAbortError, IsEmptyObject, IsExists, IsGlobString, IsHtml, IsNativeFunction, IsPath, IsPromise, IsPromiseLike, IsSymbol, IsXML, MD5, MergeArray, MergeMap, MergeSet, MissingValueError, NoCase, NonceStr, ObjectConstructor, ObjectHash, ObjectParentConstructor, ObjectParentConstructors, ObjectPrototype, ObjectToMap, RandomString, SHA1, SHA256, SetToArray, SignedToHex, SortArray, SortKeys, SortObject, Split, Templating, ToLower, ToUpper, URLBuilder, UniqueArray, UnsignedToHex };
4418
+ export type { IPBinHex, IPv4SubNet, IPv6Result, IPv6SubNet, NoCaseOptions, ObjectHashOptions, SortKeysOptions, SortObjectOptions, SortOptions, SplitOptions, TemplatingOptions, URLAttributes };
package/helper.mjs CHANGED
@@ -98,6 +98,8 @@ export { SHA1 } from "./src/lib/helpers/SHA1.mjs";
98
98
 
99
99
  export { SHA256 } from "./src/lib/helpers/SHA256.mjs";
100
100
 
101
+ export { URLBuilder } from "./src/lib/helpers/URLBuilder.mjs";
102
+
101
103
  import "./vendor/Package.5.mjs";
102
104
 
103
105
  import "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakutata",
3
- "version": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "description": "An IoC-based universal application framework.",
5
5
  "exports": {
6
6
  ".": {
@@ -0,0 +1,441 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, {
4
+ value: "Module"
5
+ });
6
+
7
+ const e = require("../../../vendor/Package.5.cjs");
8
+
9
+ "use strict";
10
+
11
+ var t = function e(t, s) {
12
+ s = s.split(":")[0];
13
+ t = +t;
14
+ if (!t) return false;
15
+ switch (s) {
16
+ case "http":
17
+ case "ws":
18
+ return t !== 80;
19
+
20
+ case "https":
21
+ case "wss":
22
+ return t !== 443;
23
+
24
+ case "ftp":
25
+ return t !== 21;
26
+
27
+ case "gopher":
28
+ return t !== 70;
29
+
30
+ case "file":
31
+ return false;
32
+ }
33
+ return t !== 0;
34
+ };
35
+
36
+ const s = e.getDefaultExportFromCjs(t);
37
+
38
+ var o = {};
39
+
40
+ "use strict";
41
+
42
+ var r = Object.prototype.hasOwnProperty, n;
43
+
44
+ function i(e) {
45
+ try {
46
+ return decodeURIComponent(e.replace(/\+/g, " "));
47
+ } catch (e) {
48
+ return null;
49
+ }
50
+ }
51
+
52
+ function a(e) {
53
+ try {
54
+ return encodeURIComponent(e);
55
+ } catch (e) {
56
+ return null;
57
+ }
58
+ }
59
+
60
+ function h(e) {
61
+ var t = /([^=?#&]+)=?([^&]*)/g, s = {}, o;
62
+ while (o = t.exec(e)) {
63
+ var r = i(o[1]), n = i(o[2]);
64
+ if (r === null || n === null || r in s) continue;
65
+ s[r] = n;
66
+ }
67
+ return s;
68
+ }
69
+
70
+ function l(e, t) {
71
+ t = t || "";
72
+ var s = [], o, i;
73
+ if ("string" !== typeof t) t = "?";
74
+ for (i in e) {
75
+ if (r.call(e, i)) {
76
+ o = e[i];
77
+ if (!o && (o === null || o === n || isNaN(o))) {
78
+ o = "";
79
+ }
80
+ i = a(i);
81
+ o = a(o);
82
+ if (i === null || o === null) continue;
83
+ s.push(i + "=" + o);
84
+ }
85
+ }
86
+ return s.length ? t + s.join("&") : "";
87
+ }
88
+
89
+ var c = o.stringify = l;
90
+
91
+ var u = o.parse = h;
92
+
93
+ "use strict";
94
+
95
+ var f = t, p = o, d = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, m = /[\n\r\t]/g, g = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, w = /:\d+$/, y = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, b = /^[a-zA-Z]:/;
96
+
97
+ function v(e) {
98
+ return (e ? e : "").toString().replace(d, "");
99
+ }
100
+
101
+ var j = [ [ "#", "hash" ], [ "?", "query" ], function e(t, s) {
102
+ return R(s.protocol) ? t.replace(/\\/g, "/") : t;
103
+ }, [ "/", "pathname" ], [ "@", "auth", 1 ], [ NaN, "host", undefined, 1, 1 ], [ /:(\d*)$/, "port", undefined, 1 ], [ NaN, "hostname", undefined, 1, 1 ] ];
104
+
105
+ var O = {
106
+ hash: 1,
107
+ query: 1
108
+ };
109
+
110
+ function C(t) {
111
+ var s;
112
+ if (typeof window !== "undefined") s = window; else if (typeof e.commonjsGlobal !== "undefined") s = e.commonjsGlobal; else if (typeof self !== "undefined") s = self; else s = {};
113
+ var o = s.location || {};
114
+ t = t || o;
115
+ var r = {}, n = typeof t, i;
116
+ if ("blob:" === t.protocol) {
117
+ r = new q(unescape(t.pathname), {});
118
+ } else if ("string" === n) {
119
+ r = new q(t, {});
120
+ for (i in O) delete r[i];
121
+ } else if ("object" === n) {
122
+ for (i in t) {
123
+ if (i in O) continue;
124
+ r[i] = t[i];
125
+ }
126
+ if (r.slashes === undefined) {
127
+ r.slashes = g.test(t.href);
128
+ }
129
+ }
130
+ return r;
131
+ }
132
+
133
+ function R(e) {
134
+ return e === "file:" || e === "ftp:" || e === "http:" || e === "https:" || e === "ws:" || e === "wss:";
135
+ }
136
+
137
+ function U(e, t) {
138
+ e = v(e);
139
+ e = e.replace(m, "");
140
+ t = t || {};
141
+ var s = y.exec(e);
142
+ var o = s[1] ? s[1].toLowerCase() : "";
143
+ var r = !!s[2];
144
+ var n = !!s[3];
145
+ var i = 0;
146
+ var a;
147
+ if (r) {
148
+ if (n) {
149
+ a = s[2] + s[3] + s[4];
150
+ i = s[2].length + s[3].length;
151
+ } else {
152
+ a = s[2] + s[4];
153
+ i = s[2].length;
154
+ }
155
+ } else {
156
+ if (n) {
157
+ a = s[3] + s[4];
158
+ i = s[3].length;
159
+ } else {
160
+ a = s[4];
161
+ }
162
+ }
163
+ if (o === "file:") {
164
+ if (i >= 2) {
165
+ a = a.slice(2);
166
+ }
167
+ } else if (R(o)) {
168
+ a = s[4];
169
+ } else if (o) {
170
+ if (r) {
171
+ a = a.slice(2);
172
+ }
173
+ } else if (i >= 2 && R(t.protocol)) {
174
+ a = s[4];
175
+ }
176
+ return {
177
+ protocol: o,
178
+ slashes: r || R(o),
179
+ slashesCount: i,
180
+ rest: a
181
+ };
182
+ }
183
+
184
+ function I(e, t) {
185
+ if (e === "") return t;
186
+ var s = (t || "/").split("/").slice(0, -1).concat(e.split("/")), o = s.length, r = s[o - 1], n = false, i = 0;
187
+ while (o--) {
188
+ if (s[o] === ".") {
189
+ s.splice(o, 1);
190
+ } else if (s[o] === "..") {
191
+ s.splice(o, 1);
192
+ i++;
193
+ } else if (i) {
194
+ if (o === 0) n = true;
195
+ s.splice(o, 1);
196
+ i--;
197
+ }
198
+ }
199
+ if (n) s.unshift("");
200
+ if (r === "." || r === "..") s.push("");
201
+ return s.join("/");
202
+ }
203
+
204
+ function q(e, t, s) {
205
+ e = v(e);
206
+ e = e.replace(m, "");
207
+ if (!(this instanceof q)) {
208
+ return new q(e, t, s);
209
+ }
210
+ var o, r, n, i, a, h, l = j.slice(), c = typeof t, u = this, d = 0;
211
+ if ("object" !== c && "string" !== c) {
212
+ s = t;
213
+ t = null;
214
+ }
215
+ if (s && "function" !== typeof s) s = p.parse;
216
+ t = C(t);
217
+ r = U(e || "", t);
218
+ o = !r.protocol && !r.slashes;
219
+ u.slashes = r.slashes || o && t.slashes;
220
+ u.protocol = r.protocol || t.protocol || "";
221
+ e = r.rest;
222
+ if (r.protocol === "file:" && (r.slashesCount !== 2 || b.test(e)) || !r.slashes && (r.protocol || r.slashesCount < 2 || !R(u.protocol))) {
223
+ l[3] = [ /(.*)/, "pathname" ];
224
+ }
225
+ for (;d < l.length; d++) {
226
+ i = l[d];
227
+ if (typeof i === "function") {
228
+ e = i(e, u);
229
+ continue;
230
+ }
231
+ n = i[0];
232
+ h = i[1];
233
+ if (n !== n) {
234
+ u[h] = e;
235
+ } else if ("string" === typeof n) {
236
+ a = n === "@" ? e.lastIndexOf(n) : e.indexOf(n);
237
+ if (~a) {
238
+ if ("number" === typeof i[2]) {
239
+ u[h] = e.slice(0, a);
240
+ e = e.slice(a + i[2]);
241
+ } else {
242
+ u[h] = e.slice(a);
243
+ e = e.slice(0, a);
244
+ }
245
+ }
246
+ } else if (a = n.exec(e)) {
247
+ u[h] = a[1];
248
+ e = e.slice(0, a.index);
249
+ }
250
+ u[h] = u[h] || (o && i[3] ? t[h] || "" : "");
251
+ if (i[4]) u[h] = u[h].toLowerCase();
252
+ }
253
+ if (s) u.query = s(u.query);
254
+ if (o && t.slashes && u.pathname.charAt(0) !== "/" && (u.pathname !== "" || t.pathname !== "")) {
255
+ u.pathname = I(u.pathname, t.pathname);
256
+ }
257
+ if (u.pathname.charAt(0) !== "/" && R(u.protocol)) {
258
+ u.pathname = "/" + u.pathname;
259
+ }
260
+ if (!f(u.port, u.protocol)) {
261
+ u.host = u.hostname;
262
+ u.port = "";
263
+ }
264
+ u.username = u.password = "";
265
+ if (u.auth) {
266
+ a = u.auth.indexOf(":");
267
+ if (~a) {
268
+ u.username = u.auth.slice(0, a);
269
+ u.username = encodeURIComponent(decodeURIComponent(u.username));
270
+ u.password = u.auth.slice(a + 1);
271
+ u.password = encodeURIComponent(decodeURIComponent(u.password));
272
+ } else {
273
+ u.username = encodeURIComponent(decodeURIComponent(u.auth));
274
+ }
275
+ u.auth = u.password ? u.username + ":" + u.password : u.username;
276
+ }
277
+ u.origin = u.protocol !== "file:" && R(u.protocol) && u.host ? u.protocol + "//" + u.host : "null";
278
+ u.href = u.toString();
279
+ }
280
+
281
+ function x(e, t, s) {
282
+ var o = this;
283
+ switch (e) {
284
+ case "query":
285
+ if ("string" === typeof t && t.length) {
286
+ t = (s || p.parse)(t);
287
+ }
288
+ o[e] = t;
289
+ break;
290
+
291
+ case "port":
292
+ o[e] = t;
293
+ if (!f(t, o.protocol)) {
294
+ o.host = o.hostname;
295
+ o[e] = "";
296
+ } else if (t) {
297
+ o.host = o.hostname + ":" + t;
298
+ }
299
+ break;
300
+
301
+ case "hostname":
302
+ o[e] = t;
303
+ if (o.port) t += ":" + o.port;
304
+ o.host = t;
305
+ break;
306
+
307
+ case "host":
308
+ o[e] = t;
309
+ if (w.test(t)) {
310
+ t = t.split(":");
311
+ o.port = t.pop();
312
+ o.hostname = t.join(":");
313
+ } else {
314
+ o.hostname = t;
315
+ o.port = "";
316
+ }
317
+ break;
318
+
319
+ case "protocol":
320
+ o.protocol = t.toLowerCase();
321
+ o.slashes = !s;
322
+ break;
323
+
324
+ case "pathname":
325
+ case "hash":
326
+ if (t) {
327
+ var r = e === "pathname" ? "/" : "#";
328
+ o[e] = t.charAt(0) !== r ? r + t : t;
329
+ } else {
330
+ o[e] = t;
331
+ }
332
+ break;
333
+
334
+ case "username":
335
+ case "password":
336
+ o[e] = encodeURIComponent(t);
337
+ break;
338
+
339
+ case "auth":
340
+ var n = t.indexOf(":");
341
+ if (~n) {
342
+ o.username = t.slice(0, n);
343
+ o.username = encodeURIComponent(decodeURIComponent(o.username));
344
+ o.password = t.slice(n + 1);
345
+ o.password = encodeURIComponent(decodeURIComponent(o.password));
346
+ } else {
347
+ o.username = encodeURIComponent(decodeURIComponent(t));
348
+ }
349
+ }
350
+ for (var i = 0; i < j.length; i++) {
351
+ var a = j[i];
352
+ if (a[4]) o[a[1]] = o[a[1]].toLowerCase();
353
+ }
354
+ o.auth = o.password ? o.username + ":" + o.password : o.username;
355
+ o.origin = o.protocol !== "file:" && R(o.protocol) && o.host ? o.protocol + "//" + o.host : "null";
356
+ o.href = o.toString();
357
+ return o;
358
+ }
359
+
360
+ function S(e) {
361
+ if (!e || "function" !== typeof e) e = p.stringify;
362
+ var t, s = this, o = s.host, r = s.protocol;
363
+ if (r && r.charAt(r.length - 1) !== ":") r += ":";
364
+ var n = r + (s.protocol && s.slashes || R(s.protocol) ? "//" : "");
365
+ if (s.username) {
366
+ n += s.username;
367
+ if (s.password) n += ":" + s.password;
368
+ n += "@";
369
+ } else if (s.password) {
370
+ n += ":" + s.password;
371
+ n += "@";
372
+ } else if (s.protocol !== "file:" && R(s.protocol) && !o && s.pathname !== "/") {
373
+ n += "@";
374
+ }
375
+ if (o[o.length - 1] === ":" || w.test(s.hostname) && !s.port) {
376
+ o += ":";
377
+ }
378
+ n += o + s.pathname;
379
+ t = "object" === typeof s.query ? e(s.query) : s.query;
380
+ if (t) n += "?" !== t.charAt(0) ? "?" + t : t;
381
+ if (s.hash) n += s.hash;
382
+ return n;
383
+ }
384
+
385
+ q.prototype = {
386
+ set: x,
387
+ toString: S
388
+ };
389
+
390
+ q.extractProtocol = U;
391
+
392
+ q.location = C;
393
+
394
+ q.trimLeft = v;
395
+
396
+ q.qs = p;
397
+
398
+ var L = q;
399
+
400
+ const k = e.getDefaultExportFromCjs(L);
401
+
402
+ class URLBuilder {
403
+ static parse(e) {
404
+ return new URLBuilder(JSON.parse(JSON.stringify(k(e, true))));
405
+ }
406
+ #e;
407
+ constructor(e = {}) {
408
+ this.#e = k("");
409
+ this.auth = e.auth;
410
+ this.hash = e.hash;
411
+ this.host = e.host;
412
+ this.hostname = e.hostname;
413
+ this.href = e.href;
414
+ this.origin = e.origin;
415
+ this.password = e.password;
416
+ this.pathname = e.pathname;
417
+ this.port = e.port;
418
+ this.protocol = e.protocol;
419
+ this.query = e.query;
420
+ this.slashes = e.slashes;
421
+ this.username = e.username;
422
+ }
423
+ toString() {
424
+ if (this.auth) this.#e.set("auth", this.auth);
425
+ if (this.hash) this.#e.set("hash", this.hash);
426
+ if (this.host) this.#e.set("host", this.host);
427
+ if (this.hostname) this.#e.set("hostname", this.hostname);
428
+ if (this.href) this.#e.set("href", this.href);
429
+ if (this.origin !== undefined) this.#e.set("origin", this.origin.toString());
430
+ if (this.password) this.#e.set("password", this.password);
431
+ if (this.pathname) this.#e.set("pathname", this.pathname);
432
+ if (this.port !== undefined) this.#e.set("port", this.port);
433
+ if (this.protocol) this.#e.set("protocol", this.protocol);
434
+ if (this.query) this.#e.set("query", this.query);
435
+ if (this.slashes !== undefined) this.#e.set("slashes", this.slashes);
436
+ if (this.username) this.#e.set("username", this.username);
437
+ return this.#e.toString();
438
+ }
439
+ }
440
+
441
+ exports.URLBuilder = URLBuilder;