@powerlines/plugin-automd 0.1.341 → 0.1.343

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.
Files changed (113) hide show
  1. package/README.md +14 -16
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
  3. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  4. package/dist/index.cjs +26 -27
  5. package/dist/index.d.cts +0 -1
  6. package/dist/index.d.cts.map +1 -1
  7. package/dist/index.d.mts +0 -1
  8. package/dist/index.d.mts.map +1 -1
  9. package/dist/index.mjs +5 -6
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/types/plugin.d.cts.map +1 -1
  12. package/dist/types/plugin.d.mts +1 -1
  13. package/dist/types/plugin.d.mts.map +1 -1
  14. package/dist/types/toc.d.cts.map +1 -1
  15. package/dist/types/toc.d.mts.map +1 -1
  16. package/package.json +20 -18
  17. package/dist/_virtual/rolldown_runtime.mjs +0 -32
  18. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -78
  19. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -78
  20. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  21. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.cjs +0 -5089
  22. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs +0 -5089
  23. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs.map +0 -1
  24. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.cjs +0 -654
  25. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs +0 -652
  26. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs.map +0 -1
  27. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +0 -23
  28. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +0 -23
  29. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
  30. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +0 -10
  31. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +0 -11
  32. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
  33. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +0 -388
  34. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +0 -388
  35. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
  36. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +0 -11
  37. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +0 -12
  38. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
  40. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -46
  41. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
  42. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.cjs +0 -204
  43. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs +0 -203
  44. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
  46. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1008
  47. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
  48. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.cjs +0 -128
  49. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs +0 -124
  50. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.cjs +0 -41464
  52. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs +0 -41462
  53. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs.map +0 -1
  54. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.cjs +0 -4387
  55. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs +0 -4385
  56. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.cjs +0 -26
  58. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs +0 -27
  59. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs.map +0 -1
  60. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.cjs +0 -370
  61. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs +0 -368
  62. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +0 -939
  64. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +0 -940
  65. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +0 -1
  66. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.cjs +0 -67
  67. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs +0 -65
  68. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.cjs +0 -1350
  70. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs +0 -1343
  71. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs.map +0 -1
  72. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -179
  73. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -178
  74. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -20
  76. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -17
  77. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
  78. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3975
  79. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3962
  80. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.cjs +0 -16
  82. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -15
  83. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs.map +0 -1
  84. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.cjs +0 -36
  85. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs +0 -34
  86. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.cjs +0 -227
  88. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs +0 -226
  89. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs.map +0 -1
  90. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -139
  91. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -134
  92. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -78
  94. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -78
  95. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
  96. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.cjs +0 -72
  97. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs +0 -70
  98. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.cjs +0 -181
  100. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs +0 -179
  101. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs.map +0 -1
  102. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.cjs +0 -12337
  103. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs +0 -12338
  104. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.cjs +0 -19
  106. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs +0 -19
  107. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs.map +0 -1
  108. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.cjs +0 -71
  109. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs +0 -72
  110. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.cjs +0 -110
  112. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs +0 -101
  113. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs.map +0 -1
