yx-web-sdk 0.0.4

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 (100) hide show
  1. package/README.md +424 -0
  2. package/dist/AntdIcon-B0sjNvGu.mjs +307 -0
  3. package/dist/CloseOutlined-DDb89ei3.mjs +37 -0
  4. package/dist/_plugin-vue_export-helper-1tPrXgE0.mjs +10 -0
  5. package/dist/ait-person-popover/index.d.ts +3 -0
  6. package/dist/ait-person-popover/index.js +5 -0
  7. package/dist/ait-person-popover/index.vue.d.ts +39 -0
  8. package/dist/chat-card/index.d.ts +3 -0
  9. package/dist/chat-card/index.js +5 -0
  10. package/dist/chat-card/index.vue.d.ts +25 -0
  11. package/dist/chat-content/index.d.ts +3 -0
  12. package/dist/chat-content/index.js +5 -0
  13. package/dist/chat-content/index.vue.d.ts +51 -0
  14. package/dist/chat-page/index.d.ts +3 -0
  15. package/dist/chat-page/index.js +5 -0
  16. package/dist/chat-page/index.vue.d.ts +6 -0
  17. package/dist/chat-room/index.d.ts +3 -0
  18. package/dist/chat-room/index.js +5 -0
  19. package/dist/chat-room/index.vue.d.ts +9 -0
  20. package/dist/common-avatar/index.d.ts +3 -0
  21. package/dist/common-avatar/index.js +5 -0
  22. package/dist/common-avatar/index.vue.d.ts +17 -0
  23. package/dist/components/ait-person-popover/index.d.ts +3 -0
  24. package/dist/components/ait-person-popover/index.vue.d.ts +39 -0
  25. package/dist/components/chat-card/index.d.ts +3 -0
  26. package/dist/components/chat-card/index.vue.d.ts +25 -0
  27. package/dist/components/chat-content/composables/ait-person.d.ts +86 -0
  28. package/dist/components/chat-content/index.d.ts +3 -0
  29. package/dist/components/chat-content/index.vue.d.ts +51 -0
  30. package/dist/components/chat-page/index.d.ts +3 -0
  31. package/dist/components/chat-page/index.vue.d.ts +6 -0
  32. package/dist/components/chat-room/index.d.ts +3 -0
  33. package/dist/components/chat-room/index.vue.d.ts +9 -0
  34. package/dist/components/common-avatar/index.d.ts +3 -0
  35. package/dist/components/common-avatar/index.vue.d.ts +17 -0
  36. package/dist/components/icon-font/index.d.ts +47 -0
  37. package/dist/components/index-entry/index.d.ts +2 -0
  38. package/dist/components/index-entry/index.vue.d.ts +25 -0
  39. package/dist/components/index.d.ts +12 -0
  40. package/dist/components/list.d.ts +2 -0
  41. package/dist/components/members-sidebar/index.d.ts +3 -0
  42. package/dist/components/members-sidebar/index.vue.d.ts +4 -0
  43. package/dist/components/notice-box/index.d.ts +3 -0
  44. package/dist/components/notice-box/index.vue.d.ts +13 -0
  45. package/dist/components/server-channel-sidebar/index.d.ts +3 -0
  46. package/dist/components/server-channel-sidebar/index.vue.d.ts +18 -0
  47. package/dist/global.css +39 -0
  48. package/dist/icon-font/index.d.ts +47 -0
  49. package/dist/icon-font/index.js +7 -0
  50. package/dist/index/style.css +199 -0
  51. package/dist/index/style2.css +175 -0
  52. package/dist/index/style3.css +36 -0
  53. package/dist/index/style4.css +168 -0
  54. package/dist/index/style5.css +147 -0
  55. package/dist/index/style6.css +43 -0
  56. package/dist/index/style7.css +491 -0
  57. package/dist/index/style8.css +19 -0
  58. package/dist/index-3sSWCzxu.mjs +225 -0
  59. package/dist/index-4m4OVlx8.mjs +611 -0
  60. package/dist/index-CFI0URc5.mjs +135 -0
  61. package/dist/index-Dg8Q3cli.mjs +1092 -0
  62. package/dist/index-entry/index.d.ts +2 -0
  63. package/dist/index-entry/index.js +271 -0
  64. package/dist/index-entry/index.vue.d.ts +25 -0
  65. package/dist/index-entry/style.css +51 -0
  66. package/dist/index.d.ts +8 -0
  67. package/dist/index.vue_vue_type_script_setup_true_lang-DkMXpHkt.mjs +158 -0
  68. package/dist/index.vue_vue_type_style_index_0_lang-CfLKcYM9.mjs +102 -0
  69. package/dist/index.vue_vue_type_style_index_0_lang-CibeOmhP.mjs +407 -0
  70. package/dist/index.vue_vue_type_style_index_0_lang-CmfE8EVU.mjs +288 -0
  71. package/dist/index.vue_vue_type_style_index_0_lang-XiDTgYoZ.mjs +1012 -0
  72. package/dist/index.vue_vue_type_style_index_0_lang-Y-vyKHWz.mjs +36985 -0
  73. package/dist/members-sidebar/index.d.ts +3 -0
  74. package/dist/members-sidebar/index.js +5 -0
  75. package/dist/members-sidebar/index.vue.d.ts +4 -0
  76. package/dist/notice-box/index.d.ts +3 -0
  77. package/dist/notice-box/index.js +5 -0
  78. package/dist/notice-box/index.vue.d.ts +13 -0
  79. package/dist/plugin/index.d.ts +22 -0
  80. package/dist/resolver/index.d.ts +22 -0
  81. package/dist/resolver/index.es.js +36 -0
  82. package/dist/resolver/index.umd.js +40 -0
  83. package/dist/server-channel-sidebar/index.d.ts +3 -0
  84. package/dist/server-channel-sidebar/index.js +5 -0
  85. package/dist/server-channel-sidebar/index.vue.d.ts +18 -0
  86. package/dist/stores/channel.d.ts +114 -0
  87. package/dist/stores/global.d.ts +15 -0
  88. package/dist/stores/index.d.ts +7 -0
  89. package/dist/stores/qchat.d.ts +397 -0
  90. package/dist/stores/sdk.d.ts +48 -0
  91. package/dist/stores/server.d.ts +58 -0
  92. package/dist/stores/user.d.ts +9 -0
  93. package/dist/style.css +1359 -0
  94. package/dist/types/missing.d.ts +14 -0
  95. package/dist/utils/events.d.ts +7 -0
  96. package/dist/utils/index.d.ts +26 -0
  97. package/dist/utils/storage.d.ts +15 -0
  98. package/dist/yx-web-sdk.es.js +41593 -0
  99. package/dist/yx-web-sdk.umd.js +41590 -0
  100. package/package.json +191 -0
