@oxide/design-system 1.7.7--canary.c74e439.0 → 1.7.7--canary.5c25e1b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/components/dist/index.d.ts +0 -3
  2. package/components/dist/index.js +145 -1804
  3. package/components/dist/index.js.map +1 -1
  4. package/package.json +1 -2
  5. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js +0 -14
  6. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js.map +0 -1
  7. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js +0 -8846
  8. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js.map +0 -1
  9. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js +0 -3721
  10. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js.map +0 -1
  11. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js +0 -2599
  12. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js.map +0 -1
  13. package/components/dist/chunk-2DDKDUUO.js +0 -439
  14. package/components/dist/chunk-2DDKDUUO.js.map +0 -1
  15. package/components/dist/chunk-2NHDMTP7.js +0 -26905
  16. package/components/dist/chunk-2NHDMTP7.js.map +0 -1
  17. package/components/dist/chunk-4IJS44L3.js +0 -22
  18. package/components/dist/chunk-4IJS44L3.js.map +0 -1
  19. package/components/dist/chunk-562WOS3Z.js +0 -1109
  20. package/components/dist/chunk-562WOS3Z.js.map +0 -1
  21. package/components/dist/chunk-6UD2HOKB.js +0 -17082
  22. package/components/dist/chunk-6UD2HOKB.js.map +0 -1
  23. package/components/dist/chunk-76BOQ7BT.js +0 -63
  24. package/components/dist/chunk-76BOQ7BT.js.map +0 -1
  25. package/components/dist/chunk-7I5DT373.js +0 -97
  26. package/components/dist/chunk-7I5DT373.js.map +0 -1
  27. package/components/dist/chunk-BPREMNVP.js +0 -1875
  28. package/components/dist/chunk-BPREMNVP.js.map +0 -1
  29. package/components/dist/chunk-BVYAEHG3.js +0 -122
  30. package/components/dist/chunk-BVYAEHG3.js.map +0 -1
  31. package/components/dist/chunk-BW7DFBOS.js +0 -152
  32. package/components/dist/chunk-BW7DFBOS.js.map +0 -1
  33. package/components/dist/chunk-EZG2MNHW.js +0 -59
  34. package/components/dist/chunk-EZG2MNHW.js.map +0 -1
  35. package/components/dist/chunk-G6QWNAHJ.js +0 -43
  36. package/components/dist/chunk-G6QWNAHJ.js.map +0 -1
  37. package/components/dist/chunk-H72D3HRR.js +0 -1244
  38. package/components/dist/chunk-H72D3HRR.js.map +0 -1
  39. package/components/dist/chunk-K532NZMW.js +0 -46
  40. package/components/dist/chunk-K532NZMW.js.map +0 -1
  41. package/components/dist/chunk-LC3BX2KL.js +0 -25
  42. package/components/dist/chunk-LC3BX2KL.js.map +0 -1
  43. package/components/dist/chunk-LQ2ABR7F.js +0 -5665
  44. package/components/dist/chunk-LQ2ABR7F.js.map +0 -1
  45. package/components/dist/chunk-M6L3MM6K.js +0 -22
  46. package/components/dist/chunk-M6L3MM6K.js.map +0 -1
  47. package/components/dist/chunk-MWA4PRRW.js +0 -122
  48. package/components/dist/chunk-MWA4PRRW.js.map +0 -1
  49. package/components/dist/chunk-ND3FLKHU.js +0 -570
  50. package/components/dist/chunk-ND3FLKHU.js.map +0 -1
  51. package/components/dist/chunk-NIVHLOPB.js +0 -2621
  52. package/components/dist/chunk-NIVHLOPB.js.map +0 -1
  53. package/components/dist/chunk-R6F6FFK7.js +0 -65
  54. package/components/dist/chunk-R6F6FFK7.js.map +0 -1
  55. package/components/dist/chunk-RN5R3L7O.js +0 -2041
  56. package/components/dist/chunk-RN5R3L7O.js.map +0 -1
  57. package/components/dist/chunk-RWDBBMDN.js +0 -10910
  58. package/components/dist/chunk-RWDBBMDN.js.map +0 -1
  59. package/components/dist/chunk-T7HPDS4Z.js +0 -573
  60. package/components/dist/chunk-T7HPDS4Z.js.map +0 -1
  61. package/components/dist/chunk-TG4YEU4Q.js +0 -23
  62. package/components/dist/chunk-TG4YEU4Q.js.map +0 -1
  63. package/components/dist/chunk-U5WCXBW2.js +0 -48
  64. package/components/dist/chunk-U5WCXBW2.js.map +0 -1
  65. package/components/dist/chunk-V6PWN6OH.js +0 -1875
  66. package/components/dist/chunk-V6PWN6OH.js.map +0 -1
  67. package/components/dist/chunk-VLTHNCSD.js +0 -48
  68. package/components/dist/chunk-VLTHNCSD.js.map +0 -1
  69. package/components/dist/chunk-WDK4G4UR.js +0 -2791
  70. package/components/dist/chunk-WDK4G4UR.js.map +0 -1
  71. package/components/dist/chunk-WLVQWTC6.js +0 -77
  72. package/components/dist/chunk-WLVQWTC6.js.map +0 -1
  73. package/components/dist/chunk-YDLS5R4M.js +0 -48
  74. package/components/dist/chunk-YDLS5R4M.js.map +0 -1
  75. package/components/dist/chunk-YGFBWU2Q.js +0 -7
  76. package/components/dist/chunk-YGFBWU2Q.js.map +0 -1
  77. package/components/dist/chunk-ZBL4CWCH.js +0 -2120
  78. package/components/dist/chunk-ZBL4CWCH.js.map +0 -1
  79. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js +0 -40
  80. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js.map +0 -1
  81. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js +0 -40
  82. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js.map +0 -1
  83. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js +0 -734
  84. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js.map +0 -1
  85. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js +0 -226
  86. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js.map +0 -1
  87. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js +0 -1381
  88. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js.map +0 -1
  89. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js +0 -2349
  90. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js.map +0 -1
  91. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js +0 -2413
  92. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js.map +0 -1
  93. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js +0 -14
  94. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js.map +0 -1
  95. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js +0 -1763
  96. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js.map +0 -1
  97. package/components/dist/info-46DW6VJ7-43TTIEYF.js +0 -14
  98. package/components/dist/info-46DW6VJ7-43TTIEYF.js.map +0 -1
  99. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js +0 -54
  100. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js.map +0 -1
  101. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js +0 -1244
  102. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js.map +0 -1
  103. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js +0 -1119
  104. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js.map +0 -1
  105. package/components/dist/katex-WNZY3CE5.js +0 -14484
  106. package/components/dist/katex-WNZY3CE5.js.map +0 -1
  107. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js +0 -6013
  108. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js.map +0 -1
  109. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js +0 -14
  110. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js.map +0 -1
  111. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js +0 -14
  112. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js.map +0 -1
  113. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js +0 -223
  114. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js.map +0 -1
  115. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js +0 -1408
  116. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js.map +0 -1
  117. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js +0 -1175
  118. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js.map +0 -1
  119. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js +0 -1278
  120. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js.map +0 -1
  121. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js +0 -3529
  122. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js.map +0 -1
  123. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js +0 -505
  124. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js.map +0 -1
  125. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js +0 -40
  126. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js.map +0 -1
  127. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js +0 -1260
  128. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js.map +0 -1
  129. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js +0 -1877
  130. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js.map +0 -1