@@ -1,181 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs
3
- const r = String.fromCharCode;
4
- const HASH_RE = /#/g;
5
- const AMPERSAND_RE = /&/g;
6
- const SLASH_RE = /\//g;
7
- const EQUAL_RE = /=/g;
8
- const PLUS_RE = /\+/g;
9
- const ENC_CARET_RE = /%5e/gi;
10
- const ENC_BACKTICK_RE = /%60/gi;
11
- const ENC_PIPE_RE = /%7c/gi;
12
- const ENC_SPACE_RE = /%20/gi;
13
- function encode(text) {
14
- return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
15
- }
16
- function encodeQueryValue(input) {
17
- return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
18
- }
19
- function encodeQueryKey(text) {
20
- return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
21
- }
22
- function decode(text = "") {
23
- try {
24
- return decodeURIComponent("" + text);
25
- } catch {
26
- return "" + text;
27
- }
28
- }
29
- function decodeQueryKey(text) {
30
- return decode(text.replace(PLUS_RE, " "));
31
- }
32
- function decodeQueryValue(text) {
33
- return decode(text.replace(PLUS_RE, " "));
34
- }
35
- function parseQuery(parametersString = "") {
36
- const object = /* @__PURE__ */ Object.create(null);
37
- if (parametersString[0] === "?") parametersString = parametersString.slice(1);
38
- for (const parameter of parametersString.split("&")) {
39
- const s = parameter.match(/([^=]+)=?(.*)/) || [];
40
- if (s.length < 2) continue;
41
- const key = decodeQueryKey(s[1]);
42
- if (key === "__proto__" || key === "constructor") continue;
43
- const value = decodeQueryValue(s[2] || "");
44
- if (object[key] === void 0) object[key] = value;
45
- else if (Array.isArray(object[key])) object[key].push(value);
46
- else object[key] = [object[key], value];
47
- }
48
- return object;
49
- }
50
- function encodeQueryItem(key, value) {
51
- if (typeof value === "number" || typeof value === "boolean") value = String(value);
52
- if (!value) return encodeQueryKey(key);
53
- if (Array.isArray(value)) return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&");
54
- return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;
55
- }
56
- function stringifyQuery(query) {
57
- return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&");
58
- }
59
- const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
60
- const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
61
- const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
62
- const TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
63
- const JOIN_LEADING_SLASH_RE = /^\.?\//;
64
- function hasProtocol(inputString, opts = {}) {
65
- if (typeof opts === "boolean") opts = { acceptRelative: opts };
66
- if (opts.strict) return PROTOCOL_STRICT_REGEX.test(inputString);
67
- return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);
68
- }
69
- function hasTrailingSlash(input = "", respectQueryAndFragment) {
70
- if (!respectQueryAndFragment) return input.endsWith("/");
71
- return TRAILING_SLASH_RE.test(input);
72
- }
73
- function withoutTrailingSlash(input = "", respectQueryAndFragment) {
74
- if (!respectQueryAndFragment) return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || "/";
75
- if (!hasTrailingSlash(input, true)) return input || "/";
76
- let path = input;
77
- let fragment = "";
78
- const fragmentIndex = input.indexOf("#");
79
- if (fragmentIndex !== -1) {
80
- path = input.slice(0, fragmentIndex);
81
- fragment = input.slice(fragmentIndex);
82
- }
83
- const [s0, ...s] = path.split("?");
84
- return ((s0.endsWith("/") ? s0.slice(0, -1) : s0) || "/") + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
85
- }
86
- function withTrailingSlash(input = "", respectQueryAndFragment) {
87
- if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
88
- if (hasTrailingSlash(input, true)) return input || "/";
89
- let path = input;
90
- let fragment = "";
91
- const fragmentIndex = input.indexOf("#");
92
- if (fragmentIndex !== -1) {
93
- path = input.slice(0, fragmentIndex);
94
- fragment = input.slice(fragmentIndex);
95
- if (!path) return fragment;
96
- }
97
- const [s0, ...s] = path.split("?");
98
- return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
99
- }
100
- function withBase(input, base) {
101
- if (isEmptyURL(base) || hasProtocol(input)) return input;
102
- const _base = withoutTrailingSlash(base);
103
- if (input.startsWith(_base)) {
104
- const nextChar = input[_base.length];
105
- if (!nextChar || nextChar === "/" || nextChar === "?") return input;
106
- }
107
- return joinURL(_base, input);
108
- }
109
- function withQuery(input, query) {
110
- const parsed = parseURL(input);
111
- parsed.search = stringifyQuery({
112
- ...parseQuery(parsed.search),
113
- ...query
114
- });
115
- return stringifyParsedURL(parsed);
116
- }
117
- function isEmptyURL(url) {
118
- return !url || url === "/";
119
- }
120
- function isNonEmptyURL(url) {
121
- return url && url !== "/";
122
- }
123
- function joinURL(base, ...input) {
124
- let url = base || "";
125
- for (const segment of input.filter((url2) => isNonEmptyURL(url2))) if (url) {
126
- const _segment = segment.replace(JOIN_LEADING_SLASH_RE, "");
127
- url = withTrailingSlash(url) + _segment;
128
- } else url = segment;
129
- return url;
130
- }
131
- const protocolRelative = Symbol.for("ufo:protocolRelative");
132
- function parseURL(input = "", defaultProto) {
133
- const _specialProtoMatch = input.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);
134
- if (_specialProtoMatch) {
135
- const [, _proto, _pathname = ""] = _specialProtoMatch;
136
- return {
137
- protocol: _proto.toLowerCase(),
138
- pathname: _pathname,
139
- href: _proto + _pathname,
140
- auth: "",
141
- host: "",
142
- search: "",
143
- hash: ""
144
- };
145
- }
146
- if (!hasProtocol(input, { acceptRelative: true })) return defaultProto ? parseURL(defaultProto + input) : parsePath(input);
147
- const [, protocol = "", auth, hostAndPath = ""] = input.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [];
148
- let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];
149
- if (protocol === "file:") path = path.replace(/\/(?=[A-Za-z]:)/, "");
150
- const { pathname, search, hash } = parsePath(path);
151
- return {
152
- protocol: protocol.toLowerCase(),
153
- auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
154
- host,
155
- pathname,
156
- search,
157
- hash,
158
- [protocolRelative]: !protocol
159
- };
160
- }
161
- function parsePath(input = "") {
162
- const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
163
- return {
164
- pathname,
165
- search,
166
- hash
167
- };
168
- }
169
- function stringifyParsedURL(parsed) {
170
- const pathname = parsed.pathname || "";
171
- const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : "";
172
- const hash = parsed.hash || "";
173
- const auth = parsed.auth ? parsed.auth + "@" : "";
174
- const host = parsed.host || "";
175
- return (parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : "") + auth + host + pathname + search + hash;
176
- }
177
-
178
- //#endregion
179
- exports.joinURL = joinURL;
180
- exports.withBase = withBase;
181
- exports.withQuery = withQuery;
@@ -1,179 +0,0 @@
1
- //#region ../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs
2
- const r = String.fromCharCode;
3
- const HASH_RE = /#/g;
4
- const AMPERSAND_RE = /&/g;
5
- const SLASH_RE = /\//g;
6
- const EQUAL_RE = /=/g;
7
- const PLUS_RE = /\+/g;
8
- const ENC_CARET_RE = /%5e/gi;
9
- const ENC_BACKTICK_RE = /%60/gi;
10
- const ENC_PIPE_RE = /%7c/gi;
11
- const ENC_SPACE_RE = /%20/gi;
12
- function encode(text) {
13
- return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
14
- }
15
- function encodeQueryValue(input) {
16
- return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
17
- }
18
- function encodeQueryKey(text) {
19
- return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
20
- }
21
- function decode(text = "") {
22
- try {
23
- return decodeURIComponent("" + text);
24
- } catch {
25
- return "" + text;
26
- }
27
- }
28
- function decodeQueryKey(text) {
29
- return decode(text.replace(PLUS_RE, " "));
30
- }
31
- function decodeQueryValue(text) {
32
- return decode(text.replace(PLUS_RE, " "));
33
- }
34
- function parseQuery(parametersString = "") {
35
- const object = /* @__PURE__ */ Object.create(null);
36
- if (parametersString[0] === "?") parametersString = parametersString.slice(1);
37
- for (const parameter of parametersString.split("&")) {
38
- const s = parameter.match(/([^=]+)=?(.*)/) || [];
39
- if (s.length < 2) continue;
40
- const key = decodeQueryKey(s[1]);
41
- if (key === "__proto__" || key === "constructor") continue;
42
- const value = decodeQueryValue(s[2] || "");
43
- if (object[key] === void 0) object[key] = value;
44
- else if (Array.isArray(object[key])) object[key].push(value);
45
- else object[key] = [object[key], value];
46
- }
47
- return object;
48
- }
49
- function encodeQueryItem(key, value) {
50
- if (typeof value === "number" || typeof value === "boolean") value = String(value);
51
- if (!value) return encodeQueryKey(key);
52
- if (Array.isArray(value)) return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&");
53
- return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;
54
- }
55
- function stringifyQuery(query) {
56
- return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&");
57
- }
58
- const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
59
- const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
60
- const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
61
- const TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
62
- const JOIN_LEADING_SLASH_RE = /^\.?\//;
63
- function hasProtocol(inputString, opts = {}) {
64
- if (typeof opts === "boolean") opts = { acceptRelative: opts };
65
- if (opts.strict) return PROTOCOL_STRICT_REGEX.test(inputString);
66
- return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);
67
- }
68
- function hasTrailingSlash(input = "", respectQueryAndFragment) {
69
- if (!respectQueryAndFragment) return input.endsWith("/");
70
- return TRAILING_SLASH_RE.test(input);
71
- }
72
- function withoutTrailingSlash(input = "", respectQueryAndFragment) {
73
- if (!respectQueryAndFragment) return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || "/";
74
- if (!hasTrailingSlash(input, true)) return input || "/";
75
- let path = input;
76
- let fragment = "";
77
- const fragmentIndex = input.indexOf("#");
78
- if (fragmentIndex !== -1) {
79
- path = input.slice(0, fragmentIndex);
80
- fragment = input.slice(fragmentIndex);
81
- }
82
- const [s0, ...s] = path.split("?");
83
- return ((s0.endsWith("/") ? s0.slice(0, -1) : s0) || "/") + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
84
- }
85
- function withTrailingSlash(input = "", respectQueryAndFragment) {
86
- if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
87
- if (hasTrailingSlash(input, true)) return input || "/";
88
- let path = input;
89
- let fragment = "";
90
- const fragmentIndex = input.indexOf("#");
91
- if (fragmentIndex !== -1) {
92
- path = input.slice(0, fragmentIndex);
93
- fragment = input.slice(fragmentIndex);
94
- if (!path) return fragment;
95
- }
96
- const [s0, ...s] = path.split("?");
97
- return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
98
- }
99
- function withBase(input, base) {
100
- if (isEmptyURL(base) || hasProtocol(input)) return input;
101
- const _base = withoutTrailingSlash(base);
102
- if (input.startsWith(_base)) {
103
- const nextChar = input[_base.length];
104
- if (!nextChar || nextChar === "/" || nextChar === "?") return input;
105
- }
106
- return joinURL(_base, input);
107
- }
108
- function withQuery(input, query) {
109
- const parsed = parseURL(input);
110
- parsed.search = stringifyQuery({
111
- ...parseQuery(parsed.search),
112
- ...query
113
- });
114
- return stringifyParsedURL(parsed);
115
- }
116
- function isEmptyURL(url) {
117
- return !url || url === "/";
118
- }
119
- function isNonEmptyURL(url) {
120
- return url && url !== "/";
121
- }
122
- function joinURL(base, ...input) {
123
- let url = base || "";
124
- for (const segment of input.filter((url2) => isNonEmptyURL(url2))) if (url) {
125
- const _segment = segment.replace(JOIN_LEADING_SLASH_RE, "");
126
- url = withTrailingSlash(url) + _segment;
127
- } else url = segment;
128
- return url;
129
- }
130
- const protocolRelative = Symbol.for("ufo:protocolRelative");
131
- function parseURL(input = "", defaultProto) {
132
- const _specialProtoMatch = input.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);
133
- if (_specialProtoMatch) {
134
- const [, _proto, _pathname = ""] = _specialProtoMatch;
135
- return {
136
- protocol: _proto.toLowerCase(),
137
- pathname: _pathname,
138
- href: _proto + _pathname,
139
- auth: "",
140
- host: "",
141
- search: "",
142
- hash: ""
143
- };
144
- }
145
- if (!hasProtocol(input, { acceptRelative: true })) return defaultProto ? parseURL(defaultProto + input) : parsePath(input);
146
- const [, protocol = "", auth, hostAndPath = ""] = input.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [];
147
- let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];
148
- if (protocol === "file:") path = path.replace(/\/(?=[A-Za-z]:)/, "");
149
- const { pathname, search, hash } = parsePath(path);
150
- return {
151
- protocol: protocol.toLowerCase(),
152
- auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
153
- host,
154
- pathname,
155
- search,
156
- hash,
157
- [protocolRelative]: !protocol
158
- };
159
- }
160
- function parsePath(input = "") {
161
- const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
162
- return {
163
- pathname,
164
- search,
165
- hash
166
- };
167
- }
168
- function stringifyParsedURL(parsed) {
169
- const pathname = parsed.pathname || "";
170
- const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : "";
171
- const hash = parsed.hash || "";
172
- const auth = parsed.auth ? parsed.auth + "@" : "";
173
- const host = parsed.host || "";
174
- return (parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : "") + auth + host + pathname + search + hash;
175
- }
176
-
177
- //#endregion
178
- export { joinURL, withBase, withQuery };
179
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs"],"sourcesContent":["const n = /[^\\0-\\x7E]/;\nconst t = /[\\x2E\\u3002\\uFF0E\\uFF61]/g;\nconst o = {\n overflow: \"Overflow Error\",\n \"not-basic\": \"Illegal Input\",\n \"invalid-input\": \"Invalid Input\"\n};\nconst e = Math.floor;\nconst r = String.fromCharCode;\nfunction s(n2) {\n throw new RangeError(o[n2]);\n}\nconst c = function(n2, t2) {\n return n2 + 22 + 75 * (n2 < 26) - ((t2 != 0) << 5);\n};\nconst u = function(n2, t2, o2) {\n let r2 = 0;\n for (n2 = o2 ? e(n2 / 700) : n2 >> 1, n2 += e(n2 / t2); n2 > 455; r2 += 36) {\n n2 = e(n2 / 35);\n }\n return e(r2 + 36 * n2 / (n2 + 38));\n};\nfunction toASCII(o2) {\n return (function(n2, o3) {\n const e2 = n2.split(\"@\");\n let r2 = \"\";\n e2.length > 1 && (r2 = e2[0] + \"@\", n2 = e2[1]);\n const s2 = (function(n3, t2) {\n const o4 = [];\n let e3 = n3.length;\n for (; e3--; ) {\n o4[e3] = t2(n3[e3]);\n }\n return o4;\n })((n2 = n2.replace(t, \".\")).split(\".\"), o3).join(\".\");\n return r2 + s2;\n })(o2, function(t2) {\n return n.test(t2) ? \"xn--\" + (function(n2) {\n const t3 = [];\n const o3 = (n2 = (function(n3) {\n const t4 = [];\n let o4 = 0;\n const e2 = n3.length;\n for (; o4 < e2; ) {\n const r2 = n3.charCodeAt(o4++);\n if (r2 >= 55296 && r2 <= 56319 && o4 < e2) {\n const e3 = n3.charCodeAt(o4++);\n (64512 & e3) == 56320 ? t4.push(((1023 & r2) << 10) + (1023 & e3) + 65536) : (t4.push(r2), o4--);\n } else {\n t4.push(r2);\n }\n }\n return t4;\n })(n2)).length;\n let f = 128;\n let i = 0;\n let l = 72;\n for (const o4 of n2) {\n o4 < 128 && t3.push(r(o4));\n }\n const h = t3.length;\n let p = h;\n for (h && t3.push(\"-\"); p < o3; ) {\n let o4 = 2147483647;\n for (const t4 of n2) {\n t4 >= f && t4 < o4 && (o4 = t4);\n }\n const a = p + 1;\n o4 - f > e((2147483647 - i) / a) && s(\"overflow\"), i += (o4 - f) * a, f = o4;\n for (const o5 of n2) {\n if (o5 < f && ++i > 2147483647 && s(\"overflow\"), o5 == f) {\n let n3 = i;\n for (let o6 = 36; ; o6 += 36) {\n const s2 = o6 <= l ? 1 : o6 >= l + 26 ? 26 : o6 - l;\n if (n3 < s2) {\n break;\n }\n const u2 = n3 - s2;\n const f2 = 36 - s2;\n t3.push(r(c(s2 + u2 % f2, 0))), n3 = e(u2 / f2);\n }\n t3.push(r(c(n3, 0))), l = u(i, a, p == h), i = 0, ++p;\n }\n }\n ++i, ++f;\n }\n return t3.join(\"\");\n })(t2) : t2;\n });\n}\n\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_CARET_RE = /%5e/gi;\nconst ENC_BACKTICK_RE = /%60/gi;\nconst ENC_CURLY_OPEN_RE = /%7b/gi;\nconst ENC_PIPE_RE = /%7c/gi;\nconst ENC_CURLY_CLOSE_RE = /%7d/gi;\nconst ENC_SPACE_RE = /%20/gi;\nconst ENC_SLASH_RE = /%2f/gi;\nconst ENC_ENC_SLASH_RE = /%252f/gi;\nfunction encode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\");\n}\nfunction encodeHash(text) {\n return encode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(input) {\n return encode(typeof input === \"string\" ? input : JSON.stringify(input)).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CARET_RE, \"^\").replace(SLASH_RE, \"%2F\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return encode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\").replace(ENC_ENC_SLASH_RE, \"%2F\").replace(AMPERSAND_RE, \"%26\").replace(PLUS_RE, \"%2B\");\n}\nfunction encodeParam(text) {\n return encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text = \"\") {\n try {\n return decodeURIComponent(\"\" + text);\n } catch {\n return \"\" + text;\n }\n}\nfunction decodePath(text) {\n return decode(text.replace(ENC_SLASH_RE, \"%252F\"));\n}\nfunction decodeQueryKey(text) {\n return decode(text.replace(PLUS_RE, \" \"));\n}\nfunction decodeQueryValue(text) {\n return decode(text.replace(PLUS_RE, \" \"));\n}\nfunction encodeHost(name = \"\") {\n return toASCII(name);\n}\n\nfunction parseQuery(parametersString = \"\") {\n const object = /* @__PURE__ */ Object.create(null);\n if (parametersString[0] === \"?\") {\n parametersString = parametersString.slice(1);\n }\n for (const parameter of parametersString.split(\"&\")) {\n const s = parameter.match(/([^=]+)=?(.*)/) || [];\n if (s.length < 2) {\n continue;\n }\n const key = decodeQueryKey(s[1]);\n if (key === \"__proto__\" || key === \"constructor\") {\n continue;\n }\n const value = decodeQueryValue(s[2] || \"\");\n if (object[key] === void 0) {\n object[key] = value;\n } else if (Array.isArray(object[key])) {\n object[key].push(value);\n } else {\n object[key] = [object[key], value];\n }\n }\n return object;\n}\nfunction encodeQueryItem(key, value) {\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n value = String(value);\n }\n if (!value) {\n return encodeQueryKey(key);\n }\n if (Array.isArray(value)) {\n return value.map(\n (_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`\n ).join(\"&\");\n }\n return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;\n}\nfunction stringifyQuery(query) {\n return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join(\"&\");\n}\n\nconst PROTOCOL_STRICT_REGEX = /^[\\s\\w\\0+.-]{2,}:([/\\\\]{1,2})/;\nconst PROTOCOL_REGEX = /^[\\s\\w\\0+.-]{2,}:([/\\\\]{2})?/;\nconst PROTOCOL_RELATIVE_REGEX = /^([/\\\\]\\s*){2,}[^/\\\\]/;\nconst PROTOCOL_SCRIPT_RE = /^[\\s\\0]*(blob|data|javascript|vbscript):$/i;\nconst TRAILING_SLASH_RE = /\\/$|\\/\\?|\\/#/;\nconst JOIN_LEADING_SLASH_RE = /^\\.?\\//;\nfunction isRelative(inputString) {\n return [\"./\", \"../\"].some((string_) => inputString.startsWith(string_));\n}\nfunction hasProtocol(inputString, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { acceptRelative: opts };\n }\n if (opts.strict) {\n return PROTOCOL_STRICT_REGEX.test(inputString);\n }\n return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);\n}\nfunction isScriptProtocol(protocol) {\n return !!protocol && PROTOCOL_SCRIPT_RE.test(protocol);\n}\nfunction hasTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return input.endsWith(\"/\");\n }\n return TRAILING_SLASH_RE.test(input);\n}\nfunction withoutTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || \"/\";\n }\n if (!hasTrailingSlash(input, true)) {\n return input || \"/\";\n }\n let path = input;\n let fragment = \"\";\n const fragmentIndex = input.indexOf(\"#\");\n if (fragmentIndex !== -1) {\n path = input.slice(0, fragmentIndex);\n fragment = input.slice(fragmentIndex);\n }\n const [s0, ...s] = path.split(\"?\");\n const cleanPath = s0.endsWith(\"/\") ? s0.slice(0, -1) : s0;\n return (cleanPath || \"/\") + (s.length > 0 ? `?${s.join(\"?\")}` : \"\") + fragment;\n}\nfunction withTrailingSlash(input = \"\", respectQueryAndFragment) {\n if (!respectQueryAndFragment) {\n return input.endsWith(\"/\") ? input : input + \"/\";\n }\n if (hasTrailingSlash(input, true)) {\n return input || \"/\";\n }\n let path = input;\n let fragment = \"\";\n const fragmentIndex = input.indexOf(\"#\");\n if (fragmentIndex !== -1) {\n path = input.slice(0, fragmentIndex);\n fragment = input.slice(fragmentIndex);\n if (!path) {\n return fragment;\n }\n }\n const [s0, ...s] = path.split(\"?\");\n return s0 + \"/\" + (s.length > 0 ? `?${s.join(\"?\")}` : \"\") + fragment;\n}\nfunction hasLeadingSlash(input = \"\") {\n return input.startsWith(\"/\");\n}\nfunction withoutLeadingSlash(input = \"\") {\n return (hasLeadingSlash(input) ? input.slice(1) : input) || \"/\";\n}\nfunction withLeadingSlash(input = \"\") {\n return hasLeadingSlash(input) ? input : \"/\" + input;\n}\nfunction cleanDoubleSlashes(input = \"\") {\n return input.split(\"://\").map((string_) => string_.replace(/\\/{2,}/g, \"/\")).join(\"://\");\n}\nfunction withBase(input, base) {\n if (isEmptyURL(base) || hasProtocol(input)) {\n return input;\n }\n const _base = withoutTrailingSlash(base);\n if (input.startsWith(_base)) {\n const nextChar = input[_base.length];\n if (!nextChar || nextChar === \"/\" || nextChar === \"?\") {\n return input;\n }\n }\n return joinURL(_base, input);\n}\nfunction withoutBase(input, base) {\n if (isEmptyURL(base)) {\n return input;\n }\n const _base = withoutTrailingSlash(base);\n if (!input.startsWith(_base)) {\n return input;\n }\n const nextChar = input[_base.length];\n if (nextChar && nextChar !== \"/\" && nextChar !== \"?\") {\n return input;\n }\n const trimmed = input.slice(_base.length);\n return trimmed[0] === \"/\" ? trimmed : \"/\" + trimmed;\n}\nfunction withQuery(input, query) {\n const parsed = parseURL(input);\n const mergedQuery = { ...parseQuery(parsed.search), ...query };\n parsed.search = stringifyQuery(mergedQuery);\n return stringifyParsedURL(parsed);\n}\nfunction filterQuery(input, predicate) {\n if (!input.includes(\"?\")) {\n return input;\n }\n const parsed = parseURL(input);\n const query = parseQuery(parsed.search);\n const filteredQuery = Object.fromEntries(\n Object.entries(query).filter(([key, value]) => predicate(key, value))\n );\n parsed.search = stringifyQuery(filteredQuery);\n return stringifyParsedURL(parsed);\n}\nfunction getQuery(input) {\n return parseQuery(parseURL(input).search);\n}\nfunction isEmptyURL(url) {\n return !url || url === \"/\";\n}\nfunction isNonEmptyURL(url) {\n return url && url !== \"/\";\n}\nfunction joinURL(base, ...input) {\n let url = base || \"\";\n for (const segment of input.filter((url2) => isNonEmptyURL(url2))) {\n if (url) {\n const _segment = segment.replace(JOIN_LEADING_SLASH_RE, \"\");\n url = withTrailingSlash(url) + _segment;\n } else {\n url = segment;\n }\n }\n return url;\n}\nfunction joinRelativeURL(..._input) {\n const JOIN_SEGMENT_SPLIT_RE = /\\/(?!\\/)/;\n const input = _input.filter(Boolean);\n const segments = [];\n let segmentsDepth = 0;\n for (const i of input) {\n if (!i || i === \"/\") {\n continue;\n }\n for (const [sindex, s] of i.split(JOIN_SEGMENT_SPLIT_RE).entries()) {\n if (!s || s === \".\") {\n continue;\n }\n if (s === \"..\") {\n if (segments.length === 1 && hasProtocol(segments[0])) {\n continue;\n }\n segments.pop();\n segmentsDepth--;\n continue;\n }\n if (sindex === 1 && segments[segments.length - 1]?.endsWith(\":/\")) {\n segments[segments.length - 1] += \"/\" + s;\n continue;\n }\n segments.push(s);\n segmentsDepth++;\n }\n }\n let url = segments.join(\"/\");\n if (segmentsDepth >= 0) {\n if (input[0]?.startsWith(\"/\") && !url.startsWith(\"/\")) {\n url = \"/\" + url;\n } else if (input[0]?.startsWith(\"./\") && !url.startsWith(\"./\")) {\n url = \"./\" + url;\n }\n } else {\n url = \"../\".repeat(-1 * segmentsDepth) + url;\n }\n if (input[input.length - 1]?.endsWith(\"/\") && !url.endsWith(\"/\")) {\n url += \"/\";\n }\n return url;\n}\nfunction withHttp(input) {\n return withProtocol(input, \"http://\");\n}\nfunction withHttps(input) {\n return withProtocol(input, \"https://\");\n}\nfunction withoutProtocol(input) {\n return withProtocol(input, \"\");\n}\nfunction withProtocol(input, protocol) {\n let match = input.match(PROTOCOL_REGEX);\n if (!match) {\n match = input.match(/^\\/{2,}/);\n }\n if (!match) {\n return protocol + input;\n }\n return protocol + input.slice(match[0].length);\n}\nfunction normalizeURL(input) {\n const parsed = parseURL(input);\n parsed.pathname = encodePath(decodePath(parsed.pathname));\n parsed.hash = encodeHash(decode(parsed.hash));\n parsed.host = encodeHost(decode(parsed.host));\n parsed.search = stringifyQuery(parseQuery(parsed.search));\n return stringifyParsedURL(parsed);\n}\nfunction resolveURL(base = \"\", ...inputs) {\n if (typeof base !== \"string\") {\n throw new TypeError(\n `URL input should be string received ${typeof base} (${base})`\n );\n }\n const filteredInputs = inputs.filter((input) => isNonEmptyURL(input));\n if (filteredInputs.length === 0) {\n return base;\n }\n const url = parseURL(base);\n for (const inputSegment of filteredInputs) {\n const urlSegment = parseURL(inputSegment);\n if (urlSegment.pathname) {\n url.pathname = withTrailingSlash(url.pathname) + withoutLeadingSlash(urlSegment.pathname);\n }\n if (urlSegment.hash && urlSegment.hash !== \"#\") {\n url.hash = urlSegment.hash;\n }\n if (urlSegment.search && urlSegment.search !== \"?\") {\n if (url.search && url.search !== \"?\") {\n const queryString = stringifyQuery({\n ...parseQuery(url.search),\n ...parseQuery(urlSegment.search)\n });\n url.search = queryString.length > 0 ? \"?\" + queryString : \"\";\n } else {\n url.search = urlSegment.search;\n }\n }\n }\n return stringifyParsedURL(url);\n}\nfunction isSamePath(p1, p2) {\n return decode(withoutTrailingSlash(p1)) === decode(withoutTrailingSlash(p2));\n}\nfunction isEqual(a, b, options = {}) {\n if (!options.trailingSlash) {\n a = withTrailingSlash(a);\n b = withTrailingSlash(b);\n }\n if (!options.leadingSlash) {\n a = withLeadingSlash(a);\n b = withLeadingSlash(b);\n }\n if (!options.encoding) {\n a = decode(a);\n b = decode(b);\n }\n return a === b;\n}\nfunction withFragment(input, hash) {\n if (!hash || hash === \"#\") {\n return input;\n }\n const parsed = parseURL(input);\n parsed.hash = hash === \"\" ? \"\" : \"#\" + encodeHash(hash);\n return stringifyParsedURL(parsed);\n}\nfunction withoutFragment(input) {\n return stringifyParsedURL({ ...parseURL(input), hash: \"\" });\n}\nfunction withoutHost(input) {\n const parsed = parseURL(input);\n return (parsed.pathname || \"/\") + parsed.search + parsed.hash;\n}\n\nconst protocolRelative = Symbol.for(\"ufo:protocolRelative\");\nfunction parseURL(input = \"\", defaultProto) {\n const _specialProtoMatch = input.match(\n /^[\\s\\0]*(blob:|data:|javascript:|vbscript:)(.*)/i\n );\n if (_specialProtoMatch) {\n const [, _proto, _pathname = \"\"] = _specialProtoMatch;\n return {\n protocol: _proto.toLowerCase(),\n pathname: _pathname,\n href: _proto + _pathname,\n auth: \"\",\n host: \"\",\n search: \"\",\n hash: \"\"\n };\n }\n if (!hasProtocol(input, { acceptRelative: true })) {\n return defaultProto ? parseURL(defaultProto + input) : parsePath(input);\n }\n const [, protocol = \"\", auth, hostAndPath = \"\"] = input.replace(/\\\\/g, \"/\").match(/^[\\s\\0]*([\\w+.-]{2,}:)?\\/\\/([^/@]+@)?(.*)/) || [];\n let [, host = \"\", path = \"\"] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];\n if (protocol === \"file:\") {\n path = path.replace(/\\/(?=[A-Za-z]:)/, \"\");\n }\n const { pathname, search, hash } = parsePath(path);\n return {\n protocol: protocol.toLowerCase(),\n auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : \"\",\n host,\n pathname,\n search,\n hash,\n [protocolRelative]: !protocol\n };\n}\nfunction parsePath(input = \"\") {\n const [pathname = \"\", search = \"\", hash = \"\"] = (input.match(/([^#?]*)(\\?[^#]*)?(#.*)?/) || []).splice(1);\n return {\n pathname,\n search,\n hash\n };\n}\nfunction parseAuth(input = \"\") {\n const [username, password] = input.split(\":\");\n return {\n username: decode(username),\n password: decode(password)\n };\n}\nfunction parseHost(input = \"\") {\n const [hostname, port] = (input.match(/([^/:]*):?(\\d+)?/) || []).splice(1);\n return {\n hostname: decode(hostname),\n port\n };\n}\nfunction stringifyParsedURL(parsed) {\n const pathname = parsed.pathname || \"\";\n const search = parsed.search ? (parsed.search.startsWith(\"?\") ? \"\" : \"?\") + parsed.search : \"\";\n const hash = parsed.hash || \"\";\n const auth = parsed.auth ? parsed.auth + \"@\" : \"\";\n const host = parsed.host || \"\";\n const proto = parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || \"\") + \"//\" : \"\";\n return proto + auth + host + pathname + search + hash;\n}\nconst FILENAME_STRICT_REGEX = /\\/([^/]+\\.[^/]+)$/;\nconst FILENAME_REGEX = /\\/([^/]+)$/;\nfunction parseFilename(input = \"\", opts) {\n const { pathname } = parseURL(input);\n const matches = opts?.strict ? pathname.match(FILENAME_STRICT_REGEX) : pathname.match(FILENAME_REGEX);\n return matches ? matches[1] : void 0;\n}\n\nclass $URL {\n protocol;\n host;\n auth;\n pathname;\n query = {};\n hash;\n constructor(input = \"\") {\n if (typeof input !== \"string\") {\n throw new TypeError(\n `URL input should be string received ${typeof input} (${input})`\n );\n }\n const parsed = parseURL(input);\n this.protocol = decode(parsed.protocol);\n this.host = decode(parsed.host);\n this.auth = decode(parsed.auth);\n this.pathname = decodePath(parsed.pathname);\n this.query = parseQuery(parsed.search);\n this.hash = decode(parsed.hash);\n }\n get hostname() {\n return parseHost(this.host).hostname;\n }\n get port() {\n return parseHost(this.host).port || \"\";\n }\n get username() {\n return parseAuth(this.auth).username;\n }\n get password() {\n return parseAuth(this.auth).password || \"\";\n }\n get hasProtocol() {\n return this.protocol.length;\n }\n get isAbsolute() {\n return this.hasProtocol || this.pathname[0] === \"/\";\n }\n get search() {\n const q = stringifyQuery(this.query);\n return q.length > 0 ? \"?\" + q : \"\";\n }\n get searchParams() {\n const p = new URLSearchParams();\n for (const name in this.query) {\n const value = this.query[name];\n if (Array.isArray(value)) {\n for (const v of value) {\n p.append(name, v);\n }\n } else {\n p.append(\n name,\n typeof value === \"string\" ? value : JSON.stringify(value)\n );\n }\n }\n return p;\n }\n get origin() {\n return (this.protocol ? this.protocol + \"//\" : \"\") + encodeHost(this.host);\n }\n get fullpath() {\n return encodePath(this.pathname) + this.search + encodeHash(this.hash);\n }\n get encodedAuth() {\n if (!this.auth) {\n return \"\";\n }\n const { username, password } = parseAuth(this.auth);\n return encodeURIComponent(username) + (password ? \":\" + encodeURIComponent(password) : \"\");\n }\n get href() {\n const auth = this.encodedAuth;\n const originWithAuth = (this.protocol ? this.protocol + \"//\" : \"\") + (auth ? auth + \"@\" : \"\") + encodeHost(this.host);\n return this.hasProtocol && this.isAbsolute ? originWithAuth + this.fullpath : this.fullpath;\n }\n append(url) {\n if (url.hasProtocol) {\n throw new Error(\"Cannot append a URL with protocol\");\n }\n Object.assign(this.query, url.query);\n if (url.pathname) {\n this.pathname = withTrailingSlash(this.pathname) + withoutLeadingSlash(url.pathname);\n }\n if (url.hash) {\n this.hash = url.hash;\n }\n }\n toJSON() {\n return this.href;\n }\n toString() {\n return this.href;\n }\n}\nfunction createURL(input) {\n return new $URL(input);\n}\n\nexport { $URL, cleanDoubleSlashes, createURL, decode, decodePath, decodeQueryKey, decodeQueryValue, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, filterQuery, getQuery, hasLeadingSlash, hasProtocol, hasTrailingSlash, isEmptyURL, isEqual, isNonEmptyURL, isRelative, isSamePath, isScriptProtocol, joinRelativeURL, joinURL, normalizeURL, parseAuth, parseFilename, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withBase, withFragment, withHttp, withHttps, withLeadingSlash, withProtocol, withQuery, withTrailingSlash, withoutBase, withoutFragment, withoutHost, withoutLeadingSlash, withoutProtocol, withoutTrailingSlash };\n"],"x_google_ignoreList":[0],"mappings":";AAQA,MAAM,IAAI,OAAO;AAmFjB,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,WAAW;AACjB,MAAM,WAAW;AAEjB,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAExB,MAAM,cAAc;AAEpB,MAAM,eAAe;AAGrB,SAAS,OAAO,MAAM;AACpB,QAAO,UAAU,KAAK,KAAK,CAAC,QAAQ,aAAa,IAAI;;AAKvD,SAAS,iBAAiB,OAAO;AAC/B,QAAO,OAAO,OAAO,UAAU,WAAW,QAAQ,KAAK,UAAU,MAAM,CAAC,CAAC,QAAQ,SAAS,MAAM,CAAC,QAAQ,cAAc,IAAI,CAAC,QAAQ,SAAS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