vome-core 0.1.81 → 0.1.83

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 (83) hide show
  1. package/dist/admin/components/ui/avatar/index.js +1 -1
  2. package/dist/admin/components/ui/badge/index.d.ts +1 -1
  3. package/dist/admin/components/ui/badge/index.js +1 -1
  4. package/dist/admin/components/ui/button/index.d.ts +1 -1
  5. package/dist/admin/components/ui/button/index.js +1 -1
  6. package/dist/admin/components/ui/checkbox/index.js +1 -1
  7. package/dist/admin/components/ui/dialog/index.js +1 -1
  8. package/dist/admin/components/ui/dropdown-menu/index.js +1 -1
  9. package/dist/admin/components/ui/input/index.js +1 -1
  10. package/dist/admin/components/ui/label/index.js +1 -1
  11. package/dist/admin/components/ui/scroll-area/index.js +1 -1
  12. package/dist/admin/components/ui/select/index.js +1 -1
  13. package/dist/admin/components/ui/separator/index.js +1 -1
  14. package/dist/admin/components/ui/sheet/index.js +1 -1
  15. package/dist/admin/components/ui/sonner/index.js +1 -1
  16. package/dist/admin/components/ui/table/index.js +1 -1
  17. package/dist/admin/components/ui/tabs/index.js +1 -1
  18. package/dist/admin/components/ui/tooltip/index.js +1 -1
  19. package/dist/admin/components/vm-role-picker.vue +10 -3
  20. package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
  21. package/dist/admin/crud/config.js +1 -1
  22. package/dist/admin/crud/confirm.js +1 -1
  23. package/dist/admin/crud/crud-page-request.js +1 -1
  24. package/dist/admin/crud/dict.js +1 -1
  25. package/dist/admin/crud/export-fetch.js +1 -1
  26. package/dist/admin/crud/key.js +1 -1
  27. package/dist/admin/crud/plugins.js +1 -1
  28. package/dist/admin/crud/span.js +1 -1
  29. package/dist/admin/crud/style.js +1 -1
  30. package/dist/admin/crud/validate.js +1 -1
  31. package/dist/admin/directives/perm.js +1 -1
  32. package/dist/admin/hooks/useUpload.js +1 -1
  33. package/dist/admin/index.d.ts +0 -5
  34. package/dist/admin/index.js +0 -4
  35. package/dist/admin/lib/browser.js +1 -1
  36. package/dist/admin/lib/cn.js +1 -1
  37. package/dist/admin/lib/dialog-float.js +1 -1
  38. package/dist/admin/lib/export-excel.js +1 -1
  39. package/dist/admin/lib/file-preview.js +6 -2
  40. package/dist/admin/lib/import-excel.js +1 -1
  41. package/dist/admin/lib/json.js +1 -1
  42. package/dist/admin/lib/menu.js +1 -1
  43. package/dist/admin/lib/micro-locale.js +1 -1
  44. package/dist/admin/lib/micro-theme.js +1 -1
  45. package/dist/admin/lib/setup-crud-defaults.js +1 -1
  46. package/dist/admin/lib/shell.js +1 -1
  47. package/dist/admin/lib/theme-color-options.js +1 -1
  48. package/dist/admin/lib/tree.js +1 -1
  49. package/dist/admin/lib/upload.js +1 -1
  50. package/dist/admin/lib/video-frame.js +1 -1
  51. package/dist/admin/router/create.js +1 -1
  52. package/dist/admin/router/guards.js +1 -1
  53. package/dist/admin/themes/dark.js +1 -1
  54. package/dist/admin/themes/index.js +1 -1
  55. package/dist/admin/themes/light.js +1 -1
  56. package/dist/ai/index.js +298 -9
  57. package/dist/client/configure.js +13 -4
  58. package/dist/client/vite-admin.d.ts +16 -1
  59. package/dist/client/vite-admin.js +33 -13
  60. package/dist/client/vite-auto-import.js +3 -3
  61. package/dist/client/vite-resolve.js +42 -6
  62. package/dist/index.js +1 -1
  63. package/dist/server/index.js +1 -1
  64. package/dist/shared/datetime-picker.js +1 -1
  65. package/dist/shared/excel.js +1 -1
  66. package/dist/shared/index.js +1 -1
  67. package/dist/shared/locale-json.js +1 -1
  68. package/dist/shared/tree.js +1 -1
  69. package/package.json +1 -1
  70. package/dist/admin/components/layout/vm-app-header.vue +0 -341
  71. package/dist/admin/components/layout/vm-app-sidebar.vue +0 -187
  72. package/dist/admin/components/layout/vm-sidebar-flyout.vue +0 -268
  73. package/dist/admin/components/layout/vm-sidebar-nav-item.vue +0 -490
  74. package/dist/admin/components/layout/vm-sidebar-nav.vue +0 -104
  75. package/dist/admin/components/layout/vm-tags-view.vue +0 -233
  76. package/dist/admin/lib/document-title.d.ts +0 -6
  77. package/dist/admin/lib/document-title.js +0 -1
  78. package/dist/admin/stores/dict.d.ts +0 -13
  79. package/dist/admin/stores/dict.js +0 -1
  80. package/dist/admin/stores/locale.d.ts +0 -3
  81. package/dist/admin/stores/locale.js +0 -1
  82. package/dist/admin/stores/theme.d.ts +0 -1
  83. package/dist/admin/stores/theme.js +0 -1
