@das-fed/upf-utils 6.4.0-dev.262 → 6.4.0-dev.264

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 (99) hide show
  1. package/api-services/es5.js +1769 -2236
  2. package/api-services/index.js +1250 -1574
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +1390 -1868
  5. package/api-services/modules/app-manage/index.js +1101 -1442
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +1553 -2007
  8. package/api-services/modules/authentication/index.js +1256 -1561
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +1350 -1828
  11. package/api-services/modules/bems/index.js +1056 -1397
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +1483 -1949
  14. package/api-services/modules/contract/index.js +1186 -1509
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +1354 -1820
  17. package/api-services/modules/duty-manage/index.js +1043 -1366
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +1553 -2007
  20. package/api-services/modules/enterpriseright/index.js +1256 -1561
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +2208 -2675
  23. package/api-services/modules/file/es5.js +1906 -2385
  24. package/api-services/modules/file/index.js +1421 -1763
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +1350 -1816
  27. package/api-services/modules/gateway-edge/index.js +1039 -1362
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1667 -1991
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +1549 -2015
  32. package/api-services/modules/iot/index.js +1232 -1555
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +1347 -1813
  35. package/api-services/modules/justauth/index.js +1035 -1358
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +1343 -1809
  38. package/api-services/modules/knowledge/index.js +1033 -1356
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +1553 -2007
  41. package/api-services/modules/link/index.js +1256 -1561
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +1392 -1867
  44. package/api-services/modules/permission/index.js +1104 -1441
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +1363 -1829
  47. package/api-services/modules/platformManage/index.js +1046 -1369
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +1350 -1816
  50. package/api-services/modules/portal/index.js +1039 -1362
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +1353 -1816
  53. package/api-services/modules/space-manage/index.js +1043 -1362
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +1559 -2013
  56. package/api-services/modules/super-admin/index.js +1259 -1564
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +1345 -1811
  59. package/api-services/modules/supplier/index.js +1032 -1355
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +1483 -1949
  62. package/api-services/modules/supplychain-manage/index.js +1186 -1509
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +1341 -1807
  65. package/api-services/modules/systemConfiguration/index.js +1030 -1353
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +1390 -1868
  68. package/api-services/modules/tool/index.js +1101 -1442
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +1397 -1875
  71. package/api-services/src/create-service/index.js +1109 -1450
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +1890 -2366
  74. package/common-info/getPermissionMethod/es5.js +1465 -1928
  75. package/common-info/getPermissionMethod/index.js +1121 -1440
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +1462 -1799
  78. package/common-info/index.js.gz +0 -0
  79. package/common-tools/timezone-format/es5.d.ts +1 -34
  80. package/common-tools/timezone-format/es5.js +450 -625
  81. package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +3 -4
  82. package/common-tools/timezone-format/index.d.ts +1 -34
  83. package/common-tools/timezone-format/index.js +317 -437
  84. package/common-tools/timezone-format/index.js.gz +0 -0
  85. package/create-api-service/es5.js +1551 -2008
  86. package/create-api-service/index.js +1255 -1564
  87. package/create-api-service/index.js.gz +0 -0
  88. package/esm-map.json +5 -15
  89. package/package.json +3 -3
  90. package/theme/es5.d.ts +22 -8
  91. package/theme/es5.js +367 -354
  92. package/theme/index.d.ts +22 -8
  93. package/theme/index.js +276 -255
  94. package/theme/index.js.gz +0 -0
  95. package/common-tools/timezone-format/get-iana-data/es5.d.ts +0 -3
  96. package/common-tools/timezone-format/get-iana-data/es5.js +0 -353
  97. package/common-tools/timezone-format/get-iana-data/index.d.ts +0 -3
  98. package/common-tools/timezone-format/get-iana-data/index.js +0 -213
  99. package/common-tools/timezone-format/get-iana-data/index.js.gz +0 -0
package/theme/index.js CHANGED
@@ -1,9 +1,10 @@
1
- import { bus as se } from "@das-fed/mframe";
2
- const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
1
+ import { bus as pe } from "@das-fed/mframe";
2
+ import { ref as me, onMounted as de, onUnmounted as ge } from "vue";
3
+ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
3
4
  const r = String(e || "").trim();
4
5
  return /^#([\da-f]{3}|[\da-f]{6})$/i.test(r) ? r.length === 4 ? `#${r.slice(1).split("").map((t) => `${t}${t}`).join("")}` : r : "";
5
- }, B = (e) => {
6
- const r = X(e);
6
+ }, D = (e) => {
7
+ const r = re(e);
7
8
  if (!r)
8
9
  return null;
9
10
  const t = r.slice(1);
@@ -12,19 +13,19 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
12
13
  green: Number.parseInt(t.slice(2, 4), 16),
13
14
  blue: Number.parseInt(t.slice(4, 6), 16)
14
15
  };