@@ -1,1244 +0,0 @@
1
- import {
2
- __name,
3
- log
4
- } from "./chunk-RWDBBMDN.js";
5
- import {
6
- __commonJS,
7
- __require,
8
- __toESM
9
- } from "./chunk-K532NZMW.js";
10
-
11
- // node_modules/ms/index.js
12
- var require_ms = __commonJS({
13
- "node_modules/ms/index.js"(exports, module) {
14
- "use strict";
15
- var s = 1e3;
16
- var m = s * 60;
17
- var h = m * 60;
18
- var d = h * 24;
19
- var w = d * 7;
20
- var y = d * 365.25;
21
- module.exports = function(val, options) {
22
- options = options || {};
23
- var type = typeof val;
24
- if (type === "string" && val.length > 0) {
25
- return parse(val);
26
- } else if (type === "number" && isFinite(val)) {
27
- return options.long ? fmtLong(val) : fmtShort(val);
28
- }
29
- throw new Error(
30
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
31
- );
32
- };
33
- function parse(str) {
34
- str = String(str);
35
- if (str.length > 100) {
36
- return;
37
- }
38
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
39
- str
40
- );
41
- if (!match) {
42
- return;
43
- }
44
- var n = parseFloat(match[1]);
45
- var type = (match[2] || "ms").toLowerCase();
46
- switch (type) {
47
- case "years":
48
- case "year":
49
- case "yrs":
50
- case "yr":
51
- case "y":
52
- return n * y;
53
- case "weeks":
54
- case "week":
55
- case "w":
56
- return n * w;
57
- case "days":
58
- case "day":
59
- case "d":
60
- return n * d;
61
- case "hours":
62
- case "hour":
63
- case "hrs":
64
- case "hr":
65
- case "h":
66
- return n * h;
67
- case "minutes":
68
- case "minute":
69
- case "mins":
70
- case "min":
71
- case "m":
72
- return n * m;
73
- case "seconds":
74
- case "second":
75
- case "secs":
76
- case "sec":
77
- case "s":
78
- return n * s;
79
- case "milliseconds":
80
- case "millisecond":
81
- case "msecs":
82
- case "msec":
83
- case "ms":
84
- return n;
85
- default:
86
- return void 0;
87
- }
88
- }
89
- function fmtShort(ms) {
90
- var msAbs = Math.abs(ms);
91
- if (msAbs >= d) {
92
- return Math.round(ms / d) + "d";
93
- }
94
- if (msAbs >= h) {
95
- return Math.round(ms / h) + "h";
96
- }
97
- if (msAbs >= m) {
98
- return Math.round(ms / m) + "m";
99
- }
100
- if (msAbs >= s) {
101
- return Math.round(ms / s) + "s";
102
- }
103
- return ms + "ms";
104
- }
105
- function fmtLong(ms) {
106
- var msAbs = Math.abs(ms);
107
- if (msAbs >= d) {
108
- return plural(ms, msAbs, d, "day");
109
- }
110
- if (msAbs >= h) {
111
- return plural(ms, msAbs, h, "hour");
112
- }
113
- if (msAbs >= m) {
114
- return plural(ms, msAbs, m, "minute");
115
- }
116
- if (msAbs >= s) {
117
- return plural(ms, msAbs, s, "second");
118
- }
119
- return ms + " ms";
120
- }
121
- function plural(ms, msAbs, n, name) {
122
- var isPlural = msAbs >= n * 1.5;
123
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
124
- }
125
- }
126
- });
127
-
128
- // node_modules/debug/src/common.js
129
- var require_common = __commonJS({
130
- "node_modules/debug/src/common.js"(exports, module) {
131
- "use strict";
132
- function setup(env) {
133
- createDebug.debug = createDebug;
134
- createDebug.default = createDebug;
135
- createDebug.coerce = coerce;
136
- createDebug.disable = disable;
137
- createDebug.enable = enable;
138
- createDebug.enabled = enabled;
139
- createDebug.humanize = require_ms();
140
- createDebug.destroy = destroy;
141
- Object.keys(env).forEach((key) => {
142
- createDebug[key] = env[key];
143
- });
144
- createDebug.names = [];
145
- createDebug.skips = [];
146
- createDebug.formatters = {};
147
- function selectColor(namespace) {
148
- let hash = 0;
149
- for (let i = 0; i < namespace.length; i++) {
150
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
151
- hash |= 0;
152
- }
153
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
154
- }
155
- createDebug.selectColor = selectColor;
156
- function createDebug(namespace) {
157
- let prevTime;
158
- let enableOverride = null;
159
- let namespacesCache;
160
- let enabledCache;
161
- function debug(...args) {
162
- if (!debug.enabled) {
163
- return;
164
- }
165
- const self = debug;
166
- const curr = Number(/* @__PURE__ */ new Date());
167
- const ms = curr - (prevTime || curr);
168
- self.diff = ms;
169
- self.prev = prevTime;
170
- self.curr = curr;
171
- prevTime = curr;
172
- args[0] = createDebug.coerce(args[0]);
173
- if (typeof args[0] !== "string") {
174
- args.unshift("%O");
175
- }
176
- let index = 0;
177
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
178
- if (match === "%%") {
179
- return "%";
180
- }
181
- index++;
182
- const formatter = createDebug.formatters[format];
183
- if (typeof formatter === "function") {
184
- const val = args[index];
185
- match = formatter.call(self, val);
186
- args.splice(index, 1);
187
- index--;
188
- }
189
- return match;
190
- });
191
- createDebug.formatArgs.call(self, args);
192
- const logFn = self.log || createDebug.log;
193
- logFn.apply(self, args);
194
- }
195
- debug.namespace = namespace;
196
- debug.useColors = createDebug.useColors();
197
- debug.color = createDebug.selectColor(namespace);
198
- debug.extend = extend;
199
- debug.destroy = createDebug.destroy;
200
- Object.defineProperty(debug, "enabled", {
201
- enumerable: true,
202
- configurable: false,
203
- get: () => {
204
- if (enableOverride !== null) {
205
- return enableOverride;
206
- }
207
- if (namespacesCache !== createDebug.namespaces) {
208
- namespacesCache = createDebug.namespaces;
209
- enabledCache = createDebug.enabled(namespace);
210
- }
211
- return enabledCache;
212
- },
213
- set: (v) => {
214
- enableOverride = v;
215
- }
216
- });
217
- if (typeof createDebug.init === "function") {
218
- createDebug.init(debug);
219
- }
220
- return debug;
221
- }
222
- function extend(namespace, delimiter) {
223
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
224
- newDebug.log = this.log;
225
- return newDebug;
226
- }
227
- function enable(namespaces) {
228
- createDebug.save(namespaces);
229
- createDebug.namespaces = namespaces;
230
- createDebug.names = [];
231
- createDebug.skips = [];
232
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
233
- for (const ns of split) {
234
- if (ns[0] === "-") {
235
- createDebug.skips.push(ns.slice(1));
236
- } else {
237
- createDebug.names.push(ns);
238
- }
239
- }
240
- }
241
- function matchesTemplate(search, template) {
242
- let searchIndex = 0;
243
- let templateIndex = 0;
244
- let starIndex = -1;
245
- let matchIndex = 0;
246
- while (searchIndex < search.length) {
247
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
248
- if (template[templateIndex] === "*") {
249
- starIndex = templateIndex;
250
- matchIndex = searchIndex;
251
- templateIndex++;
252
- } else {
253
- searchIndex++;
254
- templateIndex++;
255
- }
256
- } else if (starIndex !== -1) {
257
- templateIndex = starIndex + 1;
258
- matchIndex++;
259
- searchIndex = matchIndex;
260
- } else {
261
- return false;
262
- }
263
- }
264
- while (templateIndex < template.length && template[templateIndex] === "*") {
265
- templateIndex++;
266
- }
267
- return templateIndex === template.length;
268
- }
269
- function disable() {
270
- const namespaces = [
271
- ...createDebug.names,
272
- ...createDebug.skips.map((namespace) => "-" + namespace)
273
- ].join(",");
274
- createDebug.enable("");
275
- return namespaces;
276
- }
277
- function enabled(name) {
278
- for (const skip of createDebug.skips) {
279
- if (matchesTemplate(name, skip)) {
280
- return false;
281
- }
282
- }
283
- for (const ns of createDebug.names) {
284
- if (matchesTemplate(name, ns)) {
285
- return true;
286
- }
287
- }
288
- return false;
289
- }
290
- function coerce(val) {
291
- if (val instanceof Error) {
292
- return val.stack || val.message;
293
- }
294
- return val;
295
- }
296
- function destroy() {
297
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
298
- }
299
- createDebug.enable(createDebug.load());
300
- return createDebug;
301
- }
302
- module.exports = setup;
303
- }
304
- });
305
-
306
- // node_modules/debug/src/browser.js
307
- var require_browser = __commonJS({
308
- "node_modules/debug/src/browser.js"(exports, module) {
309
- "use strict";
310
- exports.formatArgs = formatArgs;
311
- exports.save = save;
312
- exports.load = load;
313
- exports.useColors = useColors;
314
- exports.storage = localstorage();
315
- exports.destroy = (() => {
316
- let warned = false;
317
- return () => {
318
- if (!warned) {
319
- warned = true;
320
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
321
- }
322
- };
323
- })();
324
- exports.colors = [
325
- "#0000CC",
326
- "#0000FF",
327
- "#0033CC",
328
- "#0033FF",
329
- "#0066CC",
330
- "#0066FF",
331
- "#0099CC",
332
- "#0099FF",
333
- "#00CC00",
334
- "#00CC33",
335
- "#00CC66",
336
- "#00CC99",
337
- "#00CCCC",
338
- "#00CCFF",
339
- "#3300CC",
340
- "#3300FF",
341
- "#3333CC",
342
- "#3333FF",
343
- "#3366CC",
344
- "#3366FF",
345
- "#3399CC",
346
- "#3399FF",
347
- "#33CC00",
348
- "#33CC33",
349
- "#33CC66",
350
- "#33CC99",
351
- "#33CCCC",
352
- "#33CCFF",
353
- "#6600CC",
354
- "#6600FF",
355
- "#6633CC",
356
- "#6633FF",
357
- "#66CC00",
358
- "#66CC33",
359
- "#9900CC",
360
- "#9900FF",
361
- "#9933CC",
362
- "#9933FF",
363
- "#99CC00",
364
- "#99CC33",
365
- "#CC0000",
366
- "#CC0033",
367
- "#CC0066",
368
- "#CC0099",
369
- "#CC00CC",
370
- "#CC00FF",
371
- "#CC3300",
372
- "#CC3333",
373
- "#CC3366",
374
- "#CC3399",
375
- "#CC33CC",
376
- "#CC33FF",
377
- "#CC6600",
378
- "#CC6633",
379
- "#CC9900",
380
- "#CC9933",
381
- "#CCCC00",
382
- "#CCCC33",
383
- "#FF0000",
384
- "#FF0033",
385
- "#FF0066",
386
- "#FF0099",
387
- "#FF00CC",
388
- "#FF00FF",
389
- "#FF3300",
390
- "#FF3333",
391
- "#FF3366",
392
- "#FF3399",
393
- "#FF33CC",
394
- "#FF33FF",
395
- "#FF6600",
396
- "#FF6633",
397
- "#FF9900",
398
- "#FF9933",
399
- "#FFCC00",
400
- "#FFCC33"
401
- ];
402
- function useColors() {
403
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
404
- return true;
405
- }
406
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
407
- return false;
408
- }
409
- let m;
410
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
411
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
412
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
413
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
414
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
415
- }
416
- function formatArgs(args) {
417
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
418
- if (!this.useColors) {
419
- return;
420
- }
421
- const c = "color: " + this.color;
422
- args.splice(1, 0, c, "color: inherit");
423
- let index = 0;
424
- let lastC = 0;
425
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
426
- if (match === "%%") {
427
- return;
428
- }
429
- index++;
430
- if (match === "%c") {
431
- lastC = index;
432
- }
433
- });
434
- args.splice(lastC, 0, c);
435
- }
436
- exports.log = console.debug || console.log || (() => {
437
- });
438
- function save(namespaces) {
439
- try {
440
- if (namespaces) {
441
- exports.storage.setItem("debug", namespaces);
442
- } else {
443
- exports.storage.removeItem("debug");
444
- }
445
- } catch (error) {
446
- }
447
- }
448
- function load() {
449
- let r;
450
- try {
451
- r = exports.storage.getItem("debug");
452
- } catch (error) {
453
- }
454
- if (!r && typeof process !== "undefined" && "env" in process) {
455
- r = process.env.DEBUG;
456
- }
457
- return r;
458
- }
459
- function localstorage() {
460
- try {
461
- return localStorage;
462
- } catch (error) {
463
- }
464
- }
465
- module.exports = require_common()(exports);
466
- var { formatters } = module.exports;
467
- formatters.j = function(v) {
468
- try {
469
- return JSON.stringify(v);
470
- } catch (error) {
471
- return "[UnexpectedJSONParseError]: " + error.message;
472
- }
473
- };
474
- }
475
- });
476
-
477
- // node_modules/has-flag/index.js
478
- var require_has_flag = __commonJS({
479
- "node_modules/has-flag/index.js"(exports, module) {
480
- "use strict";
481
- module.exports = (flag, argv = process.argv) => {
482
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
483
- const position = argv.indexOf(prefix + flag);
484
- const terminatorPosition = argv.indexOf("--");
485
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
486
- };
487
- }
488
- });
489
-
490
- // node_modules/supports-color/index.js
491
- var require_supports_color = __commonJS({
492
- "node_modules/supports-color/index.js"(exports, module) {
493
- "use strict";
494
- var os = __require("os");
495
- var tty = __require("tty");
496
- var hasFlag = require_has_flag();
497
- var { env } = process;
498
- var forceColor;
499
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
500
- forceColor = 0;
501
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
502
- forceColor = 1;
503
- }
504
- if ("FORCE_COLOR" in env) {
505
- if (env.FORCE_COLOR === "true") {
506
- forceColor = 1;
507
- } else if (env.FORCE_COLOR === "false") {
508
- forceColor = 0;
509
- } else {
510
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
511
- }
512
- }
513
- function translateLevel(level) {
514
- if (level === 0) {
515
- return false;
516
- }
517
- return {
518
- level,
519
- hasBasic: true,
520
- has256: level >= 2,
521
- has16m: level >= 3
522
- };
523
- }
524
- function supportsColor(haveStream, streamIsTTY) {
525
- if (forceColor === 0) {
526
- return 0;
527
- }
528
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
529
- return 3;
530
- }
531
- if (hasFlag("color=256")) {
532
- return 2;
533
- }
534
- if (haveStream && !streamIsTTY && forceColor === void 0) {
535
- return 0;
536
- }
537
- const min = forceColor || 0;
538
- if (env.TERM === "dumb") {
539
- return min;
540
- }
541
- if (process.platform === "win32") {
542
- const osRelease = os.release().split(".");
543
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
544
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
545
- }
546
- return 1;
547
- }
548
- if ("CI" in env) {
549
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
550
- return 1;
551
- }
552
- return min;
553
- }
554
- if ("TEAMCITY_VERSION" in env) {
555
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
556
- }
557
- if (env.COLORTERM === "truecolor") {
558
- return 3;
559
- }
560
- if ("TERM_PROGRAM" in env) {
561
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
562
- switch (env.TERM_PROGRAM) {
563
- case "iTerm.app":
564
- return version >= 3 ? 3 : 2;
565
- case "Apple_Terminal":
566
- return 2;
567
- }
568
- }
569
- if (/-256(color)?$/i.test(env.TERM)) {
570
- return 2;
571
- }
572
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
573
- return 1;
574
- }
575
- if ("COLORTERM" in env) {
576
- return 1;
577
- }
578
- return min;
579
- }
580
- function getSupportLevel(stream) {
581
- const level = supportsColor(stream, stream && stream.isTTY);
582
- return translateLevel(level);
583
- }
584
- module.exports = {
585
- supportsColor: getSupportLevel,
586
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
587
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
588
- };
589
- }
590
- });
591
-
592
- // node_modules/debug/src/node.js
593
- var require_node = __commonJS({
594
- "node_modules/debug/src/node.js"(exports, module) {
595
- "use strict";
596
- var tty = __require("tty");
597
- var util = __require("util");
598
- exports.init = init;
599
- exports.log = log2;
600
- exports.formatArgs = formatArgs;
601
- exports.save = save;
602
- exports.load = load;
603
- exports.useColors = useColors;
604
- exports.destroy = util.deprecate(
605
- () => {
606
- },
607
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
608
- );
609
- exports.colors = [6, 2, 3, 4, 5, 1];
610
- try {
611
- const supportsColor = require_supports_color();
612
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
613
- exports.colors = [
614
- 20,
615
- 21,
616
- 26,
617
- 27,
618
- 32,
619
- 33,
620
- 38,
621
- 39,
622
- 40,
623
- 41,
624
- 42,
625
- 43,
626
- 44,
627
- 45,
628
- 56,
629
- 57,
630
- 62,
631
- 63,
632
- 68,
633
- 69,
634
- 74,
635
- 75,
636
- 76,
637
- 77,
638
- 78,
639
- 79,
640
- 80,
641
- 81,
642
- 92,
643
- 93,
644
- 98,
645
- 99,
646
- 112,
647
- 113,
648
- 128,
649
- 129,
650
- 134,
651
- 135,
652
- 148,
653
- 149,
654
- 160,
655
- 161,
656
- 162,
657
- 163,
658
- 164,
659
- 165,
660
- 166,
661
- 167,
662
- 168,
663
- 169,
664
- 170,
665
- 171,
666
- 172,
667
- 173,
668
- 178,
669
- 179,
670
- 184,
671
- 185,
672
- 196,
673
- 197,
674
- 198,
675
- 199,
676
- 200,
677
- 201,
678
- 202,
679
- 203,
680
- 204,
681
- 205,
682
- 206,
683
- 207,
684
- 208,
685
- 209,
686
- 214,
687
- 215,
688
- 220,
689
- 221
690
- ];
691
- }
692
- } catch (error) {
693
- }
694
- exports.inspectOpts = Object.keys(process.env).filter((key) => {
695
- return /^debug_/i.test(key);
696
- }).reduce((obj, key) => {
697
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
698
- return k.toUpperCase();
699
- });
700
- let val = process.env[key];
701
- if (/^(yes|on|true|enabled)$/i.test(val)) {
702
- val = true;
703
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
704
- val = false;
705
- } else if (val === "null") {
706
- val = null;
707
- } else {
708
- val = Number(val);
709
- }
710
- obj[prop] = val;
711
- return obj;
712
- }, {});
713
- function useColors() {
714
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
715
- }
716
- function formatArgs(args) {
717
- const { namespace: name, useColors: useColors2 } = this;
718
- if (useColors2) {
719
- const c = this.color;
720
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
721
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
722
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
723
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
724
- } else {
725
- args[0] = getDate() + name + " " + args[0];
726
- }
727
- }
728
- function getDate() {
729
- if (exports.inspectOpts.hideDate) {
730
- return "";
731
- }
732
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
733
- }
734
- function log2(...args) {
735
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
736
- }
737
- function save(namespaces) {
738
- if (namespaces) {
739
- process.env.DEBUG = namespaces;
740
- } else {
741
- delete process.env.DEBUG;
742
- }
743
- }
744
- function load() {
745
- return process.env.DEBUG;
746
- }
747
- function init(debug) {
748
- debug.inspectOpts = {};
749
- const keys = Object.keys(exports.inspectOpts);
750
- for (let i = 0; i < keys.length; i++) {
751
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
752
- }
753
- }
754
- module.exports = require_common()(exports);
755
- var { formatters } = module.exports;
756
- formatters.o = function(v) {
757
- this.inspectOpts.colors = this.useColors;
758
- return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
759
- };
760
- formatters.O = function(v) {
761
- this.inspectOpts.colors = this.useColors;
762
- return util.inspect(v, this.inspectOpts);
763
- };
764
- }
765
- });
766
-
767
- // node_modules/debug/src/index.js
768
- var require_src = __commonJS({
769
- "node_modules/debug/src/index.js"(exports, module) {
770
- "use strict";
771
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
772
- module.exports = require_browser();
773
- } else {
774
- module.exports = require_node();
775
- }
776
- }
777
- });
778
-
779
- // node_modules/@iconify/utils/lib/icon/defaults.mjs
780
- var defaultIconDimensions = Object.freeze(
781
- {
782
- left: 0,
783
- top: 0,
784
- width: 16,
785
- height: 16
786
- }
787
- );
788
- var defaultIconTransformations = Object.freeze({
789
- rotate: 0,
790
- vFlip: false,
791
- hFlip: false
792
- });
793
- var defaultIconProps = Object.freeze({
794
- ...defaultIconDimensions,
795
- ...defaultIconTransformations
796
- });
797
- var defaultExtendedIconProps = Object.freeze({
798
- ...defaultIconProps,
799
- body: "",
800
- hidden: false
801
- });
802
-
803
- // node_modules/@iconify/utils/lib/customisations/defaults.mjs
804
- var defaultIconSizeCustomisations = Object.freeze({
805
- width: null,
806
- height: null
807
- });
808
- var defaultIconCustomisations = Object.freeze({
809
- // Dimensions
810
- ...defaultIconSizeCustomisations,
811
- // Transformations
812
- ...defaultIconTransformations
813
- });
814
-
815
- // node_modules/@iconify/utils/lib/icon/name.mjs
816
- var stringToIcon = (value, validate, allowSimpleName, provider = "") => {
817
- const colonSeparated = value.split(":");
818
- if (value.slice(0, 1) === "@") {
819
- if (colonSeparated.length < 2 || colonSeparated.length > 3) {
820
- return null;
821
- }
822
- provider = colonSeparated.shift().slice(1);
823
- }
824
- if (colonSeparated.length > 3 || !colonSeparated.length) {
825
- return null;
826
- }
827
- if (colonSeparated.length > 1) {
828
- const name2 = colonSeparated.pop();
829
- const prefix = colonSeparated.pop();
830
- const result = {
831
- // Allow provider without '@': "provider:prefix:name"
832
- provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
833
- prefix,
834
- name: name2
835
- };
836
- return validate && !validateIconName(result) ? null : result;
837
- }
838
- const name = colonSeparated[0];
839
- const dashSeparated = name.split("-");
840
- if (dashSeparated.length > 1) {
841
- const result = {
842
- provider,
843
- prefix: dashSeparated.shift(),
844
- name: dashSeparated.join("-")
845
- };
846
- return validate && !validateIconName(result) ? null : result;
847
- }
848
- if (allowSimpleName && provider === "") {
849
- const result = {
850
- provider,
851
- prefix: "",
852
- name
853
- };
854
- return validate && !validateIconName(result, allowSimpleName) ? null : result;
855
- }
856
- return null;
857
- };
858
- var validateIconName = (icon, allowSimpleName) => {
859
- if (!icon) {
860
- return false;
861
- }
862
- return !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
863
- // Check name: cannot be empty
864
- ((allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
865
- };
866
-
867
- // node_modules/@iconify/utils/lib/icon/transformations.mjs
868
- function mergeIconTransformations(obj1, obj2) {
869
- const result = {};
870
- if (!obj1.hFlip !== !obj2.hFlip) {
871
- result.hFlip = true;
872
- }
873
- if (!obj1.vFlip !== !obj2.vFlip) {
874
- result.vFlip = true;
875
- }
876
- const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
877
- if (rotate) {
878
- result.rotate = rotate;
879
- }
880
- return result;
881
- }
882
-
883
- // node_modules/@iconify/utils/lib/icon/merge.mjs
884
- function mergeIconData(parent, child) {
885
- const result = mergeIconTransformations(parent, child);
886
- for (const key in defaultExtendedIconProps) {
887
- if (key in defaultIconTransformations) {
888
- if (key in parent && !(key in result)) {
889
- result[key] = defaultIconTransformations[key];
890
- }
891
- } else if (key in child) {
892
- result[key] = child[key];
893
- } else if (key in parent) {
894
- result[key] = parent[key];
895
- }
896
- }
897
- return result;
898
- }
899
-
900
- // node_modules/@iconify/utils/lib/icon-set/tree.mjs
901
- function getIconsTree(data, names) {
902
- const icons = data.icons;
903
- const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
904
- const resolved = /* @__PURE__ */ Object.create(null);
905
- function resolve(name) {
906
- if (icons[name]) {
907
- return resolved[name] = [];
908
- }
909
- if (!(name in resolved)) {
910
- resolved[name] = null;
911
- const parent = aliases[name] && aliases[name].parent;
912
- const value = parent && resolve(parent);
913
- if (value) {
914
- resolved[name] = [parent].concat(value);
915
- }
916
- }
917
- return resolved[name];
918
- }
919
- (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
920
- return resolved;
921
- }
922
-
923
- // node_modules/@iconify/utils/lib/icon-set/get-icon.mjs
924
- function internalGetIconData(data, name, tree) {
925
- const icons = data.icons;
926
- const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
927
- let currentProps = {};
928
- function parse(name2) {
929
- currentProps = mergeIconData(
930
- icons[name2] || aliases[name2],
931
- currentProps
932
- );
933
- }
934
- parse(name);
935
- tree.forEach(parse);
936
- return mergeIconData(data, currentProps);
937
- }
938
- function getIconData(data, name) {
939
- if (data.icons[name]) {
940
- return internalGetIconData(data, name, []);
941
- }
942
- const tree = getIconsTree(data, [name])[name];
943
- return tree ? internalGetIconData(data, name, tree) : null;
944
- }
945
-
946
- // node_modules/@iconify/utils/lib/svg/size.mjs
947
- var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
948
- var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
949
- function calculateSize(size, ratio, precision) {
950
- if (ratio === 1) {
951
- return size;
952
- }
953
- precision = precision || 100;
954
- if (typeof size === "number") {
955
- return Math.ceil(size * ratio * precision) / precision;
956
- }
957
- if (typeof size !== "string") {
958
- return size;
959
- }
960
- const oldParts = size.split(unitsSplit);
961
- if (oldParts === null || !oldParts.length) {
962
- return size;
963
- }
964
- const newParts = [];
965
- let code = oldParts.shift();
966
- let isNumber = unitsTest.test(code);
967
- while (true) {
968
- if (isNumber) {
969
- const num = parseFloat(code);
970
- if (isNaN(num)) {
971
- newParts.push(code);
972
- } else {
973
- newParts.push(Math.ceil(num * ratio * precision) / precision);
974
- }
975
- } else {
976
- newParts.push(code);
977
- }
978
- code = oldParts.shift();
979
- if (code === void 0) {
980
- return newParts.join("");
981
- }
982
- isNumber = !isNumber;
983
- }
984
- }
985
-
986
- // node_modules/@iconify/utils/lib/svg/defs.mjs
987
- function splitSVGDefs(content, tag = "defs") {
988
- let defs = "";
989
- const index = content.indexOf("<" + tag);
990
- while (index >= 0) {
991
- const start = content.indexOf(">", index);
992
- const end = content.indexOf("</" + tag);
993
- if (start === -1 || end === -1) {
994
- break;
995
- }
996
- const endEnd = content.indexOf(">", end);
997
- if (endEnd === -1) {
998
- break;
999
- }
1000
- defs += content.slice(start + 1, end).trim();
1001
- content = content.slice(0, index).trim() + content.slice(endEnd + 1);
1002
- }
1003
- return {
1004
- defs,
1005
- content
1006
- };
1007
- }
1008
- function mergeDefsAndContent(defs, content) {
1009
- return defs ? "<defs>" + defs + "</defs>" + content : content;
1010
- }
1011
- function wrapSVGContent(body, start, end) {
1012
- const split = splitSVGDefs(body);
1013
- return mergeDefsAndContent(split.defs, start + split.content + end);
1014
- }
1015
-
1016
- // node_modules/@iconify/utils/lib/svg/build.mjs
1017
- var isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
1018
- function iconToSVG(icon, customisations) {
1019
- const fullIcon = {
1020
- ...defaultIconProps,
1021
- ...icon
1022
- };
1023
- const fullCustomisations = {
1024
- ...defaultIconCustomisations,
1025
- ...customisations
1026
- };
1027
- const box = {
1028
- left: fullIcon.left,
1029
- top: fullIcon.top,
1030
- width: fullIcon.width,
1031
- height: fullIcon.height
1032
- };
1033
- let body = fullIcon.body;
1034
- [fullIcon, fullCustomisations].forEach((props) => {
1035
- const transformations = [];
1036
- const hFlip = props.hFlip;
1037
- const vFlip = props.vFlip;
1038
- let rotation = props.rotate;
1039
- if (hFlip) {
1040
- if (vFlip) {
1041
- rotation += 2;
1042
- } else {
1043
- transformations.push(
1044
- "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
1045
- );
1046
- transformations.push("scale(-1 1)");
1047
- box.top = box.left = 0;
1048
- }
1049
- } else if (vFlip) {
1050
- transformations.push(
1051
- "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
1052
- );
1053
- transformations.push("scale(1 -1)");
1054
- box.top = box.left = 0;
1055
- }
1056
- let tempValue;
1057
- if (rotation < 0) {
1058
- rotation -= Math.floor(rotation / 4) * 4;
1059
- }
1060
- rotation = rotation % 4;
1061
- switch (rotation) {
1062
- case 1:
1063
- tempValue = box.height / 2 + box.top;
1064
- transformations.unshift(
1065
- "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
1066
- );
1067
- break;
1068
- case 2:
1069
- transformations.unshift(
1070
- "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
1071
- );
1072
- break;
1073
- case 3:
1074
- tempValue = box.width / 2 + box.left;
1075
- transformations.unshift(
1076
- "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
1077
- );
1078
- break;
1079
- }
1080
- if (rotation % 2 === 1) {
1081
- if (box.left !== box.top) {
1082
- tempValue = box.left;
1083
- box.left = box.top;
1084
- box.top = tempValue;
1085
- }
1086
- if (box.width !== box.height) {
1087
- tempValue = box.width;
1088
- box.width = box.height;
1089
- box.height = tempValue;
1090
- }
1091
- }
1092
- if (transformations.length) {
1093
- body = wrapSVGContent(
1094
- body,
1095
- '<g transform="' + transformations.join(" ") + '">',
1096
- "</g>"
1097
- );
1098
- }
1099
- });
1100
- const customisationsWidth = fullCustomisations.width;
1101
- const customisationsHeight = fullCustomisations.height;
1102
- const boxWidth = box.width;
1103
- const boxHeight = box.height;
1104
- let width;
1105
- let height;
1106
- if (customisationsWidth === null) {
1107
- height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1108
- width = calculateSize(height, boxWidth / boxHeight);
1109
- } else {
1110
- width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
1111
- height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1112
- }
1113
- const attributes = {};
1114
- const setAttr = (prop, value) => {
1115
- if (!isUnsetKeyword(value)) {
1116
- attributes[prop] = value.toString();
1117
- }
1118
- };
1119
- setAttr("width", width);
1120
- setAttr("height", height);
1121
- const viewBox = [box.left, box.top, boxWidth, boxHeight];
1122
- attributes.viewBox = viewBox.join(" ");
1123
- return {
1124
- attributes,
1125
- viewBox,
1126
- body
1127
- };
1128
- }
1129
-
1130
- // node_modules/@iconify/utils/lib/svg/id.mjs
1131
- var regex = /\sid="(\S+)"/g;
1132
- var randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
1133
- var counter = 0;
1134
- function replaceIDs(body, prefix = randomPrefix) {
1135
- const ids = [];
1136
- let match;
1137
- while (match = regex.exec(body)) {
1138
- ids.push(match[1]);
1139
- }
1140
- if (!ids.length) {
1141
- return body;
1142
- }
1143
- const suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
1144
- ids.forEach((id) => {
1145
- const newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
1146
- const escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1147
- body = body.replace(
1148
- // Allowed characters before id: [#;"]
1149
- // Allowed characters after id: [)"], .[a-z]
1150
- new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
1151
- "$1" + newID + suffix + "$3"
1152
- );
1153
- });
1154
- body = body.replace(new RegExp(suffix, "g"), "");
1155
- return body;
1156
- }
1157
-
1158
- // node_modules/@iconify/utils/lib/svg/html.mjs
1159
- function iconToHTML(body, attributes) {
1160
- let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1161
- for (const attr in attributes) {
1162
- renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
1163
- }
1164
- return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
1165
- }
1166
-
1167
- // node_modules/@iconify/utils/lib/index.mjs
1168
- var import_debug = __toESM(require_src(), 1);
1169
-
1170
- // node_modules/mermaid/dist/chunks/mermaid.core/chunk-OPO4IU42.mjs
1171
- var unknownIcon = {
1172
- body: '<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',
1173
- height: 80,
1174
- width: 80
1175
- };
1176
- var iconsStore = /* @__PURE__ */ new Map();
1177
- var loaderStore = /* @__PURE__ */ new Map();
1178
- var registerIconPacks = /* @__PURE__ */ __name((iconLoaders) => {
1179
- for (const iconLoader of iconLoaders) {
1180
- if (!iconLoader.name) {
1181
- throw new Error(
1182
- 'Invalid icon loader. Must have a "name" property with non-empty string value.'
1183
- );
1184
- }
1185
- log.debug("Registering icon pack:", iconLoader.name);
1186
- if ("loader" in iconLoader) {
1187
- loaderStore.set(iconLoader.name, iconLoader.loader);
1188
- } else if ("icons" in iconLoader) {
1189
- iconsStore.set(iconLoader.name, iconLoader.icons);
1190
- } else {
1191
- log.error("Invalid icon loader:", iconLoader);
1192
- throw new Error('Invalid icon loader. Must have either "icons" or "loader" property.');
1193
- }
1194
- }
1195
- }, "registerIconPacks");
1196
- var getRegisteredIconData = /* @__PURE__ */ __name(async (iconName, fallbackPrefix) => {
1197
- const data = stringToIcon(iconName, true, fallbackPrefix !== void 0);
1198
- if (!data) {
1199
- throw new Error(`Invalid icon name: ${iconName}`);
1200
- }
1201
- const prefix = data.prefix || fallbackPrefix;
1202
- if (!prefix) {
1203
- throw new Error(`Icon name must contain a prefix: ${iconName}`);
1204
- }
1205
- let icons = iconsStore.get(prefix);
1206
- if (!icons) {
1207
- const loader = loaderStore.get(prefix);
1208
- if (!loader) {
1209
- throw new Error(`Icon set not found: ${data.prefix}`);
1210
- }
1211
- try {
1212
- const loaded = await loader();
1213
- icons = { ...loaded, prefix };
1214
- iconsStore.set(prefix, icons);
1215
- } catch (e) {
1216
- log.error(e);
1217
- throw new Error(`Failed to load icon set: ${data.prefix}`);
1218
- }
1219
- }
1220
- const iconData = getIconData(icons, data.name);
1221
- if (!iconData) {
1222
- throw new Error(`Icon not found: ${iconName}`);
1223
- }
1224
- return iconData;
1225
- }, "getRegisteredIconData");
1226
- var getIconSVG = /* @__PURE__ */ __name(async (iconName, customisations) => {
1227
- let iconData;
1228
- try {
1229
- iconData = await getRegisteredIconData(iconName, customisations?.fallbackPrefix);
1230
- } catch (e) {
1231
- log.error(e);
1232
- iconData = unknownIcon;
1233
- }
1234
- const renderData = iconToSVG(iconData, customisations);
1235
- const svg = iconToHTML(replaceIDs(renderData.body), renderData.attributes);
1236
- return svg;
1237
- }, "getIconSVG");
1238
-
1239
- export {
1240
- unknownIcon,
1241
- registerIconPacks,
1242
- getIconSVG
1243
- };
1244
- //# sourceMappingURL=chunk-H72D3HRR.js.map