sunpeak 0.16.29 → 0.17.2
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.
- package/bin/commands/dev.mjs +169 -342
- package/bin/commands/inspect.mjs +763 -0
- package/bin/commands/new.mjs +2 -2
- package/bin/lib/inspect/inspect-config.d.mts +20 -0
- package/bin/lib/inspect/inspect-config.mjs +76 -0
- package/bin/lib/live/global-setup.mjs +6 -1
- package/bin/sunpeak.js +11 -1
- package/dist/chatgpt/globals.css +8 -0
- package/dist/chatgpt/index.cjs +3 -11
- package/dist/chatgpt/index.cjs.map +1 -1
- package/dist/chatgpt/index.d.ts +2 -2
- package/dist/chatgpt/index.js +4 -8
- package/dist/chatgpt/index.js.map +1 -1
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/discovery-Cgoegt62.js +114 -0
- package/dist/discovery-Cgoegt62.js.map +1 -0
- package/dist/discovery-Clu4uHp1.cjs +161 -0
- package/dist/discovery-Clu4uHp1.cjs.map +1 -0
- package/dist/index.cjs +1 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/discovery-cli.cjs +1 -1
- package/dist/lib/discovery-cli.js +1 -1
- package/dist/lib/discovery.d.ts +7 -67
- package/dist/lib/index.d.ts +0 -1
- package/dist/mcp/index.cjs +34 -23
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +34 -23
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/types.d.ts +5 -0
- package/dist/simulator/index.cjs +5 -11
- package/dist/simulator/index.cjs.map +1 -1
- package/dist/simulator/index.d.ts +4 -2
- package/dist/simulator/index.js +5 -8
- package/dist/simulator/index.js.map +1 -1
- package/dist/simulator/simple-sidebar.d.ts +7 -4
- package/dist/simulator/simulator-url.d.ts +8 -0
- package/dist/simulator/simulator.d.ts +15 -2
- package/dist/simulator/use-mcp-connection.d.ts +19 -0
- package/dist/{simulator-DIVvI69i.cjs → simulator-CH9hs0N6.cjs} +129 -21
- package/dist/simulator-CH9hs0N6.cjs.map +1 -0
- package/dist/{simulator-C7mkK7Sz.js → simulator-Dl8B-Ljb.js} +124 -22
- package/dist/simulator-Dl8B-Ljb.js.map +1 -0
- package/dist/{simulator-url-BDGD4vZD.cjs → simulator-url-CozKF1jf.cjs} +3 -1
- package/dist/simulator-url-CozKF1jf.cjs.map +1 -0
- package/dist/{simulator-url-Bkxj43yT.js → simulator-url-KoS_ToP6.js} +3 -1
- package/dist/simulator-url-KoS_ToP6.js.map +1 -0
- package/dist/style.css +8 -0
- package/package.json +11 -3
- package/template/dist/albums/albums.html +105 -0
- package/template/dist/albums/albums.json +16 -0
- package/template/dist/carousel/carousel.html +105 -0
- package/template/dist/carousel/carousel.json +16 -0
- package/template/dist/map/map.html +3060 -0
- package/template/dist/map/map.json +22 -0
- package/template/dist/review/review.html +105 -0
- package/template/dist/review/review.json +16 -0
- package/template/dist/server.js +15 -0
- package/template/dist/tools/review-diff.js +50 -0
- package/template/dist/tools/review-post.js +50 -0
- package/template/dist/tools/review-purchase.js +61 -0
- package/template/dist/tools/review.js +31 -0
- package/template/dist/tools/show-albums.js +56 -0
- package/template/dist/tools/show-carousel.js +41 -0
- package/template/dist/tools/show-map.js +47 -0
- package/template/node_modules/.vite/deps/_metadata.json +8 -0
- package/template/node_modules/.vite/deps/package.json +3 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +500 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +563 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +575 -0
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/@testing-library_react.js +11363 -0
- package/template/node_modules/.vite-mcp/deps/@testing-library_react.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/_metadata.json +130 -0
- package/template/node_modules/.vite-mcp/deps/chunk-BoAXSpZd.js +33 -0
- package/template/node_modules/.vite-mcp/deps/client-CU1wWud4.js +14385 -0
- package/template/node_modules/.vite-mcp/deps/client-CU1wWud4.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/clsx.js +18 -0
- package/template/node_modules/.vite-mcp/deps/clsx.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/dist-uWX8WbjY.js +505 -0
- package/template/node_modules/.vite-mcp/deps/dist-uWX8WbjY.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/embla-carousel-react.js +1461 -0
- package/template/node_modules/.vite-mcp/deps/embla-carousel-react.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/embla-carousel-wheel-gestures.js +536 -0
- package/template/node_modules/.vite-mcp/deps/embla-carousel-wheel-gestures.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/magic-string.es-Cklsmr-5.js +1013 -0
- package/template/node_modules/.vite-mcp/deps/magic-string.es-Cklsmr-5.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +46311 -0
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/package.json +3 -0
- package/template/node_modules/.vite-mcp/deps/protocol-CTflwIfG.js +2090 -0
- package/template/node_modules/.vite-mcp/deps/protocol-CTflwIfG.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/react-dom.js +186 -0
- package/template/node_modules/.vite-mcp/deps/react-dom.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/react-dom_client.js +2 -0
- package/template/node_modules/.vite-mcp/deps/react.js +769 -0
- package/template/node_modules/.vite-mcp/deps/react.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/react_jsx-dev-runtime.js +205 -0
- package/template/node_modules/.vite-mcp/deps/react_jsx-dev-runtime.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/react_jsx-runtime.js +209 -0
- package/template/node_modules/.vite-mcp/deps/react_jsx-runtime.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/schemas-NsgmY9QV.js +12157 -0
- package/template/node_modules/.vite-mcp/deps/schemas-NsgmY9QV.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/tailwind-merge.js +2025 -0
- package/template/node_modules/.vite-mcp/deps/tailwind-merge.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/vitest.js +14021 -0
- package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/zod.js +624 -0
- package/template/node_modules/.vite-mcp/deps/zod.js.map +1 -0
- package/template/src/tools/review-diff.test.ts +5 -1
- package/template/src/tools/review-diff.ts +1 -1
- package/template/src/tools/review-post.test.ts +5 -1
- package/template/src/tools/review-post.ts +1 -1
- package/template/src/tools/review-purchase.test.ts +5 -1
- package/template/src/tools/review-purchase.ts +1 -1
- package/template/src/tools/review.test.ts +5 -1
- package/template/src/tools/review.ts +1 -1
- package/template/src/tools/show-albums.test.ts +5 -1
- package/template/src/tools/show-albums.ts +1 -1
- package/template/src/tools/show-carousel.test.ts +5 -1
- package/template/src/tools/show-carousel.ts +1 -1
- package/template/src/tools/show-map.test.ts +5 -1
- package/template/src/tools/show-map.ts +1 -1
- package/dist/discovery-BxKCIgG5.cjs +0 -332
- package/dist/discovery-BxKCIgG5.cjs.map +0 -1
- package/dist/discovery-Du4LHrih.js +0 -261
- package/dist/discovery-Du4LHrih.js.map +0 -1
- package/dist/simulator-C7mkK7Sz.js.map +0 -1
- package/dist/simulator-DIVvI69i.cjs.map +0 -1
- package/dist/simulator-url-BDGD4vZD.cjs.map +0 -1
- package/dist/simulator-url-Bkxj43yT.js.map +0 -1
- package/template/.sunpeak/dev.tsx +0 -79
- package/template/.sunpeak/resource-loader.html +0 -20
- package/template/.sunpeak/resource-loader.tsx +0 -57
- package/template/index.html +0 -14
- package/template/src/resources/index.ts +0 -17
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region ../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2
|
+
function r(e) {
|
|
3
|
+
var t, f, n = "";
|
|
4
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
5
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
6
|
+
var o = e.length;
|
|
7
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
8
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
function clsx() {
|
|
12
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
13
|
+
return n;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { clsx, clsx as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=clsx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clsx.js","names":[],"sources":["../../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAE,GAAE;CAAC,IAAI,GAAE,GAAE,IAAE;AAAG,KAAG,YAAU,OAAO,KAAG,YAAU,OAAO,EAAE,MAAG;UAAU,YAAU,OAAO,EAAE,KAAG,MAAM,QAAQ,EAAE,EAAC;EAAC,IAAI,IAAE,EAAE;AAAO,OAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,OAAK,IAAE,EAAE,EAAE,GAAG,MAAI,MAAI,KAAG,MAAK,KAAG;OAAQ,MAAI,KAAK,EAAE,GAAE,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,QAAO;;AAAE,SAAgB,OAAM;AAAC,MAAI,IAAI,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,QAAM,IAAE,EAAE,EAAE,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,QAAO"}
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
//#region ../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js
|
|
2
|
+
var $ = Object.defineProperty;
|
|
3
|
+
var C = (s) => {
|
|
4
|
+
throw TypeError(s);
|
|
5
|
+
};
|
|
6
|
+
var D = (s, n, t) => n in s ? $(s, n, {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0,
|
|
10
|
+
value: t
|
|
11
|
+
}) : s[n] = t;
|
|
12
|
+
var O = (s, n, t) => D(s, typeof n != "symbol" ? n + "" : n, t), q = (s, n, t) => n.has(s) || C("Cannot " + t);
|
|
13
|
+
var d = (s, n, t) => (q(s, n, "read from private field"), t ? t.call(s) : n.get(s)), k = (s, n, t) => n.has(s) ? C("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, t), f = (s, n, t, e) => (q(s, n, "write to private field"), e ? e.call(s, t) : n.set(s, t), t);
|
|
14
|
+
var F = (s, n, t, e) => ({
|
|
15
|
+
set _(r) {
|
|
16
|
+
f(s, n, r, t);
|
|
17
|
+
},
|
|
18
|
+
get _() {
|
|
19
|
+
return d(s, n, e);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
var M = class {
|
|
23
|
+
constructor(n) {
|
|
24
|
+
O(this, "value");
|
|
25
|
+
O(this, "next");
|
|
26
|
+
this.value = n;
|
|
27
|
+
}
|
|
28
|
+
}, m, w, E, g = class {
|
|
29
|
+
constructor() {
|
|
30
|
+
k(this, m);
|
|
31
|
+
k(this, w);
|
|
32
|
+
k(this, E);
|
|
33
|
+
this.clear();
|
|
34
|
+
}
|
|
35
|
+
enqueue(n) {
|
|
36
|
+
let t = new M(n);
|
|
37
|
+
d(this, m) ? (d(this, w).next = t, f(this, w, t)) : (f(this, m, t), f(this, w, t)), F(this, E)._++;
|
|
38
|
+
}
|
|
39
|
+
dequeue() {
|
|
40
|
+
let n = d(this, m);
|
|
41
|
+
if (n) return f(this, m, d(this, m).next), F(this, E)._--, n.value;
|
|
42
|
+
}
|
|
43
|
+
clear() {
|
|
44
|
+
f(this, m, void 0), f(this, w, void 0), f(this, E, 0);
|
|
45
|
+
}
|
|
46
|
+
get size() {
|
|
47
|
+
return d(this, E);
|
|
48
|
+
}
|
|
49
|
+
*[Symbol.iterator]() {
|
|
50
|
+
let n = d(this, m);
|
|
51
|
+
for (; n;) yield n.value, n = n.next;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
m = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
55
|
+
function y(s) {
|
|
56
|
+
if (!((Number.isInteger(s) || s === Number.POSITIVE_INFINITY) && s > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
57
|
+
let n = new g(), t = 0, e = () => {
|
|
58
|
+
t--, n.size > 0 && n.dequeue()();
|
|
59
|
+
}, r = async (h, p, a) => {
|
|
60
|
+
t++;
|
|
61
|
+
let l = (async () => h(...a))();
|
|
62
|
+
p(l);
|
|
63
|
+
try {
|
|
64
|
+
await l;
|
|
65
|
+
} catch (T) {}
|
|
66
|
+
e();
|
|
67
|
+
}, i = (h, p, a) => {
|
|
68
|
+
n.enqueue(r.bind(void 0, h, p, a)), (async () => (await Promise.resolve(), t < s && n.size > 0 && n.dequeue()()))();
|
|
69
|
+
}, c = (h, ...p) => new Promise((a) => {
|
|
70
|
+
i(h, a, p);
|
|
71
|
+
});
|
|
72
|
+
return Object.defineProperties(c, {
|
|
73
|
+
activeCount: { get: () => t },
|
|
74
|
+
pendingCount: { get: () => n.size },
|
|
75
|
+
clearQueue: { value: () => {
|
|
76
|
+
n.clear();
|
|
77
|
+
} }
|
|
78
|
+
}), c;
|
|
79
|
+
}
|
|
80
|
+
function o(s, n = null) {
|
|
81
|
+
let t = new Event(s);
|
|
82
|
+
return n && Object.defineProperty(t, "task", {
|
|
83
|
+
value: n,
|
|
84
|
+
enumerable: !0,
|
|
85
|
+
writable: !1,
|
|
86
|
+
configurable: !1
|
|
87
|
+
}), t;
|
|
88
|
+
}
|
|
89
|
+
var N = {
|
|
90
|
+
1: 12.71,
|
|
91
|
+
2: 4.303,
|
|
92
|
+
3: 3.182,
|
|
93
|
+
4: 2.776,
|
|
94
|
+
5: 2.571,
|
|
95
|
+
6: 2.447,
|
|
96
|
+
7: 2.365,
|
|
97
|
+
8: 2.306,
|
|
98
|
+
9: 2.262,
|
|
99
|
+
10: 2.228,
|
|
100
|
+
11: 2.201,
|
|
101
|
+
12: 2.179,
|
|
102
|
+
13: 2.16,
|
|
103
|
+
14: 2.145,
|
|
104
|
+
15: 2.131,
|
|
105
|
+
16: 2.12,
|
|
106
|
+
17: 2.11,
|
|
107
|
+
18: 2.101,
|
|
108
|
+
19: 2.093,
|
|
109
|
+
20: 2.086,
|
|
110
|
+
21: 2.08,
|
|
111
|
+
22: 2.074,
|
|
112
|
+
23: 2.069,
|
|
113
|
+
24: 2.064,
|
|
114
|
+
25: 2.06,
|
|
115
|
+
26: 2.056,
|
|
116
|
+
27: 2.052,
|
|
117
|
+
28: 2.048,
|
|
118
|
+
29: 2.045,
|
|
119
|
+
30: 2.042,
|
|
120
|
+
31: 2.0399,
|
|
121
|
+
32: 2.0378,
|
|
122
|
+
33: 2.0357,
|
|
123
|
+
34: 2.0336,
|
|
124
|
+
35: 2.0315,
|
|
125
|
+
36: 2.0294,
|
|
126
|
+
37: 2.0273,
|
|
127
|
+
38: 2.0252,
|
|
128
|
+
39: 2.0231,
|
|
129
|
+
40: 2.021,
|
|
130
|
+
41: 2.0198,
|
|
131
|
+
42: 2.0186,
|
|
132
|
+
43: 2.0174,
|
|
133
|
+
44: 2.0162,
|
|
134
|
+
45: 2.015,
|
|
135
|
+
46: 2.0138,
|
|
136
|
+
47: 2.0126,
|
|
137
|
+
48: 2.0114,
|
|
138
|
+
49: 2.0102,
|
|
139
|
+
50: 2.009,
|
|
140
|
+
51: 2.0081,
|
|
141
|
+
52: 2.0072,
|
|
142
|
+
53: 2.0063,
|
|
143
|
+
54: 2.0054,
|
|
144
|
+
55: 2.0045,
|
|
145
|
+
56: 2.0036,
|
|
146
|
+
57: 2.0027,
|
|
147
|
+
58: 2.0018,
|
|
148
|
+
59: 2.0009,
|
|
149
|
+
60: 2,
|
|
150
|
+
61: 1.9995,
|
|
151
|
+
62: 1.999,
|
|
152
|
+
63: 1.9985,
|
|
153
|
+
64: 1.998,
|
|
154
|
+
65: 1.9975,
|
|
155
|
+
66: 1.997,
|
|
156
|
+
67: 1.9965,
|
|
157
|
+
68: 1.996,
|
|
158
|
+
69: 1.9955,
|
|
159
|
+
70: 1.995,
|
|
160
|
+
71: 1.9945,
|
|
161
|
+
72: 1.994,
|
|
162
|
+
73: 1.9935,
|
|
163
|
+
74: 1.993,
|
|
164
|
+
75: 1.9925,
|
|
165
|
+
76: 1.992,
|
|
166
|
+
77: 1.9915,
|
|
167
|
+
78: 1.991,
|
|
168
|
+
79: 1.9905,
|
|
169
|
+
80: 1.99,
|
|
170
|
+
81: 1.9897,
|
|
171
|
+
82: 1.9894,
|
|
172
|
+
83: 1.9891,
|
|
173
|
+
84: 1.9888,
|
|
174
|
+
85: 1.9885,
|
|
175
|
+
86: 1.9882,
|
|
176
|
+
87: 1.9879,
|
|
177
|
+
88: 1.9876,
|
|
178
|
+
89: 1.9873,
|
|
179
|
+
90: 1.987,
|
|
180
|
+
91: 1.9867,
|
|
181
|
+
92: 1.9864,
|
|
182
|
+
93: 1.9861,
|
|
183
|
+
94: 1.9858,
|
|
184
|
+
95: 1.9855,
|
|
185
|
+
96: 1.9852,
|
|
186
|
+
97: 1.9849,
|
|
187
|
+
98: 1.9846,
|
|
188
|
+
99: 1.9843,
|
|
189
|
+
100: 1.984,
|
|
190
|
+
101: 1.9838,
|
|
191
|
+
102: 1.9836,
|
|
192
|
+
103: 1.9834,
|
|
193
|
+
104: 1.9832,
|
|
194
|
+
105: 1.983,
|
|
195
|
+
106: 1.9828,
|
|
196
|
+
107: 1.9826,
|
|
197
|
+
108: 1.9824,
|
|
198
|
+
109: 1.9822,
|
|
199
|
+
110: 1.982,
|
|
200
|
+
111: 1.9818,
|
|
201
|
+
112: 1.9816,
|
|
202
|
+
113: 1.9814,
|
|
203
|
+
114: 1.9812,
|
|
204
|
+
115: 1.9819,
|
|
205
|
+
116: 1.9808,
|
|
206
|
+
117: 1.9806,
|
|
207
|
+
118: 1.9804,
|
|
208
|
+
119: 1.9802,
|
|
209
|
+
120: 1.98,
|
|
210
|
+
infinity: 1.96
|
|
211
|
+
};
|
|
212
|
+
var J = (s) => s / 1e6, U = () => J(Number(process.hrtime.bigint())), B = () => performance.now();
|
|
213
|
+
function W(s) {
|
|
214
|
+
return s !== null && typeof s == "object" && typeof s.then == "function";
|
|
215
|
+
}
|
|
216
|
+
var S = (s, n) => s.reduce((e, r) => e + (r - n) ** 2, 0) / (s.length - 1) || 0, X = (async () => {}).constructor, Z = (s) => s.constructor === X, z = async (s) => {
|
|
217
|
+
if (Z(s.fn)) return !0;
|
|
218
|
+
try {
|
|
219
|
+
if (s.opts.beforeEach != null) try {
|
|
220
|
+
await s.opts.beforeEach.call(s);
|
|
221
|
+
} catch (e) {}
|
|
222
|
+
let n = s.fn(), t = W(n);
|
|
223
|
+
if (t) try {
|
|
224
|
+
await n;
|
|
225
|
+
} catch (e) {}
|
|
226
|
+
if (s.opts.afterEach != null) try {
|
|
227
|
+
await s.opts.afterEach.call(s);
|
|
228
|
+
} catch (e) {}
|
|
229
|
+
return t;
|
|
230
|
+
} catch (n) {
|
|
231
|
+
return !1;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
var b = class extends EventTarget {
|
|
235
|
+
constructor(t, e, r, i = {}) {
|
|
236
|
+
super();
|
|
237
|
+
this.runs = 0;
|
|
238
|
+
this.bench = t, this.name = e, this.fn = r, this.opts = i;
|
|
239
|
+
}
|
|
240
|
+
async loop(t, e) {
|
|
241
|
+
var T;
|
|
242
|
+
let r = this.bench.concurrency === "task", { threshold: i } = this.bench, c = 0, h = [];
|
|
243
|
+
if (this.opts.beforeAll != null) try {
|
|
244
|
+
await this.opts.beforeAll.call(this);
|
|
245
|
+
} catch (u) {
|
|
246
|
+
return { error: u };
|
|
247
|
+
}
|
|
248
|
+
let p = await z(this), a = async () => {
|
|
249
|
+
this.opts.beforeEach != null && await this.opts.beforeEach.call(this);
|
|
250
|
+
let u = 0;
|
|
251
|
+
if (p) {
|
|
252
|
+
let v = this.bench.now();
|
|
253
|
+
await this.fn.call(this), u = this.bench.now() - v;
|
|
254
|
+
} else {
|
|
255
|
+
let v = this.bench.now();
|
|
256
|
+
this.fn.call(this), u = this.bench.now() - v;
|
|
257
|
+
}
|
|
258
|
+
h.push(u), c += u, this.opts.afterEach != null && await this.opts.afterEach.call(this);
|
|
259
|
+
}, l = y(i);
|
|
260
|
+
try {
|
|
261
|
+
let u = [];
|
|
262
|
+
for (; (c < t || h.length + l.activeCount + l.pendingCount < e) && !((T = this.bench.signal) != null && T.aborted);) r ? u.push(l(a)) : await a();
|
|
263
|
+
u.length && await Promise.all(u);
|
|
264
|
+
} catch (u) {
|
|
265
|
+
return { error: u };
|
|
266
|
+
}
|
|
267
|
+
if (this.opts.afterAll != null) try {
|
|
268
|
+
await this.opts.afterAll.call(this);
|
|
269
|
+
} catch (u) {
|
|
270
|
+
return { error: u };
|
|
271
|
+
}
|
|
272
|
+
return { samples: h };
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* run the current task and write the results in `Task.result` object
|
|
276
|
+
*/
|
|
277
|
+
async run() {
|
|
278
|
+
var r, i;
|
|
279
|
+
if ((r = this.result) != null && r.error) return this;
|
|
280
|
+
this.dispatchEvent(o("start", this)), await this.bench.setup(this, "run");
|
|
281
|
+
let { samples: t, error: e } = await this.loop(this.bench.time, this.bench.iterations);
|
|
282
|
+
if (this.bench.teardown(this, "run"), t) {
|
|
283
|
+
let c = t.reduce((L, A) => L + A, 0);
|
|
284
|
+
this.runs = t.length, t.sort((L, A) => L - A);
|
|
285
|
+
let h = c / this.runs, p = 1e3 / h, a = t.length, l = a - 1, T = t[0], u = t[l], v = c / t.length || 0, P = S(t, v), R = Math.sqrt(P), I = R / Math.sqrt(a), _ = N[String(Math.round(l) || 1)] || N.infinity, K = I * _, j = K / v * 100, H = t[Math.ceil(a * .75) - 1], V = t[Math.ceil(a * .99) - 1], Q = t[Math.ceil(a * .995) - 1], Y = t[Math.ceil(a * .999) - 1];
|
|
286
|
+
if ((i = this.bench.signal) != null && i.aborted) return this;
|
|
287
|
+
this.setResult({
|
|
288
|
+
totalTime: c,
|
|
289
|
+
min: T,
|
|
290
|
+
max: u,
|
|
291
|
+
hz: p,
|
|
292
|
+
period: h,
|
|
293
|
+
samples: t,
|
|
294
|
+
mean: v,
|
|
295
|
+
variance: P,
|
|
296
|
+
sd: R,
|
|
297
|
+
sem: I,
|
|
298
|
+
df: l,
|
|
299
|
+
critical: _,
|
|
300
|
+
moe: K,
|
|
301
|
+
rme: j,
|
|
302
|
+
p75: H,
|
|
303
|
+
p99: V,
|
|
304
|
+
p995: Q,
|
|
305
|
+
p999: Y
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (e) {
|
|
309
|
+
if (this.setResult({ error: e }), this.bench.throws) throw e;
|
|
310
|
+
this.dispatchEvent(o("error", this)), this.bench.dispatchEvent(o("error", this));
|
|
311
|
+
}
|
|
312
|
+
return this.dispatchEvent(o("cycle", this)), this.bench.dispatchEvent(o("cycle", this)), this.dispatchEvent(o("complete", this)), this;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* warmup the current task
|
|
316
|
+
*/
|
|
317
|
+
async warmup() {
|
|
318
|
+
var e;
|
|
319
|
+
if ((e = this.result) != null && e.error) return;
|
|
320
|
+
this.dispatchEvent(o("warmup", this)), await this.bench.setup(this, "warmup");
|
|
321
|
+
let { error: t } = await this.loop(this.bench.warmupTime, this.bench.warmupIterations);
|
|
322
|
+
if (this.bench.teardown(this, "warmup"), t && (this.setResult({ error: t }), this.bench.throws)) throw t;
|
|
323
|
+
}
|
|
324
|
+
addEventListener(t, e, r) {
|
|
325
|
+
super.addEventListener(t, e, r);
|
|
326
|
+
}
|
|
327
|
+
removeEventListener(t, e, r) {
|
|
328
|
+
super.removeEventListener(t, e, r);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* change the result object values
|
|
332
|
+
*/
|
|
333
|
+
setResult(t) {
|
|
334
|
+
this.result = {
|
|
335
|
+
...this.result,
|
|
336
|
+
...t
|
|
337
|
+
}, Object.freeze(this.result);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* reset the task to make the `Task.runs` a zero-value and remove the `Task.result`
|
|
341
|
+
* object
|
|
342
|
+
*/
|
|
343
|
+
reset() {
|
|
344
|
+
this.dispatchEvent(o("reset", this)), this.runs = 0, this.result = void 0;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
var x = class extends EventTarget {
|
|
348
|
+
constructor(t = {}) {
|
|
349
|
+
var e, r, i, c, h, p, a, l;
|
|
350
|
+
super();
|
|
351
|
+
this._tasks = /* @__PURE__ */ new Map();
|
|
352
|
+
this._todos = /* @__PURE__ */ new Map();
|
|
353
|
+
/**
|
|
354
|
+
* Executes tasks concurrently based on the specified concurrency mode.
|
|
355
|
+
*
|
|
356
|
+
* - When `mode` is set to `null` (default), concurrency is disabled.
|
|
357
|
+
* - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.
|
|
358
|
+
* - When `mode` is set to 'bench', different tasks within the bench run concurrently.
|
|
359
|
+
*/
|
|
360
|
+
this.concurrency = null;
|
|
361
|
+
/**
|
|
362
|
+
* The maximum number of concurrent tasks to run. Defaults to Infinity.
|
|
363
|
+
*/
|
|
364
|
+
this.threshold = Infinity;
|
|
365
|
+
this.warmupTime = 100;
|
|
366
|
+
this.warmupIterations = 5;
|
|
367
|
+
this.time = 500;
|
|
368
|
+
this.iterations = 10;
|
|
369
|
+
this.now = B;
|
|
370
|
+
this.now = (e = t.now) != null ? e : this.now, this.warmupTime = (r = t.warmupTime) != null ? r : this.warmupTime, this.warmupIterations = (i = t.warmupIterations) != null ? i : this.warmupIterations, this.time = (c = t.time) != null ? c : this.time, this.iterations = (h = t.iterations) != null ? h : this.iterations, this.signal = t.signal, this.throws = (p = t.throws) != null ? p : !1, this.setup = (a = t.setup) != null ? a : () => {}, this.teardown = (l = t.teardown) != null ? l : () => {}, this.signal && this.signal.addEventListener("abort", () => {
|
|
371
|
+
this.dispatchEvent(o("abort"));
|
|
372
|
+
}, { once: !0 });
|
|
373
|
+
}
|
|
374
|
+
runTask(t) {
|
|
375
|
+
var e;
|
|
376
|
+
return (e = this.signal) != null && e.aborted ? t : t.run();
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* run the added tasks that were registered using the
|
|
380
|
+
* {@link add} method.
|
|
381
|
+
* Note: This method does not do any warmup. Call {@link warmup} for that.
|
|
382
|
+
*/
|
|
383
|
+
async run() {
|
|
384
|
+
if (this.concurrency === "bench") return this.runConcurrently(this.threshold, this.concurrency);
|
|
385
|
+
this.dispatchEvent(o("start"));
|
|
386
|
+
let t = [];
|
|
387
|
+
for (let e of [...this._tasks.values()]) t.push(await this.runTask(e));
|
|
388
|
+
return this.dispatchEvent(o("complete")), t;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* See Bench.{@link concurrency}
|
|
392
|
+
*/
|
|
393
|
+
async runConcurrently(t = Infinity, e = "bench") {
|
|
394
|
+
if (this.threshold = t, this.concurrency = e, e === "task") return this.run();
|
|
395
|
+
this.dispatchEvent(o("start"));
|
|
396
|
+
let r = y(t), i = [];
|
|
397
|
+
for (let h of [...this._tasks.values()]) i.push(r(() => this.runTask(h)));
|
|
398
|
+
let c = await Promise.all(i);
|
|
399
|
+
return this.dispatchEvent(o("complete")), c;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* warmup the benchmark tasks.
|
|
403
|
+
* This is not run by default by the {@link run} method.
|
|
404
|
+
*/
|
|
405
|
+
async warmup() {
|
|
406
|
+
if (this.concurrency === "bench") {
|
|
407
|
+
await this.warmupConcurrently(this.threshold, this.concurrency);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this.dispatchEvent(o("warmup"));
|
|
411
|
+
for (let [, t] of this._tasks) await t.warmup();
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* warmup the benchmark tasks concurrently.
|
|
415
|
+
* This is not run by default by the {@link runConcurrently} method.
|
|
416
|
+
*/
|
|
417
|
+
async warmupConcurrently(t = Infinity, e = "bench") {
|
|
418
|
+
if (this.threshold = t, this.concurrency = e, e === "task") {
|
|
419
|
+
await this.warmup();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
this.dispatchEvent(o("warmup"));
|
|
423
|
+
let r = y(t), i = [];
|
|
424
|
+
for (let [, c] of this._tasks) i.push(r(() => c.warmup()));
|
|
425
|
+
await Promise.all(i);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* reset each task and remove its result
|
|
429
|
+
*/
|
|
430
|
+
reset() {
|
|
431
|
+
this.dispatchEvent(o("reset")), this._tasks.forEach((t) => {
|
|
432
|
+
t.reset();
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* add a benchmark task to the task map
|
|
437
|
+
*/
|
|
438
|
+
add(t, e, r = {}) {
|
|
439
|
+
let i = new b(this, t, e, r);
|
|
440
|
+
return this._tasks.set(t, i), this.dispatchEvent(o("add", i)), this;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* add a benchmark todo to the todo map
|
|
444
|
+
*/
|
|
445
|
+
todo(t, e = () => {}, r = {}) {
|
|
446
|
+
let i = new b(this, t, e, r);
|
|
447
|
+
return this._todos.set(t, i), this.dispatchEvent(o("todo", i)), this;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* remove a benchmark task from the task map
|
|
451
|
+
*/
|
|
452
|
+
remove(t) {
|
|
453
|
+
let e = this.getTask(t);
|
|
454
|
+
return e && (this.dispatchEvent(o("remove", e)), this._tasks.delete(t)), this;
|
|
455
|
+
}
|
|
456
|
+
addEventListener(t, e, r) {
|
|
457
|
+
super.addEventListener(t, e, r);
|
|
458
|
+
}
|
|
459
|
+
removeEventListener(t, e, r) {
|
|
460
|
+
super.removeEventListener(t, e, r);
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* table of the tasks results
|
|
464
|
+
*/
|
|
465
|
+
table(t) {
|
|
466
|
+
return this.tasks.map((e) => {
|
|
467
|
+
if (e.result) {
|
|
468
|
+
if (e.result.error) throw e.result.error;
|
|
469
|
+
return (t == null ? void 0 : t(e)) || {
|
|
470
|
+
"Task Name": e.name,
|
|
471
|
+
"ops/sec": e.result.error ? "NaN" : parseInt(e.result.hz.toString(), 10).toLocaleString(),
|
|
472
|
+
"Average Time (ns)": e.result.error ? "NaN" : e.result.mean * 1e3 * 1e3,
|
|
473
|
+
Margin: e.result.error ? "NaN" : `\xB1${e.result.rme.toFixed(2)}%`,
|
|
474
|
+
Samples: e.result.error ? "NaN" : e.result.samples.length
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
return null;
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* (getter) tasks results as an array
|
|
482
|
+
*/
|
|
483
|
+
get results() {
|
|
484
|
+
return [...this._tasks.values()].map((t) => t.result);
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* (getter) tasks as an array
|
|
488
|
+
*/
|
|
489
|
+
get tasks() {
|
|
490
|
+
return [...this._tasks.values()];
|
|
491
|
+
}
|
|
492
|
+
get todos() {
|
|
493
|
+
return [...this._todos.values()];
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* get a task based on the task name
|
|
497
|
+
*/
|
|
498
|
+
getTask(t) {
|
|
499
|
+
return this._tasks.get(t);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
//#endregion
|
|
503
|
+
export { x as Bench, b as Task, U as hrtimeNow, B as now };
|
|
504
|
+
|
|
505
|
+
//# sourceMappingURL=dist-uWX8WbjY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-uWX8WbjY.js","names":[],"sources":["../../../../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js"],"sourcesContent":["var $ = Object.defineProperty;\nvar C = (s) => {\n throw TypeError(s);\n};\nvar D = (s, n, t) => n in s ? $(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;\nvar O = (s, n, t) => D(s, typeof n != \"symbol\" ? n + \"\" : n, t), q = (s, n, t) => n.has(s) || C(\"Cannot \" + t);\nvar d = (s, n, t) => (q(s, n, \"read from private field\"), t ? t.call(s) : n.get(s)), k = (s, n, t) => n.has(s) ? C(\"Cannot add the same private member more than once\") : n instanceof WeakSet ? n.add(s) : n.set(s, t), f = (s, n, t, e) => (q(s, n, \"write to private field\"), e ? e.call(s, t) : n.set(s, t), t);\nvar F = (s, n, t, e) => ({\n set _(r) {\n f(s, n, r, t);\n },\n get _() {\n return d(s, n, e);\n }\n});\n\n// node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js\nvar M = class {\n constructor(n) {\n O(this, \"value\");\n O(this, \"next\");\n this.value = n;\n }\n}, m, w, E, g = class {\n constructor() {\n k(this, m);\n k(this, w);\n k(this, E);\n this.clear();\n }\n enqueue(n) {\n let t = new M(n);\n d(this, m) ? (d(this, w).next = t, f(this, w, t)) : (f(this, m, t), f(this, w, t)), F(this, E)._++;\n }\n dequeue() {\n let n = d(this, m);\n if (n)\n return f(this, m, d(this, m).next), F(this, E)._--, n.value;\n }\n clear() {\n f(this, m, void 0), f(this, w, void 0), f(this, E, 0);\n }\n get size() {\n return d(this, E);\n }\n *[Symbol.iterator]() {\n let n = d(this, m);\n for (; n; )\n yield n.value, n = n.next;\n }\n};\nm = new WeakMap(), w = new WeakMap(), E = new WeakMap();\n\n// node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js\nfunction y(s) {\n if (!((Number.isInteger(s) || s === Number.POSITIVE_INFINITY) && s > 0))\n throw new TypeError(\"Expected `concurrency` to be a number from 1 and up\");\n let n = new g(), t = 0, e = () => {\n t--, n.size > 0 && n.dequeue()();\n }, r = async (h, p, a) => {\n t++;\n let l = (async () => h(...a))();\n p(l);\n try {\n await l;\n } catch (T) {\n }\n e();\n }, i = (h, p, a) => {\n n.enqueue(r.bind(void 0, h, p, a)), (async () => (await Promise.resolve(), t < s && n.size > 0 && n.dequeue()()))();\n }, c = (h, ...p) => new Promise((a) => {\n i(h, a, p);\n });\n return Object.defineProperties(c, {\n activeCount: {\n get: () => t\n },\n pendingCount: {\n get: () => n.size\n },\n clearQueue: {\n value: () => {\n n.clear();\n }\n }\n }), c;\n}\n\n// src/event.ts\nfunction o(s, n = null) {\n let t = new Event(s);\n return n && Object.defineProperty(t, \"task\", {\n value: n,\n enumerable: !0,\n writable: !1,\n configurable: !1\n }), t;\n}\n\n// src/constants.ts\nvar G = {\n 1: 12.71,\n 2: 4.303,\n 3: 3.182,\n 4: 2.776,\n 5: 2.571,\n 6: 2.447,\n 7: 2.365,\n 8: 2.306,\n 9: 2.262,\n 10: 2.228,\n 11: 2.201,\n 12: 2.179,\n 13: 2.16,\n 14: 2.145,\n 15: 2.131,\n 16: 2.12,\n 17: 2.11,\n 18: 2.101,\n 19: 2.093,\n 20: 2.086,\n 21: 2.08,\n 22: 2.074,\n 23: 2.069,\n 24: 2.064,\n 25: 2.06,\n 26: 2.056,\n 27: 2.052,\n 28: 2.048,\n 29: 2.045,\n 30: 2.042,\n 31: 2.0399,\n 32: 2.0378,\n 33: 2.0357,\n 34: 2.0336,\n 35: 2.0315,\n 36: 2.0294,\n 37: 2.0273,\n 38: 2.0252,\n 39: 2.0231,\n 40: 2.021,\n 41: 2.0198,\n 42: 2.0186,\n 43: 2.0174,\n 44: 2.0162,\n 45: 2.015,\n 46: 2.0138,\n 47: 2.0126,\n 48: 2.0114,\n 49: 2.0102,\n 50: 2.009,\n 51: 2.0081,\n 52: 2.0072,\n 53: 2.0063,\n 54: 2.0054,\n 55: 2.0045,\n 56: 2.0036,\n 57: 2.0027,\n 58: 2.0018,\n 59: 2.0009,\n 60: 2,\n 61: 1.9995,\n 62: 1.999,\n 63: 1.9985,\n 64: 1.998,\n 65: 1.9975,\n 66: 1.997,\n 67: 1.9965,\n 68: 1.996,\n 69: 1.9955,\n 70: 1.995,\n 71: 1.9945,\n 72: 1.994,\n 73: 1.9935,\n 74: 1.993,\n 75: 1.9925,\n 76: 1.992,\n 77: 1.9915,\n 78: 1.991,\n 79: 1.9905,\n 80: 1.99,\n 81: 1.9897,\n 82: 1.9894,\n 83: 1.9891,\n 84: 1.9888,\n 85: 1.9885,\n 86: 1.9882,\n 87: 1.9879,\n 88: 1.9876,\n 89: 1.9873,\n 90: 1.987,\n 91: 1.9867,\n 92: 1.9864,\n 93: 1.9861,\n 94: 1.9858,\n 95: 1.9855,\n 96: 1.9852,\n 97: 1.9849,\n 98: 1.9846,\n 99: 1.9843,\n 100: 1.984,\n 101: 1.9838,\n 102: 1.9836,\n 103: 1.9834,\n 104: 1.9832,\n 105: 1.983,\n 106: 1.9828,\n 107: 1.9826,\n 108: 1.9824,\n 109: 1.9822,\n 110: 1.982,\n 111: 1.9818,\n 112: 1.9816,\n 113: 1.9814,\n 114: 1.9812,\n 115: 1.9819,\n 116: 1.9808,\n 117: 1.9806,\n 118: 1.9804,\n 119: 1.9802,\n 120: 1.98,\n infinity: 1.96\n}, N = G;\n\n// src/utils.ts\nvar J = (s) => s / 1e6, U = () => J(Number(process.hrtime.bigint())), B = () => performance.now();\nfunction W(s) {\n return s !== null && typeof s == \"object\" && typeof s.then == \"function\";\n}\nvar S = (s, n) => s.reduce((e, r) => e + (r - n) ** 2, 0) / (s.length - 1) || 0, X = (async () => {\n}).constructor, Z = (s) => s.constructor === X, z = async (s) => {\n if (Z(s.fn))\n return !0;\n try {\n if (s.opts.beforeEach != null)\n try {\n await s.opts.beforeEach.call(s);\n } catch (e) {\n }\n let n = s.fn(), t = W(n);\n if (t)\n try {\n await n;\n } catch (e) {\n }\n if (s.opts.afterEach != null)\n try {\n await s.opts.afterEach.call(s);\n } catch (e) {\n }\n return t;\n } catch (n) {\n return !1;\n }\n};\n\n// src/task.ts\nvar b = class extends EventTarget {\n constructor(t, e, r, i = {}) {\n super();\n /*\n * the number of times the task\n * function has been executed\n */\n this.runs = 0;\n this.bench = t, this.name = e, this.fn = r, this.opts = i;\n }\n async loop(t, e) {\n var T;\n let r = this.bench.concurrency === \"task\", { threshold: i } = this.bench, c = 0, h = [];\n if (this.opts.beforeAll != null)\n try {\n await this.opts.beforeAll.call(this);\n } catch (u) {\n return { error: u };\n }\n let p = await z(this), a = async () => {\n this.opts.beforeEach != null && await this.opts.beforeEach.call(this);\n let u = 0;\n if (p) {\n let v = this.bench.now();\n await this.fn.call(this), u = this.bench.now() - v;\n } else {\n let v = this.bench.now();\n this.fn.call(this), u = this.bench.now() - v;\n }\n h.push(u), c += u, this.opts.afterEach != null && await this.opts.afterEach.call(this);\n }, l = y(i);\n try {\n let u = [];\n for (; (c < t || h.length + l.activeCount + l.pendingCount < e) && !((T = this.bench.signal) != null && T.aborted); )\n r ? u.push(l(a)) : await a();\n u.length && await Promise.all(u);\n } catch (u) {\n return { error: u };\n }\n if (this.opts.afterAll != null)\n try {\n await this.opts.afterAll.call(this);\n } catch (u) {\n return { error: u };\n }\n return { samples: h };\n }\n /**\n * run the current task and write the results in `Task.result` object\n */\n async run() {\n var r, i;\n if ((r = this.result) != null && r.error)\n return this;\n this.dispatchEvent(o(\"start\", this)), await this.bench.setup(this, \"run\");\n let { samples: t, error: e } = await this.loop(this.bench.time, this.bench.iterations);\n if (this.bench.teardown(this, \"run\"), t) {\n let c = t.reduce((L, A) => L + A, 0);\n this.runs = t.length, t.sort((L, A) => L - A);\n let h = c / this.runs, p = 1e3 / h, a = t.length, l = a - 1, T = t[0], u = t[l], v = c / t.length || 0, P = S(t, v), R = Math.sqrt(P), I = R / Math.sqrt(a), _ = N[String(Math.round(l) || 1)] || N.infinity, K = I * _, j = K / v * 100, H = t[Math.ceil(a * 0.75) - 1], V = t[Math.ceil(a * 0.99) - 1], Q = t[Math.ceil(a * 0.995) - 1], Y = t[Math.ceil(a * 0.999) - 1];\n if ((i = this.bench.signal) != null && i.aborted)\n return this;\n this.setResult({\n totalTime: c,\n min: T,\n max: u,\n hz: p,\n period: h,\n samples: t,\n mean: v,\n variance: P,\n sd: R,\n sem: I,\n df: l,\n critical: _,\n moe: K,\n rme: j,\n p75: H,\n p99: V,\n p995: Q,\n p999: Y\n });\n }\n if (e) {\n if (this.setResult({ error: e }), this.bench.throws)\n throw e;\n this.dispatchEvent(o(\"error\", this)), this.bench.dispatchEvent(o(\"error\", this));\n }\n return this.dispatchEvent(o(\"cycle\", this)), this.bench.dispatchEvent(o(\"cycle\", this)), this.dispatchEvent(o(\"complete\", this)), this;\n }\n /**\n * warmup the current task\n */\n async warmup() {\n var e;\n if ((e = this.result) != null && e.error)\n return;\n this.dispatchEvent(o(\"warmup\", this)), await this.bench.setup(this, \"warmup\");\n let { error: t } = await this.loop(this.bench.warmupTime, this.bench.warmupIterations);\n if (this.bench.teardown(this, \"warmup\"), t && (this.setResult({ error: t }), this.bench.throws))\n throw t;\n }\n addEventListener(t, e, r) {\n super.addEventListener(t, e, r);\n }\n removeEventListener(t, e, r) {\n super.removeEventListener(t, e, r);\n }\n /**\n * change the result object values\n */\n setResult(t) {\n this.result = { ...this.result, ...t }, Object.freeze(this.result);\n }\n /**\n * reset the task to make the `Task.runs` a zero-value and remove the `Task.result`\n * object\n */\n reset() {\n this.dispatchEvent(o(\"reset\", this)), this.runs = 0, this.result = void 0;\n }\n};\n\n// src/bench.ts\nvar x = class extends EventTarget {\n constructor(t = {}) {\n var e, r, i, c, h, p, a, l;\n super();\n /*\n * @private the task map\n */\n this._tasks = /* @__PURE__ */ new Map();\n this._todos = /* @__PURE__ */ new Map();\n /**\n * Executes tasks concurrently based on the specified concurrency mode.\n *\n * - When `mode` is set to `null` (default), concurrency is disabled.\n * - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.\n * - When `mode` is set to 'bench', different tasks within the bench run concurrently.\n */\n this.concurrency = null;\n /**\n * The maximum number of concurrent tasks to run. Defaults to Infinity.\n */\n this.threshold = 1 / 0;\n this.warmupTime = 100;\n this.warmupIterations = 5;\n this.time = 500;\n this.iterations = 10;\n this.now = B;\n this.now = (e = t.now) != null ? e : this.now, this.warmupTime = (r = t.warmupTime) != null ? r : this.warmupTime, this.warmupIterations = (i = t.warmupIterations) != null ? i : this.warmupIterations, this.time = (c = t.time) != null ? c : this.time, this.iterations = (h = t.iterations) != null ? h : this.iterations, this.signal = t.signal, this.throws = (p = t.throws) != null ? p : !1, this.setup = (a = t.setup) != null ? a : () => {\n }, this.teardown = (l = t.teardown) != null ? l : () => {\n }, this.signal && this.signal.addEventListener(\n \"abort\",\n () => {\n this.dispatchEvent(o(\"abort\"));\n },\n { once: !0 }\n );\n }\n runTask(t) {\n var e;\n return (e = this.signal) != null && e.aborted ? t : t.run();\n }\n /**\n * run the added tasks that were registered using the\n * {@link add} method.\n * Note: This method does not do any warmup. Call {@link warmup} for that.\n */\n async run() {\n if (this.concurrency === \"bench\")\n return this.runConcurrently(this.threshold, this.concurrency);\n this.dispatchEvent(o(\"start\"));\n let t = [];\n for (let e of [...this._tasks.values()])\n t.push(await this.runTask(e));\n return this.dispatchEvent(o(\"complete\")), t;\n }\n /**\n * See Bench.{@link concurrency}\n */\n async runConcurrently(t = 1 / 0, e = \"bench\") {\n if (this.threshold = t, this.concurrency = e, e === \"task\")\n return this.run();\n this.dispatchEvent(o(\"start\"));\n let r = y(t), i = [];\n for (let h of [...this._tasks.values()])\n i.push(r(() => this.runTask(h)));\n let c = await Promise.all(i);\n return this.dispatchEvent(o(\"complete\")), c;\n }\n /**\n * warmup the benchmark tasks.\n * This is not run by default by the {@link run} method.\n */\n async warmup() {\n if (this.concurrency === \"bench\") {\n await this.warmupConcurrently(this.threshold, this.concurrency);\n return;\n }\n this.dispatchEvent(o(\"warmup\"));\n for (let [, t] of this._tasks)\n await t.warmup();\n }\n /**\n * warmup the benchmark tasks concurrently.\n * This is not run by default by the {@link runConcurrently} method.\n */\n async warmupConcurrently(t = 1 / 0, e = \"bench\") {\n if (this.threshold = t, this.concurrency = e, e === \"task\") {\n await this.warmup();\n return;\n }\n this.dispatchEvent(o(\"warmup\"));\n let r = y(t), i = [];\n for (let [, c] of this._tasks)\n i.push(r(() => c.warmup()));\n await Promise.all(i);\n }\n /**\n * reset each task and remove its result\n */\n reset() {\n this.dispatchEvent(o(\"reset\")), this._tasks.forEach((t) => {\n t.reset();\n });\n }\n /**\n * add a benchmark task to the task map\n */\n add(t, e, r = {}) {\n let i = new b(this, t, e, r);\n return this._tasks.set(t, i), this.dispatchEvent(o(\"add\", i)), this;\n }\n /**\n * add a benchmark todo to the todo map\n */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n todo(t, e = () => {\n }, r = {}) {\n let i = new b(this, t, e, r);\n return this._todos.set(t, i), this.dispatchEvent(o(\"todo\", i)), this;\n }\n /**\n * remove a benchmark task from the task map\n */\n remove(t) {\n let e = this.getTask(t);\n return e && (this.dispatchEvent(o(\"remove\", e)), this._tasks.delete(t)), this;\n }\n addEventListener(t, e, r) {\n super.addEventListener(t, e, r);\n }\n removeEventListener(t, e, r) {\n super.removeEventListener(t, e, r);\n }\n /**\n * table of the tasks results\n */\n table(t) {\n return this.tasks.map((e) => {\n if (e.result) {\n if (e.result.error)\n throw e.result.error;\n return (t == null ? void 0 : t(e)) || {\n \"Task Name\": e.name,\n \"ops/sec\": e.result.error ? \"NaN\" : parseInt(e.result.hz.toString(), 10).toLocaleString(),\n \"Average Time (ns)\": e.result.error ? \"NaN\" : e.result.mean * 1e3 * 1e3,\n Margin: e.result.error ? \"NaN\" : `\\xB1${e.result.rme.toFixed(2)}%`,\n Samples: e.result.error ? \"NaN\" : e.result.samples.length\n };\n }\n return null;\n });\n }\n /**\n * (getter) tasks results as an array\n */\n get results() {\n return [...this._tasks.values()].map((t) => t.result);\n }\n /**\n * (getter) tasks as an array\n */\n get tasks() {\n return [...this._tasks.values()];\n }\n get todos() {\n return [...this._todos.values()];\n }\n /**\n * get a task based on the task name\n */\n getTask(t) {\n return this._tasks.get(t);\n }\n};\nexport {\n x as Bench,\n b as Task,\n U as hrtimeNow,\n B as now\n};\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,IAAI,OAAO;AACf,IAAI,KAAK,MAAM;AACb,OAAM,UAAU,EAAE;;AAEpB,IAAI,KAAK,GAAG,GAAG,MAAM,KAAK,IAAI,EAAE,GAAG,GAAG;CAAE,YAAY,CAAC;CAAG,cAAc,CAAC;CAAG,UAAU,CAAC;CAAG,OAAO;CAAG,CAAC,GAAG,EAAE,KAAK;AAC7G,IAAI,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG,OAAO,KAAK,WAAW,IAAI,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,GAAG,MAAM,EAAE,IAAI,EAAE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