@flatjs/evolve 1.7.4 → 1.8.1-next.101
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +781 -0
- package/LICENSE +21 -0
- package/README.md +10 -46
- package/dist/constants.d.ts +15 -0
- package/dist/constants.js +1 -0
- package/dist/create-webpack/create-externals.d.ts +4 -0
- package/dist/create-webpack/create-externals.js +1 -0
- package/dist/create-webpack/create-optimization.d.ts +3 -0
- package/dist/create-webpack/create-optimization.js +1 -0
- package/dist/create-webpack/create-output.d.ts +3 -0
- package/dist/create-webpack/create-output.js +1 -0
- package/dist/create-webpack/create-performance.d.ts +2 -0
- package/dist/create-webpack/create-performance.js +1 -0
- package/dist/create-webpack/create-plugins.d.ts +4 -0
- package/dist/create-webpack/create-plugins.js +1 -0
- package/dist/create-webpack/create-resolve.d.ts +2 -0
- package/dist/create-webpack/create-resolve.js +1 -0
- package/dist/create-webpack/create-rule-sets.d.ts +4 -0
- package/dist/create-webpack/create-rule-sets.js +1 -0
- package/dist/create-webpack/load-webpack-config.d.ts +10 -0
- package/dist/create-webpack/load-webpack-config.js +1 -0
- package/dist/create-webpack/rule-sets/constants.d.ts +3 -0
- package/dist/create-webpack/rule-sets/constants.js +1 -0
- package/dist/create-webpack/rule-sets/rule-assets.d.ts +10 -0
- package/dist/create-webpack/rule-sets/rule-assets.js +1 -0
- package/dist/create-webpack/rule-sets/rule-css.d.ts +11 -0
- package/dist/create-webpack/rule-sets/rule-css.js +1 -0
- package/dist/create-webpack/rule-sets/rule-less.d.ts +26 -0
- package/dist/create-webpack/rule-sets/rule-less.js +1 -0
- package/dist/create-webpack/rule-sets/rule-scripts.d.ts +3 -0
- package/dist/create-webpack/rule-sets/rule-scripts.js +1 -0
- package/dist/create-webpack/rule-sets/rule-svg-icon.d.ts +6 -0
- package/dist/create-webpack/rule-sets/rule-svg-icon.js +1 -0
- package/dist/create-webpack/rule-sets/rule-utils.d.ts +7 -0
- package/dist/create-webpack/rule-sets/rule-utils.js +1 -0
- package/dist/create-webpack/types.d.ts +2 -0
- package/dist/create-webpack/types.js +1 -0
- package/dist/default-options.d.ts +2 -0
- package/dist/default-options.js +1 -0
- package/dist/define-config/define-config.d.ts +24 -0
- package/dist/define-config/define-config.js +1 -0
- package/dist/define-config/index.d.ts +1 -0
- package/dist/define-config/index.js +1 -0
- package/dist/dev-server/add-compiler-to-dev-server.d.ts +10 -0
- package/dist/dev-server/add-compiler-to-dev-server.js +1 -0
- package/dist/dev-server/create-app-page-route.d.ts +7 -0
- package/dist/dev-server/create-app-page-route.js +1 -0
- package/dist/dev-server/create-dev-server-compiler-tasks.d.ts +3 -0
- package/dist/dev-server/create-dev-server-compiler-tasks.js +1 -0
- package/dist/dev-server/create-dev-server-entries.d.ts +4 -0
- package/dist/dev-server/create-dev-server-entries.js +1 -0
- package/dist/dev-server/create-dev-server.d.ts +6 -0
- package/dist/dev-server/create-dev-server.js +1 -0
- package/dist/dev-server/index.d.ts +6 -0
- package/dist/dev-server/index.js +1 -0
- package/dist/dev-server/middlewares/create-page-middleware.d.ts +37 -0
- package/dist/dev-server/middlewares/create-page-middleware.js +1 -0
- package/dist/dev-server/middlewares/create-public-assets-middleware.d.ts +2 -0
- package/dist/dev-server/middlewares/create-public-assets-middleware.js +1 -0
- package/dist/dev-server/middlewares/index.d.ts +2 -0
- package/dist/dev-server/middlewares/index.js +1 -0
- package/dist/errors/evolve-build-error.d.ts +4 -0
- package/dist/errors/evolve-build-error.js +1 -0
- package/dist/helpers/allow-px2rem-for-module.d.ts +3 -0
- package/dist/helpers/allow-px2rem-for-module.js +1 -0
- package/dist/helpers/assert-only-single-entry-item.d.ts +7 -0
- package/dist/helpers/assert-only-single-entry-item.js +1 -0
- package/dist/helpers/chunk-entry-map.d.ts +7 -0
- package/dist/helpers/chunk-entry-map.js +1 -0
- package/dist/helpers/enable-bundle-hashname-for-module.d.ts +3 -0
- package/dist/helpers/enable-bundle-hashname-for-module.js +1 -0
- package/dist/helpers/filter-actived-entries.d.ts +16 -0
- package/dist/helpers/filter-actived-entries.js +1 -0
- package/dist/helpers/get-bundle-file-name.d.ts +14 -0
- package/dist/helpers/get-bundle-file-name.js +1 -0
- package/dist/helpers/get-git-root.d.ts +1 -0
- package/dist/helpers/get-git-root.js +1 -0
- package/dist/helpers/get-html-plugin-config.d.ts +20 -0
- package/dist/helpers/get-html-plugin-config.js +1 -0
- package/dist/helpers/get-max-process-tasks.d.ts +1 -0
- package/dist/helpers/get-max-process-tasks.js +1 -0
- package/dist/helpers/get-pacakge-dir.d.ts +1 -0
- package/dist/helpers/get-pacakge-dir.js +1 -0
- package/dist/helpers/index.d.ts +17 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/json-serializer.d.ts +7 -0
- package/dist/helpers/json-serializer.js +1 -0
- package/dist/helpers/merge-babel-options.d.ts +4 -0
- package/dist/helpers/merge-babel-options.js +1 -0
- package/dist/helpers/normalize-entry-map.d.ts +15 -0
- package/dist/helpers/normalize-entry-map.js +1 -0
- package/dist/helpers/normalize-resolve-alias.d.ts +1 -0
- package/dist/helpers/normalize-resolve-alias.js +1 -0
- package/dist/helpers/open-page.d.ts +7 -0
- package/dist/helpers/open-page.js +1 -0
- package/dist/helpers/print-log.d.ts +8 -0
- package/dist/helpers/print-log.js +1 -0
- package/dist/helpers/refresh-evolve-mock-options.d.ts +3 -0
- package/dist/helpers/refresh-evolve-mock-options.js +1 -0
- package/dist/helpers/resolve-entry-map-input-files.d.ts +8 -0
- package/dist/helpers/resolve-entry-map-input-files.js +1 -0
- package/dist/helpers/script-injects.d.ts +11 -0
- package/dist/helpers/script-injects.js +1 -0
- package/dist/helpers/should-enable-react-fast-refresh.d.ts +3 -0
- package/dist/helpers/should-enable-react-fast-refresh.js +1 -0
- package/dist/helpers/split-to-multi-compiler.d.ts +8 -0
- package/dist/helpers/split-to-multi-compiler.js +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/load-config/index.d.ts +1 -0
- package/dist/load-config/index.js +1 -0
- package/dist/load-config/load-evolve-config.d.ts +11 -0
- package/dist/load-config/load-evolve-config.js +1 -0
- package/dist/loaders/loader-icon.cjs +33 -0
- package/dist/loaders/loader-icon.d.cts +1 -0
- package/dist/main/env-verify.d.ts +2 -0
- package/dist/main/env-verify.js +1 -0
- package/dist/main/get-worker-path.d.ts +1 -0
- package/dist/main/get-worker-path.js +1 -0
- package/dist/main/index.d.ts +4 -0
- package/dist/main/index.js +1 -0
- package/dist/main/prepare-build.d.ts +9 -0
- package/dist/main/prepare-build.js +1 -0
- package/dist/main/prepare-serve.d.ts +9 -0
- package/dist/main/prepare-serve.js +1 -0
- package/dist/main/prepare-static.d.ts +7 -0
- package/dist/main/prepare-static.js +1 -0
- package/dist/main/start-build-dynamic.d.ts +20 -0
- package/dist/main/start-build-dynamic.js +1 -0
- package/dist/main/start-build-worker.d.ts +12 -0
- package/dist/main/start-build-worker.js +1 -0
- package/dist/main/start-build.d.ts +5 -0
- package/dist/main/start-build.js +1 -0
- package/dist/main/start-one-entry-build.d.ts +13 -0
- package/dist/main/start-one-entry-build.js +1 -0
- package/dist/main/start-serve.d.ts +11 -0
- package/dist/main/start-serve.js +1 -0
- package/dist/main/start-static.d.ts +10 -0
- package/dist/main/start-static.js +1 -0
- package/dist/minimizer/create-minimizers.d.ts +3 -0
- package/dist/minimizer/create-minimizers.js +1 -0
- package/dist/minimizer/default-options.d.ts +2 -0
- package/dist/minimizer/default-options.js +1 -0
- package/dist/minimizer/image-minimizer.d.ts +16 -0
- package/dist/minimizer/image-minimizer.js +1 -0
- package/dist/minimizer/index.d.ts +1 -0
- package/dist/minimizer/index.js +1 -0
- package/dist/minimizer/terser-minimizer.d.ts +6 -0
- package/dist/minimizer/terser-minimizer.js +3 -0
- package/dist/minimizer/types.d.ts +2 -0
- package/dist/minimizer/types.js +1 -0
- package/dist/plugins/circular-dependency/circular-dependency-plugin.d.ts +54 -0
- package/dist/plugins/circular-dependency/circular-dependency-plugin.js +1 -0
- package/dist/plugins/circular-dependency/index.d.ts +7 -0
- package/dist/plugins/circular-dependency/index.js +1 -0
- package/dist/plugins/clean-webpack/clean-webpack-plugin.d.ts +67 -0
- package/dist/plugins/clean-webpack/clean-webpack-plugin.js +1 -0
- package/dist/plugins/clean-webpack/index.d.ts +9 -0
- package/dist/plugins/clean-webpack/index.js +1 -0
- package/dist/plugins/define-variable/define-variable-plugin.d.ts +14 -0
- package/dist/plugins/define-variable/define-variable-plugin.js +1 -0
- package/dist/plugins/define-variable/index.d.ts +1 -0
- package/dist/plugins/define-variable/index.js +1 -0
- package/dist/plugins/html-inject-scripts/plugin-html-inject-script.d.ts +8 -0
- package/dist/plugins/html-inject-scripts/plugin-html-inject-script.js +1 -0
- package/dist/plugins/module-federation/external-template-remotes.d.ts +4 -0
- package/dist/plugins/module-federation/external-template-remotes.js +1 -0
- package/dist/plugins/module-federation/index.d.ts +1 -0
- package/dist/plugins/module-federation/index.js +1 -0
- package/dist/plugins/module-federation/module-federation.d.ts +4 -0
- package/dist/plugins/module-federation/module-federation.js +1 -0
- package/dist/plugins/multi-html/index.d.ts +4 -0
- package/dist/plugins/multi-html/index.js +1 -0
- package/dist/plugins/multi-html/multi-html-cdn-plugin.d.ts +17 -0
- package/dist/plugins/multi-html/multi-html-cdn-plugin.js +1 -0
- package/dist/plugins/multi-html/multi-html-plugin.d.ts +11 -0
- package/dist/plugins/multi-html/multi-html-plugin.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +1 -0
- package/dist/types/types-ci.d.ts +23 -0
- package/dist/types/types-ci.js +1 -0
- package/dist/types/types-dev-server.d.ts +65 -0
- package/dist/types/types-dev-server.js +1 -0
- package/dist/types/types-entry-map.d.ts +71 -0
- package/dist/types/types-entry-map.js +1 -0
- package/dist/types/types-federation.d.ts +120 -0
- package/dist/types/types-federation.js +1 -0
- package/dist/types/types-loader-options.d.ts +76 -0
- package/dist/types/types-loader-options.js +1 -0
- package/dist/types/types-modular-import.d.ts +38 -0
- package/dist/types/types-modular-import.js +1 -0
- package/dist/types/types-multi-html.d.ts +75 -0
- package/dist/types/types-multi-html.js +1 -0
- package/dist/types/types-options.d.ts +117 -0
- package/dist/types/types-options.js +1 -0
- package/dist/types/types-plugin-options.d.ts +7 -0
- package/dist/types/types-plugin-options.js +1 -0
- package/dist/types/types-webpack.d.ts +96 -0
- package/dist/types/types-webpack.js +1 -0
- package/index.js +1 -4
- package/package.json +118 -61
- package/templates/html-plugin/index-dev.html +23 -46
- package/templates/html-plugin/index-inte.html +23 -46
- package/templates/html-plugin/index-inte2.html +23 -46
- package/templates/html-plugin/index-inte3.html +23 -46
- package/templates/html-plugin/index-inte4.html +23 -46
- package/templates/html-plugin/index-me.html +23 -46
- package/templates/html-plugin/index-prod.html +23 -46
- package/templates/html-plugin/index-rc.html +22 -46
- package/templates/html-plugin/index-uat.html +23 -46
- package/templates/main.html +2 -2
- package/templates/module-404.html +4 -2
- package/templates/module.html +31 -61
- package/cjs/index.js +0 -4
- package/cjs/loader-icon.js +0 -2
- package/index.d.ts +0 -721
@@ -16,65 +16,42 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
-
|
20
|
-
<% if (
|
21
|
-
|
19
|
+
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
22
23
|
<script>
|
23
24
|
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
-
<%= inlineScripts[index]%>
|
25
|
+
<%= inlineScripts[index] %>
|
25
26
|
<% } %>
|
26
27
|
</script>
|
27
|
-
|
28
|
-
<% } %>
|
29
|
-
<!-- / -->
|
30
|
-
|
31
|
-
<% if (viewport) { %>
|
32
|
-
<!-- / -->
|
28
|
+
<% } %> <% if (viewport) { %>
|
33
29
|
<script>
|
34
30
|
<%= viewport %>
|
35
31
|
</script>
|
36
|
-
|
37
|
-
<% } %>
|
38
|
-
|
39
|
-
<!-- / -->
|
40
|
-
<% if (favicon) { %>
|
41
|
-
<!-- / -->
|
32
|
+
<% } %> <% if (favicon) { %>
|
42
33
|
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
43
34
|
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<!-- / -->
|
48
|
-
<% if (headBeforeStyles) { %>
|
49
|
-
<!-- / -->
|
50
|
-
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
51
37
|
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
52
|
-
<% } %>
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<%
|
59
|
-
<!-- / -->
|
60
|
-
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
61
|
-
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
62
|
-
<% } %>
|
63
|
-
<!-- / -->
|
64
|
-
<% } %>
|
65
|
-
<!-- / -->
|
38
|
+
<% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
|
39
|
+
< headBeforeScripts.length; index++) { %>
|
40
|
+
<script
|
41
|
+
crossorigin="anonymous"
|
42
|
+
src="<%= headBeforeScripts[index]%>"
|
43
|
+
></script>
|
44
|
+
<% } %> <% } %>
|
66
45
|
</head>
|
67
46
|
|
68
47
|
<body>
|
69
48
|
<div id="app"></div>
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<% } %>
|
78
|
-
<!-- / -->
|
49
|
+
<% if (bodyAfterScripts) { %> <% for (let index = 0; index <
|
50
|
+
bodyAfterScripts.length; index++) { %>
|
51
|
+
<script
|
52
|
+
crossorigin="anonymous"
|
53
|
+
src="<%= bodyAfterScripts[index]%>"
|
54
|
+
></script>
|
55
|
+
<% } %> <% } %>
|
79
56
|
</body>
|
80
57
|
</html>
|
package/templates/main.html
CHANGED
@@ -101,8 +101,8 @@
|
|
101
101
|
<ul>
|
102
102
|
<% _.forEach(modules, function (module, index) { %>
|
103
103
|
<li>
|
104
|
-
<a href="<%= module.link %>"
|
105
|
-
<span class="<%= module.flagText %>"
|
104
|
+
<a href="<%= module.link %>"> <%= index+1%>. <%= module.name %> </a>
|
105
|
+
<span class="<%= module.flagText %>"> <%= module.flagText %> </span>
|
106
106
|
</li>
|
107
107
|
<% }) %>
|
108
108
|
</ul>
|
@@ -21,18 +21,20 @@
|
|
21
21
|
padding: 0;
|
22
22
|
margin: 0;
|
23
23
|
}
|
24
|
+
|
24
25
|
.name {
|
25
26
|
font-weight: bold;
|
26
27
|
}
|
27
28
|
</style>
|
28
29
|
</head>
|
30
|
+
|
29
31
|
<body>
|
30
32
|
<div class="container">
|
31
33
|
<ul>
|
32
34
|
<% _.forEach(errorMeta, function (error) { %>
|
33
35
|
<li>
|
34
|
-
<span class="name"
|
35
|
-
<span class="value"
|
36
|
+
<span class="name"> <%= error.name %>: </span>
|
37
|
+
<span class="value"> <%= error.value %> </span>
|
36
38
|
</li>
|
37
39
|
<% }) %>
|
38
40
|
</ul>
|
package/templates/module.html
CHANGED
@@ -16,86 +16,56 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
-
|
20
|
-
<% if (
|
21
|
-
|
19
|
+
|
20
|
+
<% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
|
21
|
+
headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
|
22
|
+
} %> <% } %> <% if (inlineScripts) { %>
|
22
23
|
<script>
|
23
24
|
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
-
<%= inlineScripts[index]%>
|
25
|
+
<%= inlineScripts[index] %>
|
25
26
|
<% } %>
|
26
27
|
</script>
|
27
|
-
|
28
|
-
<% } %>
|
29
|
-
<!-- / -->
|
30
|
-
|
31
|
-
<!-- header viewport -->
|
32
|
-
<% if (viewport) { %>
|
28
|
+
<% } %> <% if (viewport) { %>
|
33
29
|
<script>
|
34
30
|
<%= viewport %>
|
35
31
|
</script>
|
36
|
-
<% } %>
|
37
|
-
|
38
|
-
<!-- favicon -->
|
39
|
-
<% if (favicon) { %>
|
40
|
-
<!-- / -->
|
32
|
+
<% } %> <% if (favicon) { %>
|
41
33
|
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
42
34
|
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<% if (headBeforeStyles.length) { %>
|
48
|
-
<!-- header styles for -->
|
49
|
-
<% _.forEach(headBeforeStyles, (css)=> { %>
|
50
|
-
<link href="<%= css %>" rel="stylesheet" />
|
51
|
-
<% }) %>
|
52
|
-
<!-- header styles for end-->
|
53
|
-
<% } %>
|
54
|
-
<!-- header styles -->
|
55
|
-
<% if (styles.length) { %>
|
56
|
-
<!-- header styles for -->
|
57
|
-
<% _.forEach(styles, (css)=> { %>
|
35
|
+
<% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
|
36
|
+
headBeforeStyles.length; index++) { %>
|
37
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
38
|
+
<% } %> <% } %> <% if (styles.length) { %> <% _.forEach(styles, (css)=> { %>
|
58
39
|
<link href="<%= css %>" rel="stylesheet" />
|
59
|
-
<% }) %>
|
60
|
-
|
61
|
-
<% } %>
|
62
|
-
<!-- header headBeforeScripts -->
|
63
|
-
<% if (headBeforeScripts.length) { %>
|
64
|
-
<!-- header headBeforeScripts for -->
|
65
|
-
<% _.forEach(headBeforeScripts, (scriptItem)=> { %>
|
66
|
-
<script crossorigin="anonymous" src="<%= scriptItem %>"></script>
|
67
|
-
<% }) %>
|
68
|
-
<!-- header headBeforeScripts for end-->
|
69
|
-
<% } %>
|
40
|
+
<% }) %> <% } %>
|
41
|
+
|
70
42
|
<script>
|
71
|
-
window.GLOBAL = <%= JSON.stringify(Object.assign(global, {}))%>;
|
43
|
+
window.GLOBAL = <%= JSON.stringify(Object.assign(global, {})) %>;
|
72
44
|
</script>
|
45
|
+
|
46
|
+
<% if (headBeforeScripts) { %> <% for (let index = 0; index <
|
47
|
+
headBeforeScripts.length; index++) { %>
|
48
|
+
<script
|
49
|
+
crossorigin="anonymous"
|
50
|
+
src="<%= headBeforeScripts[index]%>"
|
51
|
+
></script>
|
52
|
+
<% } %> <% } %>
|
73
53
|
</head>
|
54
|
+
|
74
55
|
<body>
|
75
56
|
<div id="app"></div>
|
76
|
-
<!-- module federation -->
|
77
57
|
<% if (moduleFederationScripts.length) { %>
|
78
58
|
<script>
|
79
59
|
<%= moduleFederationScripts %>
|
80
60
|
</script>
|
81
|
-
<% } %>
|
82
|
-
<!-- module federation -->
|
83
|
-
|
84
|
-
<% if (scripts.length) { %>
|
85
|
-
<!-- body script for-->
|
86
|
-
<% _.forEach(scripts, (js) => { %>
|
61
|
+
<% } %> <% if (scripts.length) { %> <% _.forEach(scripts, (js)=> { %>
|
87
62
|
<script src="<%= js %>"></script>
|
88
|
-
<% }) %>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<% _.forEach(bodyAfterScripts, (scriptItem)=> { %>
|
96
|
-
<script crossorigin="anonymous" src="<%= scriptItem %>"></script>
|
97
|
-
<% }) %>
|
98
|
-
<!-- header bodyAfterScripts for end-->
|
99
|
-
<% } %>
|
63
|
+
<% }) %> <% } %> <% if (bodyAfterScripts) { %> <% for (let index = 0; index
|
64
|
+
< bodyAfterScripts.length; index++) { %>
|
65
|
+
<script
|
66
|
+
crossorigin="anonymous"
|
67
|
+
src="<%= bodyAfterScripts[index]%>"
|
68
|
+
></script>
|
69
|
+
<% } %> <% } %>
|
100
70
|
</body>
|
101
71
|
</html>
|
package/cjs/index.js
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
/*! @flatjs/forge MIT @flatjs/evolve */
|
2
|
-
"use strict";var e=require("@flatjs/common");var t=require("lodash");var n=require("@flatjs/mock");var r=require("babel-merge");var s=require("path");var o=require("@flatjs/forge-plugin-postcss-pixel");var a=require("cssnano");var i=require("webpack");var l=require("mini-css-extract-plugin");var c=require("chalk");var p=require("image-minimizer-webpack-plugin");var u=require("terser-webpack-plugin");var d=require("@pmmmwh/react-refresh-webpack-plugin");var m=require("case-sensitive-paths-webpack-plugin");var f=require("fork-ts-checker-webpack-plugin");var h=require("webpack-bundle-analyzer");var v=require("webpack-sources");var g=require("webpack/lib/util/extractUrlAndGlobal");var b=require("html-webpack-plugin");var y=require("webpack-dev-server");var w=require("express");var j=require("https");var C=require("fs");var k=require("better-opn");function S(e){let t;const n=process.env.NODE_ENV==="FLATJS_CORE";switch(e){case"@flatjs/evolve-preset-babel":t=require.resolve(n?"../../../evolve-preset-babel/src/index":e);break}return t}const P=(e,t=false)=>{if(!t){return require(e)}else{return n.loadModule(e)}};const O=(t={usePreset:"react"},n=[])=>{const{usePreset:s,...o}=t;const a=n.map((e=>[require.resolve("babel-plugin-import"),{transformToDefaultImport:false,libraryDirectory:"cjs",style:()=>false,...e},e.libraryName]));const{reactBabelPreset:i,infernoBabelPreset:l,vueBabelPreset:c}=P(S("@flatjs/evolve-preset-babel"));const p=s==="react"?i():s==="vue"?c():l();let u={};try{u=r(p,o);if(u.plugins){u.plugins.unshift(...a)}else{u.plugins=a}}catch(t){e.printError(t)}return Object.assign({babelrc:false},u)};const x=[`https://polyfill.io/v3/polyfill.min.js?features=Array.from%2CArray.isArray%2CArray.of%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.forEach%2CArray.prototype.flatMap%2CArray.prototype.keys%2CArray.prototype.indexOf%2CArray.prototype.includes%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CBlob%2CDataView%2CDate.now%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.freeze%2CObject.fromEntries%2CObject.getOwnPropertySymbols%2CObject.getOwnPropertyNames%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyDescriptor%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.isFrozen%2CObject.isSealed%2CObject.keys%2CObject.values%2CObject.setPrototypeOf%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.apply%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.getPrototypeOf%2CReflect.getOwnPropertyDescriptor%2CReflect.get%2CReflect.ownKeys%2CReflect.isExtensible%2CReflect.has%2CReflect.preventExtensions%2CReflect.set%2CReflect.setPrototypeOf%2CSet%2CString.prototype.trimStart%2CString.prototype.trimEnd%2CString.prototype.trim%2CString.prototype.startsWith%2CString.prototype.repeat%2CString.prototype.replaceAll%2CString.prototype.padStart%2CString.prototype.padEnd%2CMap%2CObject.seal%2Cconsole.groupEnd%2Cconsole.group`];const A={reactDev:[`https://unpkg.com/react@18.2.0/umd/react.development.js`,`https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js`],reactProd:[`https://unpkg.com/react@18.2.0/umd/react.production.min.js`,`https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js`]};const E={reactDev:[`https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js`,`https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js`],reactProd:[`https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js`,`https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js`]};const B={reactDev:[`https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.development.js`,`https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js`],reactProd:[`https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.production.min.js`,`https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js`]};const $={flatjsEvolve:{projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",forBuild:{rejectWarnings:false},forServe:{pageMiddlewares:[],defaultServeGlobalData:()=>({})},target:["web","es5"],liveReload:false,minimizeTerserOptions:{},multiHtmlCdn:{},multiHtmlCdnResolver:()=>undefined,watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},extraPlugins:()=>[],packageInstallChecker:{enabled:false,detectModules:["@dimjs/*"],throwError:false,showAllinstalledGraph:true},pluginLoaderOptions:{babelOptions:{usePreset:"react"},lessOptions:{},cssnanoOptions:{},pixelOptions:{enabled:true,rootValue:{px:100,rpx:1},outputUnit:"rem"},enableBundleHashName:true,modularImports:[]}}};const M=(e,n={},r)=>{var s,o,a;const i=r[1];const l={vue:"Vue",react:"React","react-dom":"ReactDOM"};const c=t.isFunction(n)?n(e):n;const p=t.isFunction((s=i.options)==null?void 0:s.externals)?(o=i.options)==null?void 0:o.externals(e):(a=i.options)==null?void 0:a.externals;return Object.assign({},l,c,p||{})};const q=`(function(d){var j;var b=1;var i=1;var h=750;var c=100;function e(s,o){var q=d.document;var l=q.documentElement;var k=navigator.userAgent;var m=k.toLowerCase().indexOf("android")>-1;i=d.devicePixelRatio||1;if(i>3){i=3}if(m){i=1}console.log("current devicePixelRatio:",i);l.setAttribute("data-dpr",i.toString());var p=q.querySelector('meta[name="viewport"]');if(!p){b=1/i;p=q.createElement("meta");p.setAttribute("name","viewport");q.head.appendChild(p);p.setAttribute(["content","width=device-width,user-scalable=no,initial-scale=",b,",maximum-scale=",b,",minimum-scale=",b].join(""))}function n(){var t=document.documentElement.clientWidth;j=t/o*(s/i)*i;q.documentElement.style.fontSize=String(j)+"px"}var r;d.addEventListener("resize",function(){clearTimeout(r);r=setTimeout(n,300)},false);d.addEventListener("onload",n,false);n()}e(c,h);window.fabricViewport={currRem:j,currDpr:i,currScale:b,dpiPX2px:function f(k){return parseFloat(k.toString())/j*100+"px"},px2DPIpx:function a(k){return parseFloat(k.toString())/100*j+"px"},px2rem:function g(k){return parseFloat(k.toString())/100+"rem"}}})(window);`;const R={title:"",favicon:"",inlineScripts:()=>[],headBeforeStyles:()=>[],headBeforeScripts:e=>[...x,...e.mode==="development"?B.reactDev:B.reactProd],bodyAfterScripts:()=>[],viewport:q,excludeCdnEnvs:["me","dev","ntv"],minify:true,template:s.join(e.getPackageDirSync(__dirname,""),"templates/html-plugin/index-{0}.html")};const F=(e,t,n)=>{let r;if(typeof n!=="undefined"){r=typeof n==="function"?n(t):n}if(typeof r==="undefined"){const n=R[e];return typeof n==="function"?n(t):n}return r};const D=(e,t)=>Object.assign({sourceMap:e,javascriptEnabled:true},t);const T=(e,t={},n={})=>{const r=[a({preset:["default",{discardComments:{removeAll:!e},reduceInitial:false,normalizeWhitespace:!e,...n}]})];if(t.enabled!==false){r.push(o.forgePluginPostcssPixel(t))}return{plugins:r}};const N=(e,t={})=>{const n={hints:e?false:"warning"};return Object.assign(n,t)};const H=(e={})=>({parallel:true,
|
3
|
-
// Disable Extract all or some (use /^\**!|@preserve|@license|@cc_on/i RegExp) comments.
|
4
|
-
extractComments:false,terserOptions:t.merge({ecma:undefined,parse:{},compress:{},mangle:true,module:false,output:null,toplevel:false,nameCache:null,ie8:false,keep_classnames:undefined,keep_fnames:false,safari10:false},e)});const I=(n=process.cwd(),r)=>{const s=e.loadFlatjsConfig(n,"flatjsEvolve","flatjs.evolve.js");return t.merge({},$.flatjsEvolve,s.flatjsEvolve,r,{projectCwd:n})};const W=e=>{try{k(e)}catch(e){console.warn(`Unable to open browser. If you are running in a headless environment\n`)}};function z(e="",t=""){return e.replace(/\/$/,"")+"/"+t.replace(/^\//,"")}function L(e,t){const n=new RegExp("[?&]env(=([^&#]*)|&|#|$)");const r=window.location.href;const s=n.exec(r);let o=s&&s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"prod";o=t(r)||o;const a=e[o]||e["prod"]||[];const i=a[Math.floor(Math.random()*a.length)];return i.replace(/\/$/,"")+"/"}function U(e={},t="prod"){const n=e[t]||e["prod"]||[];return n[Math.floor(Math.random()*n.length)]}function J(e,t=(()=>undefined)){return`window.evolveFetchMicroWidgets = function () {\n var cdnConfig = ${JSON.stringify(e)};\n var cdnResolver = ${t.toString()};\n var cdnFinder = ${L.toString()};\n return (cdnFinder(cdnConfig, cdnResolver) || '').replace(/\\/$/, '');\n }`}function G(e,n){const r=[];for(const[t,n]of Object.entries(e)){r.push({[t]:n.entry})}return r.map((e=>t.merge({},n,{name:Object.keys(e)[0],entry:e})))}const V=(e,n)=>{var r,s;const o=t.merge({},n.pluginLoaderOptions);if(typeof((r=e.options)==null?void 0:r.allowPx2rem)!=="undefined"){t.set(o,"pixelOptions.enabled",e.options.allowPx2rem)}if(typeof((s=e.options)==null?void 0:s.enableBundleHashName)!=="undefined"){t.set(o,"enableBundleHashName",e.options.enableBundleHashName)}const a={...n,pluginLoaderOptions:o};return a};const _=(e,t)=>{var n,r;const s=(n=e.pluginLoaderOptions)==null?void 0:(r=n.pixelOptions)==null?void 0:r.enabled;const o=(t==null?void 0:t.allowPx2rem)??s;return!!o};const K=e=>{if(Object.keys(e).length>1){throw new Error(`Only single one entry map support now while "serve", "build" process!`)}let t=undefined;for(const[n,r]of Object.entries(e)){t=[n,r];break}if(!t){throw new Error(`No entry map found while "serve", "build" process!`)}return t};const X=()=>Date.now().toString();const Y=(e,t,n=true)=>{const r=e==="js"?".js":".css";if(t){return`bundle${r}`}if(n){return`bundle[contenthash]${r}`}return`bundle${r}?${X()}`};const Q=/svg-icons\//;const Z=/\.(jpe?g|png|gif|svg)$/;const ee=/\.(ttf|eot|woff|woff2)(\?.+)?$/;const te=e=>Q.test(e)&&e.endsWith(".svg");const ne=({projectCwd:e,projectVirtualPath:t},n,[r,o])=>{let a=s.dirname(s.join(t,n.replace(/^src/,"")));const i=o.entry.map((t=>s.dirname(s.join(e,t))));const l=s.resolve(e,n);const c=i.find((e=>l.startsWith(e)));if(c){a=s.dirname(s.join(r,s.relative(c,l)))}return`${a}/[name]-[contenthash:8][ext]`};const re=(e,t)=>{const n={test(e){return ee.test(e)||Z.test(e)&&!te(e)},type:"asset",generator:{filename({filename:n}){return ne(e,n,t)}},parser:{dataUrlCondition:{maxSize:4*1024}}};return n};const se=()=>{const e={test(e){return te(e)},use:[{loader:require.resolve("./loader-icon"),options:{svgo:{plugins:[{name:"removeTitle"},{name:"removeDimensions"}]}}}]};return e};function oe(e,n){const r=t.isFunction(e)?e(n):e;if(r.usePreset==="react"&&n){if(r.plugins){r.plugins.push(require.resolve("react-refresh/babel"))}else{r.plugins=[require.resolve("react-refresh/babel")]}}return r}const ae=(e,n={})=>{const{babelOptions:r={},modularImports:s=[]}=n;const o=oe(r,e);const a=t.isFunction(s)?s(e):s;const i=O(o,a);const l={test:/\.(tsx|ts|js|jsx)$/,use:[{loader:require.resolve("babel-loader"),options:i}]};return l};const ie=(e,t={})=>{const n={test:/\.css$/i,use:[{loader:l.loader,options:{esModule:true}},{loader:"css-loader",options:{sourceMap:e}}]};const{pixelOptions:r,cssnanoOptions:s}=t;if(Array.isArray(n.use)){n.use.push({loader:"postcss-loader",options:{postcssOptions:T(e,r,s),sourceMap:e}})}return n};const le=(e,t={})=>{const n=ie(e,t);n.test=/\.less$/i;const r=t.lessOptions;if(Array.isArray(n.use)){n.use.push({loader:require.resolve("less-loader"),options:{sourceMap:e,lessOptions:D(e,r)}})}return n};const ce=(e,t,n,r={})=>{const s=[se(),re(t,n),ie(e,r),le(e,r),ae(e,r)];return s};const pe=new Map;const ue=()=>{const t=[["svgo",{}],["gifsicle",{}],["jpegtran",{}],["pngquant",{}]];const n=t.map((t=>{const n=t[0];try{require.resolve(`imagemin-${n}`);return t}catch(t){if(!pe.get(n)){pe.set(n,true);const t=c.magenta(`"${e.hasYarn()?"yarn add":"npm install"} imagemin-${n} -D"`);e.Logger.warn(`Execute ${t} for assets optimization`,"@flatjs/evolve")}return null}})).filter(Boolean);if(n.length){return new p({minimizer:{implementation:p.imageminMinify,options:{plugins:n}}})}return null};const de=e=>new u(H(e.minimizeTerserOptions));const me=(e,t)=>{if(e){return[]}return[de(t),ue()].filter(Boolean)};class fe{constructor(e={}){this.verbose=void 0;this.cleanStaleWebpackAssets=void 0;this.protectWebpackAssets=void 0;this.cleanAfterEveryBuildPatterns=void 0;this.cleanOnceBeforeBuildPatterns=void 0;this.currentAssets=void 0;this.initialClean=void 0;this.outputPath=void 0;this.verbose=e.verbose===true||false;this.cleanStaleWebpackAssets=e.cleanStaleWebpackAssets===true||e.cleanStaleWebpackAssets===false?e.cleanStaleWebpackAssets:true;this.protectWebpackAssets=e.protectWebpackAssets===true||e.protectWebpackAssets===false?e.protectWebpackAssets:true;this.cleanAfterEveryBuildPatterns=Array.isArray(e.cleanAfterEveryBuildPatterns)?e.cleanAfterEveryBuildPatterns:[];this.cleanOnceBeforeBuildPatterns=Array.isArray(e.cleanOnceBeforeBuildPatterns)?e.cleanOnceBeforeBuildPatterns:["**/*"];this.currentAssets=[];this.initialClean=false;this.outputPath="";this.apply=this.apply.bind(this);this.handleInitial=this.handleInitial.bind(this);this.handleDone=this.handleDone.bind(this);this.removeFiles=this.removeFiles.bind(this)}apply(e){if(!e.options.output||!e.options.output.path){console.warn("clean-webpack-plugin: options.output.path not defined. Plugin disabled...");return}this.outputPath=e.options.output.path;const t=e.hooks;if(this.cleanOnceBeforeBuildPatterns.length!==0){t.emit.tap("clean-webpack-plugin",(e=>{this.handleInitial(e)}))}t.done.tap("clean-webpack-plugin",(e=>{this.handleDone(e)}))}handleInitial(e){if(this.initialClean){return}const t=e.getStats();if(t.hasErrors()){return}this.initialClean=true;this.removeFiles(this.cleanOnceBeforeBuildPatterns)}handleDone(e){if(e.hasErrors()){if(this.verbose){console.warn("clean-webpack-plugin: pausing due to webpack errors")}return}const t=e.toJson({assets:true}).assets||[];const n=t.map((e=>e.name));const r=this.currentAssets.filter((e=>{const t=n.includes(e)===false;return t}));this.currentAssets=n.sort();const s=[];if(this.cleanStaleWebpackAssets===true&&r.length!==0){s.push(...r)}if(this.cleanAfterEveryBuildPatterns.length!==0){s.push(...this.cleanAfterEveryBuildPatterns)}if(s.length!==0){this.removeFiles(s)}}removeFiles(t){try{const n=e.delFilesSync(t,{cwd:this.outputPath,dot:true,ignore:this.protectWebpackAssets?this.currentAssets:[]});if(this.verbose){n.forEach((e=>{const t=s.relative(process.cwd(),e);const n="removed";console.warn(`clean-webpack-plugin: ${n} ${t}`)}))}}catch(e){const t=/Cannot delete files\/folders outside the current working directory\./.test(e.message);if(t){const e="clean-webpack-plugin: Cannot delete files/folders outside the current working directory. Can be overridden with the `dangerouslyAllowCleanPatternsOutsideProject` option.";throw new Error(e)}throw e}}}const he=t=>new fe({verbose:true,cleanOnceBeforeBuildPatterns:[`${s.join(e.ensureSlash(t[0],true),"**/*")}`]});const ve=(e,t)=>new l({filename:`[name]/${Y("css",e,t==null?void 0:t.enableBundleHashName)}`,chunkFilename:"[id].[contenthash].css"});const ge="ExternalTemplateRemotesPlugin";const be=e=>e.constructor.name==="ExternalModule";class ye{apply(e){e.hooks.make.tap(ge,(e=>{const t=[];e.hooks.buildModule.tap(ge,(e=>{if(be(e)&&e.externalType==="script"){t.push(e)}}));e.hooks.afterCodeGeneration.tap(ge,(()=>{t.map((t=>{const n=g(t.request)[0];const r=we(n);const s=e.codeGenerationResults.get(t,undefined).sources;const o=s.get("javascript");if(o){const e=new v.RawSource(o.source().toString().replace(`"${n}"`,r));s.set("javascript",e)}}))}))}))}}function we(e){const t=[];const n=[];let r=false;let s=false;for(const o of e){if(o==="["){if(r){s=true;break}r=true;if(n.length){t.push(`"${n.join("")}"`);n.length=0}}else if(o==="]"){if(!r){s=true;break}r=false;if(n.length){t.push(`${n.join("")}`);n.length=0}n.length=0}else{n.push(o)}}if(r||s){throw new Error(`Invalid template URL "${e}"`)}if(n.length){t.push(`"${n.join("")}"`)}return t.join(" + ")}const je=`HtmlInjectScriptPlugin`;class Ce{constructor(e){this.scripts=void 0;this.scripts=e||[]}processScripts(){return this.scripts.filter(Boolean).map((e=>({tagName:"script",innerHTML:e,voidTag:false,attributes:{},meta:{plugin:"html-inject-script-webpack-plugin"}})))}apply(e){e.hooks.compilation.tap(`${je}_compilation`,(e=>{const t=b.getHooks(e);t.alterAssetTags.tap(`${je}_alterAssetTags`,(e=>{e.assetTags.scripts.unshift(...this.processScripts());return e}))}))}}const ke=(e="")=>e.replace(/[\/-]/gi,"_").toLowerCase();const Se=e=>s.join(e,`micro-remote-module.js`);const Pe=(t,[n,r],s)=>{var o;const a=s.multiHtmlCdn;const l=s.multiHtmlCdnResolver;const c=(o=r.options)==null?void 0:o.moduleFederation;const p=[];if(c){const{remotes:r,...s}=c;const o=Se(n);const u=ke(n);const d=(r||[]).map((({name:t,endpoint:n})=>{const r=ke(t);const s=Se(t);const o=n?e.ensureSlash(n(t),false):`[window.evolveFetchMicroWidgets()]`;return{[r]:`${r}@${o}/${s}`}}));p.push(new i.container.ModuleFederationPlugin({name:u,filename:o,remotes:d,...s}),new ye);if(!t){p.unshift(new Ce([J(a,l)]))}}return p};const Oe={minifyJS:true,removeComments:true,collapseWhitespace:true,collapseBooleanAttributes:false};const xe=(e,t,[n,r],s)=>{const o=[];const{options:a}=r;const i=e?"development":"production";for(const e of s){const r=U(t.multiHtmlCdn,e);const s={mode:i,envCdn:r};o.push(new b({inject:"body",title:F("title",s,a==null?void 0:a.title),chunks:[n],minify:(a==null?void 0:a.minify)===false?false:["me","dev"].includes(e)?false:Oe,filename:`${n}/index${e==="prod"?"":`-${e}`}.html`,template:F("template",s,a==null?void 0:a.template).replace(`{0}`,e),templateParameters:{title:F("title",s,a==null?void 0:a.title),favicon:F("favicon",s,a==null?void 0:a.favicon),inlineScripts:F("inlineScripts",s,a==null?void 0:a.inlineScripts),headBeforeStyles:F("headBeforeStyles",s,a==null?void 0:a.headBeforeStyles),headBeforeScripts:F("headBeforeScripts",s,a==null?void 0:a.headBeforeScripts),bodyAfterScripts:F("bodyAfterScripts",s,a==null?void 0:a.bodyAfterScripts),viewport:_(t,a)?F("viewport",s,a==null?void 0:a.viewport):""},multiCdn:{env:e,disabled:((a==null?void 0:a.excludeCdnEnvs)||["me","dev","ntv"]).includes(e)}}))}return o};class Ae{constructor(e){var t;this.pluginName="FlatEvolveMultiCdnPlugin";this.requireFn=i.RuntimeGlobals.publicPath;this.config=void 0;this.cdnResolver=void 0;this.config=e.multiHtmlCdn;this.cdnResolver=e.multiHtmlCdnResolver||(()=>undefined);if(!((t=this.config)!=null&&t.prod)){throw new Error("We must setup `prod` for each CDN config node!")}}apply(e){e.hooks.thisCompilation.tap(this.pluginName,(e=>{e.mainTemplate.hooks.requireExtensions.tap(this.pluginName,((t,n)=>{var r;const s=[];s.push("// Dynamic assets path override(`@flatjs/evolve`) plugin-multi-html-cdn`)");const o=(r=e.chunkGraph)==null?void 0:r.getTreeRuntimeRequirements(n);if(o&&o.has(i.RuntimeGlobals.requireScope)){s.push("(function () {");s.push(i.Template.indent(`var flatjsMultiCdn = {`));s.push(i.Template.indent(i.Template.indent([`cdnConfig: ${JSON.stringify(this.config||{})},`])));s.push(i.Template.indent(i.Template.indent([`cdnResolver: ${this.cdnResolver.toString()},`])));s.push(i.Template.indent(i.Template.indent([`cdnFinder: ${L.toString()}`])));s.push(i.Template.indent(`};`));s.push(i.Template.indent(`${this.requireFn} = flatjsMultiCdn.cdnFinder(flatjsMultiCdn.cdnConfig, flatjsMultiCdn.cdnResolver) || ${this.requireFn};`));s.push("})();")}return i.Template.asString(s)}))}));e.hooks.compilation.tap(this.pluginName,(e=>{b.getHooks(e).beforeAssetTagGeneration.tap(this.pluginName,(e=>{const{assets:t}=e;const{userOptions:n}=e.plugin;const r=n.multiCdn;const o=t.publicPath;const a=t.js.map((e=>{if(r.disabled){return s.basename(e)}const t=U(this.config,r.env);return z(t,e.replace(o,""))}));const i=t.css.map((e=>{if(r.disabled){return s.basename(e)}const t=U(this.config,r.env);return z(t,e.replace(o,""))}));e.assets.js=a;e.assets.css=i;return e}))}))}}const Ee=(e,t,n)=>{var r;const s=[new m];if(n.analyzer){s.push(new h.BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...n.analyzer}))}s.push(new f({async:e}));s.push(ve(e,n.pluginLoaderOptions));s.push(...Pe(e,t,n));if(!e){s.push(he(t));const r=Object.keys(n.multiHtmlCdn);s.push(...xe(e,n,t,r));s.push(new Ae(n))}const o=oe(((r=n.pluginLoaderOptions)==null?void 0:r.babelOptions)||{},e);if(o.usePreset==="react"&&e){s.push(new d({overlay:false}))}return s};const Be=(n,r,o,a)=>{process.env.NODE_ENV=n;r=r==="auto"?"auto":e.ensureSlash(r,true);const i=n==="development";const l=a.projectCwd;const c=a.pluginLoaderOptions;const p=a.watchOptions;const u=K(o);const d=t.isFunction(a.extraLoaders)?a.extraLoaders(i):a.extraLoaders;const m=[...ce(i,a,u,c),...d||[]];const f=t.isFunction(a.extraPlugins)?a.extraPlugins(i):a.extraPlugins;const h=t.isFunction(a.resolveAlias)?a.resolveAlias(i):a.resolveAlias;const v=[...Ee(i,u,a),...f||[]];const g={mode:n,target:a.target,stats:{preset:"minimal"},infrastructureLogging:{level:"warn"},devtool:i?"eval-source-map":a.productionSourceMap||false,plugins:v,watchOptions:p,context:l,cache:{type:"memory"},resolve:{mainFields:["browser","module","main"],extensions:[".ts",".tsx",".js",".json",".vue"],alias:h||{}},module:{rules:m},externals:M(i,a.externals,u),performance:N(i,a.performance),output:{devtoolModuleFilenameTemplate:({namespace:e,resourcePath:t})=>`webpack:///${s.join(e,t)}`,environment:{},pathinfo:false,path:s.join(l,"public"),publicPath:r,filename:`[name]/${Y("js",i,c==null?void 0:c.enableBundleHashName)}`,chunkFilename:`[id].[contenthash].js`},optimization:{nodeEnv:i?"development":"production",chunkIds:i?"named":"named",moduleIds:i?"named":"named",minimize:a.minimize===false?false:i?false:true,minimizer:me(i,a),splitChunks:{name:false,chunks:"all",minSize:25e5,cacheGroups:{default:false,defaultVendors:false}}}};return g};const $e=(e,t,n)=>{const r=Be("production",t,e,n);const s=G(e,r);if(s.length>1){throw new Error("startSingleEntryBuild() only support `compiler` at a time")}const o=s[0];return new Promise(((e,t)=>{i(o,((r,s)=>{var a,i;if(r){return t(r)}const l=s==null?void 0:s.toJson();if(l!=null&&(a=l.errors)!=null&&a.length){return t(l.errors)}if(n.forBuild.rejectWarnings&&l!=null&&(i=l.warnings)!=null&&i.length){return t(l.warnings)}e({name:o.name,warningStats:l==null?void 0:l.warnings})}))}))};const Me=async(t,n)=>{var r,s;if((r=n.packageInstallChecker)!=null&&r.enabled){var o,a,i;await e.installPackageChecker({cwd:process.cwd(),modules:(o=n.packageInstallChecker)==null?void 0:o.detectModules,throwError:(a=n.packageInstallChecker)==null?void 0:a.throwError,showAllinstalledGraph:(i=n.packageInstallChecker)==null?void 0:i.showAllinstalledGraph})}await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:n.needVerifyPackages||{}});const l=((s=n.multiHtmlCdn)==null?void 0:s.prod)||[];const c=[];const p=e.ensureSlash(l[Math.floor(Math.random()*l.length)],true);for(const[e,r]of Object.entries(t)){var u;const t=V(r,n);const s={[e]:r};const o=(u=r.options)==null?void 0:u.useRelativeAssetPath;c.push($e(s,o?"auto":p,t))}return Promise.all(c)};const qe=async(n,r,o)=>{const a=await e.getPackageDir(__dirname,process.cwd());const i=C.readFileSync(s.join(a,"./templates/main.html"),"utf-8");const l=[];for(const[t,s]of Object.entries(o.entryMap)){var c;const a=((c=s.options)==null?void 0:c.servePageMainLinkFn)||(e=>e);const i=Object.keys(n).includes(t);const p=o.projectVirtualPath.replace(/^\//,"");l.push({name:t.replace(p,"").replace(/^\//,""),link:a(e.urlJoin(r,["pages",t],{env:"me"}),{hostUri:r,entryName:t,virtualPath:p}),flagText:i?"serve":"static",isServed:i?1:0})}const p={title:"@flatjs/evolve",modules:l.sort(((e,t)=>t.isServed-e.isServed))};return t.template(i)(p)};const Re=async(n,r,o,a,i,l)=>{const c=l.entryMap;const p=Object.keys(c).sort(((e,t)=>t.length-e.length));const u=await e.getPackageDir(__dirname,process.cwd());const d=p.find((t=>e.ensureSlash(o.path.replace(/^\//,""),true).startsWith(e.ensureSlash(t,true))));if(!d){const e=C.readFileSync(s.join(u,`./templates/module-404.html`),"utf-8");return t.template(e)({title:"404 Not Found",errorMeta:[{name:`@flatjs/evolve workspace`,value:u},{name:`served entry names`,value:JSON.stringify(p)},{name:`module path`,value:`${o.path}`}]})}const m=c[d];const f=m.options;const h=n[d];const v=(h==null?void 0:h.devServerHostUri)||a;const g=(f==null?void 0:f.serveModuleTemplate)||"./templates/module.html";const b=s.join(l.projectCwd,"./templates/module.html");const y=C.readFileSync(s.isAbsolute(g)?g:e.existsSync(b)?b:s.join(u,"./templates/module.html"),"utf-8");const w=l.forServe;const j=w.defaultServeGlobalData?w.defaultServeGlobalData(m,a):{};const k={mode:r,envCdn:e.urlJoin(a,["public"])};const S={title:F("title",k,f==null?void 0:f.title),favicon:F("favicon",k,f==null?void 0:f.favicon),viewport:_(l,f)?F("viewport",k,f==null?void 0:f.viewport):"",inlineScripts:F("inlineScripts",k,f==null?void 0:f.inlineScripts),headBeforeStyles:F("headBeforeStyles",k,f==null?void 0:f.headBeforeStyles),headBeforeScripts:F("headBeforeScripts",k,f==null?void 0:f.headBeforeScripts),bodyAfterScripts:F("bodyAfterScripts",k,f==null?void 0:f.bodyAfterScripts),moduleFederationScripts:J({me:[e.urlJoin(a,["public"])]},l.multiHtmlCdnResolver),global:{hostUrl:a,apiBase:e.urlJoin(a,[i]),routeBaseName:s.join(`/pages`,d),moduleName:d.replace(l.projectVirtualPath,"").replace(/^\//,""),...j,...(f==null?void 0:f.serveGlobalData)||{}},styles:[e.urlJoin(v,[s.join("public",d,"bundle.css")])],scripts:[e.urlJoin(v,[s.join("public",d,"bundle.js")])]};return t.template(y)(S)};const Fe=(e,t,n,r,s)=>{const o=async(o,a)=>{let i;if(o.path==="/"){i=await qe(r,t,s)}else{i=await Re(r,e,o,t,n,s)}a.send(i)};return(s.forServe.pageMiddlewares||[]).concat(o)};const De=t=>async(n,r)=>{const o=n.baseUrl;if(!o.startsWith("/public")){r.redirect("/pages")}else{const n=await e.fileWalk(s.join("public/","**/*.{js,css}"),{cwd:t});const a=s.extname(o);const i=n.find((e=>s.extname(e)===a&&e.indexOf(o.replace(/\.(js|css)$/,""))!==-1));if(i){r.sendFile(i)}else{r.sendFile(s.join(t,o))}}};const Te=(e,t="development",r,s,o,a,i)=>{const l=w();n.attachMockMiddlewares(l,i,a.projectCwd);l.set("hostUri",s);l.use("/pages",...Fe(t,s,i.apiContext||"api",o,a));l.use("*",De(e));return new Promise((e=>{const t=a.https?j.createServer(a.https,l):l;t.listen(r,(()=>{e(true)}))}))};const Ne=(e,t,n)=>{const{projectCwd:r,https:o,liveReload:a}=n;const i=new y({server:{type:o?"https":"http",options:{...o}},open:false,compress:true,port:t,hot:!a,liveReload:a,allowedHosts:"all",static:{directory:`${s.join(r,"/public")}`},headers:{"Access-Control-Allow-Origin":"*"},client:{progress:true,overlay:{errors:false,runtimeErrors:false,warnings:false}}},e);return new Promise(((e,t)=>{i.startCallback((n=>{if(n){return t(n)}e(true)}))}))};const He=async(r,o,a,l)=>{var p;if((p=a.packageInstallChecker)!=null&&p.enabled){var u,d,m;await e.installPackageChecker({cwd:r,modules:(u=a.packageInstallChecker)==null?void 0:u.detectModules,throwError:(d=a.packageInstallChecker)==null?void 0:d.throwError,showAllinstalledGraph:(m=a.packageInstallChecker)==null?void 0:m.showAllinstalledGraph})}await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:a.needVerifyPackages||{}});if(a.https){l.https=a.https}const{mockPort:f,hostUri:h}=await n.prepareMockDomain(l);const v=e.urlJoin(h,["/pages"]);let g=f;const b=[];const y={};for(const[e]of Object.entries(o)){g=g+1;const{mockPort:r,hostUri:s}=await n.prepareMockDomain(t.merge({},l,{port:g}));y[e]={devServerPort:r,devServerHostUri:s}}for(const[t,n]of Object.entries(o)){var w,j;const o=((w=n.options)==null?void 0:(j=w.moduleFederation)==null?void 0:j.remotes)||[];o.forEach((t=>{t.endpoint=t=>{var n;return e.urlJoin(((n=y[t])==null?void 0:n.devServerHostUri)||h,["/public"])}}));const{devServerPort:l,devServerHostUri:p}=y[t];const u=e.urlJoin(p,["public"]);const d={[t]:n};const m=V(n,a);const f=Be("development",u,d,m);const g=i.webpack(G(d,f)[0]);b.push(Ne(g,l,a));const C=c.bgBlack(`[${c.magenta("@flatjs")}:${c.bold(g.name||"")}]`);g.hooks.invalid.tap("fileChange",(e=>{console.log(C,`${"file change".padEnd(12," ")} ➩ ${c.cyan(s.relative(r,e||""))}`)}));g.hooks.done.tap("compileDone",(()=>{console.log(C,`${"serve page".padEnd(12," ")} ➩ ${c.cyan(v)}`)}))}await Te(r,"development",f,h,y,a,l);W(v);return Promise.all(b).then((()=>true))};const Ie=async(t,r,s)=>{if(r.https){s.https=r.https}const{mockPort:o,hostUri:a}=await n.prepareMockDomain(s);const i=e.urlJoin(a,["/pages"]);return Te(t,"development",o,a,{},r,s).then((e=>{const t=c.bgBlack(`[${c.magenta("@flatjs")}:`);console.log(t,`${"serve page".padEnd(12," ")} ➩ ${c.cyan(i)}`);return e}))};const We=(e={},n={})=>{const r={};for(const[s,o]of Object.entries(n)){const n={options:{}};if(e[s]){r[s]=t.merge({},n,o,e[s])}t.merge(o,n)}return r};const ze=(e,t,n={})=>{const r=I(e,n);const s=We(t,r.entryMap);return Me(s,r)};const Le=(e,t,r={},s={})=>{const o=I(e,r);const a=n.loadMockConfiguration(e,s);const i=We(t,o.entryMap);return He(e,i,o,a)};const Ue=(e,t={},r={})=>{const s=I(e,t);const o=n.loadMockConfiguration(e,r);return Ie(e,s,o)};exports.cdnBoot=B;exports.cdnJsDelivr=E;exports.cdnUnpkg=A;exports.createPageMiddleware=Fe;exports.createPublicAssetsMiddleware=De;exports.defaultFlatjsConfig=$;exports.evolveBuild=ze;exports.evolveServe=Le;exports.evolveStatic=Ue;exports.flatBabelOptions=O;exports.flatExternalOptions=M;exports.flatLessLoaderOptions=D;exports.flatPerformanceOptions=N;exports.flatPostcssLoaderOptions=T;exports.getHtmlPluginConfig=F;exports.loadEvolveConfiguration=I;exports.loadModule=P;exports.normalizeEntries=We;exports.polyfill=x;exports.terserOptions=H;exports.viewportScripts=q;
|
package/cjs/loader-icon.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
/*! @flatjs/forge MIT @flatjs/evolve */
|
2
|
-
"use strict";require("path");var u=require("svgo");function D(u){if(u.__esModule)return u;var D=u.default;if(typeof D=="function"){var e=function u(){if(this instanceof u){var e=[null];e.push.apply(e,arguments);var t=Function.bind.apply(D,e);return new t}return D.apply(this,arguments)};e.prototype=D.prototype}else e={};Object.defineProperty(e,"__esModule",{value:true});Object.keys(u).forEach((function(D){var t=Object.getOwnPropertyDescriptor(u,D);Object.defineProperty(e,D,t.get?t:{enumerable:true,get:function(){return u[D]}})}));return e}var e=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;var t=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;var r=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;var n={Space_Separator:e,ID_Start:t,ID_Continue:r};var F={isSpaceSeparator(u){return typeof u==="string"&&n.Space_Separator.test(u)},isIdStartChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||n.ID_Start.test(u))},isIdContinueChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u===""||u===""||n.ID_Continue.test(u))},isDigit(u){return typeof u==="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u==="string"&&/[0-9A-Fa-f]/.test(u)}};let C;let A;let i;let E;let s;let o;let c;let a;let f;var B=function u(D,e){C=String(D);A="start";i=[];E=0;s=1;o=0;c=undefined;a=undefined;f=undefined;do{c=w();O[A]()}while(c.type!=="eof");if(typeof e==="function"){return l({"":f},"",e)}return f};function l(u,D,e){const t=u[D];if(t!=null&&typeof t==="object"){if(Array.isArray(t)){for(let u=0;u<t.length;u++){const D=String(u);const r=l(t,D,e);if(r===undefined){delete t[D]}else{Object.defineProperty(t,D,{value:r,writable:true,enumerable:true,configurable:true})}}}else{for(const u in t){const D=l(t,u,e);if(D===undefined){delete t[u]}else{Object.defineProperty(t,u,{value:D,writable:true,enumerable:true,configurable:true})}}}}return e.call(u,D,t)}let h;let p;let d;let g;let m;function w(){h="default";p="";d=false;g=1;for(;;){m=y();const u=v[h]();if(u){return u}}}function y(){if(C[E]){return String.fromCodePoint(C.codePointAt(E))}}function b(){const u=y();if(u==="\n"){s++;o=0}else if(u){o+=u.length}else{o++}if(u){E+=u.length}return u}const v={default(){switch(m){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":b();return;case"/":b();h="comment";return;case undefined:b();return x("eof")}if(F.isSpaceSeparator(m)){b();return}return v[A]()},comment(){switch(m){case"*":b();h="multiLineComment";return;case"/":b();h="singleLineComment";return}throw k(b())},multiLineComment(){switch(m){case"*":b();h="multiLineCommentAsterisk";return;case undefined:throw k(b())}b()},multiLineCommentAsterisk(){switch(m){case"*":b();return;case"/":b();h="default";return;case undefined:throw k(b())}b();h="multiLineComment"},singleLineComment(){switch(m){case"\n":case"\r":case"\u2028":case"\u2029":b();h="default";return;case undefined:b();return x("eof")}b()},value(){switch(m){case"{":case"[":return x("punctuator",b());case"n":b();N("ull");return x("null",null);case"t":b();N("rue");return x("boolean",true);case"f":b();N("alse");return x("boolean",false);case"-":case"+":if(b()==="-"){g=-1}h="sign";return;case".":p=b();h="decimalPointLeading";return;case"0":p=b();h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":p=b();h="decimalInteger";return;case"I":b();N("nfinity");return x("numeric",Infinity);case"N":b();N("aN");return x("numeric",NaN);case'"':case"'":d=b()==='"';p="";h="string";return}throw k(b())},identifierNameStartEscape(){if(m!=="u"){throw k(b())}b();const u=I();switch(u){case"$":case"_":break;default:if(!F.isIdStartChar(u)){throw V()}break}p+=u;h="identifierName"},identifierName(){switch(m){case"$":case"_":case"":case"":p+=b();return;case"\\":b();h="identifierNameEscape";return}if(F.isIdContinueChar(m)){p+=b();return}return x("identifier",p)},identifierNameEscape(){if(m!=="u"){throw k(b())}b();const u=I();switch(u){case"$":case"_":case"":case"":break;default:if(!F.isIdContinueChar(u)){throw V()}break}p+=u;h="identifierName"},sign(){switch(m){case".":p=b();h="decimalPointLeading";return;case"0":p=b();h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":p=b();h="decimalInteger";return;case"I":b();N("nfinity");return x("numeric",g*Infinity);case"N":b();N("aN");return x("numeric",NaN)}throw k(b())},zero(){switch(m){case".":p+=b();h="decimalPoint";return;case"e":case"E":p+=b();h="decimalExponent";return;case"x":case"X":p+=b();h="hexadecimal";return}return x("numeric",g*0)},decimalInteger(){switch(m){case".":p+=b();h="decimalPoint";return;case"e":case"E":p+=b();h="decimalExponent";return}if(F.isDigit(m)){p+=b();return}return x("numeric",g*Number(p))},decimalPointLeading(){if(F.isDigit(m)){p+=b();h="decimalFraction";return}throw k(b())},decimalPoint(){switch(m){case"e":case"E":p+=b();h="decimalExponent";return}if(F.isDigit(m)){p+=b();h="decimalFraction";return}return x("numeric",g*Number(p))},decimalFraction(){switch(m){case"e":case"E":p+=b();h="decimalExponent";return}if(F.isDigit(m)){p+=b();return}return x("numeric",g*Number(p))},decimalExponent(){switch(m){case"+":case"-":p+=b();h="decimalExponentSign";return}if(F.isDigit(m)){p+=b();h="decimalExponentInteger";return}throw k(b())},decimalExponentSign(){if(F.isDigit(m)){p+=b();h="decimalExponentInteger";return}throw k(b())},decimalExponentInteger(){if(F.isDigit(m)){p+=b();return}return x("numeric",g*Number(p))},hexadecimal(){if(F.isHexDigit(m)){p+=b();h="hexadecimalInteger";return}throw k(b())},hexadecimalInteger(){if(F.isHexDigit(m)){p+=b();return}return x("numeric",g*Number(p))},string(){switch(m){case"\\":b();p+=S();return;case'"':if(d){b();return x("string",p)}p+=b();return;case"'":if(!d){b();return x("string",p)}p+=b();return;case"\n":case"\r":throw k(b());case"\u2028":case"\u2029":M(m);break;case undefined:throw k(b())}p+=b()},start(){switch(m){case"{":case"[":return x("punctuator",b())}h="value"},beforePropertyName(){switch(m){case"$":case"_":p=b();h="identifierName";return;case"\\":b();h="identifierNameStartEscape";return;case"}":return x("punctuator",b());case'"':case"'":d=b()==='"';h="string";return}if(F.isIdStartChar(m)){p+=b();h="identifierName";return}throw k(b())},afterPropertyName(){if(m===":"){return x("punctuator",b())}throw k(b())},beforePropertyValue(){h="value"},afterPropertyValue(){switch(m){case",":case"}":return x("punctuator",b())}throw k(b())},beforeArrayValue(){if(m==="]"){return x("punctuator",b())}h="value"},afterArrayValue(){switch(m){case",":case"]":return x("punctuator",b())}throw k(b())},end(){throw k(b())}};function x(u,D){return{type:u,value:D,line:s,column:o}}function N(u){for(const D of u){const u=y();if(u!==D){throw k(b())}b()}}function S(){const u=y();switch(u){case"b":b();return"\b";case"f":b();return"\f";case"n":b();return"\n";case"r":b();return"\r";case"t":b();return"\t";case"v":b();return"\v";case"0":b();if(F.isDigit(y())){throw k(b())}return"\0";case"x":b();return P();case"u":b();return I();case"\n":case"\u2028":case"\u2029":b();return"";case"\r":b();if(y()==="\n"){b()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw k(b());case undefined:throw k(b())}return b()}function P(){let u="";let D=y();if(!F.isHexDigit(D)){throw k(b())}u+=b();D=y();if(!F.isHexDigit(D)){throw k(b())}u+=b();return String.fromCodePoint(parseInt(u,16))}function I(){let u="";let D=4;while(D-- >0){const D=y();if(!F.isHexDigit(D)){throw k(b())}u+=b()}return String.fromCodePoint(parseInt(u,16))}const O={start(){if(c.type==="eof"){throw $()}j()},beforePropertyName(){switch(c.type){case"identifier":case"string":a=c.value;A="afterPropertyName";return;case"punctuator":_();return;case"eof":throw $()}},afterPropertyName(){if(c.type==="eof"){throw $()}A="beforePropertyValue"},beforePropertyValue(){if(c.type==="eof"){throw $()}j()},beforeArrayValue(){if(c.type==="eof"){throw $()}if(c.type==="punctuator"&&c.value==="]"){_();return}j()},afterPropertyValue(){if(c.type==="eof"){throw $()}switch(c.value){case",":A="beforePropertyName";return;case"}":_()}},afterArrayValue(){if(c.type==="eof"){throw $()}switch(c.value){case",":A="beforeArrayValue";return;case"]":_()}},end(){}};function j(){let u;switch(c.type){case"punctuator":switch(c.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=c.value;break}if(f===undefined){f=u}else{const D=i[i.length-1];if(Array.isArray(D)){D.push(u)}else{Object.defineProperty(D,a,{value:u,writable:true,enumerable:true,configurable:true})}}if(u!==null&&typeof u==="object"){i.push(u);if(Array.isArray(u)){A="beforeArrayValue"}else{A="beforePropertyName"}}else{const u=i[i.length-1];if(u==null){A="end"}else if(Array.isArray(u)){A="afterArrayValue"}else{A="afterPropertyValue"}}}function _(){i.pop();const u=i[i.length-1];if(u==null){A="end"}else if(Array.isArray(u)){A="afterArrayValue"}else{A="afterPropertyValue"}}function k(u){if(u===undefined){return J(`JSON5: invalid end of input at ${s}:${o}`)}return J(`JSON5: invalid character '${R(u)}' at ${s}:${o}`)}function $(){return J(`JSON5: invalid end of input at ${s}:${o}`)}function V(){o-=5;return J(`JSON5: invalid identifier character at ${s}:${o}`)}function M(u){console.warn(`JSON5: '${R(u)}' in strings is not valid ECMAScript; consider escaping`)}function R(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u]){return D[u]}if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function J(u){const D=new SyntaxError(u);D.lineNumber=s;D.columnNumber=o;return D}var q=function u(D,e,t){const r=[];let n="";let C;let A;let i="";let E;if(e!=null&&typeof e==="object"&&!Array.isArray(e)){t=e.space;E=e.quote;e=e.replacer}if(typeof e==="function"){A=e}else if(Array.isArray(e)){C=[];for(const u of e){let D;if(typeof u==="string"){D=u}else if(typeof u==="number"||u instanceof String||u instanceof Number){D=String(u)}if(D!==undefined&&C.indexOf(D)<0){C.push(D)}}}if(t instanceof Number){t=Number(t)}else if(t instanceof String){t=String(t)}if(typeof t==="number"){if(t>0){t=Math.min(10,Math.floor(t));i=" ".substr(0,t)}}else if(typeof t==="string"){i=t.substr(0,10)}return s("",{"":D});function s(u,D){let e=D[u];if(e!=null){if(typeof e.toJSON5==="function"){e=e.toJSON5(u)}else if(typeof e.toJSON==="function"){e=e.toJSON(u)}}if(A){e=A.call(D,u,e)}if(e instanceof Number){e=Number(e)}else if(e instanceof String){e=String(e)}else if(e instanceof Boolean){e=e.valueOf()}switch(e){case null:return"null";case true:return"true";case false:return"false"}if(typeof e==="string"){return o(e)}if(typeof e==="number"){return String(e)}if(typeof e==="object"){return Array.isArray(e)?f(e):c(e)}return undefined}function o(u){const D={"'":.1,'"':.2};const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let t="";for(let r=0;r<u.length;r++){const n=u[r];switch(n){case"'":case'"':D[n]++;t+=n;continue;case"\0":if(F.isDigit(u[r+1])){t+="\\x00";continue}}if(e[n]){t+=e[n];continue}if(n<" "){let u=n.charCodeAt(0).toString(16);t+="\\x"+("00"+u).substring(u.length);continue}t+=n}const r=E||Object.keys(D).reduce(((u,e)=>D[u]<D[e]?u:e));t=t.replace(new RegExp(r,"g"),e[r]);return r+t+r}function c(u){if(r.indexOf(u)>=0){throw TypeError("Converting circular structure to JSON5")}r.push(u);let D=n;n=n+i;let e=C||Object.keys(u);let t=[];for(const D of e){const e=s(D,u);if(e!==undefined){let u=a(D)+":";if(i!==""){u+=" "}u+=e;t.push(u)}}let F;if(t.length===0){F="{}"}else{let u;if(i===""){u=t.join(",");F="{"+u+"}"}else{let e=",\n"+n;u=t.join(e);F="{\n"+n+u+",\n"+D+"}"}}r.pop();n=D;return F}function a(u){if(u.length===0){return o(u)}const D=String.fromCodePoint(u.codePointAt(0));if(!F.isIdStartChar(D)){return o(u)}for(let e=D.length;e<u.length;e++){if(!F.isIdContinueChar(String.fromCodePoint(u.codePointAt(e)))){return o(u)}}return u}function f(u){if(r.indexOf(u)>=0){throw TypeError("Converting circular structure to JSON5")}r.push(u);let D=n;n=n+i;let e=[];for(let D=0;D<u.length;D++){const t=s(String(D),u);e.push(t!==undefined?t:"null")}let t;if(e.length===0){t="[]"}else{if(i===""){let u=e.join(",");t="["+u+"]"}else{let u=",\n"+n;let r=e.join(u);t="[\n"+n+r+",\n"+D+"]"}}r.pop();n=D;return t}};const L={parse:B,stringify:q};var z=L;var H=Object.freeze({__proto__:null,default:z});var U=D(H);const T=U;const Z={null:null,true:true,false:false};function Q(u){if(u.substr(0,1)!=="?"){throw new Error("A valid query string passed to parseQuery should begin with '?'")}u=u.substr(1);if(!u){return{}}if(u.substr(0,1)==="{"&&u.substr(-1)==="}"){return T.parse(u)}const D=u.split(/[,&]/g);const e=Object.create(null);D.forEach((u=>{const D=u.indexOf("=");if(D>=0){let t=u.substr(0,D);let r=decodeURIComponent(u.substr(D+1));if(Z.hasOwnProperty(r)){r=Z[r]}if(t.substr(-2)==="[]"){t=decodeURIComponent(t.substr(0,t.length-2));if(!Array.isArray(e[t])){e[t]=[]}e[t].push(r)}else{t=decodeURIComponent(t);e[t]=r}}else{if(u.substr(0,1)==="-"){e[decodeURIComponent(u.substr(1))]=false}else if(u.substr(0,1)==="+"){e[decodeURIComponent(u.substr(1))]=true}else{e[decodeURIComponent(u)]=true}}}));return e}var X=Q;const G=X;function K(u){const D=u.query;if(typeof D==="string"&&D!==""){return G(u.query)}if(!D||typeof D!=="object"){return{}}return D}var W=K;var Y=1e6,uu=1e6,Du="[big.js] ",eu=Du+"Invalid ",tu=eu+"decimal places",ru=eu+"rounding mode",nu=Du+"Division by zero",Fu={},Cu=void 0;function Au(u,D,e,t){var r=u.c,n=u.e+D+1;if(n<r.length){if(e===1){t=r[n]>=5}else if(e===2){t=r[n]>5||r[n]==5&&(t||n<0||r[n+1]!==Cu||r[n-1]&1)}else if(e===3){t=t||!!r[0]}else{t=false;if(e!==0)throw Error(ru)}if(n<1){r.length=1;if(t){u.e=-D;r[0]=1}else{r[0]=u.e=0}}else{r.length=n--;if(t){for(;++r[n]>9;){r[n]=0;if(!n--){++u.e;r.unshift(1)}}}for(n=r.length;!r[--n];)r.pop()}}else if(e<0||e>3||e!==~~e){throw Error(ru)}return u}function iu(u,D,e,t){var r,n,F=u.constructor,C=!u.c[0];if(e!==Cu){if(e!==~~e||e<(D==3)||e>Y){throw Error(D==3?eu+"precision":tu)}u=new F(u);e=t-u.e;if(u.c.length>++t)Au(u,e,F.RM);if(D==2)t=u.e+e+1;for(;u.c.length<t;)u.c.push(0)}r=u.e;n=u.c.join("");e=n.length;if(D!=2&&(D==1||D==3&&t<=r||r<=F.NE||r>=F.PE)){n=n.charAt(0)+(e>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r}else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0){if(++r>e)for(r-=e;r--;)n+="0";else if(r<e)n=n.slice(0,r)+"."+n.slice(r)}else if(e>1){n=n.charAt(0)+"."+n.slice(1)}return u.s<0&&(!C||D==4)?"-"+n:n}Fu.abs=function(){var u=new this.constructor(this);u.s=1;return u};Fu.cmp=function(u){var D,e=this,t=e.c,r=(u=new e.constructor(u)).c,n=e.s,F=u.s,C=e.e,A=u.e;if(!t[0]||!r[0])return!t[0]?!r[0]?0:-F:n;if(n!=F)return n;D=n<0;if(C!=A)return C>A^D?1:-1;F=(C=t.length)<(A=r.length)?C:A;for(n=-1;++n<F;){if(t[n]!=r[n])return t[n]>r[n]^D?1:-1}return C==A?0:C>A^D?1:-1};Fu.div=function(u){var D=this,e=D.constructor,t=D.c,r=(u=new e(u)).c,n=D.s==u.s?1:-1,F=e.DP;if(F!==~~F||F<0||F>Y)throw Error(tu);if(!r[0])throw Error(nu);if(!t[0])return new e(n*0);var C,A,i,E,s,o=r.slice(),c=C=r.length,a=t.length,f=t.slice(0,C),B=f.length,l=u,h=l.c=[],p=0,d=F+(l.e=D.e-u.e)+1;l.s=n;n=d<0?0:d;o.unshift(0);for(;B++<C;)f.push(0);do{for(i=0;i<10;i++){if(C!=(B=f.length)){E=C>B?1:-1}else{for(s=-1,E=0;++s<C;){if(r[s]!=f[s]){E=r[s]>f[s]?1:-1;break}}}if(E<0){for(A=B==C?r:o;B;){if(f[--B]<A[B]){s=B;for(;s&&!f[--s];)f[s]=9;--f[s];f[B]+=10}f[B]-=A[B]}for(;!f[0];)f.shift()}else{break}}h[p++]=E?i:++i;if(f[0]&&E)f[B]=t[c]||0;else f=[t[c]]}while((c++<a||f[0]!==Cu)&&n--);if(!h[0]&&p!=1){h.shift();l.e--}if(p>d)Au(l,F,e.RM,f[0]!==Cu);return l};Fu.eq=function(u){return!this.cmp(u)};Fu.gt=function(u){return this.cmp(u)>0};Fu.gte=function(u){return this.cmp(u)>-1};Fu.lt=function(u){return this.cmp(u)<0};Fu.lte=function(u){return this.cmp(u)<1};Fu.minus=Fu.sub=function(u){var D,e,t,r,n=this,F=n.constructor,C=n.s,A=(u=new F(u)).s;if(C!=A){u.s=-A;return n.plus(u)}var i=n.c.slice(),E=n.e,s=u.c,o=u.e;if(!i[0]||!s[0]){return s[0]?(u.s=-A,u):new F(i[0]?n:0)}if(C=E-o){if(r=C<0){C=-C;t=i}else{o=E;t=s}t.reverse();for(A=C;A--;)t.push(0);t.reverse()}else{e=((r=i.length<s.length)?i:s).length;for(C=A=0;A<e;A++){if(i[A]!=s[A]){r=i[A]<s[A];break}}}if(r){t=i;i=s;s=t;u.s=-u.s}if((A=(e=s.length)-(D=i.length))>0)for(;A--;)i[D++]=0;for(A=D;e>C;){if(i[--e]<s[e]){for(D=e;D&&!i[--D];)i[D]=9;--i[D];i[e]+=10}i[e]-=s[e]}for(;i[--A]===0;)i.pop();for(;i[0]===0;){i.shift();--o}if(!i[0]){u.s=1;i=[o=0]}u.c=i;u.e=o;return u};Fu.mod=function(u){var D,e=this,t=e.constructor,r=e.s,n=(u=new t(u)).s;if(!u.c[0])throw Error(nu);e.s=u.s=1;D=u.cmp(e)==1;e.s=r;u.s=n;if(D)return new t(e);r=t.DP;n=t.RM;t.DP=t.RM=0;e=e.div(u);t.DP=r;t.RM=n;return this.minus(e.times(u))};Fu.plus=Fu.add=function(u){var D,e=this,t=e.constructor,r=e.s,n=(u=new t(u)).s;if(r!=n){u.s=-n;return e.minus(u)}var F=e.e,C=e.c,A=u.e,i=u.c;if(!C[0]||!i[0])return i[0]?u:new t(C[0]?e:r*0);C=C.slice();if(r=F-A){if(r>0){A=F;D=i}else{r=-r;D=C}D.reverse();for(;r--;)D.push(0);D.reverse()}if(C.length-i.length<0){D=i;i=C;C=D}r=i.length;for(n=0;r;C[r]%=10)n=(C[--r]=C[r]+i[r]+n)/10|0;if(n){C.unshift(n);++A}for(r=C.length;C[--r]===0;)C.pop();u.c=C;u.e=A;return u};Fu.pow=function(u){var D=this,e=new D.constructor(1),t=e,r=u<0;if(u!==~~u||u<-uu||u>uu)throw Error(eu+"exponent");if(r)u=-u;for(;;){if(u&1)t=t.times(D);u>>=1;if(!u)break;D=D.times(D)}return r?e.div(t):t};Fu.round=function(u,D){var e=this.constructor;if(u===Cu)u=0;else if(u!==~~u||u<-Y||u>Y)throw Error(tu);return Au(new e(this),u,D===Cu?e.RM:D)};Fu.sqrt=function(){var u,D,e,t=this,r=t.constructor,n=t.s,F=t.e,C=new r(.5);if(!t.c[0])return new r(t);if(n<0)throw Error(Du+"No square root");n=Math.sqrt(t+"");if(n===0||n===1/0){D=t.c.join("");if(!(D.length+F&1))D+="0";n=Math.sqrt(D);F=((F+1)/2|0)-(F<0||F&1);u=new r((n==1/0?"1e":(n=n.toExponential()).slice(0,n.indexOf("e")+1))+F)}else{u=new r(n)}F=u.e+(r.DP+=4);do{e=u;u=C.times(e.plus(t.div(e)))}while(e.c.slice(0,F).join("")!==u.c.slice(0,F).join(""));return Au(u,r.DP-=4,r.RM)};Fu.times=Fu.mul=function(u){var D,e=this,t=e.constructor,r=e.c,n=(u=new t(u)).c,F=r.length,C=n.length,A=e.e,i=u.e;u.s=e.s==u.s?1:-1;if(!r[0]||!n[0])return new t(u.s*0);u.e=A+i;if(F<C){D=r;r=n;n=D;i=F;F=C;C=i}for(D=new Array(i=F+C);i--;)D[i]=0;for(A=C;A--;){C=0;for(i=F+A;i>A;){C=D[i]+n[A]*r[i-A-1]+C;D[i--]=C%10;C=C/10|0}D[i]=(D[i]+C)%10}if(C)++u.e;else D.shift();for(A=D.length;!D[--A];)D.pop();u.c=D;return u};Fu.toExponential=function(u){return iu(this,1,u,u)};Fu.toFixed=function(u){return iu(this,2,u,this.e+u)};Fu.toPrecision=function(u){return iu(this,3,u,u-1)};Fu.toString=function(){return iu(this)};Fu.valueOf=Fu.toJSON=function(){return iu(this,4)};const Eu=W;var su=Eu;const ou=/viewBox="([^"]*)"/;const cu=/(<svg[^>]*>|<\/svg>)/g;const au=/fill="[^"]*"/g;const fu=(D,e)=>{const{data:t}=u.optimize(D,e);return t};const Bu=function u(D){this.cacheable&&this.cacheable(true);const e=su(this);const t=this.async();try{const u=fu(D,e.svgo);const r=u.replace(au,(u=>u.includes("#FFF")?'fill="currentColor"':""));const n=ou.exec(r);const F=n?n[1]:"";const C=JSON.stringify({viewBox:F,body:r.replace(cu,"")});t(null,`module.exports.default = module.exports = ${C}`)}catch(u){t(u)}};module.exports=Bu;
|