@rsbuild/core 0.6.15 → 0.7.0-beta.0

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 (87) hide show
  1. package/compiled/css-loader/api.js +85 -0
  2. package/compiled/css-loader/getUrl.js +26 -0
  3. package/compiled/css-loader/index.d.ts +1 -0
  4. package/compiled/css-loader/index.js +2187 -0
  5. package/compiled/css-loader/license +20 -0
  6. package/compiled/css-loader/noSourceMaps.js +5 -0
  7. package/compiled/css-loader/package.json +1 -0
  8. package/compiled/css-loader/sourceMaps.js +16 -0
  9. package/compiled/less-loader/index.d.ts +1 -0
  10. package/compiled/less-loader/index.js +414 -0
  11. package/compiled/less-loader/license +20 -0
  12. package/compiled/less-loader/package.json +1 -0
  13. package/compiled/postcss-load-config/292.index.js +2533 -0
  14. package/compiled/postcss-load-config/344.index.js +21 -0
  15. package/compiled/postcss-load-config/index.d.ts +1 -0
  16. package/compiled/postcss-load-config/index.js +1201 -0
  17. package/compiled/postcss-load-config/license +20 -0
  18. package/compiled/postcss-load-config/package.json +1 -0
  19. package/compiled/postcss-loader/index.d.ts +1 -0
  20. package/compiled/postcss-loader/index.js +200173 -0
  21. package/compiled/postcss-loader/license +20 -0
  22. package/compiled/postcss-loader/package.json +1 -0
  23. package/compiled/postcss-value-parser/index.d.ts +1 -0
  24. package/compiled/postcss-value-parser/index.js +624 -0
  25. package/compiled/postcss-value-parser/license +22 -0
  26. package/compiled/postcss-value-parser/package.json +1 -0
  27. package/compiled/resolve-url-loader/index.d.ts +1 -0
  28. package/compiled/resolve-url-loader/index.js +5719 -0
  29. package/compiled/resolve-url-loader/license +21 -0
  30. package/compiled/resolve-url-loader/package.json +1 -0
  31. package/compiled/style-loader/index.d.ts +1 -0
  32. package/compiled/style-loader/index.js +513 -0
  33. package/compiled/style-loader/license +20 -0
  34. package/compiled/style-loader/package.json +1 -0
  35. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  36. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
  37. package/compiled/style-loader/runtime/insertBySelector.js +34 -0
  38. package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
  39. package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
  40. package/compiled/style-loader/runtime/isOldIE.js +17 -0
  41. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
  42. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
  43. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
  44. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
  45. package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
  46. package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
  47. package/dist/cli/commands.js +1 -1
  48. package/dist/cli/prepare.js +1 -1
  49. package/dist/config.js +0 -1
  50. package/dist/createContext.js +1 -1
  51. package/dist/index.js +1 -1
  52. package/dist/internal.d.ts +2 -2
  53. package/dist/internal.js +8 -8
  54. package/dist/{htmlUtils.d.ts → pluginHelper.d.ts} +4 -1
  55. package/dist/pluginHelper.js +66 -0
  56. package/dist/plugins/css.d.ts +19 -0
  57. package/dist/plugins/css.js +257 -0
  58. package/dist/plugins/index.d.ts +4 -0
  59. package/dist/plugins/index.js +4 -0
  60. package/dist/{provider/plugins → plugins}/less.d.ts +1 -1
  61. package/dist/{provider/plugins → plugins}/less.js +45 -10
  62. package/dist/{provider/plugins → plugins}/output.d.ts +1 -1
  63. package/dist/{provider/plugins → plugins}/output.js +21 -14
  64. package/dist/plugins/performance.js +5 -11
  65. package/dist/plugins/resourceHints.js +17 -22
  66. package/dist/plugins/sass.d.ts +18 -0
  67. package/dist/{provider/plugins → plugins}/sass.js +83 -12
  68. package/dist/provider/plugins/swc.d.ts +0 -2
  69. package/dist/provider/plugins/swc.js +1 -3
  70. package/dist/provider/provider.js +4 -4
  71. package/dist/provider/rspackConfig.js +2 -2
  72. package/dist/rspack/HtmlAppIconPlugin.js +2 -2
  73. package/dist/rspack/HtmlBasicPlugin.js +2 -2
  74. package/dist/rspack/InlineChunkHtmlPlugin.js +2 -2
  75. package/dist/rspack/ignoreCssLoader.d.ts +2 -0
  76. package/dist/{htmlUtils.js → rspack/ignoreCssLoader.js} +10 -21
  77. package/dist/rspack/preload/HtmlPreloadOrPrefetchPlugin.js +3 -3
  78. package/package.json +12 -3
  79. package/dist/provider/css-modules-typescript-pre-loader/index.d.ts +0 -6
  80. package/dist/provider/css-modules-typescript-pre-loader/index.js +0 -84
  81. package/dist/provider/css-modules-typescript-pre-loader/postcssIcssExtractPlugin.d.ts +0 -11
  82. package/dist/provider/css-modules-typescript-pre-loader/postcssIcssExtractPlugin.js +0 -66
  83. package/dist/provider/plugins/css.d.ts +0 -17
  84. package/dist/provider/plugins/css.js +0 -202
  85. package/dist/provider/plugins/sass.d.ts +0 -2
  86. package/dist/rspack/RemoveCssSourcemapPlugin.d.ts +0 -6
  87. package/dist/rspack/RemoveCssSourcemapPlugin.js +0 -55
