@automattic/charts 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{chunk-G3PMV62Z.js → chunk-5WRI5ZAA.js} +1 -6
- package/dist/{chunk-EMMSS5I5.cjs → chunk-DZUJEN5N.cjs} +2 -7
- package/dist/chunk-DZUJEN5N.cjs.map +1 -0
- package/dist/index.cjs +602 -1386
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -52
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +699 -1483
- package/dist/index.js.map +1 -1
- package/dist/visx/group/index.cjs +1 -1
- package/dist/visx/group/index.js +1 -1
- package/dist/visx/legend/index.cjs +1 -1
- package/dist/visx/legend/index.js +1 -1
- package/dist/visx/text/index.cjs +1 -1
- package/dist/visx/text/index.js +1 -1
- package/package.json +12 -11
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +26 -42
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx +18 -5
- package/src/charts/conversion-funnel-chart/test/conversion-funnel-chart.test.tsx +11 -0
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +1 -1
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +2 -2
- package/src/charts/line-chart/line-chart.module.scss +3 -3
- package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +2 -2
- package/src/charts/pie-chart/pie-chart.tsx +5 -3
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +3 -3
- package/src/components/legend/private/base-legend.module.scss +2 -2
- package/src/components/tooltip/base-tooltip.module.scss +1 -1
- package/src/components/trend-indicator/trend-indicator.module.scss +2 -2
- package/src/hooks/use-chart-margin.tsx +1 -14
- package/src/providers/chart-context/global-charts-provider.tsx +13 -0
- package/src/providers/chart-context/test/chart-context.test.tsx +51 -0
- package/src/providers/chart-context/themes.ts +7 -1
- package/src/providers/chart-context/types.ts +1 -0
- package/src/types.ts +2 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/resolve-font-size.ts +37 -0
- package/src/utils/test/resolve-css-var.test.ts +3 -5
- package/src/utils/test/resolve-font-size.test.ts +66 -0
- package/dist/chunk-EMMSS5I5.cjs.map +0 -1
- /package/dist/{chunk-G3PMV62Z.js.map → chunk-5WRI5ZAA.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,41 +3,40 @@ import {
|
|
|
3
3
|
} from "./chunk-NFRB2POF.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
|
-
__export,
|
|
7
6
|
__toESM
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
9
8
|
|
|
10
9
|
// ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
11
10
|
var require_fast_deep_equal = __commonJS({
|
|
12
11
|
"../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
13
12
|
"use strict";
|
|
14
|
-
module.exports = function equal(
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
if (
|
|
18
|
-
var length2,
|
|
19
|
-
if (Array.isArray(
|
|
20
|
-
length2 =
|
|
21
|
-
if (length2 !=
|
|
22
|
-
for (
|
|
23
|
-
if (!equal(
|
|
13
|
+
module.exports = function equal(a, b) {
|
|
14
|
+
if (a === b) return true;
|
|
15
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
16
|
+
if (a.constructor !== b.constructor) return false;
|
|
17
|
+
var length2, i, keys;
|
|
18
|
+
if (Array.isArray(a)) {
|
|
19
|
+
length2 = a.length;
|
|
20
|
+
if (length2 != b.length) return false;
|
|
21
|
+
for (i = length2; i-- !== 0; )
|
|
22
|
+
if (!equal(a[i], b[i])) return false;
|
|
24
23
|
return true;
|
|
25
24
|
}
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
keys = Object.keys(
|
|
25
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
26
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
27
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
28
|
+
keys = Object.keys(a);
|
|
30
29
|
length2 = keys.length;
|
|
31
|
-
if (length2 !== Object.keys(
|
|
32
|
-
for (
|
|
33
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
34
|
-
for (
|
|
35
|
-
var key = keys[
|
|
36
|
-
if (!equal(
|
|
30
|
+
if (length2 !== Object.keys(b).length) return false;
|
|
31
|
+
for (i = length2; i-- !== 0; )
|
|
32
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
33
|
+
for (i = length2; i-- !== 0; ) {
|
|
34
|
+
var key = keys[i];
|
|
35
|
+
if (!equal(a[key], b[key])) return false;
|
|
37
36
|
}
|
|
38
37
|
return true;
|
|
39
38
|
}
|
|
40
|
-
return
|
|
39
|
+
return a !== a && b !== b;
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
});
|
|
@@ -46,110 +45,110 @@ var require_fast_deep_equal = __commonJS({
|
|
|
46
45
|
var require_react_is_production_min = __commonJS({
|
|
47
46
|
"../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
48
47
|
"use strict";
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var q =
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
function z(
|
|
69
|
-
if ("object" === typeof
|
|
70
|
-
var
|
|
71
|
-
switch (
|
|
72
|
-
case
|
|
73
|
-
switch (
|
|
74
|
-
case
|
|
75
|
-
case
|
|
76
|
-
case
|
|
77
|
-
case
|
|
78
|
-
case
|
|
79
|
-
case
|
|
80
|
-
return
|
|
48
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
49
|
+
var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
50
|
+
var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
51
|
+
var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
52
|
+
var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
53
|
+
var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
54
|
+
var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
55
|
+
var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
56
|
+
var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
57
|
+
var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
58
|
+
var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
59
|
+
var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
60
|
+
var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
61
|
+
var r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
62
|
+
var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
63
|
+
var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
64
|
+
var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
65
|
+
var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
66
|
+
var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
67
|
+
function z(a) {
|
|
68
|
+
if ("object" === typeof a && null !== a) {
|
|
69
|
+
var u = a.$$typeof;
|
|
70
|
+
switch (u) {
|
|
71
|
+
case c:
|
|
72
|
+
switch (a = a.type, a) {
|
|
73
|
+
case l:
|
|
74
|
+
case m:
|
|
75
|
+
case e:
|
|
76
|
+
case g:
|
|
77
|
+
case f:
|
|
78
|
+
case p:
|
|
79
|
+
return a;
|
|
81
80
|
default:
|
|
82
|
-
switch (
|
|
83
|
-
case
|
|
84
|
-
case
|
|
85
|
-
case
|
|
86
|
-
case
|
|
87
|
-
case
|
|
88
|
-
return
|
|
81
|
+
switch (a = a && a.$$typeof, a) {
|
|
82
|
+
case k:
|
|
83
|
+
case n:
|
|
84
|
+
case t:
|
|
85
|
+
case r:
|
|
86
|
+
case h:
|
|
87
|
+
return a;
|
|
89
88
|
default:
|
|
90
|
-
return
|
|
89
|
+
return u;
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
|
-
case
|
|
94
|
-
return
|
|
92
|
+
case d:
|
|
93
|
+
return u;
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
|
-
function A(
|
|
99
|
-
return z(
|
|
100
|
-
}
|
|
101
|
-
exports.AsyncMode =
|
|
102
|
-
exports.ConcurrentMode =
|
|
103
|
-
exports.ContextConsumer =
|
|
104
|
-
exports.ContextProvider =
|
|
105
|
-
exports.Element =
|
|
106
|
-
exports.ForwardRef =
|
|
107
|
-
exports.Fragment =
|
|
108
|
-
exports.Lazy =
|
|
109
|
-
exports.Memo =
|
|
110
|
-
exports.Portal =
|
|
111
|
-
exports.Profiler =
|
|
112
|
-
exports.StrictMode =
|
|
113
|
-
exports.Suspense =
|
|
114
|
-
exports.isAsyncMode = function(
|
|
115
|
-
return A(
|
|
97
|
+
function A(a) {
|
|
98
|
+
return z(a) === m;
|
|
99
|
+
}
|
|
100
|
+
exports.AsyncMode = l;
|
|
101
|
+
exports.ConcurrentMode = m;
|
|
102
|
+
exports.ContextConsumer = k;
|
|
103
|
+
exports.ContextProvider = h;
|
|
104
|
+
exports.Element = c;
|
|
105
|
+
exports.ForwardRef = n;
|
|
106
|
+
exports.Fragment = e;
|
|
107
|
+
exports.Lazy = t;
|
|
108
|
+
exports.Memo = r;
|
|
109
|
+
exports.Portal = d;
|
|
110
|
+
exports.Profiler = g;
|
|
111
|
+
exports.StrictMode = f;
|
|
112
|
+
exports.Suspense = p;
|
|
113
|
+
exports.isAsyncMode = function(a) {
|
|
114
|
+
return A(a) || z(a) === l;
|
|
116
115
|
};
|
|
117
116
|
exports.isConcurrentMode = A;
|
|
118
|
-
exports.isContextConsumer = function(
|
|
119
|
-
return z(
|
|
117
|
+
exports.isContextConsumer = function(a) {
|
|
118
|
+
return z(a) === k;
|
|
120
119
|
};
|
|
121
|
-
exports.isContextProvider = function(
|
|
122
|
-
return z(
|
|
120
|
+
exports.isContextProvider = function(a) {
|
|
121
|
+
return z(a) === h;
|
|
123
122
|
};
|
|
124
|
-
exports.isElement = function(
|
|
125
|
-
return "object" === typeof
|
|
123
|
+
exports.isElement = function(a) {
|
|
124
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
126
125
|
};
|
|
127
|
-
exports.isForwardRef = function(
|
|
128
|
-
return z(
|
|
126
|
+
exports.isForwardRef = function(a) {
|
|
127
|
+
return z(a) === n;
|
|
129
128
|
};
|
|
130
|
-
exports.isFragment = function(
|
|
131
|
-
return z(
|
|
129
|
+
exports.isFragment = function(a) {
|
|
130
|
+
return z(a) === e;
|
|
132
131
|
};
|
|
133
|
-
exports.isLazy = function(
|
|
134
|
-
return z(
|
|
132
|
+
exports.isLazy = function(a) {
|
|
133
|
+
return z(a) === t;
|
|
135
134
|
};
|
|
136
|
-
exports.isMemo = function(
|
|
137
|
-
return z(
|
|
135
|
+
exports.isMemo = function(a) {
|
|
136
|
+
return z(a) === r;
|
|
138
137
|
};
|
|
139
|
-
exports.isPortal = function(
|
|
140
|
-
return z(
|
|
138
|
+
exports.isPortal = function(a) {
|
|
139
|
+
return z(a) === d;
|
|
141
140
|
};
|
|
142
|
-
exports.isProfiler = function(
|
|
143
|
-
return z(
|
|
141
|
+
exports.isProfiler = function(a) {
|
|
142
|
+
return z(a) === g;
|
|
144
143
|
};
|
|
145
|
-
exports.isStrictMode = function(
|
|
146
|
-
return z(
|
|
144
|
+
exports.isStrictMode = function(a) {
|
|
145
|
+
return z(a) === f;
|
|
147
146
|
};
|
|
148
|
-
exports.isSuspense = function(
|
|
149
|
-
return z(
|
|
147
|
+
exports.isSuspense = function(a) {
|
|
148
|
+
return z(a) === p;
|
|
150
149
|
};
|
|
151
|
-
exports.isValidElementType = function(
|
|
152
|
-
return "string" === typeof
|
|
150
|
+
exports.isValidElementType = function(a) {
|
|
151
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
153
152
|
};
|
|
154
153
|
exports.typeOf = z;
|
|
155
154
|
}
|
|
@@ -393,13 +392,13 @@ var require_hoist_non_react_statics_cjs = __commonJS({
|
|
|
393
392
|
}
|
|
394
393
|
var targetStatics = getStatics(targetComponent);
|
|
395
394
|
var sourceStatics = getStatics(sourceComponent);
|
|
396
|
-
for (var
|
|
397
|
-
var key = keys[
|
|
395
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
396
|
+
var key = keys[i];
|
|
398
397
|
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
399
398
|
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
400
399
|
try {
|
|
401
400
|
defineProperty(targetComponent, key, descriptor);
|
|
402
|
-
} catch (
|
|
401
|
+
} catch (e) {
|
|
403
402
|
}
|
|
404
403
|
}
|
|
405
404
|
}
|
|
@@ -414,234 +413,64 @@ var require_hoist_non_react_statics_cjs = __commonJS({
|
|
|
414
413
|
var require_es6 = __commonJS({
|
|
415
414
|
"../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js"(exports, module) {
|
|
416
415
|
"use strict";
|
|
417
|
-
module.exports = function equal(
|
|
418
|
-
if (
|
|
419
|
-
if (
|
|
420
|
-
if (
|
|
421
|
-
var length2,
|
|
422
|
-
if (Array.isArray(
|
|
423
|
-
length2 =
|
|
424
|
-
if (length2 !=
|
|
425
|
-
for (
|
|
426
|
-
if (!equal(
|
|
416
|
+
module.exports = function equal(a, b) {
|
|
417
|
+
if (a === b) return true;
|
|
418
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
419
|
+
if (a.constructor !== b.constructor) return false;
|
|
420
|
+
var length2, i, keys;
|
|
421
|
+
if (Array.isArray(a)) {
|
|
422
|
+
length2 = a.length;
|
|
423
|
+
if (length2 != b.length) return false;
|
|
424
|
+
for (i = length2; i-- !== 0; )
|
|
425
|
+
if (!equal(a[i], b[i])) return false;
|
|
427
426
|
return true;
|
|
428
427
|
}
|
|
429
|
-
if (
|
|
430
|
-
if (
|
|
431
|
-
for (
|
|
432
|
-
if (!
|
|
433
|
-
for (
|
|
434
|
-
if (!equal(
|
|
428
|
+
if (a instanceof Map && b instanceof Map) {
|
|
429
|
+
if (a.size !== b.size) return false;
|
|
430
|
+
for (i of a.entries())
|
|
431
|
+
if (!b.has(i[0])) return false;
|
|
432
|
+
for (i of a.entries())
|
|
433
|
+
if (!equal(i[1], b.get(i[0]))) return false;
|
|
435
434
|
return true;
|
|
436
435
|
}
|
|
437
|
-
if (
|
|
438
|
-
if (
|
|
439
|
-
for (
|
|
440
|
-
if (!
|
|
436
|
+
if (a instanceof Set && b instanceof Set) {
|
|
437
|
+
if (a.size !== b.size) return false;
|
|
438
|
+
for (i of a.entries())
|
|
439
|
+
if (!b.has(i[0])) return false;
|
|
441
440
|
return true;
|
|
442
441
|
}
|
|
443
|
-
if (ArrayBuffer.isView(
|
|
444
|
-
length2 =
|
|
445
|
-
if (length2 !=
|
|
446
|
-
for (
|
|
447
|
-
if (
|
|
442
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
443
|
+
length2 = a.length;
|
|
444
|
+
if (length2 != b.length) return false;
|
|
445
|
+
for (i = length2; i-- !== 0; )
|
|
446
|
+
if (a[i] !== b[i]) return false;
|
|
448
447
|
return true;
|
|
449
448
|
}
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
452
|
-
if (
|
|
453
|
-
keys = Object.keys(
|
|
449
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
450
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
451
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
452
|
+
keys = Object.keys(a);
|
|
454
453
|
length2 = keys.length;
|
|
455
|
-
if (length2 !== Object.keys(
|
|
456
|
-
for (
|
|
457
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
458
|
-
for (
|
|
459
|
-
var key = keys[
|
|
460
|
-
if (!equal(
|
|
454
|
+
if (length2 !== Object.keys(b).length) return false;
|
|
455
|
+
for (i = length2; i-- !== 0; )
|
|
456
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
457
|
+
for (i = length2; i-- !== 0; ) {
|
|
458
|
+
var key = keys[i];
|
|
459
|
+
if (!equal(a[key], b[key])) return false;
|
|
461
460
|
}
|
|
462
461
|
return true;
|
|
463
462
|
}
|
|
464
|
-
return
|
|
463
|
+
return a !== a && b !== b;
|
|
465
464
|
};
|
|
466
465
|
}
|
|
467
466
|
});
|
|
468
467
|
|
|
469
|
-
// ../../../node_modules/.pnpm/highlight-words-core@1.2.3/node_modules/highlight-words-core/dist/index.js
|
|
470
|
-
var require_dist = __commonJS({
|
|
471
|
-
"../../../node_modules/.pnpm/highlight-words-core@1.2.3/node_modules/highlight-words-core/dist/index.js"(exports, module) {
|
|
472
|
-
module.exports = /******/
|
|
473
|
-
(function(modules) {
|
|
474
|
-
var installedModules = {};
|
|
475
|
-
function __webpack_require__(moduleId) {
|
|
476
|
-
if (installedModules[moduleId])
|
|
477
|
-
return installedModules[moduleId].exports;
|
|
478
|
-
var module2 = installedModules[moduleId] = {
|
|
479
|
-
/******/
|
|
480
|
-
exports: {},
|
|
481
|
-
/******/
|
|
482
|
-
id: moduleId,
|
|
483
|
-
/******/
|
|
484
|
-
loaded: false
|
|
485
|
-
/******/
|
|
486
|
-
};
|
|
487
|
-
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
|
|
488
|
-
module2.loaded = true;
|
|
489
|
-
return module2.exports;
|
|
490
|
-
}
|
|
491
|
-
__webpack_require__.m = modules;
|
|
492
|
-
__webpack_require__.c = installedModules;
|
|
493
|
-
__webpack_require__.p = "";
|
|
494
|
-
return __webpack_require__(0);
|
|
495
|
-
})([
|
|
496
|
-
/* 0 */
|
|
497
|
-
/***/
|
|
498
|
-
(function(module2, exports2, __webpack_require__) {
|
|
499
|
-
module2.exports = __webpack_require__(1);
|
|
500
|
-
}),
|
|
501
|
-
/* 1 */
|
|
502
|
-
/***/
|
|
503
|
-
(function(module2, exports2, __webpack_require__) {
|
|
504
|
-
"use strict";
|
|
505
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
506
|
-
value: true
|
|
507
|
-
});
|
|
508
|
-
var _utils = __webpack_require__(2);
|
|
509
|
-
Object.defineProperty(exports2, "combineChunks", {
|
|
510
|
-
enumerable: true,
|
|
511
|
-
get: function get() {
|
|
512
|
-
return _utils.combineChunks;
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
Object.defineProperty(exports2, "fillInChunks", {
|
|
516
|
-
enumerable: true,
|
|
517
|
-
get: function get() {
|
|
518
|
-
return _utils.fillInChunks;
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
Object.defineProperty(exports2, "findAll", {
|
|
522
|
-
enumerable: true,
|
|
523
|
-
get: function get() {
|
|
524
|
-
return _utils.findAll;
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
Object.defineProperty(exports2, "findChunks", {
|
|
528
|
-
enumerable: true,
|
|
529
|
-
get: function get() {
|
|
530
|
-
return _utils.findChunks;
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
}),
|
|
534
|
-
/* 2 */
|
|
535
|
-
/***/
|
|
536
|
-
(function(module2, exports2) {
|
|
537
|
-
"use strict";
|
|
538
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
539
|
-
value: true
|
|
540
|
-
});
|
|
541
|
-
var findAll2 = exports2.findAll = function findAll3(_ref2) {
|
|
542
|
-
var autoEscape = _ref2.autoEscape, _ref$caseSensitive = _ref2.caseSensitive, caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive, _ref$findChunks = _ref2.findChunks, findChunks = _ref$findChunks === void 0 ? defaultFindChunks : _ref$findChunks, sanitize = _ref2.sanitize, searchWords = _ref2.searchWords, textToHighlight = _ref2.textToHighlight;
|
|
543
|
-
return fillInChunks({
|
|
544
|
-
chunksToHighlight: combineChunks({
|
|
545
|
-
chunks: findChunks({
|
|
546
|
-
autoEscape,
|
|
547
|
-
caseSensitive,
|
|
548
|
-
sanitize,
|
|
549
|
-
searchWords,
|
|
550
|
-
textToHighlight
|
|
551
|
-
})
|
|
552
|
-
}),
|
|
553
|
-
totalLength: textToHighlight ? textToHighlight.length : 0
|
|
554
|
-
});
|
|
555
|
-
};
|
|
556
|
-
var combineChunks = exports2.combineChunks = function combineChunks2(_ref2) {
|
|
557
|
-
var chunks = _ref2.chunks;
|
|
558
|
-
chunks = chunks.sort(function(first, second) {
|
|
559
|
-
return first.start - second.start;
|
|
560
|
-
}).reduce(function(processedChunks, nextChunk) {
|
|
561
|
-
if (processedChunks.length === 0) {
|
|
562
|
-
return [nextChunk];
|
|
563
|
-
} else {
|
|
564
|
-
var prevChunk = processedChunks.pop();
|
|
565
|
-
if (nextChunk.start < prevChunk.end) {
|
|
566
|
-
var endIndex = Math.max(prevChunk.end, nextChunk.end);
|
|
567
|
-
processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex });
|
|
568
|
-
} else {
|
|
569
|
-
processedChunks.push(prevChunk, nextChunk);
|
|
570
|
-
}
|
|
571
|
-
return processedChunks;
|
|
572
|
-
}
|
|
573
|
-
}, []);
|
|
574
|
-
return chunks;
|
|
575
|
-
};
|
|
576
|
-
var defaultFindChunks = function defaultFindChunks2(_ref3) {
|
|
577
|
-
var autoEscape = _ref3.autoEscape, caseSensitive = _ref3.caseSensitive, _ref3$sanitize = _ref3.sanitize, sanitize = _ref3$sanitize === void 0 ? defaultSanitize : _ref3$sanitize, searchWords = _ref3.searchWords, textToHighlight = _ref3.textToHighlight;
|
|
578
|
-
textToHighlight = sanitize(textToHighlight);
|
|
579
|
-
return searchWords.filter(function(searchWord) {
|
|
580
|
-
return searchWord;
|
|
581
|
-
}).reduce(function(chunks, searchWord) {
|
|
582
|
-
searchWord = sanitize(searchWord);
|
|
583
|
-
if (autoEscape) {
|
|
584
|
-
searchWord = escapeRegExpFn(searchWord);
|
|
585
|
-
}
|
|
586
|
-
var regex = new RegExp(searchWord, caseSensitive ? "g" : "gi");
|
|
587
|
-
var match2 = void 0;
|
|
588
|
-
while (match2 = regex.exec(textToHighlight)) {
|
|
589
|
-
var _start = match2.index;
|
|
590
|
-
var _end = regex.lastIndex;
|
|
591
|
-
if (_end > _start) {
|
|
592
|
-
chunks.push({ highlight: false, start: _start, end: _end });
|
|
593
|
-
}
|
|
594
|
-
if (match2.index === regex.lastIndex) {
|
|
595
|
-
regex.lastIndex++;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
return chunks;
|
|
599
|
-
}, []);
|
|
600
|
-
};
|
|
601
|
-
exports2.findChunks = defaultFindChunks;
|
|
602
|
-
var fillInChunks = exports2.fillInChunks = function fillInChunks2(_ref4) {
|
|
603
|
-
var chunksToHighlight = _ref4.chunksToHighlight, totalLength = _ref4.totalLength;
|
|
604
|
-
var allChunks = [];
|
|
605
|
-
var append2 = function append3(start, end, highlight) {
|
|
606
|
-
if (end - start > 0) {
|
|
607
|
-
allChunks.push({
|
|
608
|
-
start,
|
|
609
|
-
end,
|
|
610
|
-
highlight
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
if (chunksToHighlight.length === 0) {
|
|
615
|
-
append2(0, totalLength, false);
|
|
616
|
-
} else {
|
|
617
|
-
var lastIndex = 0;
|
|
618
|
-
chunksToHighlight.forEach(function(chunk) {
|
|
619
|
-
append2(lastIndex, chunk.start, false);
|
|
620
|
-
append2(chunk.start, chunk.end, true);
|
|
621
|
-
lastIndex = chunk.end;
|
|
622
|
-
});
|
|
623
|
-
append2(lastIndex, totalLength, false);
|
|
624
|
-
}
|
|
625
|
-
return allChunks;
|
|
626
|
-
};
|
|
627
|
-
function defaultSanitize(string) {
|
|
628
|
-
return string;
|
|
629
|
-
}
|
|
630
|
-
function escapeRegExpFn(string) {
|
|
631
|
-
return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
632
|
-
}
|
|
633
|
-
})
|
|
634
|
-
/******/
|
|
635
|
-
]);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
|
|
639
468
|
// src/charts/bar-chart/bar-chart.tsx
|
|
640
469
|
import { formatNumber as formatNumber5 } from "@automattic/number-formatters";
|
|
641
470
|
import { PatternLines, PatternCircles, PatternWaves, PatternHexagons } from "@visx/pattern";
|
|
642
471
|
import { Axis, BarSeries, BarGroup, Grid, XYChart } from "@visx/xychart";
|
|
643
472
|
import { __ } from "@wordpress/i18n";
|
|
644
|
-
import
|
|
473
|
+
import clsx3 from "clsx";
|
|
645
474
|
import { useCallback as useCallback7, useContext as useContext9, useState as useState6, useRef as useRef7, useMemo as useMemo15 } from "react";
|
|
646
475
|
|
|
647
476
|
// src/components/legend/legend.tsx
|
|
@@ -979,8 +808,8 @@ var parseHslString = (hslString) => {
|
|
|
979
808
|
if (isNaN(parsed.h) && isNaN(parsed.s) && isNaN(parsed.l)) {
|
|
980
809
|
return null;
|
|
981
810
|
}
|
|
982
|
-
const
|
|
983
|
-
return [
|
|
811
|
+
const h = isNaN(parsed.h) ? 0 : (parsed.h % 360 + 360) % 360;
|
|
812
|
+
return [h, parsed.s * 100, parsed.l * 100];
|
|
984
813
|
};
|
|
985
814
|
var parseRgbString = (rgbString) => {
|
|
986
815
|
const lower = rgbString.toLowerCase().trim();
|
|
@@ -1002,10 +831,10 @@ var normalizeColorToHex = (color, element, resolveCss, _depth = 0) => {
|
|
|
1002
831
|
}
|
|
1003
832
|
const trimmed = color.trim().toLowerCase();
|
|
1004
833
|
if (/^#[0-9a-f]{3}$/i.test(trimmed)) {
|
|
1005
|
-
const
|
|
1006
|
-
const
|
|
1007
|
-
const
|
|
1008
|
-
return `#${
|
|
834
|
+
const r = trimmed[1];
|
|
835
|
+
const g = trimmed[2];
|
|
836
|
+
const b = trimmed[3];
|
|
837
|
+
return `#${r}${r}${g}${g}${b}${b}`;
|
|
1009
838
|
}
|
|
1010
839
|
if (trimmed.startsWith("--") || trimmed.startsWith("var(")) {
|
|
1011
840
|
if (resolveCss) {
|
|
@@ -1031,12 +860,12 @@ var normalizeColorToHex = (color, element, resolveCss, _depth = 0) => {
|
|
|
1031
860
|
};
|
|
1032
861
|
var lightenHexColor = (hex, blend) => {
|
|
1033
862
|
validateHexColor(hex);
|
|
1034
|
-
const
|
|
1035
|
-
const
|
|
1036
|
-
const
|
|
1037
|
-
const newR = Math.round(
|
|
1038
|
-
const newG = Math.round(
|
|
1039
|
-
const newB = Math.round(
|
|
863
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
864
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
865
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
866
|
+
const newR = Math.round(r + (255 - r) * blend);
|
|
867
|
+
const newG = Math.round(g + (255 - g) * blend);
|
|
868
|
+
const newB = Math.round(b + (255 - b) * blend);
|
|
1040
869
|
return `#${newR.toString(16).padStart(2, "0")}${newG.toString(16).padStart(2, "0")}${newB.toString(16).padStart(2, "0")}`;
|
|
1041
870
|
};
|
|
1042
871
|
|
|
@@ -1091,6 +920,22 @@ function resolveVariableName(varName, element) {
|
|
|
1091
920
|
}
|
|
1092
921
|
}
|
|
1093
922
|
|
|
923
|
+
// src/utils/resolve-font-size.ts
|
|
924
|
+
var resolveFontSize = (val) => {
|
|
925
|
+
if (typeof val === "number") {
|
|
926
|
+
return isNaN(val) ? void 0 : val;
|
|
927
|
+
}
|
|
928
|
+
if (typeof val === "string") {
|
|
929
|
+
const match2 = val.trim().match(/^(-?\d+\.?\d*|-?\.\d+)(px)?$/);
|
|
930
|
+
if (!match2) {
|
|
931
|
+
return void 0;
|
|
932
|
+
}
|
|
933
|
+
const parsed = parseFloat(match2[1]);
|
|
934
|
+
return isNaN(parsed) ? void 0 : parsed;
|
|
935
|
+
}
|
|
936
|
+
return void 0;
|
|
937
|
+
};
|
|
938
|
+
|
|
1094
939
|
// src/providers/chart-context/private/get-chart-color.ts
|
|
1095
940
|
import { hsl as d3Hsl2 } from "@visx/vendor/d3-color";
|
|
1096
941
|
var GOLDEN_RATIO = 0.618033988749;
|
|
@@ -1128,8 +973,8 @@ var getChartColor = (index, colorCache) => {
|
|
|
1128
973
|
if (hues.length === 1) {
|
|
1129
974
|
hueRange = FULL_HUE_ROTATION_DEGREES * SINGLE_COLOR_HUE_RANGE_FACTOR;
|
|
1130
975
|
} else if (hueRange > HUE_WRAP_THRESHOLD_DEGREES) {
|
|
1131
|
-
const altMinHue = Math.min(...hues.filter((
|
|
1132
|
-
const altMaxHue = Math.max(...hues.filter((
|
|
976
|
+
const altMinHue = Math.min(...hues.filter((h) => h > HUE_WRAP_THRESHOLD_DEGREES));
|
|
977
|
+
const altMaxHue = Math.max(...hues.filter((h) => h < HUE_WRAP_THRESHOLD_DEGREES)) + FULL_HUE_ROTATION_DEGREES;
|
|
1133
978
|
const altRange = altMaxHue - altMinHue;
|
|
1134
979
|
if (altRange < hueRange) {
|
|
1135
980
|
minHue = altMinHue;
|
|
@@ -1197,7 +1042,13 @@ var defaultTheme = {
|
|
|
1197
1042
|
},
|
|
1198
1043
|
seriesLineStyles: [],
|
|
1199
1044
|
glyphs: [],
|
|
1200
|
-
|
|
1045
|
+
// `fontFamily: 'inherit'` overrides visx's hardcoded default font stack
|
|
1046
|
+
// (`-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif`)
|
|
1047
|
+
// that `buildChartTheme` injects as an inline style on SVG `<text>`
|
|
1048
|
+
// elements for axis labels and ticks. Setting `inherit` lets SVG text
|
|
1049
|
+
// pick up the host application's font-family via normal CSS inheritance.
|
|
1050
|
+
svgLabelSmall: { fill: "var(--jp-gray-80, #2c3338)", fontFamily: "inherit" },
|
|
1051
|
+
svgLabelBig: { fontFamily: "inherit" },
|
|
1201
1052
|
annotationStyles: {
|
|
1202
1053
|
label: {
|
|
1203
1054
|
anchorLineStroke: "var(--jp-gray-80, #2c3338)",
|
|
@@ -1263,7 +1114,9 @@ var GlobalChartsProvider = ({
|
|
|
1263
1114
|
minHue: 360,
|
|
1264
1115
|
maxHue: 0
|
|
1265
1116
|
}));
|
|
1117
|
+
const [isColorPaletteResolved, setIsColorPaletteResolved] = useState(false);
|
|
1266
1118
|
useLayoutEffect(() => {
|
|
1119
|
+
setIsColorPaletteResolved(false);
|
|
1267
1120
|
const {
|
|
1268
1121
|
colors
|
|
1269
1122
|
} = providerTheme;
|
|
@@ -1298,6 +1151,11 @@ var GlobalChartsProvider = ({
|
|
|
1298
1151
|
maxHue
|
|
1299
1152
|
});
|
|
1300
1153
|
}, [providerTheme]);
|
|
1154
|
+
useEffect2(() => {
|
|
1155
|
+
if (colorCache.colors.length > 0) {
|
|
1156
|
+
setIsColorPaletteResolved(true);
|
|
1157
|
+
}
|
|
1158
|
+
}, [colorCache]);
|
|
1301
1159
|
const [groupToColorMap, setGroupToColorMap] = useState(() => /* @__PURE__ */ new Map());
|
|
1302
1160
|
useEffect2(() => {
|
|
1303
1161
|
setGroupToColorMap(/* @__PURE__ */ new Map());
|
|
@@ -1377,8 +1235,8 @@ var GlobalChartsProvider = ({
|
|
|
1377
1235
|
return !chartHidden || !chartHidden.has(seriesLabel);
|
|
1378
1236
|
}, [hiddenSeries]);
|
|
1379
1237
|
const getHiddenSeries = useCallback((chartId) => {
|
|
1380
|
-
const
|
|
1381
|
-
return
|
|
1238
|
+
const set2 = hiddenSeries.get(chartId);
|
|
1239
|
+
return set2 ? new Set(set2) : /* @__PURE__ */ new Set();
|
|
1382
1240
|
}, [hiddenSeries]);
|
|
1383
1241
|
const value = useMemo(() => ({
|
|
1384
1242
|
charts,
|
|
@@ -1389,8 +1247,9 @@ var GlobalChartsProvider = ({
|
|
|
1389
1247
|
getElementStyles,
|
|
1390
1248
|
toggleSeriesVisibility,
|
|
1391
1249
|
isSeriesVisible,
|
|
1392
|
-
getHiddenSeries
|
|
1393
|
-
|
|
1250
|
+
getHiddenSeries,
|
|
1251
|
+
isColorPaletteResolved
|
|
1252
|
+
}), [charts, registerChart, unregisterChart, getChartData, providerTheme, getElementStyles, toggleSeriesVisibility, isSeriesVisible, getHiddenSeries, isColorPaletteResolved]);
|
|
1394
1253
|
return /* @__PURE__ */ _jsx(GlobalChartsContext.Provider, {
|
|
1395
1254
|
value,
|
|
1396
1255
|
children: /* @__PURE__ */ _jsx("div", {
|
|
@@ -1470,9 +1329,9 @@ var useChartDataTransform = (data) => {
|
|
|
1470
1329
|
...point,
|
|
1471
1330
|
date
|
|
1472
1331
|
};
|
|
1473
|
-
}).sort((
|
|
1474
|
-
if (!
|
|
1475
|
-
return
|
|
1332
|
+
}).sort((a, b) => {
|
|
1333
|
+
if (!a.date || !b.date) return 0;
|
|
1334
|
+
return a.date.getTime() - b.date.getTime();
|
|
1476
1335
|
})
|
|
1477
1336
|
}));
|
|
1478
1337
|
}, [data]);
|
|
@@ -1489,16 +1348,6 @@ var DEFAULT_BOTTOM_FOR_TOP_AXIS = 10;
|
|
|
1489
1348
|
var DEFAULT_FONT_SIZE = 12;
|
|
1490
1349
|
var DEFAULT_TICK_LENGTH = 8;
|
|
1491
1350
|
var DEFAULT_Y_TICK_WIDTH = 40;
|
|
1492
|
-
var resolveFontSize = (val) => {
|
|
1493
|
-
if (typeof val === "number" && !isNaN(val)) {
|
|
1494
|
-
return val;
|
|
1495
|
-
}
|
|
1496
|
-
if (typeof val === "string") {
|
|
1497
|
-
const parsed = parseFloat(val);
|
|
1498
|
-
return isNaN(parsed) ? void 0 : parsed;
|
|
1499
|
-
}
|
|
1500
|
-
return void 0;
|
|
1501
|
-
};
|
|
1502
1351
|
var getXAxisLabelMetrics = (theme, orientation) => {
|
|
1503
1352
|
const xAxisStyles = orientation === "top" ? theme.axisStyles?.x?.top : theme.axisStyles?.x?.bottom;
|
|
1504
1353
|
const fontSize = resolveFontSize(xAxisStyles?.axisLabel?.fontSize) || resolveFontSize(theme.svgLabelSmall?.fontSize) || DEFAULT_FONT_SIZE;
|
|
@@ -1512,10 +1361,10 @@ var useChartMargin = (height, options, data, theme, horizontal = false) => {
|
|
|
1512
1361
|
const yTicks = useMemo4(() => {
|
|
1513
1362
|
const allDataPoints = data.flatMap((series) => series.data);
|
|
1514
1363
|
if (horizontal) {
|
|
1515
|
-
return allDataPoints.map((
|
|
1364
|
+
return allDataPoints.map((d) => d.label || options.axis?.y?.tickFormat(d.date.getTime(), 0, []));
|
|
1516
1365
|
}
|
|
1517
|
-
const minY = Math.min(...allDataPoints.map((
|
|
1518
|
-
const maxY = Math.max(...allDataPoints.map((
|
|
1366
|
+
const minY = Math.min(...allDataPoints.map((d) => d.value));
|
|
1367
|
+
const maxY = Math.max(...allDataPoints.map((d) => d.value));
|
|
1519
1368
|
const yScale = createScale({
|
|
1520
1369
|
...options.yScale,
|
|
1521
1370
|
domain: [minY, maxY],
|
|
@@ -1704,7 +1553,7 @@ var useInteractiveLegendData = ({
|
|
|
1704
1553
|
if (!legendInteractive || !chartId) {
|
|
1705
1554
|
return data;
|
|
1706
1555
|
}
|
|
1707
|
-
const visibleDataMap = new Map(visibleData.map((
|
|
1556
|
+
const visibleDataMap = new Map(visibleData.map((d) => [d.label, d]));
|
|
1708
1557
|
return data.map((segment) => {
|
|
1709
1558
|
const isVisible = isSeriesVisible(chartId, segment.label);
|
|
1710
1559
|
if (!isVisible) {
|
|
@@ -1798,11 +1647,11 @@ function labelTransformFactory({
|
|
|
1798
1647
|
scale,
|
|
1799
1648
|
labelFormat
|
|
1800
1649
|
}) {
|
|
1801
|
-
return (
|
|
1802
|
-
datum:
|
|
1803
|
-
index:
|
|
1804
|
-
text: `${labelFormat(
|
|
1805
|
-
value: scale(
|
|
1650
|
+
return (d, i) => ({
|
|
1651
|
+
datum: d,
|
|
1652
|
+
index: i,
|
|
1653
|
+
text: `${labelFormat(d, i)}`,
|
|
1654
|
+
value: scale(d)
|
|
1806
1655
|
});
|
|
1807
1656
|
}
|
|
1808
1657
|
|
|
@@ -1934,11 +1783,11 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1934
1783
|
flexDirection: orientationToFlexDirection[orientation],
|
|
1935
1784
|
...theme.legend?.containerStyles
|
|
1936
1785
|
},
|
|
1937
|
-
children: labels.map((label,
|
|
1786
|
+
children: labels.map((label, i) => {
|
|
1938
1787
|
const visible = isSeriesVisible(label.text);
|
|
1939
1788
|
const handleClick = createClickHandler(label.text);
|
|
1940
1789
|
const handleKeyDown = createKeyDownHandler(label.text);
|
|
1941
|
-
const matchedItem = items[
|
|
1790
|
+
const matchedItem = items[i];
|
|
1942
1791
|
return /* @__PURE__ */ _jsxs(LegendItem, {
|
|
1943
1792
|
className: clsx("visx-legend-item", base_legend_module_default["legend-item"], interactive && base_legend_module_default["legend-item--interactive"], !visible && base_legend_module_default["legend-item--inactive"], itemClassName),
|
|
1944
1793
|
margin: itemMargin,
|
|
@@ -1949,18 +1798,18 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1949
1798
|
tabIndex: interactive ? 0 : void 0,
|
|
1950
1799
|
"aria-pressed": interactive ? visible : void 0,
|
|
1951
1800
|
"aria-label": interactive ? `${label.text}: ${visible ? "visible" : "hidden"}. Toggle visibility.` : void 0,
|
|
1952
|
-
children: [items[
|
|
1953
|
-
width: items[
|
|
1954
|
-
height: items[
|
|
1801
|
+
children: [items[i]?.renderGlyph ? /* @__PURE__ */ _jsx2("svg", {
|
|
1802
|
+
width: items[i]?.glyphSize * 2,
|
|
1803
|
+
height: items[i]?.glyphSize * 2,
|
|
1955
1804
|
children: /* @__PURE__ */ _jsx2(Group, {
|
|
1956
|
-
children: items[
|
|
1805
|
+
children: items[i]?.renderGlyph({
|
|
1957
1806
|
key: `legend-glyph-${label.text}`,
|
|
1958
1807
|
datum: {},
|
|
1959
|
-
index:
|
|
1808
|
+
index: i,
|
|
1960
1809
|
color: fill(label),
|
|
1961
|
-
size: items[
|
|
1962
|
-
x: items[
|
|
1963
|
-
y: items[
|
|
1810
|
+
size: items[i]?.glyphSize,
|
|
1811
|
+
x: items[i]?.glyphSize,
|
|
1812
|
+
y: items[i]?.glyphSize
|
|
1964
1813
|
})
|
|
1965
1814
|
})
|
|
1966
1815
|
}) : /* @__PURE__ */ _jsx2(LegendShape, {
|
|
@@ -1968,8 +1817,8 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1968
1817
|
height: shapeHeight,
|
|
1969
1818
|
width: shapeWidth,
|
|
1970
1819
|
margin: shapeMargin,
|
|
1971
|
-
item: domain[
|
|
1972
|
-
itemIndex:
|
|
1820
|
+
item: domain[i],
|
|
1821
|
+
itemIndex: i,
|
|
1973
1822
|
label,
|
|
1974
1823
|
fill,
|
|
1975
1824
|
size,
|
|
@@ -1991,7 +1840,7 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1991
1840
|
children: ["\xA0", matchedItem.value]
|
|
1992
1841
|
})]
|
|
1993
1842
|
})]
|
|
1994
|
-
}, `legend-${label.text}-${
|
|
1843
|
+
}, `legend-${label.text}-${i}`);
|
|
1995
1844
|
})
|
|
1996
1845
|
})
|
|
1997
1846
|
});
|
|
@@ -2209,7 +2058,7 @@ var AccessibleTooltip = ({
|
|
|
2209
2058
|
const tooltipData = useMemo11(() => {
|
|
2210
2059
|
if (mode !== "individual") return [];
|
|
2211
2060
|
if (series.length === 0) return [];
|
|
2212
|
-
const maxDataPoints = Math.max(...series.map((
|
|
2061
|
+
const maxDataPoints = Math.max(...series.map((s) => s.data.length));
|
|
2213
2062
|
const flattened = [];
|
|
2214
2063
|
for (let dataPointIndex = 0; dataPointIndex < maxDataPoints; dataPointIndex++) {
|
|
2215
2064
|
for (let seriesIndex = 0; seriesIndex < series.length; seriesIndex++) {
|
|
@@ -2232,12 +2081,12 @@ var AccessibleTooltip = ({
|
|
|
2232
2081
|
return;
|
|
2233
2082
|
}
|
|
2234
2083
|
if (mode === "group") {
|
|
2235
|
-
series.forEach((
|
|
2236
|
-
if (selectedIndex <
|
|
2237
|
-
const datum =
|
|
2084
|
+
series.forEach((s, index) => {
|
|
2085
|
+
if (selectedIndex < s.data.length) {
|
|
2086
|
+
const datum = s.data[selectedIndex];
|
|
2238
2087
|
tooltipContext?.showTooltip({
|
|
2239
2088
|
datum,
|
|
2240
|
-
key:
|
|
2089
|
+
key: s.label,
|
|
2241
2090
|
index
|
|
2242
2091
|
});
|
|
2243
2092
|
}
|
|
@@ -2361,8 +2210,8 @@ ChartHTML.displayName = "Chart.HTML";
|
|
|
2361
2210
|
// src/charts/private/chart-composition/render-legend-slot.ts
|
|
2362
2211
|
import { createElement, Fragment } from "react";
|
|
2363
2212
|
function renderLegendSlot(legendChildren, position2) {
|
|
2364
|
-
return legendChildren.filter((
|
|
2365
|
-
(
|
|
2213
|
+
return legendChildren.filter((l) => l.position === position2).map(
|
|
2214
|
+
(l, i) => createElement(Fragment, { key: `legend-${position2}-${i}` }, l.element)
|
|
2366
2215
|
);
|
|
2367
2216
|
}
|
|
2368
2217
|
|
|
@@ -2416,7 +2265,7 @@ function useChartChildren(children, chartType) {
|
|
|
2416
2265
|
}, [children, chartType]);
|
|
2417
2266
|
}
|
|
2418
2267
|
|
|
2419
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2268
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useRefWithInit.js
|
|
2420
2269
|
import * as React from "react";
|
|
2421
2270
|
var UNINITIALIZED = {};
|
|
2422
2271
|
function useRefWithInit(init, initArg) {
|
|
@@ -2427,22 +2276,41 @@ function useRefWithInit(init, initArg) {
|
|
|
2427
2276
|
return ref;
|
|
2428
2277
|
}
|
|
2429
2278
|
|
|
2430
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2279
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/warn.js
|
|
2280
|
+
var set;
|
|
2281
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2282
|
+
set = /* @__PURE__ */ new Set();
|
|
2283
|
+
}
|
|
2284
|
+
function warn(...messages) {
|
|
2285
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2286
|
+
const messageKey = messages.join(" ");
|
|
2287
|
+
if (!set.has(messageKey)) {
|
|
2288
|
+
set.add(messageKey);
|
|
2289
|
+
console.warn(`Base UI: ${messageKey}`);
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/formatErrorMessage.js
|
|
2295
|
+
function createFormatErrorMessage(baseUrl, prefix2) {
|
|
2296
|
+
return function formatErrorMessage2(code, ...args) {
|
|
2297
|
+
const url = new URL(baseUrl);
|
|
2298
|
+
url.searchParams.set("code", code.toString());
|
|
2299
|
+
args.forEach((arg) => url.searchParams.append("args[]", arg));
|
|
2300
|
+
return `${prefix2} error #${code}; visit ${url} for the full message.`;
|
|
2301
|
+
};
|
|
2436
2302
|
}
|
|
2303
|
+
var formatErrorMessage = createFormatErrorMessage("https://base-ui.com/production-error", "Base UI");
|
|
2304
|
+
var formatErrorMessage_default = formatErrorMessage;
|
|
2437
2305
|
|
|
2438
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2306
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/useRenderElement.js
|
|
2439
2307
|
import * as React4 from "react";
|
|
2440
2308
|
|
|
2441
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2442
|
-
function useMergedRefs(
|
|
2309
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
2310
|
+
function useMergedRefs(a, b, c, d) {
|
|
2443
2311
|
const forkRef = useRefWithInit(createForkRef).current;
|
|
2444
|
-
if (didChange(forkRef,
|
|
2445
|
-
update(forkRef, [
|
|
2312
|
+
if (didChange(forkRef, a, b, c, d)) {
|
|
2313
|
+
update(forkRef, [a, b, c, d]);
|
|
2446
2314
|
}
|
|
2447
2315
|
return forkRef.callback;
|
|
2448
2316
|
}
|
|
@@ -2460,8 +2328,8 @@ function createForkRef() {
|
|
|
2460
2328
|
refs: []
|
|
2461
2329
|
};
|
|
2462
2330
|
}
|
|
2463
|
-
function didChange(forkRef,
|
|
2464
|
-
return forkRef.refs[0] !==
|
|
2331
|
+
function didChange(forkRef, a, b, c, d) {
|
|
2332
|
+
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
|
|
2465
2333
|
}
|
|
2466
2334
|
function didChangeN(forkRef, newRefs) {
|
|
2467
2335
|
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
|
|
@@ -2479,8 +2347,8 @@ function update(forkRef, refs) {
|
|
|
2479
2347
|
}
|
|
2480
2348
|
if (instance != null) {
|
|
2481
2349
|
const cleanupCallbacks = Array(refs.length).fill(null);
|
|
2482
|
-
for (let
|
|
2483
|
-
const ref = refs[
|
|
2350
|
+
for (let i = 0; i < refs.length; i += 1) {
|
|
2351
|
+
const ref = refs[i];
|
|
2484
2352
|
if (ref == null) {
|
|
2485
2353
|
continue;
|
|
2486
2354
|
}
|
|
@@ -2488,7 +2356,7 @@ function update(forkRef, refs) {
|
|
|
2488
2356
|
case "function": {
|
|
2489
2357
|
const refCleanup = ref(instance);
|
|
2490
2358
|
if (typeof refCleanup === "function") {
|
|
2491
|
-
cleanupCallbacks[
|
|
2359
|
+
cleanupCallbacks[i] = refCleanup;
|
|
2492
2360
|
}
|
|
2493
2361
|
break;
|
|
2494
2362
|
}
|
|
@@ -2500,14 +2368,14 @@ function update(forkRef, refs) {
|
|
|
2500
2368
|
}
|
|
2501
2369
|
}
|
|
2502
2370
|
forkRef.cleanup = () => {
|
|
2503
|
-
for (let
|
|
2504
|
-
const ref = refs[
|
|
2371
|
+
for (let i = 0; i < refs.length; i += 1) {
|
|
2372
|
+
const ref = refs[i];
|
|
2505
2373
|
if (ref == null) {
|
|
2506
2374
|
continue;
|
|
2507
2375
|
}
|
|
2508
2376
|
switch (typeof ref) {
|
|
2509
2377
|
case "function": {
|
|
2510
|
-
const cleanupCallback = cleanupCallbacks[
|
|
2378
|
+
const cleanupCallback = cleanupCallbacks[i];
|
|
2511
2379
|
if (typeof cleanupCallback === "function") {
|
|
2512
2380
|
cleanupCallback();
|
|
2513
2381
|
} else {
|
|
@@ -2527,17 +2395,17 @@ function update(forkRef, refs) {
|
|
|
2527
2395
|
};
|
|
2528
2396
|
}
|
|
2529
2397
|
|
|
2530
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2398
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
2531
2399
|
import * as React3 from "react";
|
|
2532
2400
|
|
|
2533
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2401
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/reactVersion.js
|
|
2534
2402
|
import * as React2 from "react";
|
|
2535
2403
|
var majorVersion = parseInt(React2.version, 10);
|
|
2536
2404
|
function isReactVersionAtLeast(reactVersionToCheck) {
|
|
2537
2405
|
return majorVersion >= reactVersionToCheck;
|
|
2538
2406
|
}
|
|
2539
2407
|
|
|
2540
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2408
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
2541
2409
|
function getReactElementRef(element) {
|
|
2542
2410
|
if (!/* @__PURE__ */ React3.isValidElement(element)) {
|
|
2543
2411
|
return null;
|
|
@@ -2547,24 +2415,24 @@ function getReactElementRef(element) {
|
|
|
2547
2415
|
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
|
|
2548
2416
|
}
|
|
2549
2417
|
|
|
2550
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2551
|
-
function mergeObjects(
|
|
2552
|
-
if (
|
|
2553
|
-
return
|
|
2418
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
2419
|
+
function mergeObjects(a, b) {
|
|
2420
|
+
if (a && !b) {
|
|
2421
|
+
return a;
|
|
2554
2422
|
}
|
|
2555
|
-
if (!
|
|
2556
|
-
return
|
|
2423
|
+
if (!a && b) {
|
|
2424
|
+
return b;
|
|
2557
2425
|
}
|
|
2558
|
-
if (
|
|
2426
|
+
if (a || b) {
|
|
2559
2427
|
return {
|
|
2560
|
-
...
|
|
2561
|
-
...
|
|
2428
|
+
...a,
|
|
2429
|
+
...b
|
|
2562
2430
|
};
|
|
2563
2431
|
}
|
|
2564
2432
|
return void 0;
|
|
2565
2433
|
}
|
|
2566
2434
|
|
|
2567
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2435
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
|
|
2568
2436
|
function getStateAttributesProps(state, customMapping) {
|
|
2569
2437
|
const props = {};
|
|
2570
2438
|
for (const key in state) {
|
|
@@ -2585,33 +2453,33 @@ function getStateAttributesProps(state, customMapping) {
|
|
|
2585
2453
|
return props;
|
|
2586
2454
|
}
|
|
2587
2455
|
|
|
2588
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2456
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/resolveClassName.js
|
|
2589
2457
|
function resolveClassName(className, state) {
|
|
2590
2458
|
return typeof className === "function" ? className(state) : className;
|
|
2591
2459
|
}
|
|
2592
2460
|
|
|
2593
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2461
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/resolveStyle.js
|
|
2594
2462
|
function resolveStyle(style, state) {
|
|
2595
2463
|
return typeof style === "function" ? style(state) : style;
|
|
2596
2464
|
}
|
|
2597
2465
|
|
|
2598
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2466
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
2599
2467
|
var EMPTY_PROPS = {};
|
|
2600
|
-
function mergeProps(
|
|
2468
|
+
function mergeProps(a, b, c, d, e) {
|
|
2601
2469
|
let merged = {
|
|
2602
|
-
...resolvePropsGetter(
|
|
2470
|
+
...resolvePropsGetter(a, EMPTY_PROPS)
|
|
2603
2471
|
};
|
|
2604
|
-
if (
|
|
2605
|
-
merged = mergeOne(merged,
|
|
2472
|
+
if (b) {
|
|
2473
|
+
merged = mergeOne(merged, b);
|
|
2606
2474
|
}
|
|
2607
|
-
if (
|
|
2608
|
-
merged = mergeOne(merged,
|
|
2475
|
+
if (c) {
|
|
2476
|
+
merged = mergeOne(merged, c);
|
|
2609
2477
|
}
|
|
2610
|
-
if (
|
|
2611
|
-
merged = mergeOne(merged,
|
|
2478
|
+
if (d) {
|
|
2479
|
+
merged = mergeOne(merged, d);
|
|
2612
2480
|
}
|
|
2613
|
-
if (
|
|
2614
|
-
merged = mergeOne(merged,
|
|
2481
|
+
if (e) {
|
|
2482
|
+
merged = mergeOne(merged, e);
|
|
2615
2483
|
}
|
|
2616
2484
|
return merged;
|
|
2617
2485
|
}
|
|
@@ -2625,8 +2493,8 @@ function mergePropsN(props) {
|
|
|
2625
2493
|
let merged = {
|
|
2626
2494
|
...resolvePropsGetter(props[0], EMPTY_PROPS)
|
|
2627
2495
|
};
|
|
2628
|
-
for (let
|
|
2629
|
-
merged = mergeOne(merged, props[
|
|
2496
|
+
for (let i = 1; i < props.length; i += 1) {
|
|
2497
|
+
merged = mergeOne(merged, props[i]);
|
|
2630
2498
|
}
|
|
2631
2499
|
return merged;
|
|
2632
2500
|
}
|
|
@@ -2718,11 +2586,17 @@ function isSyntheticEvent(event) {
|
|
|
2718
2586
|
return event != null && typeof event === "object" && "nativeEvent" in event;
|
|
2719
2587
|
}
|
|
2720
2588
|
|
|
2721
|
-
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.
|
|
2589
|
+
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/empty.js
|
|
2722
2590
|
var EMPTY_ARRAY = Object.freeze([]);
|
|
2723
2591
|
var EMPTY_OBJECT = Object.freeze({});
|
|
2724
2592
|
|
|
2725
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2593
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/constants.js
|
|
2594
|
+
var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
|
|
2595
|
+
var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
|
|
2596
|
+
var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
|
|
2597
|
+
var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
|
|
2598
|
+
|
|
2599
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/useRenderElement.js
|
|
2726
2600
|
import { createElement as _createElement } from "react";
|
|
2727
2601
|
function useRenderElement(element, componentProps, params = {}) {
|
|
2728
2602
|
const renderProp = componentProps.render;
|
|
@@ -2774,6 +2648,9 @@ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
|
2774
2648
|
function evaluateRenderProp(element, render, props, state) {
|
|
2775
2649
|
if (render) {
|
|
2776
2650
|
if (typeof render === "function") {
|
|
2651
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2652
|
+
warnIfRenderPropLooksLikeComponent(render);
|
|
2653
|
+
}
|
|
2777
2654
|
return render(props, state);
|
|
2778
2655
|
}
|
|
2779
2656
|
const mergedProps = mergeProps(props, render.props);
|
|
@@ -2795,7 +2672,18 @@ function evaluateRenderProp(element, render, props, state) {
|
|
|
2795
2672
|
return renderTag(element, props);
|
|
2796
2673
|
}
|
|
2797
2674
|
}
|
|
2798
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: Render element or function are not defined." :
|
|
2675
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
|
|
2676
|
+
}
|
|
2677
|
+
function warnIfRenderPropLooksLikeComponent(renderFn) {
|
|
2678
|
+
const functionName = renderFn.name;
|
|
2679
|
+
if (functionName.length === 0) {
|
|
2680
|
+
return;
|
|
2681
|
+
}
|
|
2682
|
+
const firstCharacterCode = functionName.charCodeAt(0);
|
|
2683
|
+
if (firstCharacterCode < 65 || firstCharacterCode > 90) {
|
|
2684
|
+
return;
|
|
2685
|
+
}
|
|
2686
|
+
warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
2799
2687
|
}
|
|
2800
2688
|
function renderTag(Tag, props) {
|
|
2801
2689
|
if (Tag === "button") {
|
|
@@ -2815,12 +2703,12 @@ function renderTag(Tag, props) {
|
|
|
2815
2703
|
return /* @__PURE__ */ React4.createElement(Tag, props);
|
|
2816
2704
|
}
|
|
2817
2705
|
|
|
2818
|
-
// ../../../node_modules/.pnpm/@base-ui+react@1.
|
|
2706
|
+
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/use-render/useRender.js
|
|
2819
2707
|
function useRender(params) {
|
|
2820
2708
|
return useRenderElement(params.defaultTagName ?? "div", params, params);
|
|
2821
2709
|
}
|
|
2822
2710
|
|
|
2823
|
-
// ../../../node_modules/.pnpm/@wordpress+element@6.
|
|
2711
|
+
// ../../../node_modules/.pnpm/@wordpress+element@6.43.0/node_modules/@wordpress/element/build-module/react.mjs
|
|
2824
2712
|
import {
|
|
2825
2713
|
Children as Children3,
|
|
2826
2714
|
cloneElement as cloneElement2,
|
|
@@ -2855,13 +2743,13 @@ import {
|
|
|
2855
2743
|
} from "react";
|
|
2856
2744
|
|
|
2857
2745
|
// ../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
2858
|
-
function isObject(
|
|
2859
|
-
return Object.prototype.toString.call(
|
|
2746
|
+
function isObject(o) {
|
|
2747
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
2860
2748
|
}
|
|
2861
|
-
function isPlainObject(
|
|
2749
|
+
function isPlainObject(o) {
|
|
2862
2750
|
var ctor, prot;
|
|
2863
|
-
if (isObject(
|
|
2864
|
-
ctor =
|
|
2751
|
+
if (isObject(o) === false) return false;
|
|
2752
|
+
ctor = o.constructor;
|
|
2865
2753
|
if (ctor === void 0) return true;
|
|
2866
2754
|
prot = ctor.prototype;
|
|
2867
2755
|
if (isObject(prot) === false) return false;
|
|
@@ -2952,6 +2840,27 @@ var Stack = forwardRef3(function Stack2({ direction, gap, align, justify, wrap,
|
|
|
2952
2840
|
return element;
|
|
2953
2841
|
});
|
|
2954
2842
|
|
|
2843
|
+
// ../../../node_modules/.pnpm/@wordpress+ui@0.9.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1_stylelint@17.5.0/node_modules/@wordpress/ui/build-module/text/text.mjs
|
|
2844
|
+
import clsx2 from "clsx";
|
|
2845
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='893fb81f3c']")) {
|
|
2846
|
+
const style = document.createElement("style");
|
|
2847
|
+
style.setAttribute("data-wp-hash", "893fb81f3c");
|
|
2848
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._14437cfb77831647__heading-2xl{font-size:var(--wpds-font-size-2xl,32px);line-height:var(--wpds-font-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-md,24px)}.aa58f227716bcde2__heading-lg{font-size:var(--wpds-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{font-size:var(--wpds-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{font-size:var(--wpds-font-size-lg,15px);line-height:var(--wpds-font-line-height-md,24px)}._131101940be12424__body-md{font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px)}}'));
|
|
2849
|
+
document.head.appendChild(style);
|
|
2850
|
+
}
|
|
2851
|
+
var style_default2 = { "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
|
|
2852
|
+
var Text = forwardRef3(function Text2({ variant = "body-md", render, className, ...props }, ref) {
|
|
2853
|
+
const element = useRender({
|
|
2854
|
+
render,
|
|
2855
|
+
defaultTagName: "span",
|
|
2856
|
+
ref,
|
|
2857
|
+
props: mergeProps(props, {
|
|
2858
|
+
className: clsx2(style_default2[variant], className)
|
|
2859
|
+
})
|
|
2860
|
+
});
|
|
2861
|
+
return element;
|
|
2862
|
+
});
|
|
2863
|
+
|
|
2955
2864
|
// src/charts/private/chart-layout/chart-layout.tsx
|
|
2956
2865
|
import { useEffect as useEffect7 } from "react";
|
|
2957
2866
|
|
|
@@ -3016,15 +2925,15 @@ var svg_empty_state_module_default = {
|
|
|
3016
2925
|
// src/charts/private/svg-empty-state/svg-empty-state.tsx
|
|
3017
2926
|
import { jsx as _jsx9 } from "react/jsx-runtime";
|
|
3018
2927
|
var SvgEmptyState = ({
|
|
3019
|
-
x
|
|
3020
|
-
y
|
|
2928
|
+
x,
|
|
2929
|
+
y,
|
|
3021
2930
|
width,
|
|
3022
2931
|
height,
|
|
3023
2932
|
children
|
|
3024
2933
|
}) => {
|
|
3025
2934
|
return /* @__PURE__ */ _jsx9("foreignObject", {
|
|
3026
|
-
x:
|
|
3027
|
-
y:
|
|
2935
|
+
x: x - width / 2,
|
|
2936
|
+
y: y - height / 2,
|
|
3028
2937
|
width,
|
|
3029
2938
|
height,
|
|
3030
2939
|
children: /* @__PURE__ */ _jsx9(Stack, {
|
|
@@ -3135,8 +3044,8 @@ var getScaleBandwidth = (scale) => {
|
|
|
3135
3044
|
};
|
|
3136
3045
|
var MIN_TICK_LABEL_WIDTH = 20;
|
|
3137
3046
|
var TruncatedTickComponent = ({
|
|
3138
|
-
x
|
|
3139
|
-
y
|
|
3047
|
+
x,
|
|
3048
|
+
y,
|
|
3140
3049
|
formattedValue,
|
|
3141
3050
|
axis,
|
|
3142
3051
|
textAnchor,
|
|
@@ -3204,8 +3113,8 @@ var TruncatedTickComponent = ({
|
|
|
3204
3113
|
pointerEvents: "auto"
|
|
3205
3114
|
};
|
|
3206
3115
|
return /* @__PURE__ */ _jsx11("foreignObject", {
|
|
3207
|
-
x:
|
|
3208
|
-
y
|
|
3116
|
+
x: x + xOffset,
|
|
3117
|
+
y,
|
|
3209
3118
|
width: maxWidth,
|
|
3210
3119
|
height: 0,
|
|
3211
3120
|
overflow: "visible",
|
|
@@ -3250,10 +3159,10 @@ function useBarChartOptions(data, horizontal, options = {}) {
|
|
|
3250
3159
|
};
|
|
3251
3160
|
const labelFormatter = data?.[0]?.data?.[0]?.label ? (label) => label : formatDateTick;
|
|
3252
3161
|
const valueFormatter = formatNumberCompact2;
|
|
3253
|
-
const labelAccessor = (
|
|
3254
|
-
const valueAccessor = (
|
|
3255
|
-
const enhancedPoint =
|
|
3256
|
-
return enhancedPoint?.visualValue !== void 0 ? enhancedPoint.visualValue :
|
|
3162
|
+
const labelAccessor = (d) => d?.label || d?.date;
|
|
3163
|
+
const valueAccessor = (d) => {
|
|
3164
|
+
const enhancedPoint = d;
|
|
3165
|
+
return enhancedPoint?.visualValue !== void 0 ? enhancedPoint.visualValue : d?.value;
|
|
3257
3166
|
};
|
|
3258
3167
|
return {
|
|
3259
3168
|
vertical: {
|
|
@@ -3495,7 +3404,7 @@ var BarChartInternal = ({
|
|
|
3495
3404
|
}, [chartId]);
|
|
3496
3405
|
const createKeyboardHighlightStyle = useCallback7(() => {
|
|
3497
3406
|
if (selectedIndex === void 0) return "";
|
|
3498
|
-
const maxDataPoints = Math.max(...data.map((
|
|
3407
|
+
const maxDataPoints = Math.max(...data.map((s) => s.data.length));
|
|
3499
3408
|
const dataPointIndex = Math.floor(selectedIndex / data.length);
|
|
3500
3409
|
const seriesIndex = selectedIndex % data.length;
|
|
3501
3410
|
if (dataPointIndex >= maxDataPoints || seriesIndex >= data.length) {
|
|
@@ -3530,7 +3439,7 @@ var BarChartInternal = ({
|
|
|
3530
3439
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
3531
3440
|
if (error) {
|
|
3532
3441
|
return /* @__PURE__ */ _jsx12("div", {
|
|
3533
|
-
className:
|
|
3442
|
+
className: clsx3("bar-chart", bar_chart_module_default["bar-chart"]),
|
|
3534
3443
|
children: error
|
|
3535
3444
|
});
|
|
3536
3445
|
}
|
|
@@ -3561,7 +3470,7 @@ var BarChartInternal = ({
|
|
|
3561
3470
|
legendElement,
|
|
3562
3471
|
legendChildren,
|
|
3563
3472
|
gap,
|
|
3564
|
-
className:
|
|
3473
|
+
className: clsx3("bar-chart", bar_chart_module_default["bar-chart"], {
|
|
3565
3474
|
[bar_chart_module_default[`bar-chart--animated${horizontal ? "-horizontal" : ""}`]]: animation && !prefersReducedMotion
|
|
3566
3475
|
}, className),
|
|
3567
3476
|
style: {
|
|
@@ -3685,40 +3594,40 @@ var BarChartResponsive = attachSubComponents(withResponsive(BarChartWithProvider
|
|
|
3685
3594
|
import { formatNumberCompact as formatNumberCompact3 } from "@automattic/number-formatters";
|
|
3686
3595
|
import { Group as Group3 } from "@visx/group";
|
|
3687
3596
|
import { createScale as createScale2, scaleBand } from "@visx/scale";
|
|
3688
|
-
import { Text } from "@visx/text";
|
|
3597
|
+
import { Text as Text3 } from "@visx/text";
|
|
3689
3598
|
import { useContext as useContext10, useMemo as useMemo16 } from "react";
|
|
3690
3599
|
import { jsx as _jsx13, jsxs as _jsxs5 } from "react/jsx-runtime";
|
|
3691
3600
|
var getScaleBandwidth2 = (scale) => {
|
|
3692
|
-
const
|
|
3693
|
-
return
|
|
3601
|
+
const s = scale;
|
|
3602
|
+
return s && "bandwidth" in s ? s?.bandwidth() ?? 0 : 0;
|
|
3694
3603
|
};
|
|
3695
3604
|
var DefaultLabelComponent = ({
|
|
3696
3605
|
textProps,
|
|
3697
|
-
x
|
|
3698
|
-
y
|
|
3606
|
+
x,
|
|
3607
|
+
y,
|
|
3699
3608
|
label,
|
|
3700
3609
|
formatter
|
|
3701
3610
|
}) => {
|
|
3702
|
-
return /* @__PURE__ */ _jsx13(
|
|
3611
|
+
return /* @__PURE__ */ _jsx13(Text3, {
|
|
3703
3612
|
...textProps,
|
|
3704
3613
|
textAnchor: "start",
|
|
3705
|
-
x
|
|
3706
|
-
y
|
|
3614
|
+
x,
|
|
3615
|
+
y,
|
|
3707
3616
|
children: formatter(label)
|
|
3708
3617
|
});
|
|
3709
3618
|
};
|
|
3710
3619
|
var DefaultValueComponent = ({
|
|
3711
3620
|
textProps,
|
|
3712
|
-
x
|
|
3713
|
-
y
|
|
3621
|
+
x,
|
|
3622
|
+
y,
|
|
3714
3623
|
value,
|
|
3715
3624
|
formatter
|
|
3716
3625
|
}) => {
|
|
3717
|
-
return /* @__PURE__ */ _jsx13(
|
|
3626
|
+
return /* @__PURE__ */ _jsx13(Text3, {
|
|
3718
3627
|
...textProps,
|
|
3719
3628
|
textAnchor: "end",
|
|
3720
|
-
x
|
|
3721
|
-
y
|
|
3629
|
+
x,
|
|
3630
|
+
y,
|
|
3722
3631
|
fontWeight: 500,
|
|
3723
3632
|
children: formatter(value)
|
|
3724
3633
|
});
|
|
@@ -3752,18 +3661,18 @@ var AxisRenderer = ({
|
|
|
3752
3661
|
const sum = data.reduce((acc, {
|
|
3753
3662
|
data: seriesData
|
|
3754
3663
|
}) => acc + (seriesData[index]?.value ?? 0), 0);
|
|
3755
|
-
const
|
|
3664
|
+
const y = from2.y + yOffset;
|
|
3756
3665
|
return /* @__PURE__ */ _jsxs5(Group3, {
|
|
3757
3666
|
children: [/* @__PURE__ */ _jsx13(LabelComponent, {
|
|
3758
3667
|
textProps,
|
|
3759
3668
|
x: labelPosition,
|
|
3760
|
-
y
|
|
3669
|
+
y,
|
|
3761
3670
|
label: formattedValue,
|
|
3762
3671
|
formatter: labelFormatter
|
|
3763
3672
|
}), /* @__PURE__ */ _jsx13(ValueComponent, {
|
|
3764
3673
|
textProps,
|
|
3765
3674
|
x: valuePosition,
|
|
3766
|
-
y
|
|
3675
|
+
y,
|
|
3767
3676
|
value: sum,
|
|
3768
3677
|
formatter: valueFormatter,
|
|
3769
3678
|
data,
|
|
@@ -3886,26 +3795,24 @@ var BarListChartResponsive = withResponsive(BarListChart);
|
|
|
3886
3795
|
|
|
3887
3796
|
// src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx
|
|
3888
3797
|
import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
|
|
3889
|
-
import
|
|
3798
|
+
import clsx4 from "clsx";
|
|
3890
3799
|
import { useRef as useRef8, useMemo as useMemo17, useEffect as useEffect8, useCallback as useCallback9, useContext as useContext11 } from "react";
|
|
3891
3800
|
|
|
3892
3801
|
// src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss
|
|
3893
3802
|
var conversion_funnel_chart_module_default = {
|
|
3894
|
-
"
|
|
3895
|
-
"loading": "a8ccharts-DbHKK5",
|
|
3803
|
+
"conversion-funnel-chart--loading": "a8ccharts-Qicx1p",
|
|
3896
3804
|
"main-metric": "a8ccharts-61WPYr",
|
|
3897
3805
|
"main-rate": "a8ccharts-RRRI6x",
|
|
3898
3806
|
"change-indicator": "a8ccharts-661iwx",
|
|
3899
3807
|
"funnel-container": "a8ccharts-Z7EGnW",
|
|
3900
3808
|
"funnel-step": "a8ccharts-VqFY0l",
|
|
3901
|
-
"
|
|
3809
|
+
"funnel-step--animated": "a8ccharts-fk-hCl",
|
|
3810
|
+
"funnel-step--blurred": "a8ccharts-1zOc9c",
|
|
3902
3811
|
"step-header": "a8ccharts-2JsQiV",
|
|
3903
3812
|
"step-label": "a8ccharts-6OabC4",
|
|
3904
3813
|
"step-rate": "a8ccharts-9wSZ6n",
|
|
3905
3814
|
"bar-container": "a8ccharts-sSmCTi",
|
|
3906
|
-
"disabled": "a8ccharts-PLWVAW",
|
|
3907
3815
|
"funnel-bar": "a8ccharts-EzczI-",
|
|
3908
|
-
"selected": "a8ccharts-wNpZEu",
|
|
3909
3816
|
"funnel-bar--animated": "a8ccharts-68HQJl",
|
|
3910
3817
|
"stretch": "a8ccharts-CmtieZ",
|
|
3911
3818
|
"tooltip-wrapper": "a8ccharts-2TeoCn",
|
|
@@ -3989,7 +3896,8 @@ var ConversionFunnelChartInternal = ({
|
|
|
3989
3896
|
conversionFunnelChart: conversionFunnelChartSettings
|
|
3990
3897
|
} = useGlobalChartsTheme();
|
|
3991
3898
|
const {
|
|
3992
|
-
getElementStyles
|
|
3899
|
+
getElementStyles,
|
|
3900
|
+
isColorPaletteResolved
|
|
3993
3901
|
} = useGlobalChartsContext();
|
|
3994
3902
|
const chartRef = useRef8(null);
|
|
3995
3903
|
const selectedBarRef = useRef8(null);
|
|
@@ -4022,11 +3930,11 @@ var ConversionFunnelChartInternal = ({
|
|
|
4022
3930
|
selectedBarRef.current = null;
|
|
4023
3931
|
hideTooltip();
|
|
4024
3932
|
}, [clearSelection, hideTooltip]);
|
|
4025
|
-
const showTooltipAt = useCallback9((step,
|
|
3933
|
+
const showTooltipAt = useCallback9((step, x, y) => {
|
|
4026
3934
|
showTooltip({
|
|
4027
3935
|
tooltipData: step,
|
|
4028
|
-
tooltipLeft:
|
|
4029
|
-
tooltipTop:
|
|
3936
|
+
tooltipLeft: x,
|
|
3937
|
+
tooltipTop: y - 10
|
|
4030
3938
|
});
|
|
4031
3939
|
}, [showTooltip]);
|
|
4032
3940
|
const getMouseTooltipCoords = useCallback9((event) => {
|
|
@@ -4043,11 +3951,11 @@ var ConversionFunnelChartInternal = ({
|
|
|
4043
3951
|
return null;
|
|
4044
3952
|
}
|
|
4045
3953
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
4046
|
-
const
|
|
4047
|
-
const
|
|
3954
|
+
const x = rect.left + rect.width / 2 - containerBounds.left;
|
|
3955
|
+
const y = rect.top - containerBounds.top;
|
|
4048
3956
|
return {
|
|
4049
|
-
x
|
|
4050
|
-
y
|
|
3957
|
+
x,
|
|
3958
|
+
y
|
|
4051
3959
|
};
|
|
4052
3960
|
}, [containerBounds.width, containerBounds.height, containerBounds.left, containerBounds.top]);
|
|
4053
3961
|
const handleStepInteraction = useCallback9((step, event, interactionType) => {
|
|
@@ -4166,7 +4074,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4166
4074
|
if (!isDataValid) {
|
|
4167
4075
|
return /* @__PURE__ */ _jsx14(Stack, {
|
|
4168
4076
|
direction: "column",
|
|
4169
|
-
className:
|
|
4077
|
+
className: clsx4(conversion_funnel_chart_module_default["conversion-funnel-chart"], loading && conversion_funnel_chart_module_default["conversion-funnel-chart--loading"], className),
|
|
4170
4078
|
style: {
|
|
4171
4079
|
...style,
|
|
4172
4080
|
height: resolvedHeight
|
|
@@ -4185,7 +4093,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4185
4093
|
portalContainerRef(node2);
|
|
4186
4094
|
chartRef.current = node2;
|
|
4187
4095
|
},
|
|
4188
|
-
className:
|
|
4096
|
+
className: clsx4(conversion_funnel_chart_module_default["conversion-funnel-chart"], loading && conversion_funnel_chart_module_default["conversion-funnel-chart--loading"], className),
|
|
4189
4097
|
style: {
|
|
4190
4098
|
...style,
|
|
4191
4099
|
height: resolvedHeight
|
|
@@ -4206,7 +4114,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4206
4114
|
isBlurred
|
|
4207
4115
|
} = getStepState(step.id);
|
|
4208
4116
|
return /* @__PURE__ */ _jsxs6("div", {
|
|
4209
|
-
className:
|
|
4117
|
+
className: clsx4(conversion_funnel_chart_module_default["funnel-step"], isColorPaletteResolved && conversion_funnel_chart_module_default["funnel-step--animated"], isBlurred && conversion_funnel_chart_module_default["funnel-step--blurred"]),
|
|
4210
4118
|
children: [/* @__PURE__ */ _jsxs6("div", {
|
|
4211
4119
|
className: conversion_funnel_chart_module_default["step-header"],
|
|
4212
4120
|
children: [renderStepLabel ? renderStepLabel({
|
|
@@ -4225,7 +4133,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4225
4133
|
children: formatPercentage(step.rate)
|
|
4226
4134
|
})]
|
|
4227
4135
|
}), /* @__PURE__ */ _jsx14("div", {
|
|
4228
|
-
className:
|
|
4136
|
+
className: conversion_funnel_chart_module_default["bar-container"],
|
|
4229
4137
|
onClick: stepHandlers.get(step.id)?.onClick,
|
|
4230
4138
|
onKeyDown: stepHandlers.get(step.id)?.onKeyDown,
|
|
4231
4139
|
role: "button",
|
|
@@ -4235,7 +4143,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4235
4143
|
backgroundColor: barBackgroundColor
|
|
4236
4144
|
},
|
|
4237
4145
|
children: /* @__PURE__ */ _jsx14("div", {
|
|
4238
|
-
className:
|
|
4146
|
+
className: clsx4(conversion_funnel_chart_module_default["funnel-bar"], {
|
|
4239
4147
|
[conversion_funnel_chart_module_default["funnel-bar--animated"]]: animation && !loading && !prefersReducedMotion
|
|
4240
4148
|
}),
|
|
4241
4149
|
style: {
|
|
@@ -4250,7 +4158,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4250
4158
|
}), tooltipOpen && tooltipData && (() => {
|
|
4251
4159
|
const tooltipContent = renderTooltip ? renderTooltip({
|
|
4252
4160
|
step: tooltipData,
|
|
4253
|
-
index: steps.findIndex((
|
|
4161
|
+
index: steps.findIndex((s) => s.id === tooltipData.id),
|
|
4254
4162
|
top: tooltipTop,
|
|
4255
4163
|
left: tooltipLeft,
|
|
4256
4164
|
className: conversion_funnel_chart_module_default["tooltip-wrapper"]
|
|
@@ -4286,7 +4194,7 @@ ConversionFunnelChartWithProvider.displayName = "ConversionFunnelChart";
|
|
|
4286
4194
|
|
|
4287
4195
|
// src/charts/geo-chart/geo-chart.tsx
|
|
4288
4196
|
import { __ as __2 } from "@wordpress/i18n";
|
|
4289
|
-
import
|
|
4197
|
+
import clsx5 from "clsx";
|
|
4290
4198
|
import { useContext as useContext12, useMemo as useMemo18 } from "react";
|
|
4291
4199
|
import { Chart } from "react-google-charts";
|
|
4292
4200
|
|
|
@@ -4355,7 +4263,7 @@ var GeoChartInternal = ({
|
|
|
4355
4263
|
}
|
|
4356
4264
|
} = useGlobalChartsContext();
|
|
4357
4265
|
const loadingPlaceholder = /* @__PURE__ */ _jsx15("div", {
|
|
4358
|
-
className:
|
|
4266
|
+
className: clsx5("geo-chart", geo_chart_module_default.container, className),
|
|
4359
4267
|
style: {
|
|
4360
4268
|
width,
|
|
4361
4269
|
height
|
|
@@ -4376,10 +4284,10 @@ var GeoChartInternal = ({
|
|
|
4376
4284
|
};
|
|
4377
4285
|
}
|
|
4378
4286
|
const htmlTooltipIndices = [];
|
|
4379
|
-
for (let
|
|
4380
|
-
const col = data[0][
|
|
4287
|
+
for (let i = 0; i < data[0].length; i++) {
|
|
4288
|
+
const col = data[0][i];
|
|
4381
4289
|
if (typeof col === "object" && col !== null && "role" in col && col.role === "tooltip" && "p" in col && typeof col.p === "object" && col.p !== null && "html" in col.p && col.p.html === true) {
|
|
4382
|
-
htmlTooltipIndices.push(
|
|
4290
|
+
htmlTooltipIndices.push(i);
|
|
4383
4291
|
}
|
|
4384
4292
|
}
|
|
4385
4293
|
if (htmlTooltipIndices.length === 0) {
|
|
@@ -4423,7 +4331,7 @@ var GeoChartInternal = ({
|
|
|
4423
4331
|
keepAspectRatio: true
|
|
4424
4332
|
}), [region, resolution, lightColorHex, fullColorHex, backgroundColorHex, defaultFillColorHex, sanitizedData.hasHtmlTooltips]);
|
|
4425
4333
|
return /* @__PURE__ */ _jsx15("div", {
|
|
4426
|
-
className:
|
|
4334
|
+
className: clsx5("geo-chart", geo_chart_module_default.container, className),
|
|
4427
4335
|
style: {
|
|
4428
4336
|
width,
|
|
4429
4337
|
height,
|
|
@@ -4455,12 +4363,7 @@ var GeoChartWithProvider = (props) => {
|
|
|
4455
4363
|
GeoChartWithProvider.displayName = "GeoChart";
|
|
4456
4364
|
var GeoChartResponsive = withResponsive(GeoChartWithProvider);
|
|
4457
4365
|
|
|
4458
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
4459
|
-
function isValueDefined(value) {
|
|
4460
|
-
return value !== void 0 && value !== null;
|
|
4461
|
-
}
|
|
4462
|
-
|
|
4463
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
4366
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
4464
4367
|
function useUpdateEffect(effect, deps) {
|
|
4465
4368
|
const mountedRef = useRef6(false);
|
|
4466
4369
|
useEffect6(() => {
|
|
@@ -4486,9 +4389,9 @@ function sheetForTag(tag) {
|
|
|
4486
4389
|
if (tag.sheet) {
|
|
4487
4390
|
return tag.sheet;
|
|
4488
4391
|
}
|
|
4489
|
-
for (var
|
|
4490
|
-
if (document.styleSheets[
|
|
4491
|
-
return document.styleSheets[
|
|
4392
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
4393
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
4394
|
+
return document.styleSheets[i];
|
|
4492
4395
|
}
|
|
4493
4396
|
}
|
|
4494
4397
|
return void 0;
|
|
@@ -4545,7 +4448,7 @@ var StyleSheet = /* @__PURE__ */ (function() {
|
|
|
4545
4448
|
var sheet2 = sheetForTag(tag);
|
|
4546
4449
|
try {
|
|
4547
4450
|
sheet2.insertRule(rule, sheet2.cssRules.length);
|
|
4548
|
-
} catch (
|
|
4451
|
+
} catch (e) {
|
|
4549
4452
|
}
|
|
4550
4453
|
} else {
|
|
4551
4454
|
tag.appendChild(document.createTextNode(rule));
|
|
@@ -4884,10 +4787,10 @@ function ruleset(value, root, parent, index, offset, rules, points, type, props,
|
|
|
4884
4787
|
var post = offset - 1;
|
|
4885
4788
|
var rule = offset === 0 ? rules : [""];
|
|
4886
4789
|
var size = sizeof(rule);
|
|
4887
|
-
for (var
|
|
4888
|
-
for (var
|
|
4889
|
-
if (z = trim(
|
|
4890
|
-
props[
|
|
4790
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
4791
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
|
4792
|
+
if (z = trim(j > 0 ? rule[x] + " " + y : replace2(y, /&\f/g, rule[x])))
|
|
4793
|
+
props[k++] = z;
|
|
4891
4794
|
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
4892
4795
|
}
|
|
4893
4796
|
function comment(value, root, parent) {
|
|
@@ -4901,8 +4804,8 @@ function declaration(value, root, parent, length2) {
|
|
|
4901
4804
|
function serialize(children, callback) {
|
|
4902
4805
|
var output = "";
|
|
4903
4806
|
var length2 = sizeof(children);
|
|
4904
|
-
for (var
|
|
4905
|
-
output += callback(children[
|
|
4807
|
+
for (var i = 0; i < length2; i++)
|
|
4808
|
+
output += callback(children[i], i, children, callback) || "";
|
|
4906
4809
|
return output;
|
|
4907
4810
|
}
|
|
4908
4811
|
function stringify(element, index, children, callback) {
|
|
@@ -4927,8 +4830,8 @@ function middleware(collection) {
|
|
|
4927
4830
|
var length2 = sizeof(collection);
|
|
4928
4831
|
return function(element, index, children, callback) {
|
|
4929
4832
|
var output = "";
|
|
4930
|
-
for (var
|
|
4931
|
-
output += collection[
|
|
4833
|
+
for (var i = 0; i < length2; i++)
|
|
4834
|
+
output += collection[i](element, index, children, callback) || "";
|
|
4932
4835
|
return output;
|
|
4933
4836
|
};
|
|
4934
4837
|
}
|
|
@@ -5035,9 +4938,9 @@ var compat = function compat2(element) {
|
|
|
5035
4938
|
var points = [];
|
|
5036
4939
|
var rules = getRules(value, points);
|
|
5037
4940
|
var parentRules = parent.props;
|
|
5038
|
-
for (var
|
|
5039
|
-
for (var
|
|
5040
|
-
element.props[
|
|
4941
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
4942
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
4943
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
5041
4944
|
}
|
|
5042
4945
|
}
|
|
5043
4946
|
};
|
|
@@ -5261,8 +5164,8 @@ var createCache = function createCache2(options) {
|
|
|
5261
5164
|
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
5262
5165
|
function(node2) {
|
|
5263
5166
|
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
5264
|
-
for (var
|
|
5265
|
-
inserted[attrib[
|
|
5167
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
5168
|
+
inserted[attrib[i]] = true;
|
|
5266
5169
|
}
|
|
5267
5170
|
nodesToHydrate.push(node2);
|
|
5268
5171
|
}
|
|
@@ -5390,32 +5293,32 @@ var insertStyles = function insertStyles2(cache2, serialized, isStringTag) {
|
|
|
5390
5293
|
|
|
5391
5294
|
// ../../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
5392
5295
|
function murmur2(str) {
|
|
5393
|
-
var
|
|
5394
|
-
var
|
|
5395
|
-
for (; len >= 4; ++
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
(
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
(
|
|
5403
|
-
(
|
|
5296
|
+
var h = 0;
|
|
5297
|
+
var k, i = 0, len = str.length;
|
|
5298
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
5299
|
+
k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
|
|
5300
|
+
k = /* Math.imul(k, m): */
|
|
5301
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
|
|
5302
|
+
k ^= /* k >>> r: */
|
|
5303
|
+
k >>> 24;
|
|
5304
|
+
h = /* Math.imul(k, m): */
|
|
5305
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
5306
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5404
5307
|
}
|
|
5405
5308
|
switch (len) {
|
|
5406
5309
|
case 3:
|
|
5407
|
-
|
|
5310
|
+
h ^= (str.charCodeAt(i + 2) & 255) << 16;
|
|
5408
5311
|
case 2:
|
|
5409
|
-
|
|
5312
|
+
h ^= (str.charCodeAt(i + 1) & 255) << 8;
|
|
5410
5313
|
case 1:
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
(
|
|
5314
|
+
h ^= str.charCodeAt(i) & 255;
|
|
5315
|
+
h = /* Math.imul(h, m): */
|
|
5316
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5414
5317
|
}
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
(
|
|
5418
|
-
return ((
|
|
5318
|
+
h ^= h >>> 13;
|
|
5319
|
+
h = /* Math.imul(h, m): */
|
|
5320
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5321
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
5419
5322
|
}
|
|
5420
5323
|
|
|
5421
5324
|
// ../../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
@@ -5565,8 +5468,8 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
5565
5468
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
5566
5469
|
var string = "";
|
|
5567
5470
|
if (Array.isArray(obj)) {
|
|
5568
|
-
for (var
|
|
5569
|
-
string += handleInterpolation(mergedProps, registered, obj[
|
|
5471
|
+
for (var i = 0; i < obj.length; i++) {
|
|
5472
|
+
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
5570
5473
|
}
|
|
5571
5474
|
} else {
|
|
5572
5475
|
for (var key in obj) {
|
|
@@ -5623,11 +5526,11 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
5623
5526
|
var asTemplateStringsArr = strings;
|
|
5624
5527
|
styles += asTemplateStringsArr[0];
|
|
5625
5528
|
}
|
|
5626
|
-
for (var
|
|
5627
|
-
styles += handleInterpolation(mergedProps, registered, args[
|
|
5529
|
+
for (var i = 1; i < args.length; i++) {
|
|
5530
|
+
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
5628
5531
|
if (stringMode) {
|
|
5629
5532
|
var templateStringsArr = strings;
|
|
5630
|
-
styles += templateStringsArr[
|
|
5533
|
+
styles += templateStringsArr[i];
|
|
5631
5534
|
}
|
|
5632
5535
|
}
|
|
5633
5536
|
labelPattern.lastIndex = 0;
|
|
@@ -5707,23 +5610,23 @@ var createEmotionProps = function createEmotionProps2(type, props) {
|
|
|
5707
5610
|
newProps[typePropName] = type;
|
|
5708
5611
|
return newProps;
|
|
5709
5612
|
};
|
|
5710
|
-
var Insertion = function Insertion2(
|
|
5711
|
-
var cache2 =
|
|
5613
|
+
var Insertion = function Insertion2(_ref) {
|
|
5614
|
+
var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
5712
5615
|
registerStyles(cache2, serialized, isStringTag);
|
|
5713
5616
|
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
5714
5617
|
return insertStyles(cache2, serialized, isStringTag);
|
|
5715
5618
|
});
|
|
5716
5619
|
if (!isBrowser4 && rules !== void 0) {
|
|
5717
|
-
var
|
|
5620
|
+
var _ref2;
|
|
5718
5621
|
var serializedNames = serialized.name;
|
|
5719
5622
|
var next2 = serialized.next;
|
|
5720
5623
|
while (next2 !== void 0) {
|
|
5721
5624
|
serializedNames += " " + next2.name;
|
|
5722
5625
|
next2 = next2.next;
|
|
5723
5626
|
}
|
|
5724
|
-
return /* @__PURE__ */ React6.createElement("style", (
|
|
5627
|
+
return /* @__PURE__ */ React6.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache2.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
5725
5628
|
__html: rules
|
|
5726
|
-
},
|
|
5629
|
+
}, _ref2.nonce = cache2.sheet.nonce, _ref2));
|
|
5727
5630
|
}
|
|
5728
5631
|
return null;
|
|
5729
5632
|
};
|
|
@@ -5773,15 +5676,15 @@ var jsx = function jsx2(type, props) {
|
|
|
5773
5676
|
var createElementArgArray = new Array(argsLength);
|
|
5774
5677
|
createElementArgArray[0] = Emotion$1;
|
|
5775
5678
|
createElementArgArray[1] = createEmotionProps(type, props);
|
|
5776
|
-
for (var
|
|
5777
|
-
createElementArgArray[
|
|
5679
|
+
for (var i = 2; i < argsLength; i++) {
|
|
5680
|
+
createElementArgArray[i] = args[i];
|
|
5778
5681
|
}
|
|
5779
5682
|
return React7.createElement.apply(null, createElementArgArray);
|
|
5780
5683
|
};
|
|
5781
|
-
(function(
|
|
5684
|
+
(function(_jsx30) {
|
|
5782
5685
|
var JSX;
|
|
5783
5686
|
/* @__PURE__ */ (function(_JSX) {
|
|
5784
|
-
})(JSX || (JSX =
|
|
5687
|
+
})(JSX || (JSX = _jsx30.JSX || (_jsx30.JSX = {})));
|
|
5785
5688
|
})(jsx || (jsx = {}));
|
|
5786
5689
|
function css() {
|
|
5787
5690
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -5866,8 +5769,8 @@ var createEmotion = function createEmotion2(options) {
|
|
|
5866
5769
|
};
|
|
5867
5770
|
var classnames = function classnames2(args) {
|
|
5868
5771
|
var cls = "";
|
|
5869
|
-
for (var
|
|
5870
|
-
var arg = args[
|
|
5772
|
+
for (var i = 0; i < args.length; i++) {
|
|
5773
|
+
var arg = args[i];
|
|
5871
5774
|
if (arg == null) continue;
|
|
5872
5775
|
var toAdd = void 0;
|
|
5873
5776
|
switch (typeof arg) {
|
|
@@ -5878,10 +5781,10 @@ var classnames = function classnames2(args) {
|
|
|
5878
5781
|
toAdd = classnames2(arg);
|
|
5879
5782
|
} else {
|
|
5880
5783
|
toAdd = "";
|
|
5881
|
-
for (var
|
|
5882
|
-
if (arg[
|
|
5784
|
+
for (var k in arg) {
|
|
5785
|
+
if (arg[k] && k) {
|
|
5883
5786
|
toAdd && (toAdd += " ");
|
|
5884
|
-
toAdd +=
|
|
5787
|
+
toAdd += k;
|
|
5885
5788
|
}
|
|
5886
5789
|
}
|
|
5887
5790
|
}
|
|
@@ -5914,8 +5817,8 @@ var css2 = _createEmotion.css;
|
|
|
5914
5817
|
var sheet = _createEmotion.sheet;
|
|
5915
5818
|
var cache = _createEmotion.cache;
|
|
5916
5819
|
|
|
5917
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
5918
|
-
var isSerializedStyles = (
|
|
5820
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.mjs
|
|
5821
|
+
var isSerializedStyles = (o) => typeof o !== "undefined" && o !== null && ["name", "styles"].every((p) => typeof o[p] !== "undefined");
|
|
5919
5822
|
var useCx = () => {
|
|
5920
5823
|
const cache2 = __unsafe_useEmotionCache();
|
|
5921
5824
|
const cx2 = useCallback6((...classNames) => {
|
|
@@ -5940,14 +5843,14 @@ function memize(fn, options) {
|
|
|
5940
5843
|
var tail;
|
|
5941
5844
|
options = options || {};
|
|
5942
5845
|
function memoized() {
|
|
5943
|
-
var node2 = head, len = arguments.length, args,
|
|
5846
|
+
var node2 = head, len = arguments.length, args, i;
|
|
5944
5847
|
searchCache: while (node2) {
|
|
5945
5848
|
if (node2.args.length !== arguments.length) {
|
|
5946
5849
|
node2 = node2.next;
|
|
5947
5850
|
continue;
|
|
5948
5851
|
}
|
|
5949
|
-
for (
|
|
5950
|
-
if (node2.args[
|
|
5852
|
+
for (i = 0; i < len; i++) {
|
|
5853
|
+
if (node2.args[i] !== arguments[i]) {
|
|
5951
5854
|
node2 = node2.next;
|
|
5952
5855
|
continue searchCache;
|
|
5953
5856
|
}
|
|
@@ -5968,8 +5871,8 @@ function memize(fn, options) {
|
|
|
5968
5871
|
return node2.val;
|
|
5969
5872
|
}
|
|
5970
5873
|
args = new Array(len);
|
|
5971
|
-
for (
|
|
5972
|
-
args[
|
|
5874
|
+
for (i = 0; i < len; i++) {
|
|
5875
|
+
args[i] = arguments[i];
|
|
5973
5876
|
}
|
|
5974
5877
|
node2 = {
|
|
5975
5878
|
args,
|
|
@@ -6001,250 +5904,7 @@ function memize(fn, options) {
|
|
|
6001
5904
|
return memoized;
|
|
6002
5905
|
}
|
|
6003
5906
|
|
|
6004
|
-
// ../../../node_modules/.pnpm
|
|
6005
|
-
var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
|
|
6006
|
-
var t = function(r2) {
|
|
6007
|
-
return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
|
|
6008
|
-
};
|
|
6009
|
-
var n = function(r2, t2, n2) {
|
|
6010
|
-
return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r2) / n2 + 0;
|
|
6011
|
-
};
|
|
6012
|
-
var e = function(r2, t2, n2) {
|
|
6013
|
-
return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t2 ? r2 : t2;
|
|
6014
|
-
};
|
|
6015
|
-
var u = function(r2) {
|
|
6016
|
-
return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
|
|
6017
|
-
};
|
|
6018
|
-
var a = function(r2) {
|
|
6019
|
-
return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
|
|
6020
|
-
};
|
|
6021
|
-
var o = function(r2) {
|
|
6022
|
-
return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
|
|
6023
|
-
};
|
|
6024
|
-
var i = /^#([0-9a-f]{3,8})$/i;
|
|
6025
|
-
var s = function(r2) {
|
|
6026
|
-
var t2 = r2.toString(16);
|
|
6027
|
-
return t2.length < 2 ? "0" + t2 : t2;
|
|
6028
|
-
};
|
|
6029
|
-
var h = function(r2) {
|
|
6030
|
-
var t2 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
|
|
6031
|
-
return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
|
|
6032
|
-
};
|
|
6033
|
-
var b = function(r2) {
|
|
6034
|
-
var t2 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
|
|
6035
|
-
t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
|
|
6036
|
-
var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
|
|
6037
|
-
return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
|
|
6038
|
-
};
|
|
6039
|
-
var g = function(r2) {
|
|
6040
|
-
return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
|
|
6041
|
-
};
|
|
6042
|
-
var d = function(r2) {
|
|
6043
|
-
return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
|
|
6044
|
-
};
|
|
6045
|
-
var f = function(r2) {
|
|
6046
|
-
return b((n2 = (t2 = r2).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
|
|
6047
|
-
var t2, n2, e2;
|
|
6048
|
-
};
|
|
6049
|
-
var c = function(r2) {
|
|
6050
|
-
return { h: (t2 = h(r2)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
|
|
6051
|
-
var t2, n2, e2, u2;
|
|
6052
|
-
};
|
|
6053
|
-
var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6054
|
-
var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6055
|
-
var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6056
|
-
var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6057
|
-
var y = { string: [[function(r2) {
|
|
6058
|
-
var t2 = i.exec(r2);
|
|
6059
|
-
return t2 ? (r2 = t2[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
6060
|
-
}, "hex"], [function(r2) {
|
|
6061
|
-
var t2 = v.exec(r2) || m.exec(r2);
|
|
6062
|
-
return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
|
|
6063
|
-
}, "rgb"], [function(t2) {
|
|
6064
|
-
var n2 = l.exec(t2) || p.exec(t2);
|
|
6065
|
-
if (!n2) return null;
|
|
6066
|
-
var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
|
|
6067
|
-
return f(a2);
|
|
6068
|
-
}, "hsl"]], object: [[function(r2) {
|
|
6069
|
-
var n2 = r2.r, e2 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
|
|
6070
|
-
return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
|
|
6071
|
-
}, "rgb"], [function(r2) {
|
|
6072
|
-
var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
|
|
6073
|
-
if (!t(n2) || !t(e2) || !t(u2)) return null;
|
|
6074
|
-
var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
|
|
6075
|
-
return f(i2);
|
|
6076
|
-
}, "hsl"], [function(r2) {
|
|
6077
|
-
var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
|
|
6078
|
-
if (!t(n2) || !t(a2) || !t(o2)) return null;
|
|
6079
|
-
var h2 = (function(r3) {
|
|
6080
|
-
return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
|
|
6081
|
-
})({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
|
|
6082
|
-
return b(h2);
|
|
6083
|
-
}, "hsv"]] };
|
|
6084
|
-
var N = function(r2, t2) {
|
|
6085
|
-
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
6086
|
-
var e2 = t2[n2][0](r2);
|
|
6087
|
-
if (e2) return [e2, t2[n2][1]];
|
|
6088
|
-
}
|
|
6089
|
-
return [null, void 0];
|
|
6090
|
-
};
|
|
6091
|
-
var x = function(r2) {
|
|
6092
|
-
return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
|
|
6093
|
-
};
|
|
6094
|
-
var M = function(r2, t2) {
|
|
6095
|
-
var n2 = c(r2);
|
|
6096
|
-
return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
|
|
6097
|
-
};
|
|
6098
|
-
var H = function(r2) {
|
|
6099
|
-
return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
|
|
6100
|
-
};
|
|
6101
|
-
var $ = function(r2, t2) {
|
|
6102
|
-
var n2 = c(r2);
|
|
6103
|
-
return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
|
|
6104
|
-
};
|
|
6105
|
-
var j = (function() {
|
|
6106
|
-
function r2(r3) {
|
|
6107
|
-
this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
6108
|
-
}
|
|
6109
|
-
return r2.prototype.isValid = function() {
|
|
6110
|
-
return null !== this.parsed;
|
|
6111
|
-
}, r2.prototype.brightness = function() {
|
|
6112
|
-
return n(H(this.rgba), 2);
|
|
6113
|
-
}, r2.prototype.isDark = function() {
|
|
6114
|
-
return H(this.rgba) < 0.5;
|
|
6115
|
-
}, r2.prototype.isLight = function() {
|
|
6116
|
-
return H(this.rgba) >= 0.5;
|
|
6117
|
-
}, r2.prototype.toHex = function() {
|
|
6118
|
-
return r3 = o(this.rgba), t2 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
|
|
6119
|
-
var r3, t2, e2, u2, a2, i2;
|
|
6120
|
-
}, r2.prototype.toRgb = function() {
|
|
6121
|
-
return o(this.rgba);
|
|
6122
|
-
}, r2.prototype.toRgbString = function() {
|
|
6123
|
-
return r3 = o(this.rgba), t2 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
|
|
6124
|
-
var r3, t2, n2, e2, u2;
|
|
6125
|
-
}, r2.prototype.toHsl = function() {
|
|
6126
|
-
return d(c(this.rgba));
|
|
6127
|
-
}, r2.prototype.toHslString = function() {
|
|
6128
|
-
return r3 = d(c(this.rgba)), t2 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
|
|
6129
|
-
var r3, t2, n2, e2, u2;
|
|
6130
|
-
}, r2.prototype.toHsv = function() {
|
|
6131
|
-
return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
|
|
6132
|
-
var r3;
|
|
6133
|
-
}, r2.prototype.invert = function() {
|
|
6134
|
-
return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
|
|
6135
|
-
var r3;
|
|
6136
|
-
}, r2.prototype.saturate = function(r3) {
|
|
6137
|
-
return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
|
|
6138
|
-
}, r2.prototype.desaturate = function(r3) {
|
|
6139
|
-
return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
|
|
6140
|
-
}, r2.prototype.grayscale = function() {
|
|
6141
|
-
return w(M(this.rgba, -1));
|
|
6142
|
-
}, r2.prototype.lighten = function(r3) {
|
|
6143
|
-
return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
|
|
6144
|
-
}, r2.prototype.darken = function(r3) {
|
|
6145
|
-
return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
|
|
6146
|
-
}, r2.prototype.rotate = function(r3) {
|
|
6147
|
-
return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
|
|
6148
|
-
}, r2.prototype.alpha = function(r3) {
|
|
6149
|
-
return "number" == typeof r3 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
|
|
6150
|
-
var t2;
|
|
6151
|
-
}, r2.prototype.hue = function(r3) {
|
|
6152
|
-
var t2 = c(this.rgba);
|
|
6153
|
-
return "number" == typeof r3 ? w({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
|
|
6154
|
-
}, r2.prototype.isEqual = function(r3) {
|
|
6155
|
-
return this.toHex() === w(r3).toHex();
|
|
6156
|
-
}, r2;
|
|
6157
|
-
})();
|
|
6158
|
-
var w = function(r2) {
|
|
6159
|
-
return r2 instanceof j ? r2 : new j(r2);
|
|
6160
|
-
};
|
|
6161
|
-
var S = [];
|
|
6162
|
-
var k = function(r2) {
|
|
6163
|
-
r2.forEach(function(r3) {
|
|
6164
|
-
S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
|
|
6165
|
-
});
|
|
6166
|
-
};
|
|
6167
|
-
|
|
6168
|
-
// ../../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs
|
|
6169
|
-
function names_default(e2, f2) {
|
|
6170
|
-
var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
|
|
6171
|
-
for (var d2 in a2) r2[a2[d2]] = d2;
|
|
6172
|
-
var l2 = {};
|
|
6173
|
-
e2.prototype.toName = function(f3) {
|
|
6174
|
-
if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
|
|
6175
|
-
var d3, i2, n2 = r2[this.toHex()];
|
|
6176
|
-
if (n2) return n2;
|
|
6177
|
-
if (null == f3 ? void 0 : f3.closest) {
|
|
6178
|
-
var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
|
|
6179
|
-
if (!l2.length) for (var c2 in a2) l2[c2] = new e2(a2[c2]).toRgb();
|
|
6180
|
-
for (var g2 in a2) {
|
|
6181
|
-
var u2 = (d3 = o2, i2 = l2[g2], Math.pow(d3.r - i2.r, 2) + Math.pow(d3.g - i2.g, 2) + Math.pow(d3.b - i2.b, 2));
|
|
6182
|
-
u2 < t2 && (t2 = u2, b2 = g2);
|
|
6183
|
-
}
|
|
6184
|
-
return b2;
|
|
6185
|
-
}
|
|
6186
|
-
};
|
|
6187
|
-
f2.string.push([function(f3) {
|
|
6188
|
-
var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a2[r3];
|
|
6189
|
-
return d3 ? new e2(d3).toRgb() : null;
|
|
6190
|
-
}, "name"]);
|
|
6191
|
-
}
|
|
6192
|
-
|
|
6193
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors.mjs
|
|
6194
|
-
var colorComputationNode;
|
|
6195
|
-
k([names_default]);
|
|
6196
|
-
function getColorComputationNode() {
|
|
6197
|
-
if (typeof document === "undefined") {
|
|
6198
|
-
return;
|
|
6199
|
-
}
|
|
6200
|
-
if (!colorComputationNode) {
|
|
6201
|
-
const el = document.createElement("div");
|
|
6202
|
-
el.setAttribute("data-g2-color-computation-node", "");
|
|
6203
|
-
document.body.appendChild(el);
|
|
6204
|
-
colorComputationNode = el;
|
|
6205
|
-
}
|
|
6206
|
-
return colorComputationNode;
|
|
6207
|
-
}
|
|
6208
|
-
function isColor(value) {
|
|
6209
|
-
if (typeof value !== "string") {
|
|
6210
|
-
return false;
|
|
6211
|
-
}
|
|
6212
|
-
const test = w(value);
|
|
6213
|
-
return test.isValid();
|
|
6214
|
-
}
|
|
6215
|
-
function _getComputedBackgroundColor(backgroundColor) {
|
|
6216
|
-
if (typeof backgroundColor !== "string") {
|
|
6217
|
-
return "";
|
|
6218
|
-
}
|
|
6219
|
-
if (isColor(backgroundColor)) {
|
|
6220
|
-
return backgroundColor;
|
|
6221
|
-
}
|
|
6222
|
-
if (!backgroundColor.includes("var(")) {
|
|
6223
|
-
return "";
|
|
6224
|
-
}
|
|
6225
|
-
if (typeof document === "undefined") {
|
|
6226
|
-
return "";
|
|
6227
|
-
}
|
|
6228
|
-
const el = getColorComputationNode();
|
|
6229
|
-
if (!el) {
|
|
6230
|
-
return "";
|
|
6231
|
-
}
|
|
6232
|
-
el.style.background = backgroundColor;
|
|
6233
|
-
const computedColor = window?.getComputedStyle(el).background;
|
|
6234
|
-
el.style.background = "";
|
|
6235
|
-
return computedColor || "";
|
|
6236
|
-
}
|
|
6237
|
-
var getComputedBackgroundColor = memize(_getComputedBackgroundColor);
|
|
6238
|
-
function getOptimalTextColor(backgroundColor) {
|
|
6239
|
-
const background = getComputedBackgroundColor(backgroundColor);
|
|
6240
|
-
return w(background).isLight() ? "#000000" : "#ffffff";
|
|
6241
|
-
}
|
|
6242
|
-
function getOptimalTextShade(backgroundColor) {
|
|
6243
|
-
const result = getOptimalTextColor(backgroundColor);
|
|
6244
|
-
return result === "#000000" ? "dark" : "light";
|
|
6245
|
-
}
|
|
6246
|
-
|
|
6247
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
5907
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
6248
5908
|
var white = "#fff";
|
|
6249
5909
|
var GRAY = {
|
|
6250
5910
|
900: "#1e1e1e",
|
|
@@ -6325,7 +5985,7 @@ var COLORS = Object.freeze({
|
|
|
6325
5985
|
ui: UI
|
|
6326
5986
|
});
|
|
6327
5987
|
|
|
6328
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
5988
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
6329
5989
|
var CONTROL_HEIGHT = "36px";
|
|
6330
5990
|
var CONTROL_PROPS = {
|
|
6331
5991
|
// These values should be shared with TextControl.
|
|
@@ -6393,14 +6053,14 @@ var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
|
6393
6053
|
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
6394
6054
|
});
|
|
6395
6055
|
|
|
6396
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6056
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
6397
6057
|
var import_es6 = __toESM(require_es6(), 1);
|
|
6398
6058
|
import deepmerge2 from "deepmerge";
|
|
6399
6059
|
|
|
6400
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
6060
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@3.43.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
6401
6061
|
var logged = /* @__PURE__ */ new Set();
|
|
6402
6062
|
|
|
6403
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
6063
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@3.43.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
6404
6064
|
function isDev() {
|
|
6405
6065
|
return globalThis.SCRIPT_DEBUG === true;
|
|
6406
6066
|
}
|
|
@@ -6414,12 +6074,12 @@ function warning(message) {
|
|
|
6414
6074
|
console.warn(message);
|
|
6415
6075
|
try {
|
|
6416
6076
|
throw Error(message);
|
|
6417
|
-
} catch (
|
|
6077
|
+
} catch (x) {
|
|
6418
6078
|
}
|
|
6419
6079
|
logged.add(message);
|
|
6420
6080
|
}
|
|
6421
6081
|
|
|
6422
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6082
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
6423
6083
|
import { jsx as _jsx16 } from "react/jsx-runtime";
|
|
6424
6084
|
var ComponentsContext = createContext3(
|
|
6425
6085
|
/** @type {Record<string, any>} */
|
|
@@ -6462,19 +6122,19 @@ var BaseContextSystemProvider = ({
|
|
|
6462
6122
|
};
|
|
6463
6123
|
var ContextSystemProvider = memo(BaseContextSystemProvider);
|
|
6464
6124
|
|
|
6465
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6125
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
6466
6126
|
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
6467
6127
|
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
6468
6128
|
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
6469
6129
|
|
|
6470
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6130
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
6471
6131
|
function getStyledClassName(namespace) {
|
|
6472
6132
|
const kebab = paramCase(namespace);
|
|
6473
6133
|
return `components-${kebab}`;
|
|
6474
6134
|
}
|
|
6475
6135
|
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
6476
6136
|
|
|
6477
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6137
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
6478
6138
|
function contextConnect(Component2, namespace) {
|
|
6479
6139
|
return _contextConnect(Component2, namespace, {
|
|
6480
6140
|
forwardsRef: true
|
|
@@ -6498,33 +6158,8 @@ function _contextConnect(Component2, namespace, options) {
|
|
|
6498
6158
|
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
6499
6159
|
});
|
|
6500
6160
|
}
|
|
6501
|
-
function getConnectNamespace(Component2) {
|
|
6502
|
-
if (!Component2) {
|
|
6503
|
-
return [];
|
|
6504
|
-
}
|
|
6505
|
-
let namespaces = [];
|
|
6506
|
-
if (Component2[CONNECT_STATIC_NAMESPACE]) {
|
|
6507
|
-
namespaces = Component2[CONNECT_STATIC_NAMESPACE];
|
|
6508
|
-
}
|
|
6509
|
-
if (Component2.type && Component2.type[CONNECT_STATIC_NAMESPACE]) {
|
|
6510
|
-
namespaces = Component2.type[CONNECT_STATIC_NAMESPACE];
|
|
6511
|
-
}
|
|
6512
|
-
return namespaces;
|
|
6513
|
-
}
|
|
6514
|
-
function hasConnectNamespace(Component2, match2) {
|
|
6515
|
-
if (!Component2) {
|
|
6516
|
-
return false;
|
|
6517
|
-
}
|
|
6518
|
-
if (typeof match2 === "string") {
|
|
6519
|
-
return getConnectNamespace(Component2).includes(match2);
|
|
6520
|
-
}
|
|
6521
|
-
if (Array.isArray(match2)) {
|
|
6522
|
-
return match2.some((result) => getConnectNamespace(Component2).includes(result));
|
|
6523
|
-
}
|
|
6524
|
-
return false;
|
|
6525
|
-
}
|
|
6526
6161
|
|
|
6527
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6162
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
6528
6163
|
function getNamespace(componentName) {
|
|
6529
6164
|
return {
|
|
6530
6165
|
[COMPONENT_NAMESPACE]: componentName
|
|
@@ -6536,7 +6171,7 @@ function getConnectedNamespace() {
|
|
|
6536
6171
|
};
|
|
6537
6172
|
}
|
|
6538
6173
|
|
|
6539
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6174
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
6540
6175
|
function useContextSystem(props, namespace) {
|
|
6541
6176
|
const contextSystemProps = useComponentsContext();
|
|
6542
6177
|
if (typeof namespace === "undefined") {
|
|
@@ -6607,23 +6242,23 @@ var composeShouldForwardProps = function composeShouldForwardProps2(tag, options
|
|
|
6607
6242
|
}
|
|
6608
6243
|
return shouldForwardProp;
|
|
6609
6244
|
};
|
|
6610
|
-
var Insertion3 = function Insertion4(
|
|
6611
|
-
var cache2 =
|
|
6245
|
+
var Insertion3 = function Insertion4(_ref) {
|
|
6246
|
+
var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
6612
6247
|
registerStyles(cache2, serialized, isStringTag);
|
|
6613
6248
|
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
6614
6249
|
return insertStyles(cache2, serialized, isStringTag);
|
|
6615
6250
|
});
|
|
6616
6251
|
if (!isBrowser5 && rules !== void 0) {
|
|
6617
|
-
var
|
|
6252
|
+
var _ref2;
|
|
6618
6253
|
var serializedNames = serialized.name;
|
|
6619
6254
|
var next2 = serialized.next;
|
|
6620
6255
|
while (next2 !== void 0) {
|
|
6621
6256
|
serializedNames += " " + next2.name;
|
|
6622
6257
|
next2 = next2.next;
|
|
6623
6258
|
}
|
|
6624
|
-
return /* @__PURE__ */ React8.createElement("style", (
|
|
6259
|
+
return /* @__PURE__ */ React8.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache2.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
6625
6260
|
__html: rules
|
|
6626
|
-
},
|
|
6261
|
+
}, _ref2.nonce = cache2.sheet.nonce, _ref2));
|
|
6627
6262
|
}
|
|
6628
6263
|
return null;
|
|
6629
6264
|
};
|
|
@@ -6651,9 +6286,9 @@ var createStyled = function createStyled2(tag, options) {
|
|
|
6651
6286
|
var templateStringsArr = args[0];
|
|
6652
6287
|
styles.push(templateStringsArr[0]);
|
|
6653
6288
|
var len = args.length;
|
|
6654
|
-
var
|
|
6655
|
-
for (;
|
|
6656
|
-
styles.push(args[
|
|
6289
|
+
var i = 1;
|
|
6290
|
+
for (; i < len; i++) {
|
|
6291
|
+
styles.push(args[i], templateStringsArr[i]);
|
|
6657
6292
|
}
|
|
6658
6293
|
}
|
|
6659
6294
|
var Styled = withEmotionCache(function(props, cache2, ref) {
|
|
@@ -6720,7 +6355,7 @@ var createStyled = function createStyled2(tag, options) {
|
|
|
6720
6355
|
};
|
|
6721
6356
|
};
|
|
6722
6357
|
|
|
6723
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6358
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
6724
6359
|
import { jsx as _jsx17 } from "react/jsx-runtime";
|
|
6725
6360
|
var PolymorphicDiv = /* @__PURE__ */ createStyled("div", process.env.NODE_ENV === "production" ? {
|
|
6726
6361
|
target: "e19lxcc00"
|
|
@@ -6743,7 +6378,7 @@ var View = Object.assign(forwardRef3(UnforwardedView), {
|
|
|
6743
6378
|
});
|
|
6744
6379
|
var component_default = View;
|
|
6745
6380
|
|
|
6746
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6381
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
6747
6382
|
var breakpoints = ["40em", "52em", "64em"];
|
|
6748
6383
|
var useBreakpointIndex = (options = {}) => {
|
|
6749
6384
|
const {
|
|
@@ -6786,429 +6421,7 @@ function useResponsiveValue(values, options = {}) {
|
|
|
6786
6421
|
return array[index >= array.length ? array.length - 1 : index];
|
|
6787
6422
|
}
|
|
6788
6423
|
|
|
6789
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6790
|
-
var GRID_BASE = "4px";
|
|
6791
|
-
function space(value) {
|
|
6792
|
-
if (typeof value === "undefined") {
|
|
6793
|
-
return void 0;
|
|
6794
|
-
}
|
|
6795
|
-
if (!value) {
|
|
6796
|
-
return "0";
|
|
6797
|
-
}
|
|
6798
|
-
const asInt = typeof value === "number" ? value : Number(value);
|
|
6799
|
-
if (typeof window !== "undefined" && window.CSS?.supports?.("margin", value.toString()) || Number.isNaN(asInt)) {
|
|
6800
|
-
return value.toString();
|
|
6801
|
-
}
|
|
6802
|
-
return `calc(${GRID_BASE} * ${value})`;
|
|
6803
|
-
}
|
|
6804
|
-
|
|
6805
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/styles.mjs
|
|
6806
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
6807
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
6808
|
-
}
|
|
6809
|
-
var Truncate = process.env.NODE_ENV === "production" ? {
|
|
6810
|
-
name: "hdknak",
|
|
6811
|
-
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
|
|
6812
|
-
} : {
|
|
6813
|
-
name: "abxxyf-Truncate",
|
|
6814
|
-
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:Truncate;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgVHJ1bmNhdGUgPSBjc3NgXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG4iXX0= */",
|
|
6815
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
6816
|
-
};
|
|
6817
|
-
|
|
6818
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/utils.mjs
|
|
6819
|
-
var TRUNCATE_ELLIPSIS = "\u2026";
|
|
6820
|
-
var TRUNCATE_TYPE = {
|
|
6821
|
-
auto: "auto",
|
|
6822
|
-
head: "head",
|
|
6823
|
-
middle: "middle",
|
|
6824
|
-
tail: "tail",
|
|
6825
|
-
none: "none"
|
|
6826
|
-
};
|
|
6827
|
-
var TRUNCATE_DEFAULT_PROPS = {
|
|
6828
|
-
ellipsis: TRUNCATE_ELLIPSIS,
|
|
6829
|
-
ellipsizeMode: TRUNCATE_TYPE.auto,
|
|
6830
|
-
limit: 0,
|
|
6831
|
-
numberOfLines: 0
|
|
6832
|
-
};
|
|
6833
|
-
function truncateMiddle(word, headLength, tailLength, ellipsis) {
|
|
6834
|
-
if (typeof word !== "string") {
|
|
6835
|
-
return "";
|
|
6836
|
-
}
|
|
6837
|
-
const wordLength = word.length;
|
|
6838
|
-
const frontLength = ~~headLength;
|
|
6839
|
-
const backLength = ~~tailLength;
|
|
6840
|
-
const truncateStr = isValueDefined(ellipsis) ? ellipsis : TRUNCATE_ELLIPSIS;
|
|
6841
|
-
if (frontLength === 0 && backLength === 0 || frontLength >= wordLength || backLength >= wordLength || frontLength + backLength >= wordLength) {
|
|
6842
|
-
return word;
|
|
6843
|
-
} else if (backLength === 0) {
|
|
6844
|
-
return word.slice(0, frontLength) + truncateStr;
|
|
6845
|
-
}
|
|
6846
|
-
return word.slice(0, frontLength) + truncateStr + word.slice(wordLength - backLength);
|
|
6847
|
-
}
|
|
6848
|
-
function truncateContent(words = "", props) {
|
|
6849
|
-
const mergedProps = {
|
|
6850
|
-
...TRUNCATE_DEFAULT_PROPS,
|
|
6851
|
-
...props
|
|
6852
|
-
};
|
|
6853
|
-
const {
|
|
6854
|
-
ellipsis,
|
|
6855
|
-
ellipsizeMode,
|
|
6856
|
-
limit
|
|
6857
|
-
} = mergedProps;
|
|
6858
|
-
if (ellipsizeMode === TRUNCATE_TYPE.none) {
|
|
6859
|
-
return words;
|
|
6860
|
-
}
|
|
6861
|
-
let truncateHead;
|
|
6862
|
-
let truncateTail;
|
|
6863
|
-
switch (ellipsizeMode) {
|
|
6864
|
-
case TRUNCATE_TYPE.head:
|
|
6865
|
-
truncateHead = 0;
|
|
6866
|
-
truncateTail = limit;
|
|
6867
|
-
break;
|
|
6868
|
-
case TRUNCATE_TYPE.middle:
|
|
6869
|
-
truncateHead = Math.floor(limit / 2);
|
|
6870
|
-
truncateTail = Math.floor(limit / 2);
|
|
6871
|
-
break;
|
|
6872
|
-
default:
|
|
6873
|
-
truncateHead = limit;
|
|
6874
|
-
truncateTail = 0;
|
|
6875
|
-
}
|
|
6876
|
-
const truncatedContent = ellipsizeMode !== TRUNCATE_TYPE.auto ? truncateMiddle(words, truncateHead, truncateTail, ellipsis) : words;
|
|
6877
|
-
return truncatedContent;
|
|
6878
|
-
}
|
|
6879
|
-
|
|
6880
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/hook.mjs
|
|
6881
|
-
function useTruncate(props) {
|
|
6882
|
-
const {
|
|
6883
|
-
className,
|
|
6884
|
-
children,
|
|
6885
|
-
ellipsis = TRUNCATE_ELLIPSIS,
|
|
6886
|
-
ellipsizeMode = TRUNCATE_TYPE.auto,
|
|
6887
|
-
limit = 0,
|
|
6888
|
-
numberOfLines = 0,
|
|
6889
|
-
...otherProps
|
|
6890
|
-
} = useContextSystem(props, "Truncate");
|
|
6891
|
-
const cx2 = useCx();
|
|
6892
|
-
let childrenAsText;
|
|
6893
|
-
if (typeof children === "string") {
|
|
6894
|
-
childrenAsText = children;
|
|
6895
|
-
} else if (typeof children === "number") {
|
|
6896
|
-
childrenAsText = children.toString();
|
|
6897
|
-
}
|
|
6898
|
-
const truncatedContent = childrenAsText ? truncateContent(childrenAsText, {
|
|
6899
|
-
ellipsis,
|
|
6900
|
-
ellipsizeMode,
|
|
6901
|
-
limit,
|
|
6902
|
-
numberOfLines
|
|
6903
|
-
}) : children;
|
|
6904
|
-
const shouldTruncate = !!childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;
|
|
6905
|
-
const classes = useMemo13(() => {
|
|
6906
|
-
const truncateLines = /* @__PURE__ */ css(numberOfLines === 1 ? "word-break: break-all;" : "", " -webkit-box-orient:vertical;-webkit-line-clamp:", numberOfLines, ";display:-webkit-box;overflow:hidden;" + (process.env.NODE_ENV === "production" ? "" : ";label:truncateLines;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEQyQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9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x0XHRyZXR1cm4gY3goXG5cdFx0XHRzaG91bGRUcnVuY2F0ZSAmJiAhIG51bWJlck9mTGluZXMgJiYgc3R5bGVzLlRydW5jYXRlLFxuXHRcdFx0c2hvdWxkVHJ1bmNhdGUgJiYgISEgbnVtYmVyT2ZMaW5lcyAmJiB0cnVuY2F0ZUxpbmVzLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgWyBjbGFzc05hbWUsIGN4LCBudW1iZXJPZkxpbmVzLCBzaG91bGRUcnVuY2F0ZSBdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCBjaGlsZHJlbjogdHJ1bmNhdGVkQ29udGVudCB9O1xufVxuIl19 */");
|
|
6907
|
-
return cx2(shouldTruncate && !numberOfLines && Truncate, shouldTruncate && !!numberOfLines && truncateLines, className);
|
|
6908
|
-
}, [className, cx2, numberOfLines, shouldTruncate]);
|
|
6909
|
-
return {
|
|
6910
|
-
...otherProps,
|
|
6911
|
-
className: classes,
|
|
6912
|
-
children: truncatedContent
|
|
6913
|
-
};
|
|
6914
|
-
}
|
|
6915
|
-
|
|
6916
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/styles.mjs
|
|
6917
|
-
var styles_exports2 = {};
|
|
6918
|
-
__export(styles_exports2, {
|
|
6919
|
-
Text: () => Text2,
|
|
6920
|
-
block: () => block,
|
|
6921
|
-
destructive: () => destructive,
|
|
6922
|
-
highlighterText: () => highlighterText,
|
|
6923
|
-
muted: () => muted,
|
|
6924
|
-
positive: () => positive,
|
|
6925
|
-
upperCase: () => upperCase
|
|
6926
|
-
});
|
|
6927
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__2() {
|
|
6928
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
6929
|
-
}
|
|
6930
|
-
var Text2 = /* @__PURE__ */ css("color:", COLORS.theme.foreground, ";line-height:", config_values_default.fontLineHeightBase, ";margin:0;text-wrap:pretty;" + (process.env.NODE_ENV === "production" ? "" : ";label:Text;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IFRleHQgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRtYXJnaW46IDA7XG5cdHRleHQtd3JhcDogcHJldHR5O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBwb3NpdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5ncmVlbiB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGRlc3RydWN0aXZlID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmFsZXJ0LnJlZCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IG11dGVkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgaGlnaGxpZ2h0ZXJUZXh0ID0gY3NzYFxuXHRtYXJrIHtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuYWxlcnQueWVsbG93IH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0Ym94LXNoYWRvdzpcblx0XHRcdDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjA1ICkgaW5zZXQsXG5cdFx0XHQwIC0xcHggMCByZ2JhKCAwLCAwLCAwLCAwLjEgKSBpbnNldDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IHVwcGVyQ2FzZSA9IGNzc2Bcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG4iXX0= */");
|
|
6931
|
-
var block = process.env.NODE_ENV === "production" ? {
|
|
6932
|
-
name: "4zleql",
|
|
6933
|
-
styles: "display:block"
|
|
6934
|
-
} : {
|
|
6935
|
-
name: "14aceuy-block",
|
|
6936
|
-
styles: "display:block;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */",
|
|
6937
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
|
|
6938
|
-
};
|
|
6939
|
-
var positive = /* @__PURE__ */ css("color:", COLORS.alert.green, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:positive;"), process.env.N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llbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6940
|
-
var destructive = /* @__PURE__ */ css("color:", COLORS.alert.red, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:destructive;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QjhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6941
|
-
var muted = /* @__PURE__ */ css("color:", COLORS.gray[700], ";" + (process.env.NODE_ENV === "production" ? "" : ";label:muted;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7I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CB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6942
|
-
var highlighterText = /* @__PURE__ */ css("mark{background:", COLORS.alert.yellow, ";border-radius:", config_values_default.radiusSmall, ";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}" + (process.env.NODE_ENV === "production" ? "" : ";label:highlighterText;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6943
|
-
var upperCase = process.env.NODE_ENV === "production" ? {
|
|
6944
|
-
name: "50zrmy",
|
|
6945
|
-
styles: "text-transform:uppercase"
|
|
6946
|
-
} : {
|
|
6947
|
-
name: "1mrt3zt-upperCase",
|
|
6948
|
-
styles: "text-transform:uppercase;label:upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQzRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbm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",
|
|
6949
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
|
|
6950
|
-
};
|
|
6951
|
-
|
|
6952
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/utils.mjs
|
|
6953
|
-
var import_highlight_words_core = __toESM(require_dist(), 1);
|
|
6954
|
-
var lowercaseProps = (object) => {
|
|
6955
|
-
const mapped = {};
|
|
6956
|
-
for (const key in object) {
|
|
6957
|
-
mapped[key.toLowerCase()] = object[key];
|
|
6958
|
-
}
|
|
6959
|
-
return mapped;
|
|
6960
|
-
};
|
|
6961
|
-
var memoizedLowercaseProps = memize(lowercaseProps);
|
|
6962
|
-
function createHighlighterText({
|
|
6963
|
-
activeClassName = "",
|
|
6964
|
-
activeIndex = -1,
|
|
6965
|
-
activeStyle,
|
|
6966
|
-
autoEscape,
|
|
6967
|
-
caseSensitive = false,
|
|
6968
|
-
children,
|
|
6969
|
-
findChunks,
|
|
6970
|
-
highlightClassName = "",
|
|
6971
|
-
highlightStyle = {},
|
|
6972
|
-
highlightTag = "mark",
|
|
6973
|
-
sanitize,
|
|
6974
|
-
searchWords = [],
|
|
6975
|
-
unhighlightClassName = "",
|
|
6976
|
-
unhighlightStyle
|
|
6977
|
-
}) {
|
|
6978
|
-
if (!children) {
|
|
6979
|
-
return null;
|
|
6980
|
-
}
|
|
6981
|
-
if (typeof children !== "string") {
|
|
6982
|
-
return children;
|
|
6983
|
-
}
|
|
6984
|
-
const textToHighlight = children;
|
|
6985
|
-
const chunks = (0, import_highlight_words_core.findAll)({
|
|
6986
|
-
autoEscape,
|
|
6987
|
-
caseSensitive,
|
|
6988
|
-
findChunks,
|
|
6989
|
-
sanitize,
|
|
6990
|
-
searchWords,
|
|
6991
|
-
textToHighlight
|
|
6992
|
-
});
|
|
6993
|
-
const HighlightTag = highlightTag;
|
|
6994
|
-
let highlightIndex = -1;
|
|
6995
|
-
let highlightClassNames = "";
|
|
6996
|
-
let highlightStyles;
|
|
6997
|
-
const textContent = chunks.map((chunk, index) => {
|
|
6998
|
-
const text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);
|
|
6999
|
-
if (chunk.highlight) {
|
|
7000
|
-
highlightIndex++;
|
|
7001
|
-
let highlightClass;
|
|
7002
|
-
if (typeof highlightClassName === "object") {
|
|
7003
|
-
if (!caseSensitive) {
|
|
7004
|
-
highlightClassName = memoizedLowercaseProps(highlightClassName);
|
|
7005
|
-
highlightClass = highlightClassName[text.toLowerCase()];
|
|
7006
|
-
} else {
|
|
7007
|
-
highlightClass = highlightClassName[text];
|
|
7008
|
-
}
|
|
7009
|
-
} else {
|
|
7010
|
-
highlightClass = highlightClassName;
|
|
7011
|
-
}
|
|
7012
|
-
const isActive = highlightIndex === +activeIndex;
|
|
7013
|
-
highlightClassNames = `${highlightClass} ${isActive ? activeClassName : ""}`;
|
|
7014
|
-
highlightStyles = isActive === true && activeStyle !== null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;
|
|
7015
|
-
const props = {
|
|
7016
|
-
children: text,
|
|
7017
|
-
className: highlightClassNames,
|
|
7018
|
-
key: index,
|
|
7019
|
-
style: highlightStyles
|
|
7020
|
-
};
|
|
7021
|
-
if (typeof HighlightTag !== "string") {
|
|
7022
|
-
props.highlightIndex = highlightIndex;
|
|
7023
|
-
}
|
|
7024
|
-
return createElement3(HighlightTag, props);
|
|
7025
|
-
}
|
|
7026
|
-
return createElement3("span", {
|
|
7027
|
-
children: text,
|
|
7028
|
-
className: unhighlightClassName,
|
|
7029
|
-
key: index,
|
|
7030
|
-
style: unhighlightStyle
|
|
7031
|
-
});
|
|
7032
|
-
});
|
|
7033
|
-
return textContent;
|
|
7034
|
-
}
|
|
7035
|
-
|
|
7036
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/font-size.mjs
|
|
7037
|
-
var BASE_FONT_SIZE = 13;
|
|
7038
|
-
var PRESET_FONT_SIZES = {
|
|
7039
|
-
body: BASE_FONT_SIZE,
|
|
7040
|
-
caption: 10,
|
|
7041
|
-
footnote: 11,
|
|
7042
|
-
largeTitle: 28,
|
|
7043
|
-
subheadline: 12,
|
|
7044
|
-
title: 20
|
|
7045
|
-
};
|
|
7046
|
-
var HEADING_FONT_SIZES = [1, 2, 3, 4, 5, 6].flatMap((n2) => [n2, n2.toString()]);
|
|
7047
|
-
function getFontSize(size = BASE_FONT_SIZE) {
|
|
7048
|
-
if (size in PRESET_FONT_SIZES) {
|
|
7049
|
-
return getFontSize(PRESET_FONT_SIZES[size]);
|
|
7050
|
-
}
|
|
7051
|
-
if (typeof size !== "number") {
|
|
7052
|
-
const parsed = parseFloat(size);
|
|
7053
|
-
if (Number.isNaN(parsed)) {
|
|
7054
|
-
return size;
|
|
7055
|
-
}
|
|
7056
|
-
size = parsed;
|
|
7057
|
-
}
|
|
7058
|
-
const ratio = `(${size} / ${BASE_FONT_SIZE})`;
|
|
7059
|
-
return `calc(${ratio} * ${config_values_default.fontSize})`;
|
|
7060
|
-
}
|
|
7061
|
-
|
|
7062
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/get-line-height.mjs
|
|
7063
|
-
function getLineHeight(adjustLineHeightForInnerControls, lineHeight) {
|
|
7064
|
-
if (lineHeight) {
|
|
7065
|
-
return lineHeight;
|
|
7066
|
-
}
|
|
7067
|
-
if (!adjustLineHeightForInnerControls) {
|
|
7068
|
-
return;
|
|
7069
|
-
}
|
|
7070
|
-
let value = `calc(${config_values_default.controlHeight} + ${space(2)})`;
|
|
7071
|
-
switch (adjustLineHeightForInnerControls) {
|
|
7072
|
-
case "large":
|
|
7073
|
-
value = `calc(${config_values_default.controlHeightLarge} + ${space(2)})`;
|
|
7074
|
-
break;
|
|
7075
|
-
case "small":
|
|
7076
|
-
value = `calc(${config_values_default.controlHeightSmall} + ${space(2)})`;
|
|
7077
|
-
break;
|
|
7078
|
-
case "xSmall":
|
|
7079
|
-
value = `calc(${config_values_default.controlHeightXSmall} + ${space(2)})`;
|
|
7080
|
-
break;
|
|
7081
|
-
default:
|
|
7082
|
-
break;
|
|
7083
|
-
}
|
|
7084
|
-
return value;
|
|
7085
|
-
}
|
|
7086
|
-
|
|
7087
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/hook.mjs
|
|
7088
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__3() {
|
|
7089
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
7090
|
-
}
|
|
7091
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
7092
|
-
name: "50zrmy",
|
|
7093
|
-
styles: "text-transform:uppercase"
|
|
7094
|
-
} : {
|
|
7095
|
-
name: "18bqwxz-sx-upperCase",
|
|
7096
|
-
styles: "text-transform:uppercase;label:sx-upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0dpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbywgQ2hpbGRyZW4sIGNsb25lRWxl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9uZW50cyB0byBpbmhlcml0IGZvbnQgc2l6ZS5cblx0ICovXG5cdGlmICggISB0cnVuY2F0ZSAmJiBBcnJheS5pc0FycmF5KCBjaGlsZHJlbiApICkge1xuXHRcdGNvbnRlbnQgPSBDaGlsZHJlbi5tYXAoIGNoaWxkcmVuLCAoIGNoaWxkICkgPT4ge1xuXHRcdFx0aWYgKFxuXHRcdFx0XHR0eXBlb2YgY2hpbGQgIT09ICdvYmplY3QnIHx8XG5cdFx0XHRcdGNoaWxkID09PSBudWxsIHx8XG5cdFx0XHRcdCEgKCAncHJvcHMnIGluIGNoaWxkIClcblx0XHRcdCkge1xuXHRcdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0XHR9XG5cblx0XHRcdGNvbnN0IGlzTGluayA9IGhhc0Nvbm5lY3ROYW1lc3BhY2UoIGNoaWxkLCBbICdMaW5rJyBdICk7XG5cdFx0XHRpZiAoIGlzTGluayApIHtcblx0XHRcdFx0cmV0dXJuIGNsb25lRWxlbWVudCggY2hpbGQsIHtcblx0XHRcdFx0XHRzaXplOiBjaGlsZC5wcm9wcy5zaXplIHx8ICdpbmhlcml0Jyxcblx0XHRcdFx0fSApO1xuXHRcdFx0fVxuXG5cdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIHtcblx0XHQuLi50cnVuY2F0ZVByb3BzLFxuXHRcdGNoaWxkcmVuOiB0cnVuY2F0ZSA/IHRydW5jYXRlUHJvcHMuY2hpbGRyZW4gOiBjb250ZW50LFxuXHR9O1xufVxuIl19 */",
|
|
7097
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__3
|
|
7098
|
-
};
|
|
7099
|
-
function useText(props) {
|
|
7100
|
-
const {
|
|
7101
|
-
adjustLineHeightForInnerControls,
|
|
7102
|
-
align,
|
|
7103
|
-
children,
|
|
7104
|
-
className,
|
|
7105
|
-
color,
|
|
7106
|
-
ellipsizeMode,
|
|
7107
|
-
isDestructive = false,
|
|
7108
|
-
display,
|
|
7109
|
-
highlightEscape = false,
|
|
7110
|
-
highlightCaseSensitive = false,
|
|
7111
|
-
highlightWords,
|
|
7112
|
-
highlightSanitize,
|
|
7113
|
-
isBlock = false,
|
|
7114
|
-
letterSpacing,
|
|
7115
|
-
lineHeight: lineHeightProp,
|
|
7116
|
-
optimizeReadabilityFor,
|
|
7117
|
-
size,
|
|
7118
|
-
truncate = false,
|
|
7119
|
-
upperCase: upperCase2 = false,
|
|
7120
|
-
variant,
|
|
7121
|
-
weight = config_values_default.fontWeight,
|
|
7122
|
-
...otherProps
|
|
7123
|
-
} = useContextSystem(props, "Text");
|
|
7124
|
-
let content = children;
|
|
7125
|
-
const isHighlighter = Array.isArray(highlightWords);
|
|
7126
|
-
const isCaption = size === "caption";
|
|
7127
|
-
if (isHighlighter) {
|
|
7128
|
-
if (typeof children !== "string") {
|
|
7129
|
-
throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");
|
|
7130
|
-
}
|
|
7131
|
-
content = createHighlighterText({
|
|
7132
|
-
autoEscape: highlightEscape,
|
|
7133
|
-
children,
|
|
7134
|
-
caseSensitive: highlightCaseSensitive,
|
|
7135
|
-
searchWords: highlightWords,
|
|
7136
|
-
sanitize: highlightSanitize
|
|
7137
|
-
});
|
|
7138
|
-
}
|
|
7139
|
-
const cx2 = useCx();
|
|
7140
|
-
const classes = useMemo13(() => {
|
|
7141
|
-
const sx = {};
|
|
7142
|
-
const lineHeight = getLineHeight(adjustLineHeightForInnerControls, lineHeightProp);
|
|
7143
|
-
sx.Base = /* @__PURE__ */ css({
|
|
7144
|
-
color,
|
|
7145
|
-
display,
|
|
7146
|
-
fontSize: getFontSize(size),
|
|
7147
|
-
fontWeight: weight,
|
|
7148
|
-
lineHeight,
|
|
7149
|
-
letterSpacing,
|
|
7150
|
-
textAlign: align
|
|
7151
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-Base;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingUR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blxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */");
|
|
7152
|
-
sx.upperCase = _ref;
|
|
7153
|
-
sx.optimalTextColor = null;
|
|
7154
|
-
if (optimizeReadabilityFor) {
|
|
7155
|
-
const isOptimalTextColorDark = getOptimalTextShade(optimizeReadabilityFor) === "dark";
|
|
7156
|
-
sx.optimalTextColor = isOptimalTextColorDark ? /* @__PURE__ */ css({
|
|
7157
|
-
color: COLORS.gray[900]
|
|
7158
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-optimalTextColor;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ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0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */") : /* @__PURE__ */ css({
|
|
7159
|
-
color: COLORS.white
|
|
7160
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-optimalTextColor;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXN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xMaW5rIC8+YCBjb21wb25lbnRzIHRvIGluaGVyaXQgZm9udCBzaXplLlxuXHQgKi9cblx0aWYgKCAhIHRydW5jYXRlICYmIEFycmF5LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */");
|
|
7161
|
-
}
|
|
7162
|
-
return cx2(Text2, sx.Base, sx.optimalTextColor, isDestructive && destructive, !!isHighlighter && highlighterText, isBlock && block, isCaption && muted, variant && styles_exports2[variant], upperCase2 && sx.upperCase, className);
|
|
7163
|
-
}, [adjustLineHeightForInnerControls, align, className, color, cx2, display, isBlock, isCaption, isDestructive, isHighlighter, letterSpacing, lineHeightProp, optimizeReadabilityFor, size, upperCase2, variant, weight]);
|
|
7164
|
-
let finalEllipsizeMode;
|
|
7165
|
-
if (truncate === true) {
|
|
7166
|
-
finalEllipsizeMode = "auto";
|
|
7167
|
-
}
|
|
7168
|
-
if (truncate === false) {
|
|
7169
|
-
finalEllipsizeMode = "none";
|
|
7170
|
-
}
|
|
7171
|
-
const finalComponentProps = {
|
|
7172
|
-
...otherProps,
|
|
7173
|
-
className: classes,
|
|
7174
|
-
children,
|
|
7175
|
-
ellipsizeMode: ellipsizeMode || finalEllipsizeMode
|
|
7176
|
-
};
|
|
7177
|
-
const truncateProps = useTruncate(finalComponentProps);
|
|
7178
|
-
if (!truncate && Array.isArray(children)) {
|
|
7179
|
-
content = Children3.map(children, (child) => {
|
|
7180
|
-
if (typeof child !== "object" || child === null || !("props" in child)) {
|
|
7181
|
-
return child;
|
|
7182
|
-
}
|
|
7183
|
-
const isLink = hasConnectNamespace(child, ["Link"]);
|
|
7184
|
-
if (isLink) {
|
|
7185
|
-
return cloneElement2(child, {
|
|
7186
|
-
size: child.props.size || "inherit"
|
|
7187
|
-
});
|
|
7188
|
-
}
|
|
7189
|
-
return child;
|
|
7190
|
-
});
|
|
7191
|
-
}
|
|
7192
|
-
return {
|
|
7193
|
-
...truncateProps,
|
|
7194
|
-
children: truncate ? truncateProps.children : content
|
|
7195
|
-
};
|
|
7196
|
-
}
|
|
7197
|
-
|
|
7198
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/component.mjs
|
|
7199
|
-
import { jsx as _jsx18 } from "react/jsx-runtime";
|
|
7200
|
-
function UnconnectedText(props, forwardedRef) {
|
|
7201
|
-
const textProps = useText(props);
|
|
7202
|
-
return /* @__PURE__ */ _jsx18(component_default, {
|
|
7203
|
-
as: "span",
|
|
7204
|
-
...textProps,
|
|
7205
|
-
ref: forwardedRef
|
|
7206
|
-
});
|
|
7207
|
-
}
|
|
7208
|
-
var Text3 = contextConnect(UnconnectedText, "Text");
|
|
7209
|
-
var component_default2 = Text3;
|
|
7210
|
-
|
|
7211
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
6424
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
7212
6425
|
var ALIGNMENTS = {
|
|
7213
6426
|
bottom: {
|
|
7214
6427
|
alignItems: "flex-end",
|
|
@@ -7259,7 +6472,7 @@ function getAlignmentProps(alignment) {
|
|
|
7259
6472
|
return alignmentProps;
|
|
7260
6473
|
}
|
|
7261
6474
|
|
|
7262
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6475
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
7263
6476
|
function useGrid(props) {
|
|
7264
6477
|
const {
|
|
7265
6478
|
align,
|
|
@@ -7305,21 +6518,21 @@ function useGrid(props) {
|
|
|
7305
6518
|
};
|
|
7306
6519
|
}
|
|
7307
6520
|
|
|
7308
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
7309
|
-
import { jsx as
|
|
6521
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
6522
|
+
import { jsx as _jsx18 } from "react/jsx-runtime";
|
|
7310
6523
|
function UnconnectedGrid(props, forwardedRef) {
|
|
7311
6524
|
const gridProps = useGrid(props);
|
|
7312
|
-
return /* @__PURE__ */
|
|
6525
|
+
return /* @__PURE__ */ _jsx18(component_default, {
|
|
7313
6526
|
...gridProps,
|
|
7314
6527
|
ref: forwardedRef
|
|
7315
6528
|
});
|
|
7316
6529
|
}
|
|
7317
6530
|
var Grid2 = contextConnect(UnconnectedGrid, "Grid");
|
|
7318
|
-
var
|
|
6531
|
+
var component_default2 = Grid2;
|
|
7319
6532
|
|
|
7320
6533
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
7321
6534
|
import { __ as __4 } from "@wordpress/i18n";
|
|
7322
|
-
import
|
|
6535
|
+
import clsx6 from "clsx";
|
|
7323
6536
|
import { useContext as useContext17, useMemo as useMemo20 } from "react";
|
|
7324
6537
|
|
|
7325
6538
|
// src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.ts
|
|
@@ -7389,7 +6602,7 @@ var leaderboard_chart_module_default = {
|
|
|
7389
6602
|
};
|
|
7390
6603
|
|
|
7391
6604
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
7392
|
-
import { jsx as
|
|
6605
|
+
import { jsx as _jsx19, Fragment as _Fragment6, jsxs as _jsxs7 } from "react/jsx-runtime";
|
|
7393
6606
|
var defaultValueFormatter = (value) => {
|
|
7394
6607
|
return formatMetricValue(value, "number", {
|
|
7395
6608
|
useMultipliers: true,
|
|
@@ -7404,8 +6617,8 @@ var defaultDeltaFormatter = (value) => {
|
|
|
7404
6617
|
};
|
|
7405
6618
|
var BarLabel = ({
|
|
7406
6619
|
label
|
|
7407
|
-
}) => /* @__PURE__ */
|
|
7408
|
-
children: typeof label === "string" ? /* @__PURE__ */
|
|
6620
|
+
}) => /* @__PURE__ */ _jsx19(_Fragment6, {
|
|
6621
|
+
children: typeof label === "string" ? /* @__PURE__ */ _jsx19(Text, {
|
|
7409
6622
|
className: leaderboard_chart_module_default.label,
|
|
7410
6623
|
children: label
|
|
7411
6624
|
}) : label
|
|
@@ -7420,21 +6633,21 @@ var BarWithLabel = ({
|
|
|
7420
6633
|
isPrimaryVisible = true,
|
|
7421
6634
|
isComparisonVisible = true
|
|
7422
6635
|
}) => /* @__PURE__ */ _jsxs7("div", {
|
|
7423
|
-
className:
|
|
6636
|
+
className: clsx6(leaderboard_chart_module_default.barWithLabelContainer, {
|
|
7424
6637
|
[leaderboard_chart_module_default["is-overlay"]]: withOverlayLabel
|
|
7425
6638
|
}),
|
|
7426
|
-
children: [/* @__PURE__ */
|
|
6639
|
+
children: [/* @__PURE__ */ _jsx19(BarLabel, {
|
|
7427
6640
|
label: entry.label
|
|
7428
|
-
}), isPrimaryVisible && /* @__PURE__ */
|
|
7429
|
-
className:
|
|
6641
|
+
}), isPrimaryVisible && /* @__PURE__ */ _jsx19("div", {
|
|
6642
|
+
className: clsx6(leaderboard_chart_module_default.bar, {
|
|
7430
6643
|
[leaderboard_chart_module_default["bar--animated"]]: animation
|
|
7431
6644
|
}),
|
|
7432
6645
|
style: {
|
|
7433
6646
|
width: entry.currentShare + "%",
|
|
7434
6647
|
backgroundColor: primaryColor
|
|
7435
6648
|
}
|
|
7436
|
-
}), withComparison && !withOverlayLabel && isComparisonVisible && /* @__PURE__ */
|
|
7437
|
-
className:
|
|
6649
|
+
}), withComparison && !withOverlayLabel && isComparisonVisible && /* @__PURE__ */ _jsx19("div", {
|
|
6650
|
+
className: clsx6(leaderboard_chart_module_default.bar, {
|
|
7438
6651
|
[leaderboard_chart_module_default["bar--animated"]]: animation
|
|
7439
6652
|
}),
|
|
7440
6653
|
style: {
|
|
@@ -7544,15 +6757,15 @@ var LeaderboardChartInternal = ({
|
|
|
7544
6757
|
});
|
|
7545
6758
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
7546
6759
|
if (!data || data.length === 0) {
|
|
7547
|
-
return /* @__PURE__ */
|
|
6760
|
+
return /* @__PURE__ */ _jsx19(SingleChartContext.Provider, {
|
|
7548
6761
|
value: {
|
|
7549
6762
|
chartId
|
|
7550
6763
|
},
|
|
7551
|
-
children: /* @__PURE__ */
|
|
6764
|
+
children: /* @__PURE__ */ _jsx19(ChartLayout, {
|
|
7552
6765
|
legendPosition,
|
|
7553
6766
|
legendElement: false,
|
|
7554
6767
|
legendChildren,
|
|
7555
|
-
className:
|
|
6768
|
+
className: clsx6(leaderboard_chart_module_default.leaderboardChart, {
|
|
7556
6769
|
[leaderboard_chart_module_default["leaderboardChart--responsive"]]: !propWidth && !propHeight,
|
|
7557
6770
|
[leaderboard_chart_module_default["leaderboardChart--loading"]]: loading
|
|
7558
6771
|
}, className),
|
|
@@ -7563,14 +6776,14 @@ var LeaderboardChartInternal = ({
|
|
|
7563
6776
|
height: propHeight || void 0
|
|
7564
6777
|
},
|
|
7565
6778
|
trailingContent: nonLegendChildren,
|
|
7566
|
-
children: /* @__PURE__ */
|
|
6779
|
+
children: /* @__PURE__ */ _jsx19("div", {
|
|
7567
6780
|
className: leaderboard_chart_module_default.emptyState,
|
|
7568
6781
|
children: loading ? __4("Loading\u2026", "jetpack-charts") : __4("No data available", "jetpack-charts")
|
|
7569
6782
|
})
|
|
7570
6783
|
})
|
|
7571
6784
|
});
|
|
7572
6785
|
}
|
|
7573
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
6786
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx19(Legend, {
|
|
7574
6787
|
orientation: legend.orientation ?? "horizontal",
|
|
7575
6788
|
position: legendPosition,
|
|
7576
6789
|
alignment: legend.alignment ?? "center",
|
|
@@ -7582,15 +6795,15 @@ var LeaderboardChartInternal = ({
|
|
|
7582
6795
|
chartId,
|
|
7583
6796
|
interactive: legendInteractive
|
|
7584
6797
|
});
|
|
7585
|
-
return /* @__PURE__ */
|
|
6798
|
+
return /* @__PURE__ */ _jsx19(SingleChartContext.Provider, {
|
|
7586
6799
|
value: {
|
|
7587
6800
|
chartId
|
|
7588
6801
|
},
|
|
7589
|
-
children: /* @__PURE__ */
|
|
6802
|
+
children: /* @__PURE__ */ _jsx19(ChartLayout, {
|
|
7590
6803
|
legendPosition,
|
|
7591
6804
|
legendElement,
|
|
7592
6805
|
legendChildren,
|
|
7593
|
-
className:
|
|
6806
|
+
className: clsx6(leaderboard_chart_module_default.leaderboardChart, {
|
|
7594
6807
|
[leaderboard_chart_module_default["leaderboardChart--responsive"]]: !propWidth && !propHeight,
|
|
7595
6808
|
[leaderboard_chart_module_default["leaderboardChart--loading"]]: loading
|
|
7596
6809
|
}, className),
|
|
@@ -7601,12 +6814,12 @@ var LeaderboardChartInternal = ({
|
|
|
7601
6814
|
height: propHeight || void 0
|
|
7602
6815
|
},
|
|
7603
6816
|
trailingContent: nonLegendChildren,
|
|
7604
|
-
children: /* @__PURE__ */
|
|
6817
|
+
children: /* @__PURE__ */ _jsx19("div", {
|
|
7605
6818
|
className: leaderboard_chart_module_default.leaderboardChart__content,
|
|
7606
|
-
children: allSeriesHidden ? /* @__PURE__ */
|
|
6819
|
+
children: allSeriesHidden ? /* @__PURE__ */ _jsx19("div", {
|
|
7607
6820
|
className: leaderboard_chart_module_default.emptyState,
|
|
7608
6821
|
children: __4("All series are hidden. Click legend items to show data.", "jetpack-charts")
|
|
7609
|
-
}) : /* @__PURE__ */
|
|
6822
|
+
}) : /* @__PURE__ */ _jsx19(component_default2, {
|
|
7610
6823
|
templateColumns: "minmax(0, 1fr) auto",
|
|
7611
6824
|
rowGap,
|
|
7612
6825
|
columnGap,
|
|
@@ -7614,10 +6827,10 @@ var LeaderboardChartInternal = ({
|
|
|
7614
6827
|
const colorIndex = Math.sign(entry.delta) + 1;
|
|
7615
6828
|
const deltaColor = deltaColors[colorIndex];
|
|
7616
6829
|
return /* @__PURE__ */ _jsxs7(Fragment2, {
|
|
7617
|
-
children: [/* @__PURE__ */
|
|
6830
|
+
children: [/* @__PURE__ */ _jsx19(Stack, {
|
|
7618
6831
|
direction: "column",
|
|
7619
6832
|
gap: labelSpacing,
|
|
7620
|
-
children: /* @__PURE__ */
|
|
6833
|
+
children: /* @__PURE__ */ _jsx19(BarWithLabel, {
|
|
7621
6834
|
entry,
|
|
7622
6835
|
withComparison,
|
|
7623
6836
|
withOverlayLabel,
|
|
@@ -7630,12 +6843,12 @@ var LeaderboardChartInternal = ({
|
|
|
7630
6843
|
}), /* @__PURE__ */ _jsxs7(Stack, {
|
|
7631
6844
|
direction: "row",
|
|
7632
6845
|
gap: "xs",
|
|
7633
|
-
className:
|
|
6846
|
+
className: clsx6(leaderboard_chart_module_default.valueContainer, {
|
|
7634
6847
|
[leaderboard_chart_module_default.overlayLabel]: withOverlayLabel
|
|
7635
6848
|
}),
|
|
7636
|
-
children: [isPrimaryVisible && /* @__PURE__ */
|
|
6849
|
+
children: [isPrimaryVisible && /* @__PURE__ */ _jsx19(Text, {
|
|
7637
6850
|
children: valueFormatter(entry.currentValue)
|
|
7638
|
-
}), withComparison && isComparisonVisible && /* @__PURE__ */
|
|
6851
|
+
}), withComparison && isComparisonVisible && /* @__PURE__ */ _jsx19(Text, {
|
|
7639
6852
|
style: {
|
|
7640
6853
|
color: deltaColor
|
|
7641
6854
|
},
|
|
@@ -7652,12 +6865,12 @@ var LeaderboardChartInternal = ({
|
|
|
7652
6865
|
var LeaderboardChartWithProvider = (props) => {
|
|
7653
6866
|
const existingContext = useContext17(GlobalChartsContext);
|
|
7654
6867
|
if (existingContext) {
|
|
7655
|
-
return /* @__PURE__ */
|
|
6868
|
+
return /* @__PURE__ */ _jsx19(LeaderboardChartInternal, {
|
|
7656
6869
|
...props
|
|
7657
6870
|
});
|
|
7658
6871
|
}
|
|
7659
|
-
return /* @__PURE__ */
|
|
7660
|
-
children: /* @__PURE__ */
|
|
6872
|
+
return /* @__PURE__ */ _jsx19(GlobalChartsProvider, {
|
|
6873
|
+
children: /* @__PURE__ */ _jsx19(LeaderboardChartInternal, {
|
|
7661
6874
|
...props
|
|
7662
6875
|
})
|
|
7663
6876
|
});
|
|
@@ -7677,20 +6890,20 @@ import { LinearGradient } from "@visx/gradient";
|
|
|
7677
6890
|
import { scaleTime } from "@visx/scale";
|
|
7678
6891
|
import { XYChart as XYChart2, AreaSeries, Grid as Grid3, Axis as Axis2, DataContext as DataContext6 } from "@visx/xychart";
|
|
7679
6892
|
import { __ as __6 } from "@wordpress/i18n";
|
|
7680
|
-
import
|
|
6893
|
+
import clsx8 from "clsx";
|
|
7681
6894
|
import { differenceInHours, differenceInYears } from "date-fns";
|
|
7682
6895
|
import { useMemo as useMemo22, useContext as useContext21, forwardRef as forwardRef6, useImperativeHandle as useImperativeHandle2, useState as useState11, useRef as useRef12, useCallback as useCallback11, createElement as _createElement2 } from "react";
|
|
7683
6896
|
|
|
7684
6897
|
// src/charts/private/default-glyph/default-glyph.tsx
|
|
7685
6898
|
import { DataContext as DataContext2 } from "@visx/xychart";
|
|
7686
6899
|
import { useContext as useContext18 } from "react";
|
|
7687
|
-
import { jsx as
|
|
6900
|
+
import { jsx as _jsx20 } from "react/jsx-runtime";
|
|
7688
6901
|
var DefaultGlyph = (props) => {
|
|
7689
6902
|
const {
|
|
7690
6903
|
theme
|
|
7691
6904
|
} = useContext18(DataContext2) || {};
|
|
7692
6905
|
const position2 = props.position || "start";
|
|
7693
|
-
return /* @__PURE__ */
|
|
6906
|
+
return /* @__PURE__ */ _jsx20("circle", {
|
|
7694
6907
|
cx: props.x,
|
|
7695
6908
|
cy: props.y,
|
|
7696
6909
|
r: props.size,
|
|
@@ -7724,10 +6937,10 @@ var line_chart_module_default = {
|
|
|
7724
6937
|
|
|
7725
6938
|
// src/charts/line-chart/private/line-chart-annotation-label-popover.tsx
|
|
7726
6939
|
import { __ as __5 } from "@wordpress/i18n";
|
|
7727
|
-
import
|
|
7728
|
-
import
|
|
6940
|
+
import { Icon, close } from "@wordpress/icons";
|
|
6941
|
+
import clsx7 from "clsx";
|
|
7729
6942
|
import { useEffect as useEffect9, useId as useId3, useRef as useRef10, useState as useState8 } from "react";
|
|
7730
|
-
import { jsx as
|
|
6943
|
+
import { jsx as _jsx21, jsxs as _jsxs8 } from "react/jsx-runtime";
|
|
7731
6944
|
var POPOVER_BUTTON_SIZE = 44;
|
|
7732
6945
|
var LineChartAnnotationLabelWithPopover = ({
|
|
7733
6946
|
title,
|
|
@@ -7752,8 +6965,8 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7752
6965
|
}
|
|
7753
6966
|
setIsPositioned(true);
|
|
7754
6967
|
};
|
|
7755
|
-
popover.addEventListener("toggle", (
|
|
7756
|
-
if (
|
|
6968
|
+
popover.addEventListener("toggle", (e) => {
|
|
6969
|
+
if (e.newState === "open") {
|
|
7757
6970
|
positionPopover();
|
|
7758
6971
|
}
|
|
7759
6972
|
});
|
|
@@ -7766,7 +6979,7 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7766
6979
|
}, [isBrowserSafari]);
|
|
7767
6980
|
return /* @__PURE__ */ _jsxs8("div", {
|
|
7768
6981
|
className: line_chart_module_default["line-chart__annotation-label"],
|
|
7769
|
-
children: [/* @__PURE__ */
|
|
6982
|
+
children: [/* @__PURE__ */ _jsx21("button", {
|
|
7770
6983
|
ref: buttonRef,
|
|
7771
6984
|
popovertarget: popoverId,
|
|
7772
6985
|
className: line_chart_module_default["line-chart__annotation-label-trigger-button"],
|
|
@@ -7780,26 +6993,26 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7780
6993
|
title,
|
|
7781
6994
|
subtitle
|
|
7782
6995
|
})
|
|
7783
|
-
}), /* @__PURE__ */
|
|
6996
|
+
}), /* @__PURE__ */ _jsx21("div", {
|
|
7784
6997
|
ref: popoverRef,
|
|
7785
6998
|
id: popoverId,
|
|
7786
6999
|
popover: "auto",
|
|
7787
|
-
className:
|
|
7000
|
+
className: clsx7(line_chart_module_default["line-chart__annotation-label-popover"], isPositioned && line_chart_module_default["line-chart__annotation-label-popover--visible"], isBrowserSafari && line_chart_module_default["line-chart__annotation-label-popover--safari"]),
|
|
7788
7001
|
children: /* @__PURE__ */ _jsxs8("div", {
|
|
7789
7002
|
className: line_chart_module_default["line-chart__annotation-label-popover-header"],
|
|
7790
|
-
children: [/* @__PURE__ */
|
|
7003
|
+
children: [/* @__PURE__ */ _jsx21("div", {
|
|
7791
7004
|
className: line_chart_module_default["line-chart__annotation-label-popover-content"],
|
|
7792
7005
|
children: renderLabelPopover({
|
|
7793
7006
|
title,
|
|
7794
7007
|
subtitle
|
|
7795
7008
|
})
|
|
7796
|
-
}), /* @__PURE__ */
|
|
7009
|
+
}), /* @__PURE__ */ _jsx21("button", {
|
|
7797
7010
|
popovertarget: popoverId,
|
|
7798
7011
|
popovertargetaction: "hide",
|
|
7799
7012
|
className: line_chart_module_default["line-chart__annotation-label-popover-close-button"],
|
|
7800
7013
|
"aria-label": __5("Close", "jetpack-charts"),
|
|
7801
|
-
children: /* @__PURE__ */
|
|
7802
|
-
icon:
|
|
7014
|
+
children: /* @__PURE__ */ _jsx21(Icon, {
|
|
7015
|
+
icon: close,
|
|
7803
7016
|
size: 16
|
|
7804
7017
|
})
|
|
7805
7018
|
})]
|
|
@@ -7812,7 +7025,7 @@ var line_chart_annotation_label_popover_default = LineChartAnnotationLabelWithPo
|
|
|
7812
7025
|
// src/charts/line-chart/private/line-chart-annotations-overlay.tsx
|
|
7813
7026
|
import { DataContext as DataContext3 } from "@visx/xychart";
|
|
7814
7027
|
import { useEffect as useEffect10, useState as useState9, useCallback as useCallback10 } from "react";
|
|
7815
|
-
import { jsx as
|
|
7028
|
+
import { jsx as _jsx22 } from "react/jsx-runtime";
|
|
7816
7029
|
var LineChartAnnotationsOverlay = ({
|
|
7817
7030
|
children
|
|
7818
7031
|
}) => {
|
|
@@ -7894,9 +7107,9 @@ var LineChartAnnotationsOverlay = ({
|
|
|
7894
7107
|
width: chartWidth,
|
|
7895
7108
|
height: chartHeight
|
|
7896
7109
|
};
|
|
7897
|
-
return /* @__PURE__ */
|
|
7110
|
+
return /* @__PURE__ */ _jsx22(DataContext3.Provider, {
|
|
7898
7111
|
value: dataContextValue,
|
|
7899
|
-
children: /* @__PURE__ */
|
|
7112
|
+
children: /* @__PURE__ */ _jsx22("svg", {
|
|
7900
7113
|
width: chartWidth,
|
|
7901
7114
|
height: chartHeight,
|
|
7902
7115
|
className: line_chart_module_default["line-chart__annotations-overlay"],
|
|
@@ -7911,14 +7124,14 @@ import { Annotation, CircleSubject, Connector, HtmlLabel, Label, LineSubject } f
|
|
|
7911
7124
|
import { DataContext as DataContext4 } from "@visx/xychart";
|
|
7912
7125
|
import merge3 from "deepmerge";
|
|
7913
7126
|
import { useContext as useContext19, useRef as useRef11, useEffect as useEffect11, useState as useState10, useMemo as useMemo21 } from "react";
|
|
7914
|
-
import { jsx as
|
|
7127
|
+
import { jsx as _jsx23, jsxs as _jsxs9 } from "react/jsx-runtime";
|
|
7915
7128
|
var ANNOTATION_MAX_WIDTH = 125;
|
|
7916
7129
|
var ANNOTATION_INIT_HEIGHT = 100;
|
|
7917
7130
|
var getLabelPosition = ({
|
|
7918
7131
|
subjectType,
|
|
7919
|
-
x
|
|
7132
|
+
x,
|
|
7920
7133
|
xMax,
|
|
7921
|
-
y
|
|
7134
|
+
y,
|
|
7922
7135
|
yMin,
|
|
7923
7136
|
yMax,
|
|
7924
7137
|
maxWidth,
|
|
@@ -7938,7 +7151,7 @@ var getLabelPosition = ({
|
|
|
7938
7151
|
dx = 20;
|
|
7939
7152
|
dy = 0;
|
|
7940
7153
|
}
|
|
7941
|
-
const effectiveX =
|
|
7154
|
+
const effectiveX = x + dx;
|
|
7942
7155
|
if (effectiveX + annotationMaxWidth > xMax) {
|
|
7943
7156
|
isFlippedHorizontally = true;
|
|
7944
7157
|
if (subjectType === "circle") {
|
|
@@ -7948,18 +7161,18 @@ var getLabelPosition = ({
|
|
|
7948
7161
|
}
|
|
7949
7162
|
}
|
|
7950
7163
|
if (subjectType === "circle") {
|
|
7951
|
-
if (
|
|
7164
|
+
if (y + dy + annotationHeight > yMin) {
|
|
7952
7165
|
isFlippedVertically = true;
|
|
7953
7166
|
dy = -Math.abs(dy);
|
|
7954
7167
|
}
|
|
7955
|
-
} else if (
|
|
7168
|
+
} else if (y - annotationHeight < yMax) {
|
|
7956
7169
|
if (subjectType === "line-horizontal") {
|
|
7957
7170
|
isFlippedVertically = true;
|
|
7958
7171
|
dy = Math.abs(dy);
|
|
7959
7172
|
} else if (subjectType === "line-vertical") {
|
|
7960
7173
|
isFlippedVertically = true;
|
|
7961
7174
|
}
|
|
7962
|
-
} else if (
|
|
7175
|
+
} else if (y + annotationHeight > yMin) {
|
|
7963
7176
|
if (subjectType === "line-horizontal") {
|
|
7964
7177
|
isFlippedVertically = true;
|
|
7965
7178
|
dy = -Math.abs(dy);
|
|
@@ -7980,10 +7193,10 @@ var getHorizontalAnchor = (subjectType, isFlippedHorizontally) => {
|
|
|
7980
7193
|
}
|
|
7981
7194
|
return void 0;
|
|
7982
7195
|
};
|
|
7983
|
-
var getVerticalAnchor = (subjectType, isFlippedVertically,
|
|
7196
|
+
var getVerticalAnchor = (subjectType, isFlippedVertically, y, yMax, height) => {
|
|
7984
7197
|
if (subjectType === "line-vertical") {
|
|
7985
7198
|
if (isFlippedVertically) {
|
|
7986
|
-
return
|
|
7199
|
+
return y - height < yMax ? "start" : "end";
|
|
7987
7200
|
}
|
|
7988
7201
|
return "start";
|
|
7989
7202
|
}
|
|
@@ -8015,16 +7228,16 @@ var LineChartAnnotation = ({
|
|
|
8015
7228
|
}, []);
|
|
8016
7229
|
const positionData = useMemo21(() => {
|
|
8017
7230
|
if (!datum || !datum.date || datum.value == null || !xScale || !yScale) return null;
|
|
8018
|
-
const
|
|
8019
|
-
const
|
|
8020
|
-
if (typeof
|
|
7231
|
+
const x2 = xScale(datum.date);
|
|
7232
|
+
const y2 = yScale(datum.value);
|
|
7233
|
+
if (typeof x2 !== "number" || typeof y2 !== "number") return null;
|
|
8021
7234
|
const [yMin2, yMax2] = yScale.range().map(Number);
|
|
8022
7235
|
const [xMin2, xMax2] = xScale.range().map(Number);
|
|
8023
7236
|
if (renderLabel) {
|
|
8024
7237
|
return {
|
|
8025
|
-
x:
|
|
7238
|
+
x: x2,
|
|
8026
7239
|
dx: 0,
|
|
8027
|
-
y:
|
|
7240
|
+
y: y2,
|
|
8028
7241
|
dy: 0,
|
|
8029
7242
|
yMin: yMin2,
|
|
8030
7243
|
yMax: yMax2,
|
|
@@ -8036,17 +7249,17 @@ var LineChartAnnotation = ({
|
|
|
8036
7249
|
}
|
|
8037
7250
|
const position2 = getLabelPosition({
|
|
8038
7251
|
subjectType,
|
|
8039
|
-
x:
|
|
7252
|
+
x: x2,
|
|
8040
7253
|
xMax: xMax2,
|
|
8041
|
-
y:
|
|
7254
|
+
y: y2,
|
|
8042
7255
|
yMin: yMin2,
|
|
8043
7256
|
yMax: yMax2,
|
|
8044
7257
|
maxWidth: styles?.label?.maxWidth,
|
|
8045
7258
|
height
|
|
8046
7259
|
});
|
|
8047
7260
|
return {
|
|
8048
|
-
x:
|
|
8049
|
-
y:
|
|
7261
|
+
x: x2,
|
|
7262
|
+
y: y2,
|
|
8050
7263
|
yMin: yMin2,
|
|
8051
7264
|
yMax: yMax2,
|
|
8052
7265
|
xMin: xMin2,
|
|
@@ -8056,8 +7269,8 @@ var LineChartAnnotation = ({
|
|
|
8056
7269
|
}, [datum, xScale, yScale, subjectType, styles?.label?.maxWidth, height, renderLabel]);
|
|
8057
7270
|
if (!positionData) return null;
|
|
8058
7271
|
const {
|
|
8059
|
-
x
|
|
8060
|
-
y
|
|
7272
|
+
x,
|
|
7273
|
+
y,
|
|
8061
7274
|
yMin,
|
|
8062
7275
|
yMax,
|
|
8063
7276
|
xMin,
|
|
@@ -8087,37 +7300,37 @@ var LineChartAnnotation = ({
|
|
|
8087
7300
|
const labelWidth = POPOVER_BUTTON_SIZE;
|
|
8088
7301
|
const labelHeight = POPOVER_BUTTON_SIZE;
|
|
8089
7302
|
return isSafari() ? {
|
|
8090
|
-
transform: `translate(${
|
|
7303
|
+
transform: `translate(${x + (dx || 0) + (typeof labelPosition.x === "number" ? labelPosition.x - x : 0) - labelWidth}px, ${y + (dy || 0) + (typeof labelPosition.y === "number" ? labelPosition.y - y : 0) - labelHeight}px)`,
|
|
8091
7304
|
width: labelWidth,
|
|
8092
7305
|
height: labelHeight
|
|
8093
7306
|
} : void 0;
|
|
8094
7307
|
};
|
|
8095
|
-
return /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ _jsx23("g", {
|
|
8096
7309
|
children: /* @__PURE__ */ _jsxs9(Annotation, {
|
|
8097
|
-
x
|
|
8098
|
-
y
|
|
7310
|
+
x,
|
|
7311
|
+
y,
|
|
8099
7312
|
dx,
|
|
8100
7313
|
dy,
|
|
8101
|
-
children: [/* @__PURE__ */
|
|
7314
|
+
children: [/* @__PURE__ */ _jsx23(Connector, {
|
|
8102
7315
|
...styles?.connector
|
|
8103
|
-
}), subjectType === "circle" && /* @__PURE__ */
|
|
7316
|
+
}), subjectType === "circle" && /* @__PURE__ */ _jsx23(CircleSubject, {
|
|
8104
7317
|
...styles?.circleSubject
|
|
8105
|
-
}), subjectType === "line-vertical" && /* @__PURE__ */
|
|
7318
|
+
}), subjectType === "line-vertical" && /* @__PURE__ */ _jsx23(LineSubject, {
|
|
8106
7319
|
min: yMax,
|
|
8107
7320
|
max: yMin,
|
|
8108
7321
|
...styles?.lineSubject,
|
|
8109
7322
|
orientation: "vertical"
|
|
8110
|
-
}), subjectType === "line-horizontal" && /* @__PURE__ */
|
|
7323
|
+
}), subjectType === "line-horizontal" && /* @__PURE__ */ _jsx23(LineSubject, {
|
|
8111
7324
|
min: xMin,
|
|
8112
7325
|
max: xMax,
|
|
8113
7326
|
...styles?.lineSubject,
|
|
8114
7327
|
orientation: "horizontal"
|
|
8115
|
-
}), renderLabel ? /* @__PURE__ */
|
|
7328
|
+
}), renderLabel ? /* @__PURE__ */ _jsx23(HtmlLabel, {
|
|
8116
7329
|
...styles?.label,
|
|
8117
7330
|
...labelPosition,
|
|
8118
|
-
children: /* @__PURE__ */
|
|
7331
|
+
children: /* @__PURE__ */ _jsx23("div", {
|
|
8119
7332
|
style: getSafariHTMLLabelPosition(),
|
|
8120
|
-
children: renderLabelPopover ? /* @__PURE__ */
|
|
7333
|
+
children: renderLabelPopover ? /* @__PURE__ */ _jsx23(line_chart_annotation_label_popover_default, {
|
|
8121
7334
|
title,
|
|
8122
7335
|
subtitle,
|
|
8123
7336
|
renderLabel,
|
|
@@ -8127,15 +7340,15 @@ var LineChartAnnotation = ({
|
|
|
8127
7340
|
subtitle
|
|
8128
7341
|
})
|
|
8129
7342
|
})
|
|
8130
|
-
}) : /* @__PURE__ */
|
|
7343
|
+
}) : /* @__PURE__ */ _jsx23("g", {
|
|
8131
7344
|
ref: labelRef,
|
|
8132
|
-
children: /* @__PURE__ */
|
|
7345
|
+
children: /* @__PURE__ */ _jsx23(Label, {
|
|
8133
7346
|
title,
|
|
8134
7347
|
subtitle,
|
|
8135
7348
|
...styles?.label,
|
|
8136
7349
|
...labelPosition,
|
|
8137
7350
|
horizontalAnchor: getHorizontalAnchor(subjectType, isFlippedHorizontally),
|
|
8138
|
-
verticalAnchor: getVerticalAnchor(subjectType, isFlippedVertically,
|
|
7351
|
+
verticalAnchor: getVerticalAnchor(subjectType, isFlippedVertically, y, yMax, height ?? ANNOTATION_INIT_HEIGHT)
|
|
8139
7352
|
})
|
|
8140
7353
|
})]
|
|
8141
7354
|
})
|
|
@@ -8166,9 +7379,9 @@ var LineChartGlyph = ({
|
|
|
8166
7379
|
if (!xScale || !yScale) return null;
|
|
8167
7380
|
if (data.data.length === 0) return null;
|
|
8168
7381
|
const point = position2 === "start" ? data.data[0] : data.data[data.data.length - 1];
|
|
8169
|
-
const
|
|
8170
|
-
const
|
|
8171
|
-
if (typeof
|
|
7382
|
+
const x = xScale(accessors.xAccessor(point));
|
|
7383
|
+
const y = yScale(accessors.yAccessor(point));
|
|
7384
|
+
if (typeof x !== "number" || typeof y !== "number") return null;
|
|
8172
7385
|
const size = Math.max(0, toNumber(glyphStyle?.radius) ?? 4);
|
|
8173
7386
|
return renderGlyph({
|
|
8174
7387
|
key: `${position2}-glyph-${data.label}`,
|
|
@@ -8176,8 +7389,8 @@ var LineChartGlyph = ({
|
|
|
8176
7389
|
datum: point,
|
|
8177
7390
|
color,
|
|
8178
7391
|
size,
|
|
8179
|
-
x
|
|
8180
|
-
y
|
|
7392
|
+
x,
|
|
7393
|
+
y,
|
|
8181
7394
|
glyphStyle,
|
|
8182
7395
|
position: position2
|
|
8183
7396
|
});
|
|
@@ -8185,7 +7398,7 @@ var LineChartGlyph = ({
|
|
|
8185
7398
|
var line_chart_glyph_default = LineChartGlyph;
|
|
8186
7399
|
|
|
8187
7400
|
// src/charts/line-chart/line-chart.tsx
|
|
8188
|
-
import { jsx as
|
|
7401
|
+
import { jsx as _jsx24, jsxs as _jsxs10 } from "react/jsx-runtime";
|
|
8189
7402
|
var X_TICK_WIDTH = 60;
|
|
8190
7403
|
var defaultRenderGlyph = (props) => {
|
|
8191
7404
|
return /* @__PURE__ */ _createElement2(DefaultGlyph, {
|
|
@@ -8223,10 +7436,10 @@ var renderDefaultTooltip = (params) => {
|
|
|
8223
7436
|
}]) => ({
|
|
8224
7437
|
key,
|
|
8225
7438
|
value: datum.value
|
|
8226
|
-
})).sort((
|
|
7439
|
+
})).sort((a, b) => b.value - a.value);
|
|
8227
7440
|
return /* @__PURE__ */ _jsxs10("div", {
|
|
8228
7441
|
className: line_chart_module_default["line-chart__tooltip"],
|
|
8229
|
-
children: [/* @__PURE__ */
|
|
7442
|
+
children: [/* @__PURE__ */ _jsx24("div", {
|
|
8230
7443
|
className: line_chart_module_default["line-chart__tooltip-date"],
|
|
8231
7444
|
children: nearestDatum.date?.toLocaleDateString()
|
|
8232
7445
|
}), tooltipPoints.map((point) => /* @__PURE__ */ _jsxs10("div", {
|
|
@@ -8234,7 +7447,7 @@ var renderDefaultTooltip = (params) => {
|
|
|
8234
7447
|
children: [/* @__PURE__ */ _jsxs10("span", {
|
|
8235
7448
|
className: line_chart_module_default["line-chart__tooltip-label"],
|
|
8236
7449
|
children: [point.key, ":"]
|
|
8237
|
-
}), /* @__PURE__ */
|
|
7450
|
+
}), /* @__PURE__ */ _jsx24("span", {
|
|
8238
7451
|
className: line_chart_module_default["line-chart__tooltip-value"],
|
|
8239
7452
|
children: formatNumber6(point.value)
|
|
8240
7453
|
})]
|
|
@@ -8287,7 +7500,7 @@ var guessOptimalNumTicks = (data, chartWidth, tickFormatter) => {
|
|
|
8287
7500
|
);
|
|
8288
7501
|
let secondBestGuess = 1;
|
|
8289
7502
|
for (let numTicks = upperBound; numTicks > 1; --numTicks) {
|
|
8290
|
-
const ticks = xScale.ticks(numTicks).map((
|
|
7503
|
+
const ticks = xScale.ticks(numTicks).map((d) => tickFormatter(d.getTime()));
|
|
8291
7504
|
if (ticks.length > upperBound) {
|
|
8292
7505
|
continue;
|
|
8293
7506
|
}
|
|
@@ -8504,16 +7717,16 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8504
7717
|
});
|
|
8505
7718
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8506
7719
|
const accessors = {
|
|
8507
|
-
xAccessor: (
|
|
8508
|
-
yAccessor: (
|
|
7720
|
+
xAccessor: (d) => d?.date,
|
|
7721
|
+
yAccessor: (d) => d?.value
|
|
8509
7722
|
};
|
|
8510
7723
|
if (error) {
|
|
8511
|
-
return /* @__PURE__ */
|
|
8512
|
-
className:
|
|
7724
|
+
return /* @__PURE__ */ _jsx24("div", {
|
|
7725
|
+
className: clsx8("line-chart", line_chart_module_default["line-chart"]),
|
|
8513
7726
|
children: error
|
|
8514
7727
|
});
|
|
8515
7728
|
}
|
|
8516
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
7729
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx24(Legend, {
|
|
8517
7730
|
orientation: legend.orientation ?? "horizontal",
|
|
8518
7731
|
alignment: legend.alignment ?? "center",
|
|
8519
7732
|
position: legendPosition,
|
|
@@ -8526,19 +7739,19 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8526
7739
|
chartId,
|
|
8527
7740
|
interactive: legendInteractive
|
|
8528
7741
|
});
|
|
8529
|
-
return /* @__PURE__ */
|
|
7742
|
+
return /* @__PURE__ */ _jsx24(SingleChartContext.Provider, {
|
|
8530
7743
|
value: {
|
|
8531
7744
|
chartId,
|
|
8532
7745
|
chartRef: internalChartRef,
|
|
8533
7746
|
chartWidth: width,
|
|
8534
7747
|
chartHeight: measuredChartHeight || 0
|
|
8535
7748
|
},
|
|
8536
|
-
children: /* @__PURE__ */
|
|
7749
|
+
children: /* @__PURE__ */ _jsx24(ChartLayout, {
|
|
8537
7750
|
legendPosition,
|
|
8538
7751
|
legendElement,
|
|
8539
7752
|
legendChildren,
|
|
8540
7753
|
gap,
|
|
8541
|
-
className:
|
|
7754
|
+
className: clsx8("line-chart", line_chart_module_default["line-chart"], {
|
|
8542
7755
|
[line_chart_module_default["line-chart--animated"]]: animation && !prefersReducedMotion
|
|
8543
7756
|
}, className),
|
|
8544
7757
|
style: {
|
|
@@ -8551,14 +7764,14 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8551
7764
|
contentHeight
|
|
8552
7765
|
}) => {
|
|
8553
7766
|
const chartHeight = contentHeight > 0 ? contentHeight : height;
|
|
8554
|
-
return /* @__PURE__ */
|
|
7767
|
+
return /* @__PURE__ */ _jsx24("div", {
|
|
8555
7768
|
role: "grid",
|
|
8556
7769
|
"aria-label": __6("Line chart", "jetpack-charts"),
|
|
8557
7770
|
tabIndex: 0,
|
|
8558
7771
|
onKeyDown: onChartKeyDown,
|
|
8559
7772
|
onFocus: onChartFocus,
|
|
8560
7773
|
onBlur: onChartBlur,
|
|
8561
|
-
children: chartHeight > 0 && /* @__PURE__ */
|
|
7774
|
+
children: chartHeight > 0 && /* @__PURE__ */ _jsx24("div", {
|
|
8562
7775
|
ref: chartRef,
|
|
8563
7776
|
children: /* @__PURE__ */ _jsxs10(XYChart2, {
|
|
8564
7777
|
theme,
|
|
@@ -8575,14 +7788,14 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8575
7788
|
onPointerMove,
|
|
8576
7789
|
onPointerOut,
|
|
8577
7790
|
pointerEventsDataKey: "nearest",
|
|
8578
|
-
children: [gridVisibility !== "none" && /* @__PURE__ */
|
|
7791
|
+
children: [gridVisibility !== "none" && /* @__PURE__ */ _jsx24(Grid3, {
|
|
8579
7792
|
columns: false,
|
|
8580
7793
|
numTicks: 4
|
|
8581
|
-
}), chartOptions.axis.x.display && /* @__PURE__ */
|
|
7794
|
+
}), chartOptions.axis.x.display && /* @__PURE__ */ _jsx24(Axis2, {
|
|
8582
7795
|
...chartOptions.axis.x
|
|
8583
|
-
}), chartOptions.axis.y.display && /* @__PURE__ */
|
|
7796
|
+
}), chartOptions.axis.y.display && /* @__PURE__ */ _jsx24(Axis2, {
|
|
8584
7797
|
...chartOptions.axis.y
|
|
8585
|
-
}), allSeriesHidden ? /* @__PURE__ */
|
|
7798
|
+
}), allSeriesHidden ? /* @__PURE__ */ _jsx24(SvgEmptyState, {
|
|
8586
7799
|
x: width / 2,
|
|
8587
7800
|
y: chartHeight / 2,
|
|
8588
7801
|
width,
|
|
@@ -8609,19 +7822,19 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8609
7822
|
...lineStyles
|
|
8610
7823
|
};
|
|
8611
7824
|
return /* @__PURE__ */ _jsxs10("g", {
|
|
8612
|
-
children: [withGradientFill && /* @__PURE__ */
|
|
7825
|
+
children: [withGradientFill && /* @__PURE__ */ _jsx24(LinearGradient, {
|
|
8613
7826
|
id: `area-gradient-${chartId}-${index + 1}`,
|
|
8614
7827
|
from: color,
|
|
8615
7828
|
fromOpacity: 0.4,
|
|
8616
7829
|
toOpacity: 0.1,
|
|
8617
7830
|
to: providerTheme.backgroundColor,
|
|
8618
7831
|
...seriesData.options?.gradient,
|
|
8619
|
-
children: seriesData.options?.gradient?.stops?.map((stop, stopIndex) => /* @__PURE__ */
|
|
7832
|
+
children: seriesData.options?.gradient?.stops?.map((stop, stopIndex) => /* @__PURE__ */ _jsx24("stop", {
|
|
8620
7833
|
offset: stop.offset,
|
|
8621
7834
|
stopColor: stop.color || color,
|
|
8622
7835
|
stopOpacity: stop.opacity ?? 1
|
|
8623
7836
|
}, `${stop.offset}-${stop.color || color}`))
|
|
8624
|
-
}), /* @__PURE__ */
|
|
7837
|
+
}), /* @__PURE__ */ _jsx24(AreaSeries, {
|
|
8625
7838
|
dataKey: seriesData?.label,
|
|
8626
7839
|
data: seriesData.data,
|
|
8627
7840
|
...accessors,
|
|
@@ -8629,7 +7842,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8629
7842
|
renderLine: true,
|
|
8630
7843
|
curve: getCurveType(curveType, smoothing),
|
|
8631
7844
|
lineProps
|
|
8632
|
-
}, seriesData?.label), withStartGlyphs && /* @__PURE__ */
|
|
7845
|
+
}, seriesData?.label), withStartGlyphs && /* @__PURE__ */ _jsx24(line_chart_glyph_default, {
|
|
8633
7846
|
index,
|
|
8634
7847
|
data: seriesData,
|
|
8635
7848
|
color,
|
|
@@ -8637,7 +7850,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8637
7850
|
accessors,
|
|
8638
7851
|
glyphStyle,
|
|
8639
7852
|
position: "start"
|
|
8640
|
-
}), withEndGlyphs && /* @__PURE__ */
|
|
7853
|
+
}), withEndGlyphs && /* @__PURE__ */ _jsx24(line_chart_glyph_default, {
|
|
8641
7854
|
index,
|
|
8642
7855
|
data: seriesData,
|
|
8643
7856
|
color,
|
|
@@ -8647,7 +7860,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8647
7860
|
position: "end"
|
|
8648
7861
|
})]
|
|
8649
7862
|
}, seriesData?.label || index);
|
|
8650
|
-
}), withTooltips && /* @__PURE__ */
|
|
7863
|
+
}), withTooltips && /* @__PURE__ */ _jsx24(AccessibleTooltip, {
|
|
8651
7864
|
detectBounds: true,
|
|
8652
7865
|
snapTooltipToDatumX: true,
|
|
8653
7866
|
snapTooltipToDatumY: true,
|
|
@@ -8661,7 +7874,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8661
7874
|
tooltipRef,
|
|
8662
7875
|
keyboardFocusedClassName: line_chart_module_default["line-chart__tooltip--keyboard-focused"],
|
|
8663
7876
|
series: dataSorted
|
|
8664
|
-
}), /* @__PURE__ */
|
|
7877
|
+
}), /* @__PURE__ */ _jsx24(LineChartScalesRef, {
|
|
8665
7878
|
chartRef: internalChartRef,
|
|
8666
7879
|
width,
|
|
8667
7880
|
height,
|
|
@@ -8677,13 +7890,13 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8677
7890
|
var LineChartWithProvider = /* @__PURE__ */ forwardRef6((props, ref) => {
|
|
8678
7891
|
const existingContext = useContext21(GlobalChartsContext);
|
|
8679
7892
|
if (existingContext) {
|
|
8680
|
-
return /* @__PURE__ */
|
|
7893
|
+
return /* @__PURE__ */ _jsx24(LineChartInternal, {
|
|
8681
7894
|
...props,
|
|
8682
7895
|
ref
|
|
8683
7896
|
});
|
|
8684
7897
|
}
|
|
8685
|
-
return /* @__PURE__ */
|
|
8686
|
-
children: /* @__PURE__ */
|
|
7898
|
+
return /* @__PURE__ */ _jsx24(GlobalChartsProvider, {
|
|
7899
|
+
children: /* @__PURE__ */ _jsx24(LineChartInternal, {
|
|
8687
7900
|
...props,
|
|
8688
7901
|
ref
|
|
8689
7902
|
})
|
|
@@ -8706,11 +7919,11 @@ import { Group as Group4 } from "@visx/group";
|
|
|
8706
7919
|
import { Pie } from "@visx/shape";
|
|
8707
7920
|
import { useTooltip as useTooltip2, useTooltipInPortal as useTooltipInPortal2 } from "@visx/tooltip";
|
|
8708
7921
|
import { __ as __7 } from "@wordpress/i18n";
|
|
8709
|
-
import
|
|
7922
|
+
import clsx9 from "clsx";
|
|
8710
7923
|
import { useCallback as useCallback12, useContext as useContext22, useMemo as useMemo23 } from "react";
|
|
8711
7924
|
|
|
8712
7925
|
// src/charts/private/radial-wipe-animation/radial-wipe-animation.tsx
|
|
8713
|
-
import { jsx as
|
|
7926
|
+
import { jsx as _jsx25 } from "react/jsx-runtime";
|
|
8714
7927
|
function RadialWipeAnimation({
|
|
8715
7928
|
id,
|
|
8716
7929
|
radius,
|
|
@@ -8726,9 +7939,9 @@ function RadialWipeAnimation({
|
|
|
8726
7939
|
const isValidWipePercentage = 0 < wipePercentage && wipePercentage <= 100;
|
|
8727
7940
|
const animationDuration = `${// If wipePercentage is invalid, set animation duration to 0 to disable animation.
|
|
8728
7941
|
isValidWipePercentage ? durationMs * (100 / wipePercentage) : 0}ms`;
|
|
8729
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ _jsx25("mask", {
|
|
8730
7943
|
id,
|
|
8731
|
-
children: /* @__PURE__ */
|
|
7944
|
+
children: /* @__PURE__ */ _jsx25("circle", {
|
|
8732
7945
|
cx: 0,
|
|
8733
7946
|
cy: 0,
|
|
8734
7947
|
r: radius,
|
|
@@ -8741,7 +7954,7 @@ function RadialWipeAnimation({
|
|
|
8741
7954
|
style: {
|
|
8742
7955
|
transform: `rotate(${startAngle}) scaleY(${scaleY})`
|
|
8743
7956
|
},
|
|
8744
|
-
children: /* @__PURE__ */
|
|
7957
|
+
children: /* @__PURE__ */ _jsx25("animate", {
|
|
8745
7958
|
attributeName: "stroke-dashoffset",
|
|
8746
7959
|
from: "0",
|
|
8747
7960
|
to: "100.1",
|
|
@@ -8764,11 +7977,11 @@ var pie_chart_module_default = {
|
|
|
8764
7977
|
};
|
|
8765
7978
|
|
|
8766
7979
|
// src/charts/pie-chart/pie-chart.tsx
|
|
8767
|
-
import { jsx as
|
|
7980
|
+
import { jsx as _jsx26, Fragment as _Fragment7, jsxs as _jsxs11 } from "react/jsx-runtime";
|
|
8768
7981
|
var renderDefaultPieTooltip = ({
|
|
8769
7982
|
tooltipData
|
|
8770
7983
|
}) => {
|
|
8771
|
-
return /* @__PURE__ */
|
|
7984
|
+
return /* @__PURE__ */ _jsx26(BaseTooltip, {
|
|
8772
7985
|
data: tooltipData,
|
|
8773
7986
|
top: 0,
|
|
8774
7987
|
left: 0,
|
|
@@ -8895,32 +8108,32 @@ var PieChartInternal = ({
|
|
|
8895
8108
|
});
|
|
8896
8109
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8897
8110
|
if (!isValid2) {
|
|
8898
|
-
return /* @__PURE__ */
|
|
8899
|
-
className:
|
|
8900
|
-
children: /* @__PURE__ */
|
|
8111
|
+
return /* @__PURE__ */ _jsx26("div", {
|
|
8112
|
+
className: clsx9("pie-chart", pie_chart_module_default["pie-chart"], className),
|
|
8113
|
+
children: /* @__PURE__ */ _jsx26("div", {
|
|
8901
8114
|
className: pie_chart_module_default["error-message"],
|
|
8902
8115
|
children: message
|
|
8903
8116
|
})
|
|
8904
8117
|
});
|
|
8905
8118
|
}
|
|
8906
8119
|
const padAngle = gapScale * (2 * Math.PI / data.length);
|
|
8907
|
-
const dataWithIndex = visibleData.map((
|
|
8908
|
-
const originalIndex = data.findIndex((item) => item.label ===
|
|
8120
|
+
const dataWithIndex = visibleData.map((d) => {
|
|
8121
|
+
const originalIndex = data.findIndex((item) => item.label === d.label);
|
|
8909
8122
|
return {
|
|
8910
|
-
...
|
|
8123
|
+
...d,
|
|
8911
8124
|
index: originalIndex >= 0 ? originalIndex : 0
|
|
8912
8125
|
};
|
|
8913
8126
|
});
|
|
8914
8127
|
const accessors = {
|
|
8915
|
-
value: (
|
|
8916
|
-
fill: (
|
|
8128
|
+
value: (d) => d.value,
|
|
8129
|
+
fill: (d) => {
|
|
8917
8130
|
return getElementStyles({
|
|
8918
|
-
data:
|
|
8919
|
-
index:
|
|
8131
|
+
data: d,
|
|
8132
|
+
index: d.index
|
|
8920
8133
|
}).color;
|
|
8921
8134
|
}
|
|
8922
8135
|
};
|
|
8923
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
8136
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx26(Legend, {
|
|
8924
8137
|
orientation: legend.orientation ?? "horizontal",
|
|
8925
8138
|
position: legendPosition,
|
|
8926
8139
|
alignment: legend.alignment ?? "center",
|
|
@@ -8932,16 +8145,16 @@ var PieChartInternal = ({
|
|
|
8932
8145
|
chartId,
|
|
8933
8146
|
interactive: legendInteractive
|
|
8934
8147
|
});
|
|
8935
|
-
return /* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ _jsx26(SingleChartContext.Provider, {
|
|
8936
8149
|
value: {
|
|
8937
8150
|
chartId
|
|
8938
8151
|
},
|
|
8939
|
-
children: /* @__PURE__ */
|
|
8152
|
+
children: /* @__PURE__ */ _jsx26(ChartLayout, {
|
|
8940
8153
|
legendPosition,
|
|
8941
8154
|
legendElement,
|
|
8942
8155
|
legendChildren,
|
|
8943
8156
|
gap,
|
|
8944
|
-
className:
|
|
8157
|
+
className: clsx9(
|
|
8945
8158
|
"pie-chart",
|
|
8946
8159
|
pie_chart_module_default["pie-chart"],
|
|
8947
8160
|
// Fill parent when no explicit dimensions provided
|
|
@@ -8955,10 +8168,10 @@ var PieChartInternal = ({
|
|
|
8955
8168
|
height: propHeight || void 0
|
|
8956
8169
|
},
|
|
8957
8170
|
trailingContent: /* @__PURE__ */ _jsxs11(_Fragment7, {
|
|
8958
|
-
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */
|
|
8171
|
+
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */ _jsx26(TooltipInPortal, {
|
|
8959
8172
|
top: tooltipTop || 0,
|
|
8960
8173
|
left: tooltipLeft || 0,
|
|
8961
|
-
children: /* @__PURE__ */
|
|
8174
|
+
children: /* @__PURE__ */ _jsx26("div", {
|
|
8962
8175
|
role: "tooltip",
|
|
8963
8176
|
children: renderTooltip({
|
|
8964
8177
|
tooltipData
|
|
@@ -8983,7 +8196,7 @@ var PieChartInternal = ({
|
|
|
8983
8196
|
const innerRadius = thickness === 0 ? 0 : outerRadius * (1 - thickness);
|
|
8984
8197
|
const maxCornerRadius = (outerRadius - innerRadius) / 2;
|
|
8985
8198
|
const cornerRadius = cornerScale ? Math.min(cornerScale * outerRadius, maxCornerRadius) : 0;
|
|
8986
|
-
return /* @__PURE__ */
|
|
8199
|
+
return /* @__PURE__ */ _jsx26(Stack, {
|
|
8987
8200
|
ref: containerRef,
|
|
8988
8201
|
align: "center",
|
|
8989
8202
|
justify: "center",
|
|
@@ -8993,8 +8206,8 @@ var PieChartInternal = ({
|
|
|
8993
8206
|
preserveAspectRatio: "xMidYMid meet",
|
|
8994
8207
|
width,
|
|
8995
8208
|
height,
|
|
8996
|
-
children: [/* @__PURE__ */
|
|
8997
|
-
children: /* @__PURE__ */
|
|
8209
|
+
children: [/* @__PURE__ */ _jsx26("defs", {
|
|
8210
|
+
children: /* @__PURE__ */ _jsx26(radial_wipe_animation_default, {
|
|
8998
8211
|
id: `radial-wipe-${chartId}`,
|
|
8999
8212
|
radius: outerRadius,
|
|
9000
8213
|
innerRadius
|
|
@@ -9003,13 +8216,13 @@ var PieChartInternal = ({
|
|
|
9003
8216
|
top: centerY,
|
|
9004
8217
|
left: centerX,
|
|
9005
8218
|
mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,
|
|
9006
|
-
children: [allSegmentsHidden ? /* @__PURE__ */
|
|
8219
|
+
children: [allSegmentsHidden ? /* @__PURE__ */ _jsx26(SvgEmptyState, {
|
|
9007
8220
|
x: 0,
|
|
9008
8221
|
y: 0,
|
|
9009
8222
|
width,
|
|
9010
8223
|
height,
|
|
9011
8224
|
children: __7("All segments are hidden. Click legend items to show data.", "jetpack-charts")
|
|
9012
|
-
}) : /* @__PURE__ */
|
|
8225
|
+
}) : /* @__PURE__ */ _jsx26(Pie, {
|
|
9013
8226
|
data: dataWithIndex,
|
|
9014
8227
|
pieValue: accessors.value,
|
|
9015
8228
|
outerRadius,
|
|
@@ -9043,19 +8256,22 @@ var PieChartInternal = ({
|
|
|
9043
8256
|
groupProps.onMouseMove = handleMouseMove;
|
|
9044
8257
|
groupProps.onMouseLeave = onMouseLeave;
|
|
9045
8258
|
}
|
|
9046
|
-
const
|
|
8259
|
+
const svgLabelSmall = providerTheme.svgLabelSmall;
|
|
8260
|
+
const fontSize = resolveFontSize(svgLabelSmall?.fontSize) ?? 12;
|
|
9047
8261
|
const estimatedTextWidth = getStringWidth(arc.data.label, {
|
|
9048
|
-
fontSize
|
|
8262
|
+
fontSize,
|
|
8263
|
+
fontFamily: svgLabelSmall?.fontFamily,
|
|
8264
|
+
fontWeight: svgLabelSmall?.fontWeight
|
|
9049
8265
|
});
|
|
9050
8266
|
const labelPadding = 6;
|
|
9051
8267
|
const backgroundWidth = estimatedTextWidth + labelPadding * 2;
|
|
9052
8268
|
const backgroundHeight = fontSize + labelPadding * 2;
|
|
9053
8269
|
return /* @__PURE__ */ _jsxs11("g", {
|
|
9054
8270
|
...groupProps,
|
|
9055
|
-
children: [/* @__PURE__ */
|
|
8271
|
+
children: [/* @__PURE__ */ _jsx26("path", {
|
|
9056
8272
|
...pathProps
|
|
9057
8273
|
}), showLabels && hasSpaceForLabel && /* @__PURE__ */ _jsxs11("g", {
|
|
9058
|
-
children: [providerTheme.labelBackgroundColor && /* @__PURE__ */
|
|
8274
|
+
children: [providerTheme.labelBackgroundColor && /* @__PURE__ */ _jsx26("rect", {
|
|
9059
8275
|
x: centroidX - backgroundWidth / 2,
|
|
9060
8276
|
y: centroidY - backgroundHeight / 2,
|
|
9061
8277
|
width: backgroundWidth,
|
|
@@ -9064,7 +8280,7 @@ var PieChartInternal = ({
|
|
|
9064
8280
|
rx: 4,
|
|
9065
8281
|
ry: 4,
|
|
9066
8282
|
pointerEvents: "none"
|
|
9067
|
-
}), /* @__PURE__ */
|
|
8283
|
+
}), /* @__PURE__ */ _jsx26("text", {
|
|
9068
8284
|
x: centroidX,
|
|
9069
8285
|
y: centroidY,
|
|
9070
8286
|
dy: ".33em",
|
|
@@ -9089,12 +8305,12 @@ var PieChartInternal = ({
|
|
|
9089
8305
|
var PieChartWithProvider = (props) => {
|
|
9090
8306
|
const existingContext = useContext22(GlobalChartsContext);
|
|
9091
8307
|
if (existingContext) {
|
|
9092
|
-
return /* @__PURE__ */
|
|
8308
|
+
return /* @__PURE__ */ _jsx26(PieChartInternal, {
|
|
9093
8309
|
...props
|
|
9094
8310
|
});
|
|
9095
8311
|
}
|
|
9096
|
-
return /* @__PURE__ */
|
|
9097
|
-
children: /* @__PURE__ */
|
|
8312
|
+
return /* @__PURE__ */ _jsx26(GlobalChartsProvider, {
|
|
8313
|
+
children: /* @__PURE__ */ _jsx26(PieChartInternal, {
|
|
9098
8314
|
...props
|
|
9099
8315
|
})
|
|
9100
8316
|
});
|
|
@@ -9117,7 +8333,7 @@ import { Pie as Pie2 } from "@visx/shape";
|
|
|
9117
8333
|
import { Text as Text4 } from "@visx/text";
|
|
9118
8334
|
import { useTooltip as useTooltip3, useTooltipInPortal as useTooltipInPortal3 } from "@visx/tooltip";
|
|
9119
8335
|
import { __ as __8 } from "@wordpress/i18n";
|
|
9120
|
-
import
|
|
8336
|
+
import clsx10 from "clsx";
|
|
9121
8337
|
import { useCallback as useCallback13, useContext as useContext23, useMemo as useMemo24 } from "react";
|
|
9122
8338
|
|
|
9123
8339
|
// src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss
|
|
@@ -9130,11 +8346,11 @@ var pie_semi_circle_chart_module_default = {
|
|
|
9130
8346
|
};
|
|
9131
8347
|
|
|
9132
8348
|
// src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx
|
|
9133
|
-
import { jsx as
|
|
8349
|
+
import { jsx as _jsx27, Fragment as _Fragment8, jsxs as _jsxs12 } from "react/jsx-runtime";
|
|
9134
8350
|
var renderDefaultPieSemiCircleTooltip = ({
|
|
9135
8351
|
tooltipData
|
|
9136
8352
|
}) => {
|
|
9137
|
-
return /* @__PURE__ */
|
|
8353
|
+
return /* @__PURE__ */ _jsx27(BaseTooltip, {
|
|
9138
8354
|
data: tooltipData,
|
|
9139
8355
|
top: 0,
|
|
9140
8356
|
left: 0,
|
|
@@ -9246,11 +8462,11 @@ var PieSemiCircleChartInternal = ({
|
|
|
9246
8462
|
isSeriesVisible
|
|
9247
8463
|
});
|
|
9248
8464
|
const accessors = useMemo24(() => ({
|
|
9249
|
-
value: (
|
|
9250
|
-
sort: (
|
|
9251
|
-
fill: (
|
|
9252
|
-
data:
|
|
9253
|
-
index:
|
|
8465
|
+
value: (d) => d.value,
|
|
8466
|
+
sort: (a, b) => b.value - a.value,
|
|
8467
|
+
fill: (d) => getElementStyles({
|
|
8468
|
+
data: d,
|
|
8469
|
+
index: d.index
|
|
9254
8470
|
}).color
|
|
9255
8471
|
}), [getElementStyles]);
|
|
9256
8472
|
const legendOptions = useMemo24(() => ({
|
|
@@ -9280,12 +8496,12 @@ var PieSemiCircleChartInternal = ({
|
|
|
9280
8496
|
if (!isValid2) {
|
|
9281
8497
|
const errorWidth = propHeight ? Math.min(propWidth || propHeight * 2, propHeight * 2) : effectiveWidth;
|
|
9282
8498
|
const errorHeight = errorWidth / 2;
|
|
9283
|
-
return /* @__PURE__ */
|
|
8499
|
+
return /* @__PURE__ */ _jsx27("div", {
|
|
9284
8500
|
className: pie_semi_circle_chart_module_default["pie-semi-circle-chart"],
|
|
9285
|
-
children: /* @__PURE__ */
|
|
8501
|
+
children: /* @__PURE__ */ _jsx27("svg", {
|
|
9286
8502
|
width: errorWidth,
|
|
9287
8503
|
height: errorHeight,
|
|
9288
|
-
children: /* @__PURE__ */
|
|
8504
|
+
children: /* @__PURE__ */ _jsx27("text", {
|
|
9289
8505
|
x: "50%",
|
|
9290
8506
|
y: "50%",
|
|
9291
8507
|
textAnchor: "middle",
|
|
@@ -9295,16 +8511,16 @@ var PieSemiCircleChartInternal = ({
|
|
|
9295
8511
|
})
|
|
9296
8512
|
});
|
|
9297
8513
|
}
|
|
9298
|
-
const dataWithIndex = visibleData.map((
|
|
9299
|
-
const originalIndex = data.findIndex((item) => item.label ===
|
|
8514
|
+
const dataWithIndex = visibleData.map((d) => {
|
|
8515
|
+
const originalIndex = data.findIndex((item) => item.label === d.label);
|
|
9300
8516
|
return {
|
|
9301
|
-
...
|
|
8517
|
+
...d,
|
|
9302
8518
|
index: originalIndex >= 0 ? originalIndex : 0
|
|
9303
8519
|
};
|
|
9304
8520
|
});
|
|
9305
8521
|
const startAngle = clockwise ? -Math.PI / 2 : Math.PI / 2;
|
|
9306
8522
|
const endAngle = clockwise ? Math.PI / 2 : -Math.PI / 2;
|
|
9307
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
8523
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx27(Legend, {
|
|
9308
8524
|
orientation: legend.orientation ?? "horizontal",
|
|
9309
8525
|
position: legendPosition,
|
|
9310
8526
|
alignment: legend.alignment ?? "center",
|
|
@@ -9316,16 +8532,16 @@ var PieSemiCircleChartInternal = ({
|
|
|
9316
8532
|
chartId,
|
|
9317
8533
|
interactive: legendInteractive
|
|
9318
8534
|
});
|
|
9319
|
-
return /* @__PURE__ */
|
|
8535
|
+
return /* @__PURE__ */ _jsx27(SingleChartContext.Provider, {
|
|
9320
8536
|
value: {
|
|
9321
8537
|
chartId
|
|
9322
8538
|
},
|
|
9323
|
-
children: /* @__PURE__ */
|
|
8539
|
+
children: /* @__PURE__ */ _jsx27(ChartLayout, {
|
|
9324
8540
|
legendPosition,
|
|
9325
8541
|
legendElement,
|
|
9326
8542
|
legendChildren,
|
|
9327
8543
|
gap,
|
|
9328
|
-
className:
|
|
8544
|
+
className: clsx10("pie-semi-circle-chart", pie_semi_circle_chart_module_default["pie-semi-circle-chart"], {
|
|
9329
8545
|
[pie_semi_circle_chart_module_default["pie-semi-circle-chart--responsive"]]: !propWidth && !propHeight
|
|
9330
8546
|
}, className),
|
|
9331
8547
|
style: {
|
|
@@ -9333,10 +8549,10 @@ var PieSemiCircleChartInternal = ({
|
|
|
9333
8549
|
height: propHeight || void 0
|
|
9334
8550
|
},
|
|
9335
8551
|
trailingContent: /* @__PURE__ */ _jsxs12(_Fragment8, {
|
|
9336
|
-
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */
|
|
8552
|
+
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */ _jsx27(TooltipInPortal, {
|
|
9337
8553
|
top: tooltipTop || 0,
|
|
9338
8554
|
left: tooltipLeft || 0,
|
|
9339
|
-
children: /* @__PURE__ */
|
|
8555
|
+
children: /* @__PURE__ */ _jsx27("div", {
|
|
9340
8556
|
role: "tooltip",
|
|
9341
8557
|
children: renderTooltip({
|
|
9342
8558
|
tooltipData
|
|
@@ -9354,7 +8570,7 @@ var PieSemiCircleChartInternal = ({
|
|
|
9354
8570
|
const height = width / 2;
|
|
9355
8571
|
const radius = height;
|
|
9356
8572
|
const innerRadius = radius * (1 - thickness);
|
|
9357
|
-
return /* @__PURE__ */
|
|
8573
|
+
return /* @__PURE__ */ _jsx27(Stack, {
|
|
9358
8574
|
ref: containerRef,
|
|
9359
8575
|
align: "center",
|
|
9360
8576
|
justify: "center",
|
|
@@ -9363,26 +8579,26 @@ var PieSemiCircleChartInternal = ({
|
|
|
9363
8579
|
width,
|
|
9364
8580
|
height,
|
|
9365
8581
|
viewBox: `0 0 ${width} ${height}`,
|
|
9366
|
-
children: [/* @__PURE__ */
|
|
9367
|
-
children: /* @__PURE__ */
|
|
8582
|
+
children: [/* @__PURE__ */ _jsx27("defs", {
|
|
8583
|
+
children: /* @__PURE__ */ _jsx27(radial_wipe_animation_default, {
|
|
9368
8584
|
id: `radial-wipe-${chartId}`,
|
|
9369
8585
|
radius,
|
|
9370
8586
|
innerRadius,
|
|
9371
8587
|
startAngle: "-180deg",
|
|
9372
8588
|
wipePercentage: 50
|
|
9373
8589
|
})
|
|
9374
|
-
}), /* @__PURE__ */
|
|
8590
|
+
}), /* @__PURE__ */ _jsx27(Group5, {
|
|
9375
8591
|
top: height,
|
|
9376
8592
|
left: width / 2,
|
|
9377
8593
|
mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,
|
|
9378
|
-
children: allSegmentsHidden ? /* @__PURE__ */
|
|
8594
|
+
children: allSegmentsHidden ? /* @__PURE__ */ _jsx27(SvgEmptyState, {
|
|
9379
8595
|
x: 0,
|
|
9380
8596
|
y: -radius / 2,
|
|
9381
8597
|
width,
|
|
9382
8598
|
height,
|
|
9383
8599
|
children: __8("All segments are hidden. Click legend items to show data.", "jetpack-charts")
|
|
9384
8600
|
}) : /* @__PURE__ */ _jsxs12(_Fragment8, {
|
|
9385
|
-
children: [/* @__PURE__ */
|
|
8601
|
+
children: [/* @__PURE__ */ _jsx27(Pie2, {
|
|
9386
8602
|
data: dataWithIndex,
|
|
9387
8603
|
pieValue: accessors.value,
|
|
9388
8604
|
outerRadius: radius,
|
|
@@ -9393,23 +8609,23 @@ var PieSemiCircleChartInternal = ({
|
|
|
9393
8609
|
endAngle,
|
|
9394
8610
|
pieSort: accessors.sort,
|
|
9395
8611
|
children: (pie) => {
|
|
9396
|
-
return pie.arcs.map((arc) => /* @__PURE__ */
|
|
8612
|
+
return pie.arcs.map((arc) => /* @__PURE__ */ _jsx27("g", {
|
|
9397
8613
|
onMouseMove: withTooltips ? handleArcMouseMove(arc) : void 0,
|
|
9398
8614
|
onMouseLeave: withTooltips ? handleMouseLeave : void 0,
|
|
9399
|
-
children: /* @__PURE__ */
|
|
8615
|
+
children: /* @__PURE__ */ _jsx27("path", {
|
|
9400
8616
|
d: pie.path(arc) || "",
|
|
9401
8617
|
fill: accessors.fill(arc.data)
|
|
9402
8618
|
})
|
|
9403
8619
|
}, arc.data.label));
|
|
9404
8620
|
}
|
|
9405
8621
|
}), /* @__PURE__ */ _jsxs12(Group5, {
|
|
9406
|
-
children: [/* @__PURE__ */
|
|
8622
|
+
children: [/* @__PURE__ */ _jsx27(Text4, {
|
|
9407
8623
|
textAnchor: "middle",
|
|
9408
8624
|
verticalAnchor: "start",
|
|
9409
8625
|
y: -40,
|
|
9410
8626
|
className: pie_semi_circle_chart_module_default.label,
|
|
9411
8627
|
children: label
|
|
9412
|
-
}), /* @__PURE__ */
|
|
8628
|
+
}), /* @__PURE__ */ _jsx27(Text4, {
|
|
9413
8629
|
textAnchor: "middle",
|
|
9414
8630
|
verticalAnchor: "start",
|
|
9415
8631
|
y: -20,
|
|
@@ -9428,12 +8644,12 @@ var PieSemiCircleChartInternal = ({
|
|
|
9428
8644
|
var PieSemiCircleChartWithProvider = (props) => {
|
|
9429
8645
|
const existingContext = useContext23(GlobalChartsContext);
|
|
9430
8646
|
if (existingContext) {
|
|
9431
|
-
return /* @__PURE__ */
|
|
8647
|
+
return /* @__PURE__ */ _jsx27(PieSemiCircleChartInternal, {
|
|
9432
8648
|
...props
|
|
9433
8649
|
});
|
|
9434
8650
|
}
|
|
9435
|
-
return /* @__PURE__ */
|
|
9436
|
-
children: /* @__PURE__ */
|
|
8651
|
+
return /* @__PURE__ */ _jsx27(GlobalChartsProvider, {
|
|
8652
|
+
children: /* @__PURE__ */ _jsx27(PieSemiCircleChartInternal, {
|
|
9437
8653
|
...props
|
|
9438
8654
|
})
|
|
9439
8655
|
});
|
|
@@ -9451,7 +8667,7 @@ var PieSemiCircleChartResponsive = attachSubComponents(withResponsive(PieSemiCir
|
|
|
9451
8667
|
});
|
|
9452
8668
|
|
|
9453
8669
|
// src/charts/sparkline/sparkline.tsx
|
|
9454
|
-
import
|
|
8670
|
+
import clsx11 from "clsx";
|
|
9455
8671
|
import { useMemo as useMemo25, forwardRef as forwardRef7 } from "react";
|
|
9456
8672
|
|
|
9457
8673
|
// src/charts/sparkline/sparkline.module.scss
|
|
@@ -9461,7 +8677,7 @@ var sparkline_module_default = {
|
|
|
9461
8677
|
};
|
|
9462
8678
|
|
|
9463
8679
|
// src/charts/sparkline/sparkline.tsx
|
|
9464
|
-
import { jsx as
|
|
8680
|
+
import { jsx as _jsx28 } from "react/jsx-runtime";
|
|
9465
8681
|
var DEFAULT_WIDTH2 = 100;
|
|
9466
8682
|
var DEFAULT_HEIGHT = 40;
|
|
9467
8683
|
var transformToSeriesData = (data, color, strokeWidth) => {
|
|
@@ -9534,9 +8750,9 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9534
8750
|
}));
|
|
9535
8751
|
}, [seriesData, gradient, color]);
|
|
9536
8752
|
if (!data || data.length === 0) {
|
|
9537
|
-
return /* @__PURE__ */
|
|
8753
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9538
8754
|
ref,
|
|
9539
|
-
className:
|
|
8755
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, sparkline_module_default["sparkline--empty"], className),
|
|
9540
8756
|
style: {
|
|
9541
8757
|
width,
|
|
9542
8758
|
height
|
|
@@ -9547,18 +8763,18 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9547
8763
|
const cx2 = width / 2;
|
|
9548
8764
|
const cy = height / 2;
|
|
9549
8765
|
const resolvedColor = color || "#000000";
|
|
9550
|
-
return /* @__PURE__ */
|
|
8766
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9551
8767
|
ref,
|
|
9552
|
-
className:
|
|
8768
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, sparkline_module_default["sparkline--single-point"], className),
|
|
9553
8769
|
style: {
|
|
9554
8770
|
width,
|
|
9555
8771
|
height
|
|
9556
8772
|
},
|
|
9557
|
-
children: /* @__PURE__ */
|
|
8773
|
+
children: /* @__PURE__ */ _jsx28("svg", {
|
|
9558
8774
|
width,
|
|
9559
8775
|
height,
|
|
9560
8776
|
"aria-hidden": "true",
|
|
9561
|
-
children: /* @__PURE__ */
|
|
8777
|
+
children: /* @__PURE__ */ _jsx28("circle", {
|
|
9562
8778
|
cx: cx2,
|
|
9563
8779
|
cy,
|
|
9564
8780
|
r: strokeWidth * 1.5,
|
|
@@ -9567,10 +8783,10 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9567
8783
|
})
|
|
9568
8784
|
});
|
|
9569
8785
|
}
|
|
9570
|
-
return /* @__PURE__ */
|
|
8786
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9571
8787
|
ref,
|
|
9572
|
-
className:
|
|
9573
|
-
children: /* @__PURE__ */
|
|
8788
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, className),
|
|
8789
|
+
children: /* @__PURE__ */ _jsx28(LineChart, {
|
|
9574
8790
|
data: seriesWithGradient,
|
|
9575
8791
|
width,
|
|
9576
8792
|
height,
|
|
@@ -9601,7 +8817,7 @@ SparklineUnresponsive.displayName = "SparklineUnresponsive";
|
|
|
9601
8817
|
var Sparkline = withResponsive(SparklineUnresponsive);
|
|
9602
8818
|
|
|
9603
8819
|
// src/components/trend-indicator/trend-indicator.tsx
|
|
9604
|
-
import
|
|
8820
|
+
import clsx12 from "clsx";
|
|
9605
8821
|
|
|
9606
8822
|
// src/components/trend-indicator/trend-indicator.module.scss
|
|
9607
8823
|
var trend_indicator_module_default = {
|
|
@@ -9614,25 +8830,25 @@ var trend_indicator_module_default = {
|
|
|
9614
8830
|
};
|
|
9615
8831
|
|
|
9616
8832
|
// src/components/trend-indicator/trend-indicator.tsx
|
|
9617
|
-
import { jsx as
|
|
8833
|
+
import { jsx as _jsx29, jsxs as _jsxs13 } from "react/jsx-runtime";
|
|
9618
8834
|
var DIRECTION_LABELS = {
|
|
9619
8835
|
up: "Increase",
|
|
9620
8836
|
down: "Decrease",
|
|
9621
8837
|
neutral: "No change"
|
|
9622
8838
|
};
|
|
9623
|
-
var
|
|
8839
|
+
var Icon2 = ({
|
|
9624
8840
|
direction
|
|
9625
8841
|
}) => {
|
|
9626
8842
|
if (direction === "neutral") {
|
|
9627
8843
|
return null;
|
|
9628
8844
|
}
|
|
9629
8845
|
const isUp = direction === "up";
|
|
9630
|
-
return /* @__PURE__ */
|
|
8846
|
+
return /* @__PURE__ */ _jsx29("svg", {
|
|
9631
8847
|
className: trend_indicator_module_default["trend-indicator__icon"],
|
|
9632
8848
|
viewBox: "0 0 16 16",
|
|
9633
8849
|
fill: "none",
|
|
9634
8850
|
"aria-hidden": "true",
|
|
9635
|
-
children: /* @__PURE__ */
|
|
8851
|
+
children: /* @__PURE__ */ _jsx29("path", {
|
|
9636
8852
|
d: isUp ? "M8 13V3M4 7l4-4 4 4" : "M8 3v10M4 9l4 4 4-4",
|
|
9637
8853
|
stroke: "currentColor",
|
|
9638
8854
|
strokeWidth: "1.5",
|
|
@@ -9650,12 +8866,12 @@ function TrendIndicator({
|
|
|
9650
8866
|
}) {
|
|
9651
8867
|
const ariaLabel = `${DIRECTION_LABELS[direction]}: ${value}`;
|
|
9652
8868
|
return /* @__PURE__ */ _jsxs13("span", {
|
|
9653
|
-
className:
|
|
8869
|
+
className: clsx12(trend_indicator_module_default["trend-indicator"], trend_indicator_module_default[`trend-indicator--${direction}`], className),
|
|
9654
8870
|
style,
|
|
9655
8871
|
"aria-label": ariaLabel,
|
|
9656
|
-
children: [showIcon && /* @__PURE__ */
|
|
8872
|
+
children: [showIcon && /* @__PURE__ */ _jsx29(Icon2, {
|
|
9657
8873
|
direction
|
|
9658
|
-
}), /* @__PURE__ */
|
|
8874
|
+
}), /* @__PURE__ */ _jsx29("span", {
|
|
9659
8875
|
className: trend_indicator_module_default["trend-indicator__value"],
|
|
9660
8876
|
children: value
|
|
9661
8877
|
})]
|