From 6f9e9b2c77b23e72d2008ea0be195ef4edca1010 Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 10 Apr 2021 06:13:10 +0200 Subject: [PATCH] Updated: vue-i18n v9.1.2 -> v9.1.3 (#361) --- THIRD_PARTY.txt | 2 +- modules/internal/targets.js | 2 +- pages/updates/updates.html | 2 +- resources/vue-i18n/9.1.2/vue-i18n.min.jsm | 1 - resources/vue-i18n/{9.1.2 => 9.1.3}/note | 0 resources/vue-i18n/9.1.3/vue-i18n.min.jsm | 1 + 6 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 resources/vue-i18n/9.1.2/vue-i18n.min.jsm rename resources/vue-i18n/{9.1.2 => 9.1.3}/note (100%) create mode 100644 resources/vue-i18n/9.1.3/vue-i18n.min.jsm diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index d550b974..bbe2fc35 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1135,7 +1135,7 @@ https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.28/vue.min.js https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.6/vue.global.prod.js https://cdnjs.cloudflare.com/ajax/libs/vue-i18n/8.24.2/vue-i18n.min.js -https://cdnjs.cloudflare.com/ajax/libs/vue-i18n/9.1.2/vue-i18n.cjs.min.js +https://cdnjs.cloudflare.com/ajax/libs/vue-i18n/9.1.3/vue-i18n.cjs.min.js https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/noframework.waypoints.min.js https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/shortcuts/infinite.min.js diff --git a/modules/internal/targets.js b/modules/internal/targets.js index c47b35da..09d554c3 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -547,7 +547,7 @@ targets.setLastVersion = function (type, version) { } else if (type.startsWith('/vue-i18n/8.')) { return '8.24.2'; } else if (type.startsWith('/vue-i18n/9.')) { - return '9.1.2'; + return '9.1.3'; } else if (type.startsWith('/vue-resource/1.')) { return '1.5.2'; } else if (type.startsWith('/waypoints/4.')) { diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 1a8a4c31..85f1e817 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -54,7 +54,7 @@
  • Updated: noUiSlider v14.6.4 -> v14.7.0 (#358)
  • Updated: mdb-ui-kit v3.1.0 -> v3.4.0 (#359)
  • Updated: video.js v7.10.2 -> v7.12.0 (#360)
  • -
  • Updated: vue-i18n v9.0.0 -> v9.1.2 (#361)
  • +
  • Updated: vue-i18n v9.0.0 -> v9.1.3 (#361)
  • Updated: angular-material v1.2.1 -> v1.2.2 (#363)
  • diff --git a/resources/vue-i18n/9.1.2/vue-i18n.min.jsm b/resources/vue-i18n/9.1.2/vue-i18n.min.jsm deleted file mode 100644 index da78ab3b..00000000 --- a/resources/vue-i18n/9.1.2/vue-i18n.min.jsm +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var shared=require("@intlify/shared"),coreBase=require("@intlify/core-base"),vue=require("vue");const VERSION="9.1.2",warnMessages={6:"Fall back to {type} '{key}' with root locale.",7:"Not supported 'preserve'.",8:"Not supported 'formatter'.",9:"Not supported 'preserveDirectiveContent'.",10:"Not supported 'getChoiceIndex'.",11:"Component name legacy compatible: '{name}' -> 'i18n'",12:"Not found parent scope. use the global scope."};function getWarnMessage(e,...a){return shared.format(warnMessages[e],...a)}function createI18nError(e,...a){return coreBase.createCompileError(e,null,{messages:errorMessages,args:a})}const errorMessages={14:"Unexpected return type in composer",15:"Invalid argument",16:"Must be called at the top of a `setup` function",17:"Need to install with `app.use` function",22:"Unexpected error",18:"Not available in legacy mode",19:"Required in value: {0}",20:"Invalid value",21:"Cannot setup vue-devtools plugin"},DEVTOOLS_META="__INTLIFY_META__",TransrateVNodeSymbol=shared.makeSymbol("__transrateVNode"),DatetimePartsSymbol=shared.makeSymbol("__datetimeParts"),NumberPartsSymbol=shared.makeSymbol("__numberParts"),EnableEmitter=shared.makeSymbol("__enableEmitter"),DisableEmitter=shared.makeSymbol("__disableEmitter"),SetPluralRulesSymbol=shared.makeSymbol("__setPluralRules"),DevToolsMetaSymbol=shared.makeSymbol("__intlifyMeta");let composerID=0;function defineCoreMissingHandler(e){return(a,t,r,s)=>e(t,r,vue.getCurrentInstance()||void 0,s)}function getLocaleMessages(e,a){const{messages:t,__i18n:r}=a,s=shared.isPlainObject(t)?t:shared.isArray(r)?{}:{[e]:{}};if(shared.isArray(r)&&r.forEach(({locale:e,resource:a})=>{e?(s[e]=s[e]||{},deepCopy(a,s[e])):deepCopy(a,s)}),a.flatJson)for(const e in s)shared.hasOwn(s,e)&&coreBase.handleFlatJson(s[e]);return s}const isNotObjectOrIsArray=e=>!shared.isObject(e)||shared.isArray(e);function deepCopy(e,a){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(a))throw createI18nError(20);for(const t in e)shared.hasOwn(e,t)&&(isNotObjectOrIsArray(e[t])||isNotObjectOrIsArray(a[t])?a[t]=e[t]:deepCopy(e[t],a[t]))}function createComposer(e={}){const{__root:a,__meta:t}=e,r=void 0===a;let s=!shared.isBoolean(e.inheritLocale)||e.inheritLocale;const n=vue.ref(a&&s?a.locale.value:shared.isString(e.locale)?e.locale:"en-US"),o=vue.ref(a&&s?a.fallbackLocale.value:shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n.value),l=vue.ref(getLocaleMessages(n.value,e)),i=vue.ref(shared.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[n.value]:{}}),c=vue.ref(shared.isPlainObject(e.numberFormats)?e.numberFormats:{[n.value]:{}});let m=a?a.missingWarn:!shared.isBoolean(e.missingWarn)&&!shared.isRegExp(e.missingWarn)||e.missingWarn,u=a?a.fallbackWarn:!shared.isBoolean(e.fallbackWarn)&&!shared.isRegExp(e.fallbackWarn)||e.fallbackWarn,g=a?a.fallbackRoot:!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,d=!!e.fallbackFormat,b=shared.isFunction(e.missing)?e.missing:null,p=shared.isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,f=shared.isFunction(e.postTranslation)?e.postTranslation:null,h=!shared.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,_=!!e.escapeParameter;const v=a?a.modifiers:shared.isPlainObject(e.modifiers)?e.modifiers:{};let y,F=e.pluralRules||a&&a.pluralRules;y=coreBase.createCoreContext({locale:n.value,fallbackLocale:o.value,messages:l.value,datetimeFormats:i.value,numberFormats:c.value,modifiers:v,pluralRules:F,missing:null===p?void 0:p,missingWarn:m,fallbackWarn:u,fallbackFormat:d,unresolving:!0,postTranslation:null===f?void 0:f,warnHtmlMessage:h,escapeParameter:_,__datetimeFormatters:shared.isPlainObject(y)?y.__datetimeFormatters:void 0,__numberFormatters:shared.isPlainObject(y)?y.__numberFormatters:void 0,__v_emitter:shared.isPlainObject(y)?y.__v_emitter:void 0,__meta:Object.assign({framework:"vue"},t||{})}),coreBase.updateFallbackLocale(y,n.value,o.value);const k=vue.computed({get:()=>n.value,set:e=>{n.value=e,y.locale=n.value}}),M=vue.computed({get:()=>o.value,set:e=>{o.value=e,y.fallbackLocale=o.value,coreBase.updateFallbackLocale(y,n.value,e)}}),O=vue.computed(()=>l.value),S=vue.computed(()=>i.value),T=vue.computed(()=>c.value);function E(e,t,r,s,d,b){n.value,o.value,l.value,i.value,c.value;const p=e(y);if(shared.isNumber(p)&&p===coreBase.NOT_REOSLVED){const[e,n]=t();if(a&&shared.isString(e)&&("translate"!==r||0==!!n.resolvedMessage)){g&&(coreBase.isTranslateFallbackWarn(u,e)||coreBase.isTranslateMissingWarn(m,e))&&shared.warn(getWarnMessage(6,{key:e,type:r}));{const{__v_emitter:a}=y;a&&g&&a.emit("fallback",{type:r,key:e,to:"global",groupId:`${r}:${e}`})}}return a&&g?s(a):d(e)}if(b(p))return p;throw createI18nError(14)}function I(...e){return E(a=>coreBase.translate(a,...e),()=>coreBase.parseTranslateArgs(...e),"translate",a=>a.t(...e),e=>e,e=>shared.isString(e))}const L={normalize:function(e){return e.map(e=>shared.isString(e)?vue.createVNode(vue.Text,null,e,0):e)},interpolate:e=>e,type:"vnode"};function D(e){return l.value[e]||{}}composerID++,a&&(vue.watch(a.locale,e=>{s&&(n.value=e,y.locale=e,coreBase.updateFallbackLocale(y,n.value,o.value))}),vue.watch(a.fallbackLocale,e=>{s&&(o.value=e,y.fallbackLocale=e,coreBase.updateFallbackLocale(y,n.value,o.value))}));const N={id:composerID,locale:k,fallbackLocale:M,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&a&&(n.value=a.locale.value,o.value=a.fallbackLocale.value,coreBase.updateFallbackLocale(y,n.value,o.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:O,datetimeFormats:S,numberFormats:T,get modifiers(){return v},get pluralRules(){return F||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(e){m=e,y.missingWarn=m},get fallbackWarn(){return u},set fallbackWarn(e){u=e,y.fallbackWarn=u},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return d},set fallbackFormat(e){d=e,y.fallbackFormat=d},get warnHtmlMessage(){return h},set warnHtmlMessage(e){h=e,y.warnHtmlMessage=e},get escapeParameter(){return _},set escapeParameter(e){_=e,y.escapeParameter=e},t:I,rt:function(...e){const[a,t,r]=e;if(r&&!shared.isObject(r))throw createI18nError(15);return I(...[a,t,Object.assign({resolvedMessage:!0},r||{})])},d:function(...e){return E(a=>coreBase.datetime(a,...e),()=>coreBase.parseDateTimeArgs(...e),"datetime format",a=>a.d(...e),()=>coreBase.MISSING_RESOLVE_VALUE,e=>shared.isString(e))},n:function(...e){return E(a=>coreBase.number(a,...e),()=>coreBase.parseNumberArgs(...e),"number format",a=>a.n(...e),()=>coreBase.MISSING_RESOLVE_VALUE,e=>shared.isString(e))},te:function(e,a){const t=D(shared.isString(a)?a:n.value);return null!==coreBase.resolveValue(t,e)},tm:function(e){const t=function(e){let a=null;const t=coreBase.getLocaleChain(y,o.value,n.value);for(let r=0;r{let t;const r=a;try{r.processor=L,t=coreBase.translate(r,...e)}finally{r.processor=null}return t},()=>coreBase.parseTranslateArgs(...e),"translate",a=>a[TransrateVNodeSymbol](...e),e=>[vue.createVNode(vue.Text,null,e,0)],e=>shared.isArray(e))},[NumberPartsSymbol]:function(...e){return E(a=>coreBase.number(a,...e),()=>coreBase.parseNumberArgs(...e),"number format",a=>a[NumberPartsSymbol](...e),()=>[],e=>shared.isString(e)||shared.isArray(e))},[DatetimePartsSymbol]:function(...e){return E(a=>coreBase.datetime(a,...e),()=>coreBase.parseDateTimeArgs(...e),"datetime format",a=>a[DatetimePartsSymbol](...e),()=>[],e=>shared.isString(e)||shared.isArray(e))},[SetPluralRulesSymbol]:function(e){F=e,y.pluralRules=F},[DevToolsMetaSymbol]:t};return N[EnableEmitter]=(e=>{y.__v_emitter=e}),N[DisableEmitter]=(()=>{y.__v_emitter=void 0}),N}function convertComposerOptions(e){const a=shared.isString(e.locale)?e.locale:"en-US",t=shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=shared.isFunction(e.missing)?e.missing:void 0,s=!shared.isBoolean(e.silentTranslationWarn)&&!shared.isRegExp(e.silentTranslationWarn)||!e.silentTranslationWarn,n=!shared.isBoolean(e.silentFallbackWarn)&&!shared.isRegExp(e.silentFallbackWarn)||!e.silentFallbackWarn,o=!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,l=!!e.formatFallbackMessages,i=shared.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,m=shared.isFunction(e.postTranslation)?e.postTranslation:void 0,u=!shared.isString(e.warnHtmlInMessage)||"off"!==e.warnHtmlInMessage,g=!!e.escapeParameterHtml,d=!shared.isBoolean(e.sync)||e.sync;e.formatter&&shared.warn(getWarnMessage(8)),e.preserveDirectiveContent&&shared.warn(getWarnMessage(9));let b=e.messages;if(shared.isPlainObject(e.sharedMessages)){const a=e.sharedMessages;b=Object.keys(a).reduce((e,t)=>{const r=e[t]||(e[t]={});return Object.assign(r,a[t]),e},b||{})}const{__i18n:p,__root:f,__meta:h}=e,_=e.datetimeFormats,v=e.numberFormats;return{locale:a,fallbackLocale:t,messages:b,flatJson:e.flatJson,datetimeFormats:_,numberFormats:v,missing:r,missingWarn:s,fallbackWarn:n,fallbackRoot:o,fallbackFormat:l,modifiers:i,pluralRules:c,postTranslation:m,warnHtmlMessage:u,escapeParameter:g,inheritLocale:d,__i18n:p,__root:f,__meta:h}}function createVueI18n(e={}){const a=createComposer(convertComposerOptions(e)),t={id:a.id,get locale(){return a.locale.value},set locale(e){a.locale.value=e},get fallbackLocale(){return a.fallbackLocale.value},set fallbackLocale(e){a.fallbackLocale.value=e},get messages(){return a.messages.value},get datetimeFormats(){return a.datetimeFormats.value},get numberFormats(){return a.numberFormats.value},get availableLocales(){return a.availableLocales},get formatter(){return shared.warn(getWarnMessage(8)),{interpolate:()=>[]}},set formatter(e){shared.warn(getWarnMessage(8))},get missing(){return a.getMissingHandler()},set missing(e){a.setMissingHandler(e)},get silentTranslationWarn(){return shared.isBoolean(a.missingWarn)?!a.missingWarn:a.missingWarn},set silentTranslationWarn(e){a.missingWarn=shared.isBoolean(e)?!e:e},get silentFallbackWarn(){return shared.isBoolean(a.fallbackWarn)?!a.fallbackWarn:a.fallbackWarn},set silentFallbackWarn(e){a.fallbackWarn=shared.isBoolean(e)?!e:e},get modifiers(){return a.modifiers},get formatFallbackMessages(){return a.fallbackFormat},set formatFallbackMessages(e){a.fallbackFormat=e},get postTranslation(){return a.getPostTranslationHandler()},set postTranslation(e){a.setPostTranslationHandler(e)},get sync(){return a.inheritLocale},set sync(e){a.inheritLocale=e},get warnHtmlInMessage(){return a.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(e){a.warnHtmlMessage="off"!==e},get escapeParameterHtml(){return a.escapeParameter},set escapeParameterHtml(e){a.escapeParameter=e},get preserveDirectiveContent(){return shared.warn(getWarnMessage(9)),!0},set preserveDirectiveContent(e){shared.warn(getWarnMessage(9))},get pluralizationRules(){return a.pluralRules||{}},__composer:a,t(...e){const[t,r,s]=e,n={};let o=null,l=null;if(!shared.isString(t))throw createI18nError(15);const i=t;return shared.isString(r)?n.locale=r:shared.isArray(r)?o=r:shared.isPlainObject(r)&&(l=r),shared.isArray(s)?o=s:shared.isPlainObject(s)&&(l=s),a.t(i,o||l||{},n)},rt:(...e)=>a.rt(...e),tc(...e){const[t,r,s]=e,n={plural:1};let o=null,l=null;if(!shared.isString(t))throw createI18nError(15);const i=t;return shared.isString(r)?n.locale=r:shared.isNumber(r)?n.plural=r:shared.isArray(r)?o=r:shared.isPlainObject(r)&&(l=r),shared.isString(s)?n.locale=s:shared.isArray(s)?o=s:shared.isPlainObject(s)&&(l=s),a.t(i,o||l||{},n)},te:(e,t)=>a.te(e,t),tm:e=>a.tm(e),getLocaleMessage:e=>a.getLocaleMessage(e),setLocaleMessage(e,t){a.setLocaleMessage(e,t)},mergeLocaleMessage(e,t){a.mergeLocaleMessage(e,t)},d:(...e)=>a.d(...e),getDateTimeFormat:e=>a.getDateTimeFormat(e),setDateTimeFormat(e,t){a.setDateTimeFormat(e,t)},mergeDateTimeFormat(e,t){a.mergeDateTimeFormat(e,t)},n:(...e)=>a.n(...e),getNumberFormat:e=>a.getNumberFormat(e),setNumberFormat(e,t){a.setNumberFormat(e,t)},mergeNumberFormat(e,t){a.mergeNumberFormat(e,t)},getChoiceIndex:(e,a)=>(shared.warn(getWarnMessage(10)),-1),__onComponentInstanceCreated(a){const{componentInstanceCreatedListener:r}=e;r&&r(a,t)},__enableEmitter:e=>{const t=a;t[EnableEmitter]&&t[EnableEmitter](e)},__disableEmitter:()=>{const e=a;e[DisableEmitter]&&e[DisableEmitter]()}};return t}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"}},Translation={name:"i18n-t",props:shared.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>shared.isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,a){const{slots:t,attrs:r}=a,s=useI18n({useScope:e.scope}),n=Object.keys(t).filter(e=>"_"!==e);return()=>{const t={};e.locale&&(t.locale=e.locale),void 0!==e.plural&&(t.plural=shared.isString(e.plural)?+e.plural:e.plural);const o=getInterpolateArg(a,n),l=s[TransrateVNodeSymbol](e.keypath,o,t),i=shared.assign({},r);return shared.isString(e.tag)?vue.h(e.tag,i,l):shared.isObject(e.tag)?vue.h(e.tag,i,l):vue.h(vue.Fragment,i,l)}}};function getInterpolateArg({slots:e},a){return 1===a.length&&"default"===a[0]?e.default?e.default():[]:a.reduce((a,t)=>{const r=e[t];return r&&(a[t]=r()),a},{})}function renderFormatter(e,a,t,r){const{slots:s,attrs:n}=a;return()=>{const a={part:!0};let o={};e.locale&&(a.locale=e.locale),shared.isString(e.format)?a.key=e.format:shared.isObject(e.format)&&(shared.isString(e.format.key)&&(a.key=e.format.key),o=Object.keys(e.format).reduce((a,r)=>t.includes(r)?Object.assign({},a,{[r]:e.format[r]}):a,{}));const l=r(...[e.value,a,o]);let i=[a.key];shared.isArray(l)?i=l.map((e,a)=>{const t=s[e.type];return t?t({[e.type]:e.value,index:a,parts:l}):[e.value]}):shared.isString(l)&&(i=[l]);const c=shared.assign({},n);return shared.isString(e.tag)?vue.h(e.tag,c,i):shared.isObject(e.tag)?vue.h(e.tag,c,i):vue.h(vue.Fragment,c,i)}}const NUMBER_FORMAT_KEYS=["localeMatcher","style","unit","unitDisplay","currency","currencyDisplay","useGrouping","numberingSystem","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","notation","formatMatcher"],NumberFormat={name:"i18n-n",props:shared.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,a){const t=useI18n({useScope:"parent"});return renderFormatter(e,a,NUMBER_FORMAT_KEYS,(...e)=>t[NumberPartsSymbol](...e))}},DATETIME_FORMAT_KEYS=["dateStyle","timeStyle","fractionalSecondDigits","calendar","dayPeriod","numberingSystem","localeMatcher","timeZone","hour12","hourCycle","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"],DatetimeFormat={name:"i18n-d",props:shared.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,a){const t=useI18n({useScope:"parent"});return renderFormatter(e,a,DATETIME_FORMAT_KEYS,(...e)=>t[DatetimePartsSymbol](...e))}};function getComposer$1(e,a){const t=e;if("composition"===e.mode)return t.__getInstance(a)||e.global;{const r=t.__getInstance(a);return null!=r?r.__composer:e.global.__composer}}function vTDirective(e){const a=(a,{instance:t,value:r,modifiers:s})=>{if(!t||!t.$)throw createI18nError(22);const n=getComposer$1(e,t.$);s.preserve&&shared.warn(getWarnMessage(7));const o=parseValue(r);a.textContent=n.t(...makeParams(o))};return{beforeMount:a,beforeUpdate:a}}function parseValue(e){if(shared.isString(e))return{path:e};if(shared.isPlainObject(e)){if(!("path"in e))throw createI18nError(19,"path");return e}throw createI18nError(20)}function makeParams(e){const{path:a,locale:t,args:r,choice:s,plural:n}=e,o={},l=r||{};return shared.isString(t)&&(o.locale=t),shared.isNumber(s)&&(o.plural=s),shared.isNumber(n)&&(o.plural=n),[a,l,o]}function apply(e,a,...t){const r=shared.isPlainObject(t[0])?t[0]:{},s=!!r.useI18nComponentName,n=!shared.isBoolean(r.globalInstall)||r.globalInstall;n&&s&&shared.warn(getWarnMessage(11,{name:Translation.name})),n&&(e.component(s?"i18n":Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat)),e.directive("t",vTDirective(a))}function defineMixin(e,a,t){return{beforeCreate(){const r=vue.getCurrentInstance();if(!r)throw createI18nError(22);const s=this.$options;if(s.i18n){const t=s.i18n;s.__i18n&&(t.__i18n=s.__i18n),t.__meta=s[DEVTOOLS_META]?{[DEVTOOLS_META]:s[DEVTOOLS_META]}:{},t.__root=a,this===this.$root?this.$i18n=mergeToRoot(e,t):this.$i18n=createVueI18n(t)}else s.__i18n?this===this.$root?this.$i18n=mergeToRoot(e,s):this.$i18n=createVueI18n({__i18n:s.__i18n,__meta:s[DEVTOOLS_META]?{[DEVTOOLS_META]:s[DEVTOOLS_META]}:{},__root:a}):this.$i18n=e;e.__onComponentInstanceCreated(this.$i18n),t.__setInstance(r,this.$i18n),this.$t=((...e)=>this.$i18n.t(...e)),this.$rt=((...e)=>this.$i18n.rt(...e)),this.$tc=((...e)=>this.$i18n.tc(...e)),this.$te=((e,a)=>this.$i18n.te(e,a)),this.$d=((...e)=>this.$i18n.d(...e)),this.$n=((...e)=>this.$i18n.n(...e)),this.$tm=(e=>this.$i18n.tm(e))},mounted(){},beforeUnmount(){const e=vue.getCurrentInstance();if(!e)throw createI18nError(22);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__deleteInstance(e),delete this.$i18n}}}function mergeToRoot(e,a){e.locale=a.locale||e.locale,e.fallbackLocale=a.fallbackLocale||e.fallbackLocale,e.missing=a.missing||e.missing,e.silentTranslationWarn=a.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=a.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=a.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=a.postTranslation||e.postTranslation,e.warnHtmlInMessage=a.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=a.escapeParameterHtml||e.escapeParameterHtml,e.sync=a.sync||e.sync,e.__composer[SetPluralRulesSymbol](a.pluralizationRules||e.pluralizationRules),a[DEVTOOLS_META]&&!e.__composer[DevToolsMetaSymbol]&&(e.__composer[DevToolsMetaSymbol]={[DEVTOOLS_META]:a[DEVTOOLS_META]});const t=getLocaleMessages(e.locale,{messages:a.messages,__i18n:a.__i18n});return Object.keys(t).forEach(a=>e.mergeLocaleMessage(a,t[a])),a.datetimeFormats&&Object.keys(a.datetimeFormats).forEach(t=>e.mergeDateTimeFormat(t,a.datetimeFormats[t])),a.numberFormats&&Object.keys(a.numberFormats).forEach(t=>e.mergeNumberFormat(t,a.numberFormats[t])),e}function createI18n(e={}){const a=!shared.isBoolean(e.legacy)||e.legacy,t=!!e.globalInjection,r=new Map,s=a?createVueI18n(e):createComposer(e),n=shared.makeSymbol("vue-i18n"),o={get mode(){return a?"legacy":"composition"},async install(e,...r){e.__VUE_I18N_SYMBOL__=n,e.provide(e.__VUE_I18N_SYMBOL__,o),!a&&t&&injectGlobalFields(e,o.global),apply(e,o,...r),a&&e.mixin(defineMixin(s,s.__composer,o))},get global(){return s},__instances:r,__getInstance:e=>r.get(e)||null,__setInstance(e,a){r.set(e,a)},__deleteInstance(e){r.delete(e)}};return o}function useI18n(e={}){const a=vue.getCurrentInstance();if(null==a)throw createI18nError(16);if(!a.appContext.app.__VUE_I18N_SYMBOL__)throw createI18nError(17);const t=vue.inject(a.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw createI18nError(22);const r="composition"===t.mode?t.global:t.global.__composer,s=shared.isEmptyObject(e)?"__i18n"in a.type?"local":"global":e.useScope?e.useScope:"local";if("global"===s){let t=shared.isObject(e.messages)?e.messages:{};"__i18nGlobal"in a.type&&(t=getLocaleMessages(r.locale.value,{messages:t,__i18n:a.type.__i18nGlobal}));const s=Object.keys(t);if(s.length&&s.forEach(e=>{r.mergeLocaleMessage(e,t[e])}),shared.isObject(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(a=>{r.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(shared.isObject(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(a=>{r.mergeNumberFormat(a,e.numberFormats[a])})}return r}if("parent"===s){let e=getComposer(t,a);return null==e&&(shared.warn(getWarnMessage(12)),e=r),e}if("legacy"===t.mode)throw createI18nError(18);const n=t;let o=n.__getInstance(a);if(null==o){const t=a.type,s={...e};t.__i18n&&(s.__i18n=t.__i18n),t[DEVTOOLS_META]&&(s.__meta=s.__meta||{},s.__meta[DEVTOOLS_META]=t[DEVTOOLS_META]),r&&(s.__root=r),o=createComposer(s),setupLifeCycle(n,a),n.__setInstance(a,o)}return o}function getComposer(e,a){let t=null;const r=a.root;let s=a.parent;for(;null!=s;){const a=e;if("composition"===e.mode)t=a.__getInstance(s);else{const e=a.__getInstance(s);null!=e&&(t=e.__composer)}if(null!=t)break;if(r===s)break;s=s.parent}return t}function setupLifeCycle(e,a,t){vue.onMounted(()=>{},a),vue.onUnmounted(()=>{e.__deleteInstance(a)},a)}const globalExportProps=["locale","fallbackLocale","availableLocales"],globalExportMethods=["t","rt","d","n","tm"];function injectGlobalFields(e,a){const t=Object.create(null);globalExportProps.forEach(e=>{const r=Object.getOwnPropertyDescriptor(a,e);if(!r)throw createI18nError(22);const s=vue.isRef(r.value)?{get:()=>r.value.value,set(e){r.value.value=e}}:{get:()=>r.get&&r.get()};Object.defineProperty(t,e,s)}),e.config.globalProperties.$i18n=t,globalExportMethods.forEach(t=>{const r=Object.getOwnPropertyDescriptor(a,t);if(!r)throw createI18nError(22);Object.defineProperty(e.config.globalProperties,`$${t}`,r)})}coreBase.registerMessageCompiler(coreBase.compileToFunction);{const e=shared.getGlobalThis();e.__INTLIFY__=!0,coreBase.setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}exports.DatetimeFormat=DatetimeFormat,exports.NumberFormat=NumberFormat,exports.Translation=Translation,exports.VERSION="9.1.2",exports.createI18n=createI18n,exports.useI18n=useI18n,exports.vTDirective=vTDirective; \ No newline at end of file diff --git a/resources/vue-i18n/9.1.2/note b/resources/vue-i18n/9.1.3/note similarity index 100% rename from resources/vue-i18n/9.1.2/note rename to resources/vue-i18n/9.1.3/note diff --git a/resources/vue-i18n/9.1.3/vue-i18n.min.jsm b/resources/vue-i18n/9.1.3/vue-i18n.min.jsm new file mode 100644 index 00000000..1ea4256e --- /dev/null +++ b/resources/vue-i18n/9.1.3/vue-i18n.min.jsm @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var shared=require("@intlify/shared"),coreBase=require("@intlify/core-base"),vue=require("vue");const VERSION="9.1.3",warnMessages={6:"Fall back to {type} '{key}' with root locale.",7:"Not supported 'preserve'.",8:"Not supported 'formatter'.",9:"Not supported 'preserveDirectiveContent'.",10:"Not supported 'getChoiceIndex'.",11:"Component name legacy compatible: '{name}' -> 'i18n'",12:"Not found parent scope. use the global scope."};function getWarnMessage(e,...a){return shared.format(warnMessages[e],...a)}function createI18nError(e,...a){return coreBase.createCompileError(e,null,{messages:errorMessages,args:a})}const errorMessages={14:"Unexpected return type in composer",15:"Invalid argument",16:"Must be called at the top of a `setup` function",17:"Need to install with `app.use` function",22:"Unexpected error",18:"Not available in legacy mode",19:"Required in value: {0}",20:"Invalid value",21:"Cannot setup vue-devtools plugin"},DEVTOOLS_META="__INTLIFY_META__",TransrateVNodeSymbol=shared.makeSymbol("__transrateVNode"),DatetimePartsSymbol=shared.makeSymbol("__datetimeParts"),NumberPartsSymbol=shared.makeSymbol("__numberParts"),EnableEmitter=shared.makeSymbol("__enableEmitter"),DisableEmitter=shared.makeSymbol("__disableEmitter"),SetPluralRulesSymbol=shared.makeSymbol("__setPluralRules");shared.makeSymbol("__intlifyMeta");let composerID=0;function defineCoreMissingHandler(e){return(a,t,r,s)=>e(t,r,vue.getCurrentInstance()||void 0,s)}function getLocaleMessages(e,a){const{messages:t,__i18n:r}=a,s=shared.isPlainObject(t)?t:shared.isArray(r)?{}:{[e]:{}};if(shared.isArray(r)&&r.forEach(({locale:e,resource:a})=>{e?(s[e]=s[e]||{},deepCopy(a,s[e])):deepCopy(a,s)}),a.flatJson)for(const e in s)shared.hasOwn(s,e)&&coreBase.handleFlatJson(s[e]);return s}const isNotObjectOrIsArray=e=>!shared.isObject(e)||shared.isArray(e);function deepCopy(e,a){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(a))throw createI18nError(20);for(const t in e)shared.hasOwn(e,t)&&(isNotObjectOrIsArray(e[t])||isNotObjectOrIsArray(a[t])?a[t]=e[t]:deepCopy(e[t],a[t]))}const getMetaInfo=()=>{const e=vue.getCurrentInstance();return e&&e.type[DEVTOOLS_META]?{[DEVTOOLS_META]:e.type[DEVTOOLS_META]}:null};function createComposer(e={}){const{__root:a}=e,t=void 0===a;let r=!shared.isBoolean(e.inheritLocale)||e.inheritLocale;const s=vue.ref(a&&r?a.locale.value:shared.isString(e.locale)?e.locale:"en-US"),n=vue.ref(a&&r?a.fallbackLocale.value:shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:s.value),o=vue.ref(getLocaleMessages(s.value,e)),l=vue.ref(shared.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),i=vue.ref(shared.isPlainObject(e.numberFormats)?e.numberFormats:{[s.value]:{}});let c=a?a.missingWarn:!shared.isBoolean(e.missingWarn)&&!shared.isRegExp(e.missingWarn)||e.missingWarn,u=a?a.fallbackWarn:!shared.isBoolean(e.fallbackWarn)&&!shared.isRegExp(e.fallbackWarn)||e.fallbackWarn,m=a?a.fallbackRoot:!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,g=!!e.fallbackFormat,d=shared.isFunction(e.missing)?e.missing:null,b=shared.isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,p=shared.isFunction(e.postTranslation)?e.postTranslation:null,f=!shared.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,h=!!e.escapeParameter;const _=a?a.modifiers:shared.isPlainObject(e.modifiers)?e.modifiers:{};let v,y=e.pluralRules||a&&a.pluralRules;v=coreBase.createCoreContext({version:VERSION,locale:s.value,fallbackLocale:n.value,messages:o.value,datetimeFormats:l.value,numberFormats:i.value,modifiers:_,pluralRules:y,missing:null===b?void 0:b,missingWarn:c,fallbackWarn:u,fallbackFormat:g,unresolving:!0,postTranslation:null===p?void 0:p,warnHtmlMessage:f,escapeParameter:h,__datetimeFormatters:shared.isPlainObject(v)?v.__datetimeFormatters:void 0,__numberFormatters:shared.isPlainObject(v)?v.__numberFormatters:void 0,__v_emitter:shared.isPlainObject(v)?v.__v_emitter:void 0,__meta:{framework:"vue"}}),coreBase.updateFallbackLocale(v,s.value,n.value);const F=vue.computed({get:()=>s.value,set:e=>{s.value=e,v.locale=s.value}}),k=vue.computed({get:()=>n.value,set:e=>{n.value=e,v.fallbackLocale=n.value,coreBase.updateFallbackLocale(v,s.value,e)}}),M=vue.computed(()=>o.value),I=vue.computed(()=>l.value),S=vue.computed(()=>i.value);function O(e,t,r,g,d,b){let p;s.value,n.value,o.value,l.value,i.value;try{coreBase.setAdditionalMeta(getMetaInfo()),p=e(v)}finally{coreBase.setAdditionalMeta(null)}if(shared.isNumber(p)&&p===coreBase.NOT_REOSLVED){const[e,s]=t();if(a&&shared.isString(e)&&("translate"!==r||0==!!s.resolvedMessage)){m&&(coreBase.isTranslateFallbackWarn(u,e)||coreBase.isTranslateMissingWarn(c,e))&&shared.warn(getWarnMessage(6,{key:e,type:r}));{const{__v_emitter:a}=v;a&&m&&a.emit("fallback",{type:r,key:e,to:"global",groupId:`${r}:${e}`})}}return a&&m?g(a):d(e)}if(b(p))return p;throw createI18nError(14)}function E(...e){return O(a=>coreBase.translate(a,...e),()=>coreBase.parseTranslateArgs(...e),"translate",a=>a.t(...e),e=>e,e=>shared.isString(e))}const T={normalize:function(e){return e.map(e=>shared.isString(e)?vue.createVNode(vue.Text,null,e,0):e)},interpolate:e=>e,type:"vnode"};function L(e){return o.value[e]||{}}composerID++,a&&(vue.watch(a.locale,e=>{r&&(s.value=e,v.locale=e,coreBase.updateFallbackLocale(v,s.value,n.value))}),vue.watch(a.fallbackLocale,e=>{r&&(n.value=e,v.fallbackLocale=e,coreBase.updateFallbackLocale(v,s.value,n.value))}));const N={id:composerID,locale:F,fallbackLocale:k,get inheritLocale(){return r},set inheritLocale(e){r=e,e&&a&&(s.value=a.locale.value,n.value=a.fallbackLocale.value,coreBase.updateFallbackLocale(v,s.value,n.value))},get availableLocales(){return Object.keys(o.value).sort()},messages:M,datetimeFormats:I,numberFormats:S,get modifiers(){return _},get pluralRules(){return y||{}},get isGlobal(){return t},get missingWarn(){return c},set missingWarn(e){c=e,v.missingWarn=c},get fallbackWarn(){return u},set fallbackWarn(e){u=e,v.fallbackWarn=u},get fallbackRoot(){return m},set fallbackRoot(e){m=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,v.fallbackFormat=g},get warnHtmlMessage(){return f},set warnHtmlMessage(e){f=e,v.warnHtmlMessage=e},get escapeParameter(){return h},set escapeParameter(e){h=e,v.escapeParameter=e},t:E,rt:function(...e){const[a,t,r]=e;if(r&&!shared.isObject(r))throw createI18nError(15);return E(...[a,t,Object.assign({resolvedMessage:!0},r||{})])},d:function(...e){return O(a=>coreBase.datetime(a,...e),()=>coreBase.parseDateTimeArgs(...e),"datetime format",a=>a.d(...e),()=>coreBase.MISSING_RESOLVE_VALUE,e=>shared.isString(e))},n:function(...e){return O(a=>coreBase.number(a,...e),()=>coreBase.parseNumberArgs(...e),"number format",a=>a.n(...e),()=>coreBase.MISSING_RESOLVE_VALUE,e=>shared.isString(e))},te:function(e,a){const t=L(shared.isString(a)?a:s.value);return null!==coreBase.resolveValue(t,e)},tm:function(e){const t=function(e){let a=null;const t=coreBase.getLocaleChain(v,n.value,s.value);for(let r=0;r{let t;const r=a;try{r.processor=T,t=coreBase.translate(r,...e)}finally{r.processor=null}return t},()=>coreBase.parseTranslateArgs(...e),"translate",a=>a[TransrateVNodeSymbol](...e),e=>[vue.createVNode(vue.Text,null,e,0)],e=>shared.isArray(e))},[NumberPartsSymbol]:function(...e){return O(a=>coreBase.number(a,...e),()=>coreBase.parseNumberArgs(...e),"number format",a=>a[NumberPartsSymbol](...e),()=>[],e=>shared.isString(e)||shared.isArray(e))},[DatetimePartsSymbol]:function(...e){return O(a=>coreBase.datetime(a,...e),()=>coreBase.parseDateTimeArgs(...e),"datetime format",a=>a[DatetimePartsSymbol](...e),()=>[],e=>shared.isString(e)||shared.isArray(e))},[SetPluralRulesSymbol]:function(e){y=e,v.pluralRules=y}};return N[EnableEmitter]=(e=>{v.__v_emitter=e}),N[DisableEmitter]=(()=>{v.__v_emitter=void 0}),N}function convertComposerOptions(e){const a=shared.isString(e.locale)?e.locale:"en-US",t=shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=shared.isFunction(e.missing)?e.missing:void 0,s=!shared.isBoolean(e.silentTranslationWarn)&&!shared.isRegExp(e.silentTranslationWarn)||!e.silentTranslationWarn,n=!shared.isBoolean(e.silentFallbackWarn)&&!shared.isRegExp(e.silentFallbackWarn)||!e.silentFallbackWarn,o=!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,l=!!e.formatFallbackMessages,i=shared.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=shared.isFunction(e.postTranslation)?e.postTranslation:void 0,m=!shared.isString(e.warnHtmlInMessage)||"off"!==e.warnHtmlInMessage,g=!!e.escapeParameterHtml,d=!shared.isBoolean(e.sync)||e.sync;e.formatter&&shared.warn(getWarnMessage(8)),e.preserveDirectiveContent&&shared.warn(getWarnMessage(9));let b=e.messages;if(shared.isPlainObject(e.sharedMessages)){const a=e.sharedMessages;b=Object.keys(a).reduce((e,t)=>{const r=e[t]||(e[t]={});return Object.assign(r,a[t]),e},b||{})}const{__i18n:p,__root:f}=e,h=e.datetimeFormats,_=e.numberFormats;return{locale:a,fallbackLocale:t,messages:b,flatJson:e.flatJson,datetimeFormats:h,numberFormats:_,missing:r,missingWarn:s,fallbackWarn:n,fallbackRoot:o,fallbackFormat:l,modifiers:i,pluralRules:c,postTranslation:u,warnHtmlMessage:m,escapeParameter:g,inheritLocale:d,__i18n:p,__root:f}}function createVueI18n(e={}){const a=createComposer(convertComposerOptions(e)),t={id:a.id,get locale(){return a.locale.value},set locale(e){a.locale.value=e},get fallbackLocale(){return a.fallbackLocale.value},set fallbackLocale(e){a.fallbackLocale.value=e},get messages(){return a.messages.value},get datetimeFormats(){return a.datetimeFormats.value},get numberFormats(){return a.numberFormats.value},get availableLocales(){return a.availableLocales},get formatter(){return shared.warn(getWarnMessage(8)),{interpolate:()=>[]}},set formatter(e){shared.warn(getWarnMessage(8))},get missing(){return a.getMissingHandler()},set missing(e){a.setMissingHandler(e)},get silentTranslationWarn(){return shared.isBoolean(a.missingWarn)?!a.missingWarn:a.missingWarn},set silentTranslationWarn(e){a.missingWarn=shared.isBoolean(e)?!e:e},get silentFallbackWarn(){return shared.isBoolean(a.fallbackWarn)?!a.fallbackWarn:a.fallbackWarn},set silentFallbackWarn(e){a.fallbackWarn=shared.isBoolean(e)?!e:e},get modifiers(){return a.modifiers},get formatFallbackMessages(){return a.fallbackFormat},set formatFallbackMessages(e){a.fallbackFormat=e},get postTranslation(){return a.getPostTranslationHandler()},set postTranslation(e){a.setPostTranslationHandler(e)},get sync(){return a.inheritLocale},set sync(e){a.inheritLocale=e},get warnHtmlInMessage(){return a.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(e){a.warnHtmlMessage="off"!==e},get escapeParameterHtml(){return a.escapeParameter},set escapeParameterHtml(e){a.escapeParameter=e},get preserveDirectiveContent(){return shared.warn(getWarnMessage(9)),!0},set preserveDirectiveContent(e){shared.warn(getWarnMessage(9))},get pluralizationRules(){return a.pluralRules||{}},__composer:a,t(...e){const[t,r,s]=e,n={};let o=null,l=null;if(!shared.isString(t))throw createI18nError(15);const i=t;return shared.isString(r)?n.locale=r:shared.isArray(r)?o=r:shared.isPlainObject(r)&&(l=r),shared.isArray(s)?o=s:shared.isPlainObject(s)&&(l=s),a.t(i,o||l||{},n)},rt:(...e)=>a.rt(...e),tc(...e){const[t,r,s]=e,n={plural:1};let o=null,l=null;if(!shared.isString(t))throw createI18nError(15);const i=t;return shared.isString(r)?n.locale=r:shared.isNumber(r)?n.plural=r:shared.isArray(r)?o=r:shared.isPlainObject(r)&&(l=r),shared.isString(s)?n.locale=s:shared.isArray(s)?o=s:shared.isPlainObject(s)&&(l=s),a.t(i,o||l||{},n)},te:(e,t)=>a.te(e,t),tm:e=>a.tm(e),getLocaleMessage:e=>a.getLocaleMessage(e),setLocaleMessage(e,t){a.setLocaleMessage(e,t)},mergeLocaleMessage(e,t){a.mergeLocaleMessage(e,t)},d:(...e)=>a.d(...e),getDateTimeFormat:e=>a.getDateTimeFormat(e),setDateTimeFormat(e,t){a.setDateTimeFormat(e,t)},mergeDateTimeFormat(e,t){a.mergeDateTimeFormat(e,t)},n:(...e)=>a.n(...e),getNumberFormat:e=>a.getNumberFormat(e),setNumberFormat(e,t){a.setNumberFormat(e,t)},mergeNumberFormat(e,t){a.mergeNumberFormat(e,t)},getChoiceIndex:(e,a)=>(shared.warn(getWarnMessage(10)),-1),__onComponentInstanceCreated(a){const{componentInstanceCreatedListener:r}=e;r&&r(a,t)},__enableEmitter:e=>{const t=a;t[EnableEmitter]&&t[EnableEmitter](e)},__disableEmitter:()=>{const e=a;e[DisableEmitter]&&e[DisableEmitter]()}};return t}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"}},Translation={name:"i18n-t",props:shared.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>shared.isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,a){const{slots:t,attrs:r}=a,s=useI18n({useScope:e.scope}),n=Object.keys(t).filter(e=>"_"!==e);return()=>{const t={};e.locale&&(t.locale=e.locale),void 0!==e.plural&&(t.plural=shared.isString(e.plural)?+e.plural:e.plural);const o=getInterpolateArg(a,n),l=s[TransrateVNodeSymbol](e.keypath,o,t),i=shared.assign({},r);return shared.isString(e.tag)?vue.h(e.tag,i,l):shared.isObject(e.tag)?vue.h(e.tag,i,l):vue.h(vue.Fragment,i,l)}}};function getInterpolateArg({slots:e},a){return 1===a.length&&"default"===a[0]?e.default?e.default():[]:a.reduce((a,t)=>{const r=e[t];return r&&(a[t]=r()),a},{})}function renderFormatter(e,a,t,r){const{slots:s,attrs:n}=a;return()=>{const a={part:!0};let o={};e.locale&&(a.locale=e.locale),shared.isString(e.format)?a.key=e.format:shared.isObject(e.format)&&(shared.isString(e.format.key)&&(a.key=e.format.key),o=Object.keys(e.format).reduce((a,r)=>t.includes(r)?Object.assign({},a,{[r]:e.format[r]}):a,{}));const l=r(...[e.value,a,o]);let i=[a.key];shared.isArray(l)?i=l.map((e,a)=>{const t=s[e.type];return t?t({[e.type]:e.value,index:a,parts:l}):[e.value]}):shared.isString(l)&&(i=[l]);const c=shared.assign({},n);return shared.isString(e.tag)?vue.h(e.tag,c,i):shared.isObject(e.tag)?vue.h(e.tag,c,i):vue.h(vue.Fragment,c,i)}}const NUMBER_FORMAT_KEYS=["localeMatcher","style","unit","unitDisplay","currency","currencyDisplay","useGrouping","numberingSystem","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","notation","formatMatcher"],NumberFormat={name:"i18n-n",props:shared.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,a){const t=useI18n({useScope:"parent"});return renderFormatter(e,a,NUMBER_FORMAT_KEYS,(...e)=>t[NumberPartsSymbol](...e))}},DATETIME_FORMAT_KEYS=["dateStyle","timeStyle","fractionalSecondDigits","calendar","dayPeriod","numberingSystem","localeMatcher","timeZone","hour12","hourCycle","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"],DatetimeFormat={name:"i18n-d",props:shared.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,a){const t=useI18n({useScope:"parent"});return renderFormatter(e,a,DATETIME_FORMAT_KEYS,(...e)=>t[DatetimePartsSymbol](...e))}};function getComposer$1(e,a){const t=e;if("composition"===e.mode)return t.__getInstance(a)||e.global;{const r=t.__getInstance(a);return null!=r?r.__composer:e.global.__composer}}function vTDirective(e){const a=(a,{instance:t,value:r,modifiers:s})=>{if(!t||!t.$)throw createI18nError(22);const n=getComposer$1(e,t.$);s.preserve&&shared.warn(getWarnMessage(7));const o=parseValue(r);a.textContent=n.t(...makeParams(o))};return{beforeMount:a,beforeUpdate:a}}function parseValue(e){if(shared.isString(e))return{path:e};if(shared.isPlainObject(e)){if(!("path"in e))throw createI18nError(19,"path");return e}throw createI18nError(20)}function makeParams(e){const{path:a,locale:t,args:r,choice:s,plural:n}=e,o={},l=r||{};return shared.isString(t)&&(o.locale=t),shared.isNumber(s)&&(o.plural=s),shared.isNumber(n)&&(o.plural=n),[a,l,o]}function apply(e,a,...t){const r=shared.isPlainObject(t[0])?t[0]:{},s=!!r.useI18nComponentName,n=!shared.isBoolean(r.globalInstall)||r.globalInstall;n&&s&&shared.warn(getWarnMessage(11,{name:Translation.name})),n&&(e.component(s?"i18n":Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat)),e.directive("t",vTDirective(a))}function defineMixin(e,a,t){return{beforeCreate(){const r=vue.getCurrentInstance();if(!r)throw createI18nError(22);const s=this.$options;if(s.i18n){const t=s.i18n;s.__i18n&&(t.__i18n=s.__i18n),t.__root=a,this===this.$root?this.$i18n=mergeToRoot(e,t):this.$i18n=createVueI18n(t)}else s.__i18n?this===this.$root?this.$i18n=mergeToRoot(e,s):this.$i18n=createVueI18n({__i18n:s.__i18n,__root:a}):this.$i18n=e;e.__onComponentInstanceCreated(this.$i18n),t.__setInstance(r,this.$i18n),this.$t=((...e)=>this.$i18n.t(...e)),this.$rt=((...e)=>this.$i18n.rt(...e)),this.$tc=((...e)=>this.$i18n.tc(...e)),this.$te=((e,a)=>this.$i18n.te(e,a)),this.$d=((...e)=>this.$i18n.d(...e)),this.$n=((...e)=>this.$i18n.n(...e)),this.$tm=(e=>this.$i18n.tm(e))},mounted(){},beforeUnmount(){const e=vue.getCurrentInstance();if(!e)throw createI18nError(22);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__deleteInstance(e),delete this.$i18n}}}function mergeToRoot(e,a){e.locale=a.locale||e.locale,e.fallbackLocale=a.fallbackLocale||e.fallbackLocale,e.missing=a.missing||e.missing,e.silentTranslationWarn=a.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=a.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=a.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=a.postTranslation||e.postTranslation,e.warnHtmlInMessage=a.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=a.escapeParameterHtml||e.escapeParameterHtml,e.sync=a.sync||e.sync,e.__composer[SetPluralRulesSymbol](a.pluralizationRules||e.pluralizationRules);const t=getLocaleMessages(e.locale,{messages:a.messages,__i18n:a.__i18n});return Object.keys(t).forEach(a=>e.mergeLocaleMessage(a,t[a])),a.datetimeFormats&&Object.keys(a.datetimeFormats).forEach(t=>e.mergeDateTimeFormat(t,a.datetimeFormats[t])),a.numberFormats&&Object.keys(a.numberFormats).forEach(t=>e.mergeNumberFormat(t,a.numberFormats[t])),e}function createI18n(e={}){const a=!shared.isBoolean(e.legacy)||e.legacy,t=!!e.globalInjection,r=new Map,s=a?createVueI18n(e):createComposer(e),n=shared.makeSymbol("vue-i18n"),o={get mode(){return a?"legacy":"composition"},async install(e,...r){e.__VUE_I18N_SYMBOL__=n,e.provide(e.__VUE_I18N_SYMBOL__,o),!a&&t&&injectGlobalFields(e,o.global),apply(e,o,...r),a&&e.mixin(defineMixin(s,s.__composer,o))},get global(){return s},__instances:r,__getInstance:e=>r.get(e)||null,__setInstance(e,a){r.set(e,a)},__deleteInstance(e){r.delete(e)}};return o}function useI18n(e={}){const a=vue.getCurrentInstance();if(null==a)throw createI18nError(16);if(!a.appContext.app.__VUE_I18N_SYMBOL__)throw createI18nError(17);const t=vue.inject(a.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw createI18nError(22);const r="composition"===t.mode?t.global:t.global.__composer,s=shared.isEmptyObject(e)?"__i18n"in a.type?"local":"global":e.useScope?e.useScope:"local";if("global"===s){let t=shared.isObject(e.messages)?e.messages:{};"__i18nGlobal"in a.type&&(t=getLocaleMessages(r.locale.value,{messages:t,__i18n:a.type.__i18nGlobal}));const s=Object.keys(t);if(s.length&&s.forEach(e=>{r.mergeLocaleMessage(e,t[e])}),shared.isObject(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(a=>{r.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(shared.isObject(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(a=>{r.mergeNumberFormat(a,e.numberFormats[a])})}return r}if("parent"===s){let e=getComposer(t,a);return null==e&&(shared.warn(getWarnMessage(12)),e=r),e}if("legacy"===t.mode)throw createI18nError(18);const n=t;let o=n.__getInstance(a);if(null==o){const t=a.type,s={...e};t.__i18n&&(s.__i18n=t.__i18n),r&&(s.__root=r),o=createComposer(s),setupLifeCycle(n,a),n.__setInstance(a,o)}return o}function getComposer(e,a){let t=null;const r=a.root;let s=a.parent;for(;null!=s;){const a=e;if("composition"===e.mode)t=a.__getInstance(s);else{const e=a.__getInstance(s);null!=e&&(t=e.__composer)}if(null!=t)break;if(r===s)break;s=s.parent}return t}function setupLifeCycle(e,a,t){vue.onMounted(()=>{},a),vue.onUnmounted(()=>{e.__deleteInstance(a)},a)}const globalExportProps=["locale","fallbackLocale","availableLocales"],globalExportMethods=["t","rt","d","n","tm"];function injectGlobalFields(e,a){const t=Object.create(null);globalExportProps.forEach(e=>{const r=Object.getOwnPropertyDescriptor(a,e);if(!r)throw createI18nError(22);const s=vue.isRef(r.value)?{get:()=>r.value.value,set(e){r.value.value=e}}:{get:()=>r.get&&r.get()};Object.defineProperty(t,e,s)}),e.config.globalProperties.$i18n=t,globalExportMethods.forEach(t=>{const r=Object.getOwnPropertyDescriptor(a,t);if(!r||!r.value)throw createI18nError(22);Object.defineProperty(e.config.globalProperties,`$${t}`,r)})}coreBase.registerMessageCompiler(coreBase.compileToFunction);{const e=shared.getGlobalThis();e.__INTLIFY__=!0,coreBase.setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}exports.DatetimeFormat=DatetimeFormat,exports.NumberFormat=NumberFormat,exports.Translation=Translation,exports.VERSION=VERSION,exports.createI18n=createI18n,exports.useI18n=useI18n,exports.vTDirective=vTDirective; \ No newline at end of file