@@ -0,0 +1,2187 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ 169:
6
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7
+
8
+
9
+
10
+ const loader = __nccwpck_require__(436);
11
+ module.exports = loader.default;
12
+ module.exports.defaultGetLocalIdent = __nccwpck_require__(809).defaultGetLocalIdent;
13
+
14
+ /***/ }),
15
+
16
+ /***/ 436:
17
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
18
+
19
+
20
+
21
+ Object.defineProperty(exports, "__esModule", ({
22
+ value: true
23
+ }));
24
+ exports["default"] = loader;
25
+ var _postcss = _interopRequireDefault(__nccwpck_require__(977));
26
+ var _package = _interopRequireDefault(__nccwpck_require__(446));
27
+ var _semver = __nccwpck_require__(280);
28
+ var _options = _interopRequireDefault(__nccwpck_require__(879));
29
+ var _plugins = __nccwpck_require__(69);
30
+ var _utils = __nccwpck_require__(809);
31
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
+ /*
33
+ MIT License http://www.opensource.org/licenses/mit-license.php
34
+ Author Tobias Koppers @sokra
35
+ */
36
+
37
+ async function loader(content, map, meta) {
38
+ const rawOptions = this.getOptions(_options.default);
39
+ const callback = this.async();
40
+ if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && (this._module.type === "css" || this._module.type === "css/auto" || this._module.type === "css/global" || this._module.type === "css/module")) {
41
+ this.emitWarning(new Error('You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `css-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `css-loader` in your webpack config (now css-loader does nothing).'));
42
+ callback(null, content, map, meta);
43
+ return;
44
+ }
45
+ let options;
46
+ try {
47
+ options = (0, _utils.normalizeOptions)(rawOptions, this);
48
+ } catch (error) {
49
+ callback(error);
50
+ return;
51
+ }
52
+ const plugins = [];
53
+ const replacements = [];
54
+ const exports = [];
55
+ if ((0, _utils.shouldUseModulesPlugins)(options)) {
56
+ plugins.push(...(0, _utils.getModulesPlugins)(options, this));
57
+ }
58
+ const importPluginImports = [];
59
+ const importPluginApi = [];
60
+ let isSupportAbsoluteURL = false;
61
+
62
+ // TODO enable by default in the next major release
63
+ if (this._compilation && this._compilation.options && this._compilation.options.experiments && this._compilation.options.experiments.buildHttp) {
64
+ isSupportAbsoluteURL = true;
65
+ }
66
+ if ((0, _utils.shouldUseImportPlugin)(options)) {
67
+ plugins.push((0, _plugins.importParser)({
68
+ // TODO need to fix on webpack side, webpack tries to resolve `./runtime/api.js paths like `http://site.com/runtime/api.js`, maybe we should try first request like absolute, the second like a relative to context
69
+ isSupportAbsoluteURL: false,
70
+ isSupportDataURL: false,
71
+ isCSSStyleSheet: options.exportType === "css-style-sheet",
72
+ loaderContext: this,
73
+ imports: importPluginImports,
74
+ api: importPluginApi,
75
+ filter: options.import.filter,
76
+ urlHandler: url => (0, _utils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url))
77
+ }));
78
+ }
79
+ const urlPluginImports = [];
80
+ if ((0, _utils.shouldUseURLPlugin)(options)) {
81
+ const needToResolveURL = !options.esModule;
82
+ plugins.push((0, _plugins.urlParser)({
83
+ isSupportAbsoluteURL,
84
+ isSupportDataURL: options.esModule,
85
+ imports: urlPluginImports,
86
+ replacements,
87
+ context: this.context,
88
+ rootContext: this.rootContext,
89
+ filter: (0, _utils.getFilter)(options.url.filter, this.resourcePath),
90
+ resolver: needToResolveURL ? this.getResolve({
91
+ mainFiles: [],
92
+ extensions: []
93
+ }) :
94
+ // eslint-disable-next-line no-undefined
95
+ undefined,
96
+ urlHandler: url => (0, _utils.stringifyRequest)(this, url)
97
+ // Support data urls as input in new URL added in webpack@5.38.0
98
+ }));
99
+ }
100
+ const icssPluginImports = [];
101
+ const icssPluginApi = [];
102
+ const needToUseIcssPlugin = (0, _utils.shouldUseIcssPlugin)(options);
103
+ if (needToUseIcssPlugin) {
104
+ plugins.push((0, _plugins.icssParser)({
105
+ loaderContext: this,
106
+ imports: icssPluginImports,
107
+ api: icssPluginApi,
108
+ replacements,
109
+ exports,
110
+ urlHandler: url => (0, _utils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url))
111
+ }));
112
+ }
113
+
114
+ // Reuse CSS AST (PostCSS AST e.g 'postcss-loader') to avoid reparsing
115
+ if (meta) {
116
+ const {
117
+ ast
118
+ } = meta;
119
+ if (ast && ast.type === "postcss" && (0, _semver.satisfies)(ast.version, `^${_package.default.version}`)) {
120
+ // eslint-disable-next-line no-param-reassign
121
+ content = ast.root;
122
+ }
123
+ }
124
+ const {
125
+ resourcePath
126
+ } = this;
127
+ let result;
128
+ try {
129
+ result = await (0, _postcss.default)(plugins).process(content, {
130
+ hideNothingWarning: true,
131
+ from: resourcePath,
132
+ to: resourcePath,
133
+ map: options.sourceMap ? {
134
+ prev: map ? (0, _utils.normalizeSourceMap)(map, resourcePath) : null,
135
+ inline: false,
136
+ annotation: false
137
+ } : false
138
+ });
139
+ } catch (error) {
140
+ if (error.file) {
141
+ this.addDependency(error.file);
142
+ }
143
+ callback(error.name === "CssSyntaxError" ? (0, _utils.syntaxErrorFactory)(error) : error);
144
+ return;
145
+ }
146
+ for (const warning of result.warnings()) {
147
+ this.emitWarning((0, _utils.warningFactory)(warning));
148
+ }
149
+ const imports = [].concat(icssPluginImports.sort(_utils.sort)).concat(importPluginImports.sort(_utils.sort)).concat(urlPluginImports.sort(_utils.sort));
150
+ const api = [].concat(importPluginApi.sort(_utils.sort)).concat(icssPluginApi.sort(_utils.sort));
151
+ if (options.modules.exportOnlyLocals !== true) {
152
+ imports.unshift({
153
+ type: "api_import",
154
+ importName: "___CSS_LOADER_API_IMPORT___",
155
+ url: (0, _utils.stringifyRequest)(this, __nccwpck_require__.ab + "api.js")
156
+ });
157
+ if (options.sourceMap) {
158
+ imports.unshift({
159
+ importName: "___CSS_LOADER_API_SOURCEMAP_IMPORT___",
160
+ url: (0, _utils.stringifyRequest)(this, __nccwpck_require__.ab + "sourceMaps.js")
161
+ });
162
+ } else {
163
+ imports.unshift({
164
+ importName: "___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___",
165
+ url: (0, _utils.stringifyRequest)(this, __nccwpck_require__.ab + "noSourceMaps.js")
166
+ });
167
+ }
168
+ }
169
+ let isTemplateLiteralSupported = false;
170
+ if (
171
+ // eslint-disable-next-line no-underscore-dangle
172
+ this._compilation &&
173
+ // eslint-disable-next-line no-underscore-dangle
174
+ this._compilation.options &&
175
+ // eslint-disable-next-line no-underscore-dangle
176
+ this._compilation.options.output &&
177
+ // eslint-disable-next-line no-underscore-dangle
178
+ this._compilation.options.output.environment &&
179
+ // eslint-disable-next-line no-underscore-dangle
180
+ this._compilation.options.output.environment.templateLiteral) {
181
+ isTemplateLiteralSupported = true;
182
+ }
183
+ const importCode = (0, _utils.getImportCode)(imports, options);
184
+ let moduleCode;
185
+ try {
186
+ moduleCode = (0, _utils.getModuleCode)(result, api, replacements, options, isTemplateLiteralSupported, this);
187
+ } catch (error) {
188
+ callback(error);
189
+ return;
190
+ }
191
+ const exportCode = (0, _utils.getExportCode)(exports, replacements, needToUseIcssPlugin, options, isTemplateLiteralSupported);
192
+ const {
193
+ getJSON
194
+ } = options.modules;
195
+ if (typeof getJSON === "function") {
196
+ try {
197
+ await getJSON({
198
+ resourcePath,
199
+ imports,
200
+ exports,
201
+ replacements
202
+ });
203
+ } catch (error) {
204
+ callback(error);
205
+ return;
206
+ }
207
+ }
208
+ callback(null, `${importCode}${moduleCode}${exportCode}`);
209
+ }
210
+
211
+ /***/ }),
212
+
213
+ /***/ 69:
214
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
215
+
216
+
217
+
218
+ Object.defineProperty(exports, "__esModule", ({
219
+ value: true
220
+ }));
221
+ Object.defineProperty(exports, "icssParser", ({
222
+ enumerable: true,
223
+ get: function () {
224
+ return _postcssIcssParser.default;
225
+ }
226
+ }));
227
+ Object.defineProperty(exports, "importParser", ({
228
+ enumerable: true,
229
+ get: function () {
230
+ return _postcssImportParser.default;
231
+ }
232
+ }));
233
+ Object.defineProperty(exports, "urlParser", ({
234
+ enumerable: true,
235
+ get: function () {
236
+ return _postcssUrlParser.default;
237
+ }
238
+ }));
239
+ var _postcssImportParser = _interopRequireDefault(__nccwpck_require__(535));
240
+ var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(88));
241
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(134));
242
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
243
+
244
+ /***/ }),
245
+
246
+ /***/ 88:
247
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
248
+
249
+
250
+
251
+ Object.defineProperty(exports, "__esModule", ({
252
+ value: true
253
+ }));
254
+ exports["default"] = void 0;
255
+ var _icssUtils = __nccwpck_require__(298);
256
+ var _utils = __nccwpck_require__(809);
257
+ const plugin = (options = {}) => {
258
+ return {
259
+ postcssPlugin: "postcss-icss-parser",
260
+ async OnceExit(root) {
261
+ const importReplacements = Object.create(null);
262
+ const {
263
+ icssImports,
264
+ icssExports
265
+ } = (0, _icssUtils.extractICSS)(root);
266
+ const imports = new Map();
267
+ const tasks = [];
268
+ const {
269
+ loaderContext
270
+ } = options;
271
+ const resolver = loaderContext.getResolve({
272
+ dependencyType: "icss",
273
+ conditionNames: ["style"],
274
+ extensions: ["..."],
275
+ mainFields: ["css", "style", "main", "..."],
276
+ mainFiles: ["index", "..."],
277
+ preferRelative: true
278
+ });
279
+
280
+ // eslint-disable-next-line guard-for-in
281
+ for (const url in icssImports) {
282
+ const tokens = icssImports[url];
283
+ if (Object.keys(tokens).length === 0) {
284
+ // eslint-disable-next-line no-continue
285
+ continue;
286
+ }
287
+ let normalizedUrl = url;
288
+ let prefix = "";
289
+ const queryParts = normalizedUrl.split("!");
290
+ if (queryParts.length > 1) {
291
+ normalizedUrl = queryParts.pop();
292
+ prefix = queryParts.join("!");
293
+ }
294
+ const request = (0, _utils.requestify)((0, _utils.normalizeUrl)(normalizedUrl, true), loaderContext.rootContext);
295
+ const doResolve = async () => {
296
+ const resolvedUrl = await (0, _utils.resolveRequests)(resolver, loaderContext.context, [...new Set([normalizedUrl, request])]);
297
+ if (!resolvedUrl) {
298
+ return;
299
+ }
300
+
301
+ // eslint-disable-next-line consistent-return
302
+ return {
303
+ url: resolvedUrl,
304
+ prefix,
305
+ tokens
306
+ };
307
+ };
308
+ tasks.push(doResolve());
309
+ }
310
+ const results = await Promise.all(tasks);
311
+ for (let index = 0; index <= results.length - 1; index++) {
312
+ const item = results[index];
313
+ if (!item) {
314
+ // eslint-disable-next-line no-continue
315
+ continue;
316
+ }
317
+ const newUrl = item.prefix ? `${item.prefix}!${item.url}` : item.url;
318
+ const importKey = newUrl;
319
+ let importName = imports.get(importKey);
320
+ if (!importName) {
321
+ importName = `___CSS_LOADER_ICSS_IMPORT_${imports.size}___`;
322
+ imports.set(importKey, importName);
323
+ options.imports.push({
324
+ type: "icss_import",
325
+ importName,
326
+ url: options.urlHandler(newUrl),
327
+ icss: true,
328
+ index
329
+ });
330
+ options.api.push({
331
+ importName,
332
+ dedupe: true,
333
+ index
334
+ });
335
+ }
336
+ for (const [replacementIndex, token] of Object.keys(item.tokens).entries()) {
337
+ const replacementName = `___CSS_LOADER_ICSS_IMPORT_${index}_REPLACEMENT_${replacementIndex}___`;
338
+ const localName = item.tokens[token];
339
+ importReplacements[token] = replacementName;
340
+ options.replacements.push({
341
+ replacementName,
342
+ importName,
343
+ localName
344
+ });
345
+ }
346
+ }
347
+ if (Object.keys(importReplacements).length > 0) {
348
+ (0, _icssUtils.replaceSymbols)(root, importReplacements);
349
+ }
350
+ for (const name of Object.keys(icssExports)) {
351
+ const value = (0, _icssUtils.replaceValueSymbols)(icssExports[name], importReplacements);
352
+ options.exports.push({
353
+ name,
354
+ value
355
+ });
356
+ }
357
+ }
358
+ };
359
+ };
360
+ plugin.postcss = true;
361
+ var _default = exports["default"] = plugin;
362
+
363
+ /***/ }),
364
+
365
+ /***/ 535:
366
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
367
+
368
+
369
+
370
+ Object.defineProperty(exports, "__esModule", ({
371
+ value: true
372
+ }));
373
+ exports["default"] = void 0;
374
+ var _postcssValueParser = _interopRequireDefault(__nccwpck_require__(36));
375
+ var _utils = __nccwpck_require__(809);
376
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
377
+ function parseNode(atRule, key, options) {
378
+ // Convert only top-level @import
379
+ if (atRule.parent.type !== "root") {
380
+ return;
381
+ }
382
+ if (atRule.raws && atRule.raws.afterName && atRule.raws.afterName.trim().length > 0) {
383
+ const lastCommentIndex = atRule.raws.afterName.lastIndexOf("/*");
384
+ const matched = atRule.raws.afterName.slice(lastCommentIndex).match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
385
+ if (matched && matched[2] === "true") {
386
+ return;
387
+ }
388
+ }
389
+ const prevNode = atRule.prev();
390
+ if (prevNode && prevNode.type === "comment") {
391
+ const matched = prevNode.text.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
392
+ if (matched && matched[2] === "true") {
393
+ return;
394
+ }
395
+ }
396
+
397
+ // Nodes do not exists - `@import url('http://') :root {}`
398
+ if (atRule.nodes) {
399
+ const error = new Error("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.");
400
+ error.node = atRule;
401
+ throw error;
402
+ }
403
+ const rawParams = atRule.raws && atRule.raws[key] && typeof atRule.raws[key].raw !== "undefined" ? atRule.raws[key].raw : atRule[key];
404
+ const {
405
+ nodes: paramsNodes
406
+ } = (0, _postcssValueParser.default)(rawParams);
407
+
408
+ // No nodes - `@import ;`
409
+ // Invalid type - `@import foo-bar;`
410
+ if (paramsNodes.length === 0 || paramsNodes[0].type !== "string" && paramsNodes[0].type !== "function") {
411
+ const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
412
+ error.node = atRule;
413
+ throw error;
414
+ }
415
+ let isStringValue;
416
+ let url;
417
+ if (paramsNodes[0].type === "string") {
418
+ isStringValue = true;
419
+ url = paramsNodes[0].value;
420
+ } else {
421
+ // Invalid function - `@import nourl(test.css);`
422
+ if (paramsNodes[0].value.toLowerCase() !== "url") {
423
+ const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
424
+ error.node = atRule;
425
+ throw error;
426
+ }
427
+ isStringValue = paramsNodes[0].nodes.length !== 0 && paramsNodes[0].nodes[0].type === "string";
428
+ url = isStringValue ? paramsNodes[0].nodes[0].value : _postcssValueParser.default.stringify(paramsNodes[0].nodes);
429
+ }
430
+ url = (0, _utils.normalizeUrl)(url, isStringValue);
431
+ const {
432
+ requestable,
433
+ needResolve
434
+ } = (0, _utils.isURLRequestable)(url, options);
435
+ let prefix;
436
+ if (requestable && needResolve) {
437
+ const queryParts = url.split("!");
438
+ if (queryParts.length > 1) {
439
+ url = queryParts.pop();
440
+ prefix = queryParts.join("!");
441
+ }
442
+ }
443
+
444
+ // Empty url - `@import "";` or `@import url();`
445
+ if (url.trim().length === 0) {
446
+ const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
447
+ error.node = atRule;
448
+ throw error;
449
+ }
450
+ const additionalNodes = paramsNodes.slice(1);
451
+ let supports;
452
+ let layer;
453
+ let media;
454
+ if (additionalNodes.length > 0) {
455
+ let nodes = [];
456
+ for (const node of additionalNodes) {
457
+ nodes.push(node);
458
+ const isLayerFunction = node.type === "function" && node.value.toLowerCase() === "layer";
459
+ const isLayerWord = node.type === "word" && node.value.toLowerCase() === "layer";
460
+ if (isLayerFunction || isLayerWord) {
461
+ if (isLayerFunction) {
462
+ nodes.splice(nodes.length - 1, 1, ...node.nodes);
463
+ } else {
464
+ nodes.splice(nodes.length - 1, 1, {
465
+ type: "string",
466
+ value: "",
467
+ unclosed: false
468
+ });
469
+ }
470
+ layer = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
471
+ nodes = [];
472
+ } else if (node.type === "function" && node.value.toLowerCase() === "supports") {
473
+ nodes.splice(nodes.length - 1, 1, ...node.nodes);
474
+ supports = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
475
+ nodes = [];
476
+ }
477
+ }
478
+ if (nodes.length > 0) {
479
+ media = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
480
+ }
481
+ }
482
+
483
+ // eslint-disable-next-line consistent-return
484
+ return {
485
+ atRule,
486
+ prefix,
487
+ url,
488
+ layer,
489
+ supports,
490
+ media,
491
+ requestable,
492
+ needResolve
493
+ };
494
+ }
495
+ const plugin = (options = {}) => {
496
+ return {
497
+ postcssPlugin: "postcss-import-parser",
498
+ prepare(result) {
499
+ const parsedAtRules = [];
500
+ return {
501
+ AtRule: {
502
+ import(atRule) {
503
+ if (options.isCSSStyleSheet) {
504
+ options.loaderContext.emitError(new Error(atRule.error("'@import' rules are not allowed here and will not be processed").message));
505
+ return;
506
+ }
507
+ const {
508
+ isSupportDataURL,
509
+ isSupportAbsoluteURL
510
+ } = options;
511
+ let parsedAtRule;
512
+ try {
513
+ parsedAtRule = parseNode(atRule, "params", {
514
+ isSupportAbsoluteURL,
515
+ isSupportDataURL
516
+ });
517
+ } catch (error) {
518
+ result.warn(error.message, {
519
+ node: error.node
520
+ });
521
+ }
522
+ if (!parsedAtRule) {
523
+ return;
524
+ }
525
+ parsedAtRules.push(parsedAtRule);
526
+ }
527
+ },
528
+ async OnceExit() {
529
+ if (parsedAtRules.length === 0) {
530
+ return;
531
+ }
532
+ const {
533
+ loaderContext
534
+ } = options;
535
+ const resolver = loaderContext.getResolve({
536
+ dependencyType: "css",
537
+ conditionNames: ["style"],
538
+ mainFields: ["css", "style", "main", "..."],
539
+ mainFiles: ["index", "..."],
540
+ extensions: [".css", "..."],
541
+ preferRelative: true
542
+ });
543
+ const resolvedAtRules = await Promise.all(parsedAtRules.map(async parsedAtRule => {
544
+ const {
545
+ atRule,
546
+ requestable,
547
+ needResolve,
548
+ prefix,
549
+ url,
550
+ layer,
551
+ supports,
552
+ media
553
+ } = parsedAtRule;
554
+ if (options.filter) {
555
+ const needKeep = await options.filter(url, media, loaderContext.resourcePath, supports, layer);
556
+ if (!needKeep) {
557
+ return;
558
+ }
559
+ }
560
+ if (needResolve) {
561
+ const request = (0, _utils.requestify)(url, loaderContext.rootContext);
562
+ const resolvedUrl = await (0, _utils.resolveRequests)(resolver, loaderContext.context, [...new Set([request, url])]);
563
+ if (!resolvedUrl) {
564
+ return;
565
+ }
566
+ if (resolvedUrl === loaderContext.resourcePath) {
567
+ atRule.remove();
568
+ return;
569
+ }
570
+ atRule.remove();
571
+
572
+ // eslint-disable-next-line consistent-return
573
+ return {
574
+ url: resolvedUrl,
575
+ layer,
576
+ supports,
577
+ media,
578
+ prefix,
579
+ requestable
580
+ };
581
+ }
582
+ atRule.remove();
583
+
584
+ // eslint-disable-next-line consistent-return
585
+ return {
586
+ url,
587
+ layer,
588
+ supports,
589
+ media,
590
+ prefix,
591
+ requestable
592
+ };
593
+ }));
594
+ const urlToNameMap = new Map();
595
+ for (let index = 0; index <= resolvedAtRules.length - 1; index++) {
596
+ const resolvedAtRule = resolvedAtRules[index];
597
+ if (!resolvedAtRule) {
598
+ // eslint-disable-next-line no-continue
599
+ continue;
600
+ }
601
+ const {
602
+ url,
603
+ requestable,
604
+ layer,
605
+ supports,
606
+ media
607
+ } = resolvedAtRule;
608
+ if (!requestable) {
609
+ options.api.push({
610
+ url,
611
+ layer,
612
+ supports,
613
+ media,
614
+ index
615
+ });
616
+
617
+ // eslint-disable-next-line no-continue
618
+ continue;
619
+ }
620
+ const {
621
+ prefix
622
+ } = resolvedAtRule;
623
+ const newUrl = prefix ? `${prefix}!${url}` : url;
624
+ let importName = urlToNameMap.get(newUrl);
625
+ if (!importName) {
626
+ importName = `___CSS_LOADER_AT_RULE_IMPORT_${urlToNameMap.size}___`;
627
+ urlToNameMap.set(newUrl, importName);
628
+ options.imports.push({
629
+ type: "rule_import",
630
+ importName,
631
+ url: options.urlHandler(newUrl),
632
+ index
633
+ });
634
+ }
635
+ options.api.push({
636
+ importName,
637
+ layer,
638
+ supports,
639
+ media,
640
+ index
641
+ });
642
+ }
643
+ }
644
+ };
645
+ }
646
+ };
647
+ };
648
+ plugin.postcss = true;
649
+ var _default = exports["default"] = plugin;
650
+
651
+ /***/ }),
652
+
653
+ /***/ 134:
654
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
655
+
656
+
657
+
658
+ Object.defineProperty(exports, "__esModule", ({
659
+ value: true
660
+ }));
661
+ exports["default"] = void 0;
662
+ var _postcssValueParser = _interopRequireDefault(__nccwpck_require__(36));
663
+ var _utils = __nccwpck_require__(809);
664
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
665
+ const isUrlFunc = /url/i;
666
+ const isImageSetFunc = /^(?:-webkit-)?image-set$/i;
667
+ const needParseDeclaration = /(?:url|(?:-webkit-)?image-set)\(/i;
668
+ function getNodeFromUrlFunc(node) {
669
+ return node.nodes && node.nodes[0];
670
+ }
671
+ function getWebpackIgnoreCommentValue(index, nodes, inBetween) {
672
+ if (index === 0 && typeof inBetween !== "undefined") {
673
+ return inBetween;
674
+ }
675
+ let prevValueNode = nodes[index - 1];
676
+ if (!prevValueNode) {
677
+ // eslint-disable-next-line consistent-return
678
+ return;
679
+ }
680
+ if (prevValueNode.type === "space") {
681
+ if (!nodes[index - 2]) {
682
+ // eslint-disable-next-line consistent-return
683
+ return;
684
+ }
685
+ prevValueNode = nodes[index - 2];
686
+ }
687
+ if (prevValueNode.type !== "comment") {
688
+ // eslint-disable-next-line consistent-return
689
+ return;
690
+ }
691
+ const matched = prevValueNode.value.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
692
+ return matched && matched[2] === "true";
693
+ }
694
+ function shouldHandleURL(url, declaration, result, options) {
695
+ if (url.length === 0) {
696
+ result.warn(`Unable to find uri in '${declaration.toString()}'`, {
697
+ node: declaration
698
+ });
699
+ return {
700
+ requestable: false,
701
+ needResolve: false
702
+ };
703
+ }
704
+ return (0, _utils.isURLRequestable)(url, options);
705
+ }
706
+ function parseDeclaration(declaration, key, result, options) {
707
+ if (!needParseDeclaration.test(declaration[key])) {
708
+ return;
709
+ }
710
+ const parsed = (0, _postcssValueParser.default)(declaration.raws && declaration.raws.value && declaration.raws.value.raw ? declaration.raws.value.raw : declaration[key]);
711
+ let inBetween;
712
+ if (declaration.raws && declaration.raws.between) {
713
+ const lastCommentIndex = declaration.raws.between.lastIndexOf("/*");
714
+ const matched = declaration.raws.between.slice(lastCommentIndex).match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
715
+ if (matched) {
716
+ inBetween = matched[2] === "true";
717
+ }
718
+ }
719
+ let isIgnoreOnDeclaration = false;
720
+ const prevNode = declaration.prev();
721
+ if (prevNode && prevNode.type === "comment") {
722
+ const matched = prevNode.text.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
723
+ if (matched) {
724
+ isIgnoreOnDeclaration = matched[2] === "true";
725
+ }
726
+ }
727
+ let needIgnore;
728
+ const parsedURLs = [];
729
+ parsed.walk((valueNode, index, valueNodes) => {
730
+ if (valueNode.type !== "function") {
731
+ return;
732
+ }
733
+ if (isUrlFunc.test(valueNode.value)) {
734
+ needIgnore = getWebpackIgnoreCommentValue(index, valueNodes, inBetween);
735
+ if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
736
+ if (needIgnore) {
737
+ // eslint-disable-next-line no-undefined
738
+ needIgnore = undefined;
739
+ }
740
+ return;
741
+ }
742
+ const {
743
+ nodes
744
+ } = valueNode;
745
+ const isStringValue = nodes.length !== 0 && nodes[0].type === "string";
746
+ let url = isStringValue ? nodes[0].value : _postcssValueParser.default.stringify(nodes);
747
+ url = (0, _utils.normalizeUrl)(url, isStringValue);
748
+ const {
749
+ requestable,
750
+ needResolve
751
+ } = shouldHandleURL(url, declaration, result, options);
752
+
753
+ // Do not traverse inside `url`
754
+ if (!requestable) {
755
+ // eslint-disable-next-line consistent-return
756
+ return false;
757
+ }
758
+ const queryParts = url.split("!");
759
+ let prefix;
760
+ if (queryParts.length > 1) {
761
+ url = queryParts.pop();
762
+ prefix = queryParts.join("!");
763
+ }
764
+ parsedURLs.push({
765
+ declaration,
766
+ parsed,
767
+ node: getNodeFromUrlFunc(valueNode),
768
+ prefix,
769
+ url,
770
+ needQuotes: false,
771
+ needResolve
772
+ });
773
+
774
+ // eslint-disable-next-line consistent-return
775
+ return false;
776
+ } else if (isImageSetFunc.test(valueNode.value)) {
777
+ for (const [innerIndex, nNode] of valueNode.nodes.entries()) {
778
+ const {
779
+ type,
780
+ value
781
+ } = nNode;
782
+ if (type === "function" && isUrlFunc.test(value)) {
783
+ needIgnore = getWebpackIgnoreCommentValue(innerIndex, valueNode.nodes);
784
+ if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
785
+ if (needIgnore) {
786
+ // eslint-disable-next-line no-undefined
787
+ needIgnore = undefined;
788
+ }
789
+
790
+ // eslint-disable-next-line no-continue
791
+ continue;
792
+ }
793
+ const {
794
+ nodes
795
+ } = nNode;
796
+ const isStringValue = nodes.length !== 0 && nodes[0].type === "string";
797
+ let url = isStringValue ? nodes[0].value : _postcssValueParser.default.stringify(nodes);
798
+ url = (0, _utils.normalizeUrl)(url, isStringValue);
799
+ const {
800
+ requestable,
801
+ needResolve
802
+ } = shouldHandleURL(url, declaration, result, options);
803
+
804
+ // Do not traverse inside `url`
805
+ if (!requestable) {
806
+ // eslint-disable-next-line consistent-return
807
+ return false;
808
+ }
809
+ const queryParts = url.split("!");
810
+ let prefix;
811
+ if (queryParts.length > 1) {
812
+ url = queryParts.pop();
813
+ prefix = queryParts.join("!");
814
+ }
815
+ parsedURLs.push({
816
+ declaration,
817
+ parsed,
818
+ node: getNodeFromUrlFunc(nNode),
819
+ prefix,
820
+ url,
821
+ needQuotes: false,
822
+ needResolve
823
+ });
824
+ } else if (type === "string") {
825
+ needIgnore = getWebpackIgnoreCommentValue(innerIndex, valueNode.nodes);
826
+ if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
827
+ if (needIgnore) {
828
+ // eslint-disable-next-line no-undefined
829
+ needIgnore = undefined;
830
+ }
831
+
832
+ // eslint-disable-next-line no-continue
833
+ continue;
834
+ }
835
+ let url = (0, _utils.normalizeUrl)(value, true);
836
+ const {
837
+ requestable,
838
+ needResolve
839
+ } = shouldHandleURL(url, declaration, result, options);
840
+
841
+ // Do not traverse inside `url`
842
+ if (!requestable) {
843
+ // eslint-disable-next-line consistent-return
844
+ return false;
845
+ }
846
+ const queryParts = url.split("!");
847
+ let prefix;
848
+ if (queryParts.length > 1) {
849
+ url = queryParts.pop();
850
+ prefix = queryParts.join("!");
851
+ }
852
+ parsedURLs.push({
853
+ declaration,
854
+ parsed,
855
+ node: nNode,
856
+ prefix,
857
+ url,
858
+ needQuotes: true,
859
+ needResolve
860
+ });
861
+ }
862
+ }
863
+
864
+ // Do not traverse inside `image-set`
865
+ // eslint-disable-next-line consistent-return
866
+ return false;
867
+ }
868
+ });
869
+
870
+ // eslint-disable-next-line consistent-return
871
+ return parsedURLs;
872
+ }
873
+ const plugin = (options = {}) => {
874
+ return {
875
+ postcssPlugin: "postcss-url-parser",
876
+ prepare(result) {
877
+ const parsedDeclarations = [];
878
+ return {
879
+ Declaration(declaration) {
880
+ const {
881
+ isSupportDataURL,
882
+ isSupportAbsoluteURL
883
+ } = options;
884
+ const parsedURL = parseDeclaration(declaration, "value", result, {
885
+ isSupportDataURL,
886
+ isSupportAbsoluteURL
887
+ });
888
+ if (!parsedURL) {
889
+ return;
890
+ }
891
+ parsedDeclarations.push(...parsedURL);
892
+ },
893
+ async OnceExit() {
894
+ if (parsedDeclarations.length === 0) {
895
+ return;
896
+ }
897
+ const resolvedDeclarations = await Promise.all(parsedDeclarations.map(async parsedDeclaration => {
898
+ const {
899
+ url,
900
+ needResolve
901
+ } = parsedDeclaration;
902
+ if (options.filter) {
903
+ const needKeep = await options.filter(url);
904
+ if (!needKeep) {
905
+ // eslint-disable-next-line consistent-return
906
+ return;
907
+ }
908
+ }
909
+ if (!needResolve) {
910
+ // eslint-disable-next-line consistent-return
911
+ return parsedDeclaration;
912
+ }
913
+ const splittedUrl = url.split(/(\?)?#/);
914
+ const [pathname, query, hashOrQuery] = splittedUrl;
915
+ let hash = query ? "?" : "";
916
+ hash += hashOrQuery ? `#${hashOrQuery}` : "";
917
+ const {
918
+ resolver,
919
+ rootContext
920
+ } = options;
921
+ const request = (0, _utils.requestify)(pathname, rootContext, Boolean(resolver));
922
+ if (!resolver) {
923
+ // eslint-disable-next-line consistent-return
924
+ return {
925
+ ...parsedDeclaration,
926
+ url: request,
927
+ hash
928
+ };
929
+ }
930
+ const resolvedURL = await (0, _utils.resolveRequests)(resolver, options.context, [...new Set([request, url])]);
931
+ if (!resolvedURL) {
932
+ // eslint-disable-next-line consistent-return
933
+ return;
934
+ }
935
+
936
+ // eslint-disable-next-line consistent-return
937
+ return {
938
+ ...parsedDeclaration,
939
+ url: resolvedURL,
940
+ hash
941
+ };
942
+ }));
943
+ const urlToNameMap = new Map();
944
+ const urlToReplacementMap = new Map();
945
+ let hasUrlImportHelper = false;
946
+ for (let index = 0; index <= resolvedDeclarations.length - 1; index++) {
947
+ const item = resolvedDeclarations[index];
948
+ if (!item) {
949
+ // eslint-disable-next-line no-continue
950
+ continue;
951
+ }
952
+ if (!hasUrlImportHelper) {
953
+ options.imports.push({
954
+ type: "get_url_import",
955
+ importName: "___CSS_LOADER_GET_URL_IMPORT___",
956
+ url: options.urlHandler(__nccwpck_require__.ab + "getUrl.js"),
957
+ index: -1
958
+ });
959
+ hasUrlImportHelper = true;
960
+ }
961
+ const {
962
+ url,
963
+ prefix
964
+ } = item;
965
+ const newUrl = prefix ? `${prefix}!${url}` : url;
966
+ let importName = urlToNameMap.get(newUrl);
967
+ if (!importName) {
968
+ importName = `___CSS_LOADER_URL_IMPORT_${urlToNameMap.size}___`;
969
+ urlToNameMap.set(newUrl, importName);
970
+ options.imports.push({
971
+ type: "url",
972
+ importName,
973
+ url: options.resolver ? options.urlHandler(newUrl) : JSON.stringify(newUrl),
974
+ index
975
+ });
976
+ }
977
+ const {
978
+ hash,
979
+ needQuotes
980
+ } = item;
981
+ const replacementKey = JSON.stringify({
982
+ newUrl,
983
+ hash,
984
+ needQuotes
985
+ });
986
+ let replacementName = urlToReplacementMap.get(replacementKey);
987
+ if (!replacementName) {
988
+ replacementName = `___CSS_LOADER_URL_REPLACEMENT_${urlToReplacementMap.size}___`;
989
+ urlToReplacementMap.set(replacementKey, replacementName);
990
+ options.replacements.push({
991
+ replacementName,
992
+ importName,
993
+ hash,
994
+ needQuotes
995
+ });
996
+ }
997
+
998
+ // eslint-disable-next-line no-param-reassign
999
+ item.node.type = "word";
1000
+ // eslint-disable-next-line no-param-reassign
1001
+ item.node.value = replacementName;
1002
+ // eslint-disable-next-line no-param-reassign
1003
+ item.declaration.value = item.parsed.toString();
1004
+ }
1005
+ }
1006
+ };
1007
+ }
1008
+ };
1009
+ };
1010
+ plugin.postcss = true;
1011
+ var _default = exports["default"] = plugin;
1012
+
1013
+ /***/ }),
1014
+
1015
+ /***/ 809:
1016
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
1017
+
1018
+
1019
+
1020
+ Object.defineProperty(exports, "__esModule", ({
1021
+ value: true
1022
+ }));
1023
+ exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
1024
+ exports.camelCase = camelCase;
1025
+ exports.combineRequests = combineRequests;
1026
+ exports.defaultGetLocalIdent = defaultGetLocalIdent;
1027
+ exports.getExportCode = getExportCode;
1028
+ exports.getFilter = getFilter;
1029
+ exports.getImportCode = getImportCode;
1030
+ exports.getModuleCode = getModuleCode;
1031
+ exports.getModulesOptions = getModulesOptions;
1032
+ exports.getModulesPlugins = getModulesPlugins;
1033
+ exports.getPreRequester = getPreRequester;
1034
+ exports.isDataUrl = isDataUrl;
1035
+ exports.isURLRequestable = isURLRequestable;
1036
+ exports.normalizeOptions = normalizeOptions;
1037
+ exports.normalizeSourceMap = normalizeSourceMap;
1038
+ exports.normalizeUrl = normalizeUrl;
1039
+ exports.requestify = requestify;
1040
+ exports.resolveRequests = resolveRequests;
1041
+ exports.shouldUseIcssPlugin = shouldUseIcssPlugin;
1042
+ exports.shouldUseImportPlugin = shouldUseImportPlugin;
1043
+ exports.shouldUseModulesPlugins = shouldUseModulesPlugins;
1044
+ exports.shouldUseURLPlugin = shouldUseURLPlugin;
1045
+ exports.sort = sort;
1046
+ exports.stringifyRequest = stringifyRequest;
1047
+ exports.syntaxErrorFactory = syntaxErrorFactory;
1048
+ exports.warningFactory = warningFactory;
1049
+ var _url = __nccwpck_require__(310);
1050
+ var _path = _interopRequireDefault(__nccwpck_require__(17));
1051
+ var _postcssModulesValues = _interopRequireDefault(__nccwpck_require__(120));
1052
+ var _postcssModulesLocalByDefault = _interopRequireDefault(__nccwpck_require__(204));
1053
+ var _postcssModulesExtractImports = _interopRequireDefault(__nccwpck_require__(494));
1054
+ var _postcssModulesScope = _interopRequireDefault(__nccwpck_require__(242));
1055
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1056
+ /*
1057
+ MIT License http://www.opensource.org/licenses/mit-license.php
1058
+ Author Tobias Koppers @sokra
1059
+ */
1060
+
1061
+ const WEBPACK_IGNORE_COMMENT_REGEXP = exports.WEBPACK_IGNORE_COMMENT_REGEXP = /webpackIgnore:(\s+)?(true|false)/;
1062
+ function stringifyRequest(loaderContext, request) {
1063
+ return JSON.stringify(loaderContext.utils.contextify(loaderContext.context || loaderContext.rootContext, request));
1064
+ }
1065
+
1066
+ // We can't use path.win32.isAbsolute because it also matches paths starting with a forward slash
1067
+ const IS_NATIVE_WIN32_PATH = /^[a-z]:[/\\]|^\\\\/i;
1068
+ const IS_MODULE_REQUEST = /^[^?]*~/;
1069
+ function urlToRequest(url, root) {
1070
+ let request;
1071
+ if (IS_NATIVE_WIN32_PATH.test(url)) {
1072
+ // absolute windows path, keep it
1073
+ request = url;
1074
+ } else if (typeof root !== "undefined" && /^\//.test(url)) {
1075
+ request = root + url;
1076
+ } else if (/^\.\.?\//.test(url)) {
1077
+ // A relative url stays
1078
+ request = url;
1079
+ } else {
1080
+ // every other url is threaded like a relative url
1081
+ request = `./${url}`;
1082
+ }
1083
+
1084
+ // A `~` makes the url an module
1085
+ if (IS_MODULE_REQUEST.test(request)) {
1086
+ request = request.replace(IS_MODULE_REQUEST, "");
1087
+ }
1088
+ return request;
1089
+ }
1090
+
1091
+ // eslint-disable-next-line no-useless-escape
1092
+ const regexSingleEscape = /[ -,.\/:-@[\]\^`{-~]/;
1093
+ const regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
1094
+ const preserveCamelCase = string => {
1095
+ let result = string;
1096
+ let isLastCharLower = false;
1097
+ let isLastCharUpper = false;
1098
+ let isLastLastCharUpper = false;
1099
+ for (let i = 0; i < result.length; i++) {
1100
+ const character = result[i];
1101
+ if (isLastCharLower && /[\p{Lu}]/u.test(character)) {
1102
+ result = `${result.slice(0, i)}-${result.slice(i)}`;
1103
+ isLastCharLower = false;
1104
+ isLastLastCharUpper = isLastCharUpper;
1105
+ isLastCharUpper = true;
1106
+ i += 1;
1107
+ } else if (isLastCharUpper && isLastLastCharUpper && /[\p{Ll}]/u.test(character)) {
1108
+ result = `${result.slice(0, i - 1)}-${result.slice(i - 1)}`;
1109
+ isLastLastCharUpper = isLastCharUpper;
1110
+ isLastCharUpper = false;
1111
+ isLastCharLower = true;
1112
+ } else {
1113
+ isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
1114
+ isLastLastCharUpper = isLastCharUpper;
1115
+ isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
1116
+ }
1117
+ }
1118
+ return result;
1119
+ };
1120
+ function camelCase(input) {
1121
+ let result = input.trim();
1122
+ if (result.length === 0) {
1123
+ return "";
1124
+ }
1125
+ if (result.length === 1) {
1126
+ return result.toLowerCase();
1127
+ }
1128
+ const hasUpperCase = result !== result.toLowerCase();
1129
+ if (hasUpperCase) {
1130
+ result = preserveCamelCase(result);
1131
+ }
1132
+ return result.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, (_, p1) => p1.toUpperCase()).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, m => m.toUpperCase());
1133
+ }
1134
+ function escape(string) {
1135
+ let output = "";
1136
+ let counter = 0;
1137
+ while (counter < string.length) {
1138
+ // eslint-disable-next-line no-plusplus
1139
+ const character = string.charAt(counter++);
1140
+ let value;
1141
+
1142
+ // eslint-disable-next-line no-control-regex
1143
+ if (/[\t\n\f\r\x0B]/.test(character)) {
1144
+ const codePoint = character.charCodeAt();
1145
+ value = `\\${codePoint.toString(16).toUpperCase()} `;
1146
+ } else if (character === "\\" || regexSingleEscape.test(character)) {
1147
+ value = `\\${character}`;
1148
+ } else {
1149
+ value = character;
1150
+ }
1151
+ output += value;
1152
+ }
1153
+ const firstChar = string.charAt(0);
1154
+ if (/^-[-\d]/.test(output)) {
1155
+ output = `\\-${output.slice(1)}`;
1156
+ } else if (/\d/.test(firstChar)) {
1157
+ output = `\\3${firstChar} ${output.slice(1)}`;
1158
+ }
1159
+
1160
+ // Remove spaces after `\HEX` escapes that are not followed by a hex digit,
1161
+ // since they’re redundant. Note that this is only possible if the escape
1162
+ // sequence isn’t preceded by an odd number of backslashes.
1163
+ output = output.replace(regexExcessiveSpaces, ($0, $1, $2) => {
1164
+ if ($1 && $1.length % 2) {
1165
+ // It’s not safe to remove the space, so don’t.
1166
+ return $0;
1167
+ }
1168
+
1169
+ // Strip the space.
1170
+ return ($1 || "") + $2;
1171
+ });
1172
+ return output;
1173
+ }
1174
+ function gobbleHex(str) {
1175
+ const lower = str.toLowerCase();
1176
+ let hex = "";
1177
+ let spaceTerminated = false;
1178
+
1179
+ // eslint-disable-next-line no-undefined
1180
+ for (let i = 0; i < 6 && lower[i] !== undefined; i++) {
1181
+ const code = lower.charCodeAt(i);
1182
+ // check to see if we are dealing with a valid hex char [a-f|0-9]
1183
+ const valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
1184
+ // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
1185
+ spaceTerminated = code === 32;
1186
+ if (!valid) {
1187
+ break;
1188
+ }
1189
+ hex += lower[i];
1190
+ }
1191
+ if (hex.length === 0) {
1192
+ // eslint-disable-next-line no-undefined
1193
+ return undefined;
1194
+ }
1195
+ const codePoint = parseInt(hex, 16);
1196
+ const isSurrogate = codePoint >= 0xd800 && codePoint <= 0xdfff;
1197
+ // Add special case for
1198
+ // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point"
1199
+ // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point
1200
+ if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10ffff) {
1201
+ return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
1202
+ }
1203
+ return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
1204
+ }
1205
+ const CONTAINS_ESCAPE = /\\/;
1206
+ function unescape(str) {
1207
+ const needToProcess = CONTAINS_ESCAPE.test(str);
1208
+ if (!needToProcess) {
1209
+ return str;
1210
+ }
1211
+ let ret = "";
1212
+ for (let i = 0; i < str.length; i++) {
1213
+ if (str[i] === "\\") {
1214
+ const gobbled = gobbleHex(str.slice(i + 1, i + 7));
1215
+
1216
+ // eslint-disable-next-line no-undefined
1217
+ if (gobbled !== undefined) {
1218
+ ret += gobbled[0];
1219
+ i += gobbled[1];
1220
+
1221
+ // eslint-disable-next-line no-continue
1222
+ continue;
1223
+ }
1224
+
1225
+ // Retain a pair of \\ if double escaped `\\\\`
1226
+ // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
1227
+ if (str[i + 1] === "\\") {
1228
+ ret += "\\";
1229
+ i += 1;
1230
+
1231
+ // eslint-disable-next-line no-continue
1232
+ continue;
1233
+ }
1234
+
1235
+ // if \\ is at the end of the string retain it
1236
+ // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
1237
+ if (str.length === i + 1) {
1238
+ ret += str[i];
1239
+ }
1240
+
1241
+ // eslint-disable-next-line no-continue
1242
+ continue;
1243
+ }
1244
+ ret += str[i];
1245
+ }
1246
+ return ret;
1247
+ }
1248
+ function normalizePath(file) {
1249
+ return _path.default.sep === "\\" ? file.replace(/\\/g, "/") : file;
1250
+ }
1251
+
1252
+ // eslint-disable-next-line no-control-regex
1253
+ const filenameReservedRegex = /[<>:"/\\|?*]/g;
1254
+ // eslint-disable-next-line no-control-regex
1255
+ const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g;
1256
+ function escapeLocalIdent(localident) {
1257
+ // TODO simplify?
1258
+ return escape(localident
1259
+ // For `[hash]` placeholder
1260
+ .replace(/^((-?[0-9])|--)/, "_$1").replace(filenameReservedRegex, "-").replace(reControlChars, "-").replace(/\./g, "-"));
1261
+ }
1262
+ function defaultGetLocalIdent(loaderContext, localIdentName, localName, options) {
1263
+ const {
1264
+ context,
1265
+ hashSalt,
1266
+ hashStrategy
1267
+ } = options;
1268
+ const {
1269
+ resourcePath
1270
+ } = loaderContext;
1271
+ let relativeResourcePath = normalizePath(_path.default.relative(context, resourcePath));
1272
+
1273
+ // eslint-disable-next-line no-underscore-dangle
1274
+ if (loaderContext._module && loaderContext._module.matchResource) {
1275
+ relativeResourcePath = `${normalizePath(
1276
+ // eslint-disable-next-line no-underscore-dangle
1277
+ _path.default.relative(context, loaderContext._module.matchResource))}`;
1278
+ }
1279
+
1280
+ // eslint-disable-next-line no-param-reassign
1281
+ options.content = hashStrategy === "minimal-subset" && /\[local\]/.test(localIdentName) ? relativeResourcePath : `${relativeResourcePath}\x00${localName}`;
1282
+ let {
1283
+ hashFunction,
1284
+ hashDigest,
1285
+ hashDigestLength
1286
+ } = options;
1287
+ const matches = localIdentName.match(/\[(?:([^:\]]+):)?(?:(hash|contenthash|fullhash))(?::([a-z]+\d*))?(?::(\d+))?\]/i);
1288
+ if (matches) {
1289
+ const hashName = matches[2] || hashFunction;
1290
+ hashFunction = matches[1] || hashFunction;
1291
+ hashDigest = matches[3] || hashDigest;
1292
+ hashDigestLength = matches[4] || hashDigestLength;
1293
+
1294
+ // `hash` and `contenthash` are same in `loader-utils` context
1295
+ // let's keep `hash` for backward compatibility
1296
+
1297
+ // eslint-disable-next-line no-param-reassign
1298
+ localIdentName = localIdentName.replace(/\[(?:([^:\]]+):)?(?:hash|contenthash|fullhash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi, () => hashName === "fullhash" ? "[fullhash]" : "[contenthash]");
1299
+ }
1300
+ let localIdentHash = "";
1301
+ for (let tier = 0; localIdentHash.length < hashDigestLength; tier++) {
1302
+ // eslint-disable-next-line no-underscore-dangle
1303
+ const hash = loaderContext._compiler.webpack.util.createHash(hashFunction);
1304
+ if (hashSalt) {
1305
+ hash.update(hashSalt);
1306
+ }
1307
+ const tierSalt = Buffer.allocUnsafe(4);
1308
+ tierSalt.writeUInt32LE(tier);
1309
+ hash.update(tierSalt);
1310
+ // TODO: bug in webpack with unicode characters with strings
1311
+ hash.update(Buffer.from(options.content, "utf8"));
1312
+ localIdentHash = (localIdentHash + hash.digest(hashDigest)
1313
+ // Remove all leading digits
1314
+ ).replace(/^\d+/, "")
1315
+ // Replace all slashes with underscores (same as in base64url)
1316
+ .replace(/\//g, "_")
1317
+ // Remove everything that is not an alphanumeric or underscore
1318
+ .replace(/[^A-Za-z0-9_]+/g, "").slice(0, hashDigestLength);
1319
+ }
1320
+
1321
+ // TODO need improve on webpack side, we should allow to pass hash/contentHash without chunk property, also `data` for `getPath` should be looks good without chunk property
1322
+ const ext = _path.default.extname(resourcePath);
1323
+ const base = _path.default.basename(resourcePath);
1324
+ const name = base.slice(0, base.length - ext.length);
1325
+ const data = {
1326
+ filename: _path.default.relative(context, resourcePath),
1327
+ contentHash: localIdentHash,
1328
+ chunk: {
1329
+ name,
1330
+ hash: localIdentHash,
1331
+ contentHash: localIdentHash
1332
+ }
1333
+ };
1334
+
1335
+ // eslint-disable-next-line no-underscore-dangle
1336
+ let result = loaderContext._compilation.getPath(localIdentName, data);
1337
+ if (/\[folder\]/gi.test(result)) {
1338
+ const dirname = _path.default.dirname(resourcePath);
1339
+ let directory = normalizePath(_path.default.relative(context, `${dirname + _path.default.sep}_`));
1340
+ directory = directory.substring(0, directory.length - 1);
1341
+ let folder = "";
1342
+ if (directory.length > 1) {
1343
+ folder = _path.default.basename(directory);
1344
+ }
1345
+ result = result.replace(/\[folder\]/gi, () => folder);
1346
+ }
1347
+ if (options.regExp) {
1348
+ const match = resourcePath.match(options.regExp);
1349
+ if (match) {
1350
+ match.forEach((matched, i) => {
1351
+ result = result.replace(new RegExp(`\\[${i}\\]`, "ig"), matched);
1352
+ });
1353
+ }
1354
+ }
1355
+ return result;
1356
+ }
1357
+ function fixedEncodeURIComponent(str) {
1358
+ return str.replace(/[!'()*]/g, c => `%${c.charCodeAt(0).toString(16)}`);
1359
+ }
1360
+ function isDataUrl(url) {
1361
+ if (/^data:/i.test(url)) {
1362
+ return true;
1363
+ }
1364
+ return false;
1365
+ }
1366
+ const NATIVE_WIN32_PATH = /^[A-Z]:[/\\]|^\\\\/i;
1367
+ function normalizeUrl(url, isStringValue) {
1368
+ let normalizedUrl = url.replace(/^( |\t\n|\r\n|\r|\f)*/g, "").replace(/( |\t\n|\r\n|\r|\f)*$/g, "");
1369
+ if (isStringValue && /\\(\n|\r\n|\r|\f)/.test(normalizedUrl)) {
1370
+ normalizedUrl = normalizedUrl.replace(/\\(\n|\r\n|\r|\f)/g, "");
1371
+ }
1372
+ if (NATIVE_WIN32_PATH.test(url)) {
1373
+ try {
1374
+ normalizedUrl = decodeURI(normalizedUrl);
1375
+ } catch (error) {
1376
+ // Ignore
1377
+ }
1378
+ return normalizedUrl;
1379
+ }
1380
+ normalizedUrl = unescape(normalizedUrl);
1381
+ if (isDataUrl(url)) {
1382
+ // Todo fixedEncodeURIComponent is workaround. Webpack resolver shouldn't handle "!" in dataURL
1383
+ return fixedEncodeURIComponent(normalizedUrl);
1384
+ }
1385
+ try {
1386
+ normalizedUrl = decodeURI(normalizedUrl);
1387
+ } catch (error) {
1388
+ // Ignore
1389
+ }
1390
+ return normalizedUrl;
1391
+ }
1392
+ function requestify(url, rootContext, needToResolveURL = true) {
1393
+ if (needToResolveURL) {
1394
+ if (/^file:/i.test(url)) {
1395
+ return (0, _url.fileURLToPath)(url);
1396
+ }
1397
+ return url.charAt(0) === "/" ? urlToRequest(url, rootContext) : urlToRequest(url);
1398
+ }
1399
+ if (url.charAt(0) === "/" || /^file:/i.test(url)) {
1400
+ return url;
1401
+ }
1402
+
1403
+ // A `~` makes the url an module
1404
+ if (IS_MODULE_REQUEST.test(url)) {
1405
+ return url.replace(IS_MODULE_REQUEST, "");
1406
+ }
1407
+ return url;
1408
+ }
1409
+ function getFilter(filter, resourcePath) {
1410
+ return (...args) => {
1411
+ if (typeof filter === "function") {
1412
+ return filter(...args, resourcePath);
1413
+ }
1414
+ return true;
1415
+ };
1416
+ }
1417
+ function getValidLocalName(localName, exportLocalsConvention) {
1418
+ const result = exportLocalsConvention(localName);
1419
+ return Array.isArray(result) ? result[0] : result;
1420
+ }
1421
+ const IS_MODULES = /\.module(s)?\.\w+$/i;
1422
+ const IS_ICSS = /\.icss\.\w+$/i;
1423
+ function getModulesOptions(rawOptions, esModule, exportType, loaderContext) {
1424
+ if (typeof rawOptions.modules === "boolean" && rawOptions.modules === false) {
1425
+ return false;
1426
+ }
1427
+ const resourcePath =
1428
+ // eslint-disable-next-line no-underscore-dangle
1429
+ loaderContext._module && loaderContext._module.matchResource || loaderContext.resourcePath;
1430
+ let auto;
1431
+ let rawModulesOptions;
1432
+ if (typeof rawOptions.modules === "undefined") {
1433
+ rawModulesOptions = {};
1434
+ auto = true;
1435
+ } else if (typeof rawOptions.modules === "boolean") {
1436
+ rawModulesOptions = {};
1437
+ } else if (typeof rawOptions.modules === "string") {
1438
+ rawModulesOptions = {
1439
+ mode: rawOptions.modules
1440
+ };
1441
+ } else {
1442
+ rawModulesOptions = rawOptions.modules;
1443
+ ({
1444
+ auto
1445
+ } = rawModulesOptions);
1446
+ }
1447
+
1448
+ // eslint-disable-next-line no-underscore-dangle
1449
+ const {
1450
+ outputOptions
1451
+ } = loaderContext._compilation;
1452
+ const needNamedExport = exportType === "css-style-sheet" || exportType === "string";
1453
+ const namedExport = typeof rawModulesOptions.namedExport !== "undefined" ? rawModulesOptions.namedExport : needNamedExport || esModule;
1454
+ const exportLocalsConvention = typeof rawModulesOptions.exportLocalsConvention !== "undefined" ? rawModulesOptions.exportLocalsConvention : namedExport ? "as-is" : "camel-case-only";
1455
+ const modulesOptions = {
1456
+ auto,
1457
+ mode: "local",
1458
+ exportGlobals: false,
1459
+ localIdentName: "[hash:base64]",
1460
+ localIdentContext: loaderContext.rootContext,
1461
+ localIdentHashSalt: outputOptions.hashSalt,
1462
+ localIdentHashFunction: outputOptions.hashFunction,
1463
+ localIdentHashDigest: outputOptions.hashDigest,
1464
+ localIdentHashDigestLength: outputOptions.hashDigestLength,
1465
+ // eslint-disable-next-line no-undefined
1466
+ localIdentRegExp: undefined,
1467
+ // eslint-disable-next-line no-undefined
1468
+ getLocalIdent: undefined,
1469
+ // TODO improve me and enable by default
1470
+ exportOnlyLocals: false,
1471
+ ...rawModulesOptions,
1472
+ exportLocalsConvention,
1473
+ namedExport
1474
+ };
1475
+ if (typeof modulesOptions.exportLocalsConvention === "string") {
1476
+ // eslint-disable-next-line no-shadow
1477
+ const {
1478
+ exportLocalsConvention
1479
+ } = modulesOptions;
1480
+ modulesOptions.exportLocalsConvention = name => {
1481
+ switch (exportLocalsConvention) {
1482
+ case "camel-case":
1483
+ case "camelCase":
1484
+ {
1485
+ return [name, camelCase(name)];
1486
+ }
1487
+ case "camel-case-only":
1488
+ case "camelCaseOnly":
1489
+ {
1490
+ return camelCase(name);
1491
+ }
1492
+ case "dashes":
1493
+ {
1494
+ return [name, dashesCamelCase(name)];
1495
+ }
1496
+ case "dashes-only":
1497
+ case "dashesOnly":
1498
+ {
1499
+ return dashesCamelCase(name);
1500
+ }
1501
+ case "as-is":
1502
+ case "asIs":
1503
+ default:
1504
+ return name;
1505
+ }
1506
+ };
1507
+ }
1508
+ if (typeof modulesOptions.auto === "boolean") {
1509
+ const isModules = modulesOptions.auto && IS_MODULES.test(resourcePath);
1510
+ let isIcss;
1511
+ if (!isModules) {
1512
+ isIcss = IS_ICSS.test(resourcePath);
1513
+ if (isIcss) {
1514
+ modulesOptions.mode = "icss";
1515
+ }
1516
+ }
1517
+ if (!isModules && !isIcss) {
1518
+ return false;
1519
+ }
1520
+ } else if (modulesOptions.auto instanceof RegExp) {
1521
+ const isModules = modulesOptions.auto.test(resourcePath);
1522
+ if (!isModules) {
1523
+ return false;
1524
+ }
1525
+ } else if (typeof modulesOptions.auto === "function") {
1526
+ const {
1527
+ resourceQuery,
1528
+ resourceFragment
1529
+ } = loaderContext;
1530
+ const isModule = modulesOptions.auto(resourcePath, resourceQuery, resourceFragment);
1531
+ if (!isModule) {
1532
+ return false;
1533
+ }
1534
+ }
1535
+ if (typeof modulesOptions.mode === "function") {
1536
+ modulesOptions.mode = modulesOptions.mode(loaderContext.resourcePath, loaderContext.resourceQuery, loaderContext.resourceFragment);
1537
+ }
1538
+ if (needNamedExport) {
1539
+ if (esModule === false) {
1540
+ throw new Error("The 'exportType' option with the 'css-style-sheet' or 'string' value requires the 'esModule' option to be enabled");
1541
+ }
1542
+ if (modulesOptions.namedExport === false) {
1543
+ throw new Error("The 'exportType' option with the 'css-style-sheet' or 'string' value requires the 'modules.namedExport' option to be enabled");
1544
+ }
1545
+ }
1546
+ if (modulesOptions.namedExport === true && esModule === false) {
1547
+ throw new Error("The 'modules.namedExport' option requires the 'esModule' option to be enabled");
1548
+ }
1549
+ return modulesOptions;
1550
+ }
1551
+ function normalizeOptions(rawOptions, loaderContext) {
1552
+ const exportType = typeof rawOptions.exportType === "undefined" ? "array" : rawOptions.exportType;
1553
+ const esModule = typeof rawOptions.esModule === "undefined" ? true : rawOptions.esModule;
1554
+ const modulesOptions = getModulesOptions(rawOptions, esModule, exportType, loaderContext);
1555
+ return {
1556
+ url: typeof rawOptions.url === "undefined" ? true : rawOptions.url,
1557
+ import: typeof rawOptions.import === "undefined" ? true : rawOptions.import,
1558
+ modules: modulesOptions,
1559
+ sourceMap: typeof rawOptions.sourceMap === "boolean" ? rawOptions.sourceMap : loaderContext.sourceMap,
1560
+ importLoaders: typeof rawOptions.importLoaders === "string" ? parseInt(rawOptions.importLoaders, 10) : rawOptions.importLoaders,
1561
+ esModule,
1562
+ exportType
1563
+ };
1564
+ }
1565
+ function shouldUseImportPlugin(options) {
1566
+ if (options.modules.exportOnlyLocals) {
1567
+ return false;
1568
+ }
1569
+ if (typeof options.import === "boolean") {
1570
+ return options.import;
1571
+ }
1572
+ return true;
1573
+ }
1574
+ function shouldUseURLPlugin(options) {
1575
+ if (options.modules.exportOnlyLocals) {
1576
+ return false;
1577
+ }
1578
+ if (typeof options.url === "boolean") {
1579
+ return options.url;
1580
+ }
1581
+ return true;
1582
+ }
1583
+ function shouldUseModulesPlugins(options) {
1584
+ if (typeof options.modules === "boolean" && options.modules === false) {
1585
+ return false;
1586
+ }
1587
+ return options.modules.mode !== "icss";
1588
+ }
1589
+ function shouldUseIcssPlugin(options) {
1590
+ return Boolean(options.modules);
1591
+ }
1592
+ function getModulesPlugins(options, loaderContext) {
1593
+ const {
1594
+ mode,
1595
+ getLocalIdent,
1596
+ localIdentName,
1597
+ localIdentContext,
1598
+ localIdentHashSalt,
1599
+ localIdentHashFunction,
1600
+ localIdentHashDigest,
1601
+ localIdentHashDigestLength,
1602
+ localIdentRegExp,
1603
+ hashStrategy
1604
+ } = options.modules;
1605
+ let plugins = [];
1606
+ try {
1607
+ plugins = [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({
1608
+ mode
1609
+ }), (0, _postcssModulesExtractImports.default)(), (0, _postcssModulesScope.default)({
1610
+ generateScopedName(exportName, resourceFile, rawCss, node) {
1611
+ let localIdent;
1612
+ if (typeof getLocalIdent !== "undefined") {
1613
+ localIdent = getLocalIdent(loaderContext, localIdentName, unescape(exportName), {
1614
+ context: localIdentContext,
1615
+ hashSalt: localIdentHashSalt,
1616
+ hashFunction: localIdentHashFunction,
1617
+ hashDigest: localIdentHashDigest,
1618
+ hashDigestLength: localIdentHashDigestLength,
1619
+ hashStrategy,
1620
+ regExp: localIdentRegExp,
1621
+ node
1622
+ });
1623
+ }
1624
+
1625
+ // A null/undefined value signals that we should invoke the default
1626
+ // getLocalIdent method.
1627
+ if (typeof localIdent === "undefined" || localIdent === null) {
1628
+ localIdent = defaultGetLocalIdent(loaderContext, localIdentName, unescape(exportName), {
1629
+ context: localIdentContext,
1630
+ hashSalt: localIdentHashSalt,
1631
+ hashFunction: localIdentHashFunction,
1632
+ hashDigest: localIdentHashDigest,
1633
+ hashDigestLength: localIdentHashDigestLength,
1634
+ hashStrategy,
1635
+ regExp: localIdentRegExp,
1636
+ node
1637
+ });
1638
+ return escapeLocalIdent(localIdent).replace(/\\\[local\\]/gi, exportName);
1639
+ }
1640
+ return escapeLocalIdent(localIdent);
1641
+ },
1642
+ exportGlobals: options.modules.exportGlobals
1643
+ })];
1644
+ } catch (error) {
1645
+ loaderContext.emitError(error);
1646
+ }
1647
+ return plugins;
1648
+ }
1649
+ const ABSOLUTE_SCHEME = /^[a-z0-9+\-.]+:/i;
1650
+ function getURLType(source) {
1651
+ if (source[0] === "/") {
1652
+ if (source[1] === "/") {
1653
+ return "scheme-relative";
1654
+ }
1655
+ return "path-absolute";
1656
+ }
1657
+ if (IS_NATIVE_WIN32_PATH.test(source)) {
1658
+ return "path-absolute";
1659
+ }
1660
+ return ABSOLUTE_SCHEME.test(source) ? "absolute" : "path-relative";
1661
+ }
1662
+ function normalizeSourceMap(map, resourcePath) {
1663
+ let newMap = map;
1664
+
1665
+ // Some loader emit source map as string
1666
+ // Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification), and then parse the string as JSON.
1667
+ if (typeof newMap === "string") {
1668
+ newMap = JSON.parse(newMap);
1669
+ }
1670
+ delete newMap.file;
1671
+ const {
1672
+ sourceRoot
1673
+ } = newMap;
1674
+ delete newMap.sourceRoot;
1675
+ if (newMap.sources) {
1676
+ // Source maps should use forward slash because it is URLs (https://github.com/mozilla/source-map/issues/91)
1677
+ // We should normalize path because previous loaders like `sass-loader` using backslash when generate source map
1678
+ newMap.sources = newMap.sources.map(source => {
1679
+ // Non-standard syntax from `postcss`
1680
+ if (source.indexOf("<") === 0) {
1681
+ return source;
1682
+ }
1683
+ const sourceType = getURLType(source);
1684
+
1685
+ // Do no touch `scheme-relative` and `absolute` URLs
1686
+ if (sourceType === "path-relative" || sourceType === "path-absolute") {
1687
+ const absoluteSource = sourceType === "path-relative" && sourceRoot ? _path.default.resolve(sourceRoot, normalizePath(source)) : normalizePath(source);
1688
+ return _path.default.relative(_path.default.dirname(resourcePath), absoluteSource);
1689
+ }
1690
+ return source;
1691
+ });
1692
+ }
1693
+ return newMap;
1694
+ }
1695
+ function getPreRequester({
1696
+ loaders,
1697
+ loaderIndex
1698
+ }) {
1699
+ const cache = Object.create(null);
1700
+ return number => {
1701
+ if (cache[number]) {
1702
+ return cache[number];
1703
+ }
1704
+ if (number === false) {
1705
+ cache[number] = "";
1706
+ } else {
1707
+ const loadersRequest = loaders.slice(loaderIndex, loaderIndex + 1 + (typeof number !== "number" ? 0 : number)).map(x => x.request).join("!");
1708
+ cache[number] = `-!${loadersRequest}!`;
1709
+ }
1710
+ return cache[number];
1711
+ };
1712
+ }
1713
+ function getImportCode(imports, options) {
1714
+ let code = "";
1715
+ for (const item of imports) {
1716
+ const {
1717
+ importName,
1718
+ url,
1719
+ icss,
1720
+ type
1721
+ } = item;
1722
+ if (options.esModule) {
1723
+ if (icss && options.modules.namedExport) {
1724
+ code += `import ${options.modules.exportOnlyLocals ? "" : `${importName}, `}* as ${importName}_NAMED___ from ${url};\n`;
1725
+ } else {
1726
+ code += type === "url" ? `var ${importName} = new URL(${url}, import.meta.url);\n` : `import ${importName} from ${url};\n`;
1727
+ }
1728
+ } else {
1729
+ code += `var ${importName} = require(${url});\n`;
1730
+ }
1731
+ }
1732
+ return code ? `// Imports\n${code}` : "";
1733
+ }
1734
+ function normalizeSourceMapForRuntime(map, loaderContext) {
1735
+ const resultMap = map ? map.toJSON() : null;
1736
+ if (resultMap) {
1737
+ delete resultMap.file;
1738
+
1739
+ /* eslint-disable no-underscore-dangle */
1740
+ if (loaderContext._compilation && loaderContext._compilation.options && loaderContext._compilation.options.devtool && loaderContext._compilation.options.devtool.includes("nosources")) {
1741
+ /* eslint-enable no-underscore-dangle */
1742
+
1743
+ delete resultMap.sourcesContent;
1744
+ }
1745
+ resultMap.sourceRoot = "";
1746
+ resultMap.sources = resultMap.sources.map(source => {
1747
+ // Non-standard syntax from `postcss`
1748
+ if (source.indexOf("<") === 0) {
1749
+ return source;
1750
+ }
1751
+ const sourceType = getURLType(source);
1752
+ if (sourceType !== "path-relative") {
1753
+ return source;
1754
+ }
1755
+ const resourceDirname = _path.default.dirname(loaderContext.resourcePath);
1756
+ const absoluteSource = _path.default.resolve(resourceDirname, source);
1757
+ const contextifyPath = normalizePath(_path.default.relative(loaderContext.rootContext, absoluteSource));
1758
+ return `webpack://./${contextifyPath}`;
1759
+ });
1760
+ }
1761
+ return JSON.stringify(resultMap);
1762
+ }
1763
+ function printParams(media, dedupe, supports, layer) {
1764
+ let result = "";
1765
+ if (typeof layer !== "undefined") {
1766
+ result = `, ${JSON.stringify(layer)}`;
1767
+ }
1768
+ if (typeof supports !== "undefined") {
1769
+ result = `, ${JSON.stringify(supports)}${result}`;
1770
+ } else if (result.length > 0) {
1771
+ result = `, undefined${result}`;
1772
+ }
1773
+ if (dedupe) {
1774
+ result = `, true${result}`;
1775
+ } else if (result.length > 0) {
1776
+ result = `, false${result}`;
1777
+ }
1778
+ if (media) {
1779
+ result = `${JSON.stringify(media)}${result}`;
1780
+ } else if (result.length > 0) {
1781
+ result = `""${result}`;
1782
+ }
1783
+ return result;
1784
+ }
1785
+ function getModuleCode(result, api, replacements, options, isTemplateLiteralSupported, loaderContext) {
1786
+ if (options.modules.exportOnlyLocals === true) {
1787
+ return "";
1788
+ }
1789
+ let sourceMapValue = "";
1790
+ if (options.sourceMap) {
1791
+ const sourceMap = result.map;
1792
+ sourceMapValue = `,${normalizeSourceMapForRuntime(sourceMap, loaderContext)}`;
1793
+ }
1794
+ let code = isTemplateLiteralSupported ? convertToTemplateLiteral(result.css) : JSON.stringify(result.css);
1795
+ let beforeCode = `var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(${options.sourceMap ? "___CSS_LOADER_API_SOURCEMAP_IMPORT___" : "___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___"});\n`;
1796
+ for (const item of api) {
1797
+ const {
1798
+ url,
1799
+ layer,
1800
+ supports,
1801
+ media,
1802
+ dedupe
1803
+ } = item;
1804
+ if (url) {
1805
+ // eslint-disable-next-line no-undefined
1806
+ const printedParam = printParams(media, undefined, supports, layer);
1807
+ beforeCode += `___CSS_LOADER_EXPORT___.push([module.id, ${JSON.stringify(`@import url(${url});`)}${printedParam.length > 0 ? `, ${printedParam}` : ""}]);\n`;
1808
+ } else {
1809
+ const printedParam = printParams(media, dedupe, supports, layer);
1810
+ beforeCode += `___CSS_LOADER_EXPORT___.i(${item.importName}${printedParam.length > 0 ? `, ${printedParam}` : ""});\n`;
1811
+ }
1812
+ }
1813
+ for (const item of replacements) {
1814
+ const {
1815
+ replacementName,
1816
+ importName,
1817
+ localName
1818
+ } = item;
1819
+ if (localName) {
1820
+ code = code.replace(new RegExp(replacementName, "g"), () => options.modules.namedExport ? isTemplateLiteralSupported ? `\${ ${importName}_NAMED___[${JSON.stringify(getValidLocalName(localName, options.modules.exportLocalsConvention))}] }` : `" + ${importName}_NAMED___[${JSON.stringify(getValidLocalName(localName, options.modules.exportLocalsConvention))}] + "` : isTemplateLiteralSupported ? `\${${importName}.locals[${JSON.stringify(localName)}]}` : `" + ${importName}.locals[${JSON.stringify(localName)}] + "`);
1821
+ } else {
1822
+ const {
1823
+ hash,
1824
+ needQuotes
1825
+ } = item;
1826
+ const getUrlOptions = [].concat(hash ? [`hash: ${JSON.stringify(hash)}`] : []).concat(needQuotes ? "needQuotes: true" : []);
1827
+ const preparedOptions = getUrlOptions.length > 0 ? `, { ${getUrlOptions.join(", ")} }` : "";
1828
+ beforeCode += `var ${replacementName} = ___CSS_LOADER_GET_URL_IMPORT___(${importName}${preparedOptions});\n`;
1829
+ code = code.replace(new RegExp(replacementName, "g"), () => isTemplateLiteralSupported ? `\${${replacementName}}` : `" + ${replacementName} + "`);
1830
+ }
1831
+ }
1832
+
1833
+ // Indexes description:
1834
+ // 0 - module id
1835
+ // 1 - CSS code
1836
+ // 2 - media
1837
+ // 3 - source map
1838
+ // 4 - supports
1839
+ // 5 - layer
1840
+ return `${beforeCode}// Module\n___CSS_LOADER_EXPORT___.push([module.id, ${code}, ""${sourceMapValue}]);\n`;
1841
+ }
1842
+ const SLASH = "\\".charCodeAt(0);
1843
+ const BACKTICK = "`".charCodeAt(0);
1844
+ const DOLLAR = "$".charCodeAt(0);
1845
+ function convertToTemplateLiteral(str) {
1846
+ let escapedString = "";
1847
+ for (let i = 0; i < str.length; i++) {
1848
+ const code = str.charCodeAt(i);
1849
+ escapedString += code === SLASH || code === BACKTICK || code === DOLLAR ? `\\${str[i]}` : str[i];
1850
+ }
1851
+ return `\`${escapedString}\``;
1852
+ }
1853
+ function dashesCamelCase(str) {
1854
+ return str.replace(/-+(\w)/g, (match, firstLetter) => firstLetter.toUpperCase());
1855
+ }
1856
+ const validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/u;
1857
+ const keywords = new Set(["abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"]);
1858
+ function getExportCode(exports, replacements, icssPluginUsed, options, isTemplateLiteralSupported) {
1859
+ let code = "// Exports\n";
1860
+ if (icssPluginUsed) {
1861
+ let localsCode = "";
1862
+ let identifierId = 0;
1863
+ const addExportToLocalsCode = (names, value) => {
1864
+ const normalizedNames = Array.isArray(names) ? new Set(names) : new Set([names]);
1865
+ for (let name of normalizedNames) {
1866
+ const serializedValue = isTemplateLiteralSupported ? convertToTemplateLiteral(value) : JSON.stringify(value);
1867
+ if (options.modules.namedExport) {
1868
+ if (name === "default") {
1869
+ name = `_${name}`;
1870
+ }
1871
+ if (!validIdentifier.test(name) || keywords.has(name)) {
1872
+ identifierId += 1;
1873
+ const id = `_${identifierId.toString(16)}`;
1874
+ localsCode += `var ${id} = ${serializedValue};\n`;
1875
+ localsCode += `export { ${id} as ${JSON.stringify(name)} };\n`;
1876
+ } else {
1877
+ localsCode += `export var ${name} = ${serializedValue};\n`;
1878
+ }
1879
+ } else {
1880
+ if (localsCode) {
1881
+ localsCode += `,\n`;
1882
+ }
1883
+ localsCode += `\t${JSON.stringify(name)}: ${serializedValue}`;
1884
+ }
1885
+ }
1886
+ };
1887
+ for (const {
1888
+ name,
1889
+ value
1890
+ } of exports) {
1891
+ addExportToLocalsCode(options.modules.exportLocalsConvention(name), value);
1892
+ }
1893
+ for (const item of replacements) {
1894
+ const {
1895
+ replacementName,
1896
+ localName
1897
+ } = item;
1898
+ if (localName) {
1899
+ const {
1900
+ importName
1901
+ } = item;
1902
+ localsCode = localsCode.replace(new RegExp(replacementName, "g"), () => {
1903
+ if (options.modules.namedExport) {
1904
+ return isTemplateLiteralSupported ? `\${${importName}_NAMED___[${JSON.stringify(getValidLocalName(localName, options.modules.exportLocalsConvention))}]}` : `" + ${importName}_NAMED___[${JSON.stringify(getValidLocalName(localName, options.modules.exportLocalsConvention))}] + "`;
1905
+ } else if (options.modules.exportOnlyLocals) {
1906
+ return isTemplateLiteralSupported ? `\${${importName}[${JSON.stringify(localName)}]}` : `" + ${importName}[${JSON.stringify(localName)}] + "`;
1907
+ }
1908
+ return isTemplateLiteralSupported ? `\${${importName}.locals[${JSON.stringify(localName)}]}` : `" + ${importName}.locals[${JSON.stringify(localName)}] + "`;
1909
+ });
1910
+ } else {
1911
+ localsCode = localsCode.replace(new RegExp(replacementName, "g"), () => isTemplateLiteralSupported ? `\${${replacementName}}` : `" + ${replacementName} + "`);
1912
+ }
1913
+ }
1914
+ if (options.modules.exportOnlyLocals) {
1915
+ code += options.modules.namedExport ? localsCode : `${options.esModule ? "export default" : "module.exports ="} {\n${localsCode}\n};\n`;
1916
+ return code;
1917
+ }
1918
+ code += options.modules.namedExport ? localsCode : `___CSS_LOADER_EXPORT___.locals = {${localsCode ? `\n${localsCode}\n` : ""}};\n`;
1919
+ }
1920
+ const isCSSStyleSheetExport = options.exportType === "css-style-sheet";
1921
+ if (isCSSStyleSheetExport) {
1922
+ code += "var ___CSS_LOADER_STYLE_SHEET___ = new CSSStyleSheet();\n";
1923
+ code += "___CSS_LOADER_STYLE_SHEET___.replaceSync(___CSS_LOADER_EXPORT___.toString());\n";
1924
+ }
1925
+ let finalExport;
1926
+ switch (options.exportType) {
1927
+ case "string":
1928
+ finalExport = "___CSS_LOADER_EXPORT___.toString()";
1929
+ break;
1930
+ case "css-style-sheet":
1931
+ finalExport = "___CSS_LOADER_STYLE_SHEET___";
1932
+ break;
1933
+ default:
1934
+ case "array":
1935
+ finalExport = "___CSS_LOADER_EXPORT___";
1936
+ break;
1937
+ }
1938
+ code += `${options.esModule ? "export default" : "module.exports ="} ${finalExport};\n`;
1939
+ return code;
1940
+ }
1941
+ async function resolveRequests(resolve, context, possibleRequests) {
1942
+ return resolve(context, possibleRequests[0]).then(result => result).catch(error => {
1943
+ const [, ...tailPossibleRequests] = possibleRequests;
1944
+ if (tailPossibleRequests.length === 0) {
1945
+ throw error;
1946
+ }
1947
+ return resolveRequests(resolve, context, tailPossibleRequests);
1948
+ });
1949
+ }
1950
+ function isURLRequestable(url, options = {}) {
1951
+ // Protocol-relative URLs
1952
+ if (/^\/\//.test(url)) {
1953
+ return {
1954
+ requestable: false,
1955
+ needResolve: false
1956
+ };
1957
+ }
1958
+
1959
+ // `#` URLs
1960
+ if (/^#/.test(url)) {
1961
+ return {
1962
+ requestable: false,
1963
+ needResolve: false
1964
+ };
1965
+ }
1966
+
1967
+ // Data URI
1968
+ if (isDataUrl(url) && options.isSupportDataURL) {
1969
+ try {
1970
+ decodeURIComponent(url);
1971
+ } catch (ignoreError) {
1972
+ return {
1973
+ requestable: false,
1974
+ needResolve: false
1975
+ };
1976
+ }
1977
+ return {
1978
+ requestable: true,
1979
+ needResolve: false
1980
+ };
1981
+ }
1982
+
1983
+ // `file:` protocol
1984
+ if (/^file:/i.test(url)) {
1985
+ return {
1986
+ requestable: true,
1987
+ needResolve: true
1988
+ };
1989
+ }
1990
+
1991
+ // Absolute URLs
1992
+ if (/^[a-z][a-z0-9+.-]*:/i.test(url) && !NATIVE_WIN32_PATH.test(url)) {
1993
+ if (options.isSupportAbsoluteURL && /^https?:/i.test(url)) {
1994
+ return {
1995
+ requestable: true,
1996
+ needResolve: false
1997
+ };
1998
+ }
1999
+ return {
2000
+ requestable: false,
2001
+ needResolve: false
2002
+ };
2003
+ }
2004
+ return {
2005
+ requestable: true,
2006
+ needResolve: true
2007
+ };
2008
+ }
2009
+ function sort(a, b) {
2010
+ return a.index - b.index;
2011
+ }
2012
+ function combineRequests(preRequest, url) {
2013
+ const idx = url.indexOf("!=!");
2014
+ return idx !== -1 ? url.slice(0, idx + 3) + preRequest + url.slice(idx + 3) : preRequest + url;
2015
+ }
2016
+ function warningFactory(warning) {
2017
+ let message = "";
2018
+ if (typeof warning.line !== "undefined") {
2019
+ message += `(${warning.line}:${warning.column}) `;
2020
+ }
2021
+ if (typeof warning.plugin !== "undefined") {
2022
+ message += `from "${warning.plugin}" plugin: `;
2023
+ }
2024
+ message += warning.text;
2025
+ if (warning.node) {
2026
+ message += `\n\nCode:\n ${warning.node.toString()}\n`;
2027
+ }
2028
+ const obj = new Error(message, {
2029
+ cause: warning
2030
+ });
2031
+ obj.stack = null;
2032
+ return obj;
2033
+ }
2034
+ function syntaxErrorFactory(error) {
2035
+ let message = "\nSyntaxError\n\n";
2036
+ if (typeof error.line !== "undefined") {
2037
+ message += `(${error.line}:${error.column}) `;
2038
+ }
2039
+ if (typeof error.plugin !== "undefined") {
2040
+ message += `from "${error.plugin}" plugin: `;
2041
+ }
2042
+ message += error.file ? `${error.file} ` : "<css input> ";
2043
+ message += `${error.reason}`;
2044
+ const code = error.showSourceCode();
2045
+ if (code) {
2046
+ message += `\n\n${code}\n`;
2047
+ }
2048
+ const obj = new Error(message, {
2049
+ cause: error
2050
+ });
2051
+ obj.stack = null;
2052
+ return obj;
2053
+ }
2054
+
2055
+ /***/ }),
2056
+
2057
+ /***/ 36:
2058
+ /***/ ((module) => {
2059
+
2060
+ module.exports = require("../postcss-value-parser");
2061
+
2062
+ /***/ }),
2063
+
2064
+ /***/ 298:
2065
+ /***/ ((module) => {
2066
+
2067
+ module.exports = require("@rsbuild/shared/icss-utils");
2068
+
2069
+ /***/ }),
2070
+
2071
+ /***/ 494:
2072
+ /***/ ((module) => {
2073
+
2074
+ module.exports = require("@rsbuild/shared/postcss-modules-extract-imports");
2075
+
2076
+ /***/ }),
2077
+
2078
+ /***/ 204:
2079
+ /***/ ((module) => {
2080
+
2081
+ module.exports = require("@rsbuild/shared/postcss-modules-local-by-default");
2082
+
2083
+ /***/ }),
2084
+
2085
+ /***/ 242:
2086
+ /***/ ((module) => {
2087
+
2088
+ module.exports = require("@rsbuild/shared/postcss-modules-scope");
2089
+
2090
+ /***/ }),
2091
+
2092
+ /***/ 120:
2093
+ /***/ ((module) => {
2094
+
2095
+ module.exports = require("@rsbuild/shared/postcss-modules-values");
2096
+
2097
+ /***/ }),
2098
+
2099
+ /***/ 280:
2100
+ /***/ ((module) => {
2101
+
2102
+ module.exports = require("@rsbuild/shared/semver");
2103
+
2104
+ /***/ }),
2105
+
2106
+ /***/ 17:
2107
+ /***/ ((module) => {
2108
+
2109
+ module.exports = require("path");
2110
+
2111
+ /***/ }),
2112
+
2113
+ /***/ 977:
2114
+ /***/ ((module) => {
2115
+
2116
+ module.exports = require("postcss");
2117
+
2118
+ /***/ }),
2119
+
2120
+ /***/ 310:
2121
+ /***/ ((module) => {
2122
+
2123
+ module.exports = require("url");
2124
+
2125
+ /***/ }),
2126
+
2127
+ /***/ 879:
2128
+ /***/ ((module) => {
2129
+
2130
+ module.exports = JSON.parse('{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}');
2131
+
2132
+ /***/ }),
2133
+
2134
+ /***/ 446:
2135
+ /***/ ((module) => {
2136
+
2137
+ module.exports = JSON.parse('{"name":"postcss","version":"8.4.38","description":"Tool for transforming styles with JS plugins","engines":{"node":"^10 || ^12 || >=14"},"exports":{".":{"require":"./lib/postcss.js","import":"./lib/postcss.mjs"},"./lib/at-rule":"./lib/at-rule.js","./lib/comment":"./lib/comment.js","./lib/container":"./lib/container.js","./lib/css-syntax-error":"./lib/css-syntax-error.js","./lib/declaration":"./lib/declaration.js","./lib/fromJSON":"./lib/fromJSON.js","./lib/input":"./lib/input.js","./lib/lazy-result":"./lib/lazy-result.js","./lib/no-work-result":"./lib/no-work-result.js","./lib/list":"./lib/list.js","./lib/map-generator":"./lib/map-generator.js","./lib/node":"./lib/node.js","./lib/parse":"./lib/parse.js","./lib/parser":"./lib/parser.js","./lib/postcss":"./lib/postcss.js","./lib/previous-map":"./lib/previous-map.js","./lib/processor":"./lib/processor.js","./lib/result":"./lib/result.js","./lib/root":"./lib/root.js","./lib/rule":"./lib/rule.js","./lib/stringifier":"./lib/stringifier.js","./lib/stringify":"./lib/stringify.js","./lib/symbols":"./lib/symbols.js","./lib/terminal-highlight":"./lib/terminal-highlight.js","./lib/tokenize":"./lib/tokenize.js","./lib/warn-once":"./lib/warn-once.js","./lib/warning":"./lib/warning.js","./package.json":"./package.json"},"main":"./lib/postcss.js","types":"./lib/postcss.d.ts","keywords":["css","postcss","rework","preprocessor","parser","source map","transform","manipulation","transpiler"],"funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT","homepage":"https://postcss.org/","repository":"postcss/postcss","bugs":{"url":"https://github.com/postcss/postcss/issues"},"dependencies":{"nanoid":"^3.3.7","picocolors":"^1.0.0","source-map-js":"^1.2.0"},"browser":{"./lib/terminal-highlight":false,"source-map-js":false,"path":false,"url":false,"fs":false}}');
2138
+
2139
+ /***/ })
2140
+
2141
+ /******/ });
2142
+ /************************************************************************/
2143
+ /******/ // The module cache
2144
+ /******/ var __webpack_module_cache__ = {};
2145
+ /******/
2146
+ /******/ // The require function
2147
+ /******/ function __nccwpck_require__(moduleId) {
2148
+ /******/ // Check if module is in cache
2149
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
2150
+ /******/ if (cachedModule !== undefined) {
2151
+ /******/ return cachedModule.exports;
2152
+ /******/ }
2153
+ /******/ // Create a new module (and put it into the cache)
2154
+ /******/ var module = __webpack_module_cache__[moduleId] = {
2155
+ /******/ // no module.id needed
2156
+ /******/ // no module.loaded needed
2157
+ /******/ exports: {}
2158
+ /******/ };
2159
+ /******/
2160
+ /******/ // Execute the module function
2161
+ /******/ var threw = true;
2162
+ /******/ try {
2163
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
2164
+ /******/ threw = false;
2165
+ /******/ } finally {
2166
+ /******/ if(threw) delete __webpack_module_cache__[moduleId];
2167
+ /******/ }
2168
+ /******/
2169
+ /******/ // Return the exports of the module
2170
+ /******/ return module.exports;
2171
+ /******/ }
2172
+ /******/
2173
+ /************************************************************************/
2174
+ /******/ /* webpack/runtime/compat */
2175
+ /******/
2176
+ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
2177
+ /******/
2178
+ /************************************************************************/
2179
+ /******/
2180
+ /******/ // startup
2181
+ /******/ // Load entry module and return exports
2182
+ /******/ // This entry module is referenced by other modules so it can't be inlined
2183
+ /******/ var __webpack_exports__ = __nccwpck_require__(169);
2184
+ /******/ module.exports = __webpack_exports__;
2185
+ /******/
2186
+ /******/ })()
2187
+ ;