vue-i18n-bridge
Advanced tools
Comparing version 9.3.0-beta.24 to 9.3.0-beta.25
/*! | ||
* vue-i18n-bridge v9.3.0-beta.24 | ||
* vue-i18n-bridge v9.3.0-beta.25 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,n)=>friendlyJSONstringify({l:e,k:t,s:n}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function createPosition(e,t,n){return{line:e,column:t,offset:n}}function createLocation(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function createCompileError(e,t,n={}){const{domain:r,messages:a,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function defaultOnError(e){throw e}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let n=0,r=1,a=1,o=0;const s=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,l=e=>t[e]===CHAR_PS,i=e=>t[e]===CHAR_LS,c=e=>s(e)||(e=>t[e]===CHAR_LF)(e)||l(e)||i(e),u=e=>s(e)||l(e)||i(e)?CHAR_LF:t[e];function m(){return o=0,c(n)&&(r++,a=0),s(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:m,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)m();o=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const n=!1!==t.location,r=createScanner(e),a=()=>r.index(),o=()=>createPosition(r.line(),r.column(),r.index()),s=o(),l=a(),i={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>i,{onError:u}=t;function m(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=createLocation(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const f=e=>m(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,o(),"")}function g(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=g(e);return e.skipToPeek(),t}function d(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function E(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){g(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function C(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===CHAR_SP||r===CHAR_LF):o===CHAR_SP?(e.peek(),n(!0,CHAR_SP,a)):o!==CHAR_LF||(e.peek(),n(!0,CHAR_LF,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function N(e,t){const n=e.currentChar();return n===EOF?EOF:t(n)?(e.next(),n):null}function L(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function h(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function v(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function T(e){let t="",n="";for(;t=h(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!C(e))break;t+=n,e.next()}else if(n===CHAR_SP||n===CHAR_LF)if(C(e))t+=n,e.next();else{if(b(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function S(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return I(e,t,4);case"U":return I(e,t,6);default:return CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,o(),""}}function I(e,t,n){p(e,t);let r="";for(let a=0;a<n;a++){const t=v(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function y(e){_(e);const t=p(e,"|");return _(e),t}function k(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,o()),e.next(),n=m(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,o()),e.next(),n=m(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n=A(e,t)||f(t),t.braceNest=0,n;default:let r=!0,a=!0,s=!0;if(b(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n=m(t,1,y(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o(),t.braceNest=0,F(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t))return n=m(t,5,function(e){_(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n}(e)),_(e),n;if(a=E(e,t))return n=m(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${T(e)}`):t+=T(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),t}(e)),_(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),r}(e,t))return n=m(t,7,function(e){_(e),p(e,"'");let t="",n="";const r=e=>e!==LITERAL_DELIMITER&&e!==CHAR_LF;for(;t=N(e,r);)n+="\\"===t?S(e):t;const a=e.currentChar();return a===CHAR_LF||a===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),a===CHAR_LF&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),_(e),n;if(!r&&!a&&!s)return n=m(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF;for(;t=N(e,r);)n+=t;return n}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,o(),n.value,_(e),n}return n}function A(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==CHAR_LF&&a!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,o()),a){case"@":return e.next(),r=m(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),m(t,9,".");case":":return _(e),e.next(),m(t,10,":");default:return b(e)?(r=m(t,1,y(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;g(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;g(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),A(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;g(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),m(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),r()):d(t))},a=r();return e.resetPeek(),a}(e,t)?(_(e),"{"===a?k(e,t)||r:m(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===CHAR_SP?r:a===CHAR_LF?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&(CompileErrorCodes.INVALID_LINKED_FORMAT,o()),t.braceNest=0,t.inLinked=!1,F(e,t))}}function F(e,t){let n={type:14};if(t.braceNest>0)return k(e,t)||f(t);if(t.inLinked)return A(e,t)||f(t);switch(e.currentChar()){case"{":return k(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,o(),e.next(),m(t,3,"}");case"@":return A(e,t)||f(t);default:if(b(e))return n=m(t,1,y(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=g(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?m(t,0,O(e)):m(t,4,function(e){_(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,o()),e.next(),"%"}(e));if(C(e))return m(t,0,O(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=i;return i.lastType=e,i.lastOffset=t,i.lastStartLoc=n,i.lastEndLoc=s,i.offset=a(),i.startLoc=o(),r.currentChar()===EOF?m(i,14):F(r,i)},currentOffset:a,currentPosition:o,context:c}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e};return t&&(a.start=n,a.end=n,a.loc={start:r,end:r}),a}function a(e,n,r,a){a&&(e.type=a),t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(5,o,s);return l.index=parseInt(t,10),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(4,o,s);return l.key=t,e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function i(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(9,o,s);return l.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function c(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(8,o,s);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,l.value="",a(l,o,s),{nextConsumeToken:t,node:l}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,getTokenCaption(t)),l.value=t.value||"",a(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=l(e,o.value||"");break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=s(e,o.value||"");break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=i(e,o.value||"");break;default:CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const c=e.context(),u=r(7,c.offset,c.startLoc);return u.value="",a(u,c.offset,c.startLoc),n.key=u,a(n,c.offset,c.startLoc),{nextConsumeToken:o,node:n}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(s(e,r.value||""));break;case 5:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(l(e,r.value||""));break;case 7:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(i(e,r.value||""));break;case 8:const a=c(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:o}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,o){const s=e.context();let l=0===o.items.length;const i=r(1,t,n);i.cases=[],i.cases.push(o);do{const t=u(e);l||(l=0===t.items.length),i.cases.push(t)}while(14!==s.currentType);return a(i,e.currentOffset(),e.currentPosition()),i}(e,n,o,s)}return{parse:function(n){const o=createTokenizer(n,assign({},e)),s=o.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(o),e.onCacheKey&&(l.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),a(l,o.currentOffset(),o.currentPosition()),l}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function traverseNodes(e,t){for(let n=0;n<e.length;n++)traverseNode(e[n],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const n=createTransformer(e);n.helper("normalize"),e.body&&traverseNode(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function createCodeGenerator(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,s=!1!==t.location,l={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};s&&e.loc&&(l.source=e.loc.source);function i(e,t){l.code+=e}function c(e,t=!0){const n=t?a:"";i(o?n+" ".repeat(e):n)}return{context:()=>l,push:i,indent:function(e=!0){const t=++l.indentLevel;e&&c(t)},deindent:function(e=!0){const t=--l.indentLevel;e&&c(t)},newline:function(){c(l.indentLevel)},helper:e=>`_${e}`,needIndent:()=>l.needIndent}}function generateLinkedNode(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let o=0;o<a&&(generateNode(e,t.items[o]),o!==a-1);o++)e.push(", ");e.deindent(r()),e.push("])")}function generatePluralNode(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(generateNode(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:n}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const n=isString(t.mode)?t.mode:"normal",r=isString(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,l=e.helpers||[],i=createCodeGenerator(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:s});i.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(s),l.length>0&&(i.push(`const { ${join(l.map((e=>`${e}: _${e}`)),", ")} } = ctx`),i.newline()),i.push("return "),generateNode(i,e),i.deindent(s),i.push("}"),delete e.helpers;const{code:c,map:u}=i.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const n=assign({},t),r=!!n.jit,a=null==n.optimize||n.optimize,o=createParser(n).parse(e);return r?(a&&optimize(o),{ast:o,code:""}):(transform(o,n),generate(o,n))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let n,r,a,o,s,l,i,c=-1,u=0,m=0;const f=[];function p(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,a="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===r?r=a:r+=a},f[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===r)return!1;if(r=formatSubPath(r),!1===r)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!p()){if(o=getPathCharType(n),i=pathStateMachine[u],s=i[o]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=f[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let n=cache.get(t);if(n||(n=parse(t),n&&cache.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,n=getPluralIndex(e),r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,a=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,o=e.list||[],s=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(n,s);function l(t){const n=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",s="";1===n.length?isObject(r)?(s=r.modifier||s,o=r.type||o):isString(r)&&(s=r||s):2===n.length&&(isString(r)&&(s=r||s),isString(a)&&(o=a||o));const i=l(t)(u),c="vnode"===o&&isArray(i)&&s?i[0]:i;return s?(m=s,e.modifiers?e.modifiers[m]:DEFAULT_MODIFIER)(c,o):c;var m},message:l,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,n){return[...new Set([n,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[n]])]}function fallbackWithLocaleChain(e,t,n){const r=isString(n)?n:DEFAULT_LOCALE,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;isArray(e);)e=appendBlockToChain(o,e,t);const s=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(s)?[s]:s,isArray(e)&&appendBlockToChain(o,e,!1),a.__localeChainCache.set(r,o)}return o}function appendBlockToChain(e,t,n){let r=!0;for(let a=0;a<t.length&&isBoolean(r);a++){const o=t[a];isString(o)&&(r=appendLocaleToChain(e,t[a],n))}return r}function appendLocaleToChain(e,t,n){let r;const a=t.split("-");do{r=appendItemToChain(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function appendItemToChain(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(isArray(n)||isPlainObject(n))&&n[a]&&(r=n[a])}return r}const VERSION$1="9.3.0-beta.24",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,n=isString(e.locale)?e.locale:DEFAULT_LOCALE,r=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=isPlainObject(e.messages)?e.messages:{[n]:{}},o=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=isPlainObject(e.numberFormats)?e.numberFormats:{[n]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=!!e.fallbackFormat,p=!!e.unresolving,g=isFunction(e.postTranslation)?e.postTranslation:null,_=isPlainObject(e.processor)?e.processor:null,d=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter,b=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,C=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,N=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,L=isObject(e.fallbackContext)?e.fallbackContext:void 0,h=isFunction(e.onWarn)?e.onWarn:warn,v=e,T=isObject(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,O=isObject(v.__numberFormatters)?v.__numberFormatters:new Map,S=isObject(v.__meta)?v.__meta:{};_cid++;const I={version:t,cid:_cid,locale:n,fallbackLocale:r,messages:a,modifiers:l,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:p,postTranslation:g,processor:_,warnHtmlMessage:d,escapeParameter:E,messageCompiler:b,messageResolver:C,localeFallbacker:N,fallbackContext:L,onWarn:h,__meta:S};return I.datetimeFormats=o,I.numberFormats=s,I.__datetimeFormatters=T,I.__numberFormatters=O,I}function handleMissing(e,t,n,r,a){const{missing:o,onWarn:s}=e;if(null!==o){const r=o(e,n,t,a);return isString(r)?r:t}return t}function updateFallbackLocale(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),NOT_SUPPORT_AST:inc$1(),__EXTEND_POINT__:inc$1()},defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function baseCompile(e,t={}){let n=!1;const r=t.onError||defaultOnError;return t.onError=e=>{n=!0,r(e)},{...baseCompile$1(e,t),detectError:n}}function compileToFunction(e,t={}){if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_AST);{!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||defaultOnCacheKey)(e),r=compileCache[n];if(r)return r;const{code:a,detectError:o}=baseCompile(e,t),s=new Function(`return ${a}`)();return o?s:compileCache[n]=s}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e),isMessageAST=e=>isObject(e)&&0===e.type&&"body"in e;function translate(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:l}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,g=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?o?i:()=>i:c.default:n?o?i:()=>i:"",_=n||""!==g,d=isString(c.locale)?c.locale:e.locale;f&&escapeParams(c);let[E,b,C]=p?[i,d,l[d]||{}]:resolveMessageFormat(e,i,d,s,m,u),N=E,L=i;if(p||isString(N)||isMessageAST(N)||isMessageFunction(N)||_&&(N=g,L=N),!(p||(isString(N)||isMessageAST(N)||isMessageFunction(N))&&isString(b)))return a?NOT_REOSLVED:i;let h=!1;const v=isMessageFunction(N)?N:compileMessageFormat(e,i,b,N,L,(()=>{h=!0}));if(h)return N;const T=evaluateMessage(e,v,createMessageContext(getMessageContextOptions(e,b,C,c)));return r?r(T,i):T}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,n,r,a,o){const{messages:s,onWarn:l,messageResolver:i,localeFallbacker:c}=e,u=c(e,r,n);let m,f={},p=null;for(let g=0;g<u.length&&(m=u[g],f=s[m]||{},null===(p=i(f,t))&&(p=f[t]),!(isString(p)||isMessageAST(p)||isMessageFunction(p)));g++){const n=handleMissing(e,t,m,o,"translate");n!==t&&(p=n)}return[p,m,f]}function compileMessageFormat(e,t,n,r,a,o){const{messageCompiler:s,warnHtmlMessage:l}=e;if(isMessageFunction(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,getCompileOptions(e,n,a,r,l,o));return i.locale=n,i.key=t,i.source=r,i}function evaluateMessage(e,t,n){return t(n)}function parseTranslateArgs(...e){const[t,n,r]=e,a={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const o=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(n)?a.plural=n:isString(n)?a.default=n:isPlainObject(n)&&!isEmptyObject(n)?a.named=n:isArray(n)&&(a.list=n),isNumber(r)?a.plural=r:isString(r)?a.default=r:isPlainObject(r)&&assign(a,r),[o,a]}function getCompileOptions(e,t,n,r,a,o){return{warnHtmlMessage:a,onError:e=>{throw o&&o(e),e},onCacheKey:e=>generateFormatCacheKey(t,n,e)}}function getMessageContextOptions(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:a,pluralRules:o,messages:r=>{let a=s(n,r);if(null==a&&u){const[,,e]=resolveMessageFormat(u,r,t,l,i,c);a=s(e,r)}if(isString(a)||isMessageAST(a)){let n=!1;const o=compileMessageFormat(e,r,t,a,r,(()=>{n=!0}));return n?NOOP_MESSAGE_FUNCTION:o}return isMessageFunction(a)?a:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),isNumber(r.plural)&&(m.pluralIndex=r.plural),m}function datetime(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__datetimeFormatters:l}=e,[i,c,u,m]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,_=s(e,a,g);if(!isString(i)||""===i)return new Intl.DateTimeFormat(g,m).format(c);let d,E={},b=null;for(let L=0;L<_.length&&(d=_[L],E=n[d]||{},b=E[i],!isPlainObject(b));L++)handleMissing(e,i,d,f,"datetime format");if(!isPlainObject(b)||!isString(d))return r?NOT_REOSLVED:i;let C=`${d}__${i}`;isEmptyObject(m)||(C=`${C}__${JSON.stringify(m)}`);let N=l.get(C);return N||(N=new Intl.DateTimeFormat(d,assign({},b,m)),l.set(C,N)),p?N.formatToParts(c):N.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,n,r,a]=e,o={};let s,l={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(i){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);s=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);s=t}return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?l[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(l=r),isPlainObject(a)&&(l=a),[o.key||"",s,o,l]}function clearDateTimeFormat(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__numberFormatters:l}=e,[i,c,u,m]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,_=s(e,a,g);if(!isString(i)||""===i)return new Intl.NumberFormat(g,m).format(c);let d,E={},b=null;for(let L=0;L<_.length&&(d=_[L],E=n[d]||{},b=E[i],!isPlainObject(b));L++)handleMissing(e,i,d,f,"number format");if(!isPlainObject(b)||!isString(d))return r?NOT_REOSLVED:i;let C=`${d}__${i}`;isEmptyObject(m)||(C=`${C}__${JSON.stringify(m)}`);let N=l.get(C);return N||(N=new Intl.NumberFormat(d,assign({},b,m)),l.set(C,N)),p?N.formatToParts(c):N.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,n,r,a]=e,o={};let s={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=t;return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(s=r),isPlainObject(a)&&(s=a),[o.key||"",l,o,s]}function clearNumberFormat(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}const VERSION="9.3.0-beta.24";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSTALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSTALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e,o=!1;for(let e=0;e<r;e++){if(n[e]in a||(a[n[e]]={}),!isObject(a[n[e]])){o=!0;break}a=a[n[e]]}o||(a[n[r]]=e[t],delete e[t]),isObject(a[n[r]])&&handleFlatJson(a[n[r]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,s=isPlainObject(n)?n:isArray(r)?{}:{[e]:{}};if(isArray(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},deepCopy(n,s[t])):deepCopy(n,s)}else isString(e)&&deepCopy(JSON.parse(e),s)})),null==a&&o)for(const l in s)hasOwn(s,l)&&handleFlatJson(s[l]);return s}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const n in e)hasOwn(e,n)&&(isNotObjectOrIsArray(e[n])||isNotObjectOrIsArray(t[n])?t[n]=e[n]:deepCopy(e[n],t[n]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,n){let r=isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=getLocaleMessages(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),isObject(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(isObject(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,n,r,a)=>e(n,r,getCurrentInstance()||void 0,a)}function createComposer(e={},t){const{__root:n}=e,r=void 0===n;let a=!isBoolean(e.inheritLocale)||e.inheritLocale;const o=ref(n&&a?n.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),s=ref(n&&a?n.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o.value),l=ref(getLocaleMessages(o.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[o.value]:{}});let u=n?n.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=n?n.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=n?n.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,p=!!e.fallbackFormat,g=isFunction(e.missing)?e.missing:null,_=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,d=isFunction(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter;const C=n?n.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let N,L,h=e.pluralRules||n&&n.pluralRules;{isLegacyVueI18n(t);const e={locale:o.value,fallbackLocale:s.value,messages:l.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:C,missing:g,fallbackRoot:f,postTranslation:d,pluralizationRules:h,escapeParameterHtml:b,sync:a,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(p)?!p:p,warnHtmlInMessage:isBoolean(E)&&E?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};N=new t(e)}L=(()=>{const t={version:VERSION,locale:o.value,fallbackLocale:s.value,messages:l.value,modifiers:C,pluralRules:h,missing:null===_?void 0:_,missingWarn:u,fallbackWarn:m,fallbackFormat:p,unresolving:!0,postTranslation:null===d?void 0:d,warnHtmlMessage:E,escapeParameter:b,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(L)?L.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(L)?L.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(L,o.value,s.value);const v=computed({get:()=>o.value,set:e=>{o.value=e,N&&!r&&(N.locale=e),L.locale=o.value}}),T=computed({get:()=>s.value,set:e=>{s.value=e,N&&!r&&(N.fallbackLocale=e),L.fallbackLocale=s.value,updateFallbackLocale(L,o.value,e)}}),O=computed((()=>l.value)),S=computed((()=>i.value)),I=computed((()=>c.value));const y=(e,t,r,a,u,m)=>{let p;if(o.value,s.value,l.value,i.value,c.value,p=e(L),isNumber(p)&&p===NOT_REOSLVED){const[e,r]=t();return n&&f?a(n):u(e)}if(m(p))return p;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function k(...e){return y((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const A={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function F(e){return l.value[e]||{}}composerID++,n&&inBrowser&&(watch(n.locale,(e=>{a&&(o.value=e,N&&!r&&(N.locale=e),L.locale=e,updateFallbackLocale(L,o.value,s.value))})),watch(n.fallbackLocale,(e=>{a&&(s.value=e,N&&!r&&(N.fallbackLocale=e),L.fallbackLocale=e,updateFallbackLocale(L,o.value,s.value))})));const P={id:composerID,locale:v,fallbackLocale:T,get inheritLocale(){return a},set inheritLocale(e){a=e,N&&(N._sync=e),e&&n&&(o.value=n.locale.value,s.value=n.fallbackLocale.value,N&&(N.locale=n.locale.value,N.fallbackLocale=n.fallbackLocale.value),updateFallbackLocale(L,o.value,s.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:O,get modifiers(){return C},get pluralRules(){return h||{}},get isGlobal(){return r},get missingWarn(){return u},set missingWarn(e){u=e,L.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,L.fallbackWarn=m},get fallbackRoot(){return f},set fallbackRoot(e){f=e},get fallbackFormat(){return p},set fallbackFormat(e){p=e,L.fallbackFormat=p},get warnHtmlMessage(){return E},set warnHtmlMessage(e){E=e,L.warnHtmlMessage=e},get escapeParameter(){return b},set escapeParameter(e){b=e,L.escapeParameter=e},t:k,getLocaleMessage:F,setLocaleMessage:function(e,t){l.value[e]=t,N&&N.setLocaleMessage(e,t),L.messages=l.value},mergeLocaleMessage:function(e,t){l.value[e]=l.value[e]||{},N&&N.mergeLocaleMessage(e,t),deepCopy(t,l.value[e]),L.messages=l.value},getPostTranslationHandler:function(){return isFunction(d)?d:null},setPostTranslationHandler:function(e){d=e,L.postTranslation=e},getMissingHandler:function(){return g},setMissingHandler:function(e){null!==e&&(_=defineCoreMissingHandler(e)),g=e,L.missing=_},[SetPluralRulesSymbol]:function(e){h=e,L.pluralRules=h}};return P.datetimeFormats=S,P.numberFormats=I,P.rt=function(...e){const[t,n,r]=e;if(r&&!isObject(r))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return k(t,n,assign({resolvedMessage:!0},r||{}))},P.te=function(e,t){const n=F(isString(t)?t:o.value);return null!==L.messageResolver(n,e)},P.tm=function(e){const t=function(e){let t=null;const n=fallbackWithLocaleChain(L,s.value,o.value);for(let r=0;r<n.length;r++){const a=l.value[n[r]]||{},o=L.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:n&&n.tm(e)||{}},P.d=function(...e){return y((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},P.n=function(...e){return y((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},P.getDateTimeFormat=function(e){return i.value[e]||{}},P.setDateTimeFormat=function(e,t){i.value[e]=t,N&&N.setDateTimeFormat(e,t),L.datetimeFormats=i.value,clearDateTimeFormat(L,e,t)},P.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),N&&N.mergeDateTimeFormat(e,t),L.datetimeFormats=i.value,clearDateTimeFormat(L,e,t)},P.getNumberFormat=function(e){return c.value[e]||{}},P.setNumberFormat=function(e,t){c.value[e]=t,N&&N.setNumberFormat(e,t),L.numberFormats=c.value,clearNumberFormat(L,e,t)},P.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),N&&N.mergeNumberFormat(e,t),L.numberFormats=c.value,clearNumberFormat(L,e,t)},P[InejctWithOption]=e.__injectWithOption,P[TranslateVNodeSymbol]=function(...e){return y((t=>{let n;const r=t;try{r.processor=A,n=Reflect.apply(translate,null,[r,...e])}finally{r.processor=null}return n}),(()=>parseTranslateArgs(...e)),"translate",(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},P[DatetimePartsSymbol]=function(...e){return y((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},P[NumberPartsSymbol]=function(...e){return y((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},P[LegacyInstanceSymbol]=N,P}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:n,attrs:r}=t,a=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=isString(e.plural)?+e.plural:e.plural);const l=getInterpolateArg(t,o),i=a[TranslateVNodeSymbol](e.keypath,l,s),c=assign({},r),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,n,r){const{slots:a,attrs:o}=t;return()=>{const t={part:!0};let s={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),s=Object.keys(e.format).reduce(((t,r)=>n.includes(r)?assign({},t,{[r]:e.format[r]}):t),{}));const l=r(e.value,t,s);let i=[t.key];isArray(l)?i=l.map(((e,t)=>{const n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:l}):[e.value];return isVNode(r)&&(r[0].key=`${e.type}-${t}`),r})):isString(l)&&(i=[l]);const c=assign({},o),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>n[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>n[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const n=isPlainObject(t[0])?t[0]:{};(!isBoolean(n.globalInstall)||n.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(r){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),n.i18n.messages=e}catch(r){}const{sharedMessages:a}=n.i18n;a&&isPlainObject(a)&&deepCopy(a,n.i18n.messages),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||isPlainObject(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const n=!isBoolean(e.legacy)||e.legacy,r=!isBoolean(e.globalInjection)||e.globalInjection,a=!n||!!e.allowComposition,o=new Map,[s,l]=createGlobal(e,n,t);{const e=l[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>a}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...o)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(a,...o),!n&&r&&(t=injectGlobalFieldsForBridge(a,e,l)),a.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const i={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSTALLED);const n=getI18nInstance(t),r=getGlobalComposer(n),a=getComponentOptions(t),o=getScope(e,a);if("legacy"===n.mode&&!e.__useComponent){if(!n.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,o,r,e)}if("global"===o)return adjustI18nResources(r,e,a),r;if("parent"===o){let a=getComposer(n,t,e.__useComponent);return null==a&&(a=r),a}const s=n;let l=s.__getInstance(t);if(null==l){const n=assign({},e);"__i18n"in a&&(n.__i18n=a.__i18n),r&&(n.__root=r),l=createComposer(n,_legacyVueI18n),s.__composerExtend&&s.__composerExtend(l),setupLifeCycle(s,t,l),s.__setInstance(t,l)}return l}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,n){const r=effectScope();{if(!isLegacyVueI18n(n))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=r.run((()=>createComposer(e,n)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[r,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(I18nErrorCodes.NOT_INSTALLED);return n}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,n=!1){let r=null;const a=t.root;let o=getParentComponentInstance(t,n);for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[InejctWithOption]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}function getParentComponentInstance(e,t=!1){return null==e?null:e.parent}function setupLifeCycle(e,t,n){{const r=t.proxy;if(null==r)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=n[LegacyInstanceSymbol];if(a===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);r._i18n=a,r._i18n_bridge=!0,inBrowser&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let o=!1;onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0})),onUnmounted((()=>{o&&(r._i18n.unsubscribeDataChanging(r),o=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}))}}function useI18nForLegacy(e,t,n,r={}){const a="local"===t,o=shallowRef(null);if(a&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=isBoolean(r.inheritLocale)?r.inheritLocale:!isString(r.locale),l=ref(!a||s?n.locale.value:isString(r.locale)?r.locale:DEFAULT_LOCALE),i=ref(!a||s?n.fallbackLocale.value:isString(r.fallbackLocale)||isArray(r.fallbackLocale)||isPlainObject(r.fallbackLocale)||!1===r.fallbackLocale?r.fallbackLocale:l.value),c=ref(getLocaleMessages(l.value,r)),u=ref(isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),m=ref(isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),f=a?n.missingWarn:!isBoolean(r.missingWarn)&&!isRegExp(r.missingWarn)||r.missingWarn,p=a?n.fallbackWarn:!isBoolean(r.fallbackWarn)&&!isRegExp(r.fallbackWarn)||r.fallbackWarn,g=a?n.fallbackRoot:!isBoolean(r.fallbackRoot)||r.fallbackRoot,_=!!r.fallbackFormat,d=isFunction(r.missing)?r.missing:null,E=isFunction(r.postTranslation)?r.postTranslation:null,b=a?n.warnHtmlMessage:!isBoolean(r.warnHtmlMessage)||r.warnHtmlMessage,C=!!r.escapeParameter,N=a?n.modifiers:isPlainObject(r.modifiers)?r.modifiers:{},L=r.pluralRules||a&&n.pluralRules;function h(e){return l.value,i.value,c.value,u.value,m.value,e()}const v={get id(){return o.value?o.value.id:-1},locale:computed({get:()=>o.value?o.value.locale.value:l.value,set:e=>{o.value&&(o.value.locale.value=e),l.value=e}}),fallbackLocale:computed({get:()=>o.value?o.value.fallbackLocale.value:i.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>o.value?o.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(c.value)},get modifiers(){return o.value?o.value.modifiers:N},get pluralRules(){return o.value?o.value.pluralRules:L},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:f},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:g},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:_},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:b},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:C},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:function(...e){return o.value?h((()=>Reflect.apply(o.value.t,null,[...e]))):h((()=>""))},getPostTranslationHandler:function(){return o.value?o.value.getPostTranslationHandler():E},setPostTranslationHandler:function(e){o.value&&o.value.setPostTranslationHandler(e)},getMissingHandler:function(){return o.value?o.value.getMissingHandler():d},setMissingHandler:function(e){o.value&&o.value.setMissingHandler(e)},rt:function(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""},d:function(...e){return o.value?h((()=>Reflect.apply(o.value.d,null,[...e]))):h((()=>""))},n:function(...e){return o.value?h((()=>Reflect.apply(o.value.n,null,[...e]))):h((()=>""))},tm:function(e){return o.value?o.value.tm(e):{}},te:function(e,t){return!!o.value&&o.value.te(e,t)},getLocaleMessage:function(e){return o.value?o.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){o.value&&(o.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){o.value&&o.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return o.value?o.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){o.value&&(o.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return o.value?o.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){o.value&&(o.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){o.value&&o.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const n=o.value=e.proxy.$i18n.__composer;"global"===t?(l.value=n.locale.value,i.value=n.fallbackLocale.value,c.value=n.messages.value,u.value=n.datetimeFormats.value,m.value=n.numberFormats.value):a&&function(e){e.locale.value=l.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=C,e.fallbackFormat=_,e.fallbackRoot=g,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=b}(n)})),v}function injectGlobalFieldsForBridge(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}registerMessageCompiler(compileToFunction),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,n)=>friendlyJSONstringify({l:e,k:t,s:n}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function createPosition(e,t,n){return{line:e,column:t,offset:n}}function createLocation(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function createCompileError(e,t,n={}){const{domain:r,messages:a,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function defaultOnError(e){throw e}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let n=0,r=1,a=1,o=0;const s=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,l=e=>t[e]===CHAR_PS,i=e=>t[e]===CHAR_LS,c=e=>s(e)||(e=>t[e]===CHAR_LF)(e)||l(e)||i(e),u=e=>s(e)||l(e)||i(e)?CHAR_LF:t[e];function m(){return o=0,c(n)&&(r++,a=0),s(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:m,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)m();o=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const n=!1!==t.location,r=createScanner(e),a=()=>r.index(),o=()=>createPosition(r.line(),r.column(),r.index()),s=o(),l=a(),i={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>i,{onError:u}=t;function m(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=createLocation(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const f=e=>m(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,o(),"")}function g(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=g(e);return e.skipToPeek(),t}function d(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function E(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){g(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function C(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===CHAR_SP||r===CHAR_LF):o===CHAR_SP?(e.peek(),n(!0,CHAR_SP,a)):o!==CHAR_LF||(e.peek(),n(!0,CHAR_LF,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function L(e,t){const n=e.currentChar();return n===EOF?EOF:t(n)?(e.next(),n):null}function N(e){return L(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function h(e){return L(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function v(e){return L(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function T(e){let t="",n="";for(;t=h(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!C(e))break;t+=n,e.next()}else if(n===CHAR_SP||n===CHAR_LF)if(C(e))t+=n,e.next();else{if(b(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function y(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return S(e,t,4);case"U":return S(e,t,6);default:return CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,o(),""}}function S(e,t,n){p(e,t);let r="";for(let a=0;a<n;a++){const t=v(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function I(e){_(e);const t=p(e,"|");return _(e),t}function k(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,o()),e.next(),n=m(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,o()),e.next(),n=m(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n=A(e,t)||f(t),t.braceNest=0,n;default:let r=!0,a=!0,s=!0;if(b(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n=m(t,1,I(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o(),t.braceNest=0,F(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t))return n=m(t,5,function(e){_(e);let t="",n="";for(;t=N(e);)n+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),n}(e)),_(e),n;if(a=E(e,t))return n=m(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${T(e)}`):t+=T(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,o()),t}(e)),_(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),r}(e,t))return n=m(t,7,function(e){_(e),p(e,"'");let t="",n="";const r=e=>e!==LITERAL_DELIMITER&&e!==CHAR_LF;for(;t=L(e,r);)n+="\\"===t?y(e):t;const a=e.currentChar();return a===CHAR_LF||a===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),a===CHAR_LF&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),_(e),n;if(!r&&!a&&!s)return n=m(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF;for(;t=L(e,r);)n+=t;return n}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,o(),n.value,_(e),n}return n}function A(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==CHAR_LF&&a!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,o()),a){case"@":return e.next(),r=m(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),m(t,9,".");case":":return _(e),e.next(),m(t,10,":");default:return b(e)?(r=m(t,1,I(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;g(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;g(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(_(e),A(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;g(e);const r=d(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),m(t,12,function(e){let t="",n="";for(;t=N(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?d(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),r()):d(t))},a=r();return e.resetPeek(),a}(e,t)?(_(e),"{"===a?k(e,t)||r:m(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===CHAR_SP?r:a===CHAR_LF?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&(CompileErrorCodes.INVALID_LINKED_FORMAT,o()),t.braceNest=0,t.inLinked=!1,F(e,t))}}function F(e,t){let n={type:14};if(t.braceNest>0)return k(e,t)||f(t);if(t.inLinked)return A(e,t)||f(t);switch(e.currentChar()){case"{":return k(e,t)||f(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,o(),e.next(),m(t,3,"}");case"@":return A(e,t)||f(t);default:if(b(e))return n=m(t,1,I(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=g(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?m(t,0,O(e)):m(t,4,function(e){_(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,o()),e.next(),"%"}(e));if(C(e))return m(t,0,O(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=i;return i.lastType=e,i.lastOffset=t,i.lastStartLoc=n,i.lastEndLoc=s,i.offset=a(),i.startLoc=o(),r.currentChar()===EOF?m(i,14):F(r,i)},currentOffset:a,currentPosition:o,context:c}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e};return t&&(a.start=n,a.end=n,a.loc={start:r,end:r}),a}function a(e,n,r,a){a&&(e.type=a),t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(5,o,s);return l.index=parseInt(t,10),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(4,o,s);return l.key=t,e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function i(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(9,o,s);return l.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function c(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(8,o,s);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,l.value="",a(l,o,s),{nextConsumeToken:t,node:l}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,getTokenCaption(t)),l.value=t.value||"",a(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=l(e,o.value||"");break;case 6:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=s(e,o.value||"");break;case 7:null==o.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(o)),n.key=i(e,o.value||"");break;default:CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const c=e.context(),u=r(7,c.offset,c.startLoc);return u.value="",a(u,c.offset,c.startLoc),n.key=u,a(n,c.offset,c.startLoc),{nextConsumeToken:o,node:n}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(s(e,r.value||""));break;case 5:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(l(e,r.value||""));break;case 7:null==r.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(r)),n.items.push(i(e,r.value||""));break;case 8:const a=c(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:o}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,o){const s=e.context();let l=0===o.items.length;const i=r(1,t,n);i.cases=[],i.cases.push(o);do{const t=u(e);l||(l=0===t.items.length),i.cases.push(t)}while(14!==s.currentType);return a(i,e.currentOffset(),e.currentPosition()),i}(e,n,o,s)}return{parse:function(n){const o=createTokenizer(n,assign({},e)),s=o.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(o),e.onCacheKey&&(l.cacheKey=e.onCacheKey(n)),14!==s.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,n[s.offset]),a(l,o.currentOffset(),o.currentPosition()),l}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function traverseNodes(e,t){for(let n=0;n<e.length;n++)traverseNode(e[n],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const n=createTransformer(e);n.helper("normalize"),e.body&&traverseNode(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function optimize(e){const t=e.body;return 2===t.type?optimizeMessageNode(t):t.cases.forEach((e=>optimizeMessageNode(e))),e}function optimizeMessageNode(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=join(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function minify(e){switch(e.t=e.type,e.type){case 0:const t=e;minify(t.body),t.b=t.body,delete t.body;break;case 1:const n=e,r=n.cases;for(let e=0;e<r.length;e++)minify(r[e]);n.c=r,delete n.cases;break;case 2:const a=e,o=a.items;for(let e=0;e<o.length;e++)minify(o[e]);a.i=o,delete a.items,a.static&&(a.s=a.static,delete a.static);break;case 3:case 9:case 8:case 7:const s=e;s.value&&(s.v=s.value,delete s.value);break;case 6:const l=e;minify(l.key),l.k=l.key,delete l.key,l.modifier&&(minify(l.modifier),l.m=l.modifier,delete l.modifier);break;case 5:const i=e;i.i=i.index,delete i.index;break;case 4:const c=e;c.k=c.key,delete c.key}delete e.type}function createCodeGenerator(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,s=!1!==t.location,l={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};s&&e.loc&&(l.source=e.loc.source);function i(e,t){l.code+=e}function c(e,t=!0){const n=t?a:"";i(o?n+" ".repeat(e):n)}return{context:()=>l,push:i,indent:function(e=!0){const t=++l.indentLevel;e&&c(t)},deindent:function(e=!0){const t=--l.indentLevel;e&&c(t)},newline:function(){c(l.indentLevel)},helper:e=>`_${e}`,needIndent:()=>l.needIndent}}function generateLinkedNode(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let o=0;o<a&&(generateNode(e,t.items[o]),o!==a-1);o++)e.push(", ");e.deindent(r()),e.push("])")}function generatePluralNode(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(generateNode(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:n}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const n=isString(t.mode)?t.mode:"normal",r=isString(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,l=e.helpers||[],i=createCodeGenerator(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:s});i.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(s),l.length>0&&(i.push(`const { ${join(l.map((e=>`${e}: _${e}`)),", ")} } = ctx`),i.newline()),i.push("return "),generateNode(i,e),i.deindent(s),i.push("}"),delete e.helpers;const{code:c,map:u}=i.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const n=assign({},t),r=!!n.jit,a=!!n.minify,o=null==n.optimize||n.optimize,s=createParser(n).parse(e);return r?(o&&optimize(s),a&&minify(s),{ast:s,code:""}):(transform(s,n),generate(s,n))}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let n,r,a,o,s,l,i,c=-1,u=0,m=0;const f=[];function p(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,a="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===r?r=a:r+=a},f[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===r)return!1;if(r=formatSubPath(r),!1===r)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!p()){if(o=getPathCharType(n),i=pathStateMachine[u],s=i[o]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=f[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let n=cache.get(t);if(n||(n=parse(t),n&&cache.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,n=getPluralIndex(e),r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,a=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,o=e.list||[],s=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(n,s);function l(t){const n=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",s="";1===n.length?isObject(r)?(s=r.modifier||s,o=r.type||o):isString(r)&&(s=r||s):2===n.length&&(isString(r)&&(s=r||s),isString(a)&&(o=a||o));const i=l(t)(u),c="vnode"===o&&isArray(i)&&s?i[0]:i;return s?(m=s,e.modifiers?e.modifiers[m]:DEFAULT_MODIFIER)(c,o):c;var m},message:l,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,n){return[...new Set([n,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[n]])]}function fallbackWithLocaleChain(e,t,n){const r=isString(n)?n:DEFAULT_LOCALE,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;isArray(e);)e=appendBlockToChain(o,e,t);const s=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(s)?[s]:s,isArray(e)&&appendBlockToChain(o,e,!1),a.__localeChainCache.set(r,o)}return o}function appendBlockToChain(e,t,n){let r=!0;for(let a=0;a<t.length&&isBoolean(r);a++){const o=t[a];isString(o)&&(r=appendLocaleToChain(e,t[a],n))}return r}function appendLocaleToChain(e,t,n){let r;const a=t.split("-");do{r=appendItemToChain(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function appendItemToChain(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(isArray(n)||isPlainObject(n))&&n[a]&&(r=n[a])}return r}const VERSION$1="9.3.0-beta.25",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}const setAdditionalMeta=e=>{};let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,n=isString(e.locale)?e.locale:DEFAULT_LOCALE,r=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=isPlainObject(e.messages)?e.messages:{[n]:{}},o=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=isPlainObject(e.numberFormats)?e.numberFormats:{[n]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=!!e.fallbackFormat,p=!!e.unresolving,g=isFunction(e.postTranslation)?e.postTranslation:null,_=isPlainObject(e.processor)?e.processor:null,d=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter,b=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,C=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,L=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,N=isObject(e.fallbackContext)?e.fallbackContext:void 0,h=isFunction(e.onWarn)?e.onWarn:warn,v=e,T=isObject(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,O=isObject(v.__numberFormatters)?v.__numberFormatters:new Map,y=isObject(v.__meta)?v.__meta:{};_cid++;const S={version:t,cid:_cid,locale:n,fallbackLocale:r,messages:a,modifiers:l,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:p,postTranslation:g,processor:_,warnHtmlMessage:d,escapeParameter:E,messageCompiler:b,messageResolver:C,localeFallbacker:L,fallbackContext:N,onWarn:h,__meta:y};return S.datetimeFormats=o,S.numberFormats=s,S.__datetimeFormatters=T,S.__numberFormatters=O,S}function handleMissing(e,t,n,r,a){const{missing:o,onWarn:s}=e;if(null!==o){const r=o(e,n,t,a);return isString(r)?r:t}return t}function updateFallbackLocale(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),NOT_SUPPORT_AST:inc$1(),__EXTEND_POINT__:inc$1()},defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function baseCompile(e,t={}){let n=!1;const r=t.onError||defaultOnError;return t.onError=e=>{n=!0,r(e)},{...baseCompile$1(e,t),detectError:n}}function compileToFunction(e,t={}){if(!isString(e))throw Error(CoreErrorCodes.NOT_SUPPORT_AST);{!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||defaultOnCacheKey)(e),r=compileCache[n];if(r)return r;const{code:a,detectError:o}=baseCompile(e,t),s=new Function(`return ${a}`)();return o?s:compileCache[n]=s}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e),isMessageAST=e=>isObject(e)&&0===e.type&&"body"in e;function translate(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:l}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,g=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?o?i:()=>i:c.default:n?o?i:()=>i:"",_=n||""!==g,d=isString(c.locale)?c.locale:e.locale;f&&escapeParams(c);let[E,b,C]=p?[i,d,l[d]||{}]:resolveMessageFormat(e,i,d,s,m,u),L=E,N=i;if(p||isString(L)||isMessageAST(L)||isMessageFunction(L)||_&&(L=g,N=L),!(p||(isString(L)||isMessageAST(L)||isMessageFunction(L))&&isString(b)))return a?NOT_REOSLVED:i;let h=!1;const v=isMessageFunction(L)?L:compileMessageFormat(e,i,b,L,N,(()=>{h=!0}));if(h)return L;const T=evaluateMessage(e,v,createMessageContext(getMessageContextOptions(e,b,C,c)));return r?r(T,i):T}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,n,r,a,o){const{messages:s,onWarn:l,messageResolver:i,localeFallbacker:c}=e,u=c(e,r,n);let m,f={},p=null;for(let g=0;g<u.length&&(m=u[g],f=s[m]||{},null===(p=i(f,t))&&(p=f[t]),!(isString(p)||isMessageAST(p)||isMessageFunction(p)));g++){const n=handleMissing(e,t,m,o,"translate");n!==t&&(p=n)}return[p,m,f]}function compileMessageFormat(e,t,n,r,a,o){const{messageCompiler:s,warnHtmlMessage:l}=e;if(isMessageFunction(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,getCompileOptions(e,n,a,r,l,o));return i.locale=n,i.key=t,i.source=r,i}function evaluateMessage(e,t,n){return t(n)}function parseTranslateArgs(...e){const[t,n,r]=e,a={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const o=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(n)?a.plural=n:isString(n)?a.default=n:isPlainObject(n)&&!isEmptyObject(n)?a.named=n:isArray(n)&&(a.list=n),isNumber(r)?a.plural=r:isString(r)?a.default=r:isPlainObject(r)&&assign(a,r),[o,a]}function getCompileOptions(e,t,n,r,a,o){return{warnHtmlMessage:a,onError:e=>{throw o&&o(e),e},onCacheKey:e=>generateFormatCacheKey(t,n,e)}}function getMessageContextOptions(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:a,pluralRules:o,messages:r=>{let a=s(n,r);if(null==a&&u){const[,,e]=resolveMessageFormat(u,r,t,l,i,c);a=s(e,r)}if(isString(a)||isMessageAST(a)){let n=!1;const o=compileMessageFormat(e,r,t,a,r,(()=>{n=!0}));return n?NOOP_MESSAGE_FUNCTION:o}return isMessageFunction(a)?a:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),isNumber(r.plural)&&(m.pluralIndex=r.plural),m}function datetime(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__datetimeFormatters:l}=e,[i,c,u,m]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,_=s(e,a,g);if(!isString(i)||""===i)return new Intl.DateTimeFormat(g,m).format(c);let d,E={},b=null;for(let N=0;N<_.length&&(d=_[N],E=n[d]||{},b=E[i],!isPlainObject(b));N++)handleMissing(e,i,d,f,"datetime format");if(!isPlainObject(b)||!isString(d))return r?NOT_REOSLVED:i;let C=`${d}__${i}`;isEmptyObject(m)||(C=`${C}__${JSON.stringify(m)}`);let L=l.get(C);return L||(L=new Intl.DateTimeFormat(d,assign({},b,m)),l.set(C,L)),p?L.formatToParts(c):L.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,n,r,a]=e,o={};let s,l={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(i){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);s=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);s=t}return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?l[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(l=r),isPlainObject(a)&&(l=a),[o.key||"",s,o,l]}function clearDateTimeFormat(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__numberFormatters:l}=e,[i,c,u,m]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,_=s(e,a,g);if(!isString(i)||""===i)return new Intl.NumberFormat(g,m).format(c);let d,E={},b=null;for(let N=0;N<_.length&&(d=_[N],E=n[d]||{},b=E[i],!isPlainObject(b));N++)handleMissing(e,i,d,f,"number format");if(!isPlainObject(b)||!isString(d))return r?NOT_REOSLVED:i;let C=`${d}__${i}`;isEmptyObject(m)||(C=`${C}__${JSON.stringify(m)}`);let L=l.get(C);return L||(L=new Intl.NumberFormat(d,assign({},b,m)),l.set(C,L)),p?L.formatToParts(c):L.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,n,r,a]=e,o={};let s={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=t;return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(s=r),isPlainObject(a)&&(s=a),[o.key||"",l,o,s]}function clearNumberFormat(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}const VERSION="9.3.0-beta.25";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSTALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSTALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e,o=!1;for(let e=0;e<r;e++){if(n[e]in a||(a[n[e]]={}),!isObject(a[n[e]])){o=!0;break}a=a[n[e]]}o||(a[n[r]]=e[t],delete e[t]),isObject(a[n[r]])&&handleFlatJson(a[n[r]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,s=isPlainObject(n)?n:isArray(r)?{}:{[e]:{}};if(isArray(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},deepCopy(n,s[t])):deepCopy(n,s)}else isString(e)&&deepCopy(JSON.parse(e),s)})),null==a&&o)for(const l in s)hasOwn(s,l)&&handleFlatJson(s[l]);return s}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const n in e)hasOwn(e,n)&&(isNotObjectOrIsArray(e[n])||isNotObjectOrIsArray(t[n])?t[n]=e[n]:deepCopy(e[n],t[n]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,n){let r=isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=getLocaleMessages(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),isObject(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(isObject(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}const DEVTOOLS_META="__INTLIFY_META__";let composerID=0;function defineCoreMissingHandler(e){return(t,n,r,a)=>e(n,r,getCurrentInstance()||void 0,a)}const getMetaInfo=()=>{const e=getCurrentInstance();let t=null;return e&&(t=getComponentOptions(e)[DEVTOOLS_META])?{[DEVTOOLS_META]:t}:null};function createComposer(e={},t){const{__root:n}=e,r=void 0===n;let a=!isBoolean(e.inheritLocale)||e.inheritLocale;const o=ref(n&&a?n.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),s=ref(n&&a?n.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o.value),l=ref(getLocaleMessages(o.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[o.value]:{}});let u=n?n.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=n?n.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=n?n.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,p=!!e.fallbackFormat,g=isFunction(e.missing)?e.missing:null,_=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,d=isFunction(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter;const C=n?n.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let L,N,h=e.pluralRules||n&&n.pluralRules;{isLegacyVueI18n(t);const e={locale:o.value,fallbackLocale:s.value,messages:l.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:C,missing:g,fallbackRoot:f,postTranslation:d,pluralizationRules:h,escapeParameterHtml:b,sync:a,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(p)?!p:p,warnHtmlInMessage:isBoolean(E)&&E?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};L=new t(e)}N=(()=>{r&&setFallbackContext(null);const t={version:VERSION,locale:o.value,fallbackLocale:s.value,messages:l.value,modifiers:C,pluralRules:h,missing:null===_?void 0:_,missingWarn:u,fallbackWarn:m,fallbackFormat:p,unresolving:!0,postTranslation:null===d?void 0:d,warnHtmlMessage:E,escapeParameter:b,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(N)?N.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(N)?N.__numberFormatters:void 0;const n=createCoreContext(t);return r&&setFallbackContext(n),n})(),updateFallbackLocale(N,o.value,s.value);const v=computed({get:()=>o.value,set:e=>{o.value=e,L&&!r&&(L.locale=e),N.locale=o.value}}),T=computed({get:()=>s.value,set:e=>{s.value=e,L&&!r&&(L.fallbackLocale=e),N.fallbackLocale=s.value,updateFallbackLocale(N,o.value,e)}}),O=computed((()=>l.value)),y=computed((()=>i.value)),S=computed((()=>c.value));const I=(e,t,a,u,m,p)=>{let g;o.value,s.value,l.value,i.value,c.value;try{0,r||(N.fallbackContext=n?getFallbackContext():void 0),g=e(N)}finally{r||(N.fallbackContext=void 0)}if(isNumber(g)&&g===NOT_REOSLVED){const[e,r]=t();return n&&f?u(n):m(e)}if(p(g))return g;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function k(...e){return I((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const A={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function F(e){return l.value[e]||{}}composerID++,n&&inBrowser&&(watch(n.locale,(e=>{a&&(o.value=e,L&&!r&&(L.locale=e),N.locale=e,updateFallbackLocale(N,o.value,s.value))})),watch(n.fallbackLocale,(e=>{a&&(s.value=e,L&&!r&&(L.fallbackLocale=e),N.fallbackLocale=e,updateFallbackLocale(N,o.value,s.value))})));const P={id:composerID,locale:v,fallbackLocale:T,get inheritLocale(){return a},set inheritLocale(e){a=e,L&&(L._sync=e),e&&n&&(o.value=n.locale.value,s.value=n.fallbackLocale.value,L&&(L.locale=n.locale.value,L.fallbackLocale=n.fallbackLocale.value),updateFallbackLocale(N,o.value,s.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:O,get modifiers(){return C},get pluralRules(){return h||{}},get isGlobal(){return r},get missingWarn(){return u},set missingWarn(e){u=e,N.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,N.fallbackWarn=m},get fallbackRoot(){return f},set fallbackRoot(e){f=e},get fallbackFormat(){return p},set fallbackFormat(e){p=e,N.fallbackFormat=p},get warnHtmlMessage(){return E},set warnHtmlMessage(e){E=e,N.warnHtmlMessage=e},get escapeParameter(){return b},set escapeParameter(e){b=e,N.escapeParameter=e},t:k,getLocaleMessage:F,setLocaleMessage:function(e,t){l.value[e]=t,L&&L.setLocaleMessage(e,t),N.messages=l.value},mergeLocaleMessage:function(e,t){l.value[e]=l.value[e]||{},L&&L.mergeLocaleMessage(e,t),deepCopy(t,l.value[e]),N.messages=l.value},getPostTranslationHandler:function(){return isFunction(d)?d:null},setPostTranslationHandler:function(e){d=e,N.postTranslation=e},getMissingHandler:function(){return g},setMissingHandler:function(e){null!==e&&(_=defineCoreMissingHandler(e)),g=e,N.missing=_},[SetPluralRulesSymbol]:function(e){h=e,N.pluralRules=h}};return P.datetimeFormats=y,P.numberFormats=S,P.rt=function(...e){const[t,n,r]=e;if(r&&!isObject(r))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return k(t,n,assign({resolvedMessage:!0},r||{}))},P.te=function(e,t){const n=F(isString(t)?t:o.value);return null!==N.messageResolver(n,e)},P.tm=function(e){const t=function(e){let t=null;const n=fallbackWithLocaleChain(N,s.value,o.value);for(let r=0;r<n.length;r++){const a=l.value[n[r]]||{},o=N.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:n&&n.tm(e)||{}},P.d=function(...e){return I((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},P.n=function(...e){return I((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},P.getDateTimeFormat=function(e){return i.value[e]||{}},P.setDateTimeFormat=function(e,t){i.value[e]=t,L&&L.setDateTimeFormat(e,t),N.datetimeFormats=i.value,clearDateTimeFormat(N,e,t)},P.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),L&&L.mergeDateTimeFormat(e,t),N.datetimeFormats=i.value,clearDateTimeFormat(N,e,t)},P.getNumberFormat=function(e){return c.value[e]||{}},P.setNumberFormat=function(e,t){c.value[e]=t,L&&L.setNumberFormat(e,t),N.numberFormats=c.value,clearNumberFormat(N,e,t)},P.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),L&&L.mergeNumberFormat(e,t),N.numberFormats=c.value,clearNumberFormat(N,e,t)},P[InejctWithOption]=e.__injectWithOption,P[TranslateVNodeSymbol]=function(...e){return I((t=>{let n;const r=t;try{r.processor=A,n=Reflect.apply(translate,null,[r,...e])}finally{r.processor=null}return n}),(()=>parseTranslateArgs(...e)),"translate",(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},P[DatetimePartsSymbol]=function(...e){return I((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},P[NumberPartsSymbol]=function(...e){return I((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},P[LegacyInstanceSymbol]=L,P}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:n,attrs:r}=t,a=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=isString(e.plural)?+e.plural:e.plural);const l=getInterpolateArg(t,o),i=a[TranslateVNodeSymbol](e.keypath,l,s),c=assign({},r),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,n,r){const{slots:a,attrs:o}=t;return()=>{const t={part:!0};let s={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),s=Object.keys(e.format).reduce(((t,r)=>n.includes(r)?assign({},t,{[r]:e.format[r]}):t),{}));const l=r(e.value,t,s);let i=[t.key];isArray(l)?i=l.map(((e,t)=>{const n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:l}):[e.value];return isVNode(r)&&(r[0].key=`${e.type}-${t}`),r})):isString(l)&&(i=[l]);const c=assign({},o),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>n[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>n[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const n=isPlainObject(t[0])?t[0]:{};(!isBoolean(n.globalInstall)||n.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(r){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),n.i18n.messages=e}catch(r){}const{sharedMessages:a}=n.i18n;a&&isPlainObject(a)&&deepCopy(a,n.i18n.messages),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||isPlainObject(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const n=!isBoolean(e.legacy)||e.legacy,r=!isBoolean(e.globalInjection)||e.globalInjection,a=!n||!!e.allowComposition,o=new Map,[s,l]=createGlobal(e,n,t);{const e=l[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>a}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...o)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(a,...o),!n&&r&&(t=injectGlobalFieldsForBridge(a,e,l)),a.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const i={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSTALLED);const n=getI18nInstance(t),r=getGlobalComposer(n),a=getComponentOptions(t),o=getScope(e,a);if("legacy"===n.mode&&!e.__useComponent){if(!n.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,o,r,e)}if("global"===o)return adjustI18nResources(r,e,a),r;if("parent"===o){let a=getComposer(n,t,e.__useComponent);return null==a&&(a=r),a}const s=n;let l=s.__getInstance(t);if(null==l){const n=assign({},e);"__i18n"in a&&(n.__i18n=a.__i18n),r&&(n.__root=r),l=createComposer(n,_legacyVueI18n),s.__composerExtend&&s.__composerExtend(l),setupLifeCycle(s,t,l),s.__setInstance(t,l)}return l}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,n){const r=effectScope();{if(!isLegacyVueI18n(n))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=r.run((()=>createComposer(e,n)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[r,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(I18nErrorCodes.NOT_INSTALLED);return n}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,n=!1){let r=null;const a=t.root;let o=getParentComponentInstance(t,n);for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[InejctWithOption]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}function getParentComponentInstance(e,t=!1){return null==e?null:e.parent}function setupLifeCycle(e,t,n){{const r=t.proxy;if(null==r)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=n[LegacyInstanceSymbol];if(a===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);r._i18n=a,r._i18n_bridge=!0,inBrowser&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let o=!1;onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0})),onUnmounted((()=>{o&&(r._i18n.unsubscribeDataChanging(r),o=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}))}}function useI18nForLegacy(e,t,n,r={}){const a="local"===t,o=shallowRef(null);if(a&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=isBoolean(r.inheritLocale)?r.inheritLocale:!isString(r.locale),l=ref(!a||s?n.locale.value:isString(r.locale)?r.locale:DEFAULT_LOCALE),i=ref(!a||s?n.fallbackLocale.value:isString(r.fallbackLocale)||isArray(r.fallbackLocale)||isPlainObject(r.fallbackLocale)||!1===r.fallbackLocale?r.fallbackLocale:l.value),c=ref(getLocaleMessages(l.value,r)),u=ref(isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),m=ref(isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),f=a?n.missingWarn:!isBoolean(r.missingWarn)&&!isRegExp(r.missingWarn)||r.missingWarn,p=a?n.fallbackWarn:!isBoolean(r.fallbackWarn)&&!isRegExp(r.fallbackWarn)||r.fallbackWarn,g=a?n.fallbackRoot:!isBoolean(r.fallbackRoot)||r.fallbackRoot,_=!!r.fallbackFormat,d=isFunction(r.missing)?r.missing:null,E=isFunction(r.postTranslation)?r.postTranslation:null,b=a?n.warnHtmlMessage:!isBoolean(r.warnHtmlMessage)||r.warnHtmlMessage,C=!!r.escapeParameter,L=a?n.modifiers:isPlainObject(r.modifiers)?r.modifiers:{},N=r.pluralRules||a&&n.pluralRules;function h(e){return l.value,i.value,c.value,u.value,m.value,e()}const v={get id(){return o.value?o.value.id:-1},locale:computed({get:()=>o.value?o.value.locale.value:l.value,set:e=>{o.value&&(o.value.locale.value=e),l.value=e}}),fallbackLocale:computed({get:()=>o.value?o.value.fallbackLocale.value:i.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>o.value?o.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(c.value)},get modifiers(){return o.value?o.value.modifiers:L},get pluralRules(){return o.value?o.value.pluralRules:N},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:f},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:g},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:_},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:b},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:C},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:function(...e){return o.value?h((()=>Reflect.apply(o.value.t,null,[...e]))):h((()=>""))},getPostTranslationHandler:function(){return o.value?o.value.getPostTranslationHandler():E},setPostTranslationHandler:function(e){o.value&&o.value.setPostTranslationHandler(e)},getMissingHandler:function(){return o.value?o.value.getMissingHandler():d},setMissingHandler:function(e){o.value&&o.value.setMissingHandler(e)},rt:function(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""},d:function(...e){return o.value?h((()=>Reflect.apply(o.value.d,null,[...e]))):h((()=>""))},n:function(...e){return o.value?h((()=>Reflect.apply(o.value.n,null,[...e]))):h((()=>""))},tm:function(e){return o.value?o.value.tm(e):{}},te:function(e,t){return!!o.value&&o.value.te(e,t)},getLocaleMessage:function(e){return o.value?o.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){o.value&&(o.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){o.value&&o.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return o.value?o.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){o.value&&(o.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return o.value?o.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){o.value&&(o.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){o.value&&o.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const n=o.value=e.proxy.$i18n.__composer;"global"===t?(l.value=n.locale.value,i.value=n.fallbackLocale.value,c.value=n.messages.value,u.value=n.datetimeFormats.value,m.value=n.numberFormats.value):a&&function(e){e.locale.value=l.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=C,e.fallbackFormat=_,e.fallbackRoot=g,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=b}(n)})),v}function injectGlobalFieldsForBridge(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}registerMessageCompiler(compileToFunction),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.24 | ||
* vue-i18n-bridge v9.3.0-beta.25 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const n="undefined"!=typeof window,r=(e,t=!1)=>t?Symbol.for(e):Symbol(e),a=(e,t,n)=>o({l:e,k:t,s:n}),o=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),l=e=>"number"==typeof e&&isFinite(e),s=e=>"[object Date]"===L(e),c=e=>"[object RegExp]"===L(e),i=e=>k(e)&&0===Object.keys(e).length;function u(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const f=Object.assign;function m(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const _=Object.prototype.hasOwnProperty;function p(e,t){return _.call(e,t)}const d=Array.isArray,g=e=>"function"==typeof e,v=e=>"string"==typeof e,E=e=>"boolean"==typeof e,b=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,L=e=>h.call(e),k=e=>{if(!b(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function N(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function T(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const y={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function I(e){throw e}const C=" ",O="\r",A="\n",P=String.fromCharCode(8232),S=String.fromCharCode(8233);function D(e){const t=e;let n=0,r=1,a=1,o=0;const l=e=>t[e]===O&&t[e+1]===A,s=e=>t[e]===S,c=e=>t[e]===P,i=e=>l(e)||(e=>t[e]===A)(e)||s(e)||c(e),u=e=>l(e)||s(e)||c(e)?A:t[e];function f(){return o=0,i(n)&&(r++,a=0),l(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:f,peek:function(){return l(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)f();o=0}}}const R=void 0,F="'";function M(e,t={}){const n=!1!==t.location,r=D(e),a=()=>r.index(),o=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},l=o(),s=a(),c={currentType:14,offset:s,startLoc:l,endLoc:l,lastType:14,lastOffset:s,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=T(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const m=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(y.EXPECTED_TOKEN,o(),"")}function p(e){let t="";for(;e.currentPeek()===C||e.currentPeek()===A;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=p(e);return e.skipToPeek(),t}function g(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function v(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=function(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function E(e){p(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function b(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===C||r===A):o===C?(e.peek(),n(!0,C,a)):o!==A||(e.peek(),n(!0,A,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function h(e,t){const n=e.currentChar();return n===R?R:t(n)?(e.next(),n):null}function L(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function k(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function N(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function I(e){let t="",n="";for(;t=k(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!b(e))break;t+=n,e.next()}else if(n===C||n===A)if(b(e))t+=n,e.next();else{if(E(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return S(e,t,4);case"U":return S(e,t,6);default:return y.UNKNOWN_ESCAPE_SEQUENCE,o(),""}}function S(e,t,n){_(e,t);let r="";for(let a=0;a<n;a++){const t=N(e);if(!t){y.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function M(e){d(e);const t=_(e,"|");return d(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(y.NOT_ALLOW_NEST_PLACEHOLDER,o()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(y.EMPTY_PLACEHOLDER,o()),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(y.UNTERMINATED_CLOSING_BRACE,o()),n=W(e,t)||m(t),t.braceNest=0,n;default:let r=!0,a=!0,l=!0;if(E(e))return t.braceNest>0&&(y.UNTERMINATED_CLOSING_BRACE,o()),n=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return y.UNTERMINATED_CLOSING_BRACE,o(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===R&&(y.UNTERMINATED_CLOSING_BRACE,o()),n}(e)),d(e),n;if(a=v(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===R&&(y.UNTERMINATED_CLOSING_BRACE,o()),t}(e)),d(e),n;if(l=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=e.currentPeek()===F;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),_(e,"'");let t="",n="";const r=e=>e!==F&&e!==A;for(;t=h(e,r);)n+="\\"===t?P(e):t;const a=e.currentChar();return a===A||a===R?(y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),a===A&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!a&&!l)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==C&&e!==A;for(;t=h(e,r);)n+=t;return n}(e)),y.INVALID_TOKEN_IN_PLACEHOLDER,o(),n.value,d(e),n}return n}function W(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==A&&a!==C||(y.INVALID_LINKED_FORMAT,o()),a){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return E(e)?(r=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;p(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;p(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),W(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;p(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?g(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===C||!t)&&(t===A?(e.peek(),r()):g(t))},a=r();return e.resetPeek(),a}(e,t)?(d(e),"{"===a?w(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===C?r:a===A?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&(y.INVALID_LINKED_FORMAT,o()),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return w(e,t)||m(t);if(t.inLinked)return W(e,t)||m(t);switch(e.currentChar()){case"{":return w(e,t)||m(t);case"}":return y.UNBALANCED_CLOSING_BRACE,o(),e.next(),f(t,3,"}");case"@":return W(e,t)||m(t);default:if(E(e))return n=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=p(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?f(t,0,O(e)):f(t,4,function(e){d(e);const t=e.currentChar();return"%"!==t&&(y.EXPECTED_TOKEN,o()),e.next(),"%"}(e));if(b(e))return f(t,0,O(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:l}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=l,c.offset=a(),c.startLoc=o(),r.currentChar()===R?f(c,14):x(r,c)},currentOffset:a,currentPosition:o,context:i}}const w=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function W(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function x(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e};return t&&(a.start=n,a.end=n,a.loc={start:r,end:r}),a}function a(e,n,r,a){a&&(e.type=a),t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(5,o,l);return s.index=parseInt(t,10),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(4,o,l);return s.key=t,e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(9,o,l);return s.value=t.replace(w,W),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(8,o,l);return 12!==t.type?(y.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,s.value="",a(s,o,l),{nextConsumeToken:t,node:s}):(null==t.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,U(t)),s.value=t.value||"",a(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=s(e,o.value||"");break;case 6:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=l(e,o.value||"");break;case 7:null==o.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=c(e,o.value||"");break;default:y.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const i=e.context(),u=r(7,i.offset,i.startLoc);return u.value="",a(u,i.offset,i.startLoc),n.key=u,a(n,i.offset,i.startLoc),{nextConsumeToken:o,node:n}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(l(e,r.value||""));break;case 5:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(s(e,r.value||""));break;case 7:null==r.value&&(y.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(c(e,r.value||""));break;case 8:const a=i(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:o}=t,l=u(e);return 14===t.currentType?l:function(e,t,n,o){const l=e.context();let s=0===o.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(o);do{const t=u(e);s||(s=0===t.items.length),c.cases.push(t)}while(14!==l.currentType);return a(c,e.currentOffset(),e.currentPosition()),c}(e,n,o,l)}return{parse:function(n){const o=M(n,f({},e)),l=o.context(),s=r(0,l.offset,l.startLoc);return t&&s.loc&&(s.loc.source=n),s.body=m(o),e.onCacheKey&&(s.cacheKey=e.onCacheKey(n)),14!==l.currentType&&(y.UNEXPECTED_LEXICAL_ANALYSIS,l.lastStartLoc,n[l.offset]),a(s,o.currentOffset(),o.currentPosition()),s}}}function U(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function $(e,t){for(let n=0;n<e.length;n++)V(e[n],t)}function V(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:V(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function H(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&V(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function j(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=N(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function X(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?X(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(X(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let o=0;o<a&&(X(e,t.items[o]),o!==a-1);o++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),X(e,t.key),t.modifier?(e.push(", "),X(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const G=(e,t={})=>{const n=v(t.mode)?t.mode:"normal",r=v(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",l=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,l=!1!==t.location,s={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function i(e,t=!0){const n=t?a:"";c(o?n+" ".repeat(e):n)}return l&&e.loc&&(s.source=e.loc.source),{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&i(t)},newline:function(){i(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:l});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(l),s.length>0&&(c.push(`const { ${N(s.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),X(c,e),c.deindent(l),c.push("}"),delete e.helpers;const{code:i,map:u}=c.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function B(e,t={}){const n=f({},t),r=!!n.jit,a=null==n.optimize||n.optimize,o=x(n).parse(e);return r?(a&&function(e){const t=e.body;2===t.type?j(t):t.cases.forEach((e=>j(e)))}(o),{ast:o,code:""}):(H(o,n),G(o,n))}const Y=[];Y[0]={w:[0],i:[3,0],"[":[4],o:[7]},Y[1]={w:[1],".":[2],"[":[4],o:[7]},Y[2]={w:[2],i:[3,0],0:[3,0]},Y[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Y[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Y[5]={"'":[4,0],o:8,l:[5,0]},Y[6]={'"':[4,0],o:8,l:[6,0]};const K=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function z(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function J(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,K.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}const Q=new Map;function q(e,t){return b(e)?e[t]:null}const Z=e=>e,ee=e=>"",te="text",ne=e=>0===e.length?"":N(e),re=e=>null==e?"":d(e)||k(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function ae(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function oe(e={}){const t=e.locale,n=function(e){const t=l(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(l(e.named.count)||l(e.named.n))?l(e.named.count)?e.named.count:l(e.named.n)?e.named.n:t:t}(e),r=b(e.pluralRules)&&v(t)&&g(e.pluralRules[t])?e.pluralRules[t]:ae,a=b(e.pluralRules)&&v(t)&&g(e.pluralRules[t])?ae:void 0,o=e.list||[],s=e.named||{};l(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=g(e.messages)?e.messages(t):!!b(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):ee)}const i=k(e.processor)&&g(e.processor.normalize)?e.processor.normalize:ne,u=k(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:re,f={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",l="";1===n.length?b(r)?(l=r.modifier||l,o=r.type||o):v(r)&&(l=r||l):2===n.length&&(v(r)&&(l=r||l),v(a)&&(o=a||o));const s=c(t)(f),i="vnode"===o&&d(s)&&l?s[0]:s;return l?(u=l,e.modifiers?e.modifiers[u]:Z)(i,o):i;var u},message:c,type:k(e.processor)&&v(e.processor.type)?e.processor.type:te,interpolate:u,normalize:i};return f}function le(e,t,n){return[...new Set([n,...d(t)?t:b(t)?Object.keys(t):v(t)?[t]:[n]])]}function se(e,t,n){const r=v(n)?n:_e,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;d(e);)e=ce(o,e,t);const l=d(t)||!k(t)?t:t.default?t.default:null;e=v(l)?[l]:l,d(e)&&ce(o,e,!1),a.__localeChainCache.set(r,o)}return o}function ce(e,t,n){let r=!0;for(let a=0;a<t.length&&E(r);a++){const o=t[a];v(o)&&(r=ie(e,t[a],n))}return r}function ie(e,t,n){let r;const a=t.split("-");do{r=ue(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function ue(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(d(n)||k(n))&&n[a]&&(r=n[a])}return r}const fe="9.3.0-beta.24",me=-1,_e="en-US",pe="",de=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let ge,ve,Ee;let be=0;function he(e={}){const t=v(e.version)?e.version:fe,n=v(e.locale)?e.locale:_e,r=d(e.fallbackLocale)||k(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=k(e.messages)?e.messages:{[n]:{}},o=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=k(e.numberFormats)?e.numberFormats:{[n]:{}},s=f({},e.modifiers||{},{upper:(e,t)=>"text"===t&&v(e)?e.toUpperCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&v(e)?e.toLowerCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&v(e)?de(e):"vnode"===t&&b(e)&&"__v_isVNode"in e?de(e.children):e}),i=e.pluralRules||{},m=g(e.missing)?e.missing:null,_=!E(e.missingWarn)&&!c(e.missingWarn)||e.missingWarn,p=!E(e.fallbackWarn)&&!c(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,L=!!e.unresolving,N=g(e.postTranslation)?e.postTranslation:null,T=k(e.processor)?e.processor:null,y=!E(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,C=g(e.messageCompiler)?e.messageCompiler:ge,O=g(e.messageResolver)?e.messageResolver:ve||q,A=g(e.localeFallbacker)?e.localeFallbacker:Ee||le,P=b(e.fallbackContext)?e.fallbackContext:void 0,S=g(e.onWarn)?e.onWarn:u,D=e,R=b(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,F=b(D.__numberFormatters)?D.__numberFormatters:new Map,M=b(D.__meta)?D.__meta:{};be++;const w={version:t,cid:be,locale:n,fallbackLocale:r,messages:a,modifiers:s,pluralRules:i,missing:m,missingWarn:_,fallbackWarn:p,fallbackFormat:h,unresolving:L,postTranslation:N,processor:T,warnHtmlMessage:y,escapeParameter:I,messageCompiler:C,messageResolver:O,localeFallbacker:A,fallbackContext:P,onWarn:S,__meta:M};return w.datetimeFormats=o,w.numberFormats=l,w.__datetimeFormatters=R,w.__numberFormatters=F,w}function Le(e,t,n,r,a){const{missing:o,onWarn:l}=e;if(null!==o){const r=o(e,n,t,a);return v(r)?r:t}return t}function ke(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let Ne=y.__EXTEND_POINT__;const Te=()=>++Ne,ye={INVALID_ARGUMENT:Ne,INVALID_DATE_ARGUMENT:Te(),INVALID_ISO_DATE_ARGUMENT:Te(),NOT_SUPPORT_AST:Te(),__EXTEND_POINT__:Te()},Ie=e=>e;let Ce=Object.create(null);const Oe=()=>"",Ae=e=>g(e),Pe=e=>b(e)&&0===e.type&&"body"in e;function Se(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:c}=e,[i,u]=Fe(...t),f=E(u.missingWarn)?u.missingWarn:e.missingWarn,_=E(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,p=E(u.escapeParameter)?u.escapeParameter:e.escapeParameter,g=!!u.resolvedMessage,h=v(u.default)||E(u.default)?E(u.default)?o?i:()=>i:u.default:n?o?i:()=>i:"",L=n||""!==h,k=v(u.locale)?u.locale:e.locale;p&&function(e){d(e.list)?e.list=e.list.map((e=>v(e)?m(e):e)):b(e.named)&&Object.keys(e.named).forEach((t=>{v(e.named[t])&&(e.named[t]=m(e.named[t]))}))}(u);let[N,T,y]=g?[i,k,c[k]||{}]:De(e,i,k,s,_,f),I=N,C=i;if(g||v(I)||Pe(I)||Ae(I)||L&&(I=h,C=I),!(g||(v(I)||Pe(I)||Ae(I))&&v(T)))return a?me:i;let O=!1;const A=Ae(I)?I:Re(e,i,T,I,C,(()=>{O=!0}));if(O)return I;const P=function(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:c,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,m=r=>{let a=s(n,r);if(null==a&&f){const[,,e]=De(f,r,t,c,i,u);a=s(e,r)}if(v(a)||Pe(a)){let n=!1;const o=Re(e,r,t,a,r,(()=>{n=!0}));return n?Oe:o}return Ae(a)?a:Oe},_={locale:t,modifiers:a,pluralRules:o,messages:m};e.processor&&(_.processor=e.processor);r.list&&(_.list=r.list);r.named&&(_.named=r.named);l(r.plural)&&(_.pluralIndex=r.plural);return _}(e,T,y,u),S=function(e,t,n){const r=t(n);return r}(0,A,oe(P));return r?r(S,i):S}function De(e,t,n,r,a,o){const{messages:l,onWarn:s,messageResolver:c,localeFallbacker:i}=e,u=i(e,r,n);let f,m={},_=null;for(let p=0;p<u.length&&(f=u[p],m=l[f]||{},null===(_=c(m,t))&&(_=m[t]),!(v(_)||Pe(_)||Ae(_)));p++){const n=Le(e,t,f,0,"translate");n!==t&&(_=n)}return[_,f,m]}function Re(e,t,n,r,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(Ae(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,function(e,t,n,r,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>a(t,n,e)}}(0,n,o,0,c,l));return i.locale=n,i.key=t,i.source=r,i}function Fe(...e){const[t,n,r]=e,a={};if(!(v(t)||l(t)||Ae(t)||Pe(t)))throw Error(ye.INVALID_ARGUMENT);const o=l(t)?String(t):(Ae(t),t);return l(n)?a.plural=n:v(n)?a.default=n:k(n)&&!i(n)?a.named=n:d(n)&&(a.list=n),l(r)?a.plural=r:v(r)?a.default=r:k(r)&&f(a,r),[o,a]}function Me(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__datetimeFormatters:s}=e,[c,u,m,_]=We(...t);E(m.missingWarn)?m.missingWarn:e.missingWarn;E(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const p=!!m.part,d=v(m.locale)?m.locale:e.locale,g=l(e,a,d);if(!v(c)||""===c)return new Intl.DateTimeFormat(d,_).format(u);let b,h={},L=null;for(let i=0;i<g.length&&(b=g[i],h=n[b]||{},L=h[c],!k(L));i++)Le(e,c,b,0,"datetime format");if(!k(L)||!v(b))return r?me:c;let N=`${b}__${c}`;i(_)||(N=`${N}__${JSON.stringify(_)}`);let T=s.get(N);return T||(T=new Intl.DateTimeFormat(b,f({},L,_)),s.set(N,T)),p?T.formatToParts(u):T.format(u)}const we=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function We(...e){const[t,n,r,a]=e,o={};let c,i={};if(v(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(ye.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();c=new Date(n);try{c.toISOString()}catch(u){throw Error(ye.INVALID_ISO_DATE_ARGUMENT)}}else if(s(t)){if(isNaN(t.getTime()))throw Error(ye.INVALID_DATE_ARGUMENT);c=t}else{if(!l(t))throw Error(ye.INVALID_ARGUMENT);c=t}return v(n)?o.key=n:k(n)&&Object.keys(n).forEach((e=>{we.includes(e)?i[e]=n[e]:o[e]=n[e]})),v(r)?o.locale=r:k(r)&&(i=r),k(a)&&(i=a),[o.key||"",c,o,i]}function xe(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function Ue(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__numberFormatters:s}=e,[c,u,m,_]=Ve(...t);E(m.missingWarn)?m.missingWarn:e.missingWarn;E(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const p=!!m.part,d=v(m.locale)?m.locale:e.locale,g=l(e,a,d);if(!v(c)||""===c)return new Intl.NumberFormat(d,_).format(u);let b,h={},L=null;for(let i=0;i<g.length&&(b=g[i],h=n[b]||{},L=h[c],!k(L));i++)Le(e,c,b,0,"number format");if(!k(L)||!v(b))return r?me:c;let N=`${b}__${c}`;i(_)||(N=`${N}__${JSON.stringify(_)}`);let T=s.get(N);return T||(T=new Intl.NumberFormat(b,f({},L,_)),s.set(N,T)),p?T.formatToParts(u):T.format(u)}const $e=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ve(...e){const[t,n,r,a]=e,o={};let s={};if(!l(t))throw Error(ye.INVALID_ARGUMENT);const c=t;return v(n)?o.key=n:k(n)&&Object.keys(n).forEach((e=>{$e.includes(e)?s[e]=n[e]:o[e]=n[e]})),v(r)?o.locale=r:k(r)&&(s=r),k(a)&&(s=a),[o.key||"",c,o,s]}function He(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}const je="9.3.0-beta.24";let Xe=y.__EXTEND_POINT__;const Ge=()=>++Xe,Be={UNEXPECTED_RETURN_TYPE:Xe,INVALID_ARGUMENT:Ge(),MUST_BE_CALL_SETUP_TOP:Ge(),NOT_INSTALLED:Ge(),NOT_AVAILABLE_IN_LEGACY_MODE:Ge(),REQUIRED_VALUE:Ge(),INVALID_VALUE:Ge(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Ge(),NOT_INSTALLED_WITH_PROVIDE:Ge(),UNEXPECTED_ERROR:Ge(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Ge(),BRIDGE_SUPPORT_VUE_2_ONLY:Ge(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Ge(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Ge(),__EXTEND_POINT__:Ge()},Ye=r("__translateVNode"),Ke=r("__datetimeParts"),ze=r("__numberParts"),Je=r("__setPluralRules"),Qe=r("__legacyVueI18n"),qe=r("__injectWithOption"),Ze="__VUE_I18N_BRIDGE__";function et(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function tt(e){if(!b(e))return e;for(const t in e)if(p(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e,o=!1;for(let e=0;e<r;e++){if(n[e]in a||(a[n[e]]={}),!b(a[n[e]])){o=!0;break}a=a[n[e]]}o||(a[n[r]]=e[t],delete e[t]),b(a[n[r]])&&tt(a[n[r]])}else b(e[t])&&tt(e[t]);return e}function nt(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,l=k(n)?n:d(r)?{}:{[e]:{}};if(d(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(l[t]=l[t]||{},at(n,l[t])):at(n,l)}else v(e)&&at(JSON.parse(e),l)})),null==a&&o)for(const s in l)p(l,s)&&tt(l[s]);return l}const rt=e=>!b(e)||d(e);function at(e,t){if(rt(e)||rt(t))throw Error(Be.INVALID_VALUE);for(const n in e)p(e,n)&&(rt(e[n])||rt(t[n])?t[n]=e[n]:at(e[n],t[n]))}function ot(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let lt=0;function st(e){return(n,r,a,o)=>e(r,a,t.getCurrentInstance()||void 0,o)}function ct(e={},r){const{__root:a}=e,o=void 0===a;let s=!E(e.inheritLocale)||e.inheritLocale;const i=t.ref(a&&s?a.locale.value:v(e.locale)?e.locale:_e),u=t.ref(a&&s?a.fallbackLocale.value:v(e.fallbackLocale)||d(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:i.value),m=t.ref(nt(i.value,e)),_=t.ref(k(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),p=t.ref(k(e.numberFormats)?e.numberFormats:{[i.value]:{}});let h=a?a.missingWarn:!E(e.missingWarn)&&!c(e.missingWarn)||e.missingWarn,L=a?a.fallbackWarn:!E(e.fallbackWarn)&&!c(e.fallbackWarn)||e.fallbackWarn,N=a?a.fallbackRoot:!E(e.fallbackRoot)||e.fallbackRoot,T=!!e.fallbackFormat,y=g(e.missing)?e.missing:null,I=g(e.missing)?st(e.missing):null,C=g(e.postTranslation)?e.postTranslation:null,O=a?a.warnHtmlMessage:!E(e.warnHtmlMessage)||e.warnHtmlMessage,A=!!e.escapeParameter;const P=a?a.modifiers:k(e.modifiers)?e.modifiers:{};let S,D,R=e.pluralRules||a&&a.pluralRules;{et(r);const e={locale:i.value,fallbackLocale:u.value,messages:m.value,dateTimeFormats:_.value,numberFormats:p.value,modifiers:P,missing:y,fallbackRoot:N,postTranslation:C,pluralizationRules:R,escapeParameterHtml:A,sync:s,silentFallbackWarn:E(L)?!L:L,silentTranslationWarn:E(h)?!h:h,formatFallbackMessages:E(T)?!T:T,warnHtmlInMessage:E(O)&&O?"warn":"off",__VUE_I18N_BRIDGE__:Ze};S=new r(e)}D=(()=>{const t={version:je,locale:i.value,fallbackLocale:u.value,messages:m.value,modifiers:P,pluralRules:R,missing:null===I?void 0:I,missingWarn:h,fallbackWarn:L,fallbackFormat:T,unresolving:!0,postTranslation:null===C?void 0:C,warnHtmlMessage:O,escapeParameter:A,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=_.value,t.numberFormats=p.value,t.__datetimeFormatters=k(D)?D.__datetimeFormatters:void 0,t.__numberFormatters=k(D)?D.__numberFormatters:void 0;return he(t)})(),ke(D,i.value,u.value);const F=t.computed({get:()=>i.value,set:e=>{i.value=e,S&&!o&&(S.locale=e),D.locale=i.value}}),M=t.computed({get:()=>u.value,set:e=>{u.value=e,S&&!o&&(S.fallbackLocale=e),D.fallbackLocale=u.value,ke(D,i.value,e)}}),w=t.computed((()=>m.value)),W=t.computed((()=>_.value)),x=t.computed((()=>p.value));const U=(e,t,n,r,o,s)=>{let c;if(i.value,u.value,m.value,_.value,p.value,c=e(D),l(c)&&c===me){const[e,n]=t();return a&&N?r(a):o(e)}if(s(c))return c;throw Error(Be.UNEXPECTED_RETURN_TYPE)};function $(...e){return U((t=>Reflect.apply(Se,null,[t,...e])),(()=>Fe(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>v(e)))}const V={normalize:function(e){return e.map((e=>v(e)||l(e)||E(e)?ot(String(e)):e))},interpolate:e=>e,type:"vnode"};function H(e){return m.value[e]||{}}lt++,a&&n&&(t.watch(a.locale,(e=>{s&&(i.value=e,S&&!o&&(S.locale=e),D.locale=e,ke(D,i.value,u.value))})),t.watch(a.fallbackLocale,(e=>{s&&(u.value=e,S&&!o&&(S.fallbackLocale=e),D.fallbackLocale=e,ke(D,i.value,u.value))})));const j={id:lt,locale:F,fallbackLocale:M,get inheritLocale(){return s},set inheritLocale(e){s=e,S&&(S._sync=e),e&&a&&(i.value=a.locale.value,u.value=a.fallbackLocale.value,S&&(S.locale=a.locale.value,S.fallbackLocale=a.fallbackLocale.value),ke(D,i.value,u.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:w,get modifiers(){return P},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(e){h=e,D.missingWarn=h},get fallbackWarn(){return L},set fallbackWarn(e){L=e,D.fallbackWarn=L},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return T},set fallbackFormat(e){T=e,D.fallbackFormat=T},get warnHtmlMessage(){return O},set warnHtmlMessage(e){O=e,D.warnHtmlMessage=e},get escapeParameter(){return A},set escapeParameter(e){A=e,D.escapeParameter=e},t:$,getLocaleMessage:H,setLocaleMessage:function(e,t){m.value[e]=t,S&&S.setLocaleMessage(e,t),D.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},S&&S.mergeLocaleMessage(e,t),at(t,m.value[e]),D.messages=m.value},getPostTranslationHandler:function(){return g(C)?C:null},setPostTranslationHandler:function(e){C=e,D.postTranslation=e},getMissingHandler:function(){return y},setMissingHandler:function(e){null!==e&&(I=st(e)),y=e,D.missing=I},[Je]:function(e){R=e,D.pluralRules=R}};return j.datetimeFormats=W,j.numberFormats=x,j.rt=function(...e){const[t,n,r]=e;if(r&&!b(r))throw Error(Be.INVALID_ARGUMENT);return $(t,n,f({resolvedMessage:!0},r||{}))},j.te=function(e,t){const n=H(v(t)?t:i.value);return null!==D.messageResolver(n,e)},j.tm=function(e){const t=function(e){let t=null;const n=se(D,u.value,i.value);for(let r=0;r<n.length;r++){const a=m.value[n[r]]||{},o=D.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},j.d=function(...e){return U((t=>Reflect.apply(Me,null,[t,...e])),(()=>We(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>pe),(e=>v(e)))},j.n=function(...e){return U((t=>Reflect.apply(Ue,null,[t,...e])),(()=>Ve(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>pe),(e=>v(e)))},j.getDateTimeFormat=function(e){return _.value[e]||{}},j.setDateTimeFormat=function(e,t){_.value[e]=t,S&&S.setDateTimeFormat(e,t),D.datetimeFormats=_.value,xe(D,e,t)},j.mergeDateTimeFormat=function(e,t){_.value[e]=f(_.value[e]||{},t),S&&S.mergeDateTimeFormat(e,t),D.datetimeFormats=_.value,xe(D,e,t)},j.getNumberFormat=function(e){return p.value[e]||{}},j.setNumberFormat=function(e,t){p.value[e]=t,S&&S.setNumberFormat(e,t),D.numberFormats=p.value,He(D,e,t)},j.mergeNumberFormat=function(e,t){p.value[e]=f(p.value[e]||{},t),S&&S.mergeNumberFormat(e,t),D.numberFormats=p.value,He(D,e,t)},j[qe]=e.__injectWithOption,j[Ye]=function(...e){return U((t=>{let n;const r=t;try{r.processor=V,n=Reflect.apply(Se,null,[r,...e])}finally{r.processor=null}return n}),(()=>Fe(...e)),"translate",(t=>t[Ye](...e)),(e=>[ot(e)]),(e=>d(e)))},j[Ke]=function(...e){return U((t=>Reflect.apply(Me,null,[t,...e])),(()=>We(...e)),"datetime format",(t=>t[Ke](...e)),(()=>[]),(e=>v(e)||d(e)))},j[ze]=function(...e){return U((t=>Reflect.apply(Ue,null,[t,...e])),(()=>Ve(...e)),"number format",(t=>t[ze](...e)),(()=>[]),(e=>v(e)||d(e)))},j[Qe]=S,j}const it={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const ut=t.defineComponent({name:"i18n-t",props:f({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>l(e)||!isNaN(e)}},it),setup(e,n){const{slots:r,attrs:a}=n,o=e.i18n||bt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(r).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=v(e.plural)?+e.plural:e.plural);const c=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}(n,l),i=o[Ye](e.keypath,c,s),u=f({},a),m=v(e.tag)||b(e.tag)?e.tag:"span";return t.h(m,u,i)}}}),ft=ut;function mt(e,n,r,a){const{slots:o,attrs:l}=n;return()=>{const n={part:!0};let s={};e.locale&&(n.locale=e.locale),v(e.format)?n.key=e.format:b(e.format)&&(v(e.format.key)&&(n.key=e.format.key),s=Object.keys(e.format).reduce(((t,n)=>r.includes(n)?f({},t,{[n]:e.format[n]}):t),{}));const c=a(e.value,n,s);let i=[n.key];d(c)?i=c.map(((e,t)=>{const n=o[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];var a;return d(a=r)&&!v(a[0])&&(r[0].key=`${e.type}-${t}`),r})):v(c)&&(i=[c]);const u=f({},l),m=v(e.tag)||b(e.tag)?e.tag:"span";return t.h(m,u,i)}}const _t=t.defineComponent({name:"i18n-n",props:f({value:{type:Number,required:!0},format:{type:[String,Object]}},it),setup(e,t){const n=e.i18n||bt({useScope:"parent",__useComponent:!0});return mt(e,t,$e,((...e)=>n[ze](...e)))}}),pt=_t,dt=t.defineComponent({name:"i18n-d",props:f({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},it),setup(e,t){const n=e.i18n||bt({useScope:"parent",__useComponent:!0});return mt(e,t,we,((...e)=>n[Ke](...e)))}}),gt=dt;let vt=null;const Et=r("global-vue-i18n");function bt(e={}){const r=t.getCurrentInstance();if(null==r)throw Error(Be.MUST_BE_CALL_SETUP_TOP);if(null==vt)throw Error(Be.NOT_INSTALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(Be.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Be.NOT_INSTALLED);return n}}(r),o=function(e){return e.global}(a),l=function(e){return e.proxy.$options}(r),s=function(e,t){return i(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(Be.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,n,r,a={}){const o="local"===n,l=t.shallowRef(null);if(o&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(Be.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=E(a.inheritLocale)?a.inheritLocale:!v(a.locale),i=t.ref(!o||s?r.locale.value:v(a.locale)?a.locale:_e),u=t.ref(!o||s?r.fallbackLocale.value:v(a.fallbackLocale)||d(a.fallbackLocale)||k(a.fallbackLocale)||!1===a.fallbackLocale?a.fallbackLocale:i.value),f=t.ref(nt(i.value,a)),m=t.ref(k(a.datetimeFormats)?a.datetimeFormats:{[i.value]:{}}),_=t.ref(k(a.numberFormats)?a.numberFormats:{[i.value]:{}}),p=o?r.missingWarn:!E(a.missingWarn)&&!c(a.missingWarn)||a.missingWarn,b=o?r.fallbackWarn:!E(a.fallbackWarn)&&!c(a.fallbackWarn)||a.fallbackWarn,h=o?r.fallbackRoot:!E(a.fallbackRoot)||a.fallbackRoot,L=!!a.fallbackFormat,N=g(a.missing)?a.missing:null,T=g(a.postTranslation)?a.postTranslation:null,y=o?r.warnHtmlMessage:!E(a.warnHtmlMessage)||a.warnHtmlMessage,I=!!a.escapeParameter,C=o?r.modifiers:k(a.modifiers)?a.modifiers:{},O=a.pluralRules||o&&r.pluralRules;function A(){return[i.value,u.value,f.value,m.value,_.value]}const P=t.computed({get:()=>l.value?l.value.locale.value:i.value,set:e=>{l.value&&(l.value.locale.value=e),i.value=e}}),S=t.computed({get:()=>l.value?l.value.fallbackLocale.value:u.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),u.value=e}}),D=t.computed((()=>l.value?l.value.messages.value:f.value)),R=t.computed((()=>m.value)),F=t.computed((()=>_.value));function M(){return l.value?l.value.getPostTranslationHandler():T}function w(e){l.value&&l.value.setPostTranslationHandler(e)}function W(){return l.value?l.value.getMissingHandler():N}function x(e){l.value&&l.value.setMissingHandler(e)}function U(e){return A(),e()}function $(...e){return l.value?U((()=>Reflect.apply(l.value.t,null,[...e]))):U((()=>""))}function V(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""}function H(...e){return l.value?U((()=>Reflect.apply(l.value.d,null,[...e]))):U((()=>""))}function j(...e){return l.value?U((()=>Reflect.apply(l.value.n,null,[...e]))):U((()=>""))}function X(e){return l.value?l.value.tm(e):{}}function G(e,t){return!!l.value&&l.value.te(e,t)}function B(e){return l.value?l.value.getLocaleMessage(e):{}}function Y(e,t){l.value&&(l.value.setLocaleMessage(e,t),f.value[e]=t)}function K(e,t){l.value&&l.value.mergeLocaleMessage(e,t)}function z(e){return l.value?l.value.getDateTimeFormat(e):{}}function J(e,t){l.value&&(l.value.setDateTimeFormat(e,t),m.value[e]=t)}function Q(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)}function q(e){return l.value?l.value.getNumberFormat(e):{}}function Z(e,t){l.value&&(l.value.setNumberFormat(e,t),_.value[e]=t)}function ee(e,t){l.value&&l.value.mergeNumberFormat(e,t)}const te={get id(){return l.value?l.value.id:-1},locale:P,fallbackLocale:S,messages:D,datetimeFormats:R,numberFormats:F,get inheritLocale(){return l.value?l.value.inheritLocale:s},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(f.value)},get modifiers(){return l.value?l.value.modifiers:C},get pluralRules(){return l.value?l.value.pluralRules:O},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:p},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:b},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:h},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:L},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:y},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:I},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:$,getPostTranslationHandler:M,setPostTranslationHandler:w,getMissingHandler:W,setMissingHandler:x,rt:V,d:H,n:j,tm:X,te:G,getLocaleMessage:B,setLocaleMessage:Y,mergeLocaleMessage:K,getDateTimeFormat:z,setDateTimeFormat:J,mergeDateTimeFormat:Q,getNumberFormat:q,setNumberFormat:Z,mergeNumberFormat:ee};function ne(e){e.locale.value=i.value,e.fallbackLocale.value=u.value,Object.keys(f.value).forEach((t=>{e.mergeLocaleMessage(t,f.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeDateTimeFormat(t,m.value[t])})),Object.keys(_.value).forEach((t=>{e.mergeNumberFormat(t,_.value[t])})),e.escapeParameter=I,e.fallbackFormat=L,e.fallbackRoot=h,e.fallbackWarn=b,e.missingWarn=p,e.warnHtmlMessage=y}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(Be.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=l.value=e.proxy.$i18n.__composer;"global"===n?(i.value=t.locale.value,u.value=t.fallbackLocale.value,f.value=t.messages.value,m.value=t.datetimeFormats.value,_.value=t.numberFormats.value):o&&ne(t)})),te}(r,s,o,e)}if("global"===s)return function(e,t,n){let r=b(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=nt(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),b(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(b(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,l),o;if("parent"===s){let t=function(e,t,n=!1){let r=null;const a=t.root;let o=function(e,t=!1){if(null==e)return null;return e.parent}(t,n);for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[qe]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}(a,r,e.__useComponent);return null==t&&(t=o),t}const u=a;let m=u.__getInstance(r);if(null==m){const a=f({},e);"__i18n"in l&&(a.__i18n=l.__i18n),o&&(a.__root=o),m=ct(a,vt),u.__composerExtend&&u.__composerExtend(m),function(e,r,a){{const o=r.proxy;if(null==o)throw Error(Be.UNEXPECTED_ERROR);const l=a[Qe];if(l===e)throw Error(Be.UNEXPECTED_ERROR);o._i18n=l,o._i18n_bridge=!0,n&&(o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0})),t.onUnmounted((()=>{s&&(o._i18n.unsubscribeDataChanging(o),s=!1),o._i18nWatcher&&(o._i18nWatcher(),o._i18n.destroyVM(),delete o._i18nWatcher),o._localeWatcher&&(o._localeWatcher(),delete o._localeWatcher),delete o._i18n_bridge,delete o._i18n}))}}(u,r,m),u.__setInstance(r,m)}return m}var ht;return ht=function(e,t={}){if(!v(e))throw Error(ye.NOT_SUPPORT_AST);{!E(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Ie)(e),r=Ce[n];if(r)return r;const{code:a,detectError:o}=function(e,t={}){let n=!1;const r=t.onError||I;return t.onError=e=>{n=!0,r(e)},{...B(e,t),detectError:n}}(e,t),l=new Function(`return ${a}`)();return o?l:Ce[n]=l}},ge=ht,ve=function(e,t){if(!b(e))return null;let n=Q.get(t);if(n||(n=function(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,f=0;const m=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,a="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=a:r+=a},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=J(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(o=z(n),c=Y[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=m[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}(t),n&&Q.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a},Ee=se,e.DatetimeFormat=dt,e.I18nD=gt,e.I18nInjectionKey=Et,e.I18nN=pt,e.I18nT=ft,e.NumberFormat=_t,e.Translation=ut,e.VERSION=je,e.castToVueI18n=e=>{if(!(Ze in e))throw Error(Be.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},n){vt=n;const r=!E(e.legacy)||e.legacy,a=!E(e.globalInjection)||e.globalInjection,o=!r||!!e.allowComposition,l=new Map,[s,c]=function(e,n,r){const a=t.effectScope();{if(!et(r))throw Error(Be.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=a.run((()=>ct(e,r)));if(null==t)throw Error(Be.UNEXPECTED_ERROR);return[a,t]}}(e,0,n);{const e=c[Qe];let t=null;Object.defineProperty(e,"global",{get:()=>c}),Object.defineProperty(e,"mode",{get:()=>r?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>o}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(n,...o)=>{if(2!==(n&&n.version&&Number(n.version.split(".")[0])||-1))throw Error(Be.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const n=k(t[0])?t[0]:{};(!E(n.globalInstall)||n.globalInstall)&&(e.component(ut.name,ut),e.component(_t.name,_t),e.component(dt.name,dt))}(n,...o),!r&&a&&(t=function(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}(n,e,c)),n.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>at(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(r){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(k(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>at(JSON.parse(t),e))),n.i18n.messages=e}catch(r){}const{sharedMessages:a}=n.i18n;a&&k(a)&&at(a,n.i18n.messages),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||k(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,vt))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const n={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(n).forEach((t=>Object.defineProperty(e,t,{value:n[t]}))),e}},e.useI18n=bt,e}({},VueDemi); | ||
var VueI18nBridge=function(e,t){"use strict";const n="undefined"!=typeof window,r=(e,t=!1)=>t?Symbol.for(e):Symbol(e),a=(e,t,n)=>o({l:e,k:t,s:n}),o=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),l=e=>"number"==typeof e&&isFinite(e),s=e=>"[object Date]"===k(e),c=e=>"[object RegExp]"===k(e),i=e=>L(e)&&0===Object.keys(e).length;function u(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const f=Object.assign;function m(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const _=Object.prototype.hasOwnProperty;function p(e,t){return _.call(e,t)}const d=Array.isArray,g=e=>"function"==typeof e,v=e=>"string"==typeof e,E=e=>"boolean"==typeof e,b=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,k=e=>h.call(e),L=e=>{if(!b(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function N(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}function y(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const T={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function I(e){throw e}const C=" ",O="\r",A="\n",P=String.fromCharCode(8232),S=String.fromCharCode(8233);function D(e){const t=e;let n=0,r=1,a=1,o=0;const l=e=>t[e]===O&&t[e+1]===A,s=e=>t[e]===S,c=e=>t[e]===P,i=e=>l(e)||(e=>t[e]===A)(e)||s(e)||c(e),u=e=>l(e)||s(e)||c(e)?A:t[e];function f(){return o=0,i(n)&&(r++,a=0),l(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:f,peek:function(){return l(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)f();o=0}}}const R=void 0,F="'";function M(e,t={}){const n=!1!==t.location,r=D(e),a=()=>r.index(),o=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},l=o(),s=a(),c={currentType:14,offset:s,startLoc:l,endLoc:l,lastType:14,lastOffset:s,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=y(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const m=e=>f(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(T.EXPECTED_TOKEN,o(),"")}function p(e){let t="";for(;e.currentPeek()===C||e.currentPeek()===A;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=p(e);return e.skipToPeek(),t}function g(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function v(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=function(e){if(e===R)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function E(e){p(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function b(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===C||r===A):o===C?(e.peek(),n(!0,C,a)):o!==A||(e.peek(),n(!0,A,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function h(e,t){const n=e.currentChar();return n===R?R:t(n)?(e.next(),n):null}function k(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function L(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function N(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function I(e){let t="",n="";for(;t=L(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!b(e))break;t+=n,e.next()}else if(n===C||n===A)if(b(e))t+=n,e.next();else{if(E(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return S(e,t,4);case"U":return S(e,t,6);default:return T.UNKNOWN_ESCAPE_SEQUENCE,o(),""}}function S(e,t,n){_(e,t);let r="";for(let a=0;a<n;a++){const t=N(e);if(!t){T.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function M(e){d(e);const t=_(e,"|");return d(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(T.NOT_ALLOW_NEST_PLACEHOLDER,o()),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(T.EMPTY_PLACEHOLDER,o()),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(T.UNTERMINATED_CLOSING_BRACE,o()),n=W(e,t)||m(t),t.braceNest=0,n;default:let r=!0,a=!0,l=!0;if(E(e))return t.braceNest>0&&(T.UNTERMINATED_CLOSING_BRACE,o()),n=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return T.UNTERMINATED_CLOSING_BRACE,o(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=k(e);)n+=t;return e.currentChar()===R&&(T.UNTERMINATED_CLOSING_BRACE,o()),n}(e)),d(e),n;if(a=v(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===R&&(T.UNTERMINATED_CLOSING_BRACE,o()),t}(e)),d(e),n;if(l=function(e,t){const{currentType:n}=t;if(2!==n)return!1;p(e);const r=e.currentPeek()===F;return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),_(e,"'");let t="",n="";const r=e=>e!==F&&e!==A;for(;t=h(e,r);)n+="\\"===t?P(e):t;const a=e.currentChar();return a===A||a===R?(T.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),a===A&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),d(e),n;if(!r&&!a&&!l)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==C&&e!==A;for(;t=h(e,r);)n+=t;return n}(e)),T.INVALID_TOKEN_IN_PLACEHOLDER,o(),n.value,d(e),n}return n}function W(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==A&&a!==C||(T.INVALID_LINKED_FORMAT,o()),a){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return E(e)?(r=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;p(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;p(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),W(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;p(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=k(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?g(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===C||!t)&&(t===A?(e.peek(),r()):g(t))},a=r();return e.resetPeek(),a}(e,t)?(d(e),"{"===a?w(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===C?r:a===A?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&(T.INVALID_LINKED_FORMAT,o()),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return w(e,t)||m(t);if(t.inLinked)return W(e,t)||m(t);switch(e.currentChar()){case"{":return w(e,t)||m(t);case"}":return T.UNBALANCED_CLOSING_BRACE,o(),e.next(),f(t,3,"}");case"@":return W(e,t)||m(t);default:if(E(e))return n=f(t,1,M(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=p(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?f(t,0,O(e)):f(t,4,function(e){d(e);const t=e.currentChar();return"%"!==t&&(T.EXPECTED_TOKEN,o()),e.next(),"%"}(e));if(b(e))return f(t,0,O(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:l}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=l,c.offset=a(),c.startLoc=o(),r.currentChar()===R?f(c,14):x(r,c)},currentOffset:a,currentPosition:o,context:i}}const w=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function W(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function x(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e};return t&&(a.start=n,a.end=n,a.loc={start:r,end:r}),a}function a(e,n,r,a){a&&(e.type=a),t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(5,o,l);return s.index=parseInt(t,10),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(4,o,l);return s.key=t,e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(9,o,l);return s.value=t.replace(w,W),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(8,o,l);return 12!==t.type?(T.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,s.value="",a(s,o,l),{nextConsumeToken:t,node:s}):(null==t.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,U(t)),s.value=t.value||"",a(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=s(e,o.value||"");break;case 6:null==o.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=l(e,o.value||"");break;case 7:null==o.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(o)),n.key=c(e,o.value||"");break;default:T.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const i=e.context(),u=r(7,i.offset,i.startLoc);return u.value="",a(u,i.offset,i.startLoc),n.key=u,a(n,i.offset,i.startLoc),{nextConsumeToken:o,node:n}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(l(e,r.value||""));break;case 5:null==r.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(s(e,r.value||""));break;case 7:null==r.value&&(T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,U(r)),n.items.push(c(e,r.value||""));break;case 8:const a=i(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:o}=t,l=u(e);return 14===t.currentType?l:function(e,t,n,o){const l=e.context();let s=0===o.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(o);do{const t=u(e);s||(s=0===t.items.length),c.cases.push(t)}while(14!==l.currentType);return a(c,e.currentOffset(),e.currentPosition()),c}(e,n,o,l)}return{parse:function(n){const o=M(n,f({},e)),l=o.context(),s=r(0,l.offset,l.startLoc);return t&&s.loc&&(s.loc.source=n),s.body=m(o),e.onCacheKey&&(s.cacheKey=e.onCacheKey(n)),14!==l.currentType&&(T.UNEXPECTED_LEXICAL_ANALYSIS,l.lastStartLoc,n[l.offset]),a(s,o.currentOffset(),o.currentPosition()),s}}}function U(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function $(e,t){for(let n=0;n<e.length;n++)V(e[n],t)}function V(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:V(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function H(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&V(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function j(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=N(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function X(e){switch(e.t=e.type,e.type){case 0:const t=e;X(t.body),t.b=t.body,delete t.body;break;case 1:const n=e,r=n.cases;for(let e=0;e<r.length;e++)X(r[e]);n.c=r,delete n.cases;break;case 2:const a=e,o=a.items;for(let e=0;e<o.length;e++)X(o[e]);a.i=o,delete a.items,a.static&&(a.s=a.static,delete a.static);break;case 3:case 9:case 8:case 7:const l=e;l.value&&(l.v=l.value,delete l.value);break;case 6:const s=e;X(s.key),s.k=s.key,delete s.key,s.modifier&&(X(s.modifier),s.m=s.modifier,delete s.modifier);break;case 5:const c=e;c.i=c.index,delete c.index;break;case 4:const i=e;i.k=i.key,delete i.key}delete e.type}function G(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?G(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(G(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let o=0;o<a&&(G(e,t.items[o]),o!==a-1);o++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),G(e,t.key),t.modifier?(e.push(", "),G(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const B=(e,t={})=>{const n=v(t.mode)?t.mode:"normal",r=v(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",l=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,l=!1!==t.location,s={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function i(e,t=!0){const n=t?a:"";c(o?n+" ".repeat(e):n)}return l&&e.loc&&(s.source=e.loc.source),{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&i(t)},newline:function(){i(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:l});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(l),s.length>0&&(c.push(`const { ${N(s.map((e=>`${e}: _${e}`)),", ")} } = ctx`),c.newline()),c.push("return "),G(c,e),c.deindent(l),c.push("}"),delete e.helpers;const{code:i,map:u}=c.context();return{ast:e,code:i,map:u?u.toJSON():void 0}};function Y(e,t={}){const n=f({},t),r=!!n.jit,a=!!n.minify,o=null==n.optimize||n.optimize,l=x(n).parse(e);return r?(o&&function(e){const t=e.body;2===t.type?j(t):t.cases.forEach((e=>j(e)))}(l),a&&X(l),{ast:l,code:""}):(H(l,n),B(l,n))}const K=[];K[0]={w:[0],i:[3,0],"[":[4],o:[7]},K[1]={w:[1],".":[2],"[":[4],o:[7]},K[2]={w:[2],i:[3,0],0:[3,0]},K[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},K[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},K[5]={"'":[4,0],o:8,l:[5,0]},K[6]={'"':[4,0],o:8,l:[6,0]};const z=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function J(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Q(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,z.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}const q=new Map;function Z(e,t){return b(e)?e[t]:null}const ee=e=>e,te=e=>"",ne="text",re=e=>0===e.length?"":N(e),ae=e=>null==e?"":d(e)||L(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function oe(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function le(e={}){const t=e.locale,n=function(e){const t=l(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(l(e.named.count)||l(e.named.n))?l(e.named.count)?e.named.count:l(e.named.n)?e.named.n:t:t}(e),r=b(e.pluralRules)&&v(t)&&g(e.pluralRules[t])?e.pluralRules[t]:oe,a=b(e.pluralRules)&&v(t)&&g(e.pluralRules[t])?oe:void 0,o=e.list||[],s=e.named||{};l(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=g(e.messages)?e.messages(t):!!b(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):te)}const i=L(e.processor)&&g(e.processor.normalize)?e.processor.normalize:re,u=L(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:ae,f={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",l="";1===n.length?b(r)?(l=r.modifier||l,o=r.type||o):v(r)&&(l=r||l):2===n.length&&(v(r)&&(l=r||l),v(a)&&(o=a||o));const s=c(t)(f),i="vnode"===o&&d(s)&&l?s[0]:s;return l?(u=l,e.modifiers?e.modifiers[u]:ee)(i,o):i;var u},message:c,type:L(e.processor)&&v(e.processor.type)?e.processor.type:ne,interpolate:u,normalize:i};return f}function se(e,t,n){return[...new Set([n,...d(t)?t:b(t)?Object.keys(t):v(t)?[t]:[n]])]}function ce(e,t,n){const r=v(n)?n:pe,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;d(e);)e=ie(o,e,t);const l=d(t)||!L(t)?t:t.default?t.default:null;e=v(l)?[l]:l,d(e)&&ie(o,e,!1),a.__localeChainCache.set(r,o)}return o}function ie(e,t,n){let r=!0;for(let a=0;a<t.length&&E(r);a++){const o=t[a];v(o)&&(r=ue(e,t[a],n))}return r}function ue(e,t,n){let r;const a=t.split("-");do{r=fe(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function fe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(d(n)||L(n))&&n[a]&&(r=n[a])}return r}const me="9.3.0-beta.25",_e=-1,pe="en-US",de="",ge=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let ve,Ee,be;let he=null;const ke=e=>{he=e},Le=()=>he;let Ne=0;function ye(e={}){const t=v(e.version)?e.version:me,n=v(e.locale)?e.locale:pe,r=d(e.fallbackLocale)||L(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=L(e.messages)?e.messages:{[n]:{}},o=L(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=L(e.numberFormats)?e.numberFormats:{[n]:{}},s=f({},e.modifiers||{},{upper:(e,t)=>"text"===t&&v(e)?e.toUpperCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&v(e)?e.toLowerCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&v(e)?ge(e):"vnode"===t&&b(e)&&"__v_isVNode"in e?ge(e.children):e}),i=e.pluralRules||{},m=g(e.missing)?e.missing:null,_=!E(e.missingWarn)&&!c(e.missingWarn)||e.missingWarn,p=!E(e.fallbackWarn)&&!c(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,k=!!e.unresolving,N=g(e.postTranslation)?e.postTranslation:null,y=L(e.processor)?e.processor:null,T=!E(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,C=g(e.messageCompiler)?e.messageCompiler:ve,O=g(e.messageResolver)?e.messageResolver:Ee||Z,A=g(e.localeFallbacker)?e.localeFallbacker:be||se,P=b(e.fallbackContext)?e.fallbackContext:void 0,S=g(e.onWarn)?e.onWarn:u,D=e,R=b(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,F=b(D.__numberFormatters)?D.__numberFormatters:new Map,M=b(D.__meta)?D.__meta:{};Ne++;const w={version:t,cid:Ne,locale:n,fallbackLocale:r,messages:a,modifiers:s,pluralRules:i,missing:m,missingWarn:_,fallbackWarn:p,fallbackFormat:h,unresolving:k,postTranslation:N,processor:y,warnHtmlMessage:T,escapeParameter:I,messageCompiler:C,messageResolver:O,localeFallbacker:A,fallbackContext:P,onWarn:S,__meta:M};return w.datetimeFormats=o,w.numberFormats=l,w.__datetimeFormatters=R,w.__numberFormatters=F,w}function Te(e,t,n,r,a){const{missing:o,onWarn:l}=e;if(null!==o){const r=o(e,n,t,a);return v(r)?r:t}return t}function Ie(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let Ce=T.__EXTEND_POINT__;const Oe=()=>++Ce,Ae={INVALID_ARGUMENT:Ce,INVALID_DATE_ARGUMENT:Oe(),INVALID_ISO_DATE_ARGUMENT:Oe(),NOT_SUPPORT_AST:Oe(),__EXTEND_POINT__:Oe()},Pe=e=>e;let Se=Object.create(null);const De=()=>"",Re=e=>g(e),Fe=e=>b(e)&&0===e.type&&"body"in e;function Me(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:c}=e,[i,u]=xe(...t),f=E(u.missingWarn)?u.missingWarn:e.missingWarn,_=E(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,p=E(u.escapeParameter)?u.escapeParameter:e.escapeParameter,g=!!u.resolvedMessage,h=v(u.default)||E(u.default)?E(u.default)?o?i:()=>i:u.default:n?o?i:()=>i:"",k=n||""!==h,L=v(u.locale)?u.locale:e.locale;p&&function(e){d(e.list)?e.list=e.list.map((e=>v(e)?m(e):e)):b(e.named)&&Object.keys(e.named).forEach((t=>{v(e.named[t])&&(e.named[t]=m(e.named[t]))}))}(u);let[N,y,T]=g?[i,L,c[L]||{}]:we(e,i,L,s,_,f),I=N,C=i;if(g||v(I)||Fe(I)||Re(I)||k&&(I=h,C=I),!(g||(v(I)||Fe(I)||Re(I))&&v(y)))return a?_e:i;let O=!1;const A=Re(I)?I:We(e,i,y,I,C,(()=>{O=!0}));if(O)return I;const P=function(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:c,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,m=r=>{let a=s(n,r);if(null==a&&f){const[,,e]=we(f,r,t,c,i,u);a=s(e,r)}if(v(a)||Fe(a)){let n=!1;const o=We(e,r,t,a,r,(()=>{n=!0}));return n?De:o}return Re(a)?a:De},_={locale:t,modifiers:a,pluralRules:o,messages:m};e.processor&&(_.processor=e.processor);r.list&&(_.list=r.list);r.named&&(_.named=r.named);l(r.plural)&&(_.pluralIndex=r.plural);return _}(e,y,T,u),S=function(e,t,n){const r=t(n);return r}(0,A,le(P));return r?r(S,i):S}function we(e,t,n,r,a,o){const{messages:l,onWarn:s,messageResolver:c,localeFallbacker:i}=e,u=i(e,r,n);let f,m={},_=null;for(let p=0;p<u.length&&(f=u[p],m=l[f]||{},null===(_=c(m,t))&&(_=m[t]),!(v(_)||Fe(_)||Re(_)));p++){const n=Te(e,t,f,0,"translate");n!==t&&(_=n)}return[_,f,m]}function We(e,t,n,r,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(Re(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,function(e,t,n,r,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>a(t,n,e)}}(0,n,o,0,c,l));return i.locale=n,i.key=t,i.source=r,i}function xe(...e){const[t,n,r]=e,a={};if(!(v(t)||l(t)||Re(t)||Fe(t)))throw Error(Ae.INVALID_ARGUMENT);const o=l(t)?String(t):(Re(t),t);return l(n)?a.plural=n:v(n)?a.default=n:L(n)&&!i(n)?a.named=n:d(n)&&(a.list=n),l(r)?a.plural=r:v(r)?a.default=r:L(r)&&f(a,r),[o,a]}function Ue(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__datetimeFormatters:s}=e,[c,u,m,_]=Ve(...t);E(m.missingWarn)?m.missingWarn:e.missingWarn;E(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const p=!!m.part,d=v(m.locale)?m.locale:e.locale,g=l(e,a,d);if(!v(c)||""===c)return new Intl.DateTimeFormat(d,_).format(u);let b,h={},k=null;for(let i=0;i<g.length&&(b=g[i],h=n[b]||{},k=h[c],!L(k));i++)Te(e,c,b,0,"datetime format");if(!L(k)||!v(b))return r?_e:c;let N=`${b}__${c}`;i(_)||(N=`${N}__${JSON.stringify(_)}`);let y=s.get(N);return y||(y=new Intl.DateTimeFormat(b,f({},k,_)),s.set(N,y)),p?y.formatToParts(u):y.format(u)}const $e=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ve(...e){const[t,n,r,a]=e,o={};let c,i={};if(v(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Ae.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();c=new Date(n);try{c.toISOString()}catch(u){throw Error(Ae.INVALID_ISO_DATE_ARGUMENT)}}else if(s(t)){if(isNaN(t.getTime()))throw Error(Ae.INVALID_DATE_ARGUMENT);c=t}else{if(!l(t))throw Error(Ae.INVALID_ARGUMENT);c=t}return v(n)?o.key=n:L(n)&&Object.keys(n).forEach((e=>{$e.includes(e)?i[e]=n[e]:o[e]=n[e]})),v(r)?o.locale=r:L(r)&&(i=r),L(a)&&(i=a),[o.key||"",c,o,i]}function He(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function je(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__numberFormatters:s}=e,[c,u,m,_]=Ge(...t);E(m.missingWarn)?m.missingWarn:e.missingWarn;E(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const p=!!m.part,d=v(m.locale)?m.locale:e.locale,g=l(e,a,d);if(!v(c)||""===c)return new Intl.NumberFormat(d,_).format(u);let b,h={},k=null;for(let i=0;i<g.length&&(b=g[i],h=n[b]||{},k=h[c],!L(k));i++)Te(e,c,b,0,"number format");if(!L(k)||!v(b))return r?_e:c;let N=`${b}__${c}`;i(_)||(N=`${N}__${JSON.stringify(_)}`);let y=s.get(N);return y||(y=new Intl.NumberFormat(b,f({},k,_)),s.set(N,y)),p?y.formatToParts(u):y.format(u)}const Xe=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ge(...e){const[t,n,r,a]=e,o={};let s={};if(!l(t))throw Error(Ae.INVALID_ARGUMENT);const c=t;return v(n)?o.key=n:L(n)&&Object.keys(n).forEach((e=>{Xe.includes(e)?s[e]=n[e]:o[e]=n[e]})),v(r)?o.locale=r:L(r)&&(s=r),L(a)&&(s=a),[o.key||"",c,o,s]}function Be(e,t,n){const r=e;for(const a in n){const e=`${t}__${a}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}const Ye="9.3.0-beta.25";let Ke=T.__EXTEND_POINT__;const ze=()=>++Ke,Je={UNEXPECTED_RETURN_TYPE:Ke,INVALID_ARGUMENT:ze(),MUST_BE_CALL_SETUP_TOP:ze(),NOT_INSTALLED:ze(),NOT_AVAILABLE_IN_LEGACY_MODE:ze(),REQUIRED_VALUE:ze(),INVALID_VALUE:ze(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ze(),NOT_INSTALLED_WITH_PROVIDE:ze(),UNEXPECTED_ERROR:ze(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ze(),BRIDGE_SUPPORT_VUE_2_ONLY:ze(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ze(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ze(),__EXTEND_POINT__:ze()},Qe=r("__translateVNode"),qe=r("__datetimeParts"),Ze=r("__numberParts"),et=r("__setPluralRules"),tt=r("__legacyVueI18n"),nt=r("__injectWithOption"),rt="__VUE_I18N_BRIDGE__";function at(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function ot(e){if(!b(e))return e;for(const t in e)if(p(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e,o=!1;for(let e=0;e<r;e++){if(n[e]in a||(a[n[e]]={}),!b(a[n[e]])){o=!0;break}a=a[n[e]]}o||(a[n[r]]=e[t],delete e[t]),b(a[n[r]])&&ot(a[n[r]])}else b(e[t])&&ot(e[t]);return e}function lt(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,l=L(n)?n:d(r)?{}:{[e]:{}};if(d(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(l[t]=l[t]||{},ct(n,l[t])):ct(n,l)}else v(e)&&ct(JSON.parse(e),l)})),null==a&&o)for(const s in l)p(l,s)&&ot(l[s]);return l}const st=e=>!b(e)||d(e);function ct(e,t){if(st(e)||st(t))throw Error(Je.INVALID_VALUE);for(const n in e)p(e,n)&&(st(e[n])||st(t[n])?t[n]=e[n]:ct(e[n],t[n]))}function it(e){return e.proxy.$options}function ut(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let ft=0;function mt(e){return(n,r,a,o)=>e(r,a,t.getCurrentInstance()||void 0,o)}function _t(e={},r){const{__root:a}=e,o=void 0===a;let s=!E(e.inheritLocale)||e.inheritLocale;const i=t.ref(a&&s?a.locale.value:v(e.locale)?e.locale:pe),u=t.ref(a&&s?a.fallbackLocale.value:v(e.fallbackLocale)||d(e.fallbackLocale)||L(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:i.value),m=t.ref(lt(i.value,e)),_=t.ref(L(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),p=t.ref(L(e.numberFormats)?e.numberFormats:{[i.value]:{}});let h=a?a.missingWarn:!E(e.missingWarn)&&!c(e.missingWarn)||e.missingWarn,k=a?a.fallbackWarn:!E(e.fallbackWarn)&&!c(e.fallbackWarn)||e.fallbackWarn,N=a?a.fallbackRoot:!E(e.fallbackRoot)||e.fallbackRoot,y=!!e.fallbackFormat,T=g(e.missing)?e.missing:null,I=g(e.missing)?mt(e.missing):null,C=g(e.postTranslation)?e.postTranslation:null,O=a?a.warnHtmlMessage:!E(e.warnHtmlMessage)||e.warnHtmlMessage,A=!!e.escapeParameter;const P=a?a.modifiers:L(e.modifiers)?e.modifiers:{};let S,D,R=e.pluralRules||a&&a.pluralRules;{at(r);const e={locale:i.value,fallbackLocale:u.value,messages:m.value,dateTimeFormats:_.value,numberFormats:p.value,modifiers:P,missing:T,fallbackRoot:N,postTranslation:C,pluralizationRules:R,escapeParameterHtml:A,sync:s,silentFallbackWarn:E(k)?!k:k,silentTranslationWarn:E(h)?!h:h,formatFallbackMessages:E(y)?!y:y,warnHtmlInMessage:E(O)&&O?"warn":"off",__VUE_I18N_BRIDGE__:rt};S=new r(e)}D=(()=>{o&&ke(null);const t={version:Ye,locale:i.value,fallbackLocale:u.value,messages:m.value,modifiers:P,pluralRules:R,missing:null===I?void 0:I,missingWarn:h,fallbackWarn:k,fallbackFormat:y,unresolving:!0,postTranslation:null===C?void 0:C,warnHtmlMessage:O,escapeParameter:A,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=_.value,t.numberFormats=p.value,t.__datetimeFormatters=L(D)?D.__datetimeFormatters:void 0,t.__numberFormatters=L(D)?D.__numberFormatters:void 0;const n=ye(t);return o&&ke(n),n})(),Ie(D,i.value,u.value);const F=t.computed({get:()=>i.value,set:e=>{i.value=e,S&&!o&&(S.locale=e),D.locale=i.value}}),M=t.computed({get:()=>u.value,set:e=>{u.value=e,S&&!o&&(S.fallbackLocale=e),D.fallbackLocale=u.value,Ie(D,i.value,e)}}),w=t.computed((()=>m.value)),W=t.computed((()=>_.value)),x=t.computed((()=>p.value));const U=(e,t,n,r,s,c)=>{let f;i.value,u.value,m.value,_.value,p.value;try{0,o||(D.fallbackContext=a?Le():void 0),f=e(D)}finally{o||(D.fallbackContext=void 0)}if(l(f)&&f===_e){const[e,n]=t();return a&&N?r(a):s(e)}if(c(f))return f;throw Error(Je.UNEXPECTED_RETURN_TYPE)};function $(...e){return U((t=>Reflect.apply(Me,null,[t,...e])),(()=>xe(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>v(e)))}const V={normalize:function(e){return e.map((e=>v(e)||l(e)||E(e)?ut(String(e)):e))},interpolate:e=>e,type:"vnode"};function H(e){return m.value[e]||{}}ft++,a&&n&&(t.watch(a.locale,(e=>{s&&(i.value=e,S&&!o&&(S.locale=e),D.locale=e,Ie(D,i.value,u.value))})),t.watch(a.fallbackLocale,(e=>{s&&(u.value=e,S&&!o&&(S.fallbackLocale=e),D.fallbackLocale=e,Ie(D,i.value,u.value))})));const j={id:ft,locale:F,fallbackLocale:M,get inheritLocale(){return s},set inheritLocale(e){s=e,S&&(S._sync=e),e&&a&&(i.value=a.locale.value,u.value=a.fallbackLocale.value,S&&(S.locale=a.locale.value,S.fallbackLocale=a.fallbackLocale.value),Ie(D,i.value,u.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:w,get modifiers(){return P},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(e){h=e,D.missingWarn=h},get fallbackWarn(){return k},set fallbackWarn(e){k=e,D.fallbackWarn=k},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return y},set fallbackFormat(e){y=e,D.fallbackFormat=y},get warnHtmlMessage(){return O},set warnHtmlMessage(e){O=e,D.warnHtmlMessage=e},get escapeParameter(){return A},set escapeParameter(e){A=e,D.escapeParameter=e},t:$,getLocaleMessage:H,setLocaleMessage:function(e,t){m.value[e]=t,S&&S.setLocaleMessage(e,t),D.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},S&&S.mergeLocaleMessage(e,t),ct(t,m.value[e]),D.messages=m.value},getPostTranslationHandler:function(){return g(C)?C:null},setPostTranslationHandler:function(e){C=e,D.postTranslation=e},getMissingHandler:function(){return T},setMissingHandler:function(e){null!==e&&(I=mt(e)),T=e,D.missing=I},[et]:function(e){R=e,D.pluralRules=R}};return j.datetimeFormats=W,j.numberFormats=x,j.rt=function(...e){const[t,n,r]=e;if(r&&!b(r))throw Error(Je.INVALID_ARGUMENT);return $(t,n,f({resolvedMessage:!0},r||{}))},j.te=function(e,t){const n=H(v(t)?t:i.value);return null!==D.messageResolver(n,e)},j.tm=function(e){const t=function(e){let t=null;const n=ce(D,u.value,i.value);for(let r=0;r<n.length;r++){const a=m.value[n[r]]||{},o=D.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},j.d=function(...e){return U((t=>Reflect.apply(Ue,null,[t,...e])),(()=>Ve(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>de),(e=>v(e)))},j.n=function(...e){return U((t=>Reflect.apply(je,null,[t,...e])),(()=>Ge(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>de),(e=>v(e)))},j.getDateTimeFormat=function(e){return _.value[e]||{}},j.setDateTimeFormat=function(e,t){_.value[e]=t,S&&S.setDateTimeFormat(e,t),D.datetimeFormats=_.value,He(D,e,t)},j.mergeDateTimeFormat=function(e,t){_.value[e]=f(_.value[e]||{},t),S&&S.mergeDateTimeFormat(e,t),D.datetimeFormats=_.value,He(D,e,t)},j.getNumberFormat=function(e){return p.value[e]||{}},j.setNumberFormat=function(e,t){p.value[e]=t,S&&S.setNumberFormat(e,t),D.numberFormats=p.value,Be(D,e,t)},j.mergeNumberFormat=function(e,t){p.value[e]=f(p.value[e]||{},t),S&&S.mergeNumberFormat(e,t),D.numberFormats=p.value,Be(D,e,t)},j[nt]=e.__injectWithOption,j[Qe]=function(...e){return U((t=>{let n;const r=t;try{r.processor=V,n=Reflect.apply(Me,null,[r,...e])}finally{r.processor=null}return n}),(()=>xe(...e)),"translate",(t=>t[Qe](...e)),(e=>[ut(e)]),(e=>d(e)))},j[qe]=function(...e){return U((t=>Reflect.apply(Ue,null,[t,...e])),(()=>Ve(...e)),"datetime format",(t=>t[qe](...e)),(()=>[]),(e=>v(e)||d(e)))},j[Ze]=function(...e){return U((t=>Reflect.apply(je,null,[t,...e])),(()=>Ge(...e)),"number format",(t=>t[Ze](...e)),(()=>[]),(e=>v(e)||d(e)))},j[tt]=S,j}const pt={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const dt=t.defineComponent({name:"i18n-t",props:f({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>l(e)||!isNaN(e)}},pt),setup(e,n){const{slots:r,attrs:a}=n,o=e.i18n||yt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(r).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=v(e.plural)?+e.plural:e.plural);const c=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}(n,l),i=o[Qe](e.keypath,c,s),u=f({},a),m=v(e.tag)||b(e.tag)?e.tag:"span";return t.h(m,u,i)}}}),gt=dt;function vt(e,n,r,a){const{slots:o,attrs:l}=n;return()=>{const n={part:!0};let s={};e.locale&&(n.locale=e.locale),v(e.format)?n.key=e.format:b(e.format)&&(v(e.format.key)&&(n.key=e.format.key),s=Object.keys(e.format).reduce(((t,n)=>r.includes(n)?f({},t,{[n]:e.format[n]}):t),{}));const c=a(e.value,n,s);let i=[n.key];d(c)?i=c.map(((e,t)=>{const n=o[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];var a;return d(a=r)&&!v(a[0])&&(r[0].key=`${e.type}-${t}`),r})):v(c)&&(i=[c]);const u=f({},l),m=v(e.tag)||b(e.tag)?e.tag:"span";return t.h(m,u,i)}}const Et=t.defineComponent({name:"i18n-n",props:f({value:{type:Number,required:!0},format:{type:[String,Object]}},pt),setup(e,t){const n=e.i18n||yt({useScope:"parent",__useComponent:!0});return vt(e,t,Xe,((...e)=>n[Ze](...e)))}}),bt=Et,ht=t.defineComponent({name:"i18n-d",props:f({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},pt),setup(e,t){const n=e.i18n||yt({useScope:"parent",__useComponent:!0});return vt(e,t,$e,((...e)=>n[qe](...e)))}}),kt=ht;let Lt=null;const Nt=r("global-vue-i18n");function yt(e={}){const r=t.getCurrentInstance();if(null==r)throw Error(Je.MUST_BE_CALL_SETUP_TOP);if(null==Lt)throw Error(Je.NOT_INSTALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(Je.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Je.NOT_INSTALLED);return n}}(r),o=function(e){return e.global}(a),l=it(r),s=function(e,t){return i(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(Je.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,n,r,a={}){const o="local"===n,l=t.shallowRef(null);if(o&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(Je.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=E(a.inheritLocale)?a.inheritLocale:!v(a.locale),i=t.ref(!o||s?r.locale.value:v(a.locale)?a.locale:pe),u=t.ref(!o||s?r.fallbackLocale.value:v(a.fallbackLocale)||d(a.fallbackLocale)||L(a.fallbackLocale)||!1===a.fallbackLocale?a.fallbackLocale:i.value),f=t.ref(lt(i.value,a)),m=t.ref(L(a.datetimeFormats)?a.datetimeFormats:{[i.value]:{}}),_=t.ref(L(a.numberFormats)?a.numberFormats:{[i.value]:{}}),p=o?r.missingWarn:!E(a.missingWarn)&&!c(a.missingWarn)||a.missingWarn,b=o?r.fallbackWarn:!E(a.fallbackWarn)&&!c(a.fallbackWarn)||a.fallbackWarn,h=o?r.fallbackRoot:!E(a.fallbackRoot)||a.fallbackRoot,k=!!a.fallbackFormat,N=g(a.missing)?a.missing:null,y=g(a.postTranslation)?a.postTranslation:null,T=o?r.warnHtmlMessage:!E(a.warnHtmlMessage)||a.warnHtmlMessage,I=!!a.escapeParameter,C=o?r.modifiers:L(a.modifiers)?a.modifiers:{},O=a.pluralRules||o&&r.pluralRules;function A(){return[i.value,u.value,f.value,m.value,_.value]}const P=t.computed({get:()=>l.value?l.value.locale.value:i.value,set:e=>{l.value&&(l.value.locale.value=e),i.value=e}}),S=t.computed({get:()=>l.value?l.value.fallbackLocale.value:u.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),u.value=e}}),D=t.computed((()=>l.value?l.value.messages.value:f.value)),R=t.computed((()=>m.value)),F=t.computed((()=>_.value));function M(){return l.value?l.value.getPostTranslationHandler():y}function w(e){l.value&&l.value.setPostTranslationHandler(e)}function W(){return l.value?l.value.getMissingHandler():N}function x(e){l.value&&l.value.setMissingHandler(e)}function U(e){return A(),e()}function $(...e){return l.value?U((()=>Reflect.apply(l.value.t,null,[...e]))):U((()=>""))}function V(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""}function H(...e){return l.value?U((()=>Reflect.apply(l.value.d,null,[...e]))):U((()=>""))}function j(...e){return l.value?U((()=>Reflect.apply(l.value.n,null,[...e]))):U((()=>""))}function X(e){return l.value?l.value.tm(e):{}}function G(e,t){return!!l.value&&l.value.te(e,t)}function B(e){return l.value?l.value.getLocaleMessage(e):{}}function Y(e,t){l.value&&(l.value.setLocaleMessage(e,t),f.value[e]=t)}function K(e,t){l.value&&l.value.mergeLocaleMessage(e,t)}function z(e){return l.value?l.value.getDateTimeFormat(e):{}}function J(e,t){l.value&&(l.value.setDateTimeFormat(e,t),m.value[e]=t)}function Q(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)}function q(e){return l.value?l.value.getNumberFormat(e):{}}function Z(e,t){l.value&&(l.value.setNumberFormat(e,t),_.value[e]=t)}function ee(e,t){l.value&&l.value.mergeNumberFormat(e,t)}const te={get id(){return l.value?l.value.id:-1},locale:P,fallbackLocale:S,messages:D,datetimeFormats:R,numberFormats:F,get inheritLocale(){return l.value?l.value.inheritLocale:s},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(f.value)},get modifiers(){return l.value?l.value.modifiers:C},get pluralRules(){return l.value?l.value.pluralRules:O},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:p},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:b},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:h},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:k},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:T},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:I},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:$,getPostTranslationHandler:M,setPostTranslationHandler:w,getMissingHandler:W,setMissingHandler:x,rt:V,d:H,n:j,tm:X,te:G,getLocaleMessage:B,setLocaleMessage:Y,mergeLocaleMessage:K,getDateTimeFormat:z,setDateTimeFormat:J,mergeDateTimeFormat:Q,getNumberFormat:q,setNumberFormat:Z,mergeNumberFormat:ee};function ne(e){e.locale.value=i.value,e.fallbackLocale.value=u.value,Object.keys(f.value).forEach((t=>{e.mergeLocaleMessage(t,f.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeDateTimeFormat(t,m.value[t])})),Object.keys(_.value).forEach((t=>{e.mergeNumberFormat(t,_.value[t])})),e.escapeParameter=I,e.fallbackFormat=k,e.fallbackRoot=h,e.fallbackWarn=b,e.missingWarn=p,e.warnHtmlMessage=T}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(Je.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=l.value=e.proxy.$i18n.__composer;"global"===n?(i.value=t.locale.value,u.value=t.fallbackLocale.value,f.value=t.messages.value,m.value=t.datetimeFormats.value,_.value=t.numberFormats.value):o&&ne(t)})),te}(r,s,o,e)}if("global"===s)return function(e,t,n){let r=b(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=lt(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),b(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(b(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,l),o;if("parent"===s){let t=function(e,t,n=!1){let r=null;const a=t.root;let o=function(e,t=!1){if(null==e)return null;return e.parent}(t,n);for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[nt]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}(a,r,e.__useComponent);return null==t&&(t=o),t}const u=a;let m=u.__getInstance(r);if(null==m){const a=f({},e);"__i18n"in l&&(a.__i18n=l.__i18n),o&&(a.__root=o),m=_t(a,Lt),u.__composerExtend&&u.__composerExtend(m),function(e,r,a){{const o=r.proxy;if(null==o)throw Error(Je.UNEXPECTED_ERROR);const l=a[tt];if(l===e)throw Error(Je.UNEXPECTED_ERROR);o._i18n=l,o._i18n_bridge=!0,n&&(o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0})),t.onUnmounted((()=>{s&&(o._i18n.unsubscribeDataChanging(o),s=!1),o._i18nWatcher&&(o._i18nWatcher(),o._i18n.destroyVM(),delete o._i18nWatcher),o._localeWatcher&&(o._localeWatcher(),delete o._localeWatcher),delete o._i18n_bridge,delete o._i18n}))}}(u,r,m),u.__setInstance(r,m)}return m}var Tt;return Tt=function(e,t={}){if(!v(e))throw Error(Ae.NOT_SUPPORT_AST);{!E(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||Pe)(e),r=Se[n];if(r)return r;const{code:a,detectError:o}=function(e,t={}){let n=!1;const r=t.onError||I;return t.onError=e=>{n=!0,r(e)},{...Y(e,t),detectError:n}}(e,t),l=new Function(`return ${a}`)();return o?l:Se[n]=l}},ve=Tt,Ee=function(e,t){if(!b(e))return null;let n=q.get(t);if(n||(n=function(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,f=0;const m=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,a="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=a:r+=a},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=Q(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(o=J(n),c=K[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=m[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}(t),n&&q.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a},be=ce,e.DatetimeFormat=ht,e.I18nD=kt,e.I18nInjectionKey=Nt,e.I18nN=bt,e.I18nT=gt,e.NumberFormat=Et,e.Translation=dt,e.VERSION=Ye,e.castToVueI18n=e=>{if(!(rt in e))throw Error(Je.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},n){Lt=n;const r=!E(e.legacy)||e.legacy,a=!E(e.globalInjection)||e.globalInjection,o=!r||!!e.allowComposition,l=new Map,[s,c]=function(e,n,r){const a=t.effectScope();{if(!at(r))throw Error(Je.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=a.run((()=>_t(e,r)));if(null==t)throw Error(Je.UNEXPECTED_ERROR);return[a,t]}}(e,0,n);{const e=c[tt];let t=null;Object.defineProperty(e,"global",{get:()=>c}),Object.defineProperty(e,"mode",{get:()=>r?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>o}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(n,...o)=>{if(2!==(n&&n.version&&Number(n.version.split(".")[0])||-1))throw Error(Je.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const n=L(t[0])?t[0]:{};(!E(n.globalInstall)||n.globalInstall)&&(e.component(dt.name,dt),e.component(Et.name,Et),e.component(ht.name,ht))}(n,...o),!r&&a&&(t=function(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}(n,e,c)),n.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>ct(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(r){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(L(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>ct(JSON.parse(t),e))),n.i18n.messages=e}catch(r){}const{sharedMessages:a}=n.i18n;a&&L(a)&&ct(a,n.i18n.messages),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||L(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Lt))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const n={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(n).forEach((t=>Object.defineProperty(e,t,{value:n[t]}))),e}},e.useI18n=yt,e}({},VueDemi); |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.24 | ||
* vue-i18n-bridge v9.3.0-beta.25 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,a)=>friendlyJSONstringify({l:e,k:t,s:a}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,a,n)=>0===n?e+a:e+t+a),"")}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let a,n,r,l,o,s,i,c=-1,u=0,m=0;const g=[];function f(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,g[0](),!0}for(g[0]=()=>{void 0===n?n=r:n+=r},g[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},g[2]=()=>{g[0](),m++},g[3]=()=>{if(m>0)m--,u=4,g[0]();else{if(m=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;g[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!f()){if(l=getPathCharType(a),i=pathStateMachine[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=g[o[1]],s&&(r=a,!1===s())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let a=cache.get(t);if(a||(a=parse(t),a&&cache.set(t,a)),!a)return null;const n=a.length;let r=e,l=0;for(;l<n;){const e=r[a[l]];if(void 0===e)return null;r=e,l++}return r}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,a=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,l=e.list||[],o=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(a,o);function s(t){const a=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>l[e],named:e=>o[e],plural:e=>e[n(a,e.length,r)],linked:(t,...a)=>{const[n,r]=a;let l="text",o="";1===a.length?isObject(n)?(o=n.modifier||o,l=n.type||l):isString(n)&&(o=n||o):2===a.length&&(isString(n)&&(o=n||o),isString(r)&&(l=r||l));const i=s(t)(u),c="vnode"===l&&isArray(i)&&o?i[0]:i;return o?(m=o,e.modifiers?e.modifiers[m]:DEFAULT_MODIFIER)(c,l):c;var m},message:s,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,a){return[...new Set([a,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[a]])]}function fallbackWithLocaleChain(e,t,a){const n=isString(a)?a:DEFAULT_LOCALE,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(n);if(!l){l=[];let e=[a];for(;isArray(e);)e=appendBlockToChain(l,e,t);const o=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(o)?[o]:o,isArray(e)&&appendBlockToChain(l,e,!1),r.__localeChainCache.set(n,l)}return l}function appendBlockToChain(e,t,a){let n=!0;for(let r=0;r<t.length&&isBoolean(n);r++){const l=t[r];isString(l)&&(n=appendLocaleToChain(e,t[r],a))}return n}function appendLocaleToChain(e,t,a){let n;const r=t.split("-");do{n=appendItemToChain(e,r.join("-"),a),r.splice(-1,1)}while(r.length&&!0===n);return n}function appendItemToChain(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(isArray(a)||isPlainObject(a))&&a[r]&&(n=a[r])}return n}const VERSION$1="9.3.0-beta.24",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,a=isString(e.locale)?e.locale:DEFAULT_LOCALE,n=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=isPlainObject(e.messages)?e.messages:{[a]:{}},l=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=isPlainObject(e.numberFormats)?e.numberFormats:{[a]:{}},s=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,f=!!e.unresolving,_=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,b=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,d=!!e.escapeParameter,E=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,O=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,N=isObject(e.fallbackContext)?e.fallbackContext:void 0,I=isFunction(e.onWarn)?e.onWarn:warn,h=e,y=isObject(h.__datetimeFormatters)?h.__datetimeFormatters:new Map,S=isObject(h.__numberFormatters)?h.__numberFormatters:new Map,T=isObject(h.__meta)?h.__meta:{};_cid++;const F={version:t,cid:_cid,locale:a,fallbackLocale:n,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:g,unresolving:f,postTranslation:_,processor:p,warnHtmlMessage:b,escapeParameter:d,messageCompiler:E,messageResolver:v,localeFallbacker:O,fallbackContext:N,onWarn:I,__meta:T};return F.datetimeFormats=l,F.numberFormats=o,F.__datetimeFormatters=y,F.__numberFormatters=S,F}function handleMissing(e,t,a,n,r){const{missing:l,onWarn:o}=e;if(null!==l){const n=l(e,a,t,r);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),NOT_SUPPORT_AST:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e),isMessageAST=e=>isObject(e)&&0===e.type&&"body"in e;function translate(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:r,messageCompiler:l,fallbackLocale:o,messages:s}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,g=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,_=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?l?i:()=>i:c.default:a?l?i:()=>i:"",p=a||""!==_,b=isString(c.locale)?c.locale:e.locale;g&&escapeParams(c);let[d,E,v]=f?[i,b,s[b]||{}]:resolveMessageFormat(e,i,b,o,m,u),O=d,N=i;if(f||isString(O)||isMessageAST(O)||isMessageFunction(O)||p&&(O=_,N=O),!(f||(isString(O)||isMessageAST(O)||isMessageFunction(O))&&isString(E)))return r?NOT_REOSLVED:i;let I=!1;const h=isMessageFunction(O)?O:compileMessageFormat(e,i,E,O,N,(()=>{I=!0}));if(I)return O;const y=evaluateMessage(e,h,createMessageContext(getMessageContextOptions(e,E,v,c)));return n?n(y,i):y}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,a,n,r,l){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,g={},f=null;for(let _=0;_<u.length&&(m=u[_],g=o[m]||{},null===(f=i(g,t))&&(f=g[t]),!(isString(f)||isMessageAST(f)||isMessageFunction(f)));_++){const a=handleMissing(e,t,m,l,"translate");a!==t&&(f=a)}return[f,m,g]}function compileMessageFormat(e,t,a,n,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==o){const e=()=>n;return e.locale=a,e.key=t,e}const i=o(n,getCompileOptions(e,a,r,n,s,l));return i.locale=a,i.key=t,i.source=n,i}function evaluateMessage(e,t,a){return t(a)}function parseTranslateArgs(...e){const[t,a,n]=e,r={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(a)?r.plural=a:isString(a)?r.default=a:isPlainObject(a)&&!isEmptyObject(a)?r.named=a:isArray(a)&&(r.list=a),isNumber(n)?r.plural=n:isString(n)?r.default=n:isPlainObject(n)&&assign(r,n),[l,r]}function getCompileOptions(e,t,a,n,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>generateFormatCacheKey(t,a,e)}}function getMessageContextOptions(e,t,a,n){const{modifiers:r,pluralRules:l,messageResolver:o,fallbackLocale:s,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:r,pluralRules:l,messages:n=>{let r=o(a,n);if(null==r&&u){const[,,e]=resolveMessageFormat(u,n,t,s,i,c);r=o(e,n)}if(isString(r)||isMessageAST(r)){let a=!1;const l=compileMessageFormat(e,n,t,r,n,(()=>{a=!0}));return a?NOOP_MESSAGE_FUNCTION:l}return isMessageFunction(r)?r:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),n.list&&(m.list=n.list),n.named&&(m.named=n.named),isNumber(n.plural)&&(m.pluralIndex=n.plural),m}function datetime(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,c,u,m]=parseDateTimeArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.DateTimeFormat(_,m).format(c);let b,d={},E=null;for(let N=0;N<p.length&&(b=p[N],d=a[b]||{},E=d[i],!isPlainObject(E));N++)handleMissing(e,i,b,g,"datetime format");if(!isPlainObject(E)||!isString(b))return n?NOT_REOSLVED:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.DateTimeFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,a,n,r]=e,l={};let o,s={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const a=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();o=new Date(a);try{o.toISOString()}catch(i){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);o=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);o=t}return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(s=n),isPlainObject(r)&&(s=r),[l.key||"",o,l,s]}function clearDateTimeFormat(e,t,a){const n=e;for(const r in a){const e=`${t}__${r}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,c,u,m]=parseNumberArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.NumberFormat(_,m).format(c);let b,d={},E=null;for(let N=0;N<p.length&&(b=p[N],d=a[b]||{},E=d[i],!isPlainObject(E));N++)handleMissing(e,i,b,g,"number format");if(!isPlainObject(E)||!isString(b))return n?NOT_REOSLVED:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.NumberFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,a,n,r]=e,l={};let o={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=t;return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?o[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(o=n),isPlainObject(r)&&(o=r),[l.key||"",s,l,o]}function clearNumberFormat(e,t,a){const n=e;for(const r in a){const e=`${t}__${r}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}const VERSION="9.3.0-beta.24";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSTALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSTALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let r=e,l=!1;for(let e=0;e<n;e++){if(a[e]in r||(r[a[e]]={}),!isObject(r[a[e]])){l=!0;break}r=r[a[e]]}l||(r[a[n]]=e[t],delete e[t]),isObject(r[a[n]])&&handleFlatJson(r[a[n]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:a,__i18n:n,messageResolver:r,flatJson:l}=t,o=isPlainObject(a)?a:isArray(n)?{}:{[e]:{}};if(isArray(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},deepCopy(a,o[t])):deepCopy(a,o)}else isString(e)&&deepCopy(JSON.parse(e),o)})),null==r&&l)for(const s in o)hasOwn(o,s)&&handleFlatJson(o[s]);return o}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const a in e)hasOwn(e,a)&&(isNotObjectOrIsArray(e[a])||isNotObjectOrIsArray(t[a])?t[a]=e[a]:deepCopy(e[a],t[a]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,a){let n=isObject(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=getLocaleMessages(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const r=Object.keys(n);if(r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,a,n,r)=>e(a,n,getCurrentInstance()||void 0,r)}function createComposer(e={},t){const{__root:a}=e,n=void 0===a;let r=!isBoolean(e.inheritLocale)||e.inheritLocale;const l=ref(a&&r?a.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),o=ref(a&&r?a.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:l.value),s=ref(getLocaleMessages(l.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[l.value]:{}});let u=a?a.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=a?a.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=a?a.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,f=!!e.fallbackFormat,_=isFunction(e.missing)?e.missing:null,p=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,b=isFunction(e.postTranslation)?e.postTranslation:null,d=a?a.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const v=a?a.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let O,N,I=e.pluralRules||a&&a.pluralRules;{isLegacyVueI18n(t);const e={locale:l.value,fallbackLocale:o.value,messages:s.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:_,fallbackRoot:g,postTranslation:b,pluralizationRules:I,escapeParameterHtml:E,sync:r,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(f)?!f:f,warnHtmlInMessage:isBoolean(d)&&d?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};O=new t(e)}N=(()=>{const t={version:VERSION,locale:l.value,fallbackLocale:o.value,messages:s.value,modifiers:v,pluralRules:I,missing:null===p?void 0:p,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:!0,postTranslation:null===b?void 0:b,warnHtmlMessage:d,escapeParameter:E,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(N)?N.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(N)?N.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(N,l.value,o.value);const h=computed({get:()=>l.value,set:e=>{l.value=e,O&&!n&&(O.locale=e),N.locale=l.value}}),y=computed({get:()=>o.value,set:e=>{o.value=e,O&&!n&&(O.fallbackLocale=e),N.fallbackLocale=o.value,updateFallbackLocale(N,l.value,e)}}),S=computed((()=>s.value)),T=computed((()=>i.value)),F=computed((()=>c.value));const L=(e,t,n,r,u,m)=>{let f;if(l.value,o.value,s.value,i.value,c.value,f=e(N),isNumber(f)&&f===NOT_REOSLVED){const[e,n]=t();return a&&g?r(a):u(e)}if(m(f))return f;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function C(...e){return L((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const A={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function k(e){return s.value[e]||{}}composerID++,a&&inBrowser&&(watch(a.locale,(e=>{r&&(l.value=e,O&&!n&&(O.locale=e),N.locale=e,updateFallbackLocale(N,l.value,o.value))})),watch(a.fallbackLocale,(e=>{r&&(o.value=e,O&&!n&&(O.fallbackLocale=e),N.fallbackLocale=e,updateFallbackLocale(N,l.value,o.value))})));const M={id:composerID,locale:h,fallbackLocale:y,get inheritLocale(){return r},set inheritLocale(e){r=e,O&&(O._sync=e),e&&a&&(l.value=a.locale.value,o.value=a.fallbackLocale.value,O&&(O.locale=a.locale.value,O.fallbackLocale=a.fallbackLocale.value),updateFallbackLocale(N,l.value,o.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:S,get modifiers(){return v},get pluralRules(){return I||{}},get isGlobal(){return n},get missingWarn(){return u},set missingWarn(e){u=e,N.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,N.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return f},set fallbackFormat(e){f=e,N.fallbackFormat=f},get warnHtmlMessage(){return d},set warnHtmlMessage(e){d=e,N.warnHtmlMessage=e},get escapeParameter(){return E},set escapeParameter(e){E=e,N.escapeParameter=e},t:C,getLocaleMessage:k,setLocaleMessage:function(e,t){s.value[e]=t,O&&O.setLocaleMessage(e,t),N.messages=s.value},mergeLocaleMessage:function(e,t){s.value[e]=s.value[e]||{},O&&O.mergeLocaleMessage(e,t),deepCopy(t,s.value[e]),N.messages=s.value},getPostTranslationHandler:function(){return isFunction(b)?b:null},setPostTranslationHandler:function(e){b=e,N.postTranslation=e},getMissingHandler:function(){return _},setMissingHandler:function(e){null!==e&&(p=defineCoreMissingHandler(e)),_=e,N.missing=p},[SetPluralRulesSymbol]:function(e){I=e,N.pluralRules=I}};return M.datetimeFormats=T,M.numberFormats=F,M.rt=function(...e){const[t,a,n]=e;if(n&&!isObject(n))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return C(t,a,assign({resolvedMessage:!0},n||{}))},M.te=function(e,t){const a=k(isString(t)?t:l.value);return null!==N.messageResolver(a,e)},M.tm=function(e){const t=function(e){let t=null;const a=fallbackWithLocaleChain(N,o.value,l.value);for(let n=0;n<a.length;n++){const r=s.value[a[n]]||{},l=N.messageResolver(r,e);if(null!=l){t=l;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},M.d=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},M.n=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},M.getDateTimeFormat=function(e){return i.value[e]||{}},M.setDateTimeFormat=function(e,t){i.value[e]=t,O&&O.setDateTimeFormat(e,t),N.datetimeFormats=i.value,clearDateTimeFormat(N,e,t)},M.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),O&&O.mergeDateTimeFormat(e,t),N.datetimeFormats=i.value,clearDateTimeFormat(N,e,t)},M.getNumberFormat=function(e){return c.value[e]||{}},M.setNumberFormat=function(e,t){c.value[e]=t,O&&O.setNumberFormat(e,t),N.numberFormats=c.value,clearNumberFormat(N,e,t)},M.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),O&&O.mergeNumberFormat(e,t),N.numberFormats=c.value,clearNumberFormat(N,e,t)},M[InejctWithOption]=e.__injectWithOption,M[TranslateVNodeSymbol]=function(...e){return L((t=>{let a;const n=t;try{n.processor=A,a=Reflect.apply(translate,null,[n,...e])}finally{n.processor=null}return a}),(()=>parseTranslateArgs(...e)),"translate",(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},M[DatetimePartsSymbol]=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[NumberPartsSymbol]=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[LegacyInstanceSymbol]=O,M}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:a,attrs:n}=t,r=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(a).filter((e=>"_"!==e)),o={};e.locale&&(o.locale=e.locale),void 0!==e.plural&&(o.plural=isString(e.plural)?+e.plural:e.plural);const s=getInterpolateArg(t,l),i=r[TranslateVNodeSymbol](e.keypath,s,o),c=assign({},n),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,a,n){const{slots:r,attrs:l}=t;return()=>{const t={part:!0};let o={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce(((t,n)=>a.includes(n)?assign({},t,{[n]:e.format[n]}):t),{}));const s=n(e.value,t,o);let i=[t.key];isArray(s)?i=s.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:s}):[e.value];return isVNode(n)&&(n[0].key=`${e.type}-${t}`),n})):isString(s)&&(i=[s]);const c=assign({},l),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>a[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>a[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const a=isPlainObject(t[0])?t[0]:{};(!isBoolean(a.globalInstall)||a.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(n){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),a.i18n.messages=e}catch(n){}const{sharedMessages:r}=a.i18n;r&&isPlainObject(r)&&deepCopy(r,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||isPlainObject(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const a=!isBoolean(e.legacy)||e.legacy,n=!isBoolean(e.globalInjection)||e.globalInjection,r=!a||!!e.allowComposition,l=new Map,[o,s]=createGlobal(e,a,t);{const e=s[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>s}),Object.defineProperty(e,"mode",{get:()=>a?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(r,...l)=>{if(2!==(r&&r.version&&Number(r.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(r,...l),!a&&n&&(t=injectGlobalFieldsForBridge(r,e,s)),r.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),o.stop()}});const i={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSTALLED);const a=getI18nInstance(t),n=getGlobalComposer(a),r=getComponentOptions(t),l=getScope(e,r);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,l,n,e)}if("global"===l)return adjustI18nResources(n,e,r),n;if("parent"===l){let r=getComposer(a,t,e.__useComponent);return null==r&&(r=n),r}const o=a;let s=o.__getInstance(t);if(null==s){const a=assign({},e);"__i18n"in r&&(a.__i18n=r.__i18n),n&&(a.__root=n),s=createComposer(a,_legacyVueI18n),o.__composerExtend&&o.__composerExtend(s),setupLifeCycle(o,t,s),o.__setInstance(t,s)}return s}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,a){const n=effectScope();{if(!isLegacyVueI18n(a))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=n.run((()=>createComposer(e,a)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[n,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(I18nErrorCodes.NOT_INSTALLED);return a}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,a=!1){let n=null;const r=t.root;let l=getParentComponentInstance(t,a);for(;null!=l;){const t=e;if("composition"===e.mode)n=t.__getInstance(l);else{const e=t.__getInstance(l);null!=e&&(n=e.__composer,a&&n&&!n[InejctWithOption]&&(n=null))}if(null!=n)break;if(r===l)break;l=l.parent}return n}function getParentComponentInstance(e,t=!1){return null==e?null:e.parent}function setupLifeCycle(e,t,a){{const n=t.proxy;if(null==n)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const r=a[LegacyInstanceSymbol];if(r===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);n._i18n=r,n._i18n_bridge=!0,inBrowser&&(n._i18nWatcher=n._i18n.watchI18nData(),n._i18n._sync&&(n._localeWatcher=n._i18n.watchLocale()));let l=!1;onBeforeMount((()=>{n._i18n.subscribeDataChanging(n),l=!0})),onUnmounted((()=>{l&&(n._i18n.unsubscribeDataChanging(n),l=!1),n._i18nWatcher&&(n._i18nWatcher(),n._i18n.destroyVM(),delete n._i18nWatcher),n._localeWatcher&&(n._localeWatcher(),delete n._localeWatcher),delete n._i18n_bridge,delete n._i18n}))}}function useI18nForLegacy(e,t,a,n={}){const r="local"===t,l=shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=isBoolean(n.inheritLocale)?n.inheritLocale:!isString(n.locale),s=ref(!r||o?a.locale.value:isString(n.locale)?n.locale:DEFAULT_LOCALE),i=ref(!r||o?a.fallbackLocale.value:isString(n.fallbackLocale)||isArray(n.fallbackLocale)||isPlainObject(n.fallbackLocale)||!1===n.fallbackLocale?n.fallbackLocale:s.value),c=ref(getLocaleMessages(s.value,n)),u=ref(isPlainObject(n.datetimeFormats)?n.datetimeFormats:{[s.value]:{}}),m=ref(isPlainObject(n.numberFormats)?n.numberFormats:{[s.value]:{}}),g=r?a.missingWarn:!isBoolean(n.missingWarn)&&!isRegExp(n.missingWarn)||n.missingWarn,f=r?a.fallbackWarn:!isBoolean(n.fallbackWarn)&&!isRegExp(n.fallbackWarn)||n.fallbackWarn,_=r?a.fallbackRoot:!isBoolean(n.fallbackRoot)||n.fallbackRoot,p=!!n.fallbackFormat,b=isFunction(n.missing)?n.missing:null,d=isFunction(n.postTranslation)?n.postTranslation:null,E=r?a.warnHtmlMessage:!isBoolean(n.warnHtmlMessage)||n.warnHtmlMessage,v=!!n.escapeParameter,O=r?a.modifiers:isPlainObject(n.modifiers)?n.modifiers:{},N=n.pluralRules||r&&a.pluralRules;function I(e){return s.value,i.value,c.value,u.value,m.value,e()}const h={get id(){return l.value?l.value.id:-1},locale:computed({get:()=>l.value?l.value.locale.value:s.value,set:e=>{l.value&&(l.value.locale.value=e),s.value=e}}),fallbackLocale:computed({get:()=>l.value?l.value.fallbackLocale.value:i.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>l.value?l.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return l.value?l.value.inheritLocale:o},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(c.value)},get modifiers(){return l.value?l.value.modifiers:O},get pluralRules(){return l.value?l.value.pluralRules:N},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:g},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:f},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:_},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:p},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:E},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:v},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:function(...e){return l.value?I((()=>Reflect.apply(l.value.t,null,[...e]))):I((()=>""))},getPostTranslationHandler:function(){return l.value?l.value.getPostTranslationHandler():d},setPostTranslationHandler:function(e){l.value&&l.value.setPostTranslationHandler(e)},getMissingHandler:function(){return l.value?l.value.getMissingHandler():b},setMissingHandler:function(e){l.value&&l.value.setMissingHandler(e)},rt:function(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""},d:function(...e){return l.value?I((()=>Reflect.apply(l.value.d,null,[...e]))):I((()=>""))},n:function(...e){return l.value?I((()=>Reflect.apply(l.value.n,null,[...e]))):I((()=>""))},tm:function(e){return l.value?l.value.tm(e):{}},te:function(e,t){return!!l.value&&l.value.te(e,t)},getLocaleMessage:function(e){return l.value?l.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){l.value&&(l.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){l.value&&l.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return l.value?l.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){l.value&&(l.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return l.value?l.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){l.value&&(l.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){l.value&&l.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=l.value=e.proxy.$i18n.__composer;"global"===t?(s.value=a.locale.value,i.value=a.fallbackLocale.value,c.value=a.messages.value,u.value=a.datetimeFormats.value,m.value=a.numberFormats.value):r&&function(e){e.locale.value=s.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=p,e.fallbackRoot=_,e.fallbackWarn=f,e.missingWarn=g,e.warnHtmlMessage=E}(a)})),h}function injectGlobalFieldsForBridge(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,a)=>friendlyJSONstringify({l:e,k:t,s:a}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,a,n)=>0===n?e+a:e+t+a),"")}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let a,n,r,l,o,s,i,c=-1,u=0,m=0;const g=[];function f(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,g[0](),!0}for(g[0]=()=>{void 0===n?n=r:n+=r},g[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},g[2]=()=>{g[0](),m++},g[3]=()=>{if(m>0)m--,u=4,g[0]();else{if(m=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;g[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!f()){if(l=getPathCharType(a),i=pathStateMachine[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=g[o[1]],s&&(r=a,!1===s())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let a=cache.get(t);if(a||(a=parse(t),a&&cache.set(t,a)),!a)return null;const n=a.length;let r=e,l=0;for(;l<n;){const e=r[a[l]];if(void 0===e)return null;r=e,l++}return r}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,a=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,l=e.list||[],o=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(a,o);function s(t){const a=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>l[e],named:e=>o[e],plural:e=>e[n(a,e.length,r)],linked:(t,...a)=>{const[n,r]=a;let l="text",o="";1===a.length?isObject(n)?(o=n.modifier||o,l=n.type||l):isString(n)&&(o=n||o):2===a.length&&(isString(n)&&(o=n||o),isString(r)&&(l=r||l));const i=s(t)(u),c="vnode"===l&&isArray(i)&&o?i[0]:i;return o?(m=o,e.modifiers?e.modifiers[m]:DEFAULT_MODIFIER)(c,l):c;var m},message:s,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,a){return[...new Set([a,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[a]])]}function fallbackWithLocaleChain(e,t,a){const n=isString(a)?a:DEFAULT_LOCALE,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(n);if(!l){l=[];let e=[a];for(;isArray(e);)e=appendBlockToChain(l,e,t);const o=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(o)?[o]:o,isArray(e)&&appendBlockToChain(l,e,!1),r.__localeChainCache.set(n,l)}return l}function appendBlockToChain(e,t,a){let n=!0;for(let r=0;r<t.length&&isBoolean(n);r++){const l=t[r];isString(l)&&(n=appendLocaleToChain(e,t[r],a))}return n}function appendLocaleToChain(e,t,a){let n;const r=t.split("-");do{n=appendItemToChain(e,r.join("-"),a),r.splice(-1,1)}while(r.length&&!0===n);return n}function appendItemToChain(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(isArray(a)||isPlainObject(a))&&a[r]&&(n=a[r])}return n}const VERSION$1="9.3.0-beta.25",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}const setAdditionalMeta=e=>{};let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,a=isString(e.locale)?e.locale:DEFAULT_LOCALE,n=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=isPlainObject(e.messages)?e.messages:{[a]:{}},l=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=isPlainObject(e.numberFormats)?e.numberFormats:{[a]:{}},s=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,f=!!e.unresolving,_=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,b=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,d=!!e.escapeParameter,E=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,O=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,I=isObject(e.fallbackContext)?e.fallbackContext:void 0,N=isFunction(e.onWarn)?e.onWarn:warn,h=e,y=isObject(h.__datetimeFormatters)?h.__datetimeFormatters:new Map,T=isObject(h.__numberFormatters)?h.__numberFormatters:new Map,S=isObject(h.__meta)?h.__meta:{};_cid++;const F={version:t,cid:_cid,locale:a,fallbackLocale:n,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:g,unresolving:f,postTranslation:_,processor:p,warnHtmlMessage:b,escapeParameter:d,messageCompiler:E,messageResolver:v,localeFallbacker:O,fallbackContext:I,onWarn:N,__meta:S};return F.datetimeFormats=l,F.numberFormats=o,F.__datetimeFormatters=y,F.__numberFormatters=T,F}function handleMissing(e,t,a,n,r){const{missing:l,onWarn:o}=e;if(null!==l){const n=l(e,a,t,r);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),NOT_SUPPORT_AST:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e),isMessageAST=e=>isObject(e)&&0===e.type&&"body"in e;function translate(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:r,messageCompiler:l,fallbackLocale:o,messages:s}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,g=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,_=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?l?i:()=>i:c.default:a?l?i:()=>i:"",p=a||""!==_,b=isString(c.locale)?c.locale:e.locale;g&&escapeParams(c);let[d,E,v]=f?[i,b,s[b]||{}]:resolveMessageFormat(e,i,b,o,m,u),O=d,I=i;if(f||isString(O)||isMessageAST(O)||isMessageFunction(O)||p&&(O=_,I=O),!(f||(isString(O)||isMessageAST(O)||isMessageFunction(O))&&isString(E)))return r?NOT_REOSLVED:i;let N=!1;const h=isMessageFunction(O)?O:compileMessageFormat(e,i,E,O,I,(()=>{N=!0}));if(N)return O;const y=evaluateMessage(e,h,createMessageContext(getMessageContextOptions(e,E,v,c)));return n?n(y,i):y}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,a,n,r,l){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,g={},f=null;for(let _=0;_<u.length&&(m=u[_],g=o[m]||{},null===(f=i(g,t))&&(f=g[t]),!(isString(f)||isMessageAST(f)||isMessageFunction(f)));_++){const a=handleMissing(e,t,m,l,"translate");a!==t&&(f=a)}return[f,m,g]}function compileMessageFormat(e,t,a,n,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==o){const e=()=>n;return e.locale=a,e.key=t,e}const i=o(n,getCompileOptions(e,a,r,n,s,l));return i.locale=a,i.key=t,i.source=n,i}function evaluateMessage(e,t,a){return t(a)}function parseTranslateArgs(...e){const[t,a,n]=e,r={};if(!(isString(t)||isNumber(t)||isMessageFunction(t)||isMessageAST(t)))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(a)?r.plural=a:isString(a)?r.default=a:isPlainObject(a)&&!isEmptyObject(a)?r.named=a:isArray(a)&&(r.list=a),isNumber(n)?r.plural=n:isString(n)?r.default=n:isPlainObject(n)&&assign(r,n),[l,r]}function getCompileOptions(e,t,a,n,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>generateFormatCacheKey(t,a,e)}}function getMessageContextOptions(e,t,a,n){const{modifiers:r,pluralRules:l,messageResolver:o,fallbackLocale:s,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:r,pluralRules:l,messages:n=>{let r=o(a,n);if(null==r&&u){const[,,e]=resolveMessageFormat(u,n,t,s,i,c);r=o(e,n)}if(isString(r)||isMessageAST(r)){let a=!1;const l=compileMessageFormat(e,n,t,r,n,(()=>{a=!0}));return a?NOOP_MESSAGE_FUNCTION:l}return isMessageFunction(r)?r:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),n.list&&(m.list=n.list),n.named&&(m.named=n.named),isNumber(n.plural)&&(m.pluralIndex=n.plural),m}function datetime(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,c,u,m]=parseDateTimeArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.DateTimeFormat(_,m).format(c);let b,d={},E=null;for(let I=0;I<p.length&&(b=p[I],d=a[b]||{},E=d[i],!isPlainObject(E));I++)handleMissing(e,i,b,g,"datetime format");if(!isPlainObject(E)||!isString(b))return n?NOT_REOSLVED:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.DateTimeFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,a,n,r]=e,l={};let o,s={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const a=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();o=new Date(a);try{o.toISOString()}catch(i){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if(isDate(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);o=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);o=t}return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(s=n),isPlainObject(r)&&(s=r),[l.key||"",o,l,s]}function clearDateTimeFormat(e,t,a){const n=e;for(const r in a){const e=`${t}__${r}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,c,u,m]=parseNumberArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.NumberFormat(_,m).format(c);let b,d={},E=null;for(let I=0;I<p.length&&(b=p[I],d=a[b]||{},E=d[i],!isPlainObject(E));I++)handleMissing(e,i,b,g,"number format");if(!isPlainObject(E)||!isString(b))return n?NOT_REOSLVED:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.NumberFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,a,n,r]=e,l={};let o={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=t;return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?o[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(o=n),isPlainObject(r)&&(o=r),[l.key||"",s,l,o]}function clearNumberFormat(e,t,a){const n=e;for(const r in a){const e=`${t}__${r}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}const VERSION="9.3.0-beta.25";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSTALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSTALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let r=e,l=!1;for(let e=0;e<n;e++){if(a[e]in r||(r[a[e]]={}),!isObject(r[a[e]])){l=!0;break}r=r[a[e]]}l||(r[a[n]]=e[t],delete e[t]),isObject(r[a[n]])&&handleFlatJson(r[a[n]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:a,__i18n:n,messageResolver:r,flatJson:l}=t,o=isPlainObject(a)?a:isArray(n)?{}:{[e]:{}};if(isArray(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},deepCopy(a,o[t])):deepCopy(a,o)}else isString(e)&&deepCopy(JSON.parse(e),o)})),null==r&&l)for(const s in o)hasOwn(o,s)&&handleFlatJson(o[s]);return o}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const a in e)hasOwn(e,a)&&(isNotObjectOrIsArray(e[a])||isNotObjectOrIsArray(t[a])?t[a]=e[a]:deepCopy(e[a],t[a]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,a){let n=isObject(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=getLocaleMessages(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const r=Object.keys(n);if(r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}const DEVTOOLS_META="__INTLIFY_META__";let composerID=0;function defineCoreMissingHandler(e){return(t,a,n,r)=>e(a,n,getCurrentInstance()||void 0,r)}const getMetaInfo=()=>{const e=getCurrentInstance();let t=null;return e&&(t=getComponentOptions(e)[DEVTOOLS_META])?{[DEVTOOLS_META]:t}:null};function createComposer(e={},t){const{__root:a}=e,n=void 0===a;let r=!isBoolean(e.inheritLocale)||e.inheritLocale;const l=ref(a&&r?a.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),o=ref(a&&r?a.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:l.value),s=ref(getLocaleMessages(l.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[l.value]:{}});let u=a?a.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=a?a.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=a?a.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,f=!!e.fallbackFormat,_=isFunction(e.missing)?e.missing:null,p=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,b=isFunction(e.postTranslation)?e.postTranslation:null,d=a?a.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const v=a?a.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let O,I,N=e.pluralRules||a&&a.pluralRules;{isLegacyVueI18n(t);const e={locale:l.value,fallbackLocale:o.value,messages:s.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:_,fallbackRoot:g,postTranslation:b,pluralizationRules:N,escapeParameterHtml:E,sync:r,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(f)?!f:f,warnHtmlInMessage:isBoolean(d)&&d?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};O=new t(e)}I=(()=>{n&&setFallbackContext(null);const t={version:VERSION,locale:l.value,fallbackLocale:o.value,messages:s.value,modifiers:v,pluralRules:N,missing:null===p?void 0:p,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:!0,postTranslation:null===b?void 0:b,warnHtmlMessage:d,escapeParameter:E,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(I)?I.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(I)?I.__numberFormatters:void 0;const a=createCoreContext(t);return n&&setFallbackContext(a),a})(),updateFallbackLocale(I,l.value,o.value);const h=computed({get:()=>l.value,set:e=>{l.value=e,O&&!n&&(O.locale=e),I.locale=l.value}}),y=computed({get:()=>o.value,set:e=>{o.value=e,O&&!n&&(O.fallbackLocale=e),I.fallbackLocale=o.value,updateFallbackLocale(I,l.value,e)}}),T=computed((()=>s.value)),S=computed((()=>i.value)),F=computed((()=>c.value));const L=(e,t,r,u,m,f)=>{let _;l.value,o.value,s.value,i.value,c.value;try{0,n||(I.fallbackContext=a?getFallbackContext():void 0),_=e(I)}finally{n||(I.fallbackContext=void 0)}if(isNumber(_)&&_===NOT_REOSLVED){const[e,n]=t();return a&&g?u(a):m(e)}if(f(_))return _;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function C(...e){return L((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const k={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function A(e){return s.value[e]||{}}composerID++,a&&inBrowser&&(watch(a.locale,(e=>{r&&(l.value=e,O&&!n&&(O.locale=e),I.locale=e,updateFallbackLocale(I,l.value,o.value))})),watch(a.fallbackLocale,(e=>{r&&(o.value=e,O&&!n&&(O.fallbackLocale=e),I.fallbackLocale=e,updateFallbackLocale(I,l.value,o.value))})));const M={id:composerID,locale:h,fallbackLocale:y,get inheritLocale(){return r},set inheritLocale(e){r=e,O&&(O._sync=e),e&&a&&(l.value=a.locale.value,o.value=a.fallbackLocale.value,O&&(O.locale=a.locale.value,O.fallbackLocale=a.fallbackLocale.value),updateFallbackLocale(I,l.value,o.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:T,get modifiers(){return v},get pluralRules(){return N||{}},get isGlobal(){return n},get missingWarn(){return u},set missingWarn(e){u=e,I.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,I.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return f},set fallbackFormat(e){f=e,I.fallbackFormat=f},get warnHtmlMessage(){return d},set warnHtmlMessage(e){d=e,I.warnHtmlMessage=e},get escapeParameter(){return E},set escapeParameter(e){E=e,I.escapeParameter=e},t:C,getLocaleMessage:A,setLocaleMessage:function(e,t){s.value[e]=t,O&&O.setLocaleMessage(e,t),I.messages=s.value},mergeLocaleMessage:function(e,t){s.value[e]=s.value[e]||{},O&&O.mergeLocaleMessage(e,t),deepCopy(t,s.value[e]),I.messages=s.value},getPostTranslationHandler:function(){return isFunction(b)?b:null},setPostTranslationHandler:function(e){b=e,I.postTranslation=e},getMissingHandler:function(){return _},setMissingHandler:function(e){null!==e&&(p=defineCoreMissingHandler(e)),_=e,I.missing=p},[SetPluralRulesSymbol]:function(e){N=e,I.pluralRules=N}};return M.datetimeFormats=S,M.numberFormats=F,M.rt=function(...e){const[t,a,n]=e;if(n&&!isObject(n))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return C(t,a,assign({resolvedMessage:!0},n||{}))},M.te=function(e,t){const a=A(isString(t)?t:l.value);return null!==I.messageResolver(a,e)},M.tm=function(e){const t=function(e){let t=null;const a=fallbackWithLocaleChain(I,o.value,l.value);for(let n=0;n<a.length;n++){const r=s.value[a[n]]||{},l=I.messageResolver(r,e);if(null!=l){t=l;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},M.d=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},M.n=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString(e)))},M.getDateTimeFormat=function(e){return i.value[e]||{}},M.setDateTimeFormat=function(e,t){i.value[e]=t,O&&O.setDateTimeFormat(e,t),I.datetimeFormats=i.value,clearDateTimeFormat(I,e,t)},M.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),O&&O.mergeDateTimeFormat(e,t),I.datetimeFormats=i.value,clearDateTimeFormat(I,e,t)},M.getNumberFormat=function(e){return c.value[e]||{}},M.setNumberFormat=function(e,t){c.value[e]=t,O&&O.setNumberFormat(e,t),I.numberFormats=c.value,clearNumberFormat(I,e,t)},M.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),O&&O.mergeNumberFormat(e,t),I.numberFormats=c.value,clearNumberFormat(I,e,t)},M[InejctWithOption]=e.__injectWithOption,M[TranslateVNodeSymbol]=function(...e){return L((t=>{let a;const n=t;try{n.processor=k,a=Reflect.apply(translate,null,[n,...e])}finally{n.processor=null}return a}),(()=>parseTranslateArgs(...e)),"translate",(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},M[DatetimePartsSymbol]=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[NumberPartsSymbol]=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[LegacyInstanceSymbol]=O,M}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:a,attrs:n}=t,r=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(a).filter((e=>"_"!==e)),o={};e.locale&&(o.locale=e.locale),void 0!==e.plural&&(o.plural=isString(e.plural)?+e.plural:e.plural);const s=getInterpolateArg(t,l),i=r[TranslateVNodeSymbol](e.keypath,s,o),c=assign({},n),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,a,n){const{slots:r,attrs:l}=t;return()=>{const t={part:!0};let o={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce(((t,n)=>a.includes(n)?assign({},t,{[n]:e.format[n]}):t),{}));const s=n(e.value,t,o);let i=[t.key];isArray(s)?i=s.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:s}):[e.value];return isVNode(n)&&(n[0].key=`${e.type}-${t}`),n})):isString(s)&&(i=[s]);const c=assign({},l),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>a[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>a[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const a=isPlainObject(t[0])?t[0]:{};(!isBoolean(a.globalInstall)||a.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(n){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),a.i18n.messages=e}catch(n){}const{sharedMessages:r}=a.i18n;r&&isPlainObject(r)&&deepCopy(r,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||isPlainObject(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const a=!isBoolean(e.legacy)||e.legacy,n=!isBoolean(e.globalInjection)||e.globalInjection,r=!a||!!e.allowComposition,l=new Map,[o,s]=createGlobal(e,a,t);{const e=s[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>s}),Object.defineProperty(e,"mode",{get:()=>a?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(r,...l)=>{if(2!==(r&&r.version&&Number(r.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(r,...l),!a&&n&&(t=injectGlobalFieldsForBridge(r,e,s)),r.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),o.stop()}});const i={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSTALLED);const a=getI18nInstance(t),n=getGlobalComposer(a),r=getComponentOptions(t),l=getScope(e,r);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,l,n,e)}if("global"===l)return adjustI18nResources(n,e,r),n;if("parent"===l){let r=getComposer(a,t,e.__useComponent);return null==r&&(r=n),r}const o=a;let s=o.__getInstance(t);if(null==s){const a=assign({},e);"__i18n"in r&&(a.__i18n=r.__i18n),n&&(a.__root=n),s=createComposer(a,_legacyVueI18n),o.__composerExtend&&o.__composerExtend(s),setupLifeCycle(o,t,s),o.__setInstance(t,s)}return s}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,a){const n=effectScope();{if(!isLegacyVueI18n(a))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=n.run((()=>createComposer(e,a)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[n,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(I18nErrorCodes.NOT_INSTALLED);return a}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,a=!1){let n=null;const r=t.root;let l=getParentComponentInstance(t,a);for(;null!=l;){const t=e;if("composition"===e.mode)n=t.__getInstance(l);else{const e=t.__getInstance(l);null!=e&&(n=e.__composer,a&&n&&!n[InejctWithOption]&&(n=null))}if(null!=n)break;if(r===l)break;l=l.parent}return n}function getParentComponentInstance(e,t=!1){return null==e?null:e.parent}function setupLifeCycle(e,t,a){{const n=t.proxy;if(null==n)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const r=a[LegacyInstanceSymbol];if(r===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);n._i18n=r,n._i18n_bridge=!0,inBrowser&&(n._i18nWatcher=n._i18n.watchI18nData(),n._i18n._sync&&(n._localeWatcher=n._i18n.watchLocale()));let l=!1;onBeforeMount((()=>{n._i18n.subscribeDataChanging(n),l=!0})),onUnmounted((()=>{l&&(n._i18n.unsubscribeDataChanging(n),l=!1),n._i18nWatcher&&(n._i18nWatcher(),n._i18n.destroyVM(),delete n._i18nWatcher),n._localeWatcher&&(n._localeWatcher(),delete n._localeWatcher),delete n._i18n_bridge,delete n._i18n}))}}function useI18nForLegacy(e,t,a,n={}){const r="local"===t,l=shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=isBoolean(n.inheritLocale)?n.inheritLocale:!isString(n.locale),s=ref(!r||o?a.locale.value:isString(n.locale)?n.locale:DEFAULT_LOCALE),i=ref(!r||o?a.fallbackLocale.value:isString(n.fallbackLocale)||isArray(n.fallbackLocale)||isPlainObject(n.fallbackLocale)||!1===n.fallbackLocale?n.fallbackLocale:s.value),c=ref(getLocaleMessages(s.value,n)),u=ref(isPlainObject(n.datetimeFormats)?n.datetimeFormats:{[s.value]:{}}),m=ref(isPlainObject(n.numberFormats)?n.numberFormats:{[s.value]:{}}),g=r?a.missingWarn:!isBoolean(n.missingWarn)&&!isRegExp(n.missingWarn)||n.missingWarn,f=r?a.fallbackWarn:!isBoolean(n.fallbackWarn)&&!isRegExp(n.fallbackWarn)||n.fallbackWarn,_=r?a.fallbackRoot:!isBoolean(n.fallbackRoot)||n.fallbackRoot,p=!!n.fallbackFormat,b=isFunction(n.missing)?n.missing:null,d=isFunction(n.postTranslation)?n.postTranslation:null,E=r?a.warnHtmlMessage:!isBoolean(n.warnHtmlMessage)||n.warnHtmlMessage,v=!!n.escapeParameter,O=r?a.modifiers:isPlainObject(n.modifiers)?n.modifiers:{},I=n.pluralRules||r&&a.pluralRules;function N(e){return s.value,i.value,c.value,u.value,m.value,e()}const h={get id(){return l.value?l.value.id:-1},locale:computed({get:()=>l.value?l.value.locale.value:s.value,set:e=>{l.value&&(l.value.locale.value=e),s.value=e}}),fallbackLocale:computed({get:()=>l.value?l.value.fallbackLocale.value:i.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>l.value?l.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return l.value?l.value.inheritLocale:o},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(c.value)},get modifiers(){return l.value?l.value.modifiers:O},get pluralRules(){return l.value?l.value.pluralRules:I},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:g},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:f},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:_},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:p},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:E},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:v},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:function(...e){return l.value?N((()=>Reflect.apply(l.value.t,null,[...e]))):N((()=>""))},getPostTranslationHandler:function(){return l.value?l.value.getPostTranslationHandler():d},setPostTranslationHandler:function(e){l.value&&l.value.setPostTranslationHandler(e)},getMissingHandler:function(){return l.value?l.value.getMissingHandler():b},setMissingHandler:function(e){l.value&&l.value.setMissingHandler(e)},rt:function(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""},d:function(...e){return l.value?N((()=>Reflect.apply(l.value.d,null,[...e]))):N((()=>""))},n:function(...e){return l.value?N((()=>Reflect.apply(l.value.n,null,[...e]))):N((()=>""))},tm:function(e){return l.value?l.value.tm(e):{}},te:function(e,t){return!!l.value&&l.value.te(e,t)},getLocaleMessage:function(e){return l.value?l.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){l.value&&(l.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){l.value&&l.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return l.value?l.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){l.value&&(l.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return l.value?l.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){l.value&&(l.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){l.value&&l.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=l.value=e.proxy.$i18n.__composer;"global"===t?(s.value=a.locale.value,i.value=a.fallbackLocale.value,c.value=a.messages.value,u.value=a.datetimeFormats.value,m.value=a.numberFormats.value):r&&function(e){e.locale.value=s.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=p,e.fallbackRoot=_,e.fallbackWarn=f,e.missingWarn=g,e.warnHtmlMessage=E}(a)})),h}function injectGlobalFieldsForBridge(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.24 | ||
* vue-i18n-bridge v9.3.0-beta.25 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const a="undefined"!=typeof window,n=(e,t=!1)=>t?Symbol.for(e):Symbol(e),l=(e,t,a)=>r({l:e,k:t,s:a}),r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),s=e=>"[object Date]"===y(e),i=e=>"[object RegExp]"===y(e),c=e=>E(e)&&0===Object.keys(e).length;function u(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const m=Object.assign;function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const _=Object.prototype.hasOwnProperty;function g(e,t){return _.call(e,t)}const p=Array.isArray,v=e=>"function"==typeof e,d=e=>"string"==typeof e,b=e=>"boolean"==typeof e,h=e=>null!==e&&"object"==typeof e,k=Object.prototype.toString,y=e=>k.call(e),E=e=>{if(!h(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};const N=15,L=[];L[0]={w:[0],i:[3,0],"[":[4],o:[7]},L[1]={w:[1],".":[2],"[":[4],o:[7]},L[2]={w:[2],i:[3,0],0:[3,0]},L[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},L[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},L[5]={"'":[4,0],o:8,l:[5,0]},L[6]={'"':[4,0],o:8,l:[6,0]};const I=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function F(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(a=t,I.test(a)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var a}const R=new Map;function O(e,t){return h(e)?e[t]:null}const W=e=>e,w=e=>"",M="text",D=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,a,n)=>0===n?e+a:e+t+a),"")}(e),C=e=>null==e?"":p(e)||E(e)&&e.toString===k?JSON.stringify(e,null,2):String(e);function A(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function P(e={}){const t=e.locale,a=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),n=h(e.pluralRules)&&d(t)&&v(e.pluralRules[t])?e.pluralRules[t]:A,l=h(e.pluralRules)&&d(t)&&v(e.pluralRules[t])?A:void 0,r=e.list||[],s=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=v(e.messages)?e.messages(t):!!h(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):w)}const c=E(e.processor)&&v(e.processor.normalize)?e.processor.normalize:D,u=E(e.processor)&&v(e.processor.interpolate)?e.processor.interpolate:C,m={list:e=>r[e],named:e=>s[e],plural:e=>e[n(a,e.length,l)],linked:(t,...a)=>{const[n,l]=a;let r="text",o="";1===a.length?h(n)?(o=n.modifier||o,r=n.type||r):d(n)&&(o=n||o):2===a.length&&(d(n)&&(o=n||o),d(l)&&(r=l||r));const s=i(t)(m),c="vnode"===r&&p(s)&&o?s[0]:s;return o?(u=o,e.modifiers?e.modifiers[u]:W)(c,r):c;var u},message:i,type:E(e.processor)&&d(e.processor.type)?e.processor.type:M,interpolate:u,normalize:c};return m}function S(e,t,a){return[...new Set([a,...p(t)?t:h(t)?Object.keys(t):d(t)?[t]:[a]])]}function $(e,t,a){const n=d(a)?a:G,l=e;l.__localeChainCache||(l.__localeChainCache=new Map);let r=l.__localeChainCache.get(n);if(!r){r=[];let e=[a];for(;p(e);)e=U(r,e,t);const o=p(t)||!E(t)?t:t.default?t.default:null;e=d(o)?[o]:o,p(e)&&U(r,e,!1),l.__localeChainCache.set(n,r)}return r}function U(e,t,a){let n=!0;for(let l=0;l<t.length&&b(n);l++){const r=t[l];d(r)&&(n=V(e,t[l],a))}return n}function V(e,t,a){let n;const l=t.split("-");do{n=j(e,l.join("-"),a),l.splice(-1,1)}while(l.length&&!0===n);return n}function j(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const l=t.replace(/!/g,"");e.push(l),(p(a)||E(a))&&a[l]&&(n=a[l])}return n}const H="9.3.0-beta.24",x=-1,G="en-US",B="",Y=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let X,z,J;let q=0;function Z(e={}){const t=d(e.version)?e.version:H,a=d(e.locale)?e.locale:G,n=p(e.fallbackLocale)||E(e.fallbackLocale)||d(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=E(e.messages)?e.messages:{[a]:{}},r=E(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=E(e.numberFormats)?e.numberFormats:{[a]:{}},s=m({},e.modifiers||{},{upper:(e,t)=>"text"===t&&d(e)?e.toUpperCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&d(e)?e.toLowerCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&d(e)?Y(e):"vnode"===t&&h(e)&&"__v_isVNode"in e?Y(e.children):e}),c=e.pluralRules||{},f=v(e.missing)?e.missing:null,_=!b(e.missingWarn)&&!i(e.missingWarn)||e.missingWarn,g=!b(e.fallbackWarn)&&!i(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,y=!!e.unresolving,N=v(e.postTranslation)?e.postTranslation:null,L=E(e.processor)?e.processor:null,I=!b(e.warnHtmlMessage)||e.warnHtmlMessage,T=!!e.escapeParameter,F=v(e.messageCompiler)?e.messageCompiler:X,R=v(e.messageResolver)?e.messageResolver:z||O,W=v(e.localeFallbacker)?e.localeFallbacker:J||S,w=h(e.fallbackContext)?e.fallbackContext:void 0,M=v(e.onWarn)?e.onWarn:u,D=e,C=h(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,A=h(D.__numberFormatters)?D.__numberFormatters:new Map,P=h(D.__meta)?D.__meta:{};q++;const $={version:t,cid:q,locale:a,fallbackLocale:n,messages:l,modifiers:s,pluralRules:c,missing:f,missingWarn:_,fallbackWarn:g,fallbackFormat:k,unresolving:y,postTranslation:N,processor:L,warnHtmlMessage:I,escapeParameter:T,messageCompiler:F,messageResolver:R,localeFallbacker:W,fallbackContext:w,onWarn:M,__meta:P};return $.datetimeFormats=r,$.numberFormats=o,$.__datetimeFormatters=C,$.__numberFormatters=A,$}function K(e,t,a,n,l){const{missing:r,onWarn:o}=e;if(null!==r){const n=r(e,a,t,l);return d(n)?n:t}return t}function Q(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let ee=N;const te=()=>++ee,ae={INVALID_ARGUMENT:ee,INVALID_DATE_ARGUMENT:te(),INVALID_ISO_DATE_ARGUMENT:te(),NOT_SUPPORT_AST:te(),__EXTEND_POINT__:te()},ne=()=>"",le=e=>v(e),re=e=>h(e)&&0===e.type&&"body"in e;function oe(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:l,messageCompiler:r,fallbackLocale:s,messages:i}=e,[c,u]=ce(...t),m=b(u.missingWarn)?u.missingWarn:e.missingWarn,_=b(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,g=b(u.escapeParameter)?u.escapeParameter:e.escapeParameter,v=!!u.resolvedMessage,k=d(u.default)||b(u.default)?b(u.default)?r?c:()=>c:u.default:a?r?c:()=>c:"",y=a||""!==k,E=d(u.locale)?u.locale:e.locale;g&&function(e){p(e.list)?e.list=e.list.map((e=>d(e)?f(e):e)):h(e.named)&&Object.keys(e.named).forEach((t=>{d(e.named[t])&&(e.named[t]=f(e.named[t]))}))}(u);let[N,L,I]=v?[c,E,i[E]||{}]:se(e,c,E,s,_,m),T=N,F=c;if(v||d(T)||re(T)||le(T)||y&&(T=k,F=T),!(v||(d(T)||re(T)||le(T))&&d(L)))return l?x:c;let R=!1;const O=le(T)?T:ie(e,c,L,T,F,(()=>{R=!0}));if(R)return T;const W=function(e,t,a,n){const{modifiers:l,pluralRules:r,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:m}=e,f=n=>{let l=s(a,n);if(null==l&&m){const[,,e]=se(m,n,t,i,c,u);l=s(e,n)}if(d(l)||re(l)){let a=!1;const r=ie(e,n,t,l,n,(()=>{a=!0}));return a?ne:r}return le(l)?l:ne},_={locale:t,modifiers:l,pluralRules:r,messages:f};e.processor&&(_.processor=e.processor);n.list&&(_.list=n.list);n.named&&(_.named=n.named);o(n.plural)&&(_.pluralIndex=n.plural);return _}(e,L,I,u),w=function(e,t,a){const n=t(a);return n}(0,O,P(W));return n?n(w,c):w}function se(e,t,a,n,l,r){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,f={},_=null;for(let g=0;g<u.length&&(m=u[g],f=o[m]||{},null===(_=i(f,t))&&(_=f[t]),!(d(_)||re(_)||le(_)));g++){const a=K(e,t,m,0,"translate");a!==t&&(_=a)}return[_,m,f]}function ie(e,t,a,n,r,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(le(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==s){const e=()=>n;return e.locale=a,e.key=t,e}const c=s(n,function(e,t,a,n,r,o){return{warnHtmlMessage:r,onError:e=>{throw o&&o(e),e},onCacheKey:e=>l(t,a,e)}}(0,a,r,0,i,o));return c.locale=a,c.key=t,c.source=n,c}function ce(...e){const[t,a,n]=e,l={};if(!(d(t)||o(t)||le(t)||re(t)))throw Error(ae.INVALID_ARGUMENT);const r=o(t)?String(t):(le(t),t);return o(a)?l.plural=a:d(a)?l.default=a:E(a)&&!c(a)?l.named=a:p(a)&&(l.list=a),o(n)?l.plural=n:d(n)?l.default=n:E(n)&&m(l,n),[r,l]}function ue(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,u,f,_]=fe(...t);b(f.missingWarn)?f.missingWarn:e.missingWarn;b(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,p=d(f.locale)?f.locale:e.locale,v=o(e,l,p);if(!d(i)||""===i)return new Intl.DateTimeFormat(p,_).format(u);let h,k={},y=null;for(let c=0;c<v.length&&(h=v[c],k=a[h]||{},y=k[i],!E(y));c++)K(e,i,h,0,"datetime format");if(!E(y)||!d(h))return n?x:i;let N=`${h}__${i}`;c(_)||(N=`${N}__${JSON.stringify(_)}`);let L=s.get(N);return L||(L=new Intl.DateTimeFormat(h,m({},y,_)),s.set(N,L)),g?L.formatToParts(u):L.format(u)}const me=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function fe(...e){const[t,a,n,l]=e,r={};let i,c={};if(d(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(ae.INVALID_ISO_DATE_ARGUMENT);const a=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(a);try{i.toISOString()}catch(u){throw Error(ae.INVALID_ISO_DATE_ARGUMENT)}}else if(s(t)){if(isNaN(t.getTime()))throw Error(ae.INVALID_DATE_ARGUMENT);i=t}else{if(!o(t))throw Error(ae.INVALID_ARGUMENT);i=t}return d(a)?r.key=a:E(a)&&Object.keys(a).forEach((e=>{me.includes(e)?c[e]=a[e]:r[e]=a[e]})),d(n)?r.locale=n:E(n)&&(c=n),E(l)&&(c=l),[r.key||"",i,r,c]}function _e(e,t,a){const n=e;for(const l in a){const e=`${t}__${l}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function ge(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,u,f,_]=ve(...t);b(f.missingWarn)?f.missingWarn:e.missingWarn;b(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,p=d(f.locale)?f.locale:e.locale,v=o(e,l,p);if(!d(i)||""===i)return new Intl.NumberFormat(p,_).format(u);let h,k={},y=null;for(let c=0;c<v.length&&(h=v[c],k=a[h]||{},y=k[i],!E(y));c++)K(e,i,h,0,"number format");if(!E(y)||!d(h))return n?x:i;let N=`${h}__${i}`;c(_)||(N=`${N}__${JSON.stringify(_)}`);let L=s.get(N);return L||(L=new Intl.NumberFormat(h,m({},y,_)),s.set(N,L)),g?L.formatToParts(u):L.format(u)}const pe=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ve(...e){const[t,a,n,l]=e,r={};let s={};if(!o(t))throw Error(ae.INVALID_ARGUMENT);const i=t;return d(a)?r.key=a:E(a)&&Object.keys(a).forEach((e=>{pe.includes(e)?s[e]=a[e]:r[e]=a[e]})),d(n)?r.locale=n:E(n)&&(s=n),E(l)&&(s=l),[r.key||"",i,r,s]}function de(e,t,a){const n=e;for(const l in a){const e=`${t}__${l}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}const be="9.3.0-beta.24";let he=N;const ke=()=>++he,ye={UNEXPECTED_RETURN_TYPE:he,INVALID_ARGUMENT:ke(),MUST_BE_CALL_SETUP_TOP:ke(),NOT_INSTALLED:ke(),NOT_AVAILABLE_IN_LEGACY_MODE:ke(),REQUIRED_VALUE:ke(),INVALID_VALUE:ke(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ke(),NOT_INSTALLED_WITH_PROVIDE:ke(),UNEXPECTED_ERROR:ke(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ke(),BRIDGE_SUPPORT_VUE_2_ONLY:ke(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ke(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ke(),__EXTEND_POINT__:ke()},Ee=n("__translateVNode"),Ne=n("__datetimeParts"),Le=n("__numberParts"),Ie=n("__setPluralRules"),Te=n("__legacyVueI18n"),Fe=n("__injectWithOption"),Re="__VUE_I18N_BRIDGE__";function Oe(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function We(e){if(!h(e))return e;for(const t in e)if(g(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let l=e,r=!1;for(let e=0;e<n;e++){if(a[e]in l||(l[a[e]]={}),!h(l[a[e]])){r=!0;break}l=l[a[e]]}r||(l[a[n]]=e[t],delete e[t]),h(l[a[n]])&&We(l[a[n]])}else h(e[t])&&We(e[t]);return e}function we(e,t){const{messages:a,__i18n:n,messageResolver:l,flatJson:r}=t,o=E(a)?a:p(n)?{}:{[e]:{}};if(p(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},De(a,o[t])):De(a,o)}else d(e)&&De(JSON.parse(e),o)})),null==l&&r)for(const s in o)g(o,s)&&We(o[s]);return o}const Me=e=>!h(e)||p(e);function De(e,t){if(Me(e)||Me(t))throw Error(ye.INVALID_VALUE);for(const a in e)g(e,a)&&(Me(e[a])||Me(t[a])?t[a]=e[a]:De(e[a],t[a]))}function Ce(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let Ae=0;function Pe(e){return(a,n,l,r)=>e(n,l,t.getCurrentInstance()||void 0,r)}function Se(e={},n){const{__root:l}=e,r=void 0===l;let s=!b(e.inheritLocale)||e.inheritLocale;const c=t.ref(l&&s?l.locale.value:d(e.locale)?e.locale:G),u=t.ref(l&&s?l.fallbackLocale.value:d(e.fallbackLocale)||p(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:c.value),f=t.ref(we(c.value,e)),_=t.ref(E(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),g=t.ref(E(e.numberFormats)?e.numberFormats:{[c.value]:{}});let k=l?l.missingWarn:!b(e.missingWarn)&&!i(e.missingWarn)||e.missingWarn,y=l?l.fallbackWarn:!b(e.fallbackWarn)&&!i(e.fallbackWarn)||e.fallbackWarn,N=l?l.fallbackRoot:!b(e.fallbackRoot)||e.fallbackRoot,L=!!e.fallbackFormat,I=v(e.missing)?e.missing:null,T=v(e.missing)?Pe(e.missing):null,F=v(e.postTranslation)?e.postTranslation:null,R=l?l.warnHtmlMessage:!b(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter;const W=l?l.modifiers:E(e.modifiers)?e.modifiers:{};let w,M,D=e.pluralRules||l&&l.pluralRules;{Oe(n);const e={locale:c.value,fallbackLocale:u.value,messages:f.value,dateTimeFormats:_.value,numberFormats:g.value,modifiers:W,missing:I,fallbackRoot:N,postTranslation:F,pluralizationRules:D,escapeParameterHtml:O,sync:s,silentFallbackWarn:b(y)?!y:y,silentTranslationWarn:b(k)?!k:k,formatFallbackMessages:b(L)?!L:L,warnHtmlInMessage:b(R)&&R?"warn":"off",__VUE_I18N_BRIDGE__:Re};w=new n(e)}M=(()=>{const t={version:be,locale:c.value,fallbackLocale:u.value,messages:f.value,modifiers:W,pluralRules:D,missing:null===T?void 0:T,missingWarn:k,fallbackWarn:y,fallbackFormat:L,unresolving:!0,postTranslation:null===F?void 0:F,warnHtmlMessage:R,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=_.value,t.numberFormats=g.value,t.__datetimeFormatters=E(M)?M.__datetimeFormatters:void 0,t.__numberFormatters=E(M)?M.__numberFormatters:void 0;return Z(t)})(),Q(M,c.value,u.value);const C=t.computed({get:()=>c.value,set:e=>{c.value=e,w&&!r&&(w.locale=e),M.locale=c.value}}),A=t.computed({get:()=>u.value,set:e=>{u.value=e,w&&!r&&(w.fallbackLocale=e),M.fallbackLocale=u.value,Q(M,c.value,e)}}),P=t.computed((()=>f.value)),S=t.computed((()=>_.value)),U=t.computed((()=>g.value));const V=(e,t,a,n,r,s)=>{let i;if(c.value,u.value,f.value,_.value,g.value,i=e(M),o(i)&&i===x){const[e,a]=t();return l&&N?n(l):r(e)}if(s(i))return i;throw Error(ye.UNEXPECTED_RETURN_TYPE)};function j(...e){return V((t=>Reflect.apply(oe,null,[t,...e])),(()=>ce(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>d(e)))}const H={normalize:function(e){return e.map((e=>d(e)||o(e)||b(e)?Ce(String(e)):e))},interpolate:e=>e,type:"vnode"};function Y(e){return f.value[e]||{}}Ae++,l&&a&&(t.watch(l.locale,(e=>{s&&(c.value=e,w&&!r&&(w.locale=e),M.locale=e,Q(M,c.value,u.value))})),t.watch(l.fallbackLocale,(e=>{s&&(u.value=e,w&&!r&&(w.fallbackLocale=e),M.fallbackLocale=e,Q(M,c.value,u.value))})));const X={id:Ae,locale:C,fallbackLocale:A,get inheritLocale(){return s},set inheritLocale(e){s=e,w&&(w._sync=e),e&&l&&(c.value=l.locale.value,u.value=l.fallbackLocale.value,w&&(w.locale=l.locale.value,w.fallbackLocale=l.fallbackLocale.value),Q(M,c.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:P,get modifiers(){return W},get pluralRules(){return D||{}},get isGlobal(){return r},get missingWarn(){return k},set missingWarn(e){k=e,M.missingWarn=k},get fallbackWarn(){return y},set fallbackWarn(e){y=e,M.fallbackWarn=y},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return L},set fallbackFormat(e){L=e,M.fallbackFormat=L},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,M.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,M.escapeParameter=e},t:j,getLocaleMessage:Y,setLocaleMessage:function(e,t){f.value[e]=t,w&&w.setLocaleMessage(e,t),M.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},w&&w.mergeLocaleMessage(e,t),De(t,f.value[e]),M.messages=f.value},getPostTranslationHandler:function(){return v(F)?F:null},setPostTranslationHandler:function(e){F=e,M.postTranslation=e},getMissingHandler:function(){return I},setMissingHandler:function(e){null!==e&&(T=Pe(e)),I=e,M.missing=T},[Ie]:function(e){D=e,M.pluralRules=D}};return X.datetimeFormats=S,X.numberFormats=U,X.rt=function(...e){const[t,a,n]=e;if(n&&!h(n))throw Error(ye.INVALID_ARGUMENT);return j(t,a,m({resolvedMessage:!0},n||{}))},X.te=function(e,t){const a=Y(d(t)?t:c.value);return null!==M.messageResolver(a,e)},X.tm=function(e){const t=function(e){let t=null;const a=$(M,u.value,c.value);for(let n=0;n<a.length;n++){const l=f.value[a[n]]||{},r=M.messageResolver(l,e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},X.d=function(...e){return V((t=>Reflect.apply(ue,null,[t,...e])),(()=>fe(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>B),(e=>d(e)))},X.n=function(...e){return V((t=>Reflect.apply(ge,null,[t,...e])),(()=>ve(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>B),(e=>d(e)))},X.getDateTimeFormat=function(e){return _.value[e]||{}},X.setDateTimeFormat=function(e,t){_.value[e]=t,w&&w.setDateTimeFormat(e,t),M.datetimeFormats=_.value,_e(M,e,t)},X.mergeDateTimeFormat=function(e,t){_.value[e]=m(_.value[e]||{},t),w&&w.mergeDateTimeFormat(e,t),M.datetimeFormats=_.value,_e(M,e,t)},X.getNumberFormat=function(e){return g.value[e]||{}},X.setNumberFormat=function(e,t){g.value[e]=t,w&&w.setNumberFormat(e,t),M.numberFormats=g.value,de(M,e,t)},X.mergeNumberFormat=function(e,t){g.value[e]=m(g.value[e]||{},t),w&&w.mergeNumberFormat(e,t),M.numberFormats=g.value,de(M,e,t)},X[Fe]=e.__injectWithOption,X[Ee]=function(...e){return V((t=>{let a;const n=t;try{n.processor=H,a=Reflect.apply(oe,null,[n,...e])}finally{n.processor=null}return a}),(()=>ce(...e)),"translate",(t=>t[Ee](...e)),(e=>[Ce(e)]),(e=>p(e)))},X[Ne]=function(...e){return V((t=>Reflect.apply(ue,null,[t,...e])),(()=>fe(...e)),"datetime format",(t=>t[Ne](...e)),(()=>[]),(e=>d(e)||p(e)))},X[Le]=function(...e){return V((t=>Reflect.apply(ge,null,[t,...e])),(()=>ve(...e)),"number format",(t=>t[Le](...e)),(()=>[]),(e=>d(e)||p(e)))},X[Te]=w,X}const $e={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const Ue=t.defineComponent({name:"i18n-t",props:m({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>o(e)||!isNaN(e)}},$e),setup(e,a){const{slots:n,attrs:l}=a,r=e.i18n||ze({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=d(e.plural)?+e.plural:e.plural);const i=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}(a,o),c=r[Ee](e.keypath,i,s),u=m({},l),f=d(e.tag)||h(e.tag)?e.tag:"span";return t.h(f,u,c)}}}),Ve=Ue;function je(e,a,n,l){const{slots:r,attrs:o}=a;return()=>{const a={part:!0};let s={};e.locale&&(a.locale=e.locale),d(e.format)?a.key=e.format:h(e.format)&&(d(e.format.key)&&(a.key=e.format.key),s=Object.keys(e.format).reduce(((t,a)=>n.includes(a)?m({},t,{[a]:e.format[a]}):t),{}));const i=l(e.value,a,s);let c=[a.key];p(i)?c=i.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:i}):[e.value];var l;return p(l=n)&&!d(l[0])&&(n[0].key=`${e.type}-${t}`),n})):d(i)&&(c=[i]);const u=m({},o),f=d(e.tag)||h(e.tag)?e.tag:"span";return t.h(f,u,c)}}const He=t.defineComponent({name:"i18n-n",props:m({value:{type:Number,required:!0},format:{type:[String,Object]}},$e),setup(e,t){const a=e.i18n||ze({useScope:"parent",__useComponent:!0});return je(e,t,pe,((...e)=>a[Le](...e)))}}),xe=He,Ge=t.defineComponent({name:"i18n-d",props:m({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},$e),setup(e,t){const a=e.i18n||ze({useScope:"parent",__useComponent:!0});return je(e,t,me,((...e)=>a[Ne](...e)))}}),Be=Ge;let Ye=null;const Xe=n("global-vue-i18n");function ze(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(ye.MUST_BE_CALL_SETUP_TOP);if(null==Ye)throw Error(ye.NOT_INSTALLED);const l=function(e){{const t=e.proxy;if(null==t)throw Error(ye.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(ye.NOT_INSTALLED);return a}}(n),r=function(e){return e.global}(l),o=function(e){return e.proxy.$options}(n),s=function(e,t){return c(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,o);if("legacy"===l.mode&&!e.__useComponent){if(!l.allowComposition)throw Error(ye.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,a,n,l={}){const r="local"===a,o=t.shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(ye.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=b(l.inheritLocale)?l.inheritLocale:!d(l.locale),c=t.ref(!r||s?n.locale.value:d(l.locale)?l.locale:G),u=t.ref(!r||s?n.fallbackLocale.value:d(l.fallbackLocale)||p(l.fallbackLocale)||E(l.fallbackLocale)||!1===l.fallbackLocale?l.fallbackLocale:c.value),m=t.ref(we(c.value,l)),f=t.ref(E(l.datetimeFormats)?l.datetimeFormats:{[c.value]:{}}),_=t.ref(E(l.numberFormats)?l.numberFormats:{[c.value]:{}}),g=r?n.missingWarn:!b(l.missingWarn)&&!i(l.missingWarn)||l.missingWarn,h=r?n.fallbackWarn:!b(l.fallbackWarn)&&!i(l.fallbackWarn)||l.fallbackWarn,k=r?n.fallbackRoot:!b(l.fallbackRoot)||l.fallbackRoot,y=!!l.fallbackFormat,N=v(l.missing)?l.missing:null,L=v(l.postTranslation)?l.postTranslation:null,I=r?n.warnHtmlMessage:!b(l.warnHtmlMessage)||l.warnHtmlMessage,T=!!l.escapeParameter,F=r?n.modifiers:E(l.modifiers)?l.modifiers:{},R=l.pluralRules||r&&n.pluralRules;function O(){return[c.value,u.value,m.value,f.value,_.value]}const W=t.computed({get:()=>o.value?o.value.locale.value:c.value,set:e=>{o.value&&(o.value.locale.value=e),c.value=e}}),w=t.computed({get:()=>o.value?o.value.fallbackLocale.value:u.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),u.value=e}}),M=t.computed((()=>o.value?o.value.messages.value:m.value)),D=t.computed((()=>f.value)),C=t.computed((()=>_.value));function A(){return o.value?o.value.getPostTranslationHandler():L}function P(e){o.value&&o.value.setPostTranslationHandler(e)}function S(){return o.value?o.value.getMissingHandler():N}function $(e){o.value&&o.value.setMissingHandler(e)}function U(e){return O(),e()}function V(...e){return o.value?U((()=>Reflect.apply(o.value.t,null,[...e]))):U((()=>""))}function j(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""}function H(...e){return o.value?U((()=>Reflect.apply(o.value.d,null,[...e]))):U((()=>""))}function x(...e){return o.value?U((()=>Reflect.apply(o.value.n,null,[...e]))):U((()=>""))}function B(e){return o.value?o.value.tm(e):{}}function Y(e,t){return!!o.value&&o.value.te(e,t)}function X(e){return o.value?o.value.getLocaleMessage(e):{}}function z(e,t){o.value&&(o.value.setLocaleMessage(e,t),m.value[e]=t)}function J(e,t){o.value&&o.value.mergeLocaleMessage(e,t)}function q(e){return o.value?o.value.getDateTimeFormat(e):{}}function Z(e,t){o.value&&(o.value.setDateTimeFormat(e,t),f.value[e]=t)}function K(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)}function Q(e){return o.value?o.value.getNumberFormat(e):{}}function ee(e,t){o.value&&(o.value.setNumberFormat(e,t),_.value[e]=t)}function te(e,t){o.value&&o.value.mergeNumberFormat(e,t)}const ae={get id(){return o.value?o.value.id:-1},locale:W,fallbackLocale:w,messages:M,datetimeFormats:D,numberFormats:C,get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(m.value)},get modifiers(){return o.value?o.value.modifiers:F},get pluralRules(){return o.value?o.value.pluralRules:R},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:g},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:h},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:k},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:y},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:I},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:T},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:V,getPostTranslationHandler:A,setPostTranslationHandler:P,getMissingHandler:S,setMissingHandler:$,rt:j,d:H,n:x,tm:B,te:Y,getLocaleMessage:X,setLocaleMessage:z,mergeLocaleMessage:J,getDateTimeFormat:q,setDateTimeFormat:Z,mergeDateTimeFormat:K,getNumberFormat:Q,setNumberFormat:ee,mergeNumberFormat:te};function ne(e){e.locale.value=c.value,e.fallbackLocale.value=u.value,Object.keys(m.value).forEach((t=>{e.mergeLocaleMessage(t,m.value[t])})),Object.keys(f.value).forEach((t=>{e.mergeDateTimeFormat(t,f.value[t])})),Object.keys(_.value).forEach((t=>{e.mergeNumberFormat(t,_.value[t])})),e.escapeParameter=T,e.fallbackFormat=y,e.fallbackRoot=k,e.fallbackWarn=h,e.missingWarn=g,e.warnHtmlMessage=I}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(ye.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=o.value=e.proxy.$i18n.__composer;"global"===a?(c.value=t.locale.value,u.value=t.fallbackLocale.value,m.value=t.messages.value,f.value=t.datetimeFormats.value,_.value=t.numberFormats.value):r&&ne(t)})),ae}(n,s,r,e)}if("global"===s)return function(e,t,a){let n=h(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=we(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const l=Object.keys(n);if(l.length&&l.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),h(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(h(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}(r,e,o),r;if("parent"===s){let t=function(e,t,a=!1){let n=null;const l=t.root;let r=function(e,t=!1){if(null==e)return null;return e.parent}(t,a);for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer,a&&n&&!n[Fe]&&(n=null))}if(null!=n)break;if(l===r)break;r=r.parent}return n}(l,n,e.__useComponent);return null==t&&(t=r),t}const u=l;let f=u.__getInstance(n);if(null==f){const l=m({},e);"__i18n"in o&&(l.__i18n=o.__i18n),r&&(l.__root=r),f=Se(l,Ye),u.__composerExtend&&u.__composerExtend(f),function(e,n,l){{const r=n.proxy;if(null==r)throw Error(ye.UNEXPECTED_ERROR);const o=l[Te];if(o===e)throw Error(ye.UNEXPECTED_ERROR);r._i18n=o,r._i18n_bridge=!0,a&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),s=!0})),t.onUnmounted((()=>{s&&(r._i18n.unsubscribeDataChanging(r),s=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}))}}(u,n,f),u.__setInstance(n,f)}return f}return z=function(e,t){if(!h(e))return null;let a=R.get(t);if(a||(a=function(e){const t=[];let a,n,l,r,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,l="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=l:n+=l},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===n)return!1;if(n=F(n),!1===n)return!1;f[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!_()){if(r=T(a),i=L[u],o=i[r]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(l=a,!1===s())))return;if(7===u)return t}}(t),a&&R.set(t,a)),!a)return null;const n=a.length;let l=e,r=0;for(;r<n;){const e=l[a[r]];if(void 0===e)return null;l=e,r++}return l},J=$,e.DatetimeFormat=Ge,e.I18nD=Be,e.I18nInjectionKey=Xe,e.I18nN=xe,e.I18nT=Ve,e.NumberFormat=He,e.Translation=Ue,e.VERSION=be,e.castToVueI18n=e=>{if(!(Re in e))throw Error(ye.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},a){Ye=a;const n=!b(e.legacy)||e.legacy,l=!b(e.globalInjection)||e.globalInjection,r=!n||!!e.allowComposition,o=new Map,[s,i]=function(e,a,n){const l=t.effectScope();{if(!Oe(n))throw Error(ye.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=l.run((()=>Se(e,n)));if(null==t)throw Error(ye.UNEXPECTED_ERROR);return[l,t]}}(e,0,a);{const e=i[Te];let t=null;Object.defineProperty(e,"global",{get:()=>i}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...r)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(ye.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const a=E(t[0])?t[0]:{};(!b(a.globalInstall)||a.globalInstall)&&(e.component(Ue.name,Ue),e.component(He.name,He),e.component(Ge.name,Ge))}(a,...r),!n&&l&&(t=function(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}(a,e,i)),a.mixin(function(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>De(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(n){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>De(JSON.parse(t),e))),a.i18n.messages=e}catch(n){}const{sharedMessages:l}=a.i18n;l&&E(l)&&De(l,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||E(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ye))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const a={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(a).forEach((t=>Object.defineProperty(e,t,{value:a[t]}))),e}},e.useI18n=ze,e}({},VueDemi); | ||
var VueI18nBridge=function(e,t){"use strict";const a="undefined"!=typeof window,n=(e,t=!1)=>t?Symbol.for(e):Symbol(e),l=(e,t,a)=>r({l:e,k:t,s:a}),r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),s=e=>"[object Date]"===y(e),i=e=>"[object RegExp]"===y(e),c=e=>E(e)&&0===Object.keys(e).length;function u(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const m=Object.assign;function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const _=Object.prototype.hasOwnProperty;function g(e,t){return _.call(e,t)}const p=Array.isArray,v=e=>"function"==typeof e,d=e=>"string"==typeof e,b=e=>"boolean"==typeof e,h=e=>null!==e&&"object"==typeof e,k=Object.prototype.toString,y=e=>k.call(e),E=e=>{if(!h(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};const N=15,L=[];L[0]={w:[0],i:[3,0],"[":[4],o:[7]},L[1]={w:[1],".":[2],"[":[4],o:[7]},L[2]={w:[2],i:[3,0],0:[3,0]},L[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},L[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},L[5]={"'":[4,0],o:8,l:[5,0]},L[6]={'"':[4,0],o:8,l:[6,0]};const I=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function F(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(a=t,I.test(a)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var a}const R=new Map;function O(e,t){return h(e)?e[t]:null}const W=e=>e,w=e=>"",M="text",D=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,a,n)=>0===n?e+a:e+t+a),"")}(e),C=e=>null==e?"":p(e)||E(e)&&e.toString===k?JSON.stringify(e,null,2):String(e);function A(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function P(e={}){const t=e.locale,a=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),n=h(e.pluralRules)&&d(t)&&v(e.pluralRules[t])?e.pluralRules[t]:A,l=h(e.pluralRules)&&d(t)&&v(e.pluralRules[t])?A:void 0,r=e.list||[],s=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=v(e.messages)?e.messages(t):!!h(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):w)}const c=E(e.processor)&&v(e.processor.normalize)?e.processor.normalize:D,u=E(e.processor)&&v(e.processor.interpolate)?e.processor.interpolate:C,m={list:e=>r[e],named:e=>s[e],plural:e=>e[n(a,e.length,l)],linked:(t,...a)=>{const[n,l]=a;let r="text",o="";1===a.length?h(n)?(o=n.modifier||o,r=n.type||r):d(n)&&(o=n||o):2===a.length&&(d(n)&&(o=n||o),d(l)&&(r=l||r));const s=i(t)(m),c="vnode"===r&&p(s)&&o?s[0]:s;return o?(u=o,e.modifiers?e.modifiers[u]:W)(c,r):c;var u},message:i,type:E(e.processor)&&d(e.processor.type)?e.processor.type:M,interpolate:u,normalize:c};return m}function S(e,t,a){return[...new Set([a,...p(t)?t:h(t)?Object.keys(t):d(t)?[t]:[a]])]}function $(e,t,a){const n=d(a)?a:G,l=e;l.__localeChainCache||(l.__localeChainCache=new Map);let r=l.__localeChainCache.get(n);if(!r){r=[];let e=[a];for(;p(e);)e=U(r,e,t);const o=p(t)||!E(t)?t:t.default?t.default:null;e=d(o)?[o]:o,p(e)&&U(r,e,!1),l.__localeChainCache.set(n,r)}return r}function U(e,t,a){let n=!0;for(let l=0;l<t.length&&b(n);l++){const r=t[l];d(r)&&(n=V(e,t[l],a))}return n}function V(e,t,a){let n;const l=t.split("-");do{n=j(e,l.join("-"),a),l.splice(-1,1)}while(l.length&&!0===n);return n}function j(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const l=t.replace(/!/g,"");e.push(l),(p(a)||E(a))&&a[l]&&(n=a[l])}return n}const x="9.3.0-beta.25",H=-1,G="en-US",B="",Y=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let X,z,J;let q=null;const Z=e=>{q=e},K=()=>q;let Q=0;function ee(e={}){const t=d(e.version)?e.version:x,a=d(e.locale)?e.locale:G,n=p(e.fallbackLocale)||E(e.fallbackLocale)||d(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=E(e.messages)?e.messages:{[a]:{}},r=E(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=E(e.numberFormats)?e.numberFormats:{[a]:{}},s=m({},e.modifiers||{},{upper:(e,t)=>"text"===t&&d(e)?e.toUpperCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&d(e)?e.toLowerCase():"vnode"===t&&h(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&d(e)?Y(e):"vnode"===t&&h(e)&&"__v_isVNode"in e?Y(e.children):e}),c=e.pluralRules||{},f=v(e.missing)?e.missing:null,_=!b(e.missingWarn)&&!i(e.missingWarn)||e.missingWarn,g=!b(e.fallbackWarn)&&!i(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,y=!!e.unresolving,N=v(e.postTranslation)?e.postTranslation:null,L=E(e.processor)?e.processor:null,I=!b(e.warnHtmlMessage)||e.warnHtmlMessage,T=!!e.escapeParameter,F=v(e.messageCompiler)?e.messageCompiler:X,R=v(e.messageResolver)?e.messageResolver:z||O,W=v(e.localeFallbacker)?e.localeFallbacker:J||S,w=h(e.fallbackContext)?e.fallbackContext:void 0,M=v(e.onWarn)?e.onWarn:u,D=e,C=h(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,A=h(D.__numberFormatters)?D.__numberFormatters:new Map,P=h(D.__meta)?D.__meta:{};Q++;const $={version:t,cid:Q,locale:a,fallbackLocale:n,messages:l,modifiers:s,pluralRules:c,missing:f,missingWarn:_,fallbackWarn:g,fallbackFormat:k,unresolving:y,postTranslation:N,processor:L,warnHtmlMessage:I,escapeParameter:T,messageCompiler:F,messageResolver:R,localeFallbacker:W,fallbackContext:w,onWarn:M,__meta:P};return $.datetimeFormats=r,$.numberFormats=o,$.__datetimeFormatters=C,$.__numberFormatters=A,$}function te(e,t,a,n,l){const{missing:r,onWarn:o}=e;if(null!==r){const n=r(e,a,t,l);return d(n)?n:t}return t}function ae(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let ne=N;const le=()=>++ne,re={INVALID_ARGUMENT:ne,INVALID_DATE_ARGUMENT:le(),INVALID_ISO_DATE_ARGUMENT:le(),NOT_SUPPORT_AST:le(),__EXTEND_POINT__:le()},oe=()=>"",se=e=>v(e),ie=e=>h(e)&&0===e.type&&"body"in e;function ce(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:l,messageCompiler:r,fallbackLocale:s,messages:i}=e,[c,u]=fe(...t),m=b(u.missingWarn)?u.missingWarn:e.missingWarn,_=b(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,g=b(u.escapeParameter)?u.escapeParameter:e.escapeParameter,v=!!u.resolvedMessage,k=d(u.default)||b(u.default)?b(u.default)?r?c:()=>c:u.default:a?r?c:()=>c:"",y=a||""!==k,E=d(u.locale)?u.locale:e.locale;g&&function(e){p(e.list)?e.list=e.list.map((e=>d(e)?f(e):e)):h(e.named)&&Object.keys(e.named).forEach((t=>{d(e.named[t])&&(e.named[t]=f(e.named[t]))}))}(u);let[N,L,I]=v?[c,E,i[E]||{}]:ue(e,c,E,s,_,m),T=N,F=c;if(v||d(T)||ie(T)||se(T)||y&&(T=k,F=T),!(v||(d(T)||ie(T)||se(T))&&d(L)))return l?H:c;let R=!1;const O=se(T)?T:me(e,c,L,T,F,(()=>{R=!0}));if(R)return T;const W=function(e,t,a,n){const{modifiers:l,pluralRules:r,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:m}=e,f=n=>{let l=s(a,n);if(null==l&&m){const[,,e]=ue(m,n,t,i,c,u);l=s(e,n)}if(d(l)||ie(l)){let a=!1;const r=me(e,n,t,l,n,(()=>{a=!0}));return a?oe:r}return se(l)?l:oe},_={locale:t,modifiers:l,pluralRules:r,messages:f};e.processor&&(_.processor=e.processor);n.list&&(_.list=n.list);n.named&&(_.named=n.named);o(n.plural)&&(_.pluralIndex=n.plural);return _}(e,L,I,u),w=function(e,t,a){const n=t(a);return n}(0,O,P(W));return n?n(w,c):w}function ue(e,t,a,n,l,r){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,f={},_=null;for(let g=0;g<u.length&&(m=u[g],f=o[m]||{},null===(_=i(f,t))&&(_=f[t]),!(d(_)||ie(_)||se(_)));g++){const a=te(e,t,m,0,"translate");a!==t&&(_=a)}return[_,m,f]}function me(e,t,a,n,r,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(se(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==s){const e=()=>n;return e.locale=a,e.key=t,e}const c=s(n,function(e,t,a,n,r,o){return{warnHtmlMessage:r,onError:e=>{throw o&&o(e),e},onCacheKey:e=>l(t,a,e)}}(0,a,r,0,i,o));return c.locale=a,c.key=t,c.source=n,c}function fe(...e){const[t,a,n]=e,l={};if(!(d(t)||o(t)||se(t)||ie(t)))throw Error(re.INVALID_ARGUMENT);const r=o(t)?String(t):(se(t),t);return o(a)?l.plural=a:d(a)?l.default=a:E(a)&&!c(a)?l.named=a:p(a)&&(l.list=a),o(n)?l.plural=n:d(n)?l.default=n:E(n)&&m(l,n),[r,l]}function _e(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,u,f,_]=pe(...t);b(f.missingWarn)?f.missingWarn:e.missingWarn;b(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,p=d(f.locale)?f.locale:e.locale,v=o(e,l,p);if(!d(i)||""===i)return new Intl.DateTimeFormat(p,_).format(u);let h,k={},y=null;for(let c=0;c<v.length&&(h=v[c],k=a[h]||{},y=k[i],!E(y));c++)te(e,i,h,0,"datetime format");if(!E(y)||!d(h))return n?H:i;let N=`${h}__${i}`;c(_)||(N=`${N}__${JSON.stringify(_)}`);let L=s.get(N);return L||(L=new Intl.DateTimeFormat(h,m({},y,_)),s.set(N,L)),g?L.formatToParts(u):L.format(u)}const ge=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function pe(...e){const[t,a,n,l]=e,r={};let i,c={};if(d(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(re.INVALID_ISO_DATE_ARGUMENT);const a=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(a);try{i.toISOString()}catch(u){throw Error(re.INVALID_ISO_DATE_ARGUMENT)}}else if(s(t)){if(isNaN(t.getTime()))throw Error(re.INVALID_DATE_ARGUMENT);i=t}else{if(!o(t))throw Error(re.INVALID_ARGUMENT);i=t}return d(a)?r.key=a:E(a)&&Object.keys(a).forEach((e=>{ge.includes(e)?c[e]=a[e]:r[e]=a[e]})),d(n)?r.locale=n:E(n)&&(c=n),E(l)&&(c=l),[r.key||"",i,r,c]}function ve(e,t,a){const n=e;for(const l in a){const e=`${t}__${l}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function de(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,u,f,_]=he(...t);b(f.missingWarn)?f.missingWarn:e.missingWarn;b(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,p=d(f.locale)?f.locale:e.locale,v=o(e,l,p);if(!d(i)||""===i)return new Intl.NumberFormat(p,_).format(u);let h,k={},y=null;for(let c=0;c<v.length&&(h=v[c],k=a[h]||{},y=k[i],!E(y));c++)te(e,i,h,0,"number format");if(!E(y)||!d(h))return n?H:i;let N=`${h}__${i}`;c(_)||(N=`${N}__${JSON.stringify(_)}`);let L=s.get(N);return L||(L=new Intl.NumberFormat(h,m({},y,_)),s.set(N,L)),g?L.formatToParts(u):L.format(u)}const be=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function he(...e){const[t,a,n,l]=e,r={};let s={};if(!o(t))throw Error(re.INVALID_ARGUMENT);const i=t;return d(a)?r.key=a:E(a)&&Object.keys(a).forEach((e=>{be.includes(e)?s[e]=a[e]:r[e]=a[e]})),d(n)?r.locale=n:E(n)&&(s=n),E(l)&&(s=l),[r.key||"",i,r,s]}function ke(e,t,a){const n=e;for(const l in a){const e=`${t}__${l}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}const ye="9.3.0-beta.25";let Ee=N;const Ne=()=>++Ee,Le={UNEXPECTED_RETURN_TYPE:Ee,INVALID_ARGUMENT:Ne(),MUST_BE_CALL_SETUP_TOP:Ne(),NOT_INSTALLED:Ne(),NOT_AVAILABLE_IN_LEGACY_MODE:Ne(),REQUIRED_VALUE:Ne(),INVALID_VALUE:Ne(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Ne(),NOT_INSTALLED_WITH_PROVIDE:Ne(),UNEXPECTED_ERROR:Ne(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Ne(),BRIDGE_SUPPORT_VUE_2_ONLY:Ne(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Ne(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Ne(),__EXTEND_POINT__:Ne()},Ie=n("__translateVNode"),Te=n("__datetimeParts"),Fe=n("__numberParts"),Re=n("__setPluralRules"),Oe=n("__legacyVueI18n"),We=n("__injectWithOption"),we="__VUE_I18N_BRIDGE__";function Me(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function De(e){if(!h(e))return e;for(const t in e)if(g(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let l=e,r=!1;for(let e=0;e<n;e++){if(a[e]in l||(l[a[e]]={}),!h(l[a[e]])){r=!0;break}l=l[a[e]]}r||(l[a[n]]=e[t],delete e[t]),h(l[a[n]])&&De(l[a[n]])}else h(e[t])&&De(e[t]);return e}function Ce(e,t){const{messages:a,__i18n:n,messageResolver:l,flatJson:r}=t,o=E(a)?a:p(n)?{}:{[e]:{}};if(p(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},Pe(a,o[t])):Pe(a,o)}else d(e)&&Pe(JSON.parse(e),o)})),null==l&&r)for(const s in o)g(o,s)&&De(o[s]);return o}const Ae=e=>!h(e)||p(e);function Pe(e,t){if(Ae(e)||Ae(t))throw Error(Le.INVALID_VALUE);for(const a in e)g(e,a)&&(Ae(e[a])||Ae(t[a])?t[a]=e[a]:Pe(e[a],t[a]))}function Se(e){return e.proxy.$options}function $e(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let Ue=0;function Ve(e){return(a,n,l,r)=>e(n,l,t.getCurrentInstance()||void 0,r)}function je(e={},n){const{__root:l}=e,r=void 0===l;let s=!b(e.inheritLocale)||e.inheritLocale;const c=t.ref(l&&s?l.locale.value:d(e.locale)?e.locale:G),u=t.ref(l&&s?l.fallbackLocale.value:d(e.fallbackLocale)||p(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:c.value),f=t.ref(Ce(c.value,e)),_=t.ref(E(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),g=t.ref(E(e.numberFormats)?e.numberFormats:{[c.value]:{}});let k=l?l.missingWarn:!b(e.missingWarn)&&!i(e.missingWarn)||e.missingWarn,y=l?l.fallbackWarn:!b(e.fallbackWarn)&&!i(e.fallbackWarn)||e.fallbackWarn,N=l?l.fallbackRoot:!b(e.fallbackRoot)||e.fallbackRoot,L=!!e.fallbackFormat,I=v(e.missing)?e.missing:null,T=v(e.missing)?Ve(e.missing):null,F=v(e.postTranslation)?e.postTranslation:null,R=l?l.warnHtmlMessage:!b(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter;const W=l?l.modifiers:E(e.modifiers)?e.modifiers:{};let w,M,D=e.pluralRules||l&&l.pluralRules;{Me(n);const e={locale:c.value,fallbackLocale:u.value,messages:f.value,dateTimeFormats:_.value,numberFormats:g.value,modifiers:W,missing:I,fallbackRoot:N,postTranslation:F,pluralizationRules:D,escapeParameterHtml:O,sync:s,silentFallbackWarn:b(y)?!y:y,silentTranslationWarn:b(k)?!k:k,formatFallbackMessages:b(L)?!L:L,warnHtmlInMessage:b(R)&&R?"warn":"off",__VUE_I18N_BRIDGE__:we};w=new n(e)}M=(()=>{r&&Z(null);const t={version:ye,locale:c.value,fallbackLocale:u.value,messages:f.value,modifiers:W,pluralRules:D,missing:null===T?void 0:T,missingWarn:k,fallbackWarn:y,fallbackFormat:L,unresolving:!0,postTranslation:null===F?void 0:F,warnHtmlMessage:R,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=_.value,t.numberFormats=g.value,t.__datetimeFormatters=E(M)?M.__datetimeFormatters:void 0,t.__numberFormatters=E(M)?M.__numberFormatters:void 0;const a=ee(t);return r&&Z(a),a})(),ae(M,c.value,u.value);const C=t.computed({get:()=>c.value,set:e=>{c.value=e,w&&!r&&(w.locale=e),M.locale=c.value}}),A=t.computed({get:()=>u.value,set:e=>{u.value=e,w&&!r&&(w.fallbackLocale=e),M.fallbackLocale=u.value,ae(M,c.value,e)}}),P=t.computed((()=>f.value)),S=t.computed((()=>_.value)),U=t.computed((()=>g.value));const V=(e,t,a,n,s,i)=>{let m;c.value,u.value,f.value,_.value,g.value;try{0,r||(M.fallbackContext=l?K():void 0),m=e(M)}finally{r||(M.fallbackContext=void 0)}if(o(m)&&m===H){const[e,a]=t();return l&&N?n(l):s(e)}if(i(m))return m;throw Error(Le.UNEXPECTED_RETURN_TYPE)};function j(...e){return V((t=>Reflect.apply(ce,null,[t,...e])),(()=>fe(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>d(e)))}const x={normalize:function(e){return e.map((e=>d(e)||o(e)||b(e)?$e(String(e)):e))},interpolate:e=>e,type:"vnode"};function Y(e){return f.value[e]||{}}Ue++,l&&a&&(t.watch(l.locale,(e=>{s&&(c.value=e,w&&!r&&(w.locale=e),M.locale=e,ae(M,c.value,u.value))})),t.watch(l.fallbackLocale,(e=>{s&&(u.value=e,w&&!r&&(w.fallbackLocale=e),M.fallbackLocale=e,ae(M,c.value,u.value))})));const X={id:Ue,locale:C,fallbackLocale:A,get inheritLocale(){return s},set inheritLocale(e){s=e,w&&(w._sync=e),e&&l&&(c.value=l.locale.value,u.value=l.fallbackLocale.value,w&&(w.locale=l.locale.value,w.fallbackLocale=l.fallbackLocale.value),ae(M,c.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:P,get modifiers(){return W},get pluralRules(){return D||{}},get isGlobal(){return r},get missingWarn(){return k},set missingWarn(e){k=e,M.missingWarn=k},get fallbackWarn(){return y},set fallbackWarn(e){y=e,M.fallbackWarn=y},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return L},set fallbackFormat(e){L=e,M.fallbackFormat=L},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,M.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,M.escapeParameter=e},t:j,getLocaleMessage:Y,setLocaleMessage:function(e,t){f.value[e]=t,w&&w.setLocaleMessage(e,t),M.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},w&&w.mergeLocaleMessage(e,t),Pe(t,f.value[e]),M.messages=f.value},getPostTranslationHandler:function(){return v(F)?F:null},setPostTranslationHandler:function(e){F=e,M.postTranslation=e},getMissingHandler:function(){return I},setMissingHandler:function(e){null!==e&&(T=Ve(e)),I=e,M.missing=T},[Re]:function(e){D=e,M.pluralRules=D}};return X.datetimeFormats=S,X.numberFormats=U,X.rt=function(...e){const[t,a,n]=e;if(n&&!h(n))throw Error(Le.INVALID_ARGUMENT);return j(t,a,m({resolvedMessage:!0},n||{}))},X.te=function(e,t){const a=Y(d(t)?t:c.value);return null!==M.messageResolver(a,e)},X.tm=function(e){const t=function(e){let t=null;const a=$(M,u.value,c.value);for(let n=0;n<a.length;n++){const l=f.value[a[n]]||{},r=M.messageResolver(l,e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},X.d=function(...e){return V((t=>Reflect.apply(_e,null,[t,...e])),(()=>pe(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>B),(e=>d(e)))},X.n=function(...e){return V((t=>Reflect.apply(de,null,[t,...e])),(()=>he(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>B),(e=>d(e)))},X.getDateTimeFormat=function(e){return _.value[e]||{}},X.setDateTimeFormat=function(e,t){_.value[e]=t,w&&w.setDateTimeFormat(e,t),M.datetimeFormats=_.value,ve(M,e,t)},X.mergeDateTimeFormat=function(e,t){_.value[e]=m(_.value[e]||{},t),w&&w.mergeDateTimeFormat(e,t),M.datetimeFormats=_.value,ve(M,e,t)},X.getNumberFormat=function(e){return g.value[e]||{}},X.setNumberFormat=function(e,t){g.value[e]=t,w&&w.setNumberFormat(e,t),M.numberFormats=g.value,ke(M,e,t)},X.mergeNumberFormat=function(e,t){g.value[e]=m(g.value[e]||{},t),w&&w.mergeNumberFormat(e,t),M.numberFormats=g.value,ke(M,e,t)},X[We]=e.__injectWithOption,X[Ie]=function(...e){return V((t=>{let a;const n=t;try{n.processor=x,a=Reflect.apply(ce,null,[n,...e])}finally{n.processor=null}return a}),(()=>fe(...e)),"translate",(t=>t[Ie](...e)),(e=>[$e(e)]),(e=>p(e)))},X[Te]=function(...e){return V((t=>Reflect.apply(_e,null,[t,...e])),(()=>pe(...e)),"datetime format",(t=>t[Te](...e)),(()=>[]),(e=>d(e)||p(e)))},X[Fe]=function(...e){return V((t=>Reflect.apply(de,null,[t,...e])),(()=>he(...e)),"number format",(t=>t[Fe](...e)),(()=>[]),(e=>d(e)||p(e)))},X[Oe]=w,X}const xe={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const He=t.defineComponent({name:"i18n-t",props:m({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>o(e)||!isNaN(e)}},xe),setup(e,a){const{slots:n,attrs:l}=a,r=e.i18n||Ke({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=d(e.plural)?+e.plural:e.plural);const i=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}(a,o),c=r[Ie](e.keypath,i,s),u=m({},l),f=d(e.tag)||h(e.tag)?e.tag:"span";return t.h(f,u,c)}}}),Ge=He;function Be(e,a,n,l){const{slots:r,attrs:o}=a;return()=>{const a={part:!0};let s={};e.locale&&(a.locale=e.locale),d(e.format)?a.key=e.format:h(e.format)&&(d(e.format.key)&&(a.key=e.format.key),s=Object.keys(e.format).reduce(((t,a)=>n.includes(a)?m({},t,{[a]:e.format[a]}):t),{}));const i=l(e.value,a,s);let c=[a.key];p(i)?c=i.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:i}):[e.value];var l;return p(l=n)&&!d(l[0])&&(n[0].key=`${e.type}-${t}`),n})):d(i)&&(c=[i]);const u=m({},o),f=d(e.tag)||h(e.tag)?e.tag:"span";return t.h(f,u,c)}}const Ye=t.defineComponent({name:"i18n-n",props:m({value:{type:Number,required:!0},format:{type:[String,Object]}},xe),setup(e,t){const a=e.i18n||Ke({useScope:"parent",__useComponent:!0});return Be(e,t,be,((...e)=>a[Fe](...e)))}}),Xe=Ye,ze=t.defineComponent({name:"i18n-d",props:m({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},xe),setup(e,t){const a=e.i18n||Ke({useScope:"parent",__useComponent:!0});return Be(e,t,ge,((...e)=>a[Te](...e)))}}),Je=ze;let qe=null;const Ze=n("global-vue-i18n");function Ke(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(Le.MUST_BE_CALL_SETUP_TOP);if(null==qe)throw Error(Le.NOT_INSTALLED);const l=function(e){{const t=e.proxy;if(null==t)throw Error(Le.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(Le.NOT_INSTALLED);return a}}(n),r=function(e){return e.global}(l),o=Se(n),s=function(e,t){return c(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,o);if("legacy"===l.mode&&!e.__useComponent){if(!l.allowComposition)throw Error(Le.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,a,n,l={}){const r="local"===a,o=t.shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(Le.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=b(l.inheritLocale)?l.inheritLocale:!d(l.locale),c=t.ref(!r||s?n.locale.value:d(l.locale)?l.locale:G),u=t.ref(!r||s?n.fallbackLocale.value:d(l.fallbackLocale)||p(l.fallbackLocale)||E(l.fallbackLocale)||!1===l.fallbackLocale?l.fallbackLocale:c.value),m=t.ref(Ce(c.value,l)),f=t.ref(E(l.datetimeFormats)?l.datetimeFormats:{[c.value]:{}}),_=t.ref(E(l.numberFormats)?l.numberFormats:{[c.value]:{}}),g=r?n.missingWarn:!b(l.missingWarn)&&!i(l.missingWarn)||l.missingWarn,h=r?n.fallbackWarn:!b(l.fallbackWarn)&&!i(l.fallbackWarn)||l.fallbackWarn,k=r?n.fallbackRoot:!b(l.fallbackRoot)||l.fallbackRoot,y=!!l.fallbackFormat,N=v(l.missing)?l.missing:null,L=v(l.postTranslation)?l.postTranslation:null,I=r?n.warnHtmlMessage:!b(l.warnHtmlMessage)||l.warnHtmlMessage,T=!!l.escapeParameter,F=r?n.modifiers:E(l.modifiers)?l.modifiers:{},R=l.pluralRules||r&&n.pluralRules;function O(){return[c.value,u.value,m.value,f.value,_.value]}const W=t.computed({get:()=>o.value?o.value.locale.value:c.value,set:e=>{o.value&&(o.value.locale.value=e),c.value=e}}),w=t.computed({get:()=>o.value?o.value.fallbackLocale.value:u.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),u.value=e}}),M=t.computed((()=>o.value?o.value.messages.value:m.value)),D=t.computed((()=>f.value)),C=t.computed((()=>_.value));function A(){return o.value?o.value.getPostTranslationHandler():L}function P(e){o.value&&o.value.setPostTranslationHandler(e)}function S(){return o.value?o.value.getMissingHandler():N}function $(e){o.value&&o.value.setMissingHandler(e)}function U(e){return O(),e()}function V(...e){return o.value?U((()=>Reflect.apply(o.value.t,null,[...e]))):U((()=>""))}function j(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""}function x(...e){return o.value?U((()=>Reflect.apply(o.value.d,null,[...e]))):U((()=>""))}function H(...e){return o.value?U((()=>Reflect.apply(o.value.n,null,[...e]))):U((()=>""))}function B(e){return o.value?o.value.tm(e):{}}function Y(e,t){return!!o.value&&o.value.te(e,t)}function X(e){return o.value?o.value.getLocaleMessage(e):{}}function z(e,t){o.value&&(o.value.setLocaleMessage(e,t),m.value[e]=t)}function J(e,t){o.value&&o.value.mergeLocaleMessage(e,t)}function q(e){return o.value?o.value.getDateTimeFormat(e):{}}function Z(e,t){o.value&&(o.value.setDateTimeFormat(e,t),f.value[e]=t)}function K(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)}function Q(e){return o.value?o.value.getNumberFormat(e):{}}function ee(e,t){o.value&&(o.value.setNumberFormat(e,t),_.value[e]=t)}function te(e,t){o.value&&o.value.mergeNumberFormat(e,t)}const ae={get id(){return o.value?o.value.id:-1},locale:W,fallbackLocale:w,messages:M,datetimeFormats:D,numberFormats:C,get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(m.value)},get modifiers(){return o.value?o.value.modifiers:F},get pluralRules(){return o.value?o.value.pluralRules:R},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:g},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:h},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:k},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:y},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:I},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:T},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:V,getPostTranslationHandler:A,setPostTranslationHandler:P,getMissingHandler:S,setMissingHandler:$,rt:j,d:x,n:H,tm:B,te:Y,getLocaleMessage:X,setLocaleMessage:z,mergeLocaleMessage:J,getDateTimeFormat:q,setDateTimeFormat:Z,mergeDateTimeFormat:K,getNumberFormat:Q,setNumberFormat:ee,mergeNumberFormat:te};function ne(e){e.locale.value=c.value,e.fallbackLocale.value=u.value,Object.keys(m.value).forEach((t=>{e.mergeLocaleMessage(t,m.value[t])})),Object.keys(f.value).forEach((t=>{e.mergeDateTimeFormat(t,f.value[t])})),Object.keys(_.value).forEach((t=>{e.mergeNumberFormat(t,_.value[t])})),e.escapeParameter=T,e.fallbackFormat=y,e.fallbackRoot=k,e.fallbackWarn=h,e.missingWarn=g,e.warnHtmlMessage=I}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(Le.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=o.value=e.proxy.$i18n.__composer;"global"===a?(c.value=t.locale.value,u.value=t.fallbackLocale.value,m.value=t.messages.value,f.value=t.datetimeFormats.value,_.value=t.numberFormats.value):r&&ne(t)})),ae}(n,s,r,e)}if("global"===s)return function(e,t,a){let n=h(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=Ce(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const l=Object.keys(n);if(l.length&&l.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),h(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(h(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}(r,e,o),r;if("parent"===s){let t=function(e,t,a=!1){let n=null;const l=t.root;let r=function(e,t=!1){if(null==e)return null;return e.parent}(t,a);for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer,a&&n&&!n[We]&&(n=null))}if(null!=n)break;if(l===r)break;r=r.parent}return n}(l,n,e.__useComponent);return null==t&&(t=r),t}const u=l;let f=u.__getInstance(n);if(null==f){const l=m({},e);"__i18n"in o&&(l.__i18n=o.__i18n),r&&(l.__root=r),f=je(l,qe),u.__composerExtend&&u.__composerExtend(f),function(e,n,l){{const r=n.proxy;if(null==r)throw Error(Le.UNEXPECTED_ERROR);const o=l[Oe];if(o===e)throw Error(Le.UNEXPECTED_ERROR);r._i18n=o,r._i18n_bridge=!0,a&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),s=!0})),t.onUnmounted((()=>{s&&(r._i18n.unsubscribeDataChanging(r),s=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}))}}(u,n,f),u.__setInstance(n,f)}return f}return z=function(e,t){if(!h(e))return null;let a=R.get(t);if(a||(a=function(e){const t=[];let a,n,l,r,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,l="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=l:n+=l},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===n)return!1;if(n=F(n),!1===n)return!1;f[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!_()){if(r=T(a),i=L[u],o=i[r]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(l=a,!1===s())))return;if(7===u)return t}}(t),a&&R.set(t,a)),!a)return null;const n=a.length;let l=e,r=0;for(;r<n;){const e=l[a[r]];if(void 0===e)return null;l=e,r++}return l},J=$,e.DatetimeFormat=ze,e.I18nD=Je,e.I18nInjectionKey=Ze,e.I18nN=Xe,e.I18nT=Ge,e.NumberFormat=Ye,e.Translation=He,e.VERSION=ye,e.castToVueI18n=e=>{if(!(we in e))throw Error(Le.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},a){qe=a;const n=!b(e.legacy)||e.legacy,l=!b(e.globalInjection)||e.globalInjection,r=!n||!!e.allowComposition,o=new Map,[s,i]=function(e,a,n){const l=t.effectScope();{if(!Me(n))throw Error(Le.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=l.run((()=>je(e,n)));if(null==t)throw Error(Le.UNEXPECTED_ERROR);return[l,t]}}(e,0,a);{const e=i[Oe];let t=null;Object.defineProperty(e,"global",{get:()=>i}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...r)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(Le.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const a=E(t[0])?t[0]:{};(!b(a.globalInstall)||a.globalInstall)&&(e.component(He.name,He),e.component(Ye.name,Ye),e.component(ze.name,ze))}(a,...r),!n&&l&&(t=function(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}(a,e,i)),a.mixin(function(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Pe(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(n){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Pe(JSON.parse(t),e))),a.i18n.messages=e}catch(n){}const{sharedMessages:l}=a.i18n;l&&E(l)&&Pe(l,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||E(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,qe))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const a={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(a).forEach((t=>Object.defineProperty(e,t,{value:a[t]}))),e}},e.useI18n=Ke,e}({},VueDemi); |
{ | ||
"name": "vue-i18n-bridge", | ||
"version": "9.3.0-beta.24", | ||
"version": "9.3.0-beta.25", | ||
"description": "A bridge for Vue I18n Legacy", | ||
@@ -41,8 +41,8 @@ "keywords": [ | ||
"vue-demi": "^0.14.0", | ||
"@intlify/core-base": "9.3.0-beta.24", | ||
"@intlify/shared": "9.3.0-beta.24", | ||
"@intlify/vue-devtools": "9.3.0-beta.24" | ||
"@intlify/core-base": "9.3.0-beta.25", | ||
"@intlify/shared": "9.3.0-beta.25", | ||
"@intlify/vue-devtools": "9.3.0-beta.25" | ||
}, | ||
"devDependencies": { | ||
"@intlify/devtools-if": "9.3.0-beta.24" | ||
"@intlify/devtools-if": "9.3.0-beta.25" | ||
}, | ||
@@ -49,0 +49,0 @@ "optionalDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1301827
30709
27
+ Added@intlify/core-base@9.3.0-beta.25(transitive)
+ Added@intlify/devtools-if@9.3.0-beta.25(transitive)
+ Added@intlify/message-compiler@9.3.0-beta.25(transitive)
+ Added@intlify/shared@9.3.0-beta.25(transitive)
+ Added@intlify/vue-devtools@9.3.0-beta.25(transitive)
- Removed@intlify/core-base@9.3.0-beta.24(transitive)
- Removed@intlify/devtools-if@9.3.0-beta.24(transitive)
- Removed@intlify/message-compiler@9.3.0-beta.24(transitive)
- Removed@intlify/shared@9.3.0-beta.24(transitive)
- Removed@intlify/vue-devtools@9.3.0-beta.24(transitive)