@kubohiroya/turbowarp-extension-data-editor 0.3.2 → 0.3.4

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.
@@ -420,32 +420,32 @@
420
420
  "bytes": 409,
421
421
  "imports": []
422
422
  },
423
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js": {
424
- "bytes": 20835,
423
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js": {
424
+ "bytes": 22505,
425
425
  "imports": [],
426
426
  "format": "cjs"
427
427
  },
428
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js": {
428
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js": {
429
429
  "bytes": 7367,
430
430
  "imports": [
431
431
  {
432
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js",
432
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js",
433
433
  "kind": "require-call",
434
434
  "original": "./utils"
435
435
  }
436
436
  ],
437
437
  "format": "cjs"
438
438
  },
439
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js": {
440
- "bytes": 22264,
439
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js": {
440
+ "bytes": 25881,
441
441
  "imports": [
442
442
  {
443
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js",
443
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js",
444
444
  "kind": "require-call",
445
445
  "original": "./lib/utils"
446
446
  },
447
447
  {
448
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js",
448
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js",
449
449
  "kind": "require-call",
450
450
  "original": "./lib/schemes"
451
451
  }
@@ -456,7 +456,7 @@
456
456
  "bytes": 218,
457
457
  "imports": [
458
458
  {
459
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js",
459
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js",
460
460
  "kind": "require-call",
461
461
  "original": "fast-uri"
462
462
  }
@@ -1782,7 +1782,7 @@
1782
1782
  "original": "ajv-formats"
1783
1783
  },
1784
1784
  {
1785
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js",
1785
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js",
1786
1786
  "kind": "import-statement",
1787
1787
  "original": "fast-uri"
1788
1788
  },
@@ -14011,7 +14011,7 @@
14011
14011
  "original": "ajv-formats"
14012
14012
  },
14013
14013
  {
14014
- "path": "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js",
14014
+ "path": "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js",
14015
14015
  "kind": "import-statement",
14016
14016
  "original": "fast-uri"
14017
14017
  },
@@ -14361,7 +14361,7 @@
14361
14361
  "kind": "import-statement"
14362
14362
  },
14363
14363
  {
14364
- "path": "dist/webpack4/shared-P2JBRZFP.js",
14364
+ "path": "dist/webpack4/shared-QIOZ73LT.js",
14365
14365
  "kind": "import-statement"
14366
14366
  },
14367
14367
  {
@@ -14369,7 +14369,7 @@
14369
14369
  "kind": "import-statement"
14370
14370
  },
14371
14371
  {
14372
- "path": "dist/webpack4/shared-75QIWLZY.js",
14372
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
14373
14373
  "kind": "import-statement"
14374
14374
  },
