rayyy-vue-table-components 1.3.20 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -21514,16 +21514,16 @@ const kD = {
|
|
|
21514
21514
|
}), xD = (e) => {
|
|
21515
21515
|
PD.global.locale.value = e, localStorage.setItem("locale", e);
|
|
21516
21516
|
}, Pg = [
|
|
21517
|
-
{
|
|
21518
|
-
{
|
|
21517
|
+
{ value: "zh-TW", label: "繁體中文" },
|
|
21518
|
+
{ value: "en-US", label: "English" }
|
|
21519
21519
|
], MD = { class: "language-switcher" }, jD = /* @__PURE__ */ te({
|
|
21520
21520
|
__name: "LanguageSwitcher",
|
|
21521
21521
|
setup(e) {
|
|
21522
21522
|
const { locale: t } = fu(), n = (a) => {
|
|
21523
21523
|
xD(a);
|
|
21524
21524
|
}, o = R(() => {
|
|
21525
|
-
const a = Pg.find((s) => s.
|
|
21526
|
-
return (a == null ? void 0 : a.
|
|
21525
|
+
const a = Pg.find((s) => s.value === t.value);
|
|
21526
|
+
return (a == null ? void 0 : a.label) || "繁體中文";
|
|
21527
21527
|
});
|
|
21528
21528
|
return (a, s) => {
|
|
21529
21529
|
const i = ou, c = kx, d = Rx, f = Ax;
|
|
@@ -21536,11 +21536,11 @@ const kD = {
|
|
|
21536
21536
|
ye(d, null, {
|
|
21537
21537
|
default: se(() => [
|
|
21538
21538
|
(M(!0), X(kt, null, br(C(Pg), (p) => (M(), ve(c, {
|
|
21539
|
-
key: p.
|
|
21540
|
-
command: p.
|
|
21539
|
+
key: p.value,
|
|
21540
|
+
command: p.value
|
|
21541
21541
|
}, {
|
|
21542
21542
|
default: se(() => [
|
|
21543
|
-
Pr(Ke(p.
|
|
21543
|
+
Pr(Ke(p.label), 1)
|
|
21544
21544
|
]),
|
|
21545
21545
|
_: 2
|
|
21546
21546
|
}, 1032, ["command"]))), 128))
|
|
@@ -21667,8 +21667,8 @@ function qD(e) {
|
|
|
21667
21667
|
}));
|
|
21668
21668
|
}
|
|
21669
21669
|
const BD = [
|
|
21670
|
-
{
|
|
21671
|
-
{
|
|
21670
|
+
{ value: "zh-TW", label: "繁體中文" },
|
|
21671
|
+
{ value: "en-US", label: "English" }
|
|
21672
21672
|
];
|
|
21673
21673
|
let fn = {
|
|
21674
21674
|
locales: [...BD],
|
|
@@ -21685,7 +21685,7 @@ const XD = () => fn.externalHandler ? fn.externalHandler.availableLocales() : fn
|
|
|
21685
21685
|
fn.externalHandler.switchLanguage(e);
|
|
21686
21686
|
return;
|
|
21687
21687
|
}
|
|
21688
|
-
if (!fn.locales.some((t) => t.
|
|
21688
|
+
if (!fn.locales.some((t) => t.value === e)) {
|
|
21689
21689
|
console.warn(`Language ${e} is not configured`);
|
|
21690
21690
|
return;
|
|
21691
21691
|
}
|
|
@@ -21696,13 +21696,13 @@ const XD = () => fn.externalHandler ? fn.externalHandler.availableLocales() : fn
|
|
|
21696
21696
|
if (fn.externalHandler)
|
|
21697
21697
|
return fn.externalHandler.getCurrentLocale();
|
|
21698
21698
|
const e = localStorage.getItem(fn.storageKey);
|
|
21699
|
-
return e && fn.locales.some((t) => t.
|
|
21699
|
+
return e && fn.locales.some((t) => t.value === e) ? e : fn.defaultLocale;
|
|
21700
21700
|
}, QD = (e) => {
|
|
21701
21701
|
var n, o;
|
|
21702
21702
|
if ((n = fn.externalHandler) != null && n.getLanguageName)
|
|
21703
21703
|
return fn.externalHandler.getLanguageName(e);
|
|
21704
|
-
const t = fn.locales.find((a) => a.
|
|
21705
|
-
return (t == null ? void 0 : t.
|
|
21704
|
+
const t = fn.locales.find((a) => a.value === e);
|
|
21705
|
+
return (t == null ? void 0 : t.label) || ((o = fn.locales[0]) == null ? void 0 : o.label) || "Unknown";
|
|
21706
21706
|
}, e6 = () => {
|
|
21707
21707
|
const e = VD();
|
|
21708
21708
|
return window.dispatchEvent(new CustomEvent("languageInitialized", {
|
package/dist/index.umd.js
CHANGED
|
@@ -62,4 +62,4 @@ ${d}`:p)}else throw c},onCacheKey:c=>TL(n,r,c)}}function sB(e){if(ce(e))return e
|
|
|
62
62
|
* (c) 2025 kazuya kawaguchi
|
|
63
63
|
* Released under the MIT License.
|
|
64
64
|
*/const _B="11.1.12";function yB(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ro().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ro().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ro().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ro().__INTLIFY_PROD_DEVTOOLS__=!1)}const ft={UNEXPECTED_RETURN_TYPE:kA,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function mn(e,...n){return ul(e,null,process.env.NODE_ENV!=="production"?{messages:CB,args:n}:void 0)}const CB={[ft.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[ft.INVALID_ARGUMENT]:"Invalid argument",[ft.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[ft.NOT_INSTALLED]:"Need to install with `app.use` function",[ft.UNEXPECTED_ERROR]:"Unexpected error",[ft.REQUIRED_VALUE]:"Required in value: {0}",[ft.INVALID_VALUE]:"Invalid value",[ft.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[ft.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[ft.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[ft.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},mu=pr("__translateVNode"),hu=pr("__datetimeParts"),gu=pr("__numberParts"),xo=pr("__enableEmitter"),ca=pr("__disableEmitter"),Mg=pr("__setPluralRules"),Dg=pr("__injectWithOption"),bu=pr("__dispose"),Vn={FALLBACK_TO_ROOT:FA,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},wB={[Vn.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Vn.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Vn.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Vn.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
65
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Vn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Vn.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function ml(e,...n){return Ti(wB[e],...n)}function ua(e){if(!Ye(e)||$n(e))return e;for(const n in e)if(nr(e,n))if(!n.includes("."))Ye(e[n])&&ua(e[n]);else{const r=n.split("."),l=r.length-1;let i=e,s=!1;for(let c=0;c<l;c++){if(r[c]==="__proto__")throw new Error(`unsafe key: ${r[c]}`);if(r[c]in i||(i[r[c]]=at()),!Ye(i[r[c]])){process.env.NODE_ENV!=="production"&&dr(ml(Vn.IGNORE_OBJ_FLATTEN,{key:r[c]})),s=!0;break}i=i[r[c]]}if(s||($n(i)?ag.includes(r[l])||delete e[n]:(i[r[l]]=e[n],delete e[n])),!$n(i)){const c=i[r[l]];Ye(c)&&ua(c)}}return e}function _u(e,n){const{messages:r,__i18n:l,messageResolver:i,flatJson:s}=n,c=Ue(r)?r:_t(l)?at():{[e]:at()};if(_t(l)&&l.forEach(f=>{if("locale"in f&&"resource"in f){const{locale:p,resource:d}=f;p?(c[p]=c[p]||at(),Oi(d,c[p])):Oi(d,c)}else ce(f)&&Oi(JSON.parse(f),c)}),i==null&&s)for(const f in c)nr(c,f)&&ua(c[f]);return c}function $g(e){return e.type}function Fg(e,n,r){let l=Ye(n.messages)?n.messages:at();"__i18nGlobal"in r&&(l=_u(e.locale.value,{messages:l,__i18n:r.__i18nGlobal}));const i=Object.keys(l);i.length&&i.forEach(s=>{e.mergeLocaleMessage(s,l[s])});{if(Ye(n.datetimeFormats)){const s=Object.keys(n.datetimeFormats);s.length&&s.forEach(c=>{e.mergeDateTimeFormat(c,n.datetimeFormats[c])})}if(Ye(n.numberFormats)){const s=Object.keys(n.numberFormats);s.length&&s.forEach(c=>{e.mergeNumberFormat(c,n.numberFormats[c])})}}}function Vg(e){return t.createVNode(t.Text,null,e,0)}const zg="__INTLIFY_META__",Ug=()=>[],vB=()=>!1;let Wg=0;function Hg(e){return((n,r,l,i)=>e(r,l,t.getCurrentInstance()||void 0,i))}const EB=()=>{const e=t.getCurrentInstance();let n=null;return e&&(n=$g(e)[zg])?{[zg]:n}:null};function yu(e={}){const{__root:n,__injectWithOption:r}=e,l=n===void 0,i=e.flatJson,s=tr?t.ref:t.shallowRef;let c=qe(e.inheritLocale)?e.inheritLocale:!0;const f=s(n&&c?n.locale.value:ce(e.locale)?e.locale:ia),p=s(n&&c?n.fallbackLocale.value:ce(e.fallbackLocale)||_t(e.fallbackLocale)||Ue(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:f.value),d=s(_u(f.value,e)),m=s(Ue(e.datetimeFormats)?e.datetimeFormats:{[f.value]:{}}),h=s(Ue(e.numberFormats)?e.numberFormats:{[f.value]:{}});let y=n?n.missingWarn:qe(e.missingWarn)||cl(e.missingWarn)?e.missingWarn:!0,b=n?n.fallbackWarn:qe(e.fallbackWarn)||cl(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:qe(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,S=st(e.missing)?e.missing:null,v=st(e.missing)?Hg(e.missing):null,k=st(e.postTranslation)?e.postTranslation:null,T=n?n.warnHtmlMessage:qe(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const N=n?n.modifiers:Ue(e.modifiers)?e.modifiers:{};let L=e.pluralRules||n&&n.pluralRules,O;O=(()=>{l&&_g(null);const z={version:_B,locale:f.value,fallbackLocale:p.value,messages:d.value,modifiers:N,pluralRules:L,missing:v===null?void 0:v,missingWarn:y,fallbackWarn:b,fallbackFormat:C,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:T,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=m.value,z.numberFormats=h.value,z.__datetimeFormatters=Ue(O)?O.__datetimeFormatters:void 0,z.__numberFormatters=Ue(O)?O.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(z.__v_emitter=Ue(O)?O.__v_emitter:void 0);const ee=qA(z);return l&&_g(ee),ee})(),sa(O,f.value,p.value);function D(){return[f.value,p.value,d.value,m.value,h.value]}const K=t.computed({get:()=>f.value,set:z=>{O.locale=z,f.value=z}}),U=t.computed({get:()=>p.value,set:z=>{O.fallbackLocale=z,p.value=z,sa(O,f.value,z)}}),V=t.computed(()=>d.value),re=t.computed(()=>m.value),fe=t.computed(()=>h.value);function ke(){return st(k)?k:null}function te(z){k=z,O.postTranslation=z}function X(){return S}function G(z){z!==null&&(v=Hg(z)),S=z,O.missing=v}function Q(z,ee){return z!=="translate"||!ee.resolvedMessage}const ie=(z,ee,Se,Ve,en,tn)=>{D();let ue;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,l||(O.fallbackContext=n?YA():void 0),ue=z(O)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,l||(O.fallbackContext=void 0)}if(Se!=="translate exists"&&At(ue)&&ue===Ai||Se==="translate exists"&&!ue){const[ye,xe]=ee();if(process.env.NODE_ENV!=="production"&&n&&ce(ye)&&Q(Se,xe)&&(_&&(Ri(b,ye)||Cg(y,ye))&&dr(ml(Vn.FALLBACK_TO_ROOT,{key:ye,type:Se})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ne}=O;Ne&&_&&Ne.emit("fallback",{type:Se,key:ye,to:"global",groupId:`${Se}:${ye}`})}return n&&_?Ve(n):en(ye)}else{if(tn(ue))return ue;throw mn(ft.UNEXPECTED_RETURN_TYPE)}};function oe(...z){return ie(ee=>Reflect.apply(Bg,null,[ee,...z]),()=>du(...z),"translate",ee=>Reflect.apply(ee.t,ee,[...z]),ee=>ee,ee=>ce(ee))}function me(...z){const[ee,Se,Ve]=z;if(Ve&&!Ye(Ve))throw mn(ft.INVALID_ARGUMENT);return oe(ee,Se,Bt({resolvedMessage:!0},Ve||{}))}function Oe(...z){return ie(ee=>Reflect.apply(Sg,null,[ee,...z]),()=>uu(...z),"datetime format",ee=>Reflect.apply(ee.d,ee,[...z]),()=>Bi,ee=>ce(ee)||_t(ee))}function Pe(...z){return ie(ee=>Reflect.apply(Ng,null,[ee,...z]),()=>fu(...z),"number format",ee=>Reflect.apply(ee.n,ee,[...z]),()=>Bi,ee=>ce(ee)||_t(ee))}function Ae(z){return z.map(ee=>ce(ee)||At(ee)||qe(ee)?Vg(String(ee)):ee)}const Xe={normalize:Ae,interpolate:z=>z,type:"vnode"};function ge(...z){return ie(ee=>{let Se;const Ve=ee;try{Ve.processor=Xe,Se=Reflect.apply(Bg,null,[Ve,...z])}finally{Ve.processor=null}return Se},()=>du(...z),"translate",ee=>ee[mu](...z),ee=>[Vg(ee)],ee=>_t(ee))}function it(...z){return ie(ee=>Reflect.apply(Ng,null,[ee,...z]),()=>fu(...z),"number format",ee=>ee[gu](...z),Ug,ee=>ce(ee)||_t(ee))}function vt(...z){return ie(ee=>Reflect.apply(Sg,null,[ee,...z]),()=>uu(...z),"datetime format",ee=>ee[hu](...z),Ug,ee=>ce(ee)||_t(ee))}function yt(z){L=z,O.pluralRules=L}function Mt(z,ee){return ie(()=>{if(!z)return!1;const Se=ce(ee)?ee:f.value,Ve=Ct(Se),en=O.messageResolver(Ve,z);return $n(en)||Fn(en)||ce(en)},()=>[z],"translate exists",Se=>Reflect.apply(Se.te,Se,[z,ee]),vB,Se=>qe(Se))}function Dt(z){let ee=null;const Se=cg(O,p.value,f.value);for(let Ve=0;Ve<Se.length;Ve++){const en=d.value[Se[Ve]]||{},tn=O.messageResolver(en,z);if(tn!=null){ee=tn;break}}return ee}function ct(z){const ee=Dt(z);return ee??(n?n.tm(z)||{}:{})}function Ct(z){return d.value[z]||{}}function Yt(z,ee){if(i){const Se={[z]:ee};for(const Ve in Se)nr(Se,Ve)&&ua(Se[Ve]);ee=Se[z]}d.value[z]=ee,O.messages=d.value}function Et(z,ee){d.value[z]=d.value[z]||{};const Se={[z]:ee};if(i)for(const Ve in Se)nr(Se,Ve)&&ua(Se[Ve]);ee=Se[z],Oi(ee,d.value[z]),O.messages=d.value}function P(z){return m.value[z]||{}}function M(z,ee){m.value[z]=ee,O.datetimeFormats=m.value,kg(O,z,ee)}function q(z,ee){m.value[z]=Bt(m.value[z]||{},ee),O.datetimeFormats=m.value,kg(O,z,ee)}function le(z){return h.value[z]||{}}function Fe(z,ee){h.value[z]=ee,O.numberFormats=h.value,Ig(O,z,ee)}function He(z,ee){h.value[z]=Bt(h.value[z]||{},ee),O.numberFormats=h.value,Ig(O,z,ee)}Wg++,n&&tr&&(t.watch(n.locale,z=>{c&&(f.value=z,O.locale=z,sa(O,f.value,p.value))}),t.watch(n.fallbackLocale,z=>{c&&(p.value=z,O.fallbackLocale=z,sa(O,f.value,p.value))}));const j={id:Wg,locale:K,fallbackLocale:U,get inheritLocale(){return c},set inheritLocale(z){c=z,z&&n&&(f.value=n.locale.value,p.value=n.fallbackLocale.value,sa(O,f.value,p.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:V,get modifiers(){return N},get pluralRules(){return L||{}},get isGlobal(){return l},get missingWarn(){return y},set missingWarn(z){y=z,O.missingWarn=y},get fallbackWarn(){return b},set fallbackWarn(z){b=z,O.fallbackWarn=b},get fallbackRoot(){return _},set fallbackRoot(z){_=z},get fallbackFormat(){return C},set fallbackFormat(z){C=z,O.fallbackFormat=C},get warnHtmlMessage(){return T},set warnHtmlMessage(z){T=z,O.warnHtmlMessage=z},get escapeParameter(){return w},set escapeParameter(z){w=z,O.escapeParameter=z},t:oe,getLocaleMessage:Ct,setLocaleMessage:Yt,mergeLocaleMessage:Et,getPostTranslationHandler:ke,setPostTranslationHandler:te,getMissingHandler:X,setMissingHandler:G,[Mg]:yt};return j.datetimeFormats=re,j.numberFormats=fe,j.rt=me,j.te=Mt,j.tm=ct,j.d=Oe,j.n=Pe,j.getDateTimeFormat=P,j.setDateTimeFormat=M,j.mergeDateTimeFormat=q,j.getNumberFormat=le,j.setNumberFormat=Fe,j.mergeNumberFormat=He,j[Dg]=r,j[mu]=ge,j[hu]=vt,j[gu]=it,process.env.NODE_ENV!=="production"&&(j[xo]=z=>{O.__v_emitter=z},j[ca]=()=>{O.__v_emitter=void 0}),j}const Kg="vue-i18n: composer properties",Cu={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},SB={"vue-i18n-resource-inspector":"Search for scopes ..."},TB={"vue-i18n-timeline":16764185};let wu;async function kB(e,n){return new Promise((r,l)=>{try{bB({id:"vue-devtools-plugin-vue-i18n",label:Cu["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Kg],app:e},i=>{wu=i,i.on.visitComponentTree(({componentInstance:c,treeNode:f})=>{NB(c,f,n)}),i.on.inspectComponent(({componentInstance:c,instanceData:f})=>{c.vnode.el&&c.vnode.el.__VUE_I18N__&&f&&(n.mode==="legacy"?c.vnode.el.__VUE_I18N__!==n.global.__composer&&jg(f,c.vnode.el.__VUE_I18N__):jg(f,c.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:Cu["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:SB["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(c=>{c.app===e&&c.inspectorId==="vue-i18n-resource-inspector"&&BB(c,n)});const s=new Map;i.on.getInspectorState(async c=>{if(c.app===e&&c.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),PB(c,n),c.nodeId==="global"){if(!s.has(c.app)){const[f]=await i.getComponentInstances(c.app);s.set(c.app,f)}i.highlightElement(s.get(c.app))}else{const f=RB(c.nodeId,n);f&&i.highlightElement(f)}}),i.on.editInspectorState(c=>{c.app===e&&c.inspectorId==="vue-i18n-resource-inspector"&&MB(c,n)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:Cu["vue-i18n-timeline"],color:TB["vue-i18n-timeline"]}),r(!0)})}catch(i){console.error(i),l(!1)}})}function Gg(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function NB(e,n,r){const l=r.mode==="composition"?r.global:r.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==l){const i={label:`i18n (${Gg(e)} Scope)`,textColor:0,backgroundColor:16764185};n.tags.push(i)}}function jg(e,n){const r=Kg;e.state.push({type:r,key:"locale",editable:!0,value:n.locale.value}),e.state.push({type:r,key:"availableLocales",editable:!1,value:n.availableLocales}),e.state.push({type:r,key:"fallbackLocale",editable:!0,value:n.fallbackLocale.value}),e.state.push({type:r,key:"inheritLocale",editable:!0,value:n.inheritLocale}),e.state.push({type:r,key:"messages",editable:!1,value:vu(n.messages.value)}),e.state.push({type:r,key:"datetimeFormats",editable:!1,value:n.datetimeFormats.value}),e.state.push({type:r,key:"numberFormats",editable:!1,value:n.numberFormats.value})}function vu(e){const n={};return Object.keys(e).forEach(r=>{const l=e[r];st(l)&&"source"in l?n[r]=AB(l):$n(l)&&l.loc&&l.loc.source?n[r]=l.loc.source:Ye(l)?n[r]=vu(l):n[r]=l}),n}const OB={"<":"<",">":">",'"':""","&":"&"};function IB(e){return e.replace(/[<>"&]/g,LB)}function LB(e){return OB[e]||e}function AB(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${IB(e.source)}")`:"(?)"}`}}}function BB(e,n){e.rootNodes.push({id:"global",label:"Global Scope"});const r=n.mode==="composition"?n.global:n.global.__composer;for(const[l,i]of n.__instances){const s=n.mode==="composition"?i:i.__composer;r!==s&&e.rootNodes.push({id:s.id.toString(),label:`${Gg(l)} Scope`})}}function RB(e,n){let r=null;if(e!=="global"){for(const[l,i]of n.__instances.entries())if(i.id.toString()===e){r=l;break}}return r}function Yg(e,n){if(e==="global")return n.mode==="composition"?n.global:n.global.__composer;{const r=Array.from(n.__instances.values()).find(l=>l.id.toString()===e);return r?n.mode==="composition"?r:r.__composer:null}}function PB(e,n){const r=Yg(e.nodeId,n);return r&&(e.state=xB(r)),null}function xB(e){const n={},r="Locale related info",l=[{type:r,key:"locale",editable:!0,value:e.locale.value},{type:r,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:r,key:"availableLocales",editable:!1,value:e.availableLocales},{type:r,key:"inheritLocale",editable:!0,value:e.inheritLocale}];n[r]=l;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:vu(e.messages.value)}];n[i]=s;{const c="Datetime formats info",f=[{type:c,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];n[c]=f;const p="Datetime formats info",d=[{type:p,key:"numberFormats",editable:!1,value:e.numberFormats.value}];n[p]=d}return n}function fa(e,n){if(wu){let r;n&&"groupId"in n&&(r=n.groupId,delete n.groupId),wu.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:r,time:Date.now(),meta:{},data:n||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function MB(e,n){const r=Yg(e.nodeId,n);if(r){const[l]=e.path;l==="locale"&&ce(e.state.value)?r.locale.value=e.state.value:l==="fallbackLocale"&&(ce(e.state.value)||_t(e.state.value)||Ye(e.state.value))?r.fallbackLocale.value=e.state.value:l==="inheritLocale"&&qe(e.state.value)&&(r.inheritLocale=e.state.value)}}function DB(e){const n=ce(e.locale)?e.locale:ia,r=ce(e.fallbackLocale)||_t(e.fallbackLocale)||Ue(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,l=st(e.missing)?e.missing:void 0,i=qe(e.silentTranslationWarn)||cl(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=qe(e.silentFallbackWarn)||cl(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,c=qe(e.fallbackRoot)?e.fallbackRoot:!0,f=!!e.formatFallbackMessages,p=Ue(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,m=st(e.postTranslation)?e.postTranslation:void 0,h=ce(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,y=!!e.escapeParameterHtml,b=qe(e.sync)?e.sync:!0;let _=e.messages;if(Ue(e.sharedMessages)){const N=e.sharedMessages;_=Object.keys(N).reduce((O,R)=>{const D=O[R]||(O[R]={});return Bt(D,N[R]),O},_||{})}const{__i18n:C,__root:S,__injectWithOption:v}=e,k=e.datetimeFormats,T=e.numberFormats,w=e.flatJson;return{locale:n,fallbackLocale:r,messages:_,flatJson:w,datetimeFormats:k,numberFormats:T,missing:l,missingWarn:i,fallbackWarn:s,fallbackRoot:c,fallbackFormat:f,modifiers:p,pluralRules:d,postTranslation:m,warnHtmlMessage:h,escapeParameter:y,messageResolver:e.messageResolver,inheritLocale:b,__i18n:C,__root:S,__injectWithOption:v}}function Eu(e={}){const n=yu(DB(e)),{__extender:r}=e,l={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return qe(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=qe(i)?!i:i},get silentFallbackWarn(){return qe(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=qe(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){return Reflect.apply(n.t,n,[...i])},rt(...i){return Reflect.apply(n.rt,n,[...i])},te(i,s){return n.te(i,s)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,s){n.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){n.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,s){n.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){n.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,s){n.setNumberFormat(i,s)},mergeNumberFormat(i,s){n.mergeNumberFormat(i,s)}};return l.__extender=r,process.env.NODE_ENV!=="production"&&(l.__enableEmitter=i=>{const s=n;s[xo]&&s[xo](i)},l.__disableEmitter=()=>{const i=n;i[ca]&&i[ca]()}),l}function $B(e,n,r){return{beforeCreate(){const l=t.getCurrentInstance();if(!l)throw mn(ft.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=n,this===this.$root)this.$i18n=qg(e,s);else{s.__injectWithOption=!0,s.__extender=r.__vueI18nExtend,this.$i18n=Eu(s);const c=this.$i18n;c.__extender&&(c.__disposer=c.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=qg(e,i);else{this.$i18n=Eu({__i18n:i.__i18n,__injectWithOption:!0,__extender:r.__vueI18nExtend,__root:n});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Fg(n,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,c)=>this.$i18n.te(s,c),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),r.__setInstance(l,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const l=this.$i18n;this.$el.__VUE_I18N__=l.__composer;const i=this.__v_emitter=eu();l.__enableEmitter&&l.__enableEmitter(i),i.on("*",fa)}},unmounted(){const l=t.getCurrentInstance();if(!l)throw mn(ft.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",fa),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),r.__deleteInstance(l),delete this.$i18n}}}function qg(e,n){e.locale=n.locale||e.locale,e.fallbackLocale=n.fallbackLocale||e.fallbackLocale,e.missing=n.missing||e.missing,e.silentTranslationWarn=n.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=n.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=n.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=n.postTranslation||e.postTranslation,e.warnHtmlInMessage=n.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=n.escapeParameterHtml||e.escapeParameterHtml,e.sync=n.sync||e.sync,e.__composer[Mg](n.pluralizationRules||e.pluralizationRules);const r=_u(e.locale,{messages:n.messages,__i18n:n.__i18n});return Object.keys(r).forEach(l=>e.mergeLocaleMessage(l,r[l])),n.datetimeFormats&&Object.keys(n.datetimeFormats).forEach(l=>e.mergeDateTimeFormat(l,n.datetimeFormats[l])),n.numberFormats&&Object.keys(n.numberFormats).forEach(l=>e.mergeNumberFormat(l,n.numberFormats[l])),e}const Su={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function FB({slots:e},n){return n.length===1&&n[0]==="default"?(e.default?e.default():[]).reduce((l,i)=>[...l,...i.type===t.Fragment?i.children:[i]],[]):n.reduce((r,l)=>{const i=e[l];return i&&(r[l]=i()),r},at())}function Xg(){return t.Fragment}const Jg=t.defineComponent({name:"i18n-t",props:Bt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>At(e)||!isNaN(e)}},Su),setup(e,n){const{slots:r,attrs:l}=n,i=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(r).filter(h=>h[0]!=="_"),c=at();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=ce(e.plural)?+e.plural:e.plural);const f=FB(n,s),p=i[mu](e.keypath,f,c),d=Bt(at(),l),m=ce(e.tag)||Ye(e.tag)?e.tag:Xg();return t.h(m,d,p)}}});function VB(e){return _t(e)&&!ce(e[0])}function Zg(e,n,r,l){const{slots:i,attrs:s}=n;return()=>{const c={part:!0};let f=at();e.locale&&(c.locale=e.locale),ce(e.format)?c.key=e.format:Ye(e.format)&&(ce(e.format.key)&&(c.key=e.format.key),f=Object.keys(e.format).reduce((y,b)=>r.includes(b)?Bt(at(),y,{[b]:e.format[b]}):y,at()));const p=l(e.value,c,f);let d=[c.key];_t(p)?d=p.map((y,b)=>{const _=i[y.type],C=_?_({[y.type]:y.value,index:b,parts:p}):[y.value];return VB(C)&&(C[0].key=`${y.type}-${b}`),C}):ce(p)&&(d=[p]);const m=Bt(at(),s),h=ce(e.tag)||Ye(e.tag)?e.tag:Xg();return t.h(h,m,d)}}const Qg=t.defineComponent({name:"i18n-n",props:Bt({value:{type:Number,required:!0},format:{type:[String,Object]}},Su),setup(e,n){const r=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return Zg(e,n,Og,(...l)=>r[gu](...l))}});function zB(e,n){const r=e;if(e.mode==="composition")return r.__getInstance(n)||e.global;{const l=r.__getInstance(n);return l!=null?l.__composer:e.global.__composer}}function UB(e){const n=c=>{process.env.NODE_ENV!=="production"&&Jc(ml(Vn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:f,value:p}=c;if(!f||!f.$)throw mn(ft.UNEXPECTED_ERROR);const d=zB(e,f.$),m=e0(p);return[Reflect.apply(d.t,d,[...t0(m)]),d]};return{created:(c,f)=>{const[p,d]=n(f);tr&&e.global===d&&(c.__i18nWatcher=t.watch(d.locale,()=>{f.instance&&f.instance.$forceUpdate()})),c.__composer=d,c.textContent=p},unmounted:c=>{tr&&c.__i18nWatcher&&(c.__i18nWatcher(),c.__i18nWatcher=void 0,delete c.__i18nWatcher),c.__composer&&(c.__composer=void 0,delete c.__composer)},beforeUpdate:(c,{value:f})=>{if(c.__composer){const p=c.__composer,d=e0(f);c.textContent=Reflect.apply(p.t,p,[...t0(d)])}},getSSRProps:c=>{const[f]=n(c);return{textContent:f}}}}function e0(e){if(ce(e))return{path:e};if(Ue(e)){if(!("path"in e))throw mn(ft.REQUIRED_VALUE,"path");return e}else throw mn(ft.INVALID_VALUE)}function t0(e){const{path:n,locale:r,args:l,choice:i,plural:s}=e,c={},f=l||{};return ce(r)&&(c.locale=r),At(i)&&(c.plural=i),At(s)&&(c.plural=s),[n,f,c]}function WB(e,n,...r){const l=Ue(r[0])?r[0]:{};(qe(l.globalInstall)?l.globalInstall:!0)&&([Jg.name,"I18nT"].forEach(s=>e.component(s,Jg)),[Qg.name,"I18nN"].forEach(s=>e.component(s,Qg)),[r0.name,"I18nD"].forEach(s=>e.component(s,r0))),e.directive("t",UB(n))}const HB=pr("global-vue-i18n");function KB(e={}){const n=__VUE_I18N_LEGACY_API__&&qe(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&n&&Jc(ml(Vn.DEPRECATE_LEGACY_MODE));const r=qe(e.globalInjection)?e.globalInjection:!0,l=new Map,[i,s]=GB(e,n),c=pr(process.env.NODE_ENV!=="production"?"vue-i18n":"");function f(h){return l.get(h)||null}function p(h,y){l.set(h,y)}function d(h){l.delete(h)}const m={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(h,...y){if(process.env.NODE_ENV!=="production"&&(h.__VUE_I18N__=m),h.__VUE_I18N_SYMBOL__=c,h.provide(h.__VUE_I18N_SYMBOL__,m),Ue(y[0])){const C=y[0];m.__composerExtend=C.__composerExtend,m.__vueI18nExtend=C.__vueI18nExtend}let b=null;!n&&r&&(b=eR(h,m.global)),__VUE_I18N_FULL_INSTALL__&&WB(h,m,...y),__VUE_I18N_LEGACY_API__&&n&&h.mixin($B(s,s.__composer,m));const _=h.unmount;if(h.unmount=()=>{b&&b(),m.dispose(),_()},process.env.NODE_ENV!=="production"){if(!await kB(h,m))throw mn(ft.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=eu();if(n){const v=s;v.__enableEmitter&&v.__enableEmitter(S)}else{const v=s;v[xo]&&v[xo](S)}S.on("*",fa)}},get global(){return s},dispose(){i.stop()},__instances:l,__getInstance:f,__setInstance:p,__deleteInstance:d};return m}function Pi(e={}){const n=t.getCurrentInstance();if(n==null)throw mn(ft.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw mn(ft.NOT_INSTALLED);const r=jB(n),l=qB(r),i=$g(n),s=YB(e,i);if(s==="global")return Fg(l,e,i),l;if(s==="parent"){let p=XB(r,n,e.__useComponent);return p==null&&(process.env.NODE_ENV!=="production"&&dr(ml(Vn.NOT_FOUND_PARENT_SCOPE)),p=l),p}const c=r;let f=c.__getInstance(n);if(f==null){const p=Bt({},e);"__i18n"in i&&(p.__i18n=i.__i18n),l&&(p.__root=l),f=yu(p),c.__composerExtend&&(f[bu]=c.__composerExtend(f)),ZB(c,n,f),c.__setInstance(n,f)}else process.env.NODE_ENV!=="production"&&s==="local"&&dr(ml(Vn.DUPLICATE_USE_I18N_CALLING));return f}function GB(e,n){const r=t.effectScope(),l=__VUE_I18N_LEGACY_API__&&n?r.run(()=>Eu(e)):r.run(()=>yu(e));if(l==null)throw mn(ft.UNEXPECTED_ERROR);return[r,l]}function jB(e){const n=t.inject(e.isCE?HB:e.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw mn(e.isCE?ft.NOT_INSTALLED_WITH_PROVIDE:ft.UNEXPECTED_ERROR);return n}function YB(e,n){return ki(e)?"__i18n"in n?"local":"global":e.useScope?e.useScope:"local"}function qB(e){return e.mode==="composition"?e.global:e.global.__composer}function XB(e,n,r=!1){let l=null;const i=n.root;let s=JB(n,r);for(;s!=null;){const c=e;if(e.mode==="composition")l=c.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const f=c.__getInstance(s);f!=null&&(l=f.__composer,r&&l&&!l[Dg]&&(l=null))}if(l!=null||i===s)break;s=s.parent}return l}function JB(e,n=!1){return e==null?null:n&&e.vnode.ctx||e.parent}function ZB(e,n,r){let l=null;t.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&n.vnode.el){n.vnode.el.__VUE_I18N__=r,l=eu();const i=r;i[xo]&&i[xo](l),l.on("*",fa)}},n),t.onUnmounted(()=>{const i=r;process.env.NODE_ENV!=="production"&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&(l&&l.off("*",fa),i[ca]&&i[ca](),delete n.vnode.el.__VUE_I18N__),e.__deleteInstance(n);const s=i[bu];s&&(s(),delete i[bu])},n)}const QB=["locale","fallbackLocale","availableLocales"],n0=["t","rt","d","n","tm","te"];function eR(e,n){const r=Object.create(null);return QB.forEach(i=>{const s=Object.getOwnPropertyDescriptor(n,i);if(!s)throw mn(ft.UNEXPECTED_ERROR);const c=t.isRef(s.value)?{get(){return s.value.value},set(f){s.value.value=f}}:{get(){return s.get&&s.get()}};Object.defineProperty(r,i,c)}),e.config.globalProperties.$i18n=r,n0.forEach(i=>{const s=Object.getOwnPropertyDescriptor(n,i);if(!s||!s.value)throw mn(ft.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,s)}),()=>{delete e.config.globalProperties.$i18n,n0.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const r0=t.defineComponent({name:"i18n-d",props:Bt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Su),setup(e,n){const r=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return Zg(e,n,Tg,(...l)=>r[hu](...l))}});if(yB(),WA(wA),HA($A),KA(cg),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ro();e.__INTLIFY__=!0,vA(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const tR=KB({legacy:!1,locale:"zh-TW",fallbackLocale:"en-US",messages:{"zh-TW":{"common.select":"請選擇","common.confirm":"確定","common.cancel":"取消","dialog.confirmRemoveUser":"請問是否確認移除該使用者","common.warning":"警告","search.placeholder":"請輸入關鍵字搜尋列表","common.execute":"執行","common.reset":"重設","common.loading":"數據加載中","common.view":"查看","common.edit":"編輯","common.column":"欄","common.back":"回到前一頁","demo.componentDemo":"組件示範","button.title":"按鈕","button.primary ":"主要","button.default":"默認","button.danger":"危險","button.success":"成功","button.warning":"警告","button.info":"信息","button.style":"樣式","button.size":"尺寸","button.small":"小","button.medium":"中","button.large ":"大","status.title":"狀態","status.normal ":"正常","status.loading":"載入中","status.disabled":"禁用","button.withIcon ":"帶圖標的","button.add":"添加","button.delete":"刪除"},"en-US":{"common.select":"Please select","common.confirm":"Confirm","common.cancel":"Cancel","dialog.confirmRemoveUser":"Are you sure you want to remove this user?","common.warning":"Warning","search.placeholder":"Please enter keywords to search the list","common.execute":"Execute","common.reset":"Reset","common.loading":"Data loading","common.view":"View","common.edit":"Edit","common.column":"Column","common.back":" Back","demo.componentDemo":"Component Demo","button.title":"Button","button.primary ":"Primary","button.default":"Default","button.danger":"Danger","button.success":"Success","button.warning":"Warning","button.info":"Info","button.style":"Style","button.size":"Size","button.small":"Small","button.medium":"Medium","button.large ":"Large","status.title":"Status","status.normal ":"Normal","status.loading":"Loading","status.disabled":"Disabled","button.withIcon ":"With Icon","button.add":"Add","button.delete":"Delete"}}}),nR=e=>{tR.global.locale.value=e,localStorage.setItem("locale",e)},o0=[{code:"zh-TW",name:"繁體中文"},{code:"en-US",name:"English"}],rR={class:"language-switcher"},oR=t.defineComponent({__name:"LanguageSwitcher",setup(e){const{locale:n}=Pi(),r=i=>{nR(i)},l=t.computed(()=>{const i=o0.find(s=>s.code===n.value);return(i==null?void 0:i.name)||"繁體中文"});return(i,s)=>{const c=di,f=iN,p=sN,d=aN;return t.openBlock(),t.createElementBlock("div",rR,[t.createVNode(d,{onCommand:r,trigger:"click"},{dropdown:t.withCtx(()=>[t.createVNode(p,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o0),m=>(t.openBlock(),t.createBlock(f,{key:m.code,command:m.code},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:t.withCtx(()=>[t.createVNode(c,{type:"text",class:"flex items-center"},{default:t.withCtx(()=>[s[0]||(s[0]=t.createElementVNode("svg",{class:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})],-1)),t.createTextVNode(" "+t.toDisplayString(l.value)+" ",1),s[1]||(s[1]=t.createElementVNode("svg",{class:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),_:1,__:[0,1]})]),_:1})])}}}),lR={class:"w-full mb-4"},aR={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},iR={class:"flex items-center mr-4"},da=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function},showCheckBtn:{type:Boolean},showEditBtn:{type:Boolean}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort","click:checkRow","click:editRow"],setup(e,{emit:n}){const r=n,l=()=>{r("open:transfer")},i=d=>{r("update:selectRow",d)},s=(d,m)=>{r("click:cell",d,m)},c=d=>{r("click:columnSort",d)},f=d=>{r("click:checkRow",d)},p=d=>{r("click:editRow",d)};return(d,m)=>{const h=kt;return t.openBlock(),t.createElementBlock("div",lR,[t.createElementVNode("div",aR,[t.createElementVNode("div",iR,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:l},[t.createVNode(h,null,{default:t.withCtx(()=>[t.createVNode(t.unref(d1))]),_:1})])])]),t.createVNode(t.unref(Io),{loading:d.loading,data:d.data,columns:d.columns,"show-selection":d.showSelection,"show-summary":d.showSummary,"show-over-flow-tooltip":d.showOverFlowTooltip,"summary-method":d.summaryMethod,"base-table-row-class-name":d.sortTableRowClassName,"show-check-btn":d.showCheckBtn,"show-edit-btn":d.showEditBtn,onSelectionChange:i,onCellClick:s,onColumnSortChange:c,"onClick:checkRow":f,"onClick:editRow":p},null,8,["loading","data","columns","show-selection","show-summary","show-over-flow-tooltip","summary-method","base-table-row-class-name","show-check-btn","show-edit-btn"])])}}});function sR(e){return e.map(n=>({...n,checkActive:!0}))}let xt={locales:[...[{code:"zh-TW",name:"繁體中文"},{code:"en-US",name:"English"}]],defaultLocale:"zh-TW",storageKey:"locale"};const cR=()=>xt.externalHandler?xt.externalHandler.availableLocales():xt.locales,uR=e=>{xt={...xt,...e}},fR=e=>{if(xt.externalHandler){xt.externalHandler.switchLanguage(e);return}if(!xt.locales.some(n=>n.code===e)){console.warn(`Language ${e} is not configured`);return}localStorage.setItem(xt.storageKey,e),window.dispatchEvent(new CustomEvent("languageChanged",{detail:{locale:e}}))},l0=()=>{if(xt.externalHandler)return xt.externalHandler.getCurrentLocale();const e=localStorage.getItem(xt.storageKey);return e&&xt.locales.some(n=>n.code===e)?e:xt.defaultLocale},dR=e=>{var r,l;if((r=xt.externalHandler)!=null&&r.getLanguageName)return xt.externalHandler.getLanguageName(e);const n=xt.locales.find(i=>i.code===e);return(n==null?void 0:n.name)||((l=xt.locales[0])==null?void 0:l.name)||"Unknown"},pR=()=>{const e=l0();return window.dispatchEvent(new CustomEvent("languageInitialized",{detail:{locale:e}})),e},a0=[Io,dn,sl,Lo,da,ra,Ao];function i0(e,n){a0.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const mR={install:i0,...a0};Io.install=e=>{e.component(Io.name||"BaseTable",Io)},dn.install=e=>{e.component(dn.name||"BaseBtn",dn)},sl.install=e=>{e.component(sl.name||"BaseInput",sl)},Lo.install=e=>{e.component(Lo.name||"BaseDialog",Lo)},da.install=e=>{e.component(da.name||"SortTable",da)},ra.install=e=>{e.component(ra.name||"TitleTable",ra)},Ao.install=e=>{e.component(Ao.name||"SearchBar",Ao)},Le.BaseBtn=dn,Le.BaseDialog=Lo,Le.BaseInput=sl,Le.BaseTable=Io,Le.BaseWaringDialog=GI,Le.DetailLayout=yL,Le.FilterLayout=EL,Le.FunctionHeader=Uh,Le.LanguageSwitcher=oR,Le.MainPanel=Si,Le.SearchBar=Ao,Le.SearchableListPanel=hL,Le.SortTable=da,Le.TitleTable=ra,Le.TransferDialog=aL,Le.TransferItem=zh,Le.availableLocales=cR,Le.configureLanguageSwitcher=uR,Le.default=mR,Le.getCurrentLocale=l0,Le.getLanguageName=dR,Le.initLanguageSwitcher=pR,Le.install=i0,Le.setActiveColumn=sR,Le.switchLanguage=fR,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
65
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Vn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Vn.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function ml(e,...n){return Ti(wB[e],...n)}function ua(e){if(!Ye(e)||$n(e))return e;for(const n in e)if(nr(e,n))if(!n.includes("."))Ye(e[n])&&ua(e[n]);else{const r=n.split("."),l=r.length-1;let i=e,s=!1;for(let c=0;c<l;c++){if(r[c]==="__proto__")throw new Error(`unsafe key: ${r[c]}`);if(r[c]in i||(i[r[c]]=at()),!Ye(i[r[c]])){process.env.NODE_ENV!=="production"&&dr(ml(Vn.IGNORE_OBJ_FLATTEN,{key:r[c]})),s=!0;break}i=i[r[c]]}if(s||($n(i)?ag.includes(r[l])||delete e[n]:(i[r[l]]=e[n],delete e[n])),!$n(i)){const c=i[r[l]];Ye(c)&&ua(c)}}return e}function _u(e,n){const{messages:r,__i18n:l,messageResolver:i,flatJson:s}=n,c=Ue(r)?r:_t(l)?at():{[e]:at()};if(_t(l)&&l.forEach(f=>{if("locale"in f&&"resource"in f){const{locale:p,resource:d}=f;p?(c[p]=c[p]||at(),Oi(d,c[p])):Oi(d,c)}else ce(f)&&Oi(JSON.parse(f),c)}),i==null&&s)for(const f in c)nr(c,f)&&ua(c[f]);return c}function $g(e){return e.type}function Fg(e,n,r){let l=Ye(n.messages)?n.messages:at();"__i18nGlobal"in r&&(l=_u(e.locale.value,{messages:l,__i18n:r.__i18nGlobal}));const i=Object.keys(l);i.length&&i.forEach(s=>{e.mergeLocaleMessage(s,l[s])});{if(Ye(n.datetimeFormats)){const s=Object.keys(n.datetimeFormats);s.length&&s.forEach(c=>{e.mergeDateTimeFormat(c,n.datetimeFormats[c])})}if(Ye(n.numberFormats)){const s=Object.keys(n.numberFormats);s.length&&s.forEach(c=>{e.mergeNumberFormat(c,n.numberFormats[c])})}}}function Vg(e){return t.createVNode(t.Text,null,e,0)}const zg="__INTLIFY_META__",Ug=()=>[],vB=()=>!1;let Wg=0;function Hg(e){return((n,r,l,i)=>e(r,l,t.getCurrentInstance()||void 0,i))}const EB=()=>{const e=t.getCurrentInstance();let n=null;return e&&(n=$g(e)[zg])?{[zg]:n}:null};function yu(e={}){const{__root:n,__injectWithOption:r}=e,l=n===void 0,i=e.flatJson,s=tr?t.ref:t.shallowRef;let c=qe(e.inheritLocale)?e.inheritLocale:!0;const f=s(n&&c?n.locale.value:ce(e.locale)?e.locale:ia),p=s(n&&c?n.fallbackLocale.value:ce(e.fallbackLocale)||_t(e.fallbackLocale)||Ue(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:f.value),d=s(_u(f.value,e)),m=s(Ue(e.datetimeFormats)?e.datetimeFormats:{[f.value]:{}}),h=s(Ue(e.numberFormats)?e.numberFormats:{[f.value]:{}});let y=n?n.missingWarn:qe(e.missingWarn)||cl(e.missingWarn)?e.missingWarn:!0,b=n?n.fallbackWarn:qe(e.fallbackWarn)||cl(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:qe(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,S=st(e.missing)?e.missing:null,v=st(e.missing)?Hg(e.missing):null,k=st(e.postTranslation)?e.postTranslation:null,T=n?n.warnHtmlMessage:qe(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const N=n?n.modifiers:Ue(e.modifiers)?e.modifiers:{};let L=e.pluralRules||n&&n.pluralRules,O;O=(()=>{l&&_g(null);const z={version:_B,locale:f.value,fallbackLocale:p.value,messages:d.value,modifiers:N,pluralRules:L,missing:v===null?void 0:v,missingWarn:y,fallbackWarn:b,fallbackFormat:C,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:T,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=m.value,z.numberFormats=h.value,z.__datetimeFormatters=Ue(O)?O.__datetimeFormatters:void 0,z.__numberFormatters=Ue(O)?O.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(z.__v_emitter=Ue(O)?O.__v_emitter:void 0);const ee=qA(z);return l&&_g(ee),ee})(),sa(O,f.value,p.value);function D(){return[f.value,p.value,d.value,m.value,h.value]}const K=t.computed({get:()=>f.value,set:z=>{O.locale=z,f.value=z}}),U=t.computed({get:()=>p.value,set:z=>{O.fallbackLocale=z,p.value=z,sa(O,f.value,z)}}),V=t.computed(()=>d.value),re=t.computed(()=>m.value),fe=t.computed(()=>h.value);function ke(){return st(k)?k:null}function te(z){k=z,O.postTranslation=z}function X(){return S}function G(z){z!==null&&(v=Hg(z)),S=z,O.missing=v}function Q(z,ee){return z!=="translate"||!ee.resolvedMessage}const ie=(z,ee,Se,Ve,en,tn)=>{D();let ue;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,l||(O.fallbackContext=n?YA():void 0),ue=z(O)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,l||(O.fallbackContext=void 0)}if(Se!=="translate exists"&&At(ue)&&ue===Ai||Se==="translate exists"&&!ue){const[ye,xe]=ee();if(process.env.NODE_ENV!=="production"&&n&&ce(ye)&&Q(Se,xe)&&(_&&(Ri(b,ye)||Cg(y,ye))&&dr(ml(Vn.FALLBACK_TO_ROOT,{key:ye,type:Se})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ne}=O;Ne&&_&&Ne.emit("fallback",{type:Se,key:ye,to:"global",groupId:`${Se}:${ye}`})}return n&&_?Ve(n):en(ye)}else{if(tn(ue))return ue;throw mn(ft.UNEXPECTED_RETURN_TYPE)}};function oe(...z){return ie(ee=>Reflect.apply(Bg,null,[ee,...z]),()=>du(...z),"translate",ee=>Reflect.apply(ee.t,ee,[...z]),ee=>ee,ee=>ce(ee))}function me(...z){const[ee,Se,Ve]=z;if(Ve&&!Ye(Ve))throw mn(ft.INVALID_ARGUMENT);return oe(ee,Se,Bt({resolvedMessage:!0},Ve||{}))}function Oe(...z){return ie(ee=>Reflect.apply(Sg,null,[ee,...z]),()=>uu(...z),"datetime format",ee=>Reflect.apply(ee.d,ee,[...z]),()=>Bi,ee=>ce(ee)||_t(ee))}function Pe(...z){return ie(ee=>Reflect.apply(Ng,null,[ee,...z]),()=>fu(...z),"number format",ee=>Reflect.apply(ee.n,ee,[...z]),()=>Bi,ee=>ce(ee)||_t(ee))}function Ae(z){return z.map(ee=>ce(ee)||At(ee)||qe(ee)?Vg(String(ee)):ee)}const Xe={normalize:Ae,interpolate:z=>z,type:"vnode"};function ge(...z){return ie(ee=>{let Se;const Ve=ee;try{Ve.processor=Xe,Se=Reflect.apply(Bg,null,[Ve,...z])}finally{Ve.processor=null}return Se},()=>du(...z),"translate",ee=>ee[mu](...z),ee=>[Vg(ee)],ee=>_t(ee))}function it(...z){return ie(ee=>Reflect.apply(Ng,null,[ee,...z]),()=>fu(...z),"number format",ee=>ee[gu](...z),Ug,ee=>ce(ee)||_t(ee))}function vt(...z){return ie(ee=>Reflect.apply(Sg,null,[ee,...z]),()=>uu(...z),"datetime format",ee=>ee[hu](...z),Ug,ee=>ce(ee)||_t(ee))}function yt(z){L=z,O.pluralRules=L}function Mt(z,ee){return ie(()=>{if(!z)return!1;const Se=ce(ee)?ee:f.value,Ve=Ct(Se),en=O.messageResolver(Ve,z);return $n(en)||Fn(en)||ce(en)},()=>[z],"translate exists",Se=>Reflect.apply(Se.te,Se,[z,ee]),vB,Se=>qe(Se))}function Dt(z){let ee=null;const Se=cg(O,p.value,f.value);for(let Ve=0;Ve<Se.length;Ve++){const en=d.value[Se[Ve]]||{},tn=O.messageResolver(en,z);if(tn!=null){ee=tn;break}}return ee}function ct(z){const ee=Dt(z);return ee??(n?n.tm(z)||{}:{})}function Ct(z){return d.value[z]||{}}function Yt(z,ee){if(i){const Se={[z]:ee};for(const Ve in Se)nr(Se,Ve)&&ua(Se[Ve]);ee=Se[z]}d.value[z]=ee,O.messages=d.value}function Et(z,ee){d.value[z]=d.value[z]||{};const Se={[z]:ee};if(i)for(const Ve in Se)nr(Se,Ve)&&ua(Se[Ve]);ee=Se[z],Oi(ee,d.value[z]),O.messages=d.value}function P(z){return m.value[z]||{}}function M(z,ee){m.value[z]=ee,O.datetimeFormats=m.value,kg(O,z,ee)}function q(z,ee){m.value[z]=Bt(m.value[z]||{},ee),O.datetimeFormats=m.value,kg(O,z,ee)}function le(z){return h.value[z]||{}}function Fe(z,ee){h.value[z]=ee,O.numberFormats=h.value,Ig(O,z,ee)}function He(z,ee){h.value[z]=Bt(h.value[z]||{},ee),O.numberFormats=h.value,Ig(O,z,ee)}Wg++,n&&tr&&(t.watch(n.locale,z=>{c&&(f.value=z,O.locale=z,sa(O,f.value,p.value))}),t.watch(n.fallbackLocale,z=>{c&&(p.value=z,O.fallbackLocale=z,sa(O,f.value,p.value))}));const j={id:Wg,locale:K,fallbackLocale:U,get inheritLocale(){return c},set inheritLocale(z){c=z,z&&n&&(f.value=n.locale.value,p.value=n.fallbackLocale.value,sa(O,f.value,p.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:V,get modifiers(){return N},get pluralRules(){return L||{}},get isGlobal(){return l},get missingWarn(){return y},set missingWarn(z){y=z,O.missingWarn=y},get fallbackWarn(){return b},set fallbackWarn(z){b=z,O.fallbackWarn=b},get fallbackRoot(){return _},set fallbackRoot(z){_=z},get fallbackFormat(){return C},set fallbackFormat(z){C=z,O.fallbackFormat=C},get warnHtmlMessage(){return T},set warnHtmlMessage(z){T=z,O.warnHtmlMessage=z},get escapeParameter(){return w},set escapeParameter(z){w=z,O.escapeParameter=z},t:oe,getLocaleMessage:Ct,setLocaleMessage:Yt,mergeLocaleMessage:Et,getPostTranslationHandler:ke,setPostTranslationHandler:te,getMissingHandler:X,setMissingHandler:G,[Mg]:yt};return j.datetimeFormats=re,j.numberFormats=fe,j.rt=me,j.te=Mt,j.tm=ct,j.d=Oe,j.n=Pe,j.getDateTimeFormat=P,j.setDateTimeFormat=M,j.mergeDateTimeFormat=q,j.getNumberFormat=le,j.setNumberFormat=Fe,j.mergeNumberFormat=He,j[Dg]=r,j[mu]=ge,j[hu]=vt,j[gu]=it,process.env.NODE_ENV!=="production"&&(j[xo]=z=>{O.__v_emitter=z},j[ca]=()=>{O.__v_emitter=void 0}),j}const Kg="vue-i18n: composer properties",Cu={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},SB={"vue-i18n-resource-inspector":"Search for scopes ..."},TB={"vue-i18n-timeline":16764185};let wu;async function kB(e,n){return new Promise((r,l)=>{try{bB({id:"vue-devtools-plugin-vue-i18n",label:Cu["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Kg],app:e},i=>{wu=i,i.on.visitComponentTree(({componentInstance:c,treeNode:f})=>{NB(c,f,n)}),i.on.inspectComponent(({componentInstance:c,instanceData:f})=>{c.vnode.el&&c.vnode.el.__VUE_I18N__&&f&&(n.mode==="legacy"?c.vnode.el.__VUE_I18N__!==n.global.__composer&&jg(f,c.vnode.el.__VUE_I18N__):jg(f,c.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:Cu["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:SB["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(c=>{c.app===e&&c.inspectorId==="vue-i18n-resource-inspector"&&BB(c,n)});const s=new Map;i.on.getInspectorState(async c=>{if(c.app===e&&c.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),PB(c,n),c.nodeId==="global"){if(!s.has(c.app)){const[f]=await i.getComponentInstances(c.app);s.set(c.app,f)}i.highlightElement(s.get(c.app))}else{const f=RB(c.nodeId,n);f&&i.highlightElement(f)}}),i.on.editInspectorState(c=>{c.app===e&&c.inspectorId==="vue-i18n-resource-inspector"&&MB(c,n)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:Cu["vue-i18n-timeline"],color:TB["vue-i18n-timeline"]}),r(!0)})}catch(i){console.error(i),l(!1)}})}function Gg(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function NB(e,n,r){const l=r.mode==="composition"?r.global:r.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==l){const i={label:`i18n (${Gg(e)} Scope)`,textColor:0,backgroundColor:16764185};n.tags.push(i)}}function jg(e,n){const r=Kg;e.state.push({type:r,key:"locale",editable:!0,value:n.locale.value}),e.state.push({type:r,key:"availableLocales",editable:!1,value:n.availableLocales}),e.state.push({type:r,key:"fallbackLocale",editable:!0,value:n.fallbackLocale.value}),e.state.push({type:r,key:"inheritLocale",editable:!0,value:n.inheritLocale}),e.state.push({type:r,key:"messages",editable:!1,value:vu(n.messages.value)}),e.state.push({type:r,key:"datetimeFormats",editable:!1,value:n.datetimeFormats.value}),e.state.push({type:r,key:"numberFormats",editable:!1,value:n.numberFormats.value})}function vu(e){const n={};return Object.keys(e).forEach(r=>{const l=e[r];st(l)&&"source"in l?n[r]=AB(l):$n(l)&&l.loc&&l.loc.source?n[r]=l.loc.source:Ye(l)?n[r]=vu(l):n[r]=l}),n}const OB={"<":"<",">":">",'"':""","&":"&"};function IB(e){return e.replace(/[<>"&]/g,LB)}function LB(e){return OB[e]||e}function AB(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${IB(e.source)}")`:"(?)"}`}}}function BB(e,n){e.rootNodes.push({id:"global",label:"Global Scope"});const r=n.mode==="composition"?n.global:n.global.__composer;for(const[l,i]of n.__instances){const s=n.mode==="composition"?i:i.__composer;r!==s&&e.rootNodes.push({id:s.id.toString(),label:`${Gg(l)} Scope`})}}function RB(e,n){let r=null;if(e!=="global"){for(const[l,i]of n.__instances.entries())if(i.id.toString()===e){r=l;break}}return r}function Yg(e,n){if(e==="global")return n.mode==="composition"?n.global:n.global.__composer;{const r=Array.from(n.__instances.values()).find(l=>l.id.toString()===e);return r?n.mode==="composition"?r:r.__composer:null}}function PB(e,n){const r=Yg(e.nodeId,n);return r&&(e.state=xB(r)),null}function xB(e){const n={},r="Locale related info",l=[{type:r,key:"locale",editable:!0,value:e.locale.value},{type:r,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:r,key:"availableLocales",editable:!1,value:e.availableLocales},{type:r,key:"inheritLocale",editable:!0,value:e.inheritLocale}];n[r]=l;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:vu(e.messages.value)}];n[i]=s;{const c="Datetime formats info",f=[{type:c,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];n[c]=f;const p="Datetime formats info",d=[{type:p,key:"numberFormats",editable:!1,value:e.numberFormats.value}];n[p]=d}return n}function fa(e,n){if(wu){let r;n&&"groupId"in n&&(r=n.groupId,delete n.groupId),wu.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:r,time:Date.now(),meta:{},data:n||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function MB(e,n){const r=Yg(e.nodeId,n);if(r){const[l]=e.path;l==="locale"&&ce(e.state.value)?r.locale.value=e.state.value:l==="fallbackLocale"&&(ce(e.state.value)||_t(e.state.value)||Ye(e.state.value))?r.fallbackLocale.value=e.state.value:l==="inheritLocale"&&qe(e.state.value)&&(r.inheritLocale=e.state.value)}}function DB(e){const n=ce(e.locale)?e.locale:ia,r=ce(e.fallbackLocale)||_t(e.fallbackLocale)||Ue(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,l=st(e.missing)?e.missing:void 0,i=qe(e.silentTranslationWarn)||cl(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=qe(e.silentFallbackWarn)||cl(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,c=qe(e.fallbackRoot)?e.fallbackRoot:!0,f=!!e.formatFallbackMessages,p=Ue(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,m=st(e.postTranslation)?e.postTranslation:void 0,h=ce(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,y=!!e.escapeParameterHtml,b=qe(e.sync)?e.sync:!0;let _=e.messages;if(Ue(e.sharedMessages)){const N=e.sharedMessages;_=Object.keys(N).reduce((O,R)=>{const D=O[R]||(O[R]={});return Bt(D,N[R]),O},_||{})}const{__i18n:C,__root:S,__injectWithOption:v}=e,k=e.datetimeFormats,T=e.numberFormats,w=e.flatJson;return{locale:n,fallbackLocale:r,messages:_,flatJson:w,datetimeFormats:k,numberFormats:T,missing:l,missingWarn:i,fallbackWarn:s,fallbackRoot:c,fallbackFormat:f,modifiers:p,pluralRules:d,postTranslation:m,warnHtmlMessage:h,escapeParameter:y,messageResolver:e.messageResolver,inheritLocale:b,__i18n:C,__root:S,__injectWithOption:v}}function Eu(e={}){const n=yu(DB(e)),{__extender:r}=e,l={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return qe(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=qe(i)?!i:i},get silentFallbackWarn(){return qe(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=qe(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){return Reflect.apply(n.t,n,[...i])},rt(...i){return Reflect.apply(n.rt,n,[...i])},te(i,s){return n.te(i,s)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,s){n.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){n.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,s){n.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){n.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,s){n.setNumberFormat(i,s)},mergeNumberFormat(i,s){n.mergeNumberFormat(i,s)}};return l.__extender=r,process.env.NODE_ENV!=="production"&&(l.__enableEmitter=i=>{const s=n;s[xo]&&s[xo](i)},l.__disableEmitter=()=>{const i=n;i[ca]&&i[ca]()}),l}function $B(e,n,r){return{beforeCreate(){const l=t.getCurrentInstance();if(!l)throw mn(ft.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=n,this===this.$root)this.$i18n=qg(e,s);else{s.__injectWithOption=!0,s.__extender=r.__vueI18nExtend,this.$i18n=Eu(s);const c=this.$i18n;c.__extender&&(c.__disposer=c.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=qg(e,i);else{this.$i18n=Eu({__i18n:i.__i18n,__injectWithOption:!0,__extender:r.__vueI18nExtend,__root:n});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Fg(n,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,c)=>this.$i18n.te(s,c),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),r.__setInstance(l,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const l=this.$i18n;this.$el.__VUE_I18N__=l.__composer;const i=this.__v_emitter=eu();l.__enableEmitter&&l.__enableEmitter(i),i.on("*",fa)}},unmounted(){const l=t.getCurrentInstance();if(!l)throw mn(ft.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",fa),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),r.__deleteInstance(l),delete this.$i18n}}}function qg(e,n){e.locale=n.locale||e.locale,e.fallbackLocale=n.fallbackLocale||e.fallbackLocale,e.missing=n.missing||e.missing,e.silentTranslationWarn=n.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=n.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=n.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=n.postTranslation||e.postTranslation,e.warnHtmlInMessage=n.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=n.escapeParameterHtml||e.escapeParameterHtml,e.sync=n.sync||e.sync,e.__composer[Mg](n.pluralizationRules||e.pluralizationRules);const r=_u(e.locale,{messages:n.messages,__i18n:n.__i18n});return Object.keys(r).forEach(l=>e.mergeLocaleMessage(l,r[l])),n.datetimeFormats&&Object.keys(n.datetimeFormats).forEach(l=>e.mergeDateTimeFormat(l,n.datetimeFormats[l])),n.numberFormats&&Object.keys(n.numberFormats).forEach(l=>e.mergeNumberFormat(l,n.numberFormats[l])),e}const Su={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function FB({slots:e},n){return n.length===1&&n[0]==="default"?(e.default?e.default():[]).reduce((l,i)=>[...l,...i.type===t.Fragment?i.children:[i]],[]):n.reduce((r,l)=>{const i=e[l];return i&&(r[l]=i()),r},at())}function Xg(){return t.Fragment}const Jg=t.defineComponent({name:"i18n-t",props:Bt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>At(e)||!isNaN(e)}},Su),setup(e,n){const{slots:r,attrs:l}=n,i=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(r).filter(h=>h[0]!=="_"),c=at();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=ce(e.plural)?+e.plural:e.plural);const f=FB(n,s),p=i[mu](e.keypath,f,c),d=Bt(at(),l),m=ce(e.tag)||Ye(e.tag)?e.tag:Xg();return t.h(m,d,p)}}});function VB(e){return _t(e)&&!ce(e[0])}function Zg(e,n,r,l){const{slots:i,attrs:s}=n;return()=>{const c={part:!0};let f=at();e.locale&&(c.locale=e.locale),ce(e.format)?c.key=e.format:Ye(e.format)&&(ce(e.format.key)&&(c.key=e.format.key),f=Object.keys(e.format).reduce((y,b)=>r.includes(b)?Bt(at(),y,{[b]:e.format[b]}):y,at()));const p=l(e.value,c,f);let d=[c.key];_t(p)?d=p.map((y,b)=>{const _=i[y.type],C=_?_({[y.type]:y.value,index:b,parts:p}):[y.value];return VB(C)&&(C[0].key=`${y.type}-${b}`),C}):ce(p)&&(d=[p]);const m=Bt(at(),s),h=ce(e.tag)||Ye(e.tag)?e.tag:Xg();return t.h(h,m,d)}}const Qg=t.defineComponent({name:"i18n-n",props:Bt({value:{type:Number,required:!0},format:{type:[String,Object]}},Su),setup(e,n){const r=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return Zg(e,n,Og,(...l)=>r[gu](...l))}});function zB(e,n){const r=e;if(e.mode==="composition")return r.__getInstance(n)||e.global;{const l=r.__getInstance(n);return l!=null?l.__composer:e.global.__composer}}function UB(e){const n=c=>{process.env.NODE_ENV!=="production"&&Jc(ml(Vn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:f,value:p}=c;if(!f||!f.$)throw mn(ft.UNEXPECTED_ERROR);const d=zB(e,f.$),m=e0(p);return[Reflect.apply(d.t,d,[...t0(m)]),d]};return{created:(c,f)=>{const[p,d]=n(f);tr&&e.global===d&&(c.__i18nWatcher=t.watch(d.locale,()=>{f.instance&&f.instance.$forceUpdate()})),c.__composer=d,c.textContent=p},unmounted:c=>{tr&&c.__i18nWatcher&&(c.__i18nWatcher(),c.__i18nWatcher=void 0,delete c.__i18nWatcher),c.__composer&&(c.__composer=void 0,delete c.__composer)},beforeUpdate:(c,{value:f})=>{if(c.__composer){const p=c.__composer,d=e0(f);c.textContent=Reflect.apply(p.t,p,[...t0(d)])}},getSSRProps:c=>{const[f]=n(c);return{textContent:f}}}}function e0(e){if(ce(e))return{path:e};if(Ue(e)){if(!("path"in e))throw mn(ft.REQUIRED_VALUE,"path");return e}else throw mn(ft.INVALID_VALUE)}function t0(e){const{path:n,locale:r,args:l,choice:i,plural:s}=e,c={},f=l||{};return ce(r)&&(c.locale=r),At(i)&&(c.plural=i),At(s)&&(c.plural=s),[n,f,c]}function WB(e,n,...r){const l=Ue(r[0])?r[0]:{};(qe(l.globalInstall)?l.globalInstall:!0)&&([Jg.name,"I18nT"].forEach(s=>e.component(s,Jg)),[Qg.name,"I18nN"].forEach(s=>e.component(s,Qg)),[r0.name,"I18nD"].forEach(s=>e.component(s,r0))),e.directive("t",UB(n))}const HB=pr("global-vue-i18n");function KB(e={}){const n=__VUE_I18N_LEGACY_API__&&qe(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&n&&Jc(ml(Vn.DEPRECATE_LEGACY_MODE));const r=qe(e.globalInjection)?e.globalInjection:!0,l=new Map,[i,s]=GB(e,n),c=pr(process.env.NODE_ENV!=="production"?"vue-i18n":"");function f(h){return l.get(h)||null}function p(h,y){l.set(h,y)}function d(h){l.delete(h)}const m={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(h,...y){if(process.env.NODE_ENV!=="production"&&(h.__VUE_I18N__=m),h.__VUE_I18N_SYMBOL__=c,h.provide(h.__VUE_I18N_SYMBOL__,m),Ue(y[0])){const C=y[0];m.__composerExtend=C.__composerExtend,m.__vueI18nExtend=C.__vueI18nExtend}let b=null;!n&&r&&(b=eR(h,m.global)),__VUE_I18N_FULL_INSTALL__&&WB(h,m,...y),__VUE_I18N_LEGACY_API__&&n&&h.mixin($B(s,s.__composer,m));const _=h.unmount;if(h.unmount=()=>{b&&b(),m.dispose(),_()},process.env.NODE_ENV!=="production"){if(!await kB(h,m))throw mn(ft.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=eu();if(n){const v=s;v.__enableEmitter&&v.__enableEmitter(S)}else{const v=s;v[xo]&&v[xo](S)}S.on("*",fa)}},get global(){return s},dispose(){i.stop()},__instances:l,__getInstance:f,__setInstance:p,__deleteInstance:d};return m}function Pi(e={}){const n=t.getCurrentInstance();if(n==null)throw mn(ft.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw mn(ft.NOT_INSTALLED);const r=jB(n),l=qB(r),i=$g(n),s=YB(e,i);if(s==="global")return Fg(l,e,i),l;if(s==="parent"){let p=XB(r,n,e.__useComponent);return p==null&&(process.env.NODE_ENV!=="production"&&dr(ml(Vn.NOT_FOUND_PARENT_SCOPE)),p=l),p}const c=r;let f=c.__getInstance(n);if(f==null){const p=Bt({},e);"__i18n"in i&&(p.__i18n=i.__i18n),l&&(p.__root=l),f=yu(p),c.__composerExtend&&(f[bu]=c.__composerExtend(f)),ZB(c,n,f),c.__setInstance(n,f)}else process.env.NODE_ENV!=="production"&&s==="local"&&dr(ml(Vn.DUPLICATE_USE_I18N_CALLING));return f}function GB(e,n){const r=t.effectScope(),l=__VUE_I18N_LEGACY_API__&&n?r.run(()=>Eu(e)):r.run(()=>yu(e));if(l==null)throw mn(ft.UNEXPECTED_ERROR);return[r,l]}function jB(e){const n=t.inject(e.isCE?HB:e.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw mn(e.isCE?ft.NOT_INSTALLED_WITH_PROVIDE:ft.UNEXPECTED_ERROR);return n}function YB(e,n){return ki(e)?"__i18n"in n?"local":"global":e.useScope?e.useScope:"local"}function qB(e){return e.mode==="composition"?e.global:e.global.__composer}function XB(e,n,r=!1){let l=null;const i=n.root;let s=JB(n,r);for(;s!=null;){const c=e;if(e.mode==="composition")l=c.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const f=c.__getInstance(s);f!=null&&(l=f.__composer,r&&l&&!l[Dg]&&(l=null))}if(l!=null||i===s)break;s=s.parent}return l}function JB(e,n=!1){return e==null?null:n&&e.vnode.ctx||e.parent}function ZB(e,n,r){let l=null;t.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&n.vnode.el){n.vnode.el.__VUE_I18N__=r,l=eu();const i=r;i[xo]&&i[xo](l),l.on("*",fa)}},n),t.onUnmounted(()=>{const i=r;process.env.NODE_ENV!=="production"&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&(l&&l.off("*",fa),i[ca]&&i[ca](),delete n.vnode.el.__VUE_I18N__),e.__deleteInstance(n);const s=i[bu];s&&(s(),delete i[bu])},n)}const QB=["locale","fallbackLocale","availableLocales"],n0=["t","rt","d","n","tm","te"];function eR(e,n){const r=Object.create(null);return QB.forEach(i=>{const s=Object.getOwnPropertyDescriptor(n,i);if(!s)throw mn(ft.UNEXPECTED_ERROR);const c=t.isRef(s.value)?{get(){return s.value.value},set(f){s.value.value=f}}:{get(){return s.get&&s.get()}};Object.defineProperty(r,i,c)}),e.config.globalProperties.$i18n=r,n0.forEach(i=>{const s=Object.getOwnPropertyDescriptor(n,i);if(!s||!s.value)throw mn(ft.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,s)}),()=>{delete e.config.globalProperties.$i18n,n0.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const r0=t.defineComponent({name:"i18n-d",props:Bt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Su),setup(e,n){const r=e.i18n||Pi({useScope:e.scope,__useComponent:!0});return Zg(e,n,Tg,(...l)=>r[hu](...l))}});if(yB(),WA(wA),HA($A),KA(cg),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ro();e.__INTLIFY__=!0,vA(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const tR=KB({legacy:!1,locale:"zh-TW",fallbackLocale:"en-US",messages:{"zh-TW":{"common.select":"請選擇","common.confirm":"確定","common.cancel":"取消","dialog.confirmRemoveUser":"請問是否確認移除該使用者","common.warning":"警告","search.placeholder":"請輸入關鍵字搜尋列表","common.execute":"執行","common.reset":"重設","common.loading":"數據加載中","common.view":"查看","common.edit":"編輯","common.column":"欄","common.back":"回到前一頁","demo.componentDemo":"組件示範","button.title":"按鈕","button.primary ":"主要","button.default":"默認","button.danger":"危險","button.success":"成功","button.warning":"警告","button.info":"信息","button.style":"樣式","button.size":"尺寸","button.small":"小","button.medium":"中","button.large ":"大","status.title":"狀態","status.normal ":"正常","status.loading":"載入中","status.disabled":"禁用","button.withIcon ":"帶圖標的","button.add":"添加","button.delete":"刪除"},"en-US":{"common.select":"Please select","common.confirm":"Confirm","common.cancel":"Cancel","dialog.confirmRemoveUser":"Are you sure you want to remove this user?","common.warning":"Warning","search.placeholder":"Please enter keywords to search the list","common.execute":"Execute","common.reset":"Reset","common.loading":"Data loading","common.view":"View","common.edit":"Edit","common.column":"Column","common.back":" Back","demo.componentDemo":"Component Demo","button.title":"Button","button.primary ":"Primary","button.default":"Default","button.danger":"Danger","button.success":"Success","button.warning":"Warning","button.info":"Info","button.style":"Style","button.size":"Size","button.small":"Small","button.medium":"Medium","button.large ":"Large","status.title":"Status","status.normal ":"Normal","status.loading":"Loading","status.disabled":"Disabled","button.withIcon ":"With Icon","button.add":"Add","button.delete":"Delete"}}}),nR=e=>{tR.global.locale.value=e,localStorage.setItem("locale",e)},o0=[{value:"zh-TW",label:"繁體中文"},{value:"en-US",label:"English"}],rR={class:"language-switcher"},oR=t.defineComponent({__name:"LanguageSwitcher",setup(e){const{locale:n}=Pi(),r=i=>{nR(i)},l=t.computed(()=>{const i=o0.find(s=>s.value===n.value);return(i==null?void 0:i.label)||"繁體中文"});return(i,s)=>{const c=di,f=iN,p=sN,d=aN;return t.openBlock(),t.createElementBlock("div",rR,[t.createVNode(d,{onCommand:r,trigger:"click"},{dropdown:t.withCtx(()=>[t.createVNode(p,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o0),m=>(t.openBlock(),t.createBlock(f,{key:m.value,command:m.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:t.withCtx(()=>[t.createVNode(c,{type:"text",class:"flex items-center"},{default:t.withCtx(()=>[s[0]||(s[0]=t.createElementVNode("svg",{class:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})],-1)),t.createTextVNode(" "+t.toDisplayString(l.value)+" ",1),s[1]||(s[1]=t.createElementVNode("svg",{class:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),_:1,__:[0,1]})]),_:1})])}}}),lR={class:"w-full mb-4"},aR={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},iR={class:"flex items-center mr-4"},da=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function},showCheckBtn:{type:Boolean},showEditBtn:{type:Boolean}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort","click:checkRow","click:editRow"],setup(e,{emit:n}){const r=n,l=()=>{r("open:transfer")},i=d=>{r("update:selectRow",d)},s=(d,m)=>{r("click:cell",d,m)},c=d=>{r("click:columnSort",d)},f=d=>{r("click:checkRow",d)},p=d=>{r("click:editRow",d)};return(d,m)=>{const h=kt;return t.openBlock(),t.createElementBlock("div",lR,[t.createElementVNode("div",aR,[t.createElementVNode("div",iR,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:l},[t.createVNode(h,null,{default:t.withCtx(()=>[t.createVNode(t.unref(d1))]),_:1})])])]),t.createVNode(t.unref(Io),{loading:d.loading,data:d.data,columns:d.columns,"show-selection":d.showSelection,"show-summary":d.showSummary,"show-over-flow-tooltip":d.showOverFlowTooltip,"summary-method":d.summaryMethod,"base-table-row-class-name":d.sortTableRowClassName,"show-check-btn":d.showCheckBtn,"show-edit-btn":d.showEditBtn,onSelectionChange:i,onCellClick:s,onColumnSortChange:c,"onClick:checkRow":f,"onClick:editRow":p},null,8,["loading","data","columns","show-selection","show-summary","show-over-flow-tooltip","summary-method","base-table-row-class-name","show-check-btn","show-edit-btn"])])}}});function sR(e){return e.map(n=>({...n,checkActive:!0}))}let xt={locales:[...[{value:"zh-TW",label:"繁體中文"},{value:"en-US",label:"English"}]],defaultLocale:"zh-TW",storageKey:"locale"};const cR=()=>xt.externalHandler?xt.externalHandler.availableLocales():xt.locales,uR=e=>{xt={...xt,...e}},fR=e=>{if(xt.externalHandler){xt.externalHandler.switchLanguage(e);return}if(!xt.locales.some(n=>n.value===e)){console.warn(`Language ${e} is not configured`);return}localStorage.setItem(xt.storageKey,e),window.dispatchEvent(new CustomEvent("languageChanged",{detail:{locale:e}}))},l0=()=>{if(xt.externalHandler)return xt.externalHandler.getCurrentLocale();const e=localStorage.getItem(xt.storageKey);return e&&xt.locales.some(n=>n.value===e)?e:xt.defaultLocale},dR=e=>{var r,l;if((r=xt.externalHandler)!=null&&r.getLanguageName)return xt.externalHandler.getLanguageName(e);const n=xt.locales.find(i=>i.value===e);return(n==null?void 0:n.label)||((l=xt.locales[0])==null?void 0:l.label)||"Unknown"},pR=()=>{const e=l0();return window.dispatchEvent(new CustomEvent("languageInitialized",{detail:{locale:e}})),e},a0=[Io,dn,sl,Lo,da,ra,Ao];function i0(e,n){a0.forEach(r=>{e.component(r.name||"VueTableComponent",r)})}const mR={install:i0,...a0};Io.install=e=>{e.component(Io.name||"BaseTable",Io)},dn.install=e=>{e.component(dn.name||"BaseBtn",dn)},sl.install=e=>{e.component(sl.name||"BaseInput",sl)},Lo.install=e=>{e.component(Lo.name||"BaseDialog",Lo)},da.install=e=>{e.component(da.name||"SortTable",da)},ra.install=e=>{e.component(ra.name||"TitleTable",ra)},Ao.install=e=>{e.component(Ao.name||"SearchBar",Ao)},Le.BaseBtn=dn,Le.BaseDialog=Lo,Le.BaseInput=sl,Le.BaseTable=Io,Le.BaseWaringDialog=GI,Le.DetailLayout=yL,Le.FilterLayout=EL,Le.FunctionHeader=Uh,Le.LanguageSwitcher=oR,Le.MainPanel=Si,Le.SearchBar=Ao,Le.SearchableListPanel=hL,Le.SortTable=da,Le.TitleTable=ra,Le.TransferDialog=aL,Le.TransferItem=zh,Le.availableLocales=cR,Le.configureLanguageSwitcher=uR,Le.default=mR,Le.getCurrentLocale=l0,Le.getLanguageName=dR,Le.initLanguageSwitcher=pR,Le.install=i0,Le.setActiveColumn=sR,Le.switchLanguage=fR,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -73,7 +73,7 @@ export declare const i18n: import('vue-i18n').I18n<{
|
|
|
73
73
|
export declare const switchLanguage: (locale: "zh-TW" | "en-US") => void;
|
|
74
74
|
export declare const getCurrentLocale: () => "zh-TW" | "en-US";
|
|
75
75
|
export declare const availableLocales: {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
value: string;
|
|
77
|
+
label: string;
|
|
78
78
|
}[];
|
|
79
79
|
export declare const initLocale: () => void;
|
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
* 供外部專案使用的語言切換功能
|
|
4
4
|
*/
|
|
5
5
|
declare const defaultLocales: readonly [{
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly value: "zh-TW";
|
|
7
|
+
readonly label: "繁體中文";
|
|
8
8
|
}, {
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
9
|
+
readonly value: "en-US";
|
|
10
|
+
readonly label: "English";
|
|
11
11
|
}];
|
|
12
|
-
export type LocaleCode = typeof defaultLocales[number]['
|
|
12
|
+
export type LocaleCode = typeof defaultLocales[number]['value'];
|
|
13
13
|
export interface ExternalI18nHandler {
|
|
14
14
|
switchLanguage: (locale: string) => void;
|
|
15
15
|
getCurrentLocale: () => string;
|
|
16
16
|
availableLocales: () => Array<{
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
value: string;
|
|
18
|
+
label: string;
|
|
19
19
|
}>;
|
|
20
20
|
getLanguageName?: (locale: string) => string;
|
|
21
21
|
}
|
|
22
22
|
export interface LanguageConfig {
|
|
23
23
|
locales: Array<{
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
26
|
}>;
|
|
27
27
|
defaultLocale: string;
|
|
28
28
|
storageKey?: string;
|
|
29
29
|
externalHandler?: ExternalI18nHandler;
|
|
30
30
|
}
|
|
31
31
|
export declare const availableLocales: () => {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
value: string;
|
|
33
|
+
label: string;
|
|
34
34
|
}[];
|
|
35
35
|
export declare const configureLanguageSwitcher: (config: Partial<LanguageConfig>) => void;
|
|
36
36
|
export declare const switchLanguage: (locale: string) => void;
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@ const handleLanguageChange = (newLocale: "zh-TW" | "en-US") => {
|
|
|
12
12
|
|
|
13
13
|
// 當前語言顯示名稱
|
|
14
14
|
const currentLanguageName = computed(() => {
|
|
15
|
-
const currentLocale = availableLocales.find(l => l.
|
|
16
|
-
return currentLocale?.
|
|
15
|
+
const currentLocale = availableLocales.find(l => l.value === locale.value)
|
|
16
|
+
return currentLocale?.label || '繁體中文'
|
|
17
17
|
})
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -38,10 +38,10 @@ const currentLanguageName = computed(() => {
|
|
|
38
38
|
<el-dropdown-menu>
|
|
39
39
|
<el-dropdown-item
|
|
40
40
|
v-for="item in availableLocales"
|
|
41
|
-
:key="item.
|
|
42
|
-
:command="item.
|
|
41
|
+
:key="item.value"
|
|
42
|
+
:command="item.value"
|
|
43
43
|
>
|
|
44
|
-
{{ item.
|
|
44
|
+
{{ item.label }}
|
|
45
45
|
</el-dropdown-item>
|
|
46
46
|
</el-dropdown-menu>
|
|
47
47
|
</template>
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
// 預設語言列表
|
|
7
7
|
const defaultLocales = [
|
|
8
|
-
{
|
|
9
|
-
{
|
|
8
|
+
{ value: 'zh-TW', label: '繁體中文' },
|
|
9
|
+
{ value: 'en-US', label: 'English' },
|
|
10
10
|
] as const
|
|
11
11
|
|
|
12
|
-
export type LocaleCode = typeof defaultLocales[number]['
|
|
12
|
+
export type LocaleCode = typeof defaultLocales[number]['value']
|
|
13
13
|
|
|
14
14
|
// 外部 i18n 切換函數接口
|
|
15
15
|
export interface ExternalI18nHandler {
|
|
16
16
|
switchLanguage: (locale: string) => void
|
|
17
17
|
getCurrentLocale: () => string
|
|
18
|
-
availableLocales: () => Array<{
|
|
18
|
+
availableLocales: () => Array<{ value: string; label: string }>
|
|
19
19
|
getLanguageName?: (locale: string) => string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// 語言配置接口
|
|
23
23
|
export interface LanguageConfig {
|
|
24
|
-
locales: Array<{
|
|
24
|
+
locales: Array<{ value: string; label: string }>
|
|
25
25
|
defaultLocale: string
|
|
26
26
|
storageKey?: string
|
|
27
27
|
externalHandler?: ExternalI18nHandler
|
|
@@ -61,7 +61,7 @@ export const switchLanguage = (locale: string) => {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// 檢查語言是否在配置中
|
|
64
|
-
if (!languageConfig.locales.some(l => l.
|
|
64
|
+
if (!languageConfig.locales.some(l => l.value === locale)) {
|
|
65
65
|
console.warn(`Language ${locale} is not configured`)
|
|
66
66
|
return
|
|
67
67
|
}
|
|
@@ -83,7 +83,7 @@ export const getCurrentLocale = (): string => {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
const savedLocale = localStorage.getItem(languageConfig.storageKey!)
|
|
86
|
-
return savedLocale && languageConfig.locales.some(l => l.
|
|
86
|
+
return savedLocale && languageConfig.locales.some(l => l.value === savedLocale)
|
|
87
87
|
? savedLocale
|
|
88
88
|
: languageConfig.defaultLocale
|
|
89
89
|
}
|
|
@@ -95,8 +95,8 @@ export const getLanguageName = (locale: string): string => {
|
|
|
95
95
|
return languageConfig.externalHandler.getLanguageName(locale)
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
const language = languageConfig.locales.find(l => l.
|
|
99
|
-
return language?.
|
|
98
|
+
const language = languageConfig.locales.find(l => l.value === locale)
|
|
99
|
+
return language?.label || languageConfig.locales[0]?.label || 'Unknown'
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// 初始化語言設定(供外部專案調用)
|