@forsakringskassan/vite-lib-config 4.2.4 → 4.3.1

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.
@@ -4,7 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require2() {
7
+ var __commonJS = (cb, mod) => function __require() {
8
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
9
  };
10
10
  var __export = (target, all) => {
@@ -763,7 +763,7 @@ var require_cjs = __commonJS({
763
763
  return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
764
764
  }
765
765
  var canUseSymbol = typeof Symbol === "function" && Symbol.for;
766
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
766
+ var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
767
767
  function isReactElement(value) {
768
768
  return value.$$typeof === REACT_ELEMENT_TYPE;
769
769
  }
@@ -871,10 +871,10 @@ var require_picocolors = __commonJS({
871
871
  } while (~index);
872
872
  return result + string.substring(cursor);
873
873
  };
874
- var createColors = (enabled = isColorSupported) => {
875
- let f = enabled ? formatter : () => String;
874
+ var createColors = (enabled2 = isColorSupported) => {
875
+ let f = enabled2 ? formatter : () => String;
876
876
  return {
877
- isColorSupported: enabled,
877
+ isColorSupported: enabled2,
878
878
  reset: f("\x1B[0m", "\x1B[0m"),
879
879
  bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
880
880
  dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
@@ -1381,7 +1381,7 @@ var require_parse = __commonJS({
1381
1381
  "node_modules/semver/functions/parse.js"(exports2, module2) {
1382
1382
  "use strict";
1383
1383
  var SemVer = require_semver();
1384
- var parse = (version3, options, throwErrors = false) => {
1384
+ var parse2 = (version3, options, throwErrors = false) => {
1385
1385
  if (version3 instanceof SemVer) {
1386
1386
  return version3;
1387
1387
  }
@@ -1394,7 +1394,7 @@ var require_parse = __commonJS({
1394
1394
  throw er;
1395
1395
  }
1396
1396
  };
1397
- module2.exports = parse;
1397
+ module2.exports = parse2;
1398
1398
  }
1399
1399
  });
1400
1400
 
@@ -1402,9 +1402,9 @@ var require_parse = __commonJS({
1402
1402
  var require_valid = __commonJS({
1403
1403
  "node_modules/semver/functions/valid.js"(exports2, module2) {
1404
1404
  "use strict";
1405
- var parse = require_parse();
1405
+ var parse2 = require_parse();
1406
1406
  var valid = (version3, options) => {
1407
- const v = parse(version3, options);
1407
+ const v = parse2(version3, options);
1408
1408
  return v ? v.version : null;
1409
1409
  };
1410
1410
  module2.exports = valid;
@@ -1415,9 +1415,9 @@ var require_valid = __commonJS({
1415
1415
  var require_clean = __commonJS({
1416
1416
  "node_modules/semver/functions/clean.js"(exports2, module2) {
1417
1417
  "use strict";
1418
- var parse = require_parse();
1418
+ var parse2 = require_parse();
1419
1419
  var clean = (version3, options) => {
1420
- const s = parse(version3.trim().replace(/^[=v]+/, ""), options);
1420
+ const s = parse2(version3.trim().replace(/^[=v]+/, ""), options);
1421
1421
  return s ? s.version : null;
1422
1422
  };
1423
1423
  module2.exports = clean;
@@ -1452,10 +1452,10 @@ var require_inc = __commonJS({
1452
1452
  var require_diff = __commonJS({
1453
1453
  "node_modules/semver/functions/diff.js"(exports2, module2) {
1454
1454
  "use strict";
1455
- var parse = require_parse();
1455
+ var parse2 = require_parse();
1456
1456
  var diff = (version1, version22) => {
1457
- const v1 = parse(version1, null, true);
1458
- const v2 = parse(version22, null, true);
1457
+ const v1 = parse2(version1, null, true);
1458
+ const v2 = parse2(version22, null, true);
1459
1459
  const comparison = v1.compare(v2);
1460
1460
  if (comparison === 0) {
1461
1461
  return null;
@@ -1526,9 +1526,9 @@ var require_patch = __commonJS({
1526
1526
  var require_prerelease = __commonJS({
1527
1527
  "node_modules/semver/functions/prerelease.js"(exports2, module2) {
1528
1528
  "use strict";
1529
- var parse = require_parse();
1529
+ var parse2 = require_parse();
1530
1530
  var prerelease = (version3, options) => {
1531
- const parsed = parse(version3, options);
1531
+ const parsed = parse2(version3, options);
1532
1532
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
1533
1533
  };
1534
1534
  module2.exports = prerelease;
@@ -1714,9 +1714,9 @@ var require_coerce = __commonJS({
1714
1714
  "node_modules/semver/functions/coerce.js"(exports2, module2) {
1715
1715
  "use strict";
1716
1716
  var SemVer = require_semver();
1717
- var parse = require_parse();
1717
+ var parse2 = require_parse();
1718
1718
  var { safeRe: re, t } = require_re();
1719
- var coerce = (version3, options) => {
1719
+ var coerce2 = (version3, options) => {
1720
1720
  if (version3 instanceof SemVer) {
1721
1721
  return version3;
1722
1722
  }
@@ -1749,9 +1749,9 @@ var require_coerce = __commonJS({
1749
1749
  const patch = match2[4] || "0";
1750
1750
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
1751
1751
  const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
1752
- return parse(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
1752
+ return parse2(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
1753
1753
  };
1754
- module2.exports = coerce;
1754
+ module2.exports = coerce2;
1755
1755
  }
1756
1756
  });
1757
1757
 
@@ -2174,7 +2174,7 @@ var require_range = __commonJS({
2174
2174
  var require_comparator = __commonJS({
2175
2175
  "node_modules/semver/classes/comparator.js"(exports2, module2) {
2176
2176
  "use strict";
2177
- var ANY = Symbol("SemVer ANY");
2177
+ var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
2178
2178
  var Comparator = class _Comparator {
2179
2179
  static get ANY() {
2180
2180
  return ANY;
@@ -2766,7 +2766,7 @@ var require_semver2 = __commonJS({
2766
2766
  var constants = require_constants();
2767
2767
  var SemVer = require_semver();
2768
2768
  var identifiers = require_identifiers();
2769
- var parse = require_parse();
2769
+ var parse2 = require_parse();
2770
2770
  var valid = require_valid();
2771
2771
  var clean = require_clean();
2772
2772
  var inc = require_inc();
@@ -2788,7 +2788,7 @@ var require_semver2 = __commonJS({
2788
2788
  var gte2 = require_gte();
2789
2789
  var lte2 = require_lte();
2790
2790
  var cmp = require_cmp();
2791
- var coerce = require_coerce();
2791
+ var coerce2 = require_coerce();
2792
2792
  var Comparator = require_comparator();
2793
2793
  var Range = require_range();
2794
2794
  var satisfies = require_satisfies();
@@ -2804,7 +2804,7 @@ var require_semver2 = __commonJS({
2804
2804
  var simplifyRange = require_simplify();
2805
2805
  var subset = require_subset();
2806
2806
  module2.exports = {
2807
- parse,
2807
+ parse: parse2,
2808
2808
  valid,
2809
2809
  clean,
2810
2810
  inc,
@@ -2826,7 +2826,7 @@ var require_semver2 = __commonJS({
2826
2826
  gte: gte2,
2827
2827
  lte: lte2,
2828
2828
  cmp,
2829
- coerce,
2829
+ coerce: coerce2,
2830
2830
  Comparator,
2831
2831
  Range,
2832
2832
  satisfies,
@@ -2865,13 +2865,13 @@ module.exports = __toCommonJS(vite_config_exports);
2865
2865
  var import_apimock_express = require("@forsakringskassan/apimock-express");
2866
2866
  var import_ufuzzy = __toESM(require_uFuzzy());
2867
2867
 
2868
- // node_modules/@vitejs/plugin-vue/dist/index.js
2868
+ // node_modules/@vitejs/plugin-vue/dist/index.mjs
2869
2869
  var import_node_module = require("node:module");
2870
2870
  var import_node_fs = __toESM(require("node:fs"), 1);
2871
2871
  var import_vite = require("vite");
2872
2872
  var import_vue = require("vue");
2873
2873
 
2874
- // node_modules/@rolldown/pluginutils/dist/index.js
2874
+ // node_modules/@rolldown/pluginutils/dist/simple-filters.js
2875
2875
  function exactRegex(str, flags) {
2876
2876
  return new RegExp(`^${escapeRegex(str)}$`, flags);
2877
2877
  }
@@ -2880,45 +2880,35 @@ function escapeRegex(str) {
2880
2880
  return str.replace(escapeRegexRE, "\\$&");
2881
2881
  }
2882
2882
  function makeIdFiltersToMatchWithQuery(input) {
2883
- if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
2883
+ if (!Array.isArray(input)) {
2884
+ return makeIdFilterToMatchWithQuery(
2885
+ // Array.isArray cannot narrow the type
2886
+ // https://github.com/microsoft/TypeScript/issues/17002
2887
+ input
2888
+ );
2889
+ }
2884
2890
  return input.map((i) => makeIdFilterToMatchWithQuery(i));
2885
2891
  }
2886
2892
  function makeIdFilterToMatchWithQuery(input) {
2887
- if (typeof input === "string") return `${input}{?*,}`;
2893
+ if (typeof input === "string") {
2894
+ return `${input}{?*,}`;
2895
+ }
2888
2896
  return makeRegexIdFilterToMatchWithQuery(input);
2889
2897
  }
2890
2898
  function makeRegexIdFilterToMatchWithQuery(input) {
2891
- return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
2899
+ return new RegExp(
2900
+ // replace `$` with `(?:\?.*)?$` (ignore `\$`)
2901
+ input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"),
2902
+ input.flags
2903
+ );
2892
2904
  }
2893
2905
 
2894
- // node_modules/@vitejs/plugin-vue/dist/index.js
2906
+ // node_modules/@vitejs/plugin-vue/dist/index.mjs
2895
2907
  var import_node_path = __toESM(require("node:path"), 1);
2896
2908
  var import_node_crypto = __toESM(require("node:crypto"), 1);
2897
- var __create2 = Object.create;
2898
- var __defProp2 = Object.defineProperty;
2899
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
2900
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
2901
- var __getProtoOf2 = Object.getPrototypeOf;
2902
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
2903
- var __commonJS2 = (cb, mod) => function() {
2904
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
2905
- };
2906
- var __copyProps2 = (to, from, except, desc) => {
2907
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames2(from), i = 0, n = keys.length, key; i < n; i++) {
2908
- key = keys[i];
2909
- if (!__hasOwnProp2.call(to, key) && key !== except) __defProp2(to, key, {
2910
- get: ((k) => from[k]).bind(null, key),
2911
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
2912
- });
2913
- }
2914
- return to;
2915
- };
2916
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
2917
- value: mod,
2918
- enumerable: true
2919
- }) : target, mod));
2920
- var __require = /* @__PURE__ */ (0, import_node_module.createRequire)(__filename);
2921
- var version = "6.0.1";
2909
+ var import_node_tty = require("node:tty");
2910
+ var import_node_util = require("node:util");
2911
+ var version = "6.0.3";
2922
2912
  function resolveCompiler(root) {
2923
2913
  const compiler = tryResolveCompiler(root) || tryResolveCompiler();
2924
2914
  if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
@@ -3016,8 +3006,7 @@ function getHash(text) {
3016
3006
  return import_node_crypto.default.hash("sha256", text, "hex").substring(0, 8);
3017
3007
  }
3018
3008
  function slash(path$1) {
3019
- const isExtendedLengthPath = path$1.startsWith("\\\\?\\");
3020
- if (isExtendedLengthPath) return path$1;
3009
+ if (path$1.startsWith("\\\\?\\")) return path$1;
3021
3010
  return path$1.replace(/\\/g, "/");
3022
3011
  }
3023
3012
  function createRollupError(id, error) {
@@ -3075,7 +3064,7 @@ function resolveTemplateCompilerOptions(descriptor, options, filename, ssr) {
3075
3064
  const block = descriptor.template;
3076
3065
  if (!block) return;
3077
3066
  const resolvedScript = getResolvedScript(descriptor, ssr);
3078
- const hasScoped = descriptor.styles.some((s$1) => s$1.scoped);
3067
+ const hasScoped = descriptor.styles.some((s) => s.scoped);
3079
3068
  const { id, cssVars } = descriptor;
3080
3069
  let transformAssetUrls = options.template?.transformAssetUrls;
3081
3070
  let assetUrlOptions;
@@ -3199,7 +3188,7 @@ var semicolon = ";".charCodeAt(0);
3199
3188
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3200
3189
  var intToChar = new Uint8Array(64);
3201
3190
  var charToInt = new Uint8Array(128);
3202
- for (let i = 0; i < 64; i++) {
3191
+ for (let i = 0; i < chars.length; i++) {
3203
3192
  const c = chars.charCodeAt(i);
3204
3193
  intToChar[i] = c;
3205
3194
  charToInt[c] = i;
@@ -3209,8 +3198,7 @@ function decodeInteger(reader, relative) {
3209
3198
  let shift = 0;
3210
3199
  let integer = 0;
3211
3200
  do {
3212
- const c = reader.next();
3213
- integer = charToInt[c];
3201
+ integer = charToInt[reader.next()];
3214
3202
  value |= (integer & 31) << shift;
3215
3203
  shift += 5;
3216
3204
  } while (integer & 32);
@@ -3236,8 +3224,7 @@ function hasMoreVlq(reader, max) {
3236
3224
  }
3237
3225
  var bufLength = 1024 * 16;
3238
3226
  var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
3239
- const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
3240
- return out.toString();
3227
+ return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
3241
3228
  } } : { decode(buf) {
3242
3229
  let out = "";
3243
3230
  for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
@@ -3542,18 +3529,18 @@ function memoizedState() {
3542
3529
  lastIndex: -1
3543
3530
  };
3544
3531
  }
3545
- function parse$1(map) {
3532
+ function parse(map) {
3546
3533
  return typeof map === "string" ? JSON.parse(map) : map;
3547
3534
  }
3548
3535
  var TraceMap = class {
3549
3536
  constructor(map, mapUrl) {
3550
3537
  const isString = typeof map === "string";
3551
3538
  if (!isString && map._decodedMemo) return map;
3552
- const parsed = parse$1(map);
3553
- const { version: version$1, file, names, sourceRoot, sources, sourcesContent } = parsed;
3539
+ const parsed = parse(map);
3540
+ const { version: version$1, file, names: names$1, sourceRoot, sources, sourcesContent } = parsed;
3554
3541
  this.version = version$1;
3555
3542
  this.file = file;
3556
- this.names = names || [];
3543
+ this.names = names$1 || [];
3557
3544
  this.sourceRoot = sourceRoot;
3558
3545
  this.sources = sources;
3559
3546
  this.sourcesContent = sourcesContent;
@@ -3583,7 +3570,7 @@ function decodedMappings(map) {
3583
3570
  }
3584
3571
  function eachMapping(map, cb) {
3585
3572
  const decoded = decodedMappings(map);
3586
- const { names, resolvedSources } = map;
3573
+ const { names: names$1, resolvedSources } = map;
3587
3574
  for (let i = 0; i < decoded.length; i++) {
3588
3575
  const line = decoded[i];
3589
3576
  for (let j = 0; j < line.length; j++) {
@@ -3599,7 +3586,7 @@ function eachMapping(map, cb) {
3599
3586
  originalLine = seg[2] + 1;
3600
3587
  originalColumn = seg[3];
3601
3588
  }
3602
- if (seg.length === 5) name = names[seg[4]];
3589
+ if (seg.length === 5) name = names$1[seg[4]];
3603
3590
  cb({
3604
3591
  generatedLine,
3605
3592
  generatedColumn,
@@ -3627,8 +3614,7 @@ function put(setarr, key) {
3627
3614
  const index = get(setarr, key);
3628
3615
  if (index !== void 0) return index;
3629
3616
  const { array, _indexes: indexes } = cast(setarr);
3630
- const length = array.push(key);
3631
- return indexes[key] = length - 1;
3617
+ return indexes[key] = array.push(key) - 1;
3632
3618
  }
3633
3619
  var COLUMN = 0;
3634
3620
  var SOURCES_INDEX = 1;
@@ -3654,12 +3640,12 @@ function addMapping(map, mapping2) {
3654
3640
  return addMappingInternal(false, map, mapping2);
3655
3641
  }
3656
3642
  function toDecodedMap(map) {
3657
- const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList$1 } = cast2(map);
3643
+ const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names$1, _ignoreList: ignoreList$1 } = cast2(map);
3658
3644
  removeEmptyFinalLines(mappings);
3659
3645
  return {
3660
3646
  version: 3,
3661
3647
  file: map.file || void 0,
3662
- names: names.array,
3648
+ names: names$1.array,
3663
3649
  sourceRoot: map.sourceRoot || void 0,
3664
3650
  sources: sources.array,
3665
3651
  sourcesContent,
@@ -3685,7 +3671,7 @@ function fromMap(input) {
3685
3671
  return gen;
3686
3672
  }
3687
3673
  function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
3688
- const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map);
3674
+ const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names$1 } = cast2(map);
3689
3675
  const line = getIndex(mappings, genLine);
3690
3676
  const index = getColumnIndex(line, genColumn);
3691
3677
  if (!source) {
@@ -3695,7 +3681,7 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
3695
3681
  assert(sourceLine);
3696
3682
  assert(sourceColumn);
3697
3683
  const sourcesIndex = put(sources, source);
3698
- const namesIndex = name ? put(names, name) : NO_NAME;
3684
+ const namesIndex = name ? put(names$1, name) : NO_NAME;
3699
3685
  if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
3700
3686
  if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
3701
3687
  return insert(line, index, name ? [
@@ -3719,10 +3705,7 @@ function getIndex(arr, index) {
3719
3705
  }
3720
3706
  function getColumnIndex(line, genColumn) {
3721
3707
  let index = line.length;
3722
- for (let i = index - 1; i >= 0; index = i--) {
3723
- const current = line[i];
3724
- if (genColumn >= current[COLUMN]) break;
3725
- }
3708
+ for (let i = index - 1; i >= 0; index = i--) if (genColumn >= line[i][COLUMN]) break;
3726
3709
  return index;
3727
3710
  }
3728
3711
  function insert(array, index, value) {
@@ -3740,8 +3723,7 @@ function putAll(setarr, array) {
3740
3723
  }
3741
3724
  function skipSourceless(line, index) {
3742
3725
  if (index === 0) return true;
3743
- const prev = line[index - 1];
3744
- return prev.length === 1;
3726
+ return line[index - 1].length === 1;
3745
3727
  }
3746
3728
  function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
3747
3729
  if (index === 0) return false;
@@ -3755,402 +3737,272 @@ function addMappingInternal(skipable, map, mapping2) {
3755
3737
  assert(original);
3756
3738
  return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
3757
3739
  }
3758
- var require_ms = __commonJS2({ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
3759
- var s = 1e3;
3760
- var m = s * 60;
3761
- var h = m * 60;
3762
- var d = h * 24;
3763
- var w = d * 7;
3764
- var y = d * 365.25;
3765
- module2.exports = function(val, options) {
3766
- options = options || {};
3767
- var type = typeof val;
3768
- if (type === "string" && val.length > 0) return parse(val);
3769
- else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
3770
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
3771
- };
3772
- function parse(str) {
3773
- str = String(str);
3774
- if (str.length > 100) return;
3775
- var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
3776
- if (!match2) return;
3777
- var n = parseFloat(match2[1]);
3778
- var type = (match2[2] || "ms").toLowerCase();
3779
- switch (type) {
3780
- case "years":
3781
- case "year":
3782
- case "yrs":
3783
- case "yr":
3784
- case "y":
3785
- return n * y;
3786
- case "weeks":
3787
- case "week":
3788
- case "w":
3789
- return n * w;
3790
- case "days":
3791
- case "day":
3792
- case "d":
3793
- return n * d;
3794
- case "hours":
3795
- case "hour":
3796
- case "hrs":
3797
- case "hr":
3798
- case "h":
3799
- return n * h;
3800
- case "minutes":
3801
- case "minute":
3802
- case "mins":
3803
- case "min":
3804
- case "m":
3805
- return n * m;
3806
- case "seconds":
3807
- case "second":
3808
- case "secs":
3809
- case "sec":
3810
- case "s":
3811
- return n * s;
3812
- case "milliseconds":
3813
- case "millisecond":
3814
- case "msecs":
3815
- case "msec":
3816
- case "ms":
3817
- return n;
3818
- default:
3819
- return void 0;
3820
- }
3821
- }
3822
- function fmtShort(ms) {
3823
- var msAbs = Math.abs(ms);
3824
- if (msAbs >= d) return Math.round(ms / d) + "d";
3825
- if (msAbs >= h) return Math.round(ms / h) + "h";
3826
- if (msAbs >= m) return Math.round(ms / m) + "m";
3827
- if (msAbs >= s) return Math.round(ms / s) + "s";
3828
- return ms + "ms";
3829
- }
3830
- function fmtLong(ms) {
3831
- var msAbs = Math.abs(ms);
3832
- if (msAbs >= d) return plural(ms, msAbs, d, "day");
3833
- if (msAbs >= h) return plural(ms, msAbs, h, "hour");
3834
- if (msAbs >= m) return plural(ms, msAbs, m, "minute");
3835
- if (msAbs >= s) return plural(ms, msAbs, s, "second");
3836
- return ms + " ms";
3837
- }
3838
- function plural(ms, msAbs, n, name) {
3839
- var isPlural = msAbs >= n * 1.5;
3840
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
3841
- }
3842
- } });
3843
- var require_common = __commonJS2({ "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js"(exports2, module2) {
3844
- function setup(env) {
3845
- createDebug.debug = createDebug;
3846
- createDebug.default = createDebug;
3847
- createDebug.coerce = coerce;
3848
- createDebug.disable = disable;
3849
- createDebug.enable = enable;
3850
- createDebug.enabled = enabled;
3851
- createDebug.humanize = require_ms();
3852
- createDebug.destroy = destroy;
3853
- Object.keys(env).forEach((key) => {
3854
- createDebug[key] = env[key];
3855
- });
3856
- createDebug.names = [];
3857
- createDebug.skips = [];
3858
- createDebug.formatters = {};
3859
- function selectColor(namespace) {
3860
- let hash = 0;
3861
- for (let i = 0; i < namespace.length; i++) {
3862
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
3863
- hash |= 0;
3864
- }
3865
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
3866
- }
3867
- createDebug.selectColor = selectColor;
3868
- function createDebug(namespace) {
3869
- let prevTime;
3870
- let enableOverride = null;
3871
- let namespacesCache;
3872
- let enabledCache;
3873
- function debug$1(...args) {
3874
- if (!debug$1.enabled) return;
3875
- const self = debug$1;
3876
- const curr = Number(/* @__PURE__ */ new Date());
3877
- const ms = curr - (prevTime || curr);
3878
- self.diff = ms;
3879
- self.prev = prevTime;
3880
- self.curr = curr;
3881
- prevTime = curr;
3882
- args[0] = createDebug.coerce(args[0]);
3883
- if (typeof args[0] !== "string") args.unshift("%O");
3884
- let index = 0;
3885
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format) => {
3886
- if (match2 === "%%") return "%";
3887
- index++;
3888
- const formatter = createDebug.formatters[format];
3889
- if (typeof formatter === "function") {
3890
- const val = args[index];
3891
- match2 = formatter.call(self, val);
3892
- args.splice(index, 1);
3893
- index--;
3894
- }
3895
- return match2;
3896
- });
3897
- createDebug.formatArgs.call(self, args);
3898
- const logFn = self.log || createDebug.log;
3899
- logFn.apply(self, args);
3900
- }
3901
- debug$1.namespace = namespace;
3902
- debug$1.useColors = createDebug.useColors();
3903
- debug$1.color = createDebug.selectColor(namespace);
3904
- debug$1.extend = extend;
3905
- debug$1.destroy = createDebug.destroy;
3906
- Object.defineProperty(debug$1, "enabled", {
3907
- enumerable: true,
3908
- configurable: false,
3909
- get: () => {
3910
- if (enableOverride !== null) return enableOverride;
3911
- if (namespacesCache !== createDebug.namespaces) {
3912
- namespacesCache = createDebug.namespaces;
3913
- enabledCache = createDebug.enabled(namespace);
3914
- }
3915
- return enabledCache;
3916
- },
3917
- set: (v) => {
3918
- enableOverride = v;
3919
- }
3920
- });
3921
- if (typeof createDebug.init === "function") createDebug.init(debug$1);
3922
- return debug$1;
3923
- }
3924
- function extend(namespace, delimiter) {
3925
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
3926
- newDebug.log = this.log;
3927
- return newDebug;
3928
- }
3929
- function enable(namespaces) {
3930
- createDebug.save(namespaces);
3931
- createDebug.namespaces = namespaces;
3932
- createDebug.names = [];
3933
- createDebug.skips = [];
3934
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
3935
- for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
3936
- else createDebug.names.push(ns);
3937
- }
3938
- function matchesTemplate(search, template) {
3939
- let searchIndex = 0;
3940
- let templateIndex = 0;
3941
- let starIndex = -1;
3942
- let matchIndex = 0;
3943
- while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
3944
- starIndex = templateIndex;
3945
- matchIndex = searchIndex;
3946
- templateIndex++;
3947
- } else {
3948
- searchIndex++;
3949
- templateIndex++;
3950
- }
3951
- else if (starIndex !== -1) {
3952
- templateIndex = starIndex + 1;
3953
- matchIndex++;
3954
- searchIndex = matchIndex;
3955
- } else return false;
3956
- while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
3957
- return templateIndex === template.length;
3958
- }
3959
- function disable() {
3960
- const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
3961
- createDebug.enable("");
3962
- return namespaces;
3963
- }
3964
- function enabled(name) {
3965
- for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
3966
- for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
3967
- return false;
3968
- }
3969
- function coerce(val) {
3970
- if (val instanceof Error) return val.stack || val.message;
3971
- return val;
3972
- }
3973
- function destroy() {
3974
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3975
- }
3976
- createDebug.enable(createDebug.load());
3977
- return createDebug;
3978
- }
3979
- module2.exports = setup;
3980
- } });
3981
- var require_node = __commonJS2({ "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js"(exports2, module2) {
3982
- const tty = __require("tty");
3983
- const util = __require("util");
3984
- exports2.init = init;
3985
- exports2.log = log;
3986
- exports2.formatArgs = formatArgs;
3987
- exports2.save = save;
3988
- exports2.load = load;
3989
- exports2.useColors = useColors;
3990
- exports2.destroy = util.deprecate(() => {
3991
- }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3992
- exports2.colors = [
3993
- 6,
3994
- 2,
3995
- 3,
3996
- 4,
3997
- 5,
3998
- 1
3999
- ];
4000
- try {
4001
- const supportsColor = __require("supports-color");
4002
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports2.colors = [
4003
- 20,
4004
- 21,
4005
- 26,
4006
- 27,
4007
- 32,
4008
- 33,
4009
- 38,
4010
- 39,
4011
- 40,
4012
- 41,
4013
- 42,
4014
- 43,
4015
- 44,
4016
- 45,
4017
- 56,
4018
- 57,
4019
- 62,
4020
- 63,
4021
- 68,
4022
- 69,
4023
- 74,
4024
- 75,
4025
- 76,
4026
- 77,
4027
- 78,
4028
- 79,
4029
- 80,
4030
- 81,
4031
- 92,
4032
- 93,
4033
- 98,
4034
- 99,
4035
- 112,
4036
- 113,
4037
- 128,
4038
- 129,
4039
- 134,
4040
- 135,
4041
- 148,
4042
- 149,
4043
- 160,
4044
- 161,
4045
- 162,
4046
- 163,
4047
- 164,
4048
- 165,
4049
- 166,
4050
- 167,
4051
- 168,
4052
- 169,
4053
- 170,
4054
- 171,
4055
- 172,
4056
- 173,
4057
- 178,
4058
- 179,
4059
- 184,
4060
- 185,
4061
- 196,
4062
- 197,
4063
- 198,
4064
- 199,
4065
- 200,
4066
- 201,
4067
- 202,
4068
- 203,
4069
- 204,
4070
- 205,
4071
- 206,
4072
- 207,
4073
- 208,
4074
- 209,
4075
- 214,
4076
- 215,
4077
- 220,
4078
- 221
4079
- ];
4080
- } catch (error) {
4081
- }
4082
- exports2.inspectOpts = Object.keys(process.env).filter((key) => {
4083
- return /^debug_/i.test(key);
4084
- }).reduce((obj, key) => {
4085
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
4086
- return k.toUpperCase();
3740
+ function coerce(value) {
3741
+ if (value instanceof Error) return value.stack || value.message;
3742
+ return value;
3743
+ }
3744
+ function selectColor(colors$1, namespace) {
3745
+ let hash = 0;
3746
+ for (let i = 0; i < namespace.length; i++) {
3747
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
3748
+ hash |= 0;
3749
+ }
3750
+ return colors$1[Math.abs(hash) % colors$1.length];
3751
+ }
3752
+ function matchesTemplate(search, template) {
3753
+ let searchIndex = 0;
3754
+ let templateIndex = 0;
3755
+ let starIndex = -1;
3756
+ let matchIndex = 0;
3757
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
3758
+ starIndex = templateIndex;
3759
+ matchIndex = searchIndex;
3760
+ templateIndex++;
3761
+ } else {
3762
+ searchIndex++;
3763
+ templateIndex++;
3764
+ }
3765
+ else if (starIndex !== -1) {
3766
+ templateIndex = starIndex + 1;
3767
+ matchIndex++;
3768
+ searchIndex = matchIndex;
3769
+ } else return false;
3770
+ while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
3771
+ return templateIndex === template.length;
3772
+ }
3773
+ function humanize(value) {
3774
+ if (value >= 1e3) return `${(value / 1e3).toFixed(1)}s`;
3775
+ return `${value}ms`;
3776
+ }
3777
+ var globalNamespaces = "";
3778
+ function createDebug$1(namespace, options) {
3779
+ let prevTime;
3780
+ let enableOverride;
3781
+ let namespacesCache;
3782
+ let enabledCache;
3783
+ const debug$1 = (...args) => {
3784
+ if (!debug$1.enabled) return;
3785
+ const curr = Date.now();
3786
+ const diff = curr - (prevTime || curr);
3787
+ prevTime = curr;
3788
+ args[0] = coerce(args[0]);
3789
+ if (typeof args[0] !== "string") args.unshift("%O");
3790
+ let index = 0;
3791
+ args[0] = args[0].replace(/%([a-z%])/gi, (match2, format) => {
3792
+ if (match2 === "%%") return "%";
3793
+ index++;
3794
+ const formatter = options.formatters[format];
3795
+ if (typeof formatter === "function") {
3796
+ const value = args[index];
3797
+ match2 = formatter.call(debug$1, value);
3798
+ args.splice(index, 1);
3799
+ index--;
3800
+ }
3801
+ return match2;
4087
3802
  });
4088
- let val = process.env[key];
4089
- if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
4090
- else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
4091
- else if (val === "null") val = null;
4092
- else val = Number(val);
4093
- obj[prop] = val;
4094
- return obj;
4095
- }, {});
4096
- function useColors() {
4097
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
4098
- }
4099
- function formatArgs(args) {
4100
- const { namespace: name, useColors: useColors$1 } = this;
4101
- if (useColors$1) {
4102
- const c = this.color;
4103
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
4104
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
4105
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
4106
- args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
4107
- } else args[0] = getDate() + name + " " + args[0];
4108
- }
4109
- function getDate() {
4110
- if (exports2.inspectOpts.hideDate) return "";
4111
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
4112
- }
4113
- function log(...args) {
4114
- return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
4115
- }
4116
- function save(namespaces) {
4117
- if (namespaces) process.env.DEBUG = namespaces;
4118
- else delete process.env.DEBUG;
4119
- }
4120
- function load() {
4121
- return process.env.DEBUG;
4122
- }
4123
- function init(debug$1) {
4124
- debug$1.inspectOpts = {};
4125
- const keys = Object.keys(exports2.inspectOpts);
4126
- for (let i = 0; i < keys.length; i++) debug$1.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
4127
- }
4128
- module2.exports = require_common()(exports2);
4129
- const { formatters } = module2.exports;
4130
- formatters.o = function(v) {
4131
- this.inspectOpts.colors = this.useColors;
4132
- return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
3803
+ options.formatArgs.call(debug$1, diff, args);
3804
+ debug$1.log(...args);
4133
3805
  };
4134
- formatters.O = function(v) {
4135
- this.inspectOpts.colors = this.useColors;
4136
- return util.inspect(v, this.inspectOpts);
3806
+ debug$1.extend = function(namespace$1, delimiter = ":") {
3807
+ return createDebug$1(this.namespace + delimiter + namespace$1, {
3808
+ useColors: this.useColors,
3809
+ color: this.color,
3810
+ formatArgs: this.formatArgs,
3811
+ formatters: this.formatters,
3812
+ inspectOpts: this.inspectOpts,
3813
+ log: this.log,
3814
+ humanize: this.humanize
3815
+ });
4137
3816
  };
4138
- } });
4139
- var import_node = __toESM2(require_node(), 1);
4140
- var debug = (0, import_node.default)("vite:hmr");
4141
- var directRequestRE = /(?:\?|&)direct\b/;
3817
+ Object.assign(debug$1, options);
3818
+ debug$1.namespace = namespace;
3819
+ Object.defineProperty(debug$1, "enabled", {
3820
+ enumerable: true,
3821
+ configurable: false,
3822
+ get: () => {
3823
+ if (enableOverride != null) return enableOverride;
3824
+ if (namespacesCache !== globalNamespaces) {
3825
+ namespacesCache = globalNamespaces;
3826
+ enabledCache = enabled(namespace);
3827
+ }
3828
+ return enabledCache;
3829
+ },
3830
+ set: (v) => {
3831
+ enableOverride = v;
3832
+ }
3833
+ });
3834
+ return debug$1;
3835
+ }
3836
+ var names = [];
3837
+ var skips = [];
3838
+ function enable(namespaces$1) {
3839
+ globalNamespaces = namespaces$1;
3840
+ names = [];
3841
+ skips = [];
3842
+ const split = globalNamespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean);
3843
+ for (const ns of split) if (ns[0] === "-") skips.push(ns.slice(1));
3844
+ else names.push(ns);
3845
+ }
3846
+ function enabled(name) {
3847
+ for (const skip of skips) if (matchesTemplate(name, skip)) return false;
3848
+ for (const ns of names) if (matchesTemplate(name, ns)) return true;
3849
+ return false;
3850
+ }
3851
+ var colors = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
3852
+ 20,
3853
+ 21,
3854
+ 26,
3855
+ 27,
3856
+ 32,
3857
+ 33,
3858
+ 38,
3859
+ 39,
3860
+ 40,
3861
+ 41,
3862
+ 42,
3863
+ 43,
3864
+ 44,
3865
+ 45,
3866
+ 56,
3867
+ 57,
3868
+ 62,
3869
+ 63,
3870
+ 68,
3871
+ 69,
3872
+ 74,
3873
+ 75,
3874
+ 76,
3875
+ 77,
3876
+ 78,
3877
+ 79,
3878
+ 80,
3879
+ 81,
3880
+ 92,
3881
+ 93,
3882
+ 98,
3883
+ 99,
3884
+ 112,
3885
+ 113,
3886
+ 128,
3887
+ 129,
3888
+ 134,
3889
+ 135,
3890
+ 148,
3891
+ 149,
3892
+ 160,
3893
+ 161,
3894
+ 162,
3895
+ 163,
3896
+ 164,
3897
+ 165,
3898
+ 166,
3899
+ 167,
3900
+ 168,
3901
+ 169,
3902
+ 170,
3903
+ 171,
3904
+ 172,
3905
+ 173,
3906
+ 178,
3907
+ 179,
3908
+ 184,
3909
+ 185,
3910
+ 196,
3911
+ 197,
3912
+ 198,
3913
+ 199,
3914
+ 200,
3915
+ 201,
3916
+ 202,
3917
+ 203,
3918
+ 204,
3919
+ 205,
3920
+ 206,
3921
+ 207,
3922
+ 208,
3923
+ 209,
3924
+ 214,
3925
+ 215,
3926
+ 220,
3927
+ 221
3928
+ ] : [
3929
+ 6,
3930
+ 2,
3931
+ 3,
3932
+ 4,
3933
+ 5,
3934
+ 1
3935
+ ];
3936
+ var inspectOpts = Object.keys(process.env).filter((key) => /^debug_/i.test(key)).reduce((obj, key) => {
3937
+ const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, k) => k.toUpperCase());
3938
+ let value = process.env[key];
3939
+ const lowerCase = typeof value === "string" && value.toLowerCase();
3940
+ if (value === "null") value = null;
3941
+ else if (lowerCase === "yes" || lowerCase === "on" || lowerCase === "true" || lowerCase === "enabled") value = true;
3942
+ else if (lowerCase === "no" || lowerCase === "off" || lowerCase === "false" || lowerCase === "disabled") value = false;
3943
+ else value = Number(value);
3944
+ obj[prop] = value;
3945
+ return obj;
3946
+ }, {});
3947
+ function useColors() {
3948
+ return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : (0, import_node_tty.isatty)(process.stderr.fd);
3949
+ }
3950
+ function getDate() {
3951
+ if (inspectOpts.hideDate) return "";
3952
+ return `${(/* @__PURE__ */ new Date()).toISOString()} `;
3953
+ }
3954
+ function formatArgs(diff, args) {
3955
+ const { namespace: name, useColors: useColors$1 } = this;
3956
+ if (useColors$1) {
3957
+ const c = this.color;
3958
+ const colorCode = `\x1B[3${c < 8 ? c : `8;5;${c}`}`;
3959
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
3960
+ args[0] = prefix + args[0].split("\n").join(`
3961
+ ${prefix}`);
3962
+ args.push(`${colorCode}m+${this.humanize(diff)}\x1B[0m`);
3963
+ } else args[0] = `${getDate()}${name} ${args[0]}`;
3964
+ }
3965
+ function log(...args) {
3966
+ process.stderr.write(`${(0, import_node_util.formatWithOptions)(this.inspectOpts, ...args)}
3967
+ `);
3968
+ }
3969
+ var defaultOptions = {
3970
+ useColors: useColors(),
3971
+ formatArgs,
3972
+ formatters: {
3973
+ o(v) {
3974
+ this.inspectOpts.colors = this.useColors;
3975
+ return (0, import_node_util.inspect)(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
3976
+ },
3977
+ O(v) {
3978
+ this.inspectOpts.colors = this.useColors;
3979
+ return (0, import_node_util.inspect)(v, this.inspectOpts);
3980
+ }
3981
+ },
3982
+ inspectOpts,
3983
+ log,
3984
+ humanize
3985
+ };
3986
+ function createDebug(namespace, options) {
3987
+ var _ref;
3988
+ const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
3989
+ return createDebug$1(namespace, Object.assign(defaultOptions, { color }, options));
3990
+ }
3991
+ enable(process.env.DEBUG || "");
3992
+ var debug = createDebug("vite:hmr");
4142
3993
  async function handleHotUpdate({ file, modules, read }, options, customElement, typeDepModules) {
4143
3994
  const prevDescriptor = getDescriptor(file, options, false, true);
4144
3995
  if (!prevDescriptor) return;
4145
- const content = await read();
4146
- const { descriptor } = createDescriptor(file, content, options, true);
3996
+ const { descriptor } = createDescriptor(file, await read(), options, true);
4147
3997
  let needRerender = false;
4148
- const affectedModules = new Set(modules.filter((mod) => mod.type !== "js"));
4149
- const mainModule = getMainModule(modules);
4150
- const templateModule = modules.find((m$1) => /type=template/.test(m$1.url));
3998
+ const nonJsModules = modules.filter((m) => m.type !== "js");
3999
+ const jsModules = modules.filter((m) => m.type === "js");
4000
+ const affectedModules = new Set(nonJsModules);
4001
+ const mainModule = getMainModule(jsModules);
4002
+ const templateModule = jsModules.find((m) => /type=template/.test(m.url));
4151
4003
  resolveScript(descriptor, options, false, customElement);
4152
4004
  const scriptChanged = hasScriptChanged(prevDescriptor, descriptor);
4153
- if (scriptChanged) affectedModules.add(getScriptModule(modules) || mainModule);
4005
+ if (scriptChanged) affectedModules.add(getScriptModule(jsModules) || mainModule);
4154
4006
  if (!isEqualBlock(descriptor.template, prevDescriptor.template)) {
4155
4007
  if (!scriptChanged) setResolvedScript(descriptor, getResolvedScript(prevDescriptor, false), false);
4156
4008
  affectedModules.add(templateModule);
@@ -4160,7 +4012,7 @@ async function handleHotUpdate({ file, modules, read }, options, customElement,
4160
4012
  const prevStyles = prevDescriptor.styles || [];
4161
4013
  const nextStyles = descriptor.styles || [];
4162
4014
  if (prevDescriptor.cssVars.join("") !== descriptor.cssVars.join("")) affectedModules.add(mainModule);
4163
- if (prevStyles.some((s$1) => s$1.scoped) !== nextStyles.some((s$1) => s$1.scoped)) {
4015
+ if (prevStyles.some((s) => s.scoped) !== nextStyles.some((s) => s.scoped)) {
4164
4016
  affectedModules.add(templateModule);
4165
4017
  affectedModules.add(mainModule);
4166
4018
  }
@@ -4169,7 +4021,7 @@ async function handleHotUpdate({ file, modules, read }, options, customElement,
4169
4021
  const next = nextStyles[i];
4170
4022
  if (!prev || !isEqualBlock(prev, next)) {
4171
4023
  didUpdateStyle = true;
4172
- const mod = modules.find((m$1) => m$1.url.includes(`type=style&index=${i}`) && m$1.url.endsWith(`.${next.lang || "css"}`) && !directRequestRE.test(m$1.url));
4024
+ const mod = jsModules.find((m) => m.url.includes(`type=style&index=${i}`) && m.url.endsWith(`.${next.lang || "css"}`));
4173
4025
  if (mod) {
4174
4026
  affectedModules.add(mod);
4175
4027
  if (mod.url.includes("&inline")) affectedModules.add(mainModule);
@@ -4184,7 +4036,7 @@ async function handleHotUpdate({ file, modules, read }, options, customElement,
4184
4036
  const prev = prevCustoms[i];
4185
4037
  const next = nextCustoms[i];
4186
4038
  if (!prev || !isEqualBlock(prev, next)) {
4187
- const mod = modules.find((m$1) => m$1.url.includes(`type=${prev.type}&index=${i}`));
4039
+ const mod = jsModules.find((m) => m.url.includes(`type=${prev.type}&index=${i}`));
4188
4040
  if (mod) affectedModules.add(mod);
4189
4041
  else affectedModules.add(mainModule);
4190
4042
  }
@@ -4193,10 +4045,7 @@ async function handleHotUpdate({ file, modules, read }, options, customElement,
4193
4045
  if (needRerender) {
4194
4046
  updateType.push(`template`);
4195
4047
  if (!templateModule) affectedModules.add(mainModule);
4196
- else if (mainModule && !affectedModules.has(mainModule)) {
4197
- const styleImporters = [...mainModule.importers].filter((m$1) => (0, import_vite.isCSSRequest)(m$1.url));
4198
- styleImporters.forEach((m$1) => affectedModules.add(m$1));
4199
- }
4048
+ else if (mainModule && !affectedModules.has(mainModule)) [...mainModule.importers].filter((m) => (0, import_vite.isCSSRequest)(m.url)).forEach((m) => affectedModules.add(m));
4200
4049
  }
4201
4050
  if (didUpdateStyle) updateType.push(`style`);
4202
4051
  if (updateType.length) {
@@ -4217,7 +4066,7 @@ function isEqualBlock(a, b) {
4217
4066
  return keysA.every((key) => a.attrs[key] === b.attrs[key]);
4218
4067
  }
4219
4068
  function isOnlyTemplateChanged(prev, next) {
4220
- return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s$1, i) => isEqualBlock(s$1, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s$1, i) => isEqualBlock(s$1, next.customBlocks[i]));
4069
+ return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s, i) => isEqualBlock(s, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s, i) => isEqualBlock(s, next.customBlocks[i]));
4221
4070
  }
4222
4071
  function deepEqual(obj1, obj2, excludeProps = [], deepParentsOfObj1 = []) {
4223
4072
  if (typeof obj1 !== typeof obj2) return false;
@@ -4253,22 +4102,22 @@ function isEqualAst(prev, next) {
4253
4102
  return true;
4254
4103
  }
4255
4104
  function hasScriptChanged(prev, next) {
4105
+ if (prev.vapor !== next.vapor) return true;
4256
4106
  const prevScript = getResolvedScript(prev, false);
4257
4107
  const nextScript = getResolvedScript(next, false);
4258
4108
  if (!isEqualBlock(prev.script, next.script) && !isEqualAst(prevScript?.scriptAst, nextScript?.scriptAst)) return true;
4259
4109
  if (!isEqualBlock(prev.scriptSetup, next.scriptSetup) && !isEqualAst(prevScript?.scriptSetupAst, nextScript?.scriptSetupAst)) return true;
4260
- const prevResolvedScript = getResolvedScript(prev, false);
4261
- const prevImports = prevResolvedScript?.imports;
4110
+ const prevImports = getResolvedScript(prev, false)?.imports;
4262
4111
  if (prevImports) return !next.template || next.shouldForceReload(prevImports);
4263
4112
  return false;
4264
4113
  }
4265
- function getMainModule(modules) {
4266
- return modules.filter((m$1) => !/type=/.test(m$1.url) || /type=script/.test(m$1.url)).sort((m1, m2) => {
4114
+ function getMainModule(jsModules) {
4115
+ return jsModules.filter((m) => !/type=/.test(m.url) || /type=script/.test(m.url)).sort((m1, m2) => {
4267
4116
  return m1.url.length - m2.url.length;
4268
4117
  })[0];
4269
4118
  }
4270
- function getScriptModule(modules) {
4271
- return modules.find((m$1) => /type=script.*&lang\.\w+$/.test(m$1.url));
4119
+ function getScriptModule(jsModules) {
4120
+ return jsModules.find((m) => /type=script.*&lang\.\w+$/.test(m.url));
4272
4121
  }
4273
4122
  function handleTypeDepChange(affectedComponents, { modules, server: { moduleGraph } }) {
4274
4123
  const affected = /* @__PURE__ */ new Set();
@@ -4302,7 +4151,7 @@ async function transformMain(code, filename, options, pluginContext, ssr, custom
4302
4151
  return null;
4303
4152
  }
4304
4153
  const attachedProps = [];
4305
- const hasScoped = descriptor.styles.some((s$1) => s$1.scoped);
4154
+ const hasScoped = descriptor.styles.some((s) => s.scoped);
4306
4155
  const { code: scriptCode, map: scriptMap } = await genScriptCode(descriptor, options, pluginContext, ssr, customElement);
4307
4156
  const hasTemplateImport = descriptor.template && !isUseInlineTemplate(descriptor, options);
4308
4157
  let templateCode = "";
@@ -4333,7 +4182,7 @@ async function transformMain(code, filename, options, pluginContext, ssr, custom
4333
4182
  }
4334
4183
  let resolvedMap = void 0;
4335
4184
  if (options.sourceMap) if (templateMap) {
4336
- const from = scriptMap ?? {
4185
+ const gen = fromMap(scriptMap ?? {
4337
4186
  file: filename,
4338
4187
  sourceRoot: "",
4339
4188
  version: 3,
@@ -4341,21 +4190,20 @@ async function transformMain(code, filename, options, pluginContext, ssr, custom
4341
4190
  sourcesContent: [],
4342
4191
  names: [],
4343
4192
  mappings: ""
4344
- };
4345
- const gen = fromMap(from);
4193
+ });
4346
4194
  const tracer = new TraceMap(templateMap);
4347
4195
  const offset = (scriptCode.match(/\r?\n/g)?.length ?? 0) + 1;
4348
- eachMapping(tracer, (m$1) => {
4349
- if (m$1.source == null) return;
4196
+ eachMapping(tracer, (m) => {
4197
+ if (m.source == null) return;
4350
4198
  addMapping(gen, {
4351
- source: m$1.source,
4199
+ source: m.source,
4352
4200
  original: {
4353
- line: m$1.originalLine,
4354
- column: m$1.originalColumn
4201
+ line: m.originalLine,
4202
+ column: m.originalColumn
4355
4203
  },
4356
4204
  generated: {
4357
- line: m$1.generatedLine + offset,
4358
- column: m$1.generatedColumn
4205
+ line: m.generatedLine + offset,
4206
+ column: m.generatedColumn
4359
4207
  }
4360
4208
  });
4361
4209
  });
@@ -4401,10 +4249,7 @@ async function genTemplateCode(descriptor, options, pluginContext, ssr, customEl
4401
4249
  else {
4402
4250
  if (template.src) await linkSrcToDescriptor(template.src, descriptor, pluginContext, hasScoped);
4403
4251
  const src = template.src || descriptor.filename;
4404
- const srcQuery = template.src ? hasScoped ? `&src=${descriptor.id}` : "&src=true" : "";
4405
- const scopedQuery = hasScoped ? `&scoped=${descriptor.id}` : ``;
4406
- const attrsQuery = attrsToQuery(template.attrs, "js", true);
4407
- const query = `?vue&type=template${srcQuery}${scopedQuery}${attrsQuery}`;
4252
+ const query = `?vue&type=template${template.src ? hasScoped ? `&src=${descriptor.id}` : "&src=true" : ""}${hasScoped ? `&scoped=${descriptor.id}` : ``}${attrsToQuery(template.attrs, "js", true)}`;
4408
4253
  const request = JSON.stringify(src + query);
4409
4254
  const renderFnName = ssr ? "ssrRender" : "render";
4410
4255
  return {
@@ -4414,8 +4259,7 @@ async function genTemplateCode(descriptor, options, pluginContext, ssr, customEl
4414
4259
  }
4415
4260
  }
4416
4261
  async function genScriptCode(descriptor, options, pluginContext, ssr, customElement) {
4417
- const vaporFlag = descriptor.vapor ? "__vapor: true" : "";
4418
- let scriptCode = `const ${scriptIdentifier} = { ${vaporFlag} }`;
4262
+ let scriptCode = `const ${scriptIdentifier} = { ${descriptor.vapor ? "__vapor: true" : ""} }`;
4419
4263
  let map;
4420
4264
  const script = resolveScript(descriptor, options, ssr, customElement);
4421
4265
  if (script) if (canInlineMain(descriptor, options)) {
@@ -4430,8 +4274,7 @@ async function genScriptCode(descriptor, options, pluginContext, ssr, customElem
4430
4274
  const src = script.src || descriptor.filename;
4431
4275
  const langFallback = script.src && import_node_path.default.extname(src).slice(1) || "js";
4432
4276
  const attrsQuery = attrsToQuery(script.attrs, langFallback);
4433
- const srcQuery = script.src ? `&src=true` : ``;
4434
- const query = `?vue&type=script${srcQuery}${attrsQuery}`;
4277
+ const query = `?vue&type=script${script.src ? `&src=true` : ``}${attrsQuery}`;
4435
4278
  const request = JSON.stringify(src + query);
4436
4279
  scriptCode = `import _sfc_main from ${request}
4437
4280
  export * from ${request}`;
@@ -4453,8 +4296,7 @@ async function genStyleCode(descriptor, pluginContext, customElement, attachedPr
4453
4296
  const srcQuery = style.src ? style.scoped ? `&src=${descriptor.id}` : "&src=true" : "";
4454
4297
  const directQuery = customElement ? `&inline` : ``;
4455
4298
  const scopedQuery = style.scoped ? `&scoped=${descriptor.id}` : ``;
4456
- const query = `?vue&type=style&index=${i}${srcQuery}${directQuery}${scopedQuery}`;
4457
- const styleRequest = src + query + attrsQuery;
4299
+ const styleRequest = src + `?vue&type=style&index=${i}${srcQuery}${directQuery}${scopedQuery}` + attrsQuery;
4458
4300
  if (style.module) {
4459
4301
  if (customElement) throw new Error(`<style module> is not supported in custom elements mode.`);
4460
4302
  const [importCode, nameMap] = genCSSModulesCode(i, styleRequest, style.module);
@@ -4501,8 +4343,7 @@ async function genCustomBlockCode(descriptor, pluginContext) {
4501
4343
  return code;
4502
4344
  }
4503
4345
  async function linkSrcToDescriptor(src, descriptor, pluginContext, scoped) {
4504
- const srcFile = (await pluginContext.resolve(src, descriptor.filename))?.id || src;
4505
- setSrcDescriptor(srcFile.replace(/\?.*$/, ""), descriptor, scoped);
4346
+ setSrcDescriptor(((await pluginContext.resolve(src, descriptor.filename))?.id || src).replace(/\?.*$/, ""), descriptor, scoped);
4506
4347
  }
4507
4348
  var ignoreList = [
4508
4349
  "id",
@@ -4645,8 +4486,7 @@ function vuePlugin(rawOptions = {}) {
4645
4486
  };
4646
4487
  const _warn = config.logger.warn;
4647
4488
  config.logger.warn = (...args) => {
4648
- const msg = args[0];
4649
- if (msg.match(/\[lightningcss\] '(deep|slotted|global)' is not recognized as a valid pseudo-/)) return;
4489
+ if (args[0].match(/\[lightningcss\] '(deep|slotted|global)' is not recognized as a valid pseudo-/)) return;
4650
4490
  _warn(...args);
4651
4491
  };
4652
4492
  transformCachedModule = config.command === "build" && options.value.sourceMap && config.build.watch != null;
@@ -5061,8 +4901,11 @@ var parseClass = (glob2, position) => {
5061
4901
  };
5062
4902
 
5063
4903
  // node_modules/glob/node_modules/minimatch/dist/esm/unescape.js
5064
- var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
5065
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
4904
+ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
4905
+ if (magicalBraces) {
4906
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
4907
+ }
4908
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
5066
4909
  };
5067
4910
 
5068
4911
  // node_modules/glob/node_modules/minimatch/dist/esm/ast.js
@@ -5416,7 +5259,7 @@ var AST = class _AST {
5416
5259
  if (this.#root === this)
5417
5260
  this.#fillNegs();
5418
5261
  if (!this.type) {
5419
- const noEmpty = this.isStart() && this.isEnd();
5262
+ const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
5420
5263
  const src = this.#parts.map((p) => {
5421
5264
  const [re, _, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
5422
5265
  this.#hasMagic = this.#hasMagic || hasMagic2;
@@ -5526,10 +5369,7 @@ var AST = class _AST {
5526
5369
  }
5527
5370
  }
5528
5371
  if (c === "*") {
5529
- if (noEmpty && glob2 === "*")
5530
- re += starNoEmpty;
5531
- else
5532
- re += star;
5372
+ re += noEmpty && glob2 === "*" ? starNoEmpty : star;
5533
5373
  hasMagic2 = true;
5534
5374
  continue;
5535
5375
  }
@@ -5545,7 +5385,10 @@ var AST = class _AST {
5545
5385
  };
5546
5386
 
5547
5387
  // node_modules/glob/node_modules/minimatch/dist/esm/escape.js
5548
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
5388
+ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
5389
+ if (magicalBraces) {
5390
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
5391
+ }
5549
5392
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
5550
5393
  };
5551
5394
 
@@ -5614,7 +5457,7 @@ var path2 = {
5614
5457
  };
5615
5458
  var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
5616
5459
  minimatch.sep = sep;
5617
- var GLOBSTAR = Symbol("globstar **");
5460
+ var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
5618
5461
  minimatch.GLOBSTAR = GLOBSTAR;
5619
5462
  var qmark2 = "[^/]";
5620
5463
  var star2 = qmark2 + "*?";
@@ -6186,16 +6029,27 @@ var Minimatch = class {
6186
6029
  pp[i] = twoStar;
6187
6030
  }
6188
6031
  } else if (next === void 0) {
6189
- pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
6032
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
6190
6033
  } else if (next !== GLOBSTAR) {
6191
6034
  pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
6192
6035
  pp[i + 1] = GLOBSTAR;
6193
6036
  }
6194
6037
  });
6195
- return pp.filter((p) => p !== GLOBSTAR).join("/");
6038
+ const filtered = pp.filter((p) => p !== GLOBSTAR);
6039
+ if (this.partial && filtered.length >= 1) {
6040
+ const prefixes = [];
6041
+ for (let i = 1; i <= filtered.length; i++) {
6042
+ prefixes.push(filtered.slice(0, i).join("/"));
6043
+ }
6044
+ return "(?:" + prefixes.join("|") + ")";
6045
+ }
6046
+ return filtered.join("/");
6196
6047
  }).join("|");
6197
6048
  const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
6198
6049
  re = "^" + open + re + close + "$";
6050
+ if (this.partial) {
6051
+ re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
6052
+ }
6199
6053
  if (this.negate)
6200
6054
  re = "^(?!" + re + ").+$";
6201
6055
  try {
@@ -6314,7 +6168,6 @@ if (typeof AC === "undefined") {
6314
6168
  };
6315
6169
  }
6316
6170
  var shouldWarn = (code) => !warned.has(code);
6317
- var TYPE = Symbol("type");
6318
6171
  var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
6319
6172
  var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
6320
6173
  var ZeroArray = class extends Array {
@@ -7676,37 +7529,37 @@ var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass ||
7676
7529
  var isReadable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws
7677
7530
  s.pipe !== import_node_stream.default.Writable.prototype.pipe;
7678
7531
  var isWritable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.write === "function" && typeof s.end === "function";
7679
- var EOF = Symbol("EOF");
7680
- var MAYBE_EMIT_END = Symbol("maybeEmitEnd");
7681
- var EMITTED_END = Symbol("emittedEnd");
7682
- var EMITTING_END = Symbol("emittingEnd");
7683
- var EMITTED_ERROR = Symbol("emittedError");
7684
- var CLOSED = Symbol("closed");
7685
- var READ = Symbol("read");
7686
- var FLUSH = Symbol("flush");
7687
- var FLUSHCHUNK = Symbol("flushChunk");
7688
- var ENCODING = Symbol("encoding");
7689
- var DECODER = Symbol("decoder");
7690
- var FLOWING = Symbol("flowing");
7691
- var PAUSED = Symbol("paused");
7692
- var RESUME = Symbol("resume");
7693
- var BUFFER = Symbol("buffer");
7694
- var PIPES = Symbol("pipes");
7695
- var BUFFERLENGTH = Symbol("bufferLength");
7696
- var BUFFERPUSH = Symbol("bufferPush");
7697
- var BUFFERSHIFT = Symbol("bufferShift");
7698
- var OBJECTMODE = Symbol("objectMode");
7699
- var DESTROYED = Symbol("destroyed");
7700
- var ERROR = Symbol("error");
7701
- var EMITDATA = Symbol("emitData");
7702
- var EMITEND = Symbol("emitEnd");
7703
- var EMITEND2 = Symbol("emitEnd2");
7704
- var ASYNC = Symbol("async");
7705
- var ABORT = Symbol("abort");
7706
- var ABORTED = Symbol("aborted");
7707
- var SIGNAL = Symbol("signal");
7708
- var DATALISTENERS = Symbol("dataListeners");
7709
- var DISCARDED = Symbol("discarded");
7532
+ var EOF = /* @__PURE__ */ Symbol("EOF");
7533
+ var MAYBE_EMIT_END = /* @__PURE__ */ Symbol("maybeEmitEnd");
7534
+ var EMITTED_END = /* @__PURE__ */ Symbol("emittedEnd");
7535
+ var EMITTING_END = /* @__PURE__ */ Symbol("emittingEnd");
7536
+ var EMITTED_ERROR = /* @__PURE__ */ Symbol("emittedError");
7537
+ var CLOSED = /* @__PURE__ */ Symbol("closed");
7538
+ var READ = /* @__PURE__ */ Symbol("read");
7539
+ var FLUSH = /* @__PURE__ */ Symbol("flush");
7540
+ var FLUSHCHUNK = /* @__PURE__ */ Symbol("flushChunk");
7541
+ var ENCODING = /* @__PURE__ */ Symbol("encoding");
7542
+ var DECODER = /* @__PURE__ */ Symbol("decoder");
7543
+ var FLOWING = /* @__PURE__ */ Symbol("flowing");
7544
+ var PAUSED = /* @__PURE__ */ Symbol("paused");
7545
+ var RESUME = /* @__PURE__ */ Symbol("resume");
7546
+ var BUFFER = /* @__PURE__ */ Symbol("buffer");
7547
+ var PIPES = /* @__PURE__ */ Symbol("pipes");
7548
+ var BUFFERLENGTH = /* @__PURE__ */ Symbol("bufferLength");
7549
+ var BUFFERPUSH = /* @__PURE__ */ Symbol("bufferPush");
7550
+ var BUFFERSHIFT = /* @__PURE__ */ Symbol("bufferShift");
7551
+ var OBJECTMODE = /* @__PURE__ */ Symbol("objectMode");
7552
+ var DESTROYED = /* @__PURE__ */ Symbol("destroyed");
7553
+ var ERROR = /* @__PURE__ */ Symbol("error");
7554
+ var EMITDATA = /* @__PURE__ */ Symbol("emitData");
7555
+ var EMITEND = /* @__PURE__ */ Symbol("emitEnd");
7556
+ var EMITEND2 = /* @__PURE__ */ Symbol("emitEnd2");
7557
+ var ASYNC = /* @__PURE__ */ Symbol("async");
7558
+ var ABORT = /* @__PURE__ */ Symbol("abort");
7559
+ var ABORTED = /* @__PURE__ */ Symbol("aborted");
7560
+ var SIGNAL = /* @__PURE__ */ Symbol("signal");
7561
+ var DATALISTENERS = /* @__PURE__ */ Symbol("dataListeners");
7562
+ var DISCARDED = /* @__PURE__ */ Symbol("discarded");
7710
7563
  var defer = (fn) => Promise.resolve().then(fn);
7711
7564
  var nodefer = (fn) => fn();
7712
7565
  var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
@@ -8619,7 +8472,7 @@ var ChildrenCache = class extends LRUCache {
8619
8472
  });
8620
8473
  }
8621
8474
  };
8622
- var setAsCwd = Symbol("PathScurry setAsCwd");
8475
+ var setAsCwd = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
8623
8476
  var PathBase = class {
8624
8477
  /**
8625
8478
  * the basename of this path