Xazn-app/node_modules/vue-i18n/dist/vue-i18n.runtime.global.prod.js

7 lines
39 KiB
JavaScript
Raw Permalink Normal View History

2025-05-22 16:37:43 +08:00
/*!
* vue-i18n v9.14.4
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/
var VueI18n=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]"===T(e),i=e=>"[object RegExp]"===T(e),c=e=>F(e)&&0===Object.keys(e).length,u=Object.assign,m=Object.create,f=(e=null)=>m(e);function _(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const g=Object.prototype.hasOwnProperty;function p(e,t){return g.call(e,t)}const v=Array.isArray,d=e=>"function"==typeof e,b=e=>"string"==typeof e,E=e=>"boolean"==typeof e,h=e=>null!==e&&"object"==typeof e,k=e=>h(e)&&d(e.then)&&d(e.catch),L=Object.prototype.toString,T=e=>L.call(e),F=e=>{if(!h(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function y(e){let t=e;return()=>++t}function N(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const I=e=>!h(e)||v(e);function R(e,t){if(I(e)||I(t))throw new Error("Invalid value");const a=[{src:e,des:t}];for(;a.length;){const{src:e,des:t}=a.pop();Object.keys(e).forEach((n=>{"__proto__"!==n&&(h(e[n])&&!h(t[n])&&(t[n]=Array.isArray(e[n])?[]:f()),I(t[n])||I(e[n])?t[n]=e[n]:a.push({src:e[n],des:t[n]}))}))}}function O(e,t,a={}){const{domain:n,messages:l,args:r}=a,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=n,o}function M(e){return h(e)&&0===function(e,t,a){for(let n=0;n<t.length;n++){const a=t[n];if(p(e,a)&&null!=e[a])return e[a]}return a}(e,W)&&(p(e,"b")||p(e,"body"))}const W=["t","type"];const w=["b","body","c","cases","s","static","i","items","k","key","m","modifier","v","value",...W],P=[];P[0]={w:[0],i:[3,0],"[":[4],o:[7]},P[1]={w:[1],".":[2],"[":[4],o:[7]},P[2]={w:[2],i:[3,0],0:[3,0]},P[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},P[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},P[5]={"'":[4,0],o:8,l:[5,0]},P[6]={'"':[4,0],o:8,l:[6,0]};const C=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function D(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 A(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(a=t,C.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 S=new Map;function $(e,t){return h(e)?e[t]:null}const U=e=>e,x=e=>"",H="text",j=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,a,n)=>0===n?e+a:e+t+a),"")}(e),V=e=>null==e?"":v(e)||F(e)&&e.toString===L?JSON.stringify(e,null,2):String(e);function G(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Y(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)&&b(t)&&d(e.pluralRules[t])?e.pluralRules[t]:G,l=h(e.pluralRules)&&b(t)&&d(e.pluralRules[t])?G:void 0,r=e.list||[],s=e.named||f();o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=d(e.messages)?e.messages(t):!!h(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):x)}const c=F(e.processor)&&d(e.processor.normalize)?e.processor.normalize:j,m=F(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:V,_={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):b(n)&&(o=n||o):2===a.length&&(b(n)&&(o=n||o),b(l)&&(r=l||r));const s=i(t)(_),c="vnode"===r&&v(s)&&o?s[0]:s;return o?(u=o,e.modifiers?e.modifiers[u]:U)(c,r):c;var u},message:i,type:F(e.processor)&&b(e.processor.type)?e.processor.type:H,interpolate:m,normalize:c,values:u(f(),r,s)};return _}const B=y(17),X={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:B(),INVALID_I