14375
14375
  {
@@ -14410,7 +14410,7 @@
14410
14410
  "dist/webpack4/rjsf.js": {
14411
14411
  "imports": [
14412
14412
  {
14413
- "path": "dist/webpack4/shared-P2JBRZFP.js",
14413
+ "path": "dist/webpack4/shared-QIOZ73LT.js",
14414
14414
  "kind": "import-statement"
14415
14415
  },
14416
14416
  {
@@ -14418,11 +14418,11 @@
14418
14418
  "kind": "import-statement"
14419
14419
  },
14420
14420
  {
14421
- "path": "dist/webpack4/shared-GQLPPRT2.js",
14421
+ "path": "dist/webpack4/shared-XTSCVXPA.js",
14422
14422
  "kind": "import-statement"
14423
14423
  },
14424
14424
  {
14425
- "path": "dist/webpack4/shared-75QIWLZY.js",
14425
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
14426
14426
  "kind": "import-statement"
14427
14427
  },
14428
14428
  {
@@ -16861,7 +16861,7 @@
16861
16861
  "kind": "import-statement"
16862
16862
  },
16863
16863
  {
16864
- "path": "dist/webpack4/shared-P2JBRZFP.js",
16864
+ "path": "dist/webpack4/shared-QIOZ73LT.js",
16865
16865
  "kind": "import-statement"
16866
16866
  },
16867
16867
  {
@@ -16869,7 +16869,7 @@
16869
16869
  "kind": "import-statement"
16870
16870
  },
16871
16871
  {
16872
- "path": "dist/webpack4/shared-75QIWLZY.js",
16872
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
16873
16873
  "kind": "import-statement"
16874
16874
  },
16875
16875
  {
@@ -16933,20 +16933,20 @@
16933
16933
  },
16934
16934
  "bytes": 44
16935
16935
  },
16936
- "dist/webpack4/shared-P2JBRZFP.js.map": {
16936
+ "dist/webpack4/shared-QIOZ73LT.js.map": {
16937
16937
  "imports": [],
16938
16938
  "exports": [],
16939
16939
  "inputs": {},
16940
16940
  "bytes": 204661
16941
16941
  },
16942
- "dist/webpack4/shared-P2JBRZFP.js": {
16942
+ "dist/webpack4/shared-QIOZ73LT.js": {
16943
16943
  "imports": [
16944
16944
  {
16945
16945
  "path": "dist/webpack4/shared-BKTRZUZH.js",
16946
16946
  "kind": "import-statement"
16947
16947
  },
16948
16948
  {
16949
- "path": "dist/webpack4/shared-75QIWLZY.js",
16949
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
16950
16950
  "kind": "import-statement"
16951
16951
  }
16952
16952
  ],
@@ -17037,11 +17037,11 @@
17037
17037
  "dist/webpack4/schema.js": {
17038
17038
  "imports": [
17039
17039
  {
17040
- "path": "dist/webpack4/shared-GQLPPRT2.js",
17040
+ "path": "dist/webpack4/shared-XTSCVXPA.js",
17041
17041
  "kind": "import-statement"
17042
17042
  },
17043
17043
  {
17044
- "path": "dist/webpack4/shared-75QIWLZY.js",
17044
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
17045
17045
  "kind": "import-statement"
17046
17046
  },
17047
17047
  {
@@ -17061,16 +17061,16 @@
17061
17061
  "inputs": {},
17062
17062
  "bytes": 429
17063
17063
  },
17064
- "dist/webpack4/shared-GQLPPRT2.js.map": {
17064
+ "dist/webpack4/shared-XTSCVXPA.js.map": {
17065
17065
  "imports": [],
17066
17066
  "exports": [],
17067
17067
  "inputs": {},
17068
17068
  "bytes": 15466
17069
17069
  },
17070
- "dist/webpack4/shared-GQLPPRT2.js": {
17070
+ "dist/webpack4/shared-XTSCVXPA.js": {
17071
17071
  "imports": [
17072
17072
  {
17073
- "path": "dist/webpack4/shared-75QIWLZY.js",
17073
+ "path": "dist/webpack4/shared-MX5ESFJ6.js",
17074
17074
  "kind": "import-statement"
17075
17075
  }
17076
17076
  ],
@@ -17093,13 +17093,13 @@
17093
17093
  },
17094
17094
  "bytes": 8282
17095
17095
  },
17096
- "dist/webpack4/shared-75QIWLZY.js.map": {
17096
+ "dist/webpack4/shared-MX5ESFJ6.js.map": {
17097
17097
  "imports": [],
17098
17098
  "exports": [],
17099
17099
  "inputs": {},
17100
- "bytes": 526658
17100
+ "bytes": 533661
17101
17101
  },
17102
- "dist/webpack4/shared-75QIWLZY.js": {
17102
+ "dist/webpack4/shared-MX5ESFJ6.js": {
17103
17103
  "imports": [
17104
17104
  {
17105
17105
  "path": "dist/webpack4/shared-RN7GOT65.js",
@@ -17186,14 +17186,14 @@
17186
17186
  "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json": {
17187
17187
  "bytesInOutput": 591
17188
17188
  },
17189
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js": {
17190
- "bytesInOutput": 17796
17189
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js": {
17190
+ "bytesInOutput": 18822
17191
17191
  },
17192
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js": {
17192
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js": {
17193
17193
  "bytesInOutput": 6612
17194
17194
  },
17195
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js": {
17196
- "bytesInOutput": 17707
17195
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js": {
17196
+ "bytesInOutput": 19157
17197
17197
  },
17198
17198
  "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js": {
17199
17199
  "bytesInOutput": 328
@@ -17412,7 +17412,7 @@
17412
17412
  "bytesInOutput": 698
17413
17413
  }
17414
17414
  },
17415
- "bytes": 328868
17415
+ "bytes": 331344
17416
17416
  },
17417
17417
  "dist/webpack4/shared-RN7GOT65.js.map": {
17418
17418
  "imports": [],
@@ -2,14 +2,14 @@ import {
2
2
  EditorRegistry,
3
3
  cloneJson,
4
4
  createFixedInputEditor
5
- } from "./shared-P2JBRZFP.js";
5
+ } from "./shared-QIOZ73LT.js";
6
6
  import {
7
7
  EDITOR_API_VERSION
8
8
  } from "./shared-BKTRZUZH.js";
9
9
  import {
10
10
  toValidationIssues,
11
11
  validateSchemaInput
12
- } from "./shared-GQLPPRT2.js";
12
+ } from "./shared-XTSCVXPA.js";
13
13
  import {
14
14
  compileSchemaBundle,
15
15
  isJsonRecord,
@@ -20,7 +20,7 @@ import {
20
20
  require_dist,
21
21
  require_fast_uri,
22
22
  snapshotJson
23
- } from "./shared-75QIWLZY.js";
23
+ } from "./shared-MX5ESFJ6.js";
24
24
  import {
25
25
  __commonJS,
26
26
  __export,
@@ -3,11 +3,11 @@ import {
3
3
  jsonValueSchemaBundle,
4
4
  toValidationIssues,
5
5
  validateSchemaInput
6
- } from "./shared-GQLPPRT2.js";
6
+ } from "./shared-XTSCVXPA.js";
7
7
  import {
8
8
  compileSchemaBundle,
9
9
  parseFixedNumberInput
10
- } from "./shared-75QIWLZY.js";
10
+ } from "./shared-MX5ESFJ6.js";
11
11
  import "./shared-RN7GOT65.js";
12
12
  export {
13
13
  compileSchemaBundle,
@@ -3073,9 +3073,9 @@ var require_data = __commonJS({
3073
3073
  }
3074
3074
  });
3075
3075
 
3076
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js
3076
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js
3077
3077
  var require_utils = __commonJS({
3078
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js"(exports, module) {
3078
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js"(exports, module) {
3079
3079
  "use strict";
3080
3080
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3081
3081
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3307,6 +3307,37 @@ var require_utils = __commonJS({
3307
3307
  }
3308
3308
  return output.join("");
3309
3309
  }
3310
+ function removeDotSegmentsRelative(path) {
3311
+ if (path === "" || path[0] === "/") {
3312
+ return removeDotSegments(path);
3313
+ }
3314
+ const segments = path.split("/");
3315
+ const last = segments.length - 1;
3316
+ const output = [];
3317
+ let trailingDirectory = false;
3318
+ for (let i = 0; i <= last; i++) {
3319
+ const segment = segments[i];
3320
+ if (segment === "." || segment === "..") {
3321
+ if (segment === "..") {
3322
+ if (output.length !== 0 && output[output.length - 1] !== "..") {
3323
+ output.pop();
3324
+ } else {
3325
+ output.push("..");
3326
+ }
3327
+ }
3328
+ trailingDirectory = i === last;
3329
+ } else {
3330
+ output.push(segment);
3331
+ }
3332
+ }
3333
+ if (trailingDirectory && output[output.length - 1] !== "..") {
3334
+ output.push("");
3335
+ }
3336
+ if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
3337
+ output.unshift(".");
3338
+ }
3339
+ return output.join("/");
3340
+ }
3310
3341
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3311
3342
  var HOST_DELIM_RE = /[@/?#:]/g;
3312
3343
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -3567,6 +3598,7 @@ var require_utils = __commonJS({
3567
3598
  encodeFragment,
3568
3599
  escapePreservingEscapes,
3569
3600
  removeDotSegments,
3601
+ removeDotSegmentsRelative,
3570
3602
  isIPv4,
3571
3603
  isUUID,
3572
3604
  normalizeIPv6,
@@ -3575,9 +3607,9 @@ var require_utils = __commonJS({
3575
3607
  }
3576
3608
  });
3577
3609
 
3578
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
3610
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js
3579
3611
  var require_schemes = __commonJS({
3580
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3612
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3581
3613
  "use strict";
3582
3614
  var { isUUID } = require_utils();
3583
3615
  var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
@@ -3786,20 +3818,22 @@ var require_schemes = __commonJS({
3786
3818
  }
3787
3819
  });
3788
3820
 
3789
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
3821
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js
3790
3822
  var require_fast_uri = __commonJS({
3791
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js"(exports, module) {
3823
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js"(exports, module) {
3792
3824
  "use strict";
3793
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3825
+ var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3794
3826
  var { SCHEMES, getSchemeHandler } = require_schemes();
3795
3827
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3796
3828
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
3797
- function decodeValidScheme(scheme) {
3798
- const decodedScheme = unescape(String(scheme));
3799
- if (!VALID_SCHEME.test(decodedScheme)) {
3829
+ var MALFORMED_HOST_ERROR = "URI host is malformed.";
3830
+ var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
3831
+ function validateScheme(scheme) {
3832
+ const stringScheme = String(scheme);
3833
+ if (!VALID_SCHEME.test(stringScheme)) {
3800
3834
  throw new TypeError(MALFORMED_SCHEME_ERROR);
3801
3835
  }
3802
- return decodedScheme;
3836
+ return stringScheme;
3803
3837
  }
3804
3838
  function normalize2(uri2, options) {
3805
3839
  if (typeof uri2 === "string") {
@@ -3836,6 +3870,9 @@ var require_fast_uri = __commonJS({
3836
3870
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
3837
3871
  const resolvedHost = resolved.host;
3838
3872
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
3873
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
3874
+ throw new Error(MALFORMED_HOST_ERROR);
3875
+ }
3839
3876
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
3840
3877
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
3841
3878
  if (resolved.error && !encodedASCIIHost) {
@@ -3877,14 +3914,15 @@ var require_fast_uri = __commonJS({
3877
3914
  if (relative.path[0] === "/") {
3878
3915
  target.path = removeDotSegments(relative.path);
3879
3916
  } else {
3880
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
3917
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
3918
+ if (baseHasAuthority && !base.path) {
3881
3919
  target.path = "/" + relative.path;
3882
3920
  } else if (!base.path) {
3883
3921
  target.path = relative.path;
3884
3922
  } else {
3885
3923
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
3886
3924
  }
3887
- target.path = removeDotSegments(target.path);
3925
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
3888
3926
  }
3889
3927
  target.query = relative.query;
3890
3928
  }
@@ -3922,12 +3960,13 @@ var require_fast_uri = __commonJS({
3922
3960
  const options = Object.assign({}, opts);
3923
3961
  const uriTokens = [];
3924
3962
  if (component.scheme) {
3925
- component.scheme = decodeValidScheme(component.scheme);
3963
+ component.scheme = validateScheme(component.scheme);
3926
3964
  }
3927
3965
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3928
3966
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3929
3967
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3930
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3968
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
3969
+ const pathNoScheme = !options.skipEscape && schemelessReference;
3931
3970
  if (component.path !== void 0) {
3932
3971
  if (!options.skipEscape) {
3933
3972
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -3936,7 +3975,7 @@ var require_fast_uri = __commonJS({
3936
3975
  }
3937
3976
  }
3938
3977
  if (options.reference !== "suffix" && component.scheme) {
3939
- component.scheme = decodeValidScheme(component.scheme);
3978
+ component.scheme = validateScheme(component.scheme);
3940
3979
  uriTokens.push(component.scheme, ":");
3941
3980
  }
3942
3981
  const authority = recomposeAuthority(component);
@@ -3952,9 +3991,9 @@ var require_fast_uri = __commonJS({
3952
3991
  if (component.path !== void 0) {
3953
3992
  let s = component.path;
3954
3993
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
3955
- s = removeDotSegments(s);
3994
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
3956
3995
  }
3957
- if (pathNoScheme) {
3996
+ if (schemelessReference) {
3958
3997
  s = serializePathEncoding(s, true);
3959
3998
  }
3960
3999
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -4001,16 +4040,34 @@ var require_fast_uri = __commonJS({
4001
4040
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4002
4041
  }
4003
4042
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
4043
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
4044
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4045
+ return true;
4046
+ }
4004
4047
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4048
+ let url;
4005
4049
  try {
4006
- parsed.host = new URL("http://" + parsed.host).hostname;
4050
+ url = new URL("http://" + parsed.host);
4007
4051
  } catch (e) {
4008
4052
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
4009
4053
  return true;
4010
4054
  }
4055
+ if (!isHostOnlyURL(url)) {
4056
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4057
+ return true;
4058
+ }
4059
+ parsed.host = url.hostname;
4011
4060
  }
4012
4061
  return false;
4013
4062
  }
4063
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
4064
+ return Boolean(
4065
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
4066
+ );
4067
+ }
4068
+ function isHostOnlyURL(url) {
4069
+ return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
4070
+ }
4014
4071
  function parseWithStatus(uri2, opts) {
4015
4072
  const options = Object.assign({}, opts);
4016
4073
  const parsed = {
@@ -4065,9 +4122,8 @@ var require_fast_uri = __commonJS({
4065
4122
  parsed.query = matches[7];
4066
4123
  parsed.fragment = matches[8];
4067
4124
  if (parsed.scheme !== void 0) {
4068
- const decodedScheme = unescape(parsed.scheme);
4069
- if (VALID_SCHEME.test(decodedScheme)) {
4070
- parsed.scheme = decodedScheme.toLowerCase();
4125
+ if (VALID_SCHEME.test(parsed.scheme)) {
4126
+ parsed.scheme = parsed.scheme.toLowerCase();
4071
4127
  } else {
4072
4128
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
4073
4129
  malformedScheme = true;
@@ -4095,7 +4151,7 @@ var require_fast_uri = __commonJS({
4095
4151
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
4096
4152
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
4097
4153
  if (malformedIPLiteral) {
4098
- parsed.error = parsed.error || "URI host is malformed.";
4154
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4099
4155
  malformedAuthorityOrPort = true;
4100
4156
  }
4101
4157
  } else {
@@ -4123,7 +4179,7 @@ var require_fast_uri = __commonJS({
4123
4179
  if (!isIP) {
4124
4180
  host = normalizePercentEncoding(host.toLowerCase());
4125
4181
  }
4126
- parsed.host = reescapeHostDelimiters(host, isIP);
4182
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
4127
4183
  }
4128
4184
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4129
4185
  if (parsed.path) {
@@ -8372,4 +8428,4 @@ export {
8372
8428
  compileSchemaBundle,
8373
8429
  parseFixedNumberInput
8374
8430
  };
8375
- //# sourceMappingURL=shared-75QIWLZY.js.map
8431
+ //# sourceMappingURL=shared-MX5ESFJ6.js.map