15
- }, H = (e) => Math.min(255, Math.max(0, Math.round(e))), Q = (e, r, t, o) => {
16
- const u = B(e), n = B(r);
16
+ }, V = (e) => Math.min(255, Math.max(0, Math.round(e))), te = (e, r, t, o) => {
17
+ const u = D(e), n = D(r);
17
18
  if (!u || !n)
18
19
  return o;
19
- const l = Math.min(1, Math.max(0, t)), i = H(u.red * l + n.red * (1 - l)), s = H(u.green * l + n.green * (1 - l)), c = H(u.blue * l + n.blue * (1 - l));
20
+ const l = Math.min(1, Math.max(0, t)), i = V(u.red * l + n.red * (1 - l)), s = V(u.green * l + n.green * (1 - l)), c = V(u.blue * l + n.blue * (1 - l));
20
21
  return `#${[i, s, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
21
- }, ce = (e, r, t) => {
22
- const o = B(e);
22
+ }, he = (e, r, t) => {
23
+ const o = D(e);
23
24
  if (!o)
24
25
  return t;
25
26
  const u = Math.min(1, Math.max(0, r));
26
27
  return `rgba(${o.red}, ${o.green}, ${o.blue}, ${u})`;
27
- }, D = (e, r = m) => Q(e || "#5582F3", r || m, fe, "#ebf1fe"), z = "#5582f3", j = "#e63946", pe = [
28
+ }, R = (e, r = m) => te(e || "#5582F3", r || m, be, "#ebf1fe"), W = "#5582f3", G = "#e63946", ye = [
28
29
  {
29
30
  group: "foundation",
30
31
  name: "brand",
@@ -107,7 +108,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
107
108
  description: "圆角和阴影等样式效果",
108
109
  variables: ["--upf-border-radius", "--upf-box-shadow", "--upf-box-shadow-elevated"]
109
110
  }
110
- ], S = [
111
+ ], F = [
111
112
  { name: "--upf-brand-primary", label: "品牌主色", hint: "品牌主色,建议用于导航背景、Logo等品牌识别场景", category: "brand" },
112
113
  { name: "--upf-brand-secondary", label: "品牌辅色", hint: "品牌辅色,用于辅助品牌识别和强调元素", category: "brand" },
113
114
  { name: "--upf-color-primary", label: "主色", hint: "功能主色,用于按钮、交互元素、状态反馈", category: "basic" },
@@ -116,7 +117,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
116
117
  label: "主色高亮背景",
117
118
  hint: "主色配套高亮背景,默认跟随主色自动生成透明背景,也可手动覆盖",
118
119
  category: "basic",
119
- fallback: (e) => D(e["--upf-color-primary"], e["--upf-bg-primary"]),
120
+ fallback: (e) => R(e["--upf-color-primary"], e["--upf-bg-primary"]),
120
121
  fallbackDeps: ["--upf-color-primary", "--upf-bg-primary"]
121
122
  },
122
123
  { name: "--upf-color-success", label: "成功色", hint: "成功状态色,用于成功提示、成功按钮", category: "basic" },
@@ -160,14 +161,14 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
160
161
  { name: "--upf-border-radius", label: "圆角", hint: "圆角大小,用于组件圆角", category: "effect" },
161
162
  { name: "--upf-box-shadow", label: "阴影", hint: "阴影效果,用于普通阴影", category: "effect" },
162
163
  { name: "--upf-box-shadow-elevated", label: "浮层阴影", hint: "浮层阴影,用于弹窗、浮层阴影", category: "effect" }
163
- ], me = S.map((e) => e.name), de = S.reduce((e, r) => (e[r.name] = r.label, e), {}), ge = S.reduce((e, r) => (e[r.name] = r.hint, e), {}), be = {
164
+ ], ve = F.map((e) => e.name), xe = F.reduce((e, r) => (e[r.name] = r.label, e), {}), Ee = F.reduce((e, r) => (e[r.name] = r.hint, e), {}), Te = {
164
165
  "--upf-nav-bg": "--upf-brand-primary",
165
166
  "--upf-color-primary-bg": "--upf-color-primary",
166
167
  "--upf-menu-active-text": "--upf-color-primary",
167
168
  "--upf-tab-active-text": "--upf-color-primary"
168
- }, v = {
169
- "--upf-color-primary": z,
170
- "--upf-color-primary-bg": D(z),
169
+ }, x = {
170
+ "--upf-color-primary": W,
171
+ "--upf-color-primary-bg": R(W),
171
172
  "--upf-color-success": "#52c41a",
172
173
  "--upf-color-warning": "#faad14",
173
174
  "--upf-color-error": "#ff4d4f",
@@ -182,9 +183,9 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
182
183
  "--upf-tab-text": "#666666",
183
184
  "--upf-tab-active-bg": "#ffffff",
184
185
  "--upf-border-radius": "4px"
185
- }, y = {
186
+ }, h = {
186
187
  default: {
187
- ...v,
188
+ ...x,
188
189
  "--upf-brand-primary": "#0e5fd8",
189
190
  "--upf-brand-secondary": "#3579de",
190
191
  "--upf-text-primary": "#231815",
@@ -209,7 +210,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
209
210
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
210
211
  },
211
212
  cjb: {
212
- ...v,
213
+ ...x,
213
214
  "--upf-brand-primary": "#ffffff",
214
215
  "--upf-brand-secondary": "#f2f6ff",
215
216
  "--upf-text-primary": "#212121",
@@ -234,7 +235,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
234
235
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
235
236
  },
236
237
  ssl: {
237
- ...v,
238
+ ...x,
238
239
  "--upf-brand-primary": "#1f2346",
239
240
  "--upf-brand-secondary": "#2d3158",
240
241
  "--upf-text-primary": "#231815",
@@ -260,11 +261,11 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
260
261
  "--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
261
262
  },
262
263
  dkh: {
263
- ...v,
264
+ ...x,
264
265
  "--upf-brand-primary": "#eb0e1b",
265
266
  "--upf-brand-secondary": "#f15760",
266
- "--upf-color-primary": j,
267
- "--upf-color-primary-bg": D(j),
267
+ "--upf-color-primary": G,
268
+ "--upf-color-primary-bg": R(G),
268
269
  "--upf-text-primary": "#231815",
269
270
  "--upf-text-secondary": "#666666",
270
271
  "--upf-text-placeholder": "#bfbfbf",
@@ -286,7 +287,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
286
287
  "--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
287
288
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
288
289
  }
289
- }, he = (e, r) => {
290
+ }, Ce = (e, r) => {
290
291
  if (!r)
291
292
  return "";
292
293
  if (typeof r == "function")
@@ -298,83 +299,40 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
298
299
  return u;
299
300
  }
300
301
  return "";
301
- }, $ = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), br = () => [...me], hr = () => ({ ...de }), yr = () => ({ ...ge }), vr = () => pe.map((e) => ({
302
+ }, Y = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), pr = () => [...ve], mr = () => ({ ...xe }), dr = () => ({ ...Ee }), gr = () => ye.map((e) => ({
302
303
  ...e,
303
304
  variables: [...e.variables]
304
- })), xr = () => ({ ...be }), ye = (e, r = y.default) => {
305
- const t = $(e), o = $(r), u = {
305
+ })), br = () => ({ ...Te }), Se = (e, r = h.default) => {
306
+ const t = Y(e), o = Y(r), u = {
306
307
  ...o,
307
308
  ...t
308
309
  };
309
- return S.reduce((n, l) => {
310
+ return F.reduce((n, l) => {
310
311
  var p;
311
- const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((U) => !!t[U]), c = he({ ...u, ...n }, l.fallback);
312
+ const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((K) => !!t[K]), c = Ce({ ...u, ...n }, l.fallback);
312
313
  return n[l.name] = i || (s ? c : "") || o[l.name] || c, n;
313
314
  }, {});
314
- }, ve = y.cjb, xe = {
315
- name: "cjb",
316
- displayName: "纯净白",
317
- description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
318
- mode: "light",
319
- source: "preset",
320
- basePresetName: "cjb",
321
- variables: ve
322
- }, Ee = y.default, Te = {
323
- name: "default",
324
- displayName: "经典蓝",
325
- description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
326
- mode: "light",
327
- source: "preset",
328
- basePresetName: "default",
329
- variables: Ee
330
- }, Ce = y.dkh, Se = {
331
- name: "dkh",
332
- displayName: "大咖红",
333
- description: "大咖红主题,壳层与内容交互色保持同系红色",
334
- mode: "light",
335
- source: "preset",
336
- basePresetName: "dkh",
337
- variables: Ce
338
- }, we = y.ssl, Fe = {
339
- name: "ssl",
340
- displayName: "深邃蓝",
341
- description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
342
- mode: "dark",
343
- source: "preset",
344
- basePresetName: "ssl",
345
- variables: we
346
- }, _e = ["default", "cjb", "ssl", "dkh"], R = {
347
- default: Te,
348
- cjb: xe,
349
- ssl: Fe,
350
- dkh: Se
351
- }, Ne = (e) => ({ ...e }), Z = (e) => ({
352
- ...e,
353
- variables: Ne(e.variables)
354
- }), g = (e) => {
355
- const r = String(e || "").trim();
356
- return R[r] ? Z(R[r]) : void 0;
357
- }, Ae = () => _e.map((e) => Z(R[e])), ee = (e) => e, a = (e, r) => {
358
- const t = ee(e);
315
+ }, oe = (e) => e, a = (e, r) => {
316
+ const t = oe(e);
359
317
  return String((r ? t[r] : "") ?? "");
360
318
  }, f = (e, r) => r.map((t) => ({ target: t, from: e })), M = (e) => {
361
- const r = ee(e);
319
+ const r = oe(e);
362
320
  return {
363
321
  ...Object.entries(r).reduce((o, [u, n]) => (o[u] = String(n ?? ""), o), {}),
364
- ...ye(r)
322
+ ...Se(r)
365
323
  };
366
- }, ke = {
324
+ }, we = {
367
325
  "#5582f3": "#3761CA",
368
326
  "#e63946": "#C9303C"
369
- }, K = (e, r) => {
327
+ }, q = (e, r) => {
370
328
  const t = e || "#5582F3";
371
- return ke[X(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
372
- }, He = "#999", Ve = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), Be = (e) => Ve(e) ? He : a(e.variables, "--upf-color-primary"), Re = (e) => Array.isArray(e) ? [...e] : [e], w = (e, r, t = {}) => r.reduce((o, u) => {
373
- const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: Q, toRgbaColor: ce, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
374
- return Re(u.target).forEach((l) => {
329
+ return we[re(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
330
+ }, Fe = "#999", Ne = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), ke = (e) => Ne(e) ? Fe : a(e.variables, "--upf-color-primary"), _e = (e) => Array.isArray(e) ? [...e] : [e], N = (e, r, t = {}) => r.reduce((o, u) => {
331
+ const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: te, toRgbaColor: he, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
332
+ return _e(u.target).forEach((l) => {
375
333
  o[l] = String(n ?? "");
376
334
  }), o;
377
- }, {}), De = [
335
+ }, {}), Ae = [
378
336
  { target: "--upf-primary", from: "--upf-color-primary" },
379
337
  { target: "--upf-text", from: "--upf-text-primary" },
380
338
  { target: "--upf-surface", from: "--upf-bg-primary" },
@@ -384,7 +342,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
384
342
  { target: "--upf-menu-item-hover-bg", from: "--upf-menu-hover-bg" },
385
343
  { target: "--upf-menu-item-active-bg", from: "--upf-menu-active-bg" },
386
344
  { target: "--upf-menu-item-active-text", from: "--upf-menu-active-text" }
387
- ], Me = [
345
+ ], He = [
388
346
  { target: "--el-color-primary", from: "--upf-color-primary" },
389
347
  { target: "--el-color-success", from: "--upf-color-success" },
390
348
  { target: "--el-color-warning", from: "--upf-color-warning" },
@@ -417,7 +375,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
417
375
  target: "--el-checkbox-input-border",
418
376
  resolve: ({ variables: e }) => `1px solid ${a(e, "--upf-border-color")}`
419
377
  }
420
- ], Pe = [
378
+ ], Ve = [
421
379
  { target: "--das-ui-color-primary-level1", from: "--upf-color-primary-bg" },
422
380
  ...f("--upf-color-primary-bg", [
423
381
  "--das-ui-color-primary-level1",
@@ -501,7 +459,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
501
459
  { target: "--das-input-base-border-color", from: "--upf-border-color" },
502
460
  {
503
461
  target: ["--upf-form-active-border-color", "--das-input-active-border-color", "--upf-date-picker-active-border-color"],
504
- resolve: Be
462
+ resolve: ke
505
463
  },
506
464
  { target: "--das-input-font-color", from: "--upf-text-primary" },
507
465
  { target: "--das-input-sub-font-color", from: "--upf-text-placeholder" },
@@ -730,7 +688,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
730
688
  { target: "--das-ui-layout-aside-menu-expired-color", from: "--upf-text-disabled" },
731
689
  { target: "--das-ui-layout-aside-menu-top-left-icon-color", from: "--upf-color-primary" },
732
690
  { target: "--das-ui-layout-aside-menu-top-right-icon-color", from: "--upf-text-secondary" }
733
- ], Ie = [
691
+ ], Be = [
734
692
  // 同源变量集中维护,新增 target 时优先追加到对应 source 分组。
735
693
  ...f("--upf-color-primary", [
736
694
  "--upf-button-primary",
@@ -793,7 +751,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
793
751
  },
794
752
  {
795
753
  target: "--upf-button-active",
796
- resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
754
+ resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
797
755
  },
798
756
  {
799
757
  target: "--upf-button-disabled",
@@ -809,7 +767,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
809
767
  },
810
768
  {
811
769
  target: "--upf-button-set-active",
812
- resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
770
+ resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
813
771
  },
814
772
  {
815
773
  target: "--upf-button-set-disabled",
@@ -1013,69 +971,112 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
1013
971
  },
1014
972
  { target: "--upf-app-container-app-bg-override", from: "--upf-nav-bg" },
1015
973
  { target: "--upf-app-container-app-text-override", from: "--upf-nav-text" }
1016
- ], Oe = (e, r = {}) => w(e, De, r), Le = (e, r = {}) => w(e, Me, r), Ue = (e, r = {}) => w(e, Pe, r), ze = (e, r = {}) => w(e, Ie, r), P = (e, r = {}) => {
1017
- const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = ze(t, l), s = {
974
+ ], De = (e, r = {}) => N(e, Ae, r), Re = (e, r = {}) => N(e, He, r), Me = (e, r = {}) => N(e, Ve, r), Oe = (e, r = {}) => N(e, Be, r), O = (e, r = {}) => {
975
+ const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = Oe(t, l), s = {
1018
976
  ...t,
1019
977
  ...i
1020
978
  };
1021
979
  return {
1022
980
  ...t,
1023
981
  ...i,
1024
- ...o ? Le(s, l) : {},
1025
- ...o ? Ue(s, l) : {},
1026
- ...Oe(s, l)
982
+ ...o ? Re(s, l) : {},
983
+ ...o ? Me(s, l) : {},
984
+ ...De(s, l)
1027
985
  };
1028
- }, W = "themeChange", T = "upf-theme-root-vars", je = "upf-default-theme-vars", C = "upf-theme-config", $e = ["--upf-color-primary", "--upf-brand-primary"], G = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), h = /* @__PURE__ */ new WeakMap(), E = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, Er = (e) => g(e), Tr = () => Ae(), F = () => g("default"), Cr = () => ({ ...F().variables }), I = (e) => e || (typeof document > "u" ? null : document.documentElement), re = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), _ = (e) => e.head || e.documentElement, te = (e, r) => {
1029
- const t = _(e);
986
+ }, Pe = ["default", "cjb", "ssl", "dkh"], y = (e) => ({ ...e }), C = {
987
+ default: {
988
+ name: "default",
989
+ displayName: "经典蓝",
990
+ description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
991
+ mode: "light",
992
+ source: "preset",
993
+ basePresetName: "default",
994
+ variables: y(h.default)
995
+ },
996
+ cjb: {
997
+ name: "cjb",
998
+ displayName: "纯净白",
999
+ description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
1000
+ mode: "light",
1001
+ source: "preset",
1002
+ basePresetName: "cjb",
1003
+ variables: y(h.cjb)
1004
+ },
1005
+ ssl: {
1006
+ name: "ssl",
1007
+ displayName: "深邃蓝",
1008
+ description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
1009
+ mode: "dark",
1010
+ source: "preset",
1011
+ basePresetName: "ssl",
1012
+ variables: y(h.ssl)
1013
+ },
1014
+ dkh: {
1015
+ name: "dkh",
1016
+ displayName: "大咖红",
1017
+ description: "大咖红主题,壳层与内容交互色保持同系红色",
1018
+ mode: "light",
1019
+ source: "preset",
1020
+ basePresetName: "dkh",
1021
+ variables: y(h.dkh)
1022
+ }
1023
+ }, P = (e) => ({
1024
+ ...e,
1025
+ variables: y(e.variables)
1026
+ }), v = (e) => {
1027
+ const r = String(e || "").trim();
1028
+ return C[r] ? P(C[r]) : void 0;
1029
+ }, hr = () => Pe.map((e) => P(C[e])), I = () => P(C.default), J = "themeChange", S = "upf-theme-root-vars", Ie = "upf-default-theme-vars", w = "upf-theme-config", Le = ["--upf-color-primary", "--upf-brand-primary"], X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), b = /* @__PURE__ */ new WeakMap(), T = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, L = (e) => e || (typeof document > "u" ? null : document.documentElement), ae = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), k = (e) => e.head || e.documentElement, ue = (e, r) => {
1030
+ const t = k(e);
1030
1031
  t && (r.parentNode !== t || t.lastElementChild !== r) && t.appendChild(r);
1031
- }, q = (e) => {
1032
+ }, Z = (e) => {
1032
1033
  var u;
1033
- if (Y.has(e))
1034
+ if (Q.has(e))
1034
1035
  return;
1035
- const r = _(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1036
+ const r = k(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1036
1037
  if (!r || !t)
1037
1038
  return;
1038
1039
  new t(() => {
1039
- const n = e.getElementById(T);
1040
- re(n) && te(e, n);
1041
- }).observe(r, { childList: !0 }), Y.add(e);
1042
- }, Ke = (e) => {
1043
- const r = e.getElementById(T);
1044
- if (re(r))
1045
- return te(e, r), q(e), r;
1040
+ const n = e.getElementById(S);
1041
+ ae(n) && ue(e, n);
1042
+ }).observe(r, { childList: !0 }), Q.add(e);
1043
+ }, Ue = (e) => {
1044
+ const r = e.getElementById(S);
1045
+ if (ae(r))
1046
+ return ue(e, r), Z(e), r;
1046
1047
  const t = e.createElement("style");
1047
- return t.id = T, _(e).appendChild(t), q(e), t;
1048
- }, O = (e) => {
1048
+ return t.id = S, k(e).appendChild(t), Z(e), t;
1049
+ }, U = (e) => {
1049
1050
  const r = Object.entries(e).filter(([, t]) => String(t ?? "").trim()).map(([t, o]) => ` ${t}: ${String(o ?? "")};`).join(`
1050
1051
  `);
1051
1052
  return r ? `:root {
1052
1053
  ${r}
1053
1054
  }` : ":root {}";
1054
- }, We = (e = "default", r = {}) => {
1055
- const t = g(e) || F();
1056
- return O(P(t.variables, {
1055
+ }, ze = (e = "default", r = {}) => {
1056
+ const t = v(e) || I();
1057
+ return U(O(t.variables, {
1057
1058
  ...r,
1058
1059
  themeName: r.themeName || t.name,
1059
1060
  basePresetName: r.basePresetName || t.basePresetName
1060
1061
  }));
1061
- }, Sr = (e = {}) => We("default", e), Ge = (e) => {
1062
- const r = e.getElementById(T);
1062
+ }, yr = (e = {}) => ze("default", e), je = (e) => {
1063
+ const r = e.getElementById(S);
1063
1064
  if (r != null && r.textContent)
1064
1065
  return !0;
1065
- const t = h.get(e) || h.get(e.documentElement);
1066
+ const t = b.get(e) || b.get(e.documentElement);
1066
1067
  return !!(t && Object.keys(t).length);
1067
- }, Ye = (e) => {
1068
+ }, $e = (e) => {
1068
1069
  var o;
1069
1070
  const r = ((o = e.defaultView) == null ? void 0 : o.getComputedStyle) || (typeof getComputedStyle == "function" ? getComputedStyle : void 0);
1070
1071
  if (!r || !e.documentElement)
1071
1072
  return !1;
1072
1073
  const t = r(e.documentElement);
1073
- return $e.some((u) => t.getPropertyValue(u).trim());
1074
- }, L = (e) => Object.prototype.toString.call(e) === "[object Object]", N = (e) => ({
1074
+ return Le.some((u) => t.getPropertyValue(u).trim());
1075
+ }, z = (e) => Object.prototype.toString.call(e) === "[object Object]", _ = (e) => ({
1075
1076
  themeName: e.name,
1076
1077
  basePresetName: e.basePresetName,
1077
1078
  variables: e.variables
1078
- }), x = () => N(F()), oe = (e) => {
1079
+ }), E = () => _(I()), ne = (e) => {
1079
1080
  if (typeof window > "u")
1080
1081
  return null;
1081
1082
  try {
@@ -1083,31 +1084,31 @@ ${r}
1083
1084
  if (!r)
1084
1085
  return null;
1085
1086
  const t = JSON.parse(r);
1086
- return L(t) ? t : null;
1087
+ return z(t) ? t : null;
1087
1088
  } catch {
1088
1089
  return null;
1089
1090
  }
1090
- }, qe = (e, r) => {
1091
- if (!L(e))
1091
+ }, Ke = (e, r) => {
1092
+ if (!z(e))
1092
1093
  return null;
1093
1094
  const t = { ...r };
1094
1095
  return Object.entries(e).forEach(([o, u]) => {
1095
1096
  !o.startsWith("--") || typeof u != "string" && typeof u != "number" || (t[o] = String(u));
1096
1097
  }), M(t);
1097
- }, ae = (e) => {
1098
- const r = L(e.customTheme) ? e.customTheme : null;
1098
+ }, le = (e) => {
1099
+ const r = z(e.customTheme) ? e.customTheme : null;
1099
1100
  if (!r)
1100
1101
  return null;
1101
- const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = g(t) || F(), u = qe(r.variables, o.variables);
1102
+ const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = v(t) || I(), u = Ke(r.variables, o.variables);
1102
1103
  return u ? {
1103
1104
  themeName: "custom",
1104
1105
  basePresetName: o.name,
1105
1106
  variables: u
1106
1107
  } : null;
1107
- }, Je = (e) => {
1108
+ }, We = (e) => {
1108
1109
  if (!e.useStoredTheme)
1109
1110
  return null;
1110
- const r = String(e.storageKey || C).trim() || C, t = oe(r);
1111
+ const r = String(e.storageKey || w).trim() || w, t = ne(r);
1111
1112
  if (!t)
1112
1113
  return null;
1113
1114
  const o = [t.currentTheme, t.remoteTheme];
@@ -1116,61 +1117,61 @@ ${r}
1116
1117
  if (!n)
1117
1118
  continue;
1118
1119
  if (n === "custom") {
1119
- const i = ae(t);
1120
+ const i = le(t);
1120
1121
  if (i)
1121
1122
  return i;
1122
1123
  continue;
1123
1124
  }
1124
- const l = g(n);
1125
+ const l = v(n);
1125
1126
  if (l)
1126
- return N(l);
1127
+ return _(l);
1127
1128
  }
1128
1129
  return null;
1129
- }, Xe = (e) => {
1130
+ }, Ge = (e) => {
1130
1131
  const r = e.documentElement, t = [r.getAttribute("data-theme"), r.getAttribute("data-skin")];
1131
1132
  for (const o of t) {
1132
- const u = g(String(o || "").trim());
1133
+ const u = v(String(o || "").trim());
1133
1134
  if (u)
1134
- return N(u);
1135
+ return _(u);
1135
1136
  }
1136
1137
  return null;
1137
- }, Qe = (e, r) => {
1138
+ }, Ye = (e, r) => {
1138
1139
  const t = String(r.presetName || "").trim();
1139
1140
  if (t) {
1140
1141
  if (t === "custom") {
1141
1142
  if (r.useStoredTheme === !1)
1142
- return x();
1143
- const u = String(r.storageKey || C).trim() || C, n = oe(u);
1144
- return (n ? ae(n) : null) || x();
1143
+ return E();
1144
+ const u = String(r.storageKey || w).trim() || w, n = ne(u);
1145
+ return (n ? le(n) : null) || E();
1145
1146
  }
1146
- const o = g(t);
1147
- return o ? N(o) : x();
1147
+ const o = v(t);
1148
+ return o ? _(o) : E();
1148
1149
  }
1149
- return Xe(e) || Je(r) || x();
1150
- }, Ze = (e, r) => {
1151
- const t = _(e);
1150
+ return Ge(e) || We(r) || E();
1151
+ }, qe = (e, r) => {
1152
+ const t = k(e);
1152
1153
  (r.parentNode !== t || t.firstChild !== r) && t.insertBefore(r, t.firstChild);
1153
- }, wr = (e = {}) => {
1154
+ }, vr = (e = {}) => {
1154
1155
  var p;
1155
1156
  if (typeof document > "u")
1156
1157
  return null;
1157
- const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Qe(r, e), o = e.styleId || je;
1158
- if (!e.force && Ge(r))
1158
+ const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Ye(r, e), o = e.styleId || Ie;
1159
+ if (!e.force && je(r))
1159
1160
  return null;
1160
1161
  const u = r.getElementById(o);
1161
- if (!e.force && !u && Ye(r))
1162
+ if (!e.force && !u && $e(r))
1162
1163
  return null;
1163
1164
  const n = u || r.createElement("style");
1164
1165
  n.id || (n.id = o);
1165
- const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = O(P(t.variables, {
1166
+ const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = U(O(t.variables, {
1166
1167
  includeElementAndDasUiBridges: e.includeElementAndDasUiBridges,
1167
1168
  themeName: l,
1168
1169
  basePresetName: i
1169
1170
  }));
1170
- n.textContent !== s && (n.textContent = s), Ze(r, n);
1171
+ n.textContent !== s && (n.textContent = s), qe(r, n);
1171
1172
  const { setThemeAttributes: c = !0 } = e;
1172
1173
  return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme", l), e.skinName !== null && !r.documentElement.getAttribute("data-skin") && r.documentElement.setAttribute("data-skin", e.skinName || i)), n;
1173
- }, J = (e, r) => {
1174
+ }, ee = (e, r) => {
1174
1175
  if (!e.length || !r.length)
1175
1176
  return;
1176
1177
  const t = new Set(r);
@@ -1178,22 +1179,22 @@ ${r}
1178
1179
  const u = e[o];
1179
1180
  t.has(u) && e.removeProperty(u);
1180
1181
  }
1181
- }, er = (e, r) => {
1182
- const t = Ke(e), o = O(r);
1183
- (G.get(e) !== o || t.textContent !== o) && (t.textContent = o, G.set(e, o));
1182
+ }, Je = (e, r) => {
1183
+ const t = Ue(e), o = U(r);
1184
+ (X.get(e) !== o || t.textContent !== o) && (t.textContent = o, X.set(e, o));
1184
1185
  const u = Object.keys(r);
1185
- J(e.documentElement.style, u), e.body && J(e.body.style, u);
1186
- }, rr = (e) => {
1186
+ ee(e.documentElement.style, u), e.body && ee(e.body.style, u);
1187
+ }, Xe = (e) => {
1187
1188
  typeof window > "u" || (window.__UPF_THEME_SNAPSHOT__ = e);
1188
- }, tr = (e, r) => {
1189
- const t = E(r) || {}, o = e.ownerDocument || document;
1190
- h.set(e, t);
1189
+ }, Qe = (e, r) => {
1190
+ const t = T(r) || {}, o = e.ownerDocument || document;
1191
+ b.set(e, t);
1191
1192
  const u = e === o.documentElement || e === o.body;
1192
- u && h.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
1193
- }, or = (e) => {
1194
- const r = I(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1195
- return (r ? h.get(r) : null) || (t ? h.get(t) : null) || o;
1196
- }, ar = (e = !0) => {
1193
+ u && b.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
1194
+ }, Ze = (e) => {
1195
+ const r = L(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1196
+ return (r ? b.get(r) : null) || (t ? b.get(t) : null) || o;
1197
+ }, er = (e = !0) => {
1197
1198
  var r;
1198
1199
  if (typeof window > "u" || !window.name)
1199
1200
  return null;
@@ -1208,163 +1209,183 @@ ${r}
1208
1209
  } catch {
1209
1210
  return null;
1210
1211
  }
1211
- }, ur = (e, r) => {
1212
+ }, rr = (e, r) => {
1212
1213
  if (r !== void 0)
1213
1214
  return r;
1214
1215
  const t = e.config || {};
1215
1216
  return String(t.basePresetName || t.name || e.themeName || "").trim() || null;
1216
- }, nr = (e, r = {}) => {
1217
- const t = I(r.root);
1217
+ }, tr = (e, r = {}) => {
1218
+ const t = L(r.root);
1218
1219
  if (!t)
1219
1220
  return {};
1220
- const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : P(o, {
1221
+ const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : O(o, {
1221
1222
  includeElementAndDasUiBridges: r.includeElementAndDasUiBridges,
1222
1223
  themeName: r.themeName,
1223
1224
  basePresetName: r.basePresetName
1224
1225
  }), n = t.ownerDocument || document;
1225
- return t === n.documentElement || t === n.body ? er(n, u) : Object.entries(u).forEach(([l, i]) => {
1226
+ return t === n.documentElement || t === n.body ? Je(n, u) : Object.entries(u).forEach(([l, i]) => {
1226
1227
  t.style.getPropertyValue(l) !== i && t.style.setProperty(l, i);
1227
- }), tr(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1228
- }, ue = (e, r = {}) => {
1229
- const t = e.config || {}, o = nr(e.variables || {}, {
1228
+ }), Qe(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1229
+ }, ie = (e, r = {}) => {
1230
+ const t = e.config || {}, o = tr(e.variables || {}, {
1230
1231
  ...r,
1231
1232
  themeName: r.themeName || e.themeName,
1232
1233
  basePresetName: r.basePresetName || String(t.basePresetName || t.name || ""),
1233
- skinName: ur(e, r.skinName)
1234
+ skinName: rr(e, r.skinName)
1234
1235
  });
1235
- return rr(e), o;
1236
- }, V = (e, r, t = !0) => {
1236
+ return Xe(e), o;
1237
+ }, B = (e, r, t = !0) => {
1237
1238
  try {
1238
1239
  return e && e.__THEME_API__ || null;
1239
1240
  } catch {
1240
1241
  return null;
1241
1242
  }
1242
- }, A = (e = !0) => typeof window > "u" ? null : V(window, "current", e) || V(window.parent, "parent", e) || V(window.top, "top", e), ne = (e = {}) => {
1243
+ }, A = (e = !0) => typeof window > "u" ? null : B(window, "current", e) || B(window.parent, "parent", e) || B(window.top, "top", e), j = (e = {}) => {
1243
1244
  const r = A(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
1244
1245
  if (t)
1245
1246
  return t;
1246
1247
  const o = (typeof window < "u" ? window.__UPF_THEME_SNAPSHOT__ : null) || null;
1247
- return o || ar(e.debug);
1248
- }, lr = (e = {}) => {
1249
- const r = or(e.root);
1248
+ return o || er(e.debug);
1249
+ }, or = (e = {}) => {
1250
+ const r = Ze(e.root);
1250
1251
  if (r)
1251
- return E(r);
1252
- const t = ne(e);
1252
+ return T(r);
1253
+ const t = j(e);
1253
1254
  if (t != null && t.variables)
1254
- return E(t.variables);
1255
+ return T(t.variables);
1255
1256
  const o = A(e.debug);
1256
1257
  if (!o)
1257
1258
  return null;
1258
1259
  const u = o.getVariables ? o.getVariables() : null;
1259
- return E(u);
1260
- }, Fr = (e, r = !0) => {
1260
+ return T(u);
1261
+ }, ar = (e, r = !0) => {
1261
1262
  const t = A(r);
1262
1263
  return t != null && t.changeTheme ? (t.changeTheme(e), !0) : !1;
1263
- }, le = (e = {}) => {
1264
- const r = ne(e);
1265
- return r ? (ue(r, e), r) : (e.debug, null);
1266
- }, _r = (e = {}) => le({
1264
+ }, $ = (e = {}) => {
1265
+ const r = j(e);
1266
+ return r ? (ie(r, e), r) : (e.debug, null);
1267
+ }, xr = (e = {}) => $({
1267
1268
  includeBridges: !1,
1268
1269
  includeElementAndDasUiBridges: !1,
1269
1270
  ...e
1270
- }), ir = (e, r = !0) => {
1271
+ }), ur = (e, r = !0) => {
1271
1272
  try {
1272
- const t = se("microApp");
1273
- return t.event.on(W, e), () => {
1274
- t.event.off(W, e);
1273
+ const t = pe("microApp");
1274
+ return t.event.on(J, e), () => {
1275
+ t.event.off(J, e);
1275
1276
  };
1276
1277
  } catch {
1277
1278
  return null;
1278
1279
  }
1279
- }, sr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, fr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", cr = (e) => {
1280
+ }, nr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, lr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", ir = (e) => {
1280
1281
  let r = "";
1281
1282
  return (t) => {
1282
- const o = fr(t);
1283
+ const o = lr(t);
1283
1284
  o && o === r || (r = o, e(t));
1284
1285
  };
1285
- }, pr = (e, r, t = !1, o = !0) => {
1286
- const u = cr(r), n = sr(e, u), l = ir(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
1286
+ }, sr = (e, r, t = !1, o = !0) => {
1287
+ const u = ir(r), n = nr(e, u), l = ur(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
1287
1288
  return s.length ? () => {
1288
1289
  s.forEach((c) => c());
1289
1290
  } : null;
1290
- }, mr = (e = {}) => {
1291
+ }, se = (e = {}) => {
1291
1292
  const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = A(u);
1292
1293
  let i = !1, s = null, c = null;
1293
1294
  const p = () => {
1294
- i || le({ ...n, debug: u });
1295
- }, k = pr(l, (b) => {
1296
- ue(b, n), o && (b == null ? void 0 : b.source) !== "mountSync" && o(b);
1295
+ i || $({ ...n, debug: u });
1296
+ }, H = sr(l, (g) => {
1297
+ ie(g, n), o && (g == null ? void 0 : g.source) !== "mountSync" && o(g);
1297
1298
  }, t, u);
1298
- return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ie) => Promise.resolve().then(ie))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
1299
+ return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ce) => Promise.resolve().then(ce))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
1299
1300
  s = null, p();
1300
1301
  }) : c = setTimeout(() => {
1301
1302
  c = null, p();
1302
1303
  }, 16)), () => {
1303
- i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), k == null || k();
1304
+ i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), H == null || H();
1304
1305
  };
1305
- }, Nr = (e = {}) => mr({
1306
+ }, Er = (e = {}) => se({
1306
1307
  includeBridges: !1,
1307
1308
  includeElementAndDasUiBridges: !1,
1308
1309
  ...e
1309
- }), dr = (e, r) => {
1310
+ }), fe = (e, r) => {
1310
1311
  var n;
1311
- const t = I(r), o = String(e || "").trim();
1312
+ const t = L(r), o = String(e || "").trim();
1312
1313
  if (!t || !o)
1313
1314
  return "";
1314
1315
  const u = typeof getComputedStyle > "u" ? "" : getComputedStyle(t).getPropertyValue(o).trim();
1315
- return u || String(((n = lr({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1316
- }, Ar = (e) => `var(${String(e || "").trim()})`, kr = (e, r) => ({
1317
- value: dr(String(e || "").trim(), r)
1318
- });
1316
+ return u || String(((n = or({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1317
+ }, Tr = (e) => `var(${String(e || "").trim()})`, Cr = (e, r) => ({
1318
+ value: fe(String(e || "").trim(), r)
1319
+ }), Sr = (e = {}) => {
1320
+ const r = me("default");
1321
+ let t = null;
1322
+ return de(() => {
1323
+ t = se({
1324
+ ...e,
1325
+ onThemeChange: (u) => {
1326
+ r.value = u.themeName, e.onThemeChange && e.onThemeChange(u);
1327
+ }
1328
+ });
1329
+ const o = j({ debug: e.debug });
1330
+ o && (r.value = o.themeName);
1331
+ }), ge(() => {
1332
+ t == null || t();
1333
+ }), {
1334
+ currentTheme: r,
1335
+ getVariable: (o) => fe(o, e.root),
1336
+ syncTheme: () => $(e),
1337
+ changeTheme: (o) => ar(o, e.debug)
1338
+ };
1339
+ };
1319
1340
  export {
1320
- _e as BUILTIN_PRESET_THEME_NAMES,
1321
- Pe as DAS_UI_THEME_BRIDGE_ITEMS,
1322
- Me as ELEMENT_THEME_BRIDGE_ITEMS,
1323
- De as LEGACY_THEME_BRIDGE_ITEMS,
1324
- R as PRESET_THEMES,
1325
- y as PRESET_THEME_VARIABLES,
1326
- pe as THEME_SOURCE_VARIABLE_CATEGORIES,
1327
- ge as THEME_SOURCE_VARIABLE_HINTS,
1328
- de as THEME_SOURCE_VARIABLE_LABELS,
1329
- S as THEME_SOURCE_VARIABLE_META,
1330
- me as THEME_SOURCE_VARIABLE_NAMES,
1331
- be as THEME_SOURCE_VARIABLE_RELATIONS,
1332
- Ie as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1333
- ue as applyThemeEventToDocument,
1334
- nr as applyThemeVariablesToDocument,
1335
- Sr as buildDefaultThemeCssText,
1336
- We as buildPresetThemeCssText,
1337
- P as buildRuntimeThemeVariables,
1338
- Fr as changeTheme,
1339
- wr as ensureDefaultThemeStyle,
1340
- Tr as getAllPresetThemes,
1341
- ne as getCurrentTheme,
1342
- F as getDefaultPresetTheme,
1343
- Cr as getDefaultThemeVariables,
1344
- ar as getHostThemeSnapshotFromWindowName,
1345
- Er as getPresetTheme,
1341
+ Pe as BUILTIN_PRESET_THEME_NAMES,
1342
+ Ve as DAS_UI_THEME_BRIDGE_ITEMS,
1343
+ He as ELEMENT_THEME_BRIDGE_ITEMS,
1344
+ Ae as LEGACY_THEME_BRIDGE_ITEMS,
1345
+ C as PRESET_THEMES,
1346
+ h as PRESET_THEME_VARIABLES,
1347
+ ye as THEME_SOURCE_VARIABLE_CATEGORIES,
1348
+ Ee as THEME_SOURCE_VARIABLE_HINTS,
1349
+ xe as THEME_SOURCE_VARIABLE_LABELS,
1350
+ F as THEME_SOURCE_VARIABLE_META,
1351
+ ve as THEME_SOURCE_VARIABLE_NAMES,
1352
+ Te as THEME_SOURCE_VARIABLE_RELATIONS,
1353
+ Be as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1354
+ ie as applyThemeEventToDocument,
1355
+ tr as applyThemeVariablesToDocument,
1356
+ yr as buildDefaultThemeCssText,
1357
+ ze as buildPresetThemeCssText,
1358
+ O as buildRuntimeThemeVariables,
1359
+ ar as changeTheme,
1360
+ P as clonePresetTheme,
1361
+ vr as ensureDefaultThemeStyle,
1362
+ hr as getAllPresetThemes,
1363
+ j as getCurrentTheme,
1364
+ er as getHostThemeSnapshotFromWindowName,
1365
+ v as getPresetTheme,
1346
1366
  A as getThemeAPI,
1347
- vr as getThemeSourceVariableCategories,
1348
- yr as getThemeSourceVariableHints,
1349
- hr as getThemeSourceVariableLabels,
1350
- br as getThemeSourceVariableNames,
1351
- xr as getThemeSourceVariableRelations,
1352
- dr as getThemeVariable,
1353
- lr as getThemeVariables,
1354
- Ar as getVar,
1355
- kr as getVarValue,
1356
- Nr as initHostThemeRootSync,
1357
- mr as initSubAppThemeSync,
1358
- Q as mixHexColor,
1359
- X as normalizeHexColor,
1360
- ye as normalizeThemeSourceVariables,
1361
- D as resolvePrimaryBgColor,
1362
- w as resolveThemeBridgeVariables,
1363
- _r as syncHostThemeRoot,
1364
- le as syncThemeFromHost,
1365
- Ue as toDasUiColorOverrides,
1366
- Le as toElementThemeVariables,
1367
- Oe as toLegacyThemeVariables,
1368
- ce as toRgbaColor,
1369
- ze as toUpfComponentThemeVariables
1367
+ gr as getThemeSourceVariableCategories,
1368
+ dr as getThemeSourceVariableHints,
1369
+ mr as getThemeSourceVariableLabels,
1370
+ pr as getThemeSourceVariableNames,
1371
+ br as getThemeSourceVariableRelations,
1372
+ fe as getThemeVariable,
1373
+ or as getThemeVariables,
1374
+ Tr as getVar,
1375
+ Cr as getVarValue,
1376
+ Er as initHostThemeRootSync,
1377
+ se as initSubAppThemeSync,
1378
+ te as mixHexColor,
1379
+ re as normalizeHexColor,
1380
+ Se as normalizeThemeSourceVariables,
1381
+ R as resolvePrimaryBgColor,
1382
+ N as resolveThemeBridgeVariables,
1383
+ xr as syncHostThemeRoot,
1384
+ $ as syncThemeFromHost,
1385
+ Me as toDasUiColorOverrides,
1386
+ Re as toElementThemeVariables,
1387
+ De as toLegacyThemeVariables,
1388
+ he as toRgbaColor,
1389
+ Oe as toUpfComponentThemeVariables,
1390
+ Sr as useSubAppTheme
1370
1391
  };