@@ -0,0 +1,1092 @@
1
+ import { inject, ref, getCurrentInstance, nextTick, h, defineComponent, createVNode } from "vue";
2
+ function bound01(n, max) {
3
+ if (isOnePointZero(n)) {
4
+ n = "100%";
5
+ }
6
+ var isPercent = isPercentage(n);
7
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
8
+ if (isPercent) {
9
+ n = parseInt(String(n * max), 10) / 100;
10
+ }
11
+ if (Math.abs(n - max) < 1e-6) {
12
+ return 1;
13
+ }
14
+ if (max === 360) {
15
+ n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
16
+ } else {
17
+ n = n % max / parseFloat(String(max));
18
+ }
19
+ return n;
20
+ }
21
+ function isOnePointZero(n) {
22
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
23
+ }
24
+ function isPercentage(n) {
25
+ return typeof n === "string" && n.indexOf("%") !== -1;
26
+ }
27
+ function boundAlpha(a) {
28
+ a = parseFloat(a);
29
+ if (isNaN(a) || a < 0 || a > 1) {
30
+ a = 1;
31
+ }
32
+ return a;
33
+ }
34
+ function convertToPercentage(n) {
35
+ if (n <= 1) {
36
+ return "".concat(Number(n) * 100, "%");
37
+ }
38
+ return n;
39
+ }
40
+ function pad2(c) {
41
+ return c.length === 1 ? "0" + c : String(c);
42
+ }
43
+ function rgbToRgb(r, g, b) {
44
+ return {
45
+ r: bound01(r, 255) * 255,
46
+ g: bound01(g, 255) * 255,
47
+ b: bound01(b, 255) * 255
48
+ };
49
+ }
50
+ function hue2rgb(p, q, t) {
51
+ if (t < 0) {
52
+ t += 1;
53
+ }
54
+ if (t > 1) {
55
+ t -= 1;
56
+ }
57
+ if (t < 1 / 6) {
58
+ return p + (q - p) * (6 * t);
59
+ }
60
+ if (t < 1 / 2) {
61
+ return q;
62
+ }
63
+ if (t < 2 / 3) {
64
+ return p + (q - p) * (2 / 3 - t) * 6;
65
+ }
66
+ return p;
67
+ }
68
+ function hslToRgb(h2, s, l) {
69
+ var r;
70
+ var g;
71
+ var b;
72
+ h2 = bound01(h2, 360);
73
+ s = bound01(s, 100);
74
+ l = bound01(l, 100);
75
+ if (s === 0) {
76
+ g = l;
77
+ b = l;
78
+ r = l;
79
+ } else {
80
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
81
+ var p = 2 * l - q;
82
+ r = hue2rgb(p, q, h2 + 1 / 3);
83
+ g = hue2rgb(p, q, h2);
84
+ b = hue2rgb(p, q, h2 - 1 / 3);
85
+ }
86
+ return { r: r * 255, g: g * 255, b: b * 255 };
87
+ }
88
+ function rgbToHsv(r, g, b) {
89
+ r = bound01(r, 255);
90
+ g = bound01(g, 255);
91
+ b = bound01(b, 255);
92
+ var max = Math.max(r, g, b);
93
+ var min = Math.min(r, g, b);
94
+ var h2 = 0;
95
+ var v = max;
96
+ var d = max - min;
97
+ var s = max === 0 ? 0 : d / max;
98
+ if (max === min) {
99
+ h2 = 0;
100
+ } else {
101
+ switch (max) {
102
+ case r:
103
+ h2 = (g - b) / d + (g < b ? 6 : 0);
104
+ break;
105
+ case g:
106
+ h2 = (b - r) / d + 2;
107
+ break;
108
+ case b:
109
+ h2 = (r - g) / d + 4;
110
+ break;
111
+ }
112
+ h2 /= 6;
113
+ }
114
+ return { h: h2, s, v };
115
+ }
116
+ function hsvToRgb(h2, s, v) {
117
+ h2 = bound01(h2, 360) * 6;
118
+ s = bound01(s, 100);
119
+ v = bound01(v, 100);
120
+ var i = Math.floor(h2);
121
+ var f = h2 - i;
122
+ var p = v * (1 - s);
123
+ var q = v * (1 - f * s);
124
+ var t = v * (1 - (1 - f) * s);
125
+ var mod = i % 6;
126
+ var r = [v, q, p, p, t, v][mod];
127
+ var g = [t, v, v, q, p, p][mod];
128
+ var b = [p, p, t, v, v, q][mod];
129
+ return { r: r * 255, g: g * 255, b: b * 255 };
130
+ }
131
+ function rgbToHex(r, g, b, allow3Char) {
132
+ var hex = [
133
+ pad2(Math.round(r).toString(16)),
134
+ pad2(Math.round(g).toString(16)),
135
+ pad2(Math.round(b).toString(16))
136
+ ];
137
+ return hex.join("");
138
+ }
139
+ function convertHexToDecimal(h2) {
140
+ return parseIntFromHex(h2) / 255;
141
+ }
142
+ function parseIntFromHex(val) {
143
+ return parseInt(val, 16);
144
+ }
145
+ var names = {
146
+ aliceblue: "#f0f8ff",
147
+ antiquewhite: "#faebd7",
148
+ aqua: "#00ffff",
149
+ aquamarine: "#7fffd4",
150
+ azure: "#f0ffff",
151
+ beige: "#f5f5dc",
152
+ bisque: "#ffe4c4",
153
+ black: "#000000",
154
+ blanchedalmond: "#ffebcd",
155
+ blue: "#0000ff",
156
+ blueviolet: "#8a2be2",
157
+ brown: "#a52a2a",
158
+ burlywood: "#deb887",
159
+ cadetblue: "#5f9ea0",
160
+ chartreuse: "#7fff00",
161
+ chocolate: "#d2691e",
162
+ coral: "#ff7f50",
163
+ cornflowerblue: "#6495ed",
164
+ cornsilk: "#fff8dc",
165
+ crimson: "#dc143c",
166
+ cyan: "#00ffff",
167
+ darkblue: "#00008b",
168
+ darkcyan: "#008b8b",
169
+ darkgoldenrod: "#b8860b",
170
+ darkgray: "#a9a9a9",
171
+ darkgreen: "#006400",
172
+ darkgrey: "#a9a9a9",
173
+ darkkhaki: "#bdb76b",
174
+ darkmagenta: "#8b008b",
175
+ darkolivegreen: "#556b2f",
176
+ darkorange: "#ff8c00",
177
+ darkorchid: "#9932cc",
178
+ darkred: "#8b0000",
179
+ darksalmon: "#e9967a",
180
+ darkseagreen: "#8fbc8f",
181
+ darkslateblue: "#483d8b",
182
+ darkslategray: "#2f4f4f",
183
+ darkslategrey: "#2f4f4f",
184
+ darkturquoise: "#00ced1",
185
+ darkviolet: "#9400d3",
186
+ deeppink: "#ff1493",
187
+ deepskyblue: "#00bfff",
188
+ dimgray: "#696969",
189
+ dimgrey: "#696969",
190
+ dodgerblue: "#1e90ff",
191
+ firebrick: "#b22222",
192
+ floralwhite: "#fffaf0",
193
+ forestgreen: "#228b22",
194
+ fuchsia: "#ff00ff",
195
+ gainsboro: "#dcdcdc",
196
+ ghostwhite: "#f8f8ff",
197
+ goldenrod: "#daa520",
198
+ gold: "#ffd700",
199
+ gray: "#808080",
200
+ green: "#008000",
201
+ greenyellow: "#adff2f",
202
+ grey: "#808080",
203
+ honeydew: "#f0fff0",
204
+ hotpink: "#ff69b4",
205
+ indianred: "#cd5c5c",
206
+ indigo: "#4b0082",
207
+ ivory: "#fffff0",
208
+ khaki: "#f0e68c",
209
+ lavenderblush: "#fff0f5",
210
+ lavender: "#e6e6fa",
211
+ lawngreen: "#7cfc00",
212
+ lemonchiffon: "#fffacd",
213
+ lightblue: "#add8e6",
214
+ lightcoral: "#f08080",
215
+ lightcyan: "#e0ffff",
216
+ lightgoldenrodyellow: "#fafad2",
217
+ lightgray: "#d3d3d3",
218
+ lightgreen: "#90ee90",
219
+ lightgrey: "#d3d3d3",
220
+ lightpink: "#ffb6c1",
221
+ lightsalmon: "#ffa07a",
222
+ lightseagreen: "#20b2aa",
223
+ lightskyblue: "#87cefa",
224
+ lightslategray: "#778899",
225
+ lightslategrey: "#778899",
226
+ lightsteelblue: "#b0c4de",
227
+ lightyellow: "#ffffe0",
228
+ lime: "#00ff00",
229
+ limegreen: "#32cd32",
230
+ linen: "#faf0e6",
231
+ magenta: "#ff00ff",
232
+ maroon: "#800000",
233
+ mediumaquamarine: "#66cdaa",
234
+ mediumblue: "#0000cd",
235
+ mediumorchid: "#ba55d3",
236
+ mediumpurple: "#9370db",
237
+ mediumseagreen: "#3cb371",
238
+ mediumslateblue: "#7b68ee",
239
+ mediumspringgreen: "#00fa9a",
240
+ mediumturquoise: "#48d1cc",
241
+ mediumvioletred: "#c71585",
242
+ midnightblue: "#191970",
243
+ mintcream: "#f5fffa",
244
+ mistyrose: "#ffe4e1",
245
+ moccasin: "#ffe4b5",
246
+ navajowhite: "#ffdead",
247
+ navy: "#000080",
248
+ oldlace: "#fdf5e6",
249
+ olive: "#808000",
250
+ olivedrab: "#6b8e23",
251
+ orange: "#ffa500",
252
+ orangered: "#ff4500",
253
+ orchid: "#da70d6",
254
+ palegoldenrod: "#eee8aa",
255
+ palegreen: "#98fb98",
256
+ paleturquoise: "#afeeee",
257
+ palevioletred: "#db7093",
258
+ papayawhip: "#ffefd5",
259
+ peachpuff: "#ffdab9",
260
+ peru: "#cd853f",
261
+ pink: "#ffc0cb",
262
+ plum: "#dda0dd",
263
+ powderblue: "#b0e0e6",
264
+ purple: "#800080",
265
+ rebeccapurple: "#663399",
266
+ red: "#ff0000",
267
+ rosybrown: "#bc8f8f",
268
+ royalblue: "#4169e1",
269
+ saddlebrown: "#8b4513",
270
+ salmon: "#fa8072",
271
+ sandybrown: "#f4a460",
272
+ seagreen: "#2e8b57",
273
+ seashell: "#fff5ee",
274
+ sienna: "#a0522d",
275
+ silver: "#c0c0c0",
276
+ skyblue: "#87ceeb",
277
+ slateblue: "#6a5acd",
278
+ slategray: "#708090",
279
+ slategrey: "#708090",
280
+ snow: "#fffafa",
281
+ springgreen: "#00ff7f",
282
+ steelblue: "#4682b4",
283
+ tan: "#d2b48c",
284
+ teal: "#008080",
285
+ thistle: "#d8bfd8",
286
+ tomato: "#ff6347",
287
+ turquoise: "#40e0d0",
288
+ violet: "#ee82ee",
289
+ wheat: "#f5deb3",
290
+ white: "#ffffff",
291
+ whitesmoke: "#f5f5f5",
292
+ yellow: "#ffff00",
293
+ yellowgreen: "#9acd32"
294
+ };
295
+ function inputToRGB(color) {
296
+ var rgb = { r: 0, g: 0, b: 0 };
297
+ var a = 1;
298
+ var s = null;
299
+ var v = null;
300
+ var l = null;
301
+ var ok = false;
302
+ var format = false;
303
+ if (typeof color === "string") {
304
+ color = stringInputToObject(color);
305
+ }
306
+ if (typeof color === "object") {
307
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
308
+ rgb = rgbToRgb(color.r, color.g, color.b);
309
+ ok = true;
310
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
311
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
312
+ s = convertToPercentage(color.s);
313
+ v = convertToPercentage(color.v);
314
+ rgb = hsvToRgb(color.h, s, v);
315
+ ok = true;
316
+ format = "hsv";
317
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
318
+ s = convertToPercentage(color.s);
319
+ l = convertToPercentage(color.l);
320
+ rgb = hslToRgb(color.h, s, l);
321
+ ok = true;
322
+ format = "hsl";
323
+ }
324
+ if (Object.prototype.hasOwnProperty.call(color, "a")) {
325
+ a = color.a;
326
+ }
327
+ }
328
+ a = boundAlpha(a);
329
+ return {
330
+ ok,
331
+ format: color.format || format,
332
+ r: Math.min(255, Math.max(rgb.r, 0)),
333
+ g: Math.min(255, Math.max(rgb.g, 0)),
334
+ b: Math.min(255, Math.max(rgb.b, 0)),
335
+ a
336
+ };
337
+ }
338
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
339
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
340
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
341
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
342
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
343
+ var matchers = {
344
+ CSS_UNIT: new RegExp(CSS_UNIT),
345
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
346
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
347
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
348
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
349
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
350
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
351
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
352
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
353
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
354
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
355
+ };
356
+ function stringInputToObject(color) {
357
+ color = color.trim().toLowerCase();
358
+ if (color.length === 0) {
359
+ return false;
360
+ }
361
+ var named = false;
362
+ if (names[color]) {
363
+ color = names[color];
364
+ named = true;
365
+ } else if (color === "transparent") {
366
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
367
+ }
368
+ var match = matchers.rgb.exec(color);
369
+ if (match) {
370
+ return { r: match[1], g: match[2], b: match[3] };
371
+ }
372
+ match = matchers.rgba.exec(color);
373
+ if (match) {
374
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
375
+ }
376
+ match = matchers.hsl.exec(color);
377
+ if (match) {
378
+ return { h: match[1], s: match[2], l: match[3] };
379
+ }
380
+ match = matchers.hsla.exec(color);
381
+ if (match) {
382
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
383
+ }
384
+ match = matchers.hsv.exec(color);
385
+ if (match) {
386
+ return { h: match[1], s: match[2], v: match[3] };
387
+ }
388
+ match = matchers.hsva.exec(color);
389
+ if (match) {
390
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
391
+ }
392
+ match = matchers.hex8.exec(color);
393
+ if (match) {
394
+ return {
395
+ r: parseIntFromHex(match[1]),
396
+ g: parseIntFromHex(match[2]),
397
+ b: parseIntFromHex(match[3]),
398
+ a: convertHexToDecimal(match[4]),
399
+ format: named ? "name" : "hex8"
400
+ };
401
+ }
402
+ match = matchers.hex6.exec(color);
403
+ if (match) {
404
+ return {
405
+ r: parseIntFromHex(match[1]),
406
+ g: parseIntFromHex(match[2]),
407
+ b: parseIntFromHex(match[3]),
408
+ format: named ? "name" : "hex"
409
+ };
410
+ }
411
+ match = matchers.hex4.exec(color);
412
+ if (match) {
413
+ return {
414
+ r: parseIntFromHex(match[1] + match[1]),
415
+ g: parseIntFromHex(match[2] + match[2]),
416
+ b: parseIntFromHex(match[3] + match[3]),
417
+ a: convertHexToDecimal(match[4] + match[4]),
418
+ format: named ? "name" : "hex8"
419
+ };
420
+ }
421
+ match = matchers.hex3.exec(color);
422
+ if (match) {
423
+ return {
424
+ r: parseIntFromHex(match[1] + match[1]),
425
+ g: parseIntFromHex(match[2] + match[2]),
426
+ b: parseIntFromHex(match[3] + match[3]),
427
+ format: named ? "name" : "hex"
428
+ };
429
+ }
430
+ return false;
431
+ }
432
+ function isValidCSSUnit(color) {
433
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
434
+ }
435
+ var hueStep = 2;
436
+ var saturationStep = 0.16;
437
+ var saturationStep2 = 0.05;
438
+ var brightnessStep1 = 0.05;
439
+ var brightnessStep2 = 0.15;
440
+ var lightColorCount = 5;
441
+ var darkColorCount = 4;
442
+ var darkColorMap = [{
443
+ index: 7,
444
+ opacity: 0.15
445
+ }, {
446
+ index: 6,
447
+ opacity: 0.25
448
+ }, {
449
+ index: 5,
450
+ opacity: 0.3
451
+ }, {
452
+ index: 5,
453
+ opacity: 0.45
454
+ }, {
455
+ index: 5,
456
+ opacity: 0.65
457
+ }, {
458
+ index: 5,
459
+ opacity: 0.85
460
+ }, {
461
+ index: 4,
462
+ opacity: 0.9
463
+ }, {
464
+ index: 3,
465
+ opacity: 0.95
466
+ }, {
467
+ index: 2,
468
+ opacity: 0.97
469
+ }, {
470
+ index: 1,
471
+ opacity: 0.98
472
+ }];
473
+ function toHsv(_ref) {
474
+ var r = _ref.r, g = _ref.g, b = _ref.b;
475
+ var hsv = rgbToHsv(r, g, b);
476
+ return {
477
+ h: hsv.h * 360,
478
+ s: hsv.s,
479
+ v: hsv.v
480
+ };
481
+ }
482
+ function toHex(_ref2) {
483
+ var r = _ref2.r, g = _ref2.g, b = _ref2.b;
484
+ return "#".concat(rgbToHex(r, g, b));
485
+ }
486
+ function mix(rgb1, rgb2, amount) {
487
+ var p = amount / 100;
488
+ var rgb = {
489
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
490
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
491
+ b: (rgb2.b - rgb1.b) * p + rgb1.b
492
+ };
493
+ return rgb;
494
+ }
495
+ function getHue(hsv, i, light) {
496
+ var hue;
497
+ if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
498
+ hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
499
+ } else {
500
+ hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
501
+ }
502
+ if (hue < 0) {
503
+ hue += 360;
504
+ } else if (hue >= 360) {
505
+ hue -= 360;
506
+ }
507
+ return hue;
508
+ }
509
+ function getSaturation(hsv, i, light) {
510
+ if (hsv.h === 0 && hsv.s === 0) {
511
+ return hsv.s;
512
+ }
513
+ var saturation;
514
+ if (light) {
515
+ saturation = hsv.s - saturationStep * i;
516
+ } else if (i === darkColorCount) {
517
+ saturation = hsv.s + saturationStep;
518
+ } else {
519
+ saturation = hsv.s + saturationStep2 * i;
520
+ }
521
+ if (saturation > 1) {
522
+ saturation = 1;
523
+ }
524
+ if (light && i === lightColorCount && saturation > 0.1) {
525
+ saturation = 0.1;
526
+ }
527
+ if (saturation < 0.06) {
528
+ saturation = 0.06;
529
+ }
530
+ return Number(saturation.toFixed(2));
531
+ }
532
+ function getValue(hsv, i, light) {
533
+ var value;
534
+ if (light) {
535
+ value = hsv.v + brightnessStep1 * i;
536
+ } else {
537
+ value = hsv.v - brightnessStep2 * i;
538
+ }
539
+ if (value > 1) {
540
+ value = 1;
541
+ }
542
+ return Number(value.toFixed(2));
543
+ }
544
+ function generate$1(color) {
545
+ var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
546
+ var patterns = [];
547
+ var pColor = inputToRGB(color);
548
+ for (var i = lightColorCount; i > 0; i -= 1) {
549
+ var hsv = toHsv(pColor);
550
+ var colorString = toHex(inputToRGB({
551
+ h: getHue(hsv, i, true),
552
+ s: getSaturation(hsv, i, true),
553
+ v: getValue(hsv, i, true)
554
+ }));
555
+ patterns.push(colorString);
556
+ }
557
+ patterns.push(toHex(pColor));
558
+ for (var _i = 1; _i <= darkColorCount; _i += 1) {
559
+ var _hsv = toHsv(pColor);
560
+ var _colorString = toHex(inputToRGB({
561
+ h: getHue(_hsv, _i),
562
+ s: getSaturation(_hsv, _i),
563
+ v: getValue(_hsv, _i)
564
+ }));
565
+ patterns.push(_colorString);
566
+ }
567
+ if (opts.theme === "dark") {
568
+ return darkColorMap.map(function(_ref3) {
569
+ var index = _ref3.index, opacity = _ref3.opacity;
570
+ var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index]), opacity * 100));
571
+ return darkColorString;
572
+ });
573
+ }
574
+ return patterns;
575
+ }
576
+ var presetPrimaryColors = {
577
+ red: "#F5222D",
578
+ volcano: "#FA541C",
579
+ orange: "#FA8C16",
580
+ gold: "#FAAD14",
581
+ yellow: "#FADB14",
582
+ lime: "#A0D911",
583
+ green: "#52C41A",
584
+ cyan: "#13C2C2",
585
+ blue: "#1890FF",
586
+ geekblue: "#2F54EB",
587
+ purple: "#722ED1",
588
+ magenta: "#EB2F96",
589
+ grey: "#666666"
590
+ };
591
+ var presetPalettes = {};
592
+ var presetDarkPalettes = {};
593
+ Object.keys(presetPrimaryColors).forEach(function(key) {
594
+ presetPalettes[key] = generate$1(presetPrimaryColors[key]);
595
+ presetPalettes[key].primary = presetPalettes[key][5];
596
+ presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
597
+ theme: "dark",
598
+ backgroundColor: "#141414"
599
+ });
600
+ presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
601
+ });
602
+ var blue = presetPalettes.blue;
603
+ var contextKey = Symbol("iconContext");
604
+ var useInjectIconContext = function useInjectIconContext2() {
605
+ return inject(contextKey, {
606
+ prefixCls: ref("anticon"),
607
+ rootClassName: ref(""),
608
+ csp: ref()
609
+ });
610
+ };
611
+ function canUseDom() {
612
+ return !!(typeof window !== "undefined" && window.document && window.document.createElement);
613
+ }
614
+ function contains(root, n) {
615
+ if (!root) {
616
+ return false;
617
+ }
618
+ if (root.contains) {
619
+ return root.contains(n);
620
+ }
621
+ return false;
622
+ }
623
+ var APPEND_ORDER = "data-vc-order";
624
+ var MARK_KEY = "vc-icon-key";
625
+ var containerCache = /* @__PURE__ */ new Map();
626
+ function getMark() {
627
+ var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, mark = _ref.mark;
628
+ if (mark) {
629
+ return mark.startsWith("data-") ? mark : "data-".concat(mark);
630
+ }
631
+ return MARK_KEY;
632
+ }
633
+ function getContainer(option) {
634
+ if (option.attachTo) {
635
+ return option.attachTo;
636
+ }
637
+ var head = document.querySelector("head");
638
+ return head || document.body;
639
+ }
640
+ function getOrder(prepend) {
641
+ if (prepend === "queue") {
642
+ return "prependQueue";
643
+ }
644
+ return prepend ? "prepend" : "append";
645
+ }
646
+ function findStyles(container) {
647
+ return Array.from((containerCache.get(container) || container).children).filter(function(node) {
648
+ return node.tagName === "STYLE";
649
+ });
650
+ }
651
+ function injectCSS(css) {
652
+ var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
653
+ if (!canUseDom()) {
654
+ return null;
655
+ }
656
+ var csp = option.csp, prepend = option.prepend;
657
+ var styleNode = document.createElement("style");
658
+ styleNode.setAttribute(APPEND_ORDER, getOrder(prepend));
659
+ if (csp && csp.nonce) {
660
+ styleNode.nonce = csp.nonce;
661
+ }
662
+ styleNode.innerHTML = css;
663
+ var container = getContainer(option);
664
+ var firstChild = container.firstChild;
665
+ if (prepend) {
666
+ if (prepend === "queue") {
667
+ var existStyle = findStyles(container).filter(function(node) {
668
+ return ["prepend", "prependQueue"].includes(node.getAttribute(APPEND_ORDER));
669
+ });
670
+ if (existStyle.length) {
671
+ container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
672
+ return styleNode;
673
+ }
674
+ }
675
+ container.insertBefore(styleNode, firstChild);
676
+ } else {
677
+ container.appendChild(styleNode);
678
+ }
679
+ return styleNode;
680
+ }
681
+ function findExistNode(key) {
682
+ var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
683
+ var container = getContainer(option);
684
+ return findStyles(container).find(function(node) {
685
+ return node.getAttribute(getMark(option)) === key;
686
+ });
687
+ }
688
+ function syncRealContainer(container, option) {
689
+ var cachedRealContainer = containerCache.get(container);
690
+ if (!cachedRealContainer || !contains(document, cachedRealContainer)) {
691
+ var placeholderStyle = injectCSS("", option);
692
+ var parentNode = placeholderStyle.parentNode;
693
+ containerCache.set(container, parentNode);
694
+ container.removeChild(placeholderStyle);
695
+ }
696
+ }
697
+ function updateCSS(css, key) {
698
+ var option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
699
+ var container = getContainer(option);
700
+ syncRealContainer(container, option);
701
+ var existNode = findExistNode(key, option);
702
+ if (existNode) {
703
+ if (option.csp && option.csp.nonce && existNode.nonce !== option.csp.nonce) {
704
+ existNode.nonce = option.csp.nonce;
705
+ }
706
+ if (existNode.innerHTML !== css) {
707
+ existNode.innerHTML = css;
708
+ }
709
+ return existNode;
710
+ }
711
+ var newNode = injectCSS(css, option);
712
+ newNode.setAttribute(getMark(option), key);
713
+ return newNode;
714
+ }
715
+ function _objectSpread$2(target) {
716
+ for (var i = 1; i < arguments.length; i++) {
717
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
718
+ var ownKeys = Object.keys(source);
719
+ if (typeof Object.getOwnPropertySymbols === "function") {
720
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
721
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
722
+ }));
723
+ }
724
+ ownKeys.forEach(function(key) {
725
+ _defineProperty$2(target, key, source[key]);
726
+ });
727
+ }
728
+ return target;
729
+ }
730
+ function _defineProperty$2(obj, key, value) {
731
+ if (key in obj) {
732
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
733
+ } else {
734
+ obj[key] = value;
735
+ }
736
+ return obj;
737
+ }
738
+ function warn(valid, message) {
739
+ if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
740
+ console.error("Warning: ".concat(message));
741
+ }
742
+ }
743
+ function warning(valid, message) {
744
+ warn(valid, "[@ant-design/icons-vue] ".concat(message));
745
+ }
746
+ function isIconDefinition(target) {
747
+ return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
748
+ }
749
+ function generate(node, key, rootProps) {
750
+ if (!rootProps) {
751
+ return h(node.tag, _objectSpread$2({
752
+ key
753
+ }, node.attrs), (node.children || []).map(function(child, index) {
754
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
755
+ }));
756
+ }
757
+ return h(node.tag, _objectSpread$2({
758
+ key
759
+ }, rootProps, node.attrs), (node.children || []).map(function(child, index) {
760
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
761
+ }));
762
+ }
763
+ function getSecondaryColor(primaryColor) {
764
+ return generate$1(primaryColor)[0];
765
+ }
766
+ function normalizeTwoToneColors(twoToneColor) {
767
+ if (!twoToneColor) {
768
+ return [];
769
+ }
770
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
771
+ }
772
+ var svgBaseProps = {
773
+ width: "1em",
774
+ height: "1em",
775
+ fill: "currentColor",
776
+ "aria-hidden": "true",
777
+ focusable: "false"
778
+ };
779
+ var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
780
+ function getRoot(ele) {
781
+ return ele && ele.getRootNode && ele.getRootNode();
782
+ }
783
+ function inShadow(ele) {
784
+ if (!canUseDom()) {
785
+ return false;
786
+ }
787
+ return getRoot(ele) instanceof ShadowRoot;
788
+ }
789
+ function getShadowRoot(ele) {
790
+ return inShadow(ele) ? getRoot(ele) : null;
791
+ }
792
+ var useInsertStyles = function useInsertStyles2() {
793
+ var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, csp = _useInjectIconContext.csp;
794
+ var instance = getCurrentInstance();
795
+ var mergedStyleStr = iconStyles;
796
+ if (prefixCls) {
797
+ mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls.value);
798
+ }
799
+ nextTick(function() {
800
+ if (!canUseDom()) {
801
+ return;
802
+ }
803
+ var ele = instance.vnode.el;
804
+ var shadowRoot = getShadowRoot(ele);
805
+ updateCSS(mergedStyleStr, "@ant-design-vue-icons", {
806
+ prepend: true,
807
+ csp: csp.value,
808
+ attachTo: shadowRoot
809
+ });
810
+ });
811
+ };
812
+ var InsertStyles = defineComponent({
813
+ name: "InsertStyles",
814
+ setup: function setup() {
815
+ useInsertStyles();
816
+ return function() {
817
+ return null;
818
+ };
819
+ }
820
+ });
821
+ var _excluded$1 = ["class", "component", "viewBox", "spin", "rotate", "tabindex", "onClick"];
822
+ function _objectSpread$1(target) {
823
+ for (var i = 1; i < arguments.length; i++) {
824
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
825
+ var ownKeys = Object.keys(source);
826
+ if (typeof Object.getOwnPropertySymbols === "function") {
827
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
828
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
829
+ }));
830
+ }
831
+ ownKeys.forEach(function(key) {
832
+ _defineProperty$1(target, key, source[key]);
833
+ });
834
+ }
835
+ return target;
836
+ }
837
+ function _defineProperty$1(obj, key, value) {
838
+ if (key in obj) {
839
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
840
+ } else {
841
+ obj[key] = value;
842
+ }
843
+ return obj;
844
+ }
845
+ function _objectWithoutProperties$1(source, excluded) {
846
+ if (source == null) return {};
847
+ var target = _objectWithoutPropertiesLoose$1(source, excluded);
848
+ var key, i;
849
+ if (Object.getOwnPropertySymbols) {
850
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
851
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
852
+ key = sourceSymbolKeys[i];
853
+ if (excluded.indexOf(key) >= 0) continue;
854
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
855
+ target[key] = source[key];
856
+ }
857
+ }
858
+ return target;
859
+ }
860
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
861
+ if (source == null) return {};
862
+ var target = {};
863
+ var sourceKeys = Object.keys(source);
864
+ var key, i;
865
+ for (i = 0; i < sourceKeys.length; i++) {
866
+ key = sourceKeys[i];
867
+ if (excluded.indexOf(key) >= 0) continue;
868
+ target[key] = source[key];
869
+ }
870
+ return target;
871
+ }
872
+ var Icon = function Icon2(props, context) {
873
+ var _classString;
874
+ var attrs = context.attrs, slots = context.slots;
875
+ var _props$attrs = _objectSpread$1({}, props, attrs), cls = _props$attrs["class"], Component = _props$attrs.component, viewBox = _props$attrs.viewBox, spin = _props$attrs.spin, rotate = _props$attrs.rotate, tabindex = _props$attrs.tabindex, onClick = _props$attrs.onClick, restProps = _objectWithoutProperties$1(_props$attrs, _excluded$1);
876
+ var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName;
877
+ var children = slots["default"] && slots["default"]();
878
+ var hasChildren = children && children.length;
879
+ var slotsComponent = slots.component;
880
+ warning(Boolean(Component || hasChildren || slotsComponent), "Should have `component` prop/slot or `children`.");
881
+ var classString = (_classString = {}, _defineProperty$1(_classString, rootClassName.value, !!rootClassName.value), _defineProperty$1(_classString, prefixCls.value, true), _classString);
882
+ var svgClassString = _defineProperty$1({}, "".concat(prefixCls.value, "-spin"), spin === "" || !!spin);
883
+ var svgStyle = rotate ? {
884
+ msTransform: "rotate(".concat(rotate, "deg)"),
885
+ transform: "rotate(".concat(rotate, "deg)")
886
+ } : void 0;
887
+ var innerSvgProps = _objectSpread$1({}, svgBaseProps, {
888
+ viewBox,
889
+ "class": svgClassString,
890
+ style: svgStyle
891
+ });
892
+ if (!viewBox) {
893
+ delete innerSvgProps.viewBox;
894
+ }
895
+ var renderInnerNode = function renderInnerNode2() {
896
+ if (Component) {
897
+ return createVNode(Component, innerSvgProps, {
898
+ "default": function _default() {
899
+ return [children];
900
+ }
901
+ });
902
+ }
903
+ if (slotsComponent) {
904
+ return slotsComponent(innerSvgProps);
905
+ }
906
+ if (hasChildren) {
907
+ warning(Boolean(viewBox) || children.length === 1 && children[0] && children[0].type === "use", "Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon.");
908
+ return createVNode("svg", _objectSpread$1({}, innerSvgProps, {
909
+ "viewBox": viewBox
910
+ }), [children]);
911
+ }
912
+ return null;
913
+ };
914
+ var iconTabIndex = tabindex;
915
+ if (iconTabIndex === void 0 && onClick) {
916
+ iconTabIndex = -1;
917
+ restProps.tabindex = iconTabIndex;
918
+ }
919
+ return createVNode("span", _objectSpread$1({
920
+ "role": "img"
921
+ }, restProps, {
922
+ "onClick": onClick,
923
+ "class": [classString, cls]
924
+ }), [renderInnerNode(), createVNode(InsertStyles, null, null)]);
925
+ };
926
+ Icon.props = {
927
+ spin: Boolean,
928
+ rotate: Number,
929
+ viewBox: String,
930
+ ariaLabel: String
931
+ };
932
+ Icon.inheritAttrs = false;
933
+ Icon.displayName = "Icon";
934
+ var _excluded = ["type"];
935
+ function _objectSpread(target) {
936
+ for (var i = 1; i < arguments.length; i++) {
937
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
938
+ var ownKeys = Object.keys(source);
939
+ if (typeof Object.getOwnPropertySymbols === "function") {
940
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
941
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
942
+ }));
943
+ }
944
+ ownKeys.forEach(function(key) {
945
+ _defineProperty(target, key, source[key]);
946
+ });
947
+ }
948
+ return target;
949
+ }
950
+ function _defineProperty(obj, key, value) {
951
+ if (key in obj) {
952
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
953
+ } else {
954
+ obj[key] = value;
955
+ }
956
+ return obj;
957
+ }
958
+ function _objectWithoutProperties(source, excluded) {
959
+ if (source == null) return {};
960
+ var target = _objectWithoutPropertiesLoose(source, excluded);
961
+ var key, i;
962
+ if (Object.getOwnPropertySymbols) {
963
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
964
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
965
+ key = sourceSymbolKeys[i];
966
+ if (excluded.indexOf(key) >= 0) continue;
967
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
968
+ target[key] = source[key];
969
+ }
970
+ }
971
+ return target;
972
+ }
973
+ function _objectWithoutPropertiesLoose(source, excluded) {
974
+ if (source == null) return {};
975
+ var target = {};
976
+ var sourceKeys = Object.keys(source);
977
+ var key, i;
978
+ for (i = 0; i < sourceKeys.length; i++) {
979
+ key = sourceKeys[i];
980
+ if (excluded.indexOf(key) >= 0) continue;
981
+ target[key] = source[key];
982
+ }
983
+ return target;
984
+ }
985
+ var customCache = /* @__PURE__ */ new Set();
986
+ function isValidCustomScriptUrl(scriptUrl) {
987
+ return typeof scriptUrl === "string" && scriptUrl.length && !customCache.has(scriptUrl);
988
+ }
989
+ function createScriptUrlElements(scriptUrls) {
990
+ var index = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
991
+ var currentScriptUrl = scriptUrls[index];
992
+ if (isValidCustomScriptUrl(currentScriptUrl)) {
993
+ var script = document.createElement("script");
994
+ script.setAttribute("src", currentScriptUrl);
995
+ script.setAttribute("data-namespace", currentScriptUrl);
996
+ if (scriptUrls.length > index + 1) {
997
+ script.onload = function() {
998
+ createScriptUrlElements(scriptUrls, index + 1);
999
+ };
1000
+ script.onerror = function() {
1001
+ createScriptUrlElements(scriptUrls, index + 1);
1002
+ };
1003
+ }
1004
+ customCache.add(currentScriptUrl);
1005
+ document.body.appendChild(script);
1006
+ }
1007
+ }
1008
+ function create() {
1009
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1010
+ var scriptUrl = options.scriptUrl, _options$extraCommonP = options.extraCommonProps, extraCommonProps = _options$extraCommonP === void 0 ? {} : _options$extraCommonP;
1011
+ if (typeof document !== "undefined" && typeof window !== "undefined" && typeof document.createElement === "function") {
1012
+ if (Array.isArray(scriptUrl)) {
1013
+ createScriptUrlElements(scriptUrl.reverse());
1014
+ } else {
1015
+ createScriptUrlElements([scriptUrl]);
1016
+ }
1017
+ }
1018
+ var Iconfont = function Iconfont2(props, context) {
1019
+ var attrs = context.attrs, slots = context.slots;
1020
+ var _props$attrs = _objectSpread({}, props, attrs), type = _props$attrs.type, restProps = _objectWithoutProperties(_props$attrs, _excluded);
1021
+ var children = slots["default"] && slots["default"]();
1022
+ var content = null;
1023
+ if (type) {
1024
+ content = createVNode("use", {
1025
+ "xlink:href": "#".concat(type)
1026
+ }, null);
1027
+ }
1028
+ if (children && children.length) {
1029
+ content = children;
1030
+ }
1031
+ var iconProps = _objectSpread({}, extraCommonProps, restProps);
1032
+ return createVNode(Icon, iconProps, {
1033
+ "default": function _default() {
1034
+ return [content];
1035
+ }
1036
+ });
1037
+ };
1038
+ Iconfont.props = {
1039
+ spin: Boolean,
1040
+ rotate: Number,
1041
+ type: String
1042
+ };
1043
+ Iconfont.inheritAttrs = false;
1044
+ Iconfont.displayName = "Iconfont";
1045
+ return Iconfont;
1046
+ }
1047
+ const IconFontBase = create({
1048
+ scriptUrl: "https://cdn-static.gitcode.com/js/font_4205092_r3cadi6bovm.js"
1049
+ });
1050
+ const IconFont = defineComponent({
1051
+ name: "IconFont",
1052
+ props: {
1053
+ /**
1054
+ * 图标类型/名称
1055
+ */
1056
+ type: {
1057
+ type: String,
1058
+ required: true
1059
+ },
1060
+ /**
1061
+ * 图标大小,支持数字或字符串(如 '16px'、'1em')
1062
+ */
1063
+ size: {
1064
+ type: [Number, String],
1065
+ default: void 0
1066
+ }
1067
+ },
1068
+ setup(props, { attrs }) {
1069
+ return () => {
1070
+ const sizeStyle = props.size ? { fontSize: typeof props.size === "number" ? `${props.size}px` : props.size } : {};
1071
+ const existingStyle = attrs.style || {};
1072
+ const mergedStyle = { ...existingStyle, ...sizeStyle };
1073
+ return h(IconFontBase, {
1074
+ ...attrs,
1075
+ type: props.type,
1076
+ style: mergedStyle
1077
+ });
1078
+ };
1079
+ }
1080
+ });
1081
+ export {
1082
+ IconFont as I,
1083
+ generate as a,
1084
+ InsertStyles as b,
1085
+ blue as c,
1086
+ IconFontBase as d,
1087
+ getSecondaryColor as g,
1088
+ isIconDefinition as i,
1089
+ normalizeTwoToneColors as n,
1090
+ useInjectIconContext as u,
1091
+ warning as w
1092
+ };