@@ -1,233 +0,0 @@
1
- <template>
2
- <div ref="rootRef" class="vm-tags">
3
- <div ref="trackRef" class="vm-tags__track" :style="trackStyle">
4
- <button
5
- v-for="tag in list"
6
- :key="tag.path"
7
- type="button"
8
- class="vm-tags__item"
9
- :class="{ 'is-active': route.path === tag.path }"
10
- @click="router.push(tag.fullPath)"
11
- @click.middle="close(tag.path, $event)"
12
- >
13
- <span class="vm-tags__title">{{ tagTitle(tag) }}</span>
14
- <i
15
- v-if="tag.path !== '/'"
16
- class="ri-close-line vm-tags__close"
17
- @click="close(tag.path, $event)"
18
- />
19
- </button>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import { useLocaleStore } from '../../stores/locale'
26
-
27
- defineOptions({ name: 'vm-tags-view' })
28
-
29
- const tags = useTagsStore()
30
- const user = useUserStore()
31
- const locale = useLocaleStore()
32
- const route = useRoute()
33
- const router = useRouter()
34
-
35
- const rootRef = ref<HTMLElement | null>(null)
36
- const trackRef = ref<HTMLElement | null>(null)
37
- const offset = ref(0)
38
-
39
- /** 首页由顶栏按钮进入,tabs 不再塞首页项 */
40
- const list = computed(() => tags.list.filter((t) => t.path !== '/'))
41
-
42
- function findMenuByPath(
43
- nodes: MenuTreeNode[],
44
- path: string,
45
- ): MenuTreeNode | null {
46
- for (const n of nodes) {
47
- if (n.router === path) return n
48
- if (n.children?.length) {
49
- const hit = findMenuByPath(n.children, path)
50
- if (hit) return hit
51
- }
52
- }
53
- return null
54
- }
55
-
56
- function tagTitle(tag: { path: string; title: string }) {
57
- const node = findMenuByPath(user.menus, tag.path)
58
- return node ? locale.tMenu(node) : tag.title
59
- }
60
-
61
- const trackStyle = computed(() =>
62
- offset.value > 0 ? { transform: `translateX(-${offset.value}px)` } : undefined,
63
- )
64
-
65
- function measureTabs() {
66
- const root = rootRef.value
67
- const track = trackRef.value
68
- if (!root || !track) return
69
-
70
- const containerWidth = root.clientWidth
71
- const items = track.querySelectorAll<HTMLElement>('.vm-tags__item')
72
- if (!items.length || containerWidth <= 0) {
73
- offset.value = 0
74
- return
75
- }
76
-
77
- const gap = 4
78
- const positions: number[] = []
79
- const widths: number[] = []
80
- let total = 0
81
-
82
- items.forEach((el, i) => {
83
- positions.push(total)
84
- const w = el.offsetWidth
85
- widths.push(w)
86
- total += w + (i < items.length - 1 ? gap : 0)
87
- })
88
-
89
- const maxOffset = Math.max(0, total - containerWidth)
90
- if (maxOffset === 0) {
91
- offset.value = 0
92
- return
93
- }
94
-
95
- const activeIndex = list.value.findIndex((t) => t.path === route.path)
96
- // 默认贴右:左侧最早打开的 tab 被裁切隐藏
97
- let next = maxOffset
98
-
99
- if (activeIndex >= 0) {
100
- const left = positions[activeIndex]!
101
- const right = left + widths[activeIndex]!
102
- if (left < next) next = left
103
- if (right > next + containerWidth) next = right - containerWidth
104
- next = Math.min(maxOffset, Math.max(0, next))
105
- }
106
-
107
- offset.value = next
108
- }
109
-
110
- let ro: ResizeObserver | undefined
111
-
112
- function scheduleMeasure() {
113
- nextTick(() => measureTabs())
114
- }
115
-
116
- function close(path: string, e: Event) {
117
- e.preventDefault()
118
- e.stopPropagation()
119
- if (path === '/') return
120
- const i = list.value.findIndex((t) => t.path === path)
121
- tags.remove(path)
122
- if (route.path === path) {
123
- const next = list.value[i - 1] || list.value[i] || null
124
- void router.push(next?.fullPath || '/')
125
- }
126
- scheduleMeasure()
127
- }
128
-
129
- watch(
130
- () => [list.value.length, route.path, ...list.value.map((t) => t.title)] as const,
131
- scheduleMeasure,
132
- )
133
-
134
- onMounted(() => {
135
- scheduleMeasure()
136
- ro = new ResizeObserver(scheduleMeasure)
137
- if (rootRef.value) ro.observe(rootRef.value)
138
- if (trackRef.value) ro.observe(trackRef.value)
139
- })
140
-
141
- onUnmounted(() => {
142
- ro?.disconnect()
143
- })
144
- </script>
145
-
146
- <style lang="scss" scoped>
147
- .vm-tags {
148
- min-width: 0;
149
- flex: 1;
150
- overflow: hidden;
151
- margin-left: 4px;
152
- padding: 0;
153
- }
154
-
155
- .vm-tags__track {
156
- display: flex;
157
- width: max-content;
158
- align-items: center;
159
- gap: 4px;
160
- transition: transform 0.15s ease;
161
- }
162
-
163
- .vm-tags__item {
164
- display: inline-flex;
165
- height: 32px;
166
- flex-shrink: 0;
167
- align-items: center;
168
- gap: 0;
169
- padding: 0 10px;
170
- border: none;
171
- border-radius: 8px;
172
- background: var(--muted);
173
- color: var(--muted-foreground);
174
- font-size: 12px;
175
- font-weight: 600;
176
- line-height: 1;
177
- cursor: pointer;
178
- transition:
179
- background 0.15s ease,
180
- color 0.15s ease,
181
- box-shadow 0.15s ease,
182
- gap 0.15s ease,
183
- padding 0.15s ease;
184
-
185
- &:hover {
186
- gap: 4px;
187
- padding-right: 8px;
188
- color: var(--foreground);
189
- }
190
-
191
- &.is-active {
192
- background: #fff;
193
- color: var(--brand);
194
- box-shadow: var(--shadow-card);
195
-
196
- .dark & {
197
- background: var(--card);
198
- }
199
- }
200
- }
201
-
202
- .vm-tags__title {
203
- white-space: nowrap;
204
- }
205
-
206
- /* 默认占 0 宽;悬停展开关闭按钮宽度 */
207
- .vm-tags__close {
208
- display: inline-flex;
209
- width: 0;
210
- height: 14px;
211
- flex-shrink: 0;
212
- align-items: center;
213
- justify-content: center;
214
- overflow: hidden;
215
- font-size: 14px;
216
- line-height: 1;
217
- opacity: 0;
218
- transition:
219
- width 0.15s ease,
220
- opacity 0.15s ease,
221
- color 0.15s ease;
222
-
223
- .vm-tags__item:hover & {
224
- width: 14px;
225
- opacity: 0.55;
226
- }
227
-
228
- .vm-tags__item:hover &:hover {
229
- opacity: 1;
230
- color: var(--destructive);
231
- }
232
- }
233
- </style>
@@ -1,6 +0,0 @@
1
- import type { Pinia } from 'pinia';
2
- import type { RouteLocationNormalizedLoaded, Router } from 'vue-router';
3
- export declare function syncDocumentTitle(routeTitle?: string): void;
4
- export declare function syncDocumentTitleFromRoute(router: Router, to?: RouteLocationNormalizedLoaded): void;
5
- /** 路由切换 + 语言包切换时同步浏览器标签标题 */
6
- export declare function bindDocumentTitle(router: Router, pinia: Pinia): void;
@@ -1 +0,0 @@
1
- function _0x5198(_0x3c4a31,_0xfaedc1){_0x3c4a31=_0x3c4a31-0x1b3;const _0x1ccb0b=_0x1ccb();let _0x519822=_0x1ccb0b[_0x3c4a31];if(_0x5198['QhvqdE']===undefined){var _0x47f941=function(_0x4c0ccf){const _0x1b0ed9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x373259='',_0x22a72b='';for(let _0x440055=0x0,_0x1dd462,_0x21395e,_0x5f58ad=0x0;_0x21395e=_0x4c0ccf['charAt'](_0x5f58ad++);~_0x21395e&&(_0x1dd462=_0x440055%0x4?_0x1dd462*0x40+_0x21395e:_0x21395e,_0x440055++%0x4)?_0x373259+=String['fromCharCode'](0xff&_0x1dd462>>(-0x2*_0x440055&0x6)):0x0){_0x21395e=_0x1b0ed9['indexOf'](_0x21395e);}for(let _0x2442f7=0x0,_0x51b404=_0x373259['length'];_0x2442f7<_0x51b404;_0x2442f7++){_0x22a72b+='%'+('00'+_0x373259['charCodeAt'](_0x2442f7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x22a72b);};_0x5198['Sskayv']=_0x47f941,_0x5198['qQtxpQ']={},_0x5198['QhvqdE']=!![];}const _0x68f0c5=_0x1ccb0b[0x0],_0x1eff46=_0x3c4a31+_0x68f0c5,_0x31cc14=_0x5198['qQtxpQ'][_0x1eff46];return!_0x31cc14?(_0x519822=_0x5198['Sskayv'](_0x519822),_0x5198['qQtxpQ'][_0x1eff46]=_0x519822):_0x519822=_0x31cc14,_0x519822;}(function(_0x3da5b2,_0x20fa25){const _0x20d1dc=_0x5198,_0x1b633d=_0x3da5b2();while(!![]){try{const _0xb6b158=parseInt(_0x20d1dc(0x1b4))/0x1*(parseInt(_0x20d1dc(0x1c5))/0x2)+parseInt(_0x20d1dc(0x1c6))/0x3*(parseInt(_0x20d1dc(0x1be))/0x4)+-parseInt(_0x20d1dc(0x1ba))/0x5+parseInt(_0x20d1dc(0x1c1))/0x6+parseInt(_0x20d1dc(0x1bd))/0x7*(-parseInt(_0x20d1dc(0x1c7))/0x8)+-parseInt(_0x20d1dc(0x1b3))/0x9+parseInt(_0x20d1dc(0x1c8))/0xa*(parseInt(_0x20d1dc(0x1bb))/0xb);if(_0xb6b158===_0x20fa25)break;else _0x1b633d['push'](_0x1b633d['shift']());}catch(_0x46551e){_0x1b633d['push'](_0x1b633d['shift']());}}}(_0x1ccb,0x53e6d));import{watch}from'vue';import{getAdminShellBranding}from'./shell';import{useLocaleStore}from'../stores/locale';import{useUserStore}from'../stores/user';function _0x1ccb(){const _0x2082a5=['mJu5ndmXmgzHCwH6vW','mJa2mdnrwhLMrhO','ic0G','mJu5DxfQC2fP','mta1otj2rhLprvy','DgL0Bgu','y2HPBgrYzw4','mZuYmJG1ogXiCKvoua','CM91DgvY','Bwv0yq','De1LBNu','ofDzCvnKAa','ndaYB3npyKnu','mta0mda4BwvwwNzL','mZq5mePHAhPpuW','nduWmJuYmePPt1Pyva','nJiWndDdrLP0Awu','Bg9JywXL','ywz0zxjfywnO','Dw5KzwzPBMvK','BwvUDxm','yxbWtMfTzq'];_0x1ccb=function(){return _0x2082a5;};return _0x1ccb();}function findMenuByPath(_0x373259,_0x22a72b){const _0x49dceb=_0x5198;for(const _0x440055 of _0x373259){if(_0x440055[_0x49dceb(0x1c2)]===_0x22a72b)return _0x440055;if(_0x440055[_0x49dceb(0x1c0)]?.['length']){const _0x1dd462=findMenuByPath(_0x440055[_0x49dceb(0x1c0)],_0x22a72b);if(_0x1dd462)return _0x1dd462;}}return null;}function resolvePageTitle(_0x21395e){const _0x3cd29f=_0x5198;try{const _0x5f58ad=useLocaleStore(),_0x2442f7=useUserStore(),_0x51b404=findMenuByPath(_0x2442f7[_0x3cd29f(0x1b8)],_0x21395e['path']);if(_0x51b404)return _0x5f58ad[_0x3cd29f(0x1c4)](_0x51b404);}catch{}return _0x21395e['meta'][_0x3cd29f(0x1bf)]?String(_0x21395e[_0x3cd29f(0x1c3)][_0x3cd29f(0x1bf)]):'';}export function syncDocumentTitle(_0x16dcdf){const _0x2dd808=_0x5198;if(typeof document===_0x2dd808(0x1b7))return;const _0x1dd76a=getAdminShellBranding()[_0x2dd808(0x1b9)];document[_0x2dd808(0x1bf)]=_0x16dcdf?_0x16dcdf+_0x2dd808(0x1bc)+_0x1dd76a:_0x1dd76a;}export function syncDocumentTitleFromRoute(_0x36a06f,_0x70225f=_0x36a06f['currentRoute']['value']){const _0x33ccce=resolvePageTitle(_0x70225f);syncDocumentTitle(_0x33ccce||undefined);}export function bindDocumentTitle(_0xa92c32,_0x19c73f){const _0x4c9484=_0x5198;syncDocumentTitle(),_0xa92c32[_0x4c9484(0x1b6)](_0x31b6d4=>{syncDocumentTitleFromRoute(_0xa92c32,_0x31b6d4);});const _0x241c3d=useLocaleStore(_0x19c73f);watch(()=>[_0x241c3d[_0x4c9484(0x1b5)],_0x241c3d['messages']],()=>syncDocumentTitleFromRoute(_0xa92c32));}
@@ -1,13 +0,0 @@
1
- import { type EpsDictNode } from 'vome-core/client';
2
- export type DictNode = EpsDictNode;
3
- /**
4
- * 字典 store:读 EPS 灌入的本地缓存(createEps / loadEps)
5
- * - get:字典树(下拉 / switch)
6
- * - options:平铺 + color → 彩色 tag / 菜单类型等
7
- * - 业务页勿 refresh;字典管理页改完后 refresh(key, true)
8
- */
9
- export declare const useDictStore: any;
10
- /** const { dict } = useDict() */
11
- export declare function useDict(): {
12
- dict: any;
13
- };
@@ -1 +0,0 @@
1
- const _0xe669de=_0x564b;(function(_0x25968f,_0xd905ae){const _0x35b958=_0x564b,_0x31cc85=_0x25968f();while(!![]){try{const _0x4dbd1a=parseInt(_0x35b958(0x15e))/0x1+-parseInt(_0x35b958(0x15b))/0x2+parseInt(_0x35b958(0x155))/0x3+parseInt(_0x35b958(0x154))/0x4+-parseInt(_0x35b958(0x162))/0x5*(-parseInt(_0x35b958(0x14d))/0x6)+-parseInt(_0x35b958(0x153))/0x7+parseInt(_0x35b958(0x14c))/0x8*(-parseInt(_0x35b958(0x15c))/0x9);if(_0x4dbd1a===_0xd905ae)break;else _0x31cc85['push'](_0x31cc85['shift']());}catch(_0x958961){_0x31cc85['push'](_0x31cc85['shift']());}}}(_0x3504,0xd95c5));import{getDict,getDictMap,getDictOptions,hydrateDictFromEps}from'vome-core/client';function isEmpty(_0x22b80c){return _0x22b80c===''||_0x22b80c===null||_0x22b80c===undefined;}function sameValue(_0x10eb82,_0xbe0552){if(_0x10eb82===_0xbe0552)return!![];if(_0x10eb82==null||_0xbe0552==null)return![];return String(_0x10eb82)===String(_0xbe0552);}function deepFind(_0x864834,_0x4ef772,_0x3a45a2=[]){const _0x496b34=_0x564b;for(const _0x4f6ccf of _0x4ef772){if(sameValue(_0x4f6ccf[_0x496b34(0x14f)],_0x864834))return{..._0x4f6ccf,'label':_0x3a45a2['length']?[..._0x3a45a2,_0x4f6ccf[_0x496b34(0x160)]||_0x4f6ccf['name']]['join']('\x20/\x20'):_0x4f6ccf[_0x496b34(0x160)]||_0x4f6ccf[_0x496b34(0x159)]};if(_0x4f6ccf['children']?.[_0x496b34(0x15d)]){const _0x5ef356=deepFind(_0x864834,_0x4f6ccf['children'],[..._0x3a45a2,_0x4f6ccf[_0x496b34(0x160)]||_0x4f6ccf[_0x496b34(0x159)]]);if(_0x5ef356)return _0x5ef356;}}return;}function _0x564b(_0x4d212e,_0x35fbe5){_0x4d212e=_0x4d212e-0x14c;const _0x35040b=_0x3504();let _0x564bab=_0x35040b[_0x4d212e];if(_0x564b['pPNVBb']===undefined){var _0x5e4cb1=function(_0x1dcd2e){const _0x414608='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x22b80c='',_0x10eb82='';for(let _0xbe0552=0x0,_0x864834,_0x4ef772,_0x3a45a2=0x0;_0x4ef772=_0x1dcd2e['charAt'](_0x3a45a2++);~_0x4ef772&&(_0x864834=_0xbe0552%0x4?_0x864834*0x40+_0x4ef772:_0x4ef772,_0xbe0552++%0x4)?_0x22b80c+=String['fromCharCode'](0xff&_0x864834>>(-0x2*_0xbe0552&0x6)):0x0){_0x4ef772=_0x414608['indexOf'](_0x4ef772);}for(let _0x4f6ccf=0x0,_0x5ef356=_0x22b80c['length'];_0x4f6ccf<_0x5ef356;_0x4f6ccf++){_0x10eb82+='%'+('00'+_0x22b80c['charCodeAt'](_0x4f6ccf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10eb82);};_0x564b['UKajuk']=_0x5e4cb1,_0x564b['AMrrxP']={},_0x564b['pPNVBb']=!![];}const _0x28162f=_0x35040b[0x0],_0x584aa6=_0x4d212e+_0x28162f,_0x1b0302=_0x564b['AMrrxP'][_0x584aa6];return!_0x1b0302?(_0x564bab=_0x564b['UKajuk'](_0x564bab),_0x564b['AMrrxP'][_0x584aa6]=_0x564bab):_0x564bab=_0x1b0302,_0x564bab;}function snapshot(_0x478e4d){const _0x523533=getDictMap(),_0x42eae4={};for(const _0x3476a5 of _0x478e4d||[])_0x42eae4[_0x3476a5]=_0x523533[_0x3476a5]||[];return _0x42eae4;}export const useDictStore=defineStore(_0xe669de(0x156),()=>{function _0x4ceee6(_0x4b5237){return computed(()=>getDict(_0x4b5237));}function _0x58593f(_0x501db3,_0x5ead45){const _0x2dceec=_0x564b,_0x389709=getDictMap()[_0x501db3]||[],_0x35dbeb=Array[_0x2dceec(0x158)](_0x5ead45)?_0x5ead45:[_0x5ead45];return _0x35dbeb[_0x2dceec(0x150)](_0x7f31da=>_0x7f31da!==undefined)[_0x2dceec(0x151)](_0x50ba83=>deepFind(_0x50ba83,_0x389709));}function _0x31abc8(_0x53a0b7){return computed(()=>getDictOptions(_0x53a0b7));}async function _0xd85a60(_0x8ebf5f,_0x5ab5ec=![]){const _0x1ba46d=_0x564b,_0x1b6e9f=typeof _0x5ab5ec==='boolean'?_0x5ab5ec:Boolean(_0x5ab5ec?.[_0x1ba46d(0x161)]),_0x210b27=typeof _0x8ebf5f===_0x1ba46d(0x15f)?[_0x8ebf5f]:_0x8ebf5f,_0x1b8820=_0x210b27?.[_0x1ba46d(0x150)](_0x3648b8=>!isEmpty(_0x3648b8));if(!_0x1b6e9f)return snapshot(_0x1b8820);const _0x415d2f=await service[_0x1ba46d(0x152)][_0x1ba46d(0x156)][_0x1ba46d(0x157)][_0x1ba46d(0x14e)]({'types':_0x1b8820});hydrateDictFromEps(_0x415d2f);const _0x248f7a=_0x1b8820?.[_0x1ba46d(0x15d)]?_0x1b8820:Object[_0x1ba46d(0x15a)](_0x415d2f||{});return snapshot(_0x248f7a);}return{'get':_0x4ceee6,'find':_0x58593f,'options':_0x31abc8,'refresh':_0xd85a60};});export function useDict(){const _0xda5b94=useDictStore();return{'dict':_0xda5b94};}function _0x3504(){const _0x51c25f=['zMLSDgvY','BwfW','yMfZzq','mteZmteXmtfkwgL2rwG','mtGWody0uLPtrLPj','mJe3nteYnLPLseznAW','zgLJDa','Aw5MBW','AxnbCNjHEq','BMfTzq','A2v5CW','mtiYndG2BfDYwLvo','mZqYnZj5C2f4r04','BgvUz3rO','mtuZmde2uKj0wgXH','C3rYAw5N','BgfIzwW','zM9Yy2u','mty5mZy1nuzsvgforq','mta0wKLHBeT4','mZbKz1HpAfq','zgf0yq','DMfSDwu'];_0x3504=function(){return _0x51c25f;};return _0x3504();}
@@ -1,3 +0,0 @@
1
- export type { I18nLangItem } from 'vome-core/client';
2
- /** admin 宿主语言包 store(逻辑在 vome-core) */
3
- export declare const useLocaleStore: any;
@@ -1 +0,0 @@
1
- function _0x2c37(_0x25f6b8,_0x19ee47){_0x25f6b8=_0x25f6b8-0xc7;const _0x491b4f=_0x491b();let _0x2c37b2=_0x491b4f[_0x25f6b8];if(_0x2c37['mXIYAi']===undefined){var _0x516385=function(_0x411023){const _0x4a0d25='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x413d16='',_0x245cca='';for(let _0x2b499f=0x0,_0x3195f9,_0x2f6ad8,_0x1aeb15=0x0;_0x2f6ad8=_0x411023['charAt'](_0x1aeb15++);~_0x2f6ad8&&(_0x3195f9=_0x2b499f%0x4?_0x3195f9*0x40+_0x2f6ad8:_0x2f6ad8,_0x2b499f++%0x4)?_0x413d16+=String['fromCharCode'](0xff&_0x3195f9>>(-0x2*_0x2b499f&0x6)):0x0){_0x2f6ad8=_0x4a0d25['indexOf'](_0x2f6ad8);}for(let _0x369137=0x0,_0x3e485b=_0x413d16['length'];_0x369137<_0x3e485b;_0x369137++){_0x245cca+='%'+('00'+_0x413d16['charCodeAt'](_0x369137)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x245cca);};_0x2c37['CPgbEz']=_0x516385,_0x2c37['ucsIWu']={},_0x2c37['mXIYAi']=!![];}const _0x1caff5=_0x491b4f[0x0],_0x10f194=_0x25f6b8+_0x1caff5,_0x2f3bae=_0x2c37['ucsIWu'][_0x10f194];return!_0x2f3bae?(_0x2c37b2=_0x2c37['CPgbEz'](_0x2c37b2),_0x2c37['ucsIWu'][_0x10f194]=_0x2c37b2):_0x2c37b2=_0x2f3bae,_0x2c37b2;}const _0x280df8=_0x2c37;(function(_0x58fccb,_0x25c075){const _0x51facc=_0x2c37,_0x5cf8d7=_0x58fccb();while(!![]){try{const _0x561384=parseInt(_0x51facc(0xd1))/0x1+parseInt(_0x51facc(0xca))/0x2+parseInt(_0x51facc(0xc8))/0x3*(-parseInt(_0x51facc(0xcf))/0x4)+-parseInt(_0x51facc(0xd3))/0x5*(parseInt(_0x51facc(0xce))/0x6)+-parseInt(_0x51facc(0xd0))/0x7+-parseInt(_0x51facc(0xcc))/0x8+parseInt(_0x51facc(0xcd))/0x9*(parseInt(_0x51facc(0xd2))/0xa);if(_0x561384===_0x25c075)break;else _0x5cf8d7['push'](_0x5cf8d7['shift']());}catch(_0x254d2d){_0x5cf8d7['push'](_0x5cf8d7['shift']());}}}(_0x491b,0x9620b));import{setCrudTranslator}from'../crud/style';import{service}from'../service';import{createLocaleStore}from'vome-core/client';export const useLocaleStore=createLocaleStore({'storageKey':'vome_admin_locale','scopeKey':_0x280df8(0xd4),'langMode':_0x280df8(0xd4),'enableMenu':!![],'persist':{'get':_0x413d16=>localStorage[_0x280df8(0xc7)](_0x413d16),'set':(_0x245cca,_0x2b499f)=>localStorage[_0x280df8(0xcb)](_0x245cca,_0x2b499f)},'getPackApi':()=>service[_0x280df8(0xd5)]?.[_0x280df8(0xc9)],'onPackLoaded':({t:_0x3195f9})=>{setCrudTranslator((_0x2f6ad8,_0x1aeb15)=>_0x3195f9(_0x2f6ad8,_0x1aeb15));}});function _0x491b(){const _0x1e6c21=['mZe0otq2DeXmzfDJ','mta2nhPZteTjzq','nZG5mtCZmfHvB0zZrW','mZC2ndq3zxzcCw9o','mZeYmZbkyujPsKm','mJvOvhHsEeG','ywrTAw4','Ate4BG','z2v0sxrLBq','oduYowDgCef1DW','CgfJAW','odaYmdKYqMLdBM1X','C2v0sxrLBq','nda0nde0ngTeBgDuza','nZe3m1LVrwnNEG'];_0x491b=function(){return _0x1e6c21;};return _0x491b();}
@@ -1 +0,0 @@
1
- export declare const useThemeStore: any;
@@ -1 +0,0 @@
1
- const _0x31a444=_0xd0b9;(function(_0x2cbd12,_0xa46da){const _0x5e9bbc=_0xd0b9,_0xa261a=_0x2cbd12();while(!![]){try{const _0x555605=parseInt(_0x5e9bbc(0x115))/0x1*(-parseInt(_0x5e9bbc(0x121))/0x2)+-parseInt(_0x5e9bbc(0x127))/0x3*(parseInt(_0x5e9bbc(0x116))/0x4)+-parseInt(_0x5e9bbc(0x117))/0x5*(parseInt(_0x5e9bbc(0x118))/0x6)+-parseInt(_0x5e9bbc(0x12a))/0x7*(parseInt(_0x5e9bbc(0x11f))/0x8)+parseInt(_0x5e9bbc(0x119))/0x9*(-parseInt(_0x5e9bbc(0x128))/0xa)+-parseInt(_0x5e9bbc(0x11e))/0xb+parseInt(_0x5e9bbc(0x129))/0xc;if(_0x555605===_0xa46da)break;else _0xa261a['push'](_0xa261a['shift']());}catch(_0x243978){_0xa261a['push'](_0xa261a['shift']());}}}(_0x3416,0x32a9f));function _0xd0b9(_0x3a5630,_0x4cb7c9){_0x3a5630=_0x3a5630-0x115;const _0x341621=_0x3416();let _0xd0b978=_0x341621[_0x3a5630];if(_0xd0b9['IbsBQK']===undefined){var _0x2cf417=function(_0x51aff2){const _0x17b1f2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x348187='',_0x44e6b6='';for(let _0x29e05a=0x0,_0xa70be,_0x486780,_0x52f04a=0x0;_0x486780=_0x51aff2['charAt'](_0x52f04a++);~_0x486780&&(_0xa70be=_0x29e05a%0x4?_0xa70be*0x40+_0x486780:_0x486780,_0x29e05a++%0x4)?_0x348187+=String['fromCharCode'](0xff&_0xa70be>>(-0x2*_0x29e05a&0x6)):0x0){_0x486780=_0x17b1f2['indexOf'](_0x486780);}for(let _0x341393=0x0,_0x103543=_0x348187['length'];_0x341393<_0x103543;_0x341393++){_0x44e6b6+='%'+('00'+_0x348187['charCodeAt'](_0x341393)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44e6b6);};_0xd0b9['YgbVgN']=_0x2cf417,_0xd0b9['fPGQvd']={},_0xd0b9['IbsBQK']=!![];}const _0x20134d=_0x341621[0x0],_0x297a5a=_0x3a5630+_0x20134d,_0x180bec=_0xd0b9['fPGQvd'][_0x297a5a];return!_0x180bec?(_0xd0b978=_0xd0b9['YgbVgN'](_0xd0b978),_0xd0b9['fPGQvd'][_0x297a5a]=_0xd0b978):_0xd0b978=_0x180bec,_0xd0b978;}import{bus}from'wujie';import{applyTheme,listThemes}from'../themes';import{hasMicroThemeListeners,MICRO_SET_THEME_EVENT,MICRO_THEME_EVENT,snapshotHostTheme}from'../lib/micro-theme';const THEME_KEY=_0x31a444(0x12e);let themeTransitioning=![];function prefersReducedMotion(){const _0x5d348d=_0x31a444;if(typeof window===_0x5d348d(0x11b))return!![];return window[_0x5d348d(0x126)]('(prefers-reduced-motion:\x20reduce)')[_0x5d348d(0x11a)];}function broadcastHostTheme(){try{if(!hasMicroThemeListeners())return;bus['$emit'](MICRO_THEME_EVENT,snapshotHostTheme());}catch{}}function _0x3416(){const _0x2830be=['Bwf0y2HnzwrPyq','nKHyufrPua','mtaWtxjosLzc','mty2odK3otj2zhrmsKi','mtG5v0LHDw1H','C2v0sxrLBq','zMLUywXSEq','DgHLBwvjza','DM9Tzv9Hzg1PBL90AgvTzq','mxHHrNbxBW','ndmZnJyWrhv2ChLW','mJK0mZmWsfDpzwTV','mtj4s0rUreG','mZa1mdCZEe1LAKjg','Bwf0y2HLCW','Dw5KzwzPBMvK','jg9U','BgLNAhq','mZa2mde0nvzeuwXcDW','odyXnMrkyvv1zW','z2v0sxrLBq','nda0otGYtvfLtgrn','zMLUAxnOzwq','C3rHCNrwAwv3vhjHBNnPDgLVBG','yw5PBwf0zq','zgfYAW'];_0x3416=function(){return _0x2830be;};return _0x3416();}function runThemeUpdate(_0x348187,_0x44e6b6){const _0x1911a5=_0x31a444,_0x29e05a=typeof document!==_0x1911a5(0x11b)?document:null;if(!_0x44e6b6||!_0x29e05a?.[_0x1911a5(0x123)]||prefersReducedMotion()||themeTransitioning){_0x348187(),queueMicrotask(()=>broadcastHostTheme());return;}themeTransitioning=!![];const _0xa70be=_0x29e05a['startViewTransition'](_0x348187);_0xa70be[_0x1911a5(0x122)][_0x1911a5(0x12c)](()=>{themeTransitioning=![],broadcastHostTheme(),requestAnimationFrame(()=>broadcastHostTheme());});}let guestThemeBound=![];function bindGuestThemeRequests(_0x486780){const _0x125134=_0x31a444;if(guestThemeBound)return;guestThemeBound=!![];try{bus[_0x125134(0x11c)](MICRO_SET_THEME_EVENT,_0x52f04a=>{const _0x999695=_0x125134,_0x341393=_0x52f04a?.[_0x999695(0x12d)]===_0x999695(0x125)?_0x999695(0x125):_0x999695(0x11d);if(_0x341393===_0x486780[_0x999695(0x12d)])return;_0x486780['setTheme'](_0x341393);});}catch{}}export const useThemeStore=defineStore('theme',{'state':()=>({'themeId':localStorage[_0x31a444(0x120)](THEME_KEY)||'light'}),'getters':{'themes':()=>listThemes()},'actions':{'initTheme'(){applyTheme(this['themeId']),broadcastHostTheme(),bindGuestThemeRequests(this);},'setTheme'(_0x103543,_0x2705d2){const _0x4a2718=_0x31a444,_0xf1a251=_0x103543!==this['themeId'],_0x10841e=_0x2705d2?.[_0x4a2718(0x124)]!==![]&&_0xf1a251;runThemeUpdate(()=>{const _0x11e01e=_0x4a2718;this[_0x11e01e(0x12d)]=_0x103543,localStorage[_0x11e01e(0x12b)](THEME_KEY,_0x103543),applyTheme(_0x103543),broadcastHostTheme();},_0x10841e);}}});