mooho-base-admin-plus 2.0.42 → 2.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/mooho-base-admin-plus.min.esm.js +2343 -856
- package/package/mooho-base-admin-plus.min.js +47 -51
- package/package.json +1 -1
- package/src/setting.js +2 -2
- package/vite.config.js +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import require$$0, { watch, effectScope, reactive, computed, shallowRef, unref, nextTick, defineComponent, inject, h, provide, ref, getCurrentInstance, watchEffect,
|
|
1
|
+
import require$$0, { watch, effectScope, reactive, computed, shallowRef, unref, nextTick, defineComponent, inject, h, provide, ref, getCurrentInstance, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeStyle as normalizeStyle$1, toDisplayString as toDisplayString$1, withDirectives, vModelText, createCommentVNode, pushScopeId, popScopeId, resolveComponent, resolveDirective, createVNode as createVNode$1, withCtx, Fragment, renderList, createBlock, createTextVNode, renderSlot, mergeProps, markRaw, resolveDynamicComponent, withModifiers, normalizeProps, guardReactiveProps, vShow, normalizeClass, Transition, KeepAlive } from "vue";
|
|
2
2
|
import ViewUIPlus from "view-ui-plus";
|
|
3
3
|
function getDevtoolsGlobalHook() {
|
|
4
4
|
return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -161,7 +161,7 @@ function forEachValue(obj, fn) {
|
|
|
161
161
|
function isObject$6(obj) {
|
|
162
162
|
return obj !== null && typeof obj === "object";
|
|
163
163
|
}
|
|
164
|
-
function isPromise$
|
|
164
|
+
function isPromise$5(val) {
|
|
165
165
|
return val && typeof val.then === "function";
|
|
166
166
|
}
|
|
167
167
|
function assert$1(condition, msg) {
|
|
@@ -361,7 +361,7 @@ function registerAction$1(store2, type, handler, local) {
|
|
|
361
361
|
rootGetters: store2.getters,
|
|
362
362
|
rootState: store2.state
|
|
363
363
|
}, payload);
|
|
364
|
-
if (!isPromise$
|
|
364
|
+
if (!isPromise$5(res2)) {
|
|
365
365
|
res2 = Promise.resolve(res2);
|
|
366
366
|
}
|
|
367
367
|
if (store2._devtoolHook) {
|
|
@@ -2549,7 +2549,7 @@ var lodash$1 = { exports: {} };
|
|
|
2549
2549
|
var index2 = -1, length2 = array.length;
|
|
2550
2550
|
while (++index2 < length2) {
|
|
2551
2551
|
var value = array[index2], current = iteratee2(value);
|
|
2552
|
-
if (current != null && (computed2 === undefined$1 ? current === current && !
|
|
2552
|
+
if (current != null && (computed2 === undefined$1 ? current === current && !isSymbol2(current) : comparator(current, computed2))) {
|
|
2553
2553
|
var computed2 = current, result3 = value;
|
|
2554
2554
|
}
|
|
2555
2555
|
}
|
|
@@ -3099,7 +3099,7 @@ var lodash$1 = { exports: {} };
|
|
|
3099
3099
|
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
|
3100
3100
|
while (low < high) {
|
|
3101
3101
|
var mid = low + high >>> 1, computed2 = array[mid];
|
|
3102
|
-
if (computed2 !== null && !
|
|
3102
|
+
if (computed2 !== null && !isSymbol2(computed2) && (retHighest ? computed2 <= value : computed2 < value)) {
|
|
3103
3103
|
low = mid + 1;
|
|
3104
3104
|
} else {
|
|
3105
3105
|
high = mid;
|
|
@@ -3115,9 +3115,9 @@ var lodash$1 = { exports: {} };
|
|
|
3115
3115
|
return 0;
|
|
3116
3116
|
}
|
|
3117
3117
|
value = iteratee2(value);
|
|
3118
|
-
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol =
|
|
3118
|
+
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol2(value), valIsUndefined = value === undefined$1;
|
|
3119
3119
|
while (low < high) {
|
|
3120
|
-
var mid = nativeFloor((low + high) / 2), computed2 = iteratee2(array[mid]), othIsDefined = computed2 !== undefined$1, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol =
|
|
3120
|
+
var mid = nativeFloor((low + high) / 2), computed2 = iteratee2(array[mid]), othIsDefined = computed2 !== undefined$1, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol = isSymbol2(computed2);
|
|
3121
3121
|
if (valIsNaN) {
|
|
3122
3122
|
var setLow = retHighest || othIsReflexive;
|
|
3123
3123
|
} else if (valIsUndefined) {
|
|
@@ -3154,7 +3154,7 @@ var lodash$1 = { exports: {} };
|
|
|
3154
3154
|
if (typeof value == "number") {
|
|
3155
3155
|
return value;
|
|
3156
3156
|
}
|
|
3157
|
-
if (
|
|
3157
|
+
if (isSymbol2(value)) {
|
|
3158
3158
|
return NAN;
|
|
3159
3159
|
}
|
|
3160
3160
|
return +value;
|
|
@@ -3166,7 +3166,7 @@ var lodash$1 = { exports: {} };
|
|
|
3166
3166
|
if (isArray2(value)) {
|
|
3167
3167
|
return arrayMap(value, baseToString) + "";
|
|
3168
3168
|
}
|
|
3169
|
-
if (
|
|
3169
|
+
if (isSymbol2(value)) {
|
|
3170
3170
|
return symbolToString ? symbolToString.call(value) : "";
|
|
3171
3171
|
}
|
|
3172
3172
|
var result3 = value + "";
|
|
@@ -3311,8 +3311,8 @@ var lodash$1 = { exports: {} };
|
|
|
3311
3311
|
}
|
|
3312
3312
|
function compareAscending(value, other) {
|
|
3313
3313
|
if (value !== other) {
|
|
3314
|
-
var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol =
|
|
3315
|
-
var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol =
|
|
3314
|
+
var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol2(value);
|
|
3315
|
+
var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol2(other);
|
|
3316
3316
|
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
3317
3317
|
return 1;
|
|
3318
3318
|
}
|
|
@@ -4194,7 +4194,7 @@ var lodash$1 = { exports: {} };
|
|
|
4194
4194
|
return false;
|
|
4195
4195
|
}
|
|
4196
4196
|
var type = typeof value;
|
|
4197
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null ||
|
|
4197
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol2(value)) {
|
|
4198
4198
|
return true;
|
|
4199
4199
|
}
|
|
4200
4200
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
|
|
@@ -4373,7 +4373,7 @@ var lodash$1 = { exports: {} };
|
|
|
4373
4373
|
return result3;
|
|
4374
4374
|
});
|
|
4375
4375
|
function toKey(value) {
|
|
4376
|
-
if (typeof value == "string" ||
|
|
4376
|
+
if (typeof value == "string" || isSymbol2(value)) {
|
|
4377
4377
|
return value;
|
|
4378
4378
|
}
|
|
4379
4379
|
var result3 = value + "";
|
|
@@ -5447,7 +5447,7 @@ var lodash$1 = { exports: {} };
|
|
|
5447
5447
|
function isString2(value) {
|
|
5448
5448
|
return typeof value == "string" || !isArray2(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
5449
5449
|
}
|
|
5450
|
-
function
|
|
5450
|
+
function isSymbol2(value) {
|
|
5451
5451
|
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
5452
5452
|
}
|
|
5453
5453
|
var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
@@ -5499,7 +5499,7 @@ var lodash$1 = { exports: {} };
|
|
|
5499
5499
|
if (typeof value == "number") {
|
|
5500
5500
|
return value;
|
|
5501
5501
|
}
|
|
5502
|
-
if (
|
|
5502
|
+
if (isSymbol2(value)) {
|
|
5503
5503
|
return NAN;
|
|
5504
5504
|
}
|
|
5505
5505
|
if (isObject2(value)) {
|
|
@@ -6225,7 +6225,7 @@ var lodash$1 = { exports: {} };
|
|
|
6225
6225
|
if (isArray2(value)) {
|
|
6226
6226
|
return arrayMap(value, toKey);
|
|
6227
6227
|
}
|
|
6228
|
-
return
|
|
6228
|
+
return isSymbol2(value) ? [value] : copyArray(stringToPath(toString3(value)));
|
|
6229
6229
|
}
|
|
6230
6230
|
function uniqueId(prefix2) {
|
|
6231
6231
|
var id = ++idCounter;
|
|
@@ -6499,7 +6499,7 @@ var lodash$1 = { exports: {} };
|
|
|
6499
6499
|
lodash2.isSafeInteger = isSafeInteger;
|
|
6500
6500
|
lodash2.isSet = isSet;
|
|
6501
6501
|
lodash2.isString = isString2;
|
|
6502
|
-
lodash2.isSymbol =
|
|
6502
|
+
lodash2.isSymbol = isSymbol2;
|
|
6503
6503
|
lodash2.isTypedArray = isTypedArray2;
|
|
6504
6504
|
lodash2.isUndefined = isUndefined2;
|
|
6505
6505
|
lodash2.isWeakMap = isWeakMap;
|
|
@@ -6822,7 +6822,7 @@ const Setting = {
|
|
|
6822
6822
|
};
|
|
6823
6823
|
let localSetting = window.setting;
|
|
6824
6824
|
if (localSetting) {
|
|
6825
|
-
lodash$1.exports.
|
|
6825
|
+
lodash$1.exports.defaultsDeep(Setting, localSetting);
|
|
6826
6826
|
}
|
|
6827
6827
|
const cookies$2 = {};
|
|
6828
6828
|
cookies$2.set = function(name = "default", value = "", cookieSetting = {}) {
|
|
@@ -6841,14 +6841,14 @@ cookies$2.getAll = function() {
|
|
|
6841
6841
|
cookies$2.remove = function(name = "default") {
|
|
6842
6842
|
return api.remove(`admin-plus-${Setting.appID}-${name}`);
|
|
6843
6843
|
};
|
|
6844
|
-
var isPromise$
|
|
6845
|
-
isPromise$
|
|
6846
|
-
isPromise$
|
|
6847
|
-
function isPromise$
|
|
6844
|
+
var isPromise$4 = { exports: {} };
|
|
6845
|
+
isPromise$4.exports = isPromise$3;
|
|
6846
|
+
isPromise$4.exports.default = isPromise$3;
|
|
6847
|
+
function isPromise$3(obj) {
|
|
6848
6848
|
return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
|
|
6849
6849
|
}
|
|
6850
6850
|
var lodash = lodash$1.exports;
|
|
6851
|
-
var isPromise$
|
|
6851
|
+
var isPromise$2 = isPromise$4.exports;
|
|
6852
6852
|
var main = function(adapter2) {
|
|
6853
6853
|
if (typeof adapter2 !== "object") {
|
|
6854
6854
|
throw new Error("An adapter must be provided, see https://github.com/typicode/lowdb/#usage");
|
|
@@ -6866,11 +6866,11 @@ var main = function(adapter2) {
|
|
|
6866
6866
|
db2._ = _;
|
|
6867
6867
|
db2.read = function() {
|
|
6868
6868
|
var r = adapter2.read();
|
|
6869
|
-
return isPromise$
|
|
6869
|
+
return isPromise$2(r) ? r.then(plant) : plant(r);
|
|
6870
6870
|
};
|
|
6871
6871
|
db2.write = function(returnValue) {
|
|
6872
6872
|
var w2 = adapter2.write(db2.getState());
|
|
6873
|
-
return isPromise$
|
|
6873
|
+
return isPromise$2(w2) ? w2.then(function() {
|
|
6874
6874
|
return returnValue;
|
|
6875
6875
|
}) : returnValue;
|
|
6876
6876
|
};
|
|
@@ -6971,7 +6971,7 @@ db$1.defaults({
|
|
|
6971
6971
|
sys: {},
|
|
6972
6972
|
database: {}
|
|
6973
6973
|
}).write();
|
|
6974
|
-
const util$
|
|
6974
|
+
const util$8 = {
|
|
6975
6975
|
cookies: cookies$2,
|
|
6976
6976
|
db: db$1
|
|
6977
6977
|
};
|
|
@@ -10464,7 +10464,7 @@ const warnAboutDepreation = (deprecatedParam, useInstead) => {
|
|
|
10464
10464
|
const callIfFunction = (arg) => typeof arg === "function" ? arg() : arg;
|
|
10465
10465
|
const hasToPromiseFn = (arg) => arg && typeof arg.toPromise === "function";
|
|
10466
10466
|
const asPromise = (arg) => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
|
|
10467
|
-
const isPromise = (arg) => arg && Promise.resolve(arg) === arg;
|
|
10467
|
+
const isPromise$1 = (arg) => arg && Promise.resolve(arg) === arg;
|
|
10468
10468
|
const DismissReason = Object.freeze({
|
|
10469
10469
|
cancel: "cancel",
|
|
10470
10470
|
backdrop: "backdrop",
|
|
@@ -11134,7 +11134,7 @@ const renderInputType = {};
|
|
|
11134
11134
|
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {
|
|
11135
11135
|
if (typeof params.inputValue === "string" || typeof params.inputValue === "number") {
|
|
11136
11136
|
input.value = params.inputValue;
|
|
11137
|
-
} else if (!isPromise(params.inputValue)) {
|
|
11137
|
+
} else if (!isPromise$1(params.inputValue)) {
|
|
11138
11138
|
warn$2(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof params.inputValue}"`);
|
|
11139
11139
|
}
|
|
11140
11140
|
setInputPlaceholder(input, params);
|
|
@@ -12152,7 +12152,7 @@ const addClasses = (container, popup, params) => {
|
|
|
12152
12152
|
const handleInputOptionsAndValue = (instance, params) => {
|
|
12153
12153
|
if (params.input === "select" || params.input === "radio") {
|
|
12154
12154
|
handleInputOptions(instance, params);
|
|
12155
|
-
} else if (["text", "email", "number", "tel", "textarea"].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
|
|
12155
|
+
} else if (["text", "email", "number", "tel", "textarea"].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise$1(params.inputValue))) {
|
|
12156
12156
|
handleInputValue(instance, params);
|
|
12157
12157
|
}
|
|
12158
12158
|
};
|
|
@@ -12178,7 +12178,7 @@ const getFileValue = (input) => input.files.length ? input.getAttribute("multipl
|
|
|
12178
12178
|
const handleInputOptions = (instance, params) => {
|
|
12179
12179
|
const content = getContent();
|
|
12180
12180
|
const processInputOptions = (inputOptions) => populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
|
|
12181
|
-
if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
|
|
12181
|
+
if (hasToPromiseFn(params.inputOptions) || isPromise$1(params.inputOptions)) {
|
|
12182
12182
|
showLoading();
|
|
12183
12183
|
asPromise(params.inputOptions).then((inputOptions) => {
|
|
12184
12184
|
instance.hideLoading();
|
|
@@ -12802,7 +12802,7 @@ service.interceptors.request.use(
|
|
|
12802
12802
|
store.commit("admin/loader/start");
|
|
12803
12803
|
let baseURL = window.$mode === "development" ? Setting.apiBaseURL.dev : Setting.apiBaseURL.prd;
|
|
12804
12804
|
config.url = baseURL + config.url;
|
|
12805
|
-
const token = util$
|
|
12805
|
+
const token = util$8.cookies.get("token");
|
|
12806
12806
|
config.headers["Authorization"] = "Bearer " + token;
|
|
12807
12807
|
return config;
|
|
12808
12808
|
},
|
|
@@ -12932,8 +12932,8 @@ var account = {
|
|
|
12932
12932
|
actions: {
|
|
12933
12933
|
async login({ dispatch: dispatch2 }, { username = "", password = "" } = {}) {
|
|
12934
12934
|
const res2 = await userlApi.login({ account: username, password });
|
|
12935
|
-
util$
|
|
12936
|
-
util$
|
|
12935
|
+
util$8.cookies.set("uuid", res2.user.id);
|
|
12936
|
+
util$8.cookies.set("token", res2.token);
|
|
12937
12937
|
await dispatch2("admin/user/set", res2.user, { root: true });
|
|
12938
12938
|
await dispatch2("admin/user/setData", res2.data, { root: true });
|
|
12939
12939
|
await dispatch2("load");
|
|
@@ -12941,8 +12941,8 @@ var account = {
|
|
|
12941
12941
|
},
|
|
12942
12942
|
logout({ dispatch: dispatch2 }, { confirm: confirm2 = false } = {}) {
|
|
12943
12943
|
async function logout() {
|
|
12944
|
-
util$
|
|
12945
|
-
util$
|
|
12944
|
+
util$8.cookies.remove("token");
|
|
12945
|
+
util$8.cookies.remove("uuid");
|
|
12946
12946
|
await dispatch2("admin/user/set", {}, { root: true });
|
|
12947
12947
|
if (router$1.currentRoute.value.path != "/login") {
|
|
12948
12948
|
router$1.push("/login?redirect=" + router$1.options.history.location);
|
|
@@ -15085,11 +15085,11 @@ var __glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
15085
15085
|
"default": dataView
|
|
15086
15086
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
15087
15087
|
function pathInit({ dbName = "database", path = "", user: user2 = true, validator: validator2 = () => true, defaultValue = "" }) {
|
|
15088
|
-
const uuid = util$
|
|
15088
|
+
const uuid = util$8.cookies.get("uuid") || "ghost-uuid";
|
|
15089
15089
|
const currentPath = `${dbName}.${user2 ? `user.${uuid}` : "public"}${path ? `.${path}` : ""}`;
|
|
15090
|
-
const value = util$
|
|
15090
|
+
const value = util$8.db.get(currentPath).value();
|
|
15091
15091
|
if (!(value !== void 0 && validator2(value))) {
|
|
15092
|
-
util$
|
|
15092
|
+
util$8.db.set(currentPath, defaultValue).write();
|
|
15093
15093
|
}
|
|
15094
15094
|
return currentPath;
|
|
15095
15095
|
}
|
|
@@ -15097,7 +15097,7 @@ var db = {
|
|
|
15097
15097
|
namespaced: true,
|
|
15098
15098
|
actions: {
|
|
15099
15099
|
set(context, { dbName = "database", path = "", value = "", user: user2 = false }) {
|
|
15100
|
-
util$
|
|
15100
|
+
util$8.db.set(
|
|
15101
15101
|
pathInit({
|
|
15102
15102
|
dbName,
|
|
15103
15103
|
path,
|
|
@@ -15110,7 +15110,7 @@ var db = {
|
|
|
15110
15110
|
return new Promise((resolve) => {
|
|
15111
15111
|
resolve(
|
|
15112
15112
|
lodash$1.exports.cloneDeep(
|
|
15113
|
-
util$
|
|
15113
|
+
util$8.db.get(
|
|
15114
15114
|
pathInit({
|
|
15115
15115
|
dbName,
|
|
15116
15116
|
path,
|
|
@@ -15125,7 +15125,7 @@ var db = {
|
|
|
15125
15125
|
database(context, { user: user2 = false } = {}) {
|
|
15126
15126
|
return new Promise((resolve) => {
|
|
15127
15127
|
resolve(
|
|
15128
|
-
util$
|
|
15128
|
+
util$8.db.get(
|
|
15129
15129
|
pathInit({
|
|
15130
15130
|
dbName: "database",
|
|
15131
15131
|
path: "",
|
|
@@ -15139,7 +15139,7 @@ var db = {
|
|
|
15139
15139
|
databaseClear(context, { user: user2 = false } = {}) {
|
|
15140
15140
|
return new Promise((resolve) => {
|
|
15141
15141
|
resolve(
|
|
15142
|
-
util$
|
|
15142
|
+
util$8.db.get(
|
|
15143
15143
|
pathInit({
|
|
15144
15144
|
dbName: "database",
|
|
15145
15145
|
path: "",
|
|
@@ -15154,7 +15154,7 @@ var db = {
|
|
|
15154
15154
|
databasePage(context, { basis = "fullPath", user: user2 = false } = {}) {
|
|
15155
15155
|
return new Promise((resolve) => {
|
|
15156
15156
|
resolve(
|
|
15157
|
-
util$
|
|
15157
|
+
util$8.db.get(
|
|
15158
15158
|
pathInit({
|
|
15159
15159
|
dbName: "database",
|
|
15160
15160
|
path: `$page.${router$1.app.$route[basis]}`,
|
|
@@ -15168,7 +15168,7 @@ var db = {
|
|
|
15168
15168
|
databasePageClear(context, { basis = "fullPath", user: user2 = false } = {}) {
|
|
15169
15169
|
return new Promise((resolve) => {
|
|
15170
15170
|
resolve(
|
|
15171
|
-
util$
|
|
15171
|
+
util$8.db.get(
|
|
15172
15172
|
pathInit({
|
|
15173
15173
|
dbName: "database",
|
|
15174
15174
|
path: `$page.${router$1.app.$route[basis]}`,
|
|
@@ -15183,7 +15183,7 @@ var db = {
|
|
|
15183
15183
|
pageSet(context, { instance, basis = "fullPath", user: user2 = false }) {
|
|
15184
15184
|
return new Promise((resolve) => {
|
|
15185
15185
|
resolve(
|
|
15186
|
-
util$
|
|
15186
|
+
util$8.db.get(
|
|
15187
15187
|
pathInit({
|
|
15188
15188
|
dbName: "database",
|
|
15189
15189
|
path: `$page.${router$1.app.$route[basis]}.$data`,
|
|
@@ -15199,7 +15199,7 @@ var db = {
|
|
|
15199
15199
|
return new Promise((resolve) => {
|
|
15200
15200
|
resolve(
|
|
15201
15201
|
lodash$1.exports.cloneDeep(
|
|
15202
|
-
util$
|
|
15202
|
+
util$8.db.get(
|
|
15203
15203
|
pathInit({
|
|
15204
15204
|
dbName: "database",
|
|
15205
15205
|
path: `$page.${router$1.app.$route[basis]}.$data`,
|
|
@@ -15214,7 +15214,7 @@ var db = {
|
|
|
15214
15214
|
pageClear(context, { basis = "fullPath", user: user2 = false }) {
|
|
15215
15215
|
return new Promise((resolve) => {
|
|
15216
15216
|
resolve(
|
|
15217
|
-
util$
|
|
15217
|
+
util$8.db.get(
|
|
15218
15218
|
pathInit({
|
|
15219
15219
|
dbName: "database",
|
|
15220
15220
|
path: `$page.${router$1.app.$route[basis]}.$data`,
|
|
@@ -15249,19 +15249,23 @@ var __glob_5_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
15249
15249
|
__proto__: null,
|
|
15250
15250
|
"default": t
|
|
15251
15251
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
15252
|
+
var vueI18n_cjs = {};
|
|
15253
|
+
var shared$3 = { exports: {} };
|
|
15254
|
+
var shared_cjs = {};
|
|
15252
15255
|
/*!
|
|
15253
15256
|
* shared v9.2.2
|
|
15254
15257
|
* (c) 2022 kazuya kawaguchi
|
|
15255
15258
|
* Released under the MIT License.
|
|
15256
15259
|
*/
|
|
15260
|
+
Object.defineProperty(shared_cjs, "__esModule", { value: true });
|
|
15257
15261
|
const inBrowser = typeof window !== "undefined";
|
|
15258
|
-
|
|
15259
|
-
|
|
15262
|
+
shared_cjs.mark = void 0;
|
|
15263
|
+
shared_cjs.measure = void 0;
|
|
15260
15264
|
{
|
|
15261
15265
|
const perf2 = inBrowser && window.performance;
|
|
15262
15266
|
if (perf2 && perf2.mark && perf2.measure && perf2.clearMarks && perf2.clearMeasures) {
|
|
15263
|
-
mark = (tag) => perf2.mark(tag);
|
|
15264
|
-
measure = (name, startTag, endTag) => {
|
|
15267
|
+
shared_cjs.mark = (tag) => perf2.mark(tag);
|
|
15268
|
+
shared_cjs.measure = (name, startTag, endTag) => {
|
|
15265
15269
|
perf2.measure(name, startTag, endTag);
|
|
15266
15270
|
perf2.clearMarks(startTag);
|
|
15267
15271
|
perf2.clearMarks(endTag);
|
|
@@ -15299,7 +15303,7 @@ function warn$1(msg, err) {
|
|
|
15299
15303
|
const assign = Object.assign;
|
|
15300
15304
|
let _globalThis;
|
|
15301
15305
|
const getGlobalThis = () => {
|
|
15302
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof
|
|
15306
|
+
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof commonjsGlobal !== "undefined" ? commonjsGlobal : {});
|
|
15303
15307
|
};
|
|
15304
15308
|
function escapeHtml(rawText) {
|
|
15305
15309
|
return rawText.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
@@ -15312,7 +15316,11 @@ const isArray$2 = Array.isArray;
|
|
|
15312
15316
|
const isFunction$1 = (val) => typeof val === "function";
|
|
15313
15317
|
const isString$1 = (val) => typeof val === "string";
|
|
15314
15318
|
const isBoolean = (val) => typeof val === "boolean";
|
|
15319
|
+
const isSymbol = (val) => typeof val === "symbol";
|
|
15315
15320
|
const isObject$4 = (val) => val !== null && typeof val === "object";
|
|
15321
|
+
const isPromise = (val) => {
|
|
15322
|
+
return isObject$4(val) && isFunction$1(val.then) && isFunction$1(val.catch);
|
|
15323
|
+
};
|
|
15316
15324
|
const objectToString = Object.prototype.toString;
|
|
15317
15325
|
const toTypeString = (value) => objectToString.call(value);
|
|
15318
15326
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
@@ -15374,11 +15382,1743 @@ function createEmitter() {
|
|
|
15374
15382
|
};
|
|
15375
15383
|
return emitter;
|
|
15376
15384
|
}
|
|
15385
|
+
shared_cjs.assign = assign;
|
|
15386
|
+
shared_cjs.createEmitter = createEmitter;
|
|
15387
|
+
shared_cjs.escapeHtml = escapeHtml;
|
|
15388
|
+
shared_cjs.format = format$2;
|
|
15389
|
+
shared_cjs.friendlyJSONstringify = friendlyJSONstringify;
|
|
15390
|
+
shared_cjs.generateCodeFrame = generateCodeFrame;
|
|
15391
|
+
shared_cjs.generateFormatCacheKey = generateFormatCacheKey;
|
|
15392
|
+
shared_cjs.getGlobalThis = getGlobalThis;
|
|
15393
|
+
shared_cjs.hasOwn = hasOwn$1;
|
|
15394
|
+
shared_cjs.inBrowser = inBrowser;
|
|
15395
|
+
shared_cjs.isArray = isArray$2;
|
|
15396
|
+
shared_cjs.isBoolean = isBoolean;
|
|
15397
|
+
shared_cjs.isDate = isDate;
|
|
15398
|
+
shared_cjs.isEmptyObject = isEmptyObject;
|
|
15399
|
+
shared_cjs.isFunction = isFunction$1;
|
|
15400
|
+
shared_cjs.isNumber = isNumber$1;
|
|
15401
|
+
shared_cjs.isObject = isObject$4;
|
|
15402
|
+
shared_cjs.isPlainObject = isPlainObject;
|
|
15403
|
+
shared_cjs.isPromise = isPromise;
|
|
15404
|
+
shared_cjs.isRegExp = isRegExp$1;
|
|
15405
|
+
shared_cjs.isString = isString$1;
|
|
15406
|
+
shared_cjs.isSymbol = isSymbol;
|
|
15407
|
+
shared_cjs.makeSymbol = makeSymbol;
|
|
15408
|
+
shared_cjs.objectToString = objectToString;
|
|
15409
|
+
shared_cjs.toDisplayString = toDisplayString;
|
|
15410
|
+
shared_cjs.toTypeString = toTypeString;
|
|
15411
|
+
shared_cjs.warn = warn$1;
|
|
15412
|
+
{
|
|
15413
|
+
shared$3.exports = shared_cjs;
|
|
15414
|
+
}
|
|
15415
|
+
var coreBase$1 = { exports: {} };
|
|
15416
|
+
var coreBase_cjs = {};
|
|
15417
|
+
var messageCompiler$1 = { exports: {} };
|
|
15418
|
+
var messageCompiler_cjs = {};
|
|
15419
|
+
var sourceMap$1 = {};
|
|
15420
|
+
var sourceMapGenerator = {};
|
|
15421
|
+
var base64Vlq = {};
|
|
15422
|
+
var base64$1 = {};
|
|
15423
|
+
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
15424
|
+
base64$1.encode = function(number2) {
|
|
15425
|
+
if (0 <= number2 && number2 < intToCharMap.length) {
|
|
15426
|
+
return intToCharMap[number2];
|
|
15427
|
+
}
|
|
15428
|
+
throw new TypeError("Must be between 0 and 63: " + number2);
|
|
15429
|
+
};
|
|
15430
|
+
base64$1.decode = function(charCode) {
|
|
15431
|
+
var bigA = 65;
|
|
15432
|
+
var bigZ = 90;
|
|
15433
|
+
var littleA = 97;
|
|
15434
|
+
var littleZ = 122;
|
|
15435
|
+
var zero = 48;
|
|
15436
|
+
var nine = 57;
|
|
15437
|
+
var plus = 43;
|
|
15438
|
+
var slash = 47;
|
|
15439
|
+
var littleOffset = 26;
|
|
15440
|
+
var numberOffset = 52;
|
|
15441
|
+
if (bigA <= charCode && charCode <= bigZ) {
|
|
15442
|
+
return charCode - bigA;
|
|
15443
|
+
}
|
|
15444
|
+
if (littleA <= charCode && charCode <= littleZ) {
|
|
15445
|
+
return charCode - littleA + littleOffset;
|
|
15446
|
+
}
|
|
15447
|
+
if (zero <= charCode && charCode <= nine) {
|
|
15448
|
+
return charCode - zero + numberOffset;
|
|
15449
|
+
}
|
|
15450
|
+
if (charCode == plus) {
|
|
15451
|
+
return 62;
|
|
15452
|
+
}
|
|
15453
|
+
if (charCode == slash) {
|
|
15454
|
+
return 63;
|
|
15455
|
+
}
|
|
15456
|
+
return -1;
|
|
15457
|
+
};
|
|
15458
|
+
var base64 = base64$1;
|
|
15459
|
+
var VLQ_BASE_SHIFT = 5;
|
|
15460
|
+
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
15461
|
+
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
15462
|
+
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
15463
|
+
function toVLQSigned(aValue) {
|
|
15464
|
+
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
15465
|
+
}
|
|
15466
|
+
function fromVLQSigned(aValue) {
|
|
15467
|
+
var isNegative = (aValue & 1) === 1;
|
|
15468
|
+
var shifted = aValue >> 1;
|
|
15469
|
+
return isNegative ? -shifted : shifted;
|
|
15470
|
+
}
|
|
15471
|
+
base64Vlq.encode = function base64VLQ_encode(aValue) {
|
|
15472
|
+
var encoded = "";
|
|
15473
|
+
var digit;
|
|
15474
|
+
var vlq = toVLQSigned(aValue);
|
|
15475
|
+
do {
|
|
15476
|
+
digit = vlq & VLQ_BASE_MASK;
|
|
15477
|
+
vlq >>>= VLQ_BASE_SHIFT;
|
|
15478
|
+
if (vlq > 0) {
|
|
15479
|
+
digit |= VLQ_CONTINUATION_BIT;
|
|
15480
|
+
}
|
|
15481
|
+
encoded += base64.encode(digit);
|
|
15482
|
+
} while (vlq > 0);
|
|
15483
|
+
return encoded;
|
|
15484
|
+
};
|
|
15485
|
+
base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
15486
|
+
var strLen = aStr.length;
|
|
15487
|
+
var result2 = 0;
|
|
15488
|
+
var shift = 0;
|
|
15489
|
+
var continuation, digit;
|
|
15490
|
+
do {
|
|
15491
|
+
if (aIndex >= strLen) {
|
|
15492
|
+
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
15493
|
+
}
|
|
15494
|
+
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
15495
|
+
if (digit === -1) {
|
|
15496
|
+
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
15497
|
+
}
|
|
15498
|
+
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
15499
|
+
digit &= VLQ_BASE_MASK;
|
|
15500
|
+
result2 = result2 + (digit << shift);
|
|
15501
|
+
shift += VLQ_BASE_SHIFT;
|
|
15502
|
+
} while (continuation);
|
|
15503
|
+
aOutParam.value = fromVLQSigned(result2);
|
|
15504
|
+
aOutParam.rest = aIndex;
|
|
15505
|
+
};
|
|
15506
|
+
var util$7 = {};
|
|
15507
|
+
(function(exports) {
|
|
15508
|
+
function getArg(aArgs, aName, aDefaultValue) {
|
|
15509
|
+
if (aName in aArgs) {
|
|
15510
|
+
return aArgs[aName];
|
|
15511
|
+
} else if (arguments.length === 3) {
|
|
15512
|
+
return aDefaultValue;
|
|
15513
|
+
} else {
|
|
15514
|
+
throw new Error('"' + aName + '" is a required argument.');
|
|
15515
|
+
}
|
|
15516
|
+
}
|
|
15517
|
+
exports.getArg = getArg;
|
|
15518
|
+
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
15519
|
+
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
15520
|
+
function urlParse(aUrl) {
|
|
15521
|
+
var match2 = aUrl.match(urlRegexp);
|
|
15522
|
+
if (!match2) {
|
|
15523
|
+
return null;
|
|
15524
|
+
}
|
|
15525
|
+
return {
|
|
15526
|
+
scheme: match2[1],
|
|
15527
|
+
auth: match2[2],
|
|
15528
|
+
host: match2[3],
|
|
15529
|
+
port: match2[4],
|
|
15530
|
+
path: match2[5]
|
|
15531
|
+
};
|
|
15532
|
+
}
|
|
15533
|
+
exports.urlParse = urlParse;
|
|
15534
|
+
function urlGenerate(aParsedUrl) {
|
|
15535
|
+
var url = "";
|
|
15536
|
+
if (aParsedUrl.scheme) {
|
|
15537
|
+
url += aParsedUrl.scheme + ":";
|
|
15538
|
+
}
|
|
15539
|
+
url += "//";
|
|
15540
|
+
if (aParsedUrl.auth) {
|
|
15541
|
+
url += aParsedUrl.auth + "@";
|
|
15542
|
+
}
|
|
15543
|
+
if (aParsedUrl.host) {
|
|
15544
|
+
url += aParsedUrl.host;
|
|
15545
|
+
}
|
|
15546
|
+
if (aParsedUrl.port) {
|
|
15547
|
+
url += ":" + aParsedUrl.port;
|
|
15548
|
+
}
|
|
15549
|
+
if (aParsedUrl.path) {
|
|
15550
|
+
url += aParsedUrl.path;
|
|
15551
|
+
}
|
|
15552
|
+
return url;
|
|
15553
|
+
}
|
|
15554
|
+
exports.urlGenerate = urlGenerate;
|
|
15555
|
+
function normalize2(aPath) {
|
|
15556
|
+
var path = aPath;
|
|
15557
|
+
var url = urlParse(aPath);
|
|
15558
|
+
if (url) {
|
|
15559
|
+
if (!url.path) {
|
|
15560
|
+
return aPath;
|
|
15561
|
+
}
|
|
15562
|
+
path = url.path;
|
|
15563
|
+
}
|
|
15564
|
+
var isAbsolute = exports.isAbsolute(path);
|
|
15565
|
+
var parts = path.split(/\/+/);
|
|
15566
|
+
for (var part, up = 0, i3 = parts.length - 1; i3 >= 0; i3--) {
|
|
15567
|
+
part = parts[i3];
|
|
15568
|
+
if (part === ".") {
|
|
15569
|
+
parts.splice(i3, 1);
|
|
15570
|
+
} else if (part === "..") {
|
|
15571
|
+
up++;
|
|
15572
|
+
} else if (up > 0) {
|
|
15573
|
+
if (part === "") {
|
|
15574
|
+
parts.splice(i3 + 1, up);
|
|
15575
|
+
up = 0;
|
|
15576
|
+
} else {
|
|
15577
|
+
parts.splice(i3, 2);
|
|
15578
|
+
up--;
|
|
15579
|
+
}
|
|
15580
|
+
}
|
|
15581
|
+
}
|
|
15582
|
+
path = parts.join("/");
|
|
15583
|
+
if (path === "") {
|
|
15584
|
+
path = isAbsolute ? "/" : ".";
|
|
15585
|
+
}
|
|
15586
|
+
if (url) {
|
|
15587
|
+
url.path = path;
|
|
15588
|
+
return urlGenerate(url);
|
|
15589
|
+
}
|
|
15590
|
+
return path;
|
|
15591
|
+
}
|
|
15592
|
+
exports.normalize = normalize2;
|
|
15593
|
+
function join(aRoot, aPath) {
|
|
15594
|
+
if (aRoot === "") {
|
|
15595
|
+
aRoot = ".";
|
|
15596
|
+
}
|
|
15597
|
+
if (aPath === "") {
|
|
15598
|
+
aPath = ".";
|
|
15599
|
+
}
|
|
15600
|
+
var aPathUrl = urlParse(aPath);
|
|
15601
|
+
var aRootUrl = urlParse(aRoot);
|
|
15602
|
+
if (aRootUrl) {
|
|
15603
|
+
aRoot = aRootUrl.path || "/";
|
|
15604
|
+
}
|
|
15605
|
+
if (aPathUrl && !aPathUrl.scheme) {
|
|
15606
|
+
if (aRootUrl) {
|
|
15607
|
+
aPathUrl.scheme = aRootUrl.scheme;
|
|
15608
|
+
}
|
|
15609
|
+
return urlGenerate(aPathUrl);
|
|
15610
|
+
}
|
|
15611
|
+
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
|
15612
|
+
return aPath;
|
|
15613
|
+
}
|
|
15614
|
+
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
15615
|
+
aRootUrl.host = aPath;
|
|
15616
|
+
return urlGenerate(aRootUrl);
|
|
15617
|
+
}
|
|
15618
|
+
var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
15619
|
+
if (aRootUrl) {
|
|
15620
|
+
aRootUrl.path = joined;
|
|
15621
|
+
return urlGenerate(aRootUrl);
|
|
15622
|
+
}
|
|
15623
|
+
return joined;
|
|
15624
|
+
}
|
|
15625
|
+
exports.join = join;
|
|
15626
|
+
exports.isAbsolute = function(aPath) {
|
|
15627
|
+
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
15628
|
+
};
|
|
15629
|
+
function relative(aRoot, aPath) {
|
|
15630
|
+
if (aRoot === "") {
|
|
15631
|
+
aRoot = ".";
|
|
15632
|
+
}
|
|
15633
|
+
aRoot = aRoot.replace(/\/$/, "");
|
|
15634
|
+
var level = 0;
|
|
15635
|
+
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
15636
|
+
var index2 = aRoot.lastIndexOf("/");
|
|
15637
|
+
if (index2 < 0) {
|
|
15638
|
+
return aPath;
|
|
15639
|
+
}
|
|
15640
|
+
aRoot = aRoot.slice(0, index2);
|
|
15641
|
+
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
15642
|
+
return aPath;
|
|
15643
|
+
}
|
|
15644
|
+
++level;
|
|
15645
|
+
}
|
|
15646
|
+
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
15647
|
+
}
|
|
15648
|
+
exports.relative = relative;
|
|
15649
|
+
var supportsNullProto = function() {
|
|
15650
|
+
var obj = /* @__PURE__ */ Object.create(null);
|
|
15651
|
+
return !("__proto__" in obj);
|
|
15652
|
+
}();
|
|
15653
|
+
function identity2(s3) {
|
|
15654
|
+
return s3;
|
|
15655
|
+
}
|
|
15656
|
+
function toSetString(aStr) {
|
|
15657
|
+
if (isProtoString(aStr)) {
|
|
15658
|
+
return "$" + aStr;
|
|
15659
|
+
}
|
|
15660
|
+
return aStr;
|
|
15661
|
+
}
|
|
15662
|
+
exports.toSetString = supportsNullProto ? identity2 : toSetString;
|
|
15663
|
+
function fromSetString(aStr) {
|
|
15664
|
+
if (isProtoString(aStr)) {
|
|
15665
|
+
return aStr.slice(1);
|
|
15666
|
+
}
|
|
15667
|
+
return aStr;
|
|
15668
|
+
}
|
|
15669
|
+
exports.fromSetString = supportsNullProto ? identity2 : fromSetString;
|
|
15670
|
+
function isProtoString(s3) {
|
|
15671
|
+
if (!s3) {
|
|
15672
|
+
return false;
|
|
15673
|
+
}
|
|
15674
|
+
var length2 = s3.length;
|
|
15675
|
+
if (length2 < 9) {
|
|
15676
|
+
return false;
|
|
15677
|
+
}
|
|
15678
|
+
if (s3.charCodeAt(length2 - 1) !== 95 || s3.charCodeAt(length2 - 2) !== 95 || s3.charCodeAt(length2 - 3) !== 111 || s3.charCodeAt(length2 - 4) !== 116 || s3.charCodeAt(length2 - 5) !== 111 || s3.charCodeAt(length2 - 6) !== 114 || s3.charCodeAt(length2 - 7) !== 112 || s3.charCodeAt(length2 - 8) !== 95 || s3.charCodeAt(length2 - 9) !== 95) {
|
|
15679
|
+
return false;
|
|
15680
|
+
}
|
|
15681
|
+
for (var i3 = length2 - 10; i3 >= 0; i3--) {
|
|
15682
|
+
if (s3.charCodeAt(i3) !== 36) {
|
|
15683
|
+
return false;
|
|
15684
|
+
}
|
|
15685
|
+
}
|
|
15686
|
+
return true;
|
|
15687
|
+
}
|
|
15688
|
+
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
15689
|
+
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
15690
|
+
if (cmp !== 0) {
|
|
15691
|
+
return cmp;
|
|
15692
|
+
}
|
|
15693
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
15694
|
+
if (cmp !== 0) {
|
|
15695
|
+
return cmp;
|
|
15696
|
+
}
|
|
15697
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
15698
|
+
if (cmp !== 0 || onlyCompareOriginal) {
|
|
15699
|
+
return cmp;
|
|
15700
|
+
}
|
|
15701
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
15702
|
+
if (cmp !== 0) {
|
|
15703
|
+
return cmp;
|
|
15704
|
+
}
|
|
15705
|
+
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
15706
|
+
if (cmp !== 0) {
|
|
15707
|
+
return cmp;
|
|
15708
|
+
}
|
|
15709
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
15710
|
+
}
|
|
15711
|
+
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
15712
|
+
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
15713
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
15714
|
+
if (cmp !== 0) {
|
|
15715
|
+
return cmp;
|
|
15716
|
+
}
|
|
15717
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
15718
|
+
if (cmp !== 0 || onlyCompareGenerated) {
|
|
15719
|
+
return cmp;
|
|
15720
|
+
}
|
|
15721
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
15722
|
+
if (cmp !== 0) {
|
|
15723
|
+
return cmp;
|
|
15724
|
+
}
|
|
15725
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
15726
|
+
if (cmp !== 0) {
|
|
15727
|
+
return cmp;
|
|
15728
|
+
}
|
|
15729
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
15730
|
+
if (cmp !== 0) {
|
|
15731
|
+
return cmp;
|
|
15732
|
+
}
|
|
15733
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
15734
|
+
}
|
|
15735
|
+
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
15736
|
+
function strcmp(aStr1, aStr2) {
|
|
15737
|
+
if (aStr1 === aStr2) {
|
|
15738
|
+
return 0;
|
|
15739
|
+
}
|
|
15740
|
+
if (aStr1 === null) {
|
|
15741
|
+
return 1;
|
|
15742
|
+
}
|
|
15743
|
+
if (aStr2 === null) {
|
|
15744
|
+
return -1;
|
|
15745
|
+
}
|
|
15746
|
+
if (aStr1 > aStr2) {
|
|
15747
|
+
return 1;
|
|
15748
|
+
}
|
|
15749
|
+
return -1;
|
|
15750
|
+
}
|
|
15751
|
+
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
15752
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
15753
|
+
if (cmp !== 0) {
|
|
15754
|
+
return cmp;
|
|
15755
|
+
}
|
|
15756
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
15757
|
+
if (cmp !== 0) {
|
|
15758
|
+
return cmp;
|
|
15759
|
+
}
|
|
15760
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
15761
|
+
if (cmp !== 0) {
|
|
15762
|
+
return cmp;
|
|
15763
|
+
}
|
|
15764
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
15765
|
+
if (cmp !== 0) {
|
|
15766
|
+
return cmp;
|
|
15767
|
+
}
|
|
15768
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
15769
|
+
if (cmp !== 0) {
|
|
15770
|
+
return cmp;
|
|
15771
|
+
}
|
|
15772
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
15773
|
+
}
|
|
15774
|
+
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
15775
|
+
function parseSourceMapInput(str) {
|
|
15776
|
+
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
|
15777
|
+
}
|
|
15778
|
+
exports.parseSourceMapInput = parseSourceMapInput;
|
|
15779
|
+
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
15780
|
+
sourceURL = sourceURL || "";
|
|
15781
|
+
if (sourceRoot) {
|
|
15782
|
+
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
|
15783
|
+
sourceRoot += "/";
|
|
15784
|
+
}
|
|
15785
|
+
sourceURL = sourceRoot + sourceURL;
|
|
15786
|
+
}
|
|
15787
|
+
if (sourceMapURL) {
|
|
15788
|
+
var parsed = urlParse(sourceMapURL);
|
|
15789
|
+
if (!parsed) {
|
|
15790
|
+
throw new Error("sourceMapURL could not be parsed");
|
|
15791
|
+
}
|
|
15792
|
+
if (parsed.path) {
|
|
15793
|
+
var index2 = parsed.path.lastIndexOf("/");
|
|
15794
|
+
if (index2 >= 0) {
|
|
15795
|
+
parsed.path = parsed.path.substring(0, index2 + 1);
|
|
15796
|
+
}
|
|
15797
|
+
}
|
|
15798
|
+
sourceURL = join(urlGenerate(parsed), sourceURL);
|
|
15799
|
+
}
|
|
15800
|
+
return normalize2(sourceURL);
|
|
15801
|
+
}
|
|
15802
|
+
exports.computeSourceURL = computeSourceURL;
|
|
15803
|
+
})(util$7);
|
|
15804
|
+
var arraySet = {};
|
|
15805
|
+
var util$6 = util$7;
|
|
15806
|
+
var has$2 = Object.prototype.hasOwnProperty;
|
|
15807
|
+
var hasNativeMap = typeof Map !== "undefined";
|
|
15808
|
+
function ArraySet$2() {
|
|
15809
|
+
this._array = [];
|
|
15810
|
+
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
15811
|
+
}
|
|
15812
|
+
ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
15813
|
+
var set2 = new ArraySet$2();
|
|
15814
|
+
for (var i3 = 0, len2 = aArray.length; i3 < len2; i3++) {
|
|
15815
|
+
set2.add(aArray[i3], aAllowDuplicates);
|
|
15816
|
+
}
|
|
15817
|
+
return set2;
|
|
15818
|
+
};
|
|
15819
|
+
ArraySet$2.prototype.size = function ArraySet_size() {
|
|
15820
|
+
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
15821
|
+
};
|
|
15822
|
+
ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
15823
|
+
var sStr = hasNativeMap ? aStr : util$6.toSetString(aStr);
|
|
15824
|
+
var isDuplicate = hasNativeMap ? this.has(aStr) : has$2.call(this._set, sStr);
|
|
15825
|
+
var idx = this._array.length;
|
|
15826
|
+
if (!isDuplicate || aAllowDuplicates) {
|
|
15827
|
+
this._array.push(aStr);
|
|
15828
|
+
}
|
|
15829
|
+
if (!isDuplicate) {
|
|
15830
|
+
if (hasNativeMap) {
|
|
15831
|
+
this._set.set(aStr, idx);
|
|
15832
|
+
} else {
|
|
15833
|
+
this._set[sStr] = idx;
|
|
15834
|
+
}
|
|
15835
|
+
}
|
|
15836
|
+
};
|
|
15837
|
+
ArraySet$2.prototype.has = function ArraySet_has(aStr) {
|
|
15838
|
+
if (hasNativeMap) {
|
|
15839
|
+
return this._set.has(aStr);
|
|
15840
|
+
} else {
|
|
15841
|
+
var sStr = util$6.toSetString(aStr);
|
|
15842
|
+
return has$2.call(this._set, sStr);
|
|
15843
|
+
}
|
|
15844
|
+
};
|
|
15845
|
+
ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
15846
|
+
if (hasNativeMap) {
|
|
15847
|
+
var idx = this._set.get(aStr);
|
|
15848
|
+
if (idx >= 0) {
|
|
15849
|
+
return idx;
|
|
15850
|
+
}
|
|
15851
|
+
} else {
|
|
15852
|
+
var sStr = util$6.toSetString(aStr);
|
|
15853
|
+
if (has$2.call(this._set, sStr)) {
|
|
15854
|
+
return this._set[sStr];
|
|
15855
|
+
}
|
|
15856
|
+
}
|
|
15857
|
+
throw new Error('"' + aStr + '" is not in the set.');
|
|
15858
|
+
};
|
|
15859
|
+
ArraySet$2.prototype.at = function ArraySet_at(aIdx) {
|
|
15860
|
+
if (aIdx >= 0 && aIdx < this._array.length) {
|
|
15861
|
+
return this._array[aIdx];
|
|
15862
|
+
}
|
|
15863
|
+
throw new Error("No element indexed by " + aIdx);
|
|
15864
|
+
};
|
|
15865
|
+
ArraySet$2.prototype.toArray = function ArraySet_toArray() {
|
|
15866
|
+
return this._array.slice();
|
|
15867
|
+
};
|
|
15868
|
+
arraySet.ArraySet = ArraySet$2;
|
|
15869
|
+
var mappingList = {};
|
|
15870
|
+
var util$5 = util$7;
|
|
15871
|
+
function generatedPositionAfter(mappingA, mappingB) {
|
|
15872
|
+
var lineA = mappingA.generatedLine;
|
|
15873
|
+
var lineB = mappingB.generatedLine;
|
|
15874
|
+
var columnA = mappingA.generatedColumn;
|
|
15875
|
+
var columnB = mappingB.generatedColumn;
|
|
15876
|
+
return lineB > lineA || lineB == lineA && columnB >= columnA || util$5.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
15877
|
+
}
|
|
15878
|
+
function MappingList$1() {
|
|
15879
|
+
this._array = [];
|
|
15880
|
+
this._sorted = true;
|
|
15881
|
+
this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
15882
|
+
}
|
|
15883
|
+
MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
15884
|
+
this._array.forEach(aCallback, aThisArg);
|
|
15885
|
+
};
|
|
15886
|
+
MappingList$1.prototype.add = function MappingList_add(aMapping) {
|
|
15887
|
+
if (generatedPositionAfter(this._last, aMapping)) {
|
|
15888
|
+
this._last = aMapping;
|
|
15889
|
+
this._array.push(aMapping);
|
|
15890
|
+
} else {
|
|
15891
|
+
this._sorted = false;
|
|
15892
|
+
this._array.push(aMapping);
|
|
15893
|
+
}
|
|
15894
|
+
};
|
|
15895
|
+
MappingList$1.prototype.toArray = function MappingList_toArray() {
|
|
15896
|
+
if (!this._sorted) {
|
|
15897
|
+
this._array.sort(util$5.compareByGeneratedPositionsInflated);
|
|
15898
|
+
this._sorted = true;
|
|
15899
|
+
}
|
|
15900
|
+
return this._array;
|
|
15901
|
+
};
|
|
15902
|
+
mappingList.MappingList = MappingList$1;
|
|
15903
|
+
var base64VLQ$1 = base64Vlq;
|
|
15904
|
+
var util$4 = util$7;
|
|
15905
|
+
var ArraySet$1 = arraySet.ArraySet;
|
|
15906
|
+
var MappingList = mappingList.MappingList;
|
|
15907
|
+
function SourceMapGenerator$1(aArgs) {
|
|
15908
|
+
if (!aArgs) {
|
|
15909
|
+
aArgs = {};
|
|
15910
|
+
}
|
|
15911
|
+
this._file = util$4.getArg(aArgs, "file", null);
|
|
15912
|
+
this._sourceRoot = util$4.getArg(aArgs, "sourceRoot", null);
|
|
15913
|
+
this._skipValidation = util$4.getArg(aArgs, "skipValidation", false);
|
|
15914
|
+
this._sources = new ArraySet$1();
|
|
15915
|
+
this._names = new ArraySet$1();
|
|
15916
|
+
this._mappings = new MappingList();
|
|
15917
|
+
this._sourcesContents = null;
|
|
15918
|
+
}
|
|
15919
|
+
SourceMapGenerator$1.prototype._version = 3;
|
|
15920
|
+
SourceMapGenerator$1.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
15921
|
+
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
15922
|
+
var generator = new SourceMapGenerator$1({
|
|
15923
|
+
file: aSourceMapConsumer.file,
|
|
15924
|
+
sourceRoot
|
|
15925
|
+
});
|
|
15926
|
+
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
15927
|
+
var newMapping = {
|
|
15928
|
+
generated: {
|
|
15929
|
+
line: mapping.generatedLine,
|
|
15930
|
+
column: mapping.generatedColumn
|
|
15931
|
+
}
|
|
15932
|
+
};
|
|
15933
|
+
if (mapping.source != null) {
|
|
15934
|
+
newMapping.source = mapping.source;
|
|
15935
|
+
if (sourceRoot != null) {
|
|
15936
|
+
newMapping.source = util$4.relative(sourceRoot, newMapping.source);
|
|
15937
|
+
}
|
|
15938
|
+
newMapping.original = {
|
|
15939
|
+
line: mapping.originalLine,
|
|
15940
|
+
column: mapping.originalColumn
|
|
15941
|
+
};
|
|
15942
|
+
if (mapping.name != null) {
|
|
15943
|
+
newMapping.name = mapping.name;
|
|
15944
|
+
}
|
|
15945
|
+
}
|
|
15946
|
+
generator.addMapping(newMapping);
|
|
15947
|
+
});
|
|
15948
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
15949
|
+
var sourceRelative = sourceFile;
|
|
15950
|
+
if (sourceRoot !== null) {
|
|
15951
|
+
sourceRelative = util$4.relative(sourceRoot, sourceFile);
|
|
15952
|
+
}
|
|
15953
|
+
if (!generator._sources.has(sourceRelative)) {
|
|
15954
|
+
generator._sources.add(sourceRelative);
|
|
15955
|
+
}
|
|
15956
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
15957
|
+
if (content != null) {
|
|
15958
|
+
generator.setSourceContent(sourceFile, content);
|
|
15959
|
+
}
|
|
15960
|
+
});
|
|
15961
|
+
return generator;
|
|
15962
|
+
};
|
|
15963
|
+
SourceMapGenerator$1.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
15964
|
+
var generated = util$4.getArg(aArgs, "generated");
|
|
15965
|
+
var original = util$4.getArg(aArgs, "original", null);
|
|
15966
|
+
var source2 = util$4.getArg(aArgs, "source", null);
|
|
15967
|
+
var name = util$4.getArg(aArgs, "name", null);
|
|
15968
|
+
if (!this._skipValidation) {
|
|
15969
|
+
this._validateMapping(generated, original, source2, name);
|
|
15970
|
+
}
|
|
15971
|
+
if (source2 != null) {
|
|
15972
|
+
source2 = String(source2);
|
|
15973
|
+
if (!this._sources.has(source2)) {
|
|
15974
|
+
this._sources.add(source2);
|
|
15975
|
+
}
|
|
15976
|
+
}
|
|
15977
|
+
if (name != null) {
|
|
15978
|
+
name = String(name);
|
|
15979
|
+
if (!this._names.has(name)) {
|
|
15980
|
+
this._names.add(name);
|
|
15981
|
+
}
|
|
15982
|
+
}
|
|
15983
|
+
this._mappings.add({
|
|
15984
|
+
generatedLine: generated.line,
|
|
15985
|
+
generatedColumn: generated.column,
|
|
15986
|
+
originalLine: original != null && original.line,
|
|
15987
|
+
originalColumn: original != null && original.column,
|
|
15988
|
+
source: source2,
|
|
15989
|
+
name
|
|
15990
|
+
});
|
|
15991
|
+
};
|
|
15992
|
+
SourceMapGenerator$1.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
15993
|
+
var source2 = aSourceFile;
|
|
15994
|
+
if (this._sourceRoot != null) {
|
|
15995
|
+
source2 = util$4.relative(this._sourceRoot, source2);
|
|
15996
|
+
}
|
|
15997
|
+
if (aSourceContent != null) {
|
|
15998
|
+
if (!this._sourcesContents) {
|
|
15999
|
+
this._sourcesContents = /* @__PURE__ */ Object.create(null);
|
|
16000
|
+
}
|
|
16001
|
+
this._sourcesContents[util$4.toSetString(source2)] = aSourceContent;
|
|
16002
|
+
} else if (this._sourcesContents) {
|
|
16003
|
+
delete this._sourcesContents[util$4.toSetString(source2)];
|
|
16004
|
+
if (Object.keys(this._sourcesContents).length === 0) {
|
|
16005
|
+
this._sourcesContents = null;
|
|
16006
|
+
}
|
|
16007
|
+
}
|
|
16008
|
+
};
|
|
16009
|
+
SourceMapGenerator$1.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
16010
|
+
var sourceFile = aSourceFile;
|
|
16011
|
+
if (aSourceFile == null) {
|
|
16012
|
+
if (aSourceMapConsumer.file == null) {
|
|
16013
|
+
throw new Error(
|
|
16014
|
+
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
|
16015
|
+
);
|
|
16016
|
+
}
|
|
16017
|
+
sourceFile = aSourceMapConsumer.file;
|
|
16018
|
+
}
|
|
16019
|
+
var sourceRoot = this._sourceRoot;
|
|
16020
|
+
if (sourceRoot != null) {
|
|
16021
|
+
sourceFile = util$4.relative(sourceRoot, sourceFile);
|
|
16022
|
+
}
|
|
16023
|
+
var newSources = new ArraySet$1();
|
|
16024
|
+
var newNames = new ArraySet$1();
|
|
16025
|
+
this._mappings.unsortedForEach(function(mapping) {
|
|
16026
|
+
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
16027
|
+
var original = aSourceMapConsumer.originalPositionFor({
|
|
16028
|
+
line: mapping.originalLine,
|
|
16029
|
+
column: mapping.originalColumn
|
|
16030
|
+
});
|
|
16031
|
+
if (original.source != null) {
|
|
16032
|
+
mapping.source = original.source;
|
|
16033
|
+
if (aSourceMapPath != null) {
|
|
16034
|
+
mapping.source = util$4.join(aSourceMapPath, mapping.source);
|
|
16035
|
+
}
|
|
16036
|
+
if (sourceRoot != null) {
|
|
16037
|
+
mapping.source = util$4.relative(sourceRoot, mapping.source);
|
|
16038
|
+
}
|
|
16039
|
+
mapping.originalLine = original.line;
|
|
16040
|
+
mapping.originalColumn = original.column;
|
|
16041
|
+
if (original.name != null) {
|
|
16042
|
+
mapping.name = original.name;
|
|
16043
|
+
}
|
|
16044
|
+
}
|
|
16045
|
+
}
|
|
16046
|
+
var source2 = mapping.source;
|
|
16047
|
+
if (source2 != null && !newSources.has(source2)) {
|
|
16048
|
+
newSources.add(source2);
|
|
16049
|
+
}
|
|
16050
|
+
var name = mapping.name;
|
|
16051
|
+
if (name != null && !newNames.has(name)) {
|
|
16052
|
+
newNames.add(name);
|
|
16053
|
+
}
|
|
16054
|
+
}, this);
|
|
16055
|
+
this._sources = newSources;
|
|
16056
|
+
this._names = newNames;
|
|
16057
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
|
16058
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
|
16059
|
+
if (content != null) {
|
|
16060
|
+
if (aSourceMapPath != null) {
|
|
16061
|
+
sourceFile2 = util$4.join(aSourceMapPath, sourceFile2);
|
|
16062
|
+
}
|
|
16063
|
+
if (sourceRoot != null) {
|
|
16064
|
+
sourceFile2 = util$4.relative(sourceRoot, sourceFile2);
|
|
16065
|
+
}
|
|
16066
|
+
this.setSourceContent(sourceFile2, content);
|
|
16067
|
+
}
|
|
16068
|
+
}, this);
|
|
16069
|
+
};
|
|
16070
|
+
SourceMapGenerator$1.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
16071
|
+
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
16072
|
+
throw new Error(
|
|
16073
|
+
"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
|
|
16074
|
+
);
|
|
16075
|
+
}
|
|
16076
|
+
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
16077
|
+
return;
|
|
16078
|
+
} else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
|
|
16079
|
+
return;
|
|
16080
|
+
} else {
|
|
16081
|
+
throw new Error("Invalid mapping: " + JSON.stringify({
|
|
16082
|
+
generated: aGenerated,
|
|
16083
|
+
source: aSource,
|
|
16084
|
+
original: aOriginal,
|
|
16085
|
+
name: aName
|
|
16086
|
+
}));
|
|
16087
|
+
}
|
|
16088
|
+
};
|
|
16089
|
+
SourceMapGenerator$1.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
16090
|
+
var previousGeneratedColumn = 0;
|
|
16091
|
+
var previousGeneratedLine = 1;
|
|
16092
|
+
var previousOriginalColumn = 0;
|
|
16093
|
+
var previousOriginalLine = 0;
|
|
16094
|
+
var previousName = 0;
|
|
16095
|
+
var previousSource = 0;
|
|
16096
|
+
var result2 = "";
|
|
16097
|
+
var next;
|
|
16098
|
+
var mapping;
|
|
16099
|
+
var nameIdx;
|
|
16100
|
+
var sourceIdx;
|
|
16101
|
+
var mappings = this._mappings.toArray();
|
|
16102
|
+
for (var i3 = 0, len2 = mappings.length; i3 < len2; i3++) {
|
|
16103
|
+
mapping = mappings[i3];
|
|
16104
|
+
next = "";
|
|
16105
|
+
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
16106
|
+
previousGeneratedColumn = 0;
|
|
16107
|
+
while (mapping.generatedLine !== previousGeneratedLine) {
|
|
16108
|
+
next += ";";
|
|
16109
|
+
previousGeneratedLine++;
|
|
16110
|
+
}
|
|
16111
|
+
} else {
|
|
16112
|
+
if (i3 > 0) {
|
|
16113
|
+
if (!util$4.compareByGeneratedPositionsInflated(mapping, mappings[i3 - 1])) {
|
|
16114
|
+
continue;
|
|
16115
|
+
}
|
|
16116
|
+
next += ",";
|
|
16117
|
+
}
|
|
16118
|
+
}
|
|
16119
|
+
next += base64VLQ$1.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
16120
|
+
previousGeneratedColumn = mapping.generatedColumn;
|
|
16121
|
+
if (mapping.source != null) {
|
|
16122
|
+
sourceIdx = this._sources.indexOf(mapping.source);
|
|
16123
|
+
next += base64VLQ$1.encode(sourceIdx - previousSource);
|
|
16124
|
+
previousSource = sourceIdx;
|
|
16125
|
+
next += base64VLQ$1.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
16126
|
+
previousOriginalLine = mapping.originalLine - 1;
|
|
16127
|
+
next += base64VLQ$1.encode(mapping.originalColumn - previousOriginalColumn);
|
|
16128
|
+
previousOriginalColumn = mapping.originalColumn;
|
|
16129
|
+
if (mapping.name != null) {
|
|
16130
|
+
nameIdx = this._names.indexOf(mapping.name);
|
|
16131
|
+
next += base64VLQ$1.encode(nameIdx - previousName);
|
|
16132
|
+
previousName = nameIdx;
|
|
16133
|
+
}
|
|
16134
|
+
}
|
|
16135
|
+
result2 += next;
|
|
16136
|
+
}
|
|
16137
|
+
return result2;
|
|
16138
|
+
};
|
|
16139
|
+
SourceMapGenerator$1.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
16140
|
+
return aSources.map(function(source2) {
|
|
16141
|
+
if (!this._sourcesContents) {
|
|
16142
|
+
return null;
|
|
16143
|
+
}
|
|
16144
|
+
if (aSourceRoot != null) {
|
|
16145
|
+
source2 = util$4.relative(aSourceRoot, source2);
|
|
16146
|
+
}
|
|
16147
|
+
var key = util$4.toSetString(source2);
|
|
16148
|
+
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
16149
|
+
}, this);
|
|
16150
|
+
};
|
|
16151
|
+
SourceMapGenerator$1.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
16152
|
+
var map2 = {
|
|
16153
|
+
version: this._version,
|
|
16154
|
+
sources: this._sources.toArray(),
|
|
16155
|
+
names: this._names.toArray(),
|
|
16156
|
+
mappings: this._serializeMappings()
|
|
16157
|
+
};
|
|
16158
|
+
if (this._file != null) {
|
|
16159
|
+
map2.file = this._file;
|
|
16160
|
+
}
|
|
16161
|
+
if (this._sourceRoot != null) {
|
|
16162
|
+
map2.sourceRoot = this._sourceRoot;
|
|
16163
|
+
}
|
|
16164
|
+
if (this._sourcesContents) {
|
|
16165
|
+
map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
|
|
16166
|
+
}
|
|
16167
|
+
return map2;
|
|
16168
|
+
};
|
|
16169
|
+
SourceMapGenerator$1.prototype.toString = function SourceMapGenerator_toString() {
|
|
16170
|
+
return JSON.stringify(this.toJSON());
|
|
16171
|
+
};
|
|
16172
|
+
sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$1;
|
|
16173
|
+
var sourceMapConsumer = {};
|
|
16174
|
+
var binarySearch$1 = {};
|
|
16175
|
+
(function(exports) {
|
|
16176
|
+
exports.GREATEST_LOWER_BOUND = 1;
|
|
16177
|
+
exports.LEAST_UPPER_BOUND = 2;
|
|
16178
|
+
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
16179
|
+
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
16180
|
+
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
16181
|
+
if (cmp === 0) {
|
|
16182
|
+
return mid;
|
|
16183
|
+
} else if (cmp > 0) {
|
|
16184
|
+
if (aHigh - mid > 1) {
|
|
16185
|
+
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
16186
|
+
}
|
|
16187
|
+
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
16188
|
+
return aHigh < aHaystack.length ? aHigh : -1;
|
|
16189
|
+
} else {
|
|
16190
|
+
return mid;
|
|
16191
|
+
}
|
|
16192
|
+
} else {
|
|
16193
|
+
if (mid - aLow > 1) {
|
|
16194
|
+
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
16195
|
+
}
|
|
16196
|
+
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
16197
|
+
return mid;
|
|
16198
|
+
} else {
|
|
16199
|
+
return aLow < 0 ? -1 : aLow;
|
|
16200
|
+
}
|
|
16201
|
+
}
|
|
16202
|
+
}
|
|
16203
|
+
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
16204
|
+
if (aHaystack.length === 0) {
|
|
16205
|
+
return -1;
|
|
16206
|
+
}
|
|
16207
|
+
var index2 = recursiveSearch(
|
|
16208
|
+
-1,
|
|
16209
|
+
aHaystack.length,
|
|
16210
|
+
aNeedle,
|
|
16211
|
+
aHaystack,
|
|
16212
|
+
aCompare,
|
|
16213
|
+
aBias || exports.GREATEST_LOWER_BOUND
|
|
16214
|
+
);
|
|
16215
|
+
if (index2 < 0) {
|
|
16216
|
+
return -1;
|
|
16217
|
+
}
|
|
16218
|
+
while (index2 - 1 >= 0) {
|
|
16219
|
+
if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
|
|
16220
|
+
break;
|
|
16221
|
+
}
|
|
16222
|
+
--index2;
|
|
16223
|
+
}
|
|
16224
|
+
return index2;
|
|
16225
|
+
};
|
|
16226
|
+
})(binarySearch$1);
|
|
16227
|
+
var quickSort$1 = {};
|
|
16228
|
+
function swap(ary, x2, y3) {
|
|
16229
|
+
var temp = ary[x2];
|
|
16230
|
+
ary[x2] = ary[y3];
|
|
16231
|
+
ary[y3] = temp;
|
|
16232
|
+
}
|
|
16233
|
+
function randomIntInRange(low, high) {
|
|
16234
|
+
return Math.round(low + Math.random() * (high - low));
|
|
16235
|
+
}
|
|
16236
|
+
function doQuickSort(ary, comparator, p, r) {
|
|
16237
|
+
if (p < r) {
|
|
16238
|
+
var pivotIndex = randomIntInRange(p, r);
|
|
16239
|
+
var i3 = p - 1;
|
|
16240
|
+
swap(ary, pivotIndex, r);
|
|
16241
|
+
var pivot = ary[r];
|
|
16242
|
+
for (var j = p; j < r; j++) {
|
|
16243
|
+
if (comparator(ary[j], pivot) <= 0) {
|
|
16244
|
+
i3 += 1;
|
|
16245
|
+
swap(ary, i3, j);
|
|
16246
|
+
}
|
|
16247
|
+
}
|
|
16248
|
+
swap(ary, i3 + 1, j);
|
|
16249
|
+
var q2 = i3 + 1;
|
|
16250
|
+
doQuickSort(ary, comparator, p, q2 - 1);
|
|
16251
|
+
doQuickSort(ary, comparator, q2 + 1, r);
|
|
16252
|
+
}
|
|
16253
|
+
}
|
|
16254
|
+
quickSort$1.quickSort = function(ary, comparator) {
|
|
16255
|
+
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
16256
|
+
};
|
|
16257
|
+
var util$3 = util$7;
|
|
16258
|
+
var binarySearch = binarySearch$1;
|
|
16259
|
+
var ArraySet = arraySet.ArraySet;
|
|
16260
|
+
var base64VLQ = base64Vlq;
|
|
16261
|
+
var quickSort = quickSort$1.quickSort;
|
|
16262
|
+
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
16263
|
+
var sourceMap2 = aSourceMap;
|
|
16264
|
+
if (typeof aSourceMap === "string") {
|
|
16265
|
+
sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
|
|
16266
|
+
}
|
|
16267
|
+
return sourceMap2.sections != null ? new IndexedSourceMapConsumer(sourceMap2, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap2, aSourceMapURL);
|
|
16268
|
+
}
|
|
16269
|
+
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
16270
|
+
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
16271
|
+
};
|
|
16272
|
+
SourceMapConsumer.prototype._version = 3;
|
|
16273
|
+
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
16274
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
16275
|
+
configurable: true,
|
|
16276
|
+
enumerable: true,
|
|
16277
|
+
get: function() {
|
|
16278
|
+
if (!this.__generatedMappings) {
|
|
16279
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
|
16280
|
+
}
|
|
16281
|
+
return this.__generatedMappings;
|
|
16282
|
+
}
|
|
16283
|
+
});
|
|
16284
|
+
SourceMapConsumer.prototype.__originalMappings = null;
|
|
16285
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
16286
|
+
configurable: true,
|
|
16287
|
+
enumerable: true,
|
|
16288
|
+
get: function() {
|
|
16289
|
+
if (!this.__originalMappings) {
|
|
16290
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
|
16291
|
+
}
|
|
16292
|
+
return this.__originalMappings;
|
|
16293
|
+
}
|
|
16294
|
+
});
|
|
16295
|
+
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
|
|
16296
|
+
var c2 = aStr.charAt(index2);
|
|
16297
|
+
return c2 === ";" || c2 === ",";
|
|
16298
|
+
};
|
|
16299
|
+
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
16300
|
+
throw new Error("Subclasses must implement _parseMappings");
|
|
16301
|
+
};
|
|
16302
|
+
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
16303
|
+
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
16304
|
+
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
16305
|
+
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
16306
|
+
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
16307
|
+
var context = aContext || null;
|
|
16308
|
+
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
16309
|
+
var mappings;
|
|
16310
|
+
switch (order) {
|
|
16311
|
+
case SourceMapConsumer.GENERATED_ORDER:
|
|
16312
|
+
mappings = this._generatedMappings;
|
|
16313
|
+
break;
|
|
16314
|
+
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
16315
|
+
mappings = this._originalMappings;
|
|
16316
|
+
break;
|
|
16317
|
+
default:
|
|
16318
|
+
throw new Error("Unknown order of iteration.");
|
|
16319
|
+
}
|
|
16320
|
+
var sourceRoot = this.sourceRoot;
|
|
16321
|
+
mappings.map(function(mapping) {
|
|
16322
|
+
var source2 = mapping.source === null ? null : this._sources.at(mapping.source);
|
|
16323
|
+
source2 = util$3.computeSourceURL(sourceRoot, source2, this._sourceMapURL);
|
|
16324
|
+
return {
|
|
16325
|
+
source: source2,
|
|
16326
|
+
generatedLine: mapping.generatedLine,
|
|
16327
|
+
generatedColumn: mapping.generatedColumn,
|
|
16328
|
+
originalLine: mapping.originalLine,
|
|
16329
|
+
originalColumn: mapping.originalColumn,
|
|
16330
|
+
name: mapping.name === null ? null : this._names.at(mapping.name)
|
|
16331
|
+
};
|
|
16332
|
+
}, this).forEach(aCallback, context);
|
|
16333
|
+
};
|
|
16334
|
+
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
16335
|
+
var line = util$3.getArg(aArgs, "line");
|
|
16336
|
+
var needle = {
|
|
16337
|
+
source: util$3.getArg(aArgs, "source"),
|
|
16338
|
+
originalLine: line,
|
|
16339
|
+
originalColumn: util$3.getArg(aArgs, "column", 0)
|
|
16340
|
+
};
|
|
16341
|
+
needle.source = this._findSourceIndex(needle.source);
|
|
16342
|
+
if (needle.source < 0) {
|
|
16343
|
+
return [];
|
|
16344
|
+
}
|
|
16345
|
+
var mappings = [];
|
|
16346
|
+
var index2 = this._findMapping(
|
|
16347
|
+
needle,
|
|
16348
|
+
this._originalMappings,
|
|
16349
|
+
"originalLine",
|
|
16350
|
+
"originalColumn",
|
|
16351
|
+
util$3.compareByOriginalPositions,
|
|
16352
|
+
binarySearch.LEAST_UPPER_BOUND
|
|
16353
|
+
);
|
|
16354
|
+
if (index2 >= 0) {
|
|
16355
|
+
var mapping = this._originalMappings[index2];
|
|
16356
|
+
if (aArgs.column === void 0) {
|
|
16357
|
+
var originalLine = mapping.originalLine;
|
|
16358
|
+
while (mapping && mapping.originalLine === originalLine) {
|
|
16359
|
+
mappings.push({
|
|
16360
|
+
line: util$3.getArg(mapping, "generatedLine", null),
|
|
16361
|
+
column: util$3.getArg(mapping, "generatedColumn", null),
|
|
16362
|
+
lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
|
|
16363
|
+
});
|
|
16364
|
+
mapping = this._originalMappings[++index2];
|
|
16365
|
+
}
|
|
16366
|
+
} else {
|
|
16367
|
+
var originalColumn = mapping.originalColumn;
|
|
16368
|
+
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
16369
|
+
mappings.push({
|
|
16370
|
+
line: util$3.getArg(mapping, "generatedLine", null),
|
|
16371
|
+
column: util$3.getArg(mapping, "generatedColumn", null),
|
|
16372
|
+
lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
|
|
16373
|
+
});
|
|
16374
|
+
mapping = this._originalMappings[++index2];
|
|
16375
|
+
}
|
|
16376
|
+
}
|
|
16377
|
+
}
|
|
16378
|
+
return mappings;
|
|
16379
|
+
};
|
|
16380
|
+
sourceMapConsumer.SourceMapConsumer = SourceMapConsumer;
|
|
16381
|
+
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
16382
|
+
var sourceMap2 = aSourceMap;
|
|
16383
|
+
if (typeof aSourceMap === "string") {
|
|
16384
|
+
sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
|
|
16385
|
+
}
|
|
16386
|
+
var version2 = util$3.getArg(sourceMap2, "version");
|
|
16387
|
+
var sources = util$3.getArg(sourceMap2, "sources");
|
|
16388
|
+
var names = util$3.getArg(sourceMap2, "names", []);
|
|
16389
|
+
var sourceRoot = util$3.getArg(sourceMap2, "sourceRoot", null);
|
|
16390
|
+
var sourcesContent = util$3.getArg(sourceMap2, "sourcesContent", null);
|
|
16391
|
+
var mappings = util$3.getArg(sourceMap2, "mappings");
|
|
16392
|
+
var file = util$3.getArg(sourceMap2, "file", null);
|
|
16393
|
+
if (version2 != this._version) {
|
|
16394
|
+
throw new Error("Unsupported version: " + version2);
|
|
16395
|
+
}
|
|
16396
|
+
if (sourceRoot) {
|
|
16397
|
+
sourceRoot = util$3.normalize(sourceRoot);
|
|
16398
|
+
}
|
|
16399
|
+
sources = sources.map(String).map(util$3.normalize).map(function(source2) {
|
|
16400
|
+
return sourceRoot && util$3.isAbsolute(sourceRoot) && util$3.isAbsolute(source2) ? util$3.relative(sourceRoot, source2) : source2;
|
|
16401
|
+
});
|
|
16402
|
+
this._names = ArraySet.fromArray(names.map(String), true);
|
|
16403
|
+
this._sources = ArraySet.fromArray(sources, true);
|
|
16404
|
+
this._absoluteSources = this._sources.toArray().map(function(s3) {
|
|
16405
|
+
return util$3.computeSourceURL(sourceRoot, s3, aSourceMapURL);
|
|
16406
|
+
});
|
|
16407
|
+
this.sourceRoot = sourceRoot;
|
|
16408
|
+
this.sourcesContent = sourcesContent;
|
|
16409
|
+
this._mappings = mappings;
|
|
16410
|
+
this._sourceMapURL = aSourceMapURL;
|
|
16411
|
+
this.file = file;
|
|
16412
|
+
}
|
|
16413
|
+
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
16414
|
+
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
16415
|
+
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
16416
|
+
var relativeSource = aSource;
|
|
16417
|
+
if (this.sourceRoot != null) {
|
|
16418
|
+
relativeSource = util$3.relative(this.sourceRoot, relativeSource);
|
|
16419
|
+
}
|
|
16420
|
+
if (this._sources.has(relativeSource)) {
|
|
16421
|
+
return this._sources.indexOf(relativeSource);
|
|
16422
|
+
}
|
|
16423
|
+
var i3;
|
|
16424
|
+
for (i3 = 0; i3 < this._absoluteSources.length; ++i3) {
|
|
16425
|
+
if (this._absoluteSources[i3] == aSource) {
|
|
16426
|
+
return i3;
|
|
16427
|
+
}
|
|
16428
|
+
}
|
|
16429
|
+
return -1;
|
|
16430
|
+
};
|
|
16431
|
+
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
16432
|
+
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
16433
|
+
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
16434
|
+
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
16435
|
+
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
16436
|
+
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
16437
|
+
smc._sources.toArray(),
|
|
16438
|
+
smc.sourceRoot
|
|
16439
|
+
);
|
|
16440
|
+
smc.file = aSourceMap._file;
|
|
16441
|
+
smc._sourceMapURL = aSourceMapURL;
|
|
16442
|
+
smc._absoluteSources = smc._sources.toArray().map(function(s3) {
|
|
16443
|
+
return util$3.computeSourceURL(smc.sourceRoot, s3, aSourceMapURL);
|
|
16444
|
+
});
|
|
16445
|
+
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
16446
|
+
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
16447
|
+
var destOriginalMappings = smc.__originalMappings = [];
|
|
16448
|
+
for (var i3 = 0, length2 = generatedMappings.length; i3 < length2; i3++) {
|
|
16449
|
+
var srcMapping = generatedMappings[i3];
|
|
16450
|
+
var destMapping = new Mapping();
|
|
16451
|
+
destMapping.generatedLine = srcMapping.generatedLine;
|
|
16452
|
+
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
16453
|
+
if (srcMapping.source) {
|
|
16454
|
+
destMapping.source = sources.indexOf(srcMapping.source);
|
|
16455
|
+
destMapping.originalLine = srcMapping.originalLine;
|
|
16456
|
+
destMapping.originalColumn = srcMapping.originalColumn;
|
|
16457
|
+
if (srcMapping.name) {
|
|
16458
|
+
destMapping.name = names.indexOf(srcMapping.name);
|
|
16459
|
+
}
|
|
16460
|
+
destOriginalMappings.push(destMapping);
|
|
16461
|
+
}
|
|
16462
|
+
destGeneratedMappings.push(destMapping);
|
|
16463
|
+
}
|
|
16464
|
+
quickSort(smc.__originalMappings, util$3.compareByOriginalPositions);
|
|
16465
|
+
return smc;
|
|
16466
|
+
};
|
|
16467
|
+
BasicSourceMapConsumer.prototype._version = 3;
|
|
16468
|
+
Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
|
|
16469
|
+
get: function() {
|
|
16470
|
+
return this._absoluteSources.slice();
|
|
16471
|
+
}
|
|
16472
|
+
});
|
|
16473
|
+
function Mapping() {
|
|
16474
|
+
this.generatedLine = 0;
|
|
16475
|
+
this.generatedColumn = 0;
|
|
16476
|
+
this.source = null;
|
|
16477
|
+
this.originalLine = null;
|
|
16478
|
+
this.originalColumn = null;
|
|
16479
|
+
this.name = null;
|
|
16480
|
+
}
|
|
16481
|
+
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings2(aStr, aSourceRoot) {
|
|
16482
|
+
var generatedLine = 1;
|
|
16483
|
+
var previousGeneratedColumn = 0;
|
|
16484
|
+
var previousOriginalLine = 0;
|
|
16485
|
+
var previousOriginalColumn = 0;
|
|
16486
|
+
var previousSource = 0;
|
|
16487
|
+
var previousName = 0;
|
|
16488
|
+
var length2 = aStr.length;
|
|
16489
|
+
var index2 = 0;
|
|
16490
|
+
var cachedSegments = {};
|
|
16491
|
+
var temp = {};
|
|
16492
|
+
var originalMappings = [];
|
|
16493
|
+
var generatedMappings = [];
|
|
16494
|
+
var mapping, str, segment, end2, value;
|
|
16495
|
+
while (index2 < length2) {
|
|
16496
|
+
if (aStr.charAt(index2) === ";") {
|
|
16497
|
+
generatedLine++;
|
|
16498
|
+
index2++;
|
|
16499
|
+
previousGeneratedColumn = 0;
|
|
16500
|
+
} else if (aStr.charAt(index2) === ",") {
|
|
16501
|
+
index2++;
|
|
16502
|
+
} else {
|
|
16503
|
+
mapping = new Mapping();
|
|
16504
|
+
mapping.generatedLine = generatedLine;
|
|
16505
|
+
for (end2 = index2; end2 < length2; end2++) {
|
|
16506
|
+
if (this._charIsMappingSeparator(aStr, end2)) {
|
|
16507
|
+
break;
|
|
16508
|
+
}
|
|
16509
|
+
}
|
|
16510
|
+
str = aStr.slice(index2, end2);
|
|
16511
|
+
segment = cachedSegments[str];
|
|
16512
|
+
if (segment) {
|
|
16513
|
+
index2 += str.length;
|
|
16514
|
+
} else {
|
|
16515
|
+
segment = [];
|
|
16516
|
+
while (index2 < end2) {
|
|
16517
|
+
base64VLQ.decode(aStr, index2, temp);
|
|
16518
|
+
value = temp.value;
|
|
16519
|
+
index2 = temp.rest;
|
|
16520
|
+
segment.push(value);
|
|
16521
|
+
}
|
|
16522
|
+
if (segment.length === 2) {
|
|
16523
|
+
throw new Error("Found a source, but no line and column");
|
|
16524
|
+
}
|
|
16525
|
+
if (segment.length === 3) {
|
|
16526
|
+
throw new Error("Found a source and line, but no column");
|
|
16527
|
+
}
|
|
16528
|
+
cachedSegments[str] = segment;
|
|
16529
|
+
}
|
|
16530
|
+
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
16531
|
+
previousGeneratedColumn = mapping.generatedColumn;
|
|
16532
|
+
if (segment.length > 1) {
|
|
16533
|
+
mapping.source = previousSource + segment[1];
|
|
16534
|
+
previousSource += segment[1];
|
|
16535
|
+
mapping.originalLine = previousOriginalLine + segment[2];
|
|
16536
|
+
previousOriginalLine = mapping.originalLine;
|
|
16537
|
+
mapping.originalLine += 1;
|
|
16538
|
+
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
16539
|
+
previousOriginalColumn = mapping.originalColumn;
|
|
16540
|
+
if (segment.length > 4) {
|
|
16541
|
+
mapping.name = previousName + segment[4];
|
|
16542
|
+
previousName += segment[4];
|
|
16543
|
+
}
|
|
16544
|
+
}
|
|
16545
|
+
generatedMappings.push(mapping);
|
|
16546
|
+
if (typeof mapping.originalLine === "number") {
|
|
16547
|
+
originalMappings.push(mapping);
|
|
16548
|
+
}
|
|
16549
|
+
}
|
|
16550
|
+
}
|
|
16551
|
+
quickSort(generatedMappings, util$3.compareByGeneratedPositionsDeflated);
|
|
16552
|
+
this.__generatedMappings = generatedMappings;
|
|
16553
|
+
quickSort(originalMappings, util$3.compareByOriginalPositions);
|
|
16554
|
+
this.__originalMappings = originalMappings;
|
|
16555
|
+
};
|
|
16556
|
+
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
16557
|
+
if (aNeedle[aLineName] <= 0) {
|
|
16558
|
+
throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
|
|
16559
|
+
}
|
|
16560
|
+
if (aNeedle[aColumnName] < 0) {
|
|
16561
|
+
throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
|
|
16562
|
+
}
|
|
16563
|
+
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
16564
|
+
};
|
|
16565
|
+
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
16566
|
+
for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) {
|
|
16567
|
+
var mapping = this._generatedMappings[index2];
|
|
16568
|
+
if (index2 + 1 < this._generatedMappings.length) {
|
|
16569
|
+
var nextMapping = this._generatedMappings[index2 + 1];
|
|
16570
|
+
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
16571
|
+
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
16572
|
+
continue;
|
|
16573
|
+
}
|
|
16574
|
+
}
|
|
16575
|
+
mapping.lastGeneratedColumn = Infinity;
|
|
16576
|
+
}
|
|
16577
|
+
};
|
|
16578
|
+
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
16579
|
+
var needle = {
|
|
16580
|
+
generatedLine: util$3.getArg(aArgs, "line"),
|
|
16581
|
+
generatedColumn: util$3.getArg(aArgs, "column")
|
|
16582
|
+
};
|
|
16583
|
+
var index2 = this._findMapping(
|
|
16584
|
+
needle,
|
|
16585
|
+
this._generatedMappings,
|
|
16586
|
+
"generatedLine",
|
|
16587
|
+
"generatedColumn",
|
|
16588
|
+
util$3.compareByGeneratedPositionsDeflated,
|
|
16589
|
+
util$3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
16590
|
+
);
|
|
16591
|
+
if (index2 >= 0) {
|
|
16592
|
+
var mapping = this._generatedMappings[index2];
|
|
16593
|
+
if (mapping.generatedLine === needle.generatedLine) {
|
|
16594
|
+
var source2 = util$3.getArg(mapping, "source", null);
|
|
16595
|
+
if (source2 !== null) {
|
|
16596
|
+
source2 = this._sources.at(source2);
|
|
16597
|
+
source2 = util$3.computeSourceURL(this.sourceRoot, source2, this._sourceMapURL);
|
|
16598
|
+
}
|
|
16599
|
+
var name = util$3.getArg(mapping, "name", null);
|
|
16600
|
+
if (name !== null) {
|
|
16601
|
+
name = this._names.at(name);
|
|
16602
|
+
}
|
|
16603
|
+
return {
|
|
16604
|
+
source: source2,
|
|
16605
|
+
line: util$3.getArg(mapping, "originalLine", null),
|
|
16606
|
+
column: util$3.getArg(mapping, "originalColumn", null),
|
|
16607
|
+
name
|
|
16608
|
+
};
|
|
16609
|
+
}
|
|
16610
|
+
}
|
|
16611
|
+
return {
|
|
16612
|
+
source: null,
|
|
16613
|
+
line: null,
|
|
16614
|
+
column: null,
|
|
16615
|
+
name: null
|
|
16616
|
+
};
|
|
16617
|
+
};
|
|
16618
|
+
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
16619
|
+
if (!this.sourcesContent) {
|
|
16620
|
+
return false;
|
|
16621
|
+
}
|
|
16622
|
+
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
16623
|
+
return sc == null;
|
|
16624
|
+
});
|
|
16625
|
+
};
|
|
16626
|
+
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
16627
|
+
if (!this.sourcesContent) {
|
|
16628
|
+
return null;
|
|
16629
|
+
}
|
|
16630
|
+
var index2 = this._findSourceIndex(aSource);
|
|
16631
|
+
if (index2 >= 0) {
|
|
16632
|
+
return this.sourcesContent[index2];
|
|
16633
|
+
}
|
|
16634
|
+
var relativeSource = aSource;
|
|
16635
|
+
if (this.sourceRoot != null) {
|
|
16636
|
+
relativeSource = util$3.relative(this.sourceRoot, relativeSource);
|
|
16637
|
+
}
|
|
16638
|
+
var url;
|
|
16639
|
+
if (this.sourceRoot != null && (url = util$3.urlParse(this.sourceRoot))) {
|
|
16640
|
+
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
16641
|
+
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
16642
|
+
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
16643
|
+
}
|
|
16644
|
+
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
16645
|
+
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
16646
|
+
}
|
|
16647
|
+
}
|
|
16648
|
+
if (nullOnMissing) {
|
|
16649
|
+
return null;
|
|
16650
|
+
} else {
|
|
16651
|
+
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
16652
|
+
}
|
|
16653
|
+
};
|
|
16654
|
+
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
16655
|
+
var source2 = util$3.getArg(aArgs, "source");
|
|
16656
|
+
source2 = this._findSourceIndex(source2);
|
|
16657
|
+
if (source2 < 0) {
|
|
16658
|
+
return {
|
|
16659
|
+
line: null,
|
|
16660
|
+
column: null,
|
|
16661
|
+
lastColumn: null
|
|
16662
|
+
};
|
|
16663
|
+
}
|
|
16664
|
+
var needle = {
|
|
16665
|
+
source: source2,
|
|
16666
|
+
originalLine: util$3.getArg(aArgs, "line"),
|
|
16667
|
+
originalColumn: util$3.getArg(aArgs, "column")
|
|
16668
|
+
};
|
|
16669
|
+
var index2 = this._findMapping(
|
|
16670
|
+
needle,
|
|
16671
|
+
this._originalMappings,
|
|
16672
|
+
"originalLine",
|
|
16673
|
+
"originalColumn",
|
|
16674
|
+
util$3.compareByOriginalPositions,
|
|
16675
|
+
util$3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
16676
|
+
);
|
|
16677
|
+
if (index2 >= 0) {
|
|
16678
|
+
var mapping = this._originalMappings[index2];
|
|
16679
|
+
if (mapping.source === needle.source) {
|
|
16680
|
+
return {
|
|
16681
|
+
line: util$3.getArg(mapping, "generatedLine", null),
|
|
16682
|
+
column: util$3.getArg(mapping, "generatedColumn", null),
|
|
16683
|
+
lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
|
|
16684
|
+
};
|
|
16685
|
+
}
|
|
16686
|
+
}
|
|
16687
|
+
return {
|
|
16688
|
+
line: null,
|
|
16689
|
+
column: null,
|
|
16690
|
+
lastColumn: null
|
|
16691
|
+
};
|
|
16692
|
+
};
|
|
16693
|
+
sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
|
16694
|
+
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
16695
|
+
var sourceMap2 = aSourceMap;
|
|
16696
|
+
if (typeof aSourceMap === "string") {
|
|
16697
|
+
sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
|
|
16698
|
+
}
|
|
16699
|
+
var version2 = util$3.getArg(sourceMap2, "version");
|
|
16700
|
+
var sections = util$3.getArg(sourceMap2, "sections");
|
|
16701
|
+
if (version2 != this._version) {
|
|
16702
|
+
throw new Error("Unsupported version: " + version2);
|
|
16703
|
+
}
|
|
16704
|
+
this._sources = new ArraySet();
|
|
16705
|
+
this._names = new ArraySet();
|
|
16706
|
+
var lastOffset = {
|
|
16707
|
+
line: -1,
|
|
16708
|
+
column: 0
|
|
16709
|
+
};
|
|
16710
|
+
this._sections = sections.map(function(s3) {
|
|
16711
|
+
if (s3.url) {
|
|
16712
|
+
throw new Error("Support for url field in sections not implemented.");
|
|
16713
|
+
}
|
|
16714
|
+
var offset = util$3.getArg(s3, "offset");
|
|
16715
|
+
var offsetLine = util$3.getArg(offset, "line");
|
|
16716
|
+
var offsetColumn = util$3.getArg(offset, "column");
|
|
16717
|
+
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
16718
|
+
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
16719
|
+
}
|
|
16720
|
+
lastOffset = offset;
|
|
16721
|
+
return {
|
|
16722
|
+
generatedOffset: {
|
|
16723
|
+
generatedLine: offsetLine + 1,
|
|
16724
|
+
generatedColumn: offsetColumn + 1
|
|
16725
|
+
},
|
|
16726
|
+
consumer: new SourceMapConsumer(util$3.getArg(s3, "map"), aSourceMapURL)
|
|
16727
|
+
};
|
|
16728
|
+
});
|
|
16729
|
+
}
|
|
16730
|
+
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
16731
|
+
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
16732
|
+
IndexedSourceMapConsumer.prototype._version = 3;
|
|
16733
|
+
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
16734
|
+
get: function() {
|
|
16735
|
+
var sources = [];
|
|
16736
|
+
for (var i3 = 0; i3 < this._sections.length; i3++) {
|
|
16737
|
+
for (var j = 0; j < this._sections[i3].consumer.sources.length; j++) {
|
|
16738
|
+
sources.push(this._sections[i3].consumer.sources[j]);
|
|
16739
|
+
}
|
|
16740
|
+
}
|
|
16741
|
+
return sources;
|
|
16742
|
+
}
|
|
16743
|
+
});
|
|
16744
|
+
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
16745
|
+
var needle = {
|
|
16746
|
+
generatedLine: util$3.getArg(aArgs, "line"),
|
|
16747
|
+
generatedColumn: util$3.getArg(aArgs, "column")
|
|
16748
|
+
};
|
|
16749
|
+
var sectionIndex = binarySearch.search(
|
|
16750
|
+
needle,
|
|
16751
|
+
this._sections,
|
|
16752
|
+
function(needle2, section2) {
|
|
16753
|
+
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
16754
|
+
if (cmp) {
|
|
16755
|
+
return cmp;
|
|
16756
|
+
}
|
|
16757
|
+
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
16758
|
+
}
|
|
16759
|
+
);
|
|
16760
|
+
var section = this._sections[sectionIndex];
|
|
16761
|
+
if (!section) {
|
|
16762
|
+
return {
|
|
16763
|
+
source: null,
|
|
16764
|
+
line: null,
|
|
16765
|
+
column: null,
|
|
16766
|
+
name: null
|
|
16767
|
+
};
|
|
16768
|
+
}
|
|
16769
|
+
return section.consumer.originalPositionFor({
|
|
16770
|
+
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
16771
|
+
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
16772
|
+
bias: aArgs.bias
|
|
16773
|
+
});
|
|
16774
|
+
};
|
|
16775
|
+
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
16776
|
+
return this._sections.every(function(s3) {
|
|
16777
|
+
return s3.consumer.hasContentsOfAllSources();
|
|
16778
|
+
});
|
|
16779
|
+
};
|
|
16780
|
+
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
16781
|
+
for (var i3 = 0; i3 < this._sections.length; i3++) {
|
|
16782
|
+
var section = this._sections[i3];
|
|
16783
|
+
var content = section.consumer.sourceContentFor(aSource, true);
|
|
16784
|
+
if (content) {
|
|
16785
|
+
return content;
|
|
16786
|
+
}
|
|
16787
|
+
}
|
|
16788
|
+
if (nullOnMissing) {
|
|
16789
|
+
return null;
|
|
16790
|
+
} else {
|
|
16791
|
+
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
16792
|
+
}
|
|
16793
|
+
};
|
|
16794
|
+
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
16795
|
+
for (var i3 = 0; i3 < this._sections.length; i3++) {
|
|
16796
|
+
var section = this._sections[i3];
|
|
16797
|
+
if (section.consumer._findSourceIndex(util$3.getArg(aArgs, "source")) === -1) {
|
|
16798
|
+
continue;
|
|
16799
|
+
}
|
|
16800
|
+
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
16801
|
+
if (generatedPosition) {
|
|
16802
|
+
var ret = {
|
|
16803
|
+
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
16804
|
+
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
16805
|
+
};
|
|
16806
|
+
return ret;
|
|
16807
|
+
}
|
|
16808
|
+
}
|
|
16809
|
+
return {
|
|
16810
|
+
line: null,
|
|
16811
|
+
column: null
|
|
16812
|
+
};
|
|
16813
|
+
};
|
|
16814
|
+
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
16815
|
+
this.__generatedMappings = [];
|
|
16816
|
+
this.__originalMappings = [];
|
|
16817
|
+
for (var i3 = 0; i3 < this._sections.length; i3++) {
|
|
16818
|
+
var section = this._sections[i3];
|
|
16819
|
+
var sectionMappings = section.consumer._generatedMappings;
|
|
16820
|
+
for (var j = 0; j < sectionMappings.length; j++) {
|
|
16821
|
+
var mapping = sectionMappings[j];
|
|
16822
|
+
var source2 = section.consumer._sources.at(mapping.source);
|
|
16823
|
+
source2 = util$3.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
|
|
16824
|
+
this._sources.add(source2);
|
|
16825
|
+
source2 = this._sources.indexOf(source2);
|
|
16826
|
+
var name = null;
|
|
16827
|
+
if (mapping.name) {
|
|
16828
|
+
name = section.consumer._names.at(mapping.name);
|
|
16829
|
+
this._names.add(name);
|
|
16830
|
+
name = this._names.indexOf(name);
|
|
16831
|
+
}
|
|
16832
|
+
var adjustedMapping = {
|
|
16833
|
+
source: source2,
|
|
16834
|
+
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
16835
|
+
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
16836
|
+
originalLine: mapping.originalLine,
|
|
16837
|
+
originalColumn: mapping.originalColumn,
|
|
16838
|
+
name
|
|
16839
|
+
};
|
|
16840
|
+
this.__generatedMappings.push(adjustedMapping);
|
|
16841
|
+
if (typeof adjustedMapping.originalLine === "number") {
|
|
16842
|
+
this.__originalMappings.push(adjustedMapping);
|
|
16843
|
+
}
|
|
16844
|
+
}
|
|
16845
|
+
}
|
|
16846
|
+
quickSort(this.__generatedMappings, util$3.compareByGeneratedPositionsDeflated);
|
|
16847
|
+
quickSort(this.__originalMappings, util$3.compareByOriginalPositions);
|
|
16848
|
+
};
|
|
16849
|
+
sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
16850
|
+
var sourceNode = {};
|
|
16851
|
+
var SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
|
|
16852
|
+
var util$2 = util$7;
|
|
16853
|
+
var REGEX_NEWLINE = /(\r?\n)/;
|
|
16854
|
+
var NEWLINE_CODE = 10;
|
|
16855
|
+
var isSourceNode = "$$$isSourceNode$$$";
|
|
16856
|
+
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
16857
|
+
this.children = [];
|
|
16858
|
+
this.sourceContents = {};
|
|
16859
|
+
this.line = aLine == null ? null : aLine;
|
|
16860
|
+
this.column = aColumn == null ? null : aColumn;
|
|
16861
|
+
this.source = aSource == null ? null : aSource;
|
|
16862
|
+
this.name = aName == null ? null : aName;
|
|
16863
|
+
this[isSourceNode] = true;
|
|
16864
|
+
if (aChunks != null)
|
|
16865
|
+
this.add(aChunks);
|
|
16866
|
+
}
|
|
16867
|
+
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
16868
|
+
var node = new SourceNode();
|
|
16869
|
+
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
16870
|
+
var remainingLinesIndex = 0;
|
|
16871
|
+
var shiftNextLine = function() {
|
|
16872
|
+
var lineContents = getNextLine();
|
|
16873
|
+
var newLine = getNextLine() || "";
|
|
16874
|
+
return lineContents + newLine;
|
|
16875
|
+
function getNextLine() {
|
|
16876
|
+
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
|
|
16877
|
+
}
|
|
16878
|
+
};
|
|
16879
|
+
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
16880
|
+
var lastMapping = null;
|
|
16881
|
+
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
16882
|
+
if (lastMapping !== null) {
|
|
16883
|
+
if (lastGeneratedLine < mapping.generatedLine) {
|
|
16884
|
+
addMappingWithCode(lastMapping, shiftNextLine());
|
|
16885
|
+
lastGeneratedLine++;
|
|
16886
|
+
lastGeneratedColumn = 0;
|
|
16887
|
+
} else {
|
|
16888
|
+
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
16889
|
+
var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
16890
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
16891
|
+
lastGeneratedColumn = mapping.generatedColumn;
|
|
16892
|
+
addMappingWithCode(lastMapping, code2);
|
|
16893
|
+
lastMapping = mapping;
|
|
16894
|
+
return;
|
|
16895
|
+
}
|
|
16896
|
+
}
|
|
16897
|
+
while (lastGeneratedLine < mapping.generatedLine) {
|
|
16898
|
+
node.add(shiftNextLine());
|
|
16899
|
+
lastGeneratedLine++;
|
|
16900
|
+
}
|
|
16901
|
+
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
16902
|
+
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
16903
|
+
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
16904
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
16905
|
+
lastGeneratedColumn = mapping.generatedColumn;
|
|
16906
|
+
}
|
|
16907
|
+
lastMapping = mapping;
|
|
16908
|
+
}, this);
|
|
16909
|
+
if (remainingLinesIndex < remainingLines.length) {
|
|
16910
|
+
if (lastMapping) {
|
|
16911
|
+
addMappingWithCode(lastMapping, shiftNextLine());
|
|
16912
|
+
}
|
|
16913
|
+
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
16914
|
+
}
|
|
16915
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
16916
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
16917
|
+
if (content != null) {
|
|
16918
|
+
if (aRelativePath != null) {
|
|
16919
|
+
sourceFile = util$2.join(aRelativePath, sourceFile);
|
|
16920
|
+
}
|
|
16921
|
+
node.setSourceContent(sourceFile, content);
|
|
16922
|
+
}
|
|
16923
|
+
});
|
|
16924
|
+
return node;
|
|
16925
|
+
function addMappingWithCode(mapping, code2) {
|
|
16926
|
+
if (mapping === null || mapping.source === void 0) {
|
|
16927
|
+
node.add(code2);
|
|
16928
|
+
} else {
|
|
16929
|
+
var source2 = aRelativePath ? util$2.join(aRelativePath, mapping.source) : mapping.source;
|
|
16930
|
+
node.add(new SourceNode(
|
|
16931
|
+
mapping.originalLine,
|
|
16932
|
+
mapping.originalColumn,
|
|
16933
|
+
source2,
|
|
16934
|
+
code2,
|
|
16935
|
+
mapping.name
|
|
16936
|
+
));
|
|
16937
|
+
}
|
|
16938
|
+
}
|
|
16939
|
+
};
|
|
16940
|
+
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
16941
|
+
if (Array.isArray(aChunk)) {
|
|
16942
|
+
aChunk.forEach(function(chunk) {
|
|
16943
|
+
this.add(chunk);
|
|
16944
|
+
}, this);
|
|
16945
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
16946
|
+
if (aChunk) {
|
|
16947
|
+
this.children.push(aChunk);
|
|
16948
|
+
}
|
|
16949
|
+
} else {
|
|
16950
|
+
throw new TypeError(
|
|
16951
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
16952
|
+
);
|
|
16953
|
+
}
|
|
16954
|
+
return this;
|
|
16955
|
+
};
|
|
16956
|
+
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
16957
|
+
if (Array.isArray(aChunk)) {
|
|
16958
|
+
for (var i3 = aChunk.length - 1; i3 >= 0; i3--) {
|
|
16959
|
+
this.prepend(aChunk[i3]);
|
|
16960
|
+
}
|
|
16961
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
16962
|
+
this.children.unshift(aChunk);
|
|
16963
|
+
} else {
|
|
16964
|
+
throw new TypeError(
|
|
16965
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
16966
|
+
);
|
|
16967
|
+
}
|
|
16968
|
+
return this;
|
|
16969
|
+
};
|
|
16970
|
+
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
16971
|
+
var chunk;
|
|
16972
|
+
for (var i3 = 0, len2 = this.children.length; i3 < len2; i3++) {
|
|
16973
|
+
chunk = this.children[i3];
|
|
16974
|
+
if (chunk[isSourceNode]) {
|
|
16975
|
+
chunk.walk(aFn);
|
|
16976
|
+
} else {
|
|
16977
|
+
if (chunk !== "") {
|
|
16978
|
+
aFn(chunk, {
|
|
16979
|
+
source: this.source,
|
|
16980
|
+
line: this.line,
|
|
16981
|
+
column: this.column,
|
|
16982
|
+
name: this.name
|
|
16983
|
+
});
|
|
16984
|
+
}
|
|
16985
|
+
}
|
|
16986
|
+
}
|
|
16987
|
+
};
|
|
16988
|
+
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
16989
|
+
var newChildren;
|
|
16990
|
+
var i3;
|
|
16991
|
+
var len2 = this.children.length;
|
|
16992
|
+
if (len2 > 0) {
|
|
16993
|
+
newChildren = [];
|
|
16994
|
+
for (i3 = 0; i3 < len2 - 1; i3++) {
|
|
16995
|
+
newChildren.push(this.children[i3]);
|
|
16996
|
+
newChildren.push(aSep);
|
|
16997
|
+
}
|
|
16998
|
+
newChildren.push(this.children[i3]);
|
|
16999
|
+
this.children = newChildren;
|
|
17000
|
+
}
|
|
17001
|
+
return this;
|
|
17002
|
+
};
|
|
17003
|
+
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
17004
|
+
var lastChild2 = this.children[this.children.length - 1];
|
|
17005
|
+
if (lastChild2[isSourceNode]) {
|
|
17006
|
+
lastChild2.replaceRight(aPattern, aReplacement);
|
|
17007
|
+
} else if (typeof lastChild2 === "string") {
|
|
17008
|
+
this.children[this.children.length - 1] = lastChild2.replace(aPattern, aReplacement);
|
|
17009
|
+
} else {
|
|
17010
|
+
this.children.push("".replace(aPattern, aReplacement));
|
|
17011
|
+
}
|
|
17012
|
+
return this;
|
|
17013
|
+
};
|
|
17014
|
+
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
17015
|
+
this.sourceContents[util$2.toSetString(aSourceFile)] = aSourceContent;
|
|
17016
|
+
};
|
|
17017
|
+
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
17018
|
+
for (var i3 = 0, len2 = this.children.length; i3 < len2; i3++) {
|
|
17019
|
+
if (this.children[i3][isSourceNode]) {
|
|
17020
|
+
this.children[i3].walkSourceContents(aFn);
|
|
17021
|
+
}
|
|
17022
|
+
}
|
|
17023
|
+
var sources = Object.keys(this.sourceContents);
|
|
17024
|
+
for (var i3 = 0, len2 = sources.length; i3 < len2; i3++) {
|
|
17025
|
+
aFn(util$2.fromSetString(sources[i3]), this.sourceContents[sources[i3]]);
|
|
17026
|
+
}
|
|
17027
|
+
};
|
|
17028
|
+
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
17029
|
+
var str = "";
|
|
17030
|
+
this.walk(function(chunk) {
|
|
17031
|
+
str += chunk;
|
|
17032
|
+
});
|
|
17033
|
+
return str;
|
|
17034
|
+
};
|
|
17035
|
+
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
17036
|
+
var generated = {
|
|
17037
|
+
code: "",
|
|
17038
|
+
line: 1,
|
|
17039
|
+
column: 0
|
|
17040
|
+
};
|
|
17041
|
+
var map2 = new SourceMapGenerator(aArgs);
|
|
17042
|
+
var sourceMappingActive = false;
|
|
17043
|
+
var lastOriginalSource = null;
|
|
17044
|
+
var lastOriginalLine = null;
|
|
17045
|
+
var lastOriginalColumn = null;
|
|
17046
|
+
var lastOriginalName = null;
|
|
17047
|
+
this.walk(function(chunk, original) {
|
|
17048
|
+
generated.code += chunk;
|
|
17049
|
+
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
17050
|
+
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
17051
|
+
map2.addMapping({
|
|
17052
|
+
source: original.source,
|
|
17053
|
+
original: {
|
|
17054
|
+
line: original.line,
|
|
17055
|
+
column: original.column
|
|
17056
|
+
},
|
|
17057
|
+
generated: {
|
|
17058
|
+
line: generated.line,
|
|
17059
|
+
column: generated.column
|
|
17060
|
+
},
|
|
17061
|
+
name: original.name
|
|
17062
|
+
});
|
|
17063
|
+
}
|
|
17064
|
+
lastOriginalSource = original.source;
|
|
17065
|
+
lastOriginalLine = original.line;
|
|
17066
|
+
lastOriginalColumn = original.column;
|
|
17067
|
+
lastOriginalName = original.name;
|
|
17068
|
+
sourceMappingActive = true;
|
|
17069
|
+
} else if (sourceMappingActive) {
|
|
17070
|
+
map2.addMapping({
|
|
17071
|
+
generated: {
|
|
17072
|
+
line: generated.line,
|
|
17073
|
+
column: generated.column
|
|
17074
|
+
}
|
|
17075
|
+
});
|
|
17076
|
+
lastOriginalSource = null;
|
|
17077
|
+
sourceMappingActive = false;
|
|
17078
|
+
}
|
|
17079
|
+
for (var idx = 0, length2 = chunk.length; idx < length2; idx++) {
|
|
17080
|
+
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
17081
|
+
generated.line++;
|
|
17082
|
+
generated.column = 0;
|
|
17083
|
+
if (idx + 1 === length2) {
|
|
17084
|
+
lastOriginalSource = null;
|
|
17085
|
+
sourceMappingActive = false;
|
|
17086
|
+
} else if (sourceMappingActive) {
|
|
17087
|
+
map2.addMapping({
|
|
17088
|
+
source: original.source,
|
|
17089
|
+
original: {
|
|
17090
|
+
line: original.line,
|
|
17091
|
+
column: original.column
|
|
17092
|
+
},
|
|
17093
|
+
generated: {
|
|
17094
|
+
line: generated.line,
|
|
17095
|
+
column: generated.column
|
|
17096
|
+
},
|
|
17097
|
+
name: original.name
|
|
17098
|
+
});
|
|
17099
|
+
}
|
|
17100
|
+
} else {
|
|
17101
|
+
generated.column++;
|
|
17102
|
+
}
|
|
17103
|
+
}
|
|
17104
|
+
});
|
|
17105
|
+
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
17106
|
+
map2.setSourceContent(sourceFile, sourceContent);
|
|
17107
|
+
});
|
|
17108
|
+
return { code: generated.code, map: map2 };
|
|
17109
|
+
};
|
|
17110
|
+
sourceNode.SourceNode = SourceNode;
|
|
17111
|
+
sourceMap$1.SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
|
|
17112
|
+
sourceMap$1.SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;
|
|
17113
|
+
sourceMap$1.SourceNode = sourceNode.SourceNode;
|
|
15377
17114
|
/*!
|
|
15378
17115
|
* message-compiler v9.2.2
|
|
15379
17116
|
* (c) 2022 kazuya kawaguchi
|
|
15380
17117
|
* Released under the MIT License.
|
|
15381
17118
|
*/
|
|
17119
|
+
Object.defineProperty(messageCompiler_cjs, "__esModule", { value: true });
|
|
17120
|
+
var shared$2 = shared$3.exports;
|
|
17121
|
+
var sourceMap = sourceMap$1;
|
|
15382
17122
|
const CompileErrorCodes = {
|
|
15383
17123
|
EXPECTED_TOKEN: 1,
|
|
15384
17124
|
INVALID_TOKEN_IN_PLACEHOLDER: 2,
|
|
@@ -15414,7 +17154,7 @@ const errorMessages$2 = {
|
|
|
15414
17154
|
};
|
|
15415
17155
|
function createCompileError(code2, loc, options = {}) {
|
|
15416
17156
|
const { domain, messages, args } = options;
|
|
15417
|
-
const msg =
|
|
17157
|
+
const msg = shared$2.format((messages || errorMessages$2)[code2] || "", ...args || []);
|
|
15418
17158
|
const error2 = new SyntaxError(String(msg));
|
|
15419
17159
|
error2.code = code2;
|
|
15420
17160
|
if (loc) {
|
|
@@ -15426,6 +17166,10 @@ function createCompileError(code2, loc, options = {}) {
|
|
|
15426
17166
|
function defaultOnError(error2) {
|
|
15427
17167
|
throw error2;
|
|
15428
17168
|
}
|
|
17169
|
+
const LocationStub = {
|
|
17170
|
+
start: { line: 1, column: 1, offset: 0 },
|
|
17171
|
+
end: { line: 1, column: 1, offset: 0 }
|
|
17172
|
+
};
|
|
15429
17173
|
function createPosition(line, column, offset) {
|
|
15430
17174
|
return { line, column, offset };
|
|
15431
17175
|
}
|
|
@@ -16359,7 +18103,7 @@ function createParser(options = {}) {
|
|
|
16359
18103
|
}
|
|
16360
18104
|
}
|
|
16361
18105
|
function parse2(source2) {
|
|
16362
|
-
const tokenizer = createTokenizer(source2, assign({}, options));
|
|
18106
|
+
const tokenizer = createTokenizer(source2, shared$2.assign({}, options));
|
|
16363
18107
|
const context = tokenizer.context();
|
|
16364
18108
|
const node = startNode(0, context.offset, context.startLoc);
|
|
16365
18109
|
if (location2 && node.loc) {
|
|
@@ -16431,7 +18175,7 @@ function transform(ast, options = {}) {
|
|
|
16431
18175
|
ast.helpers = Array.from(context.helpers);
|
|
16432
18176
|
}
|
|
16433
18177
|
function createCodeGenerator(ast, options) {
|
|
16434
|
-
const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
|
|
18178
|
+
const { sourceMap: sourceMap$12, filename, breakLineCode, needIndent: _needIndent } = options;
|
|
16435
18179
|
const _context = {
|
|
16436
18180
|
source: ast.loc.source,
|
|
16437
18181
|
filename,
|
|
@@ -16447,6 +18191,12 @@ function createCodeGenerator(ast, options) {
|
|
|
16447
18191
|
const context = () => _context;
|
|
16448
18192
|
function push2(code2, node) {
|
|
16449
18193
|
_context.code += code2;
|
|
18194
|
+
if (_context.map) {
|
|
18195
|
+
if (node && node.loc && node.loc !== LocationStub) {
|
|
18196
|
+
addMapping(node.loc.start, getMappingName(node));
|
|
18197
|
+
}
|
|
18198
|
+
advancePositionWithSource(_context, code2);
|
|
18199
|
+
}
|
|
16450
18200
|
}
|
|
16451
18201
|
function _newline(n2, withBreakLine = true) {
|
|
16452
18202
|
const _breakLineCode = withBreakLine ? breakLineCode : "";
|
|
@@ -16465,6 +18215,24 @@ function createCodeGenerator(ast, options) {
|
|
|
16465
18215
|
}
|
|
16466
18216
|
const helper2 = (key) => `_${key}`;
|
|
16467
18217
|
const needIndent = () => _context.needIndent;
|
|
18218
|
+
function addMapping(loc, name) {
|
|
18219
|
+
_context.map.addMapping({
|
|
18220
|
+
name,
|
|
18221
|
+
source: _context.filename,
|
|
18222
|
+
original: {
|
|
18223
|
+
line: loc.line,
|
|
18224
|
+
column: loc.column - 1
|
|
18225
|
+
},
|
|
18226
|
+
generated: {
|
|
18227
|
+
line: _context.line,
|
|
18228
|
+
column: _context.column - 1
|
|
18229
|
+
}
|
|
18230
|
+
});
|
|
18231
|
+
}
|
|
18232
|
+
if (sourceMap$12) {
|
|
18233
|
+
_context.map = new sourceMap.SourceMapGenerator();
|
|
18234
|
+
_context.map.setSourceContent(filename, _context.source);
|
|
18235
|
+
}
|
|
16468
18236
|
return {
|
|
16469
18237
|
context,
|
|
16470
18238
|
push: push2,
|
|
@@ -16566,16 +18334,16 @@ function generateNode(generator, node) {
|
|
|
16566
18334
|
}
|
|
16567
18335
|
}
|
|
16568
18336
|
const generate = (ast, options = {}) => {
|
|
16569
|
-
const mode = isString
|
|
16570
|
-
const filename = isString
|
|
16571
|
-
const
|
|
18337
|
+
const mode = shared$2.isString(options.mode) ? options.mode : "normal";
|
|
18338
|
+
const filename = shared$2.isString(options.filename) ? options.filename : "message.intl";
|
|
18339
|
+
const sourceMap2 = !!options.sourceMap;
|
|
16572
18340
|
const breakLineCode = options.breakLineCode != null ? options.breakLineCode : mode === "arrow" ? ";" : "\n";
|
|
16573
18341
|
const needIndent = options.needIndent ? options.needIndent : mode !== "arrow";
|
|
16574
18342
|
const helpers = ast.helpers || [];
|
|
16575
18343
|
const generator = createCodeGenerator(ast, {
|
|
16576
18344
|
mode,
|
|
16577
18345
|
filename,
|
|
16578
|
-
sourceMap,
|
|
18346
|
+
sourceMap: sourceMap2,
|
|
16579
18347
|
breakLineCode,
|
|
16580
18348
|
needIndent
|
|
16581
18349
|
});
|
|
@@ -16596,27 +18364,80 @@ const generate = (ast, options = {}) => {
|
|
|
16596
18364
|
map: map2 ? map2.toJSON() : void 0
|
|
16597
18365
|
};
|
|
16598
18366
|
};
|
|
18367
|
+
function getMappingName(node) {
|
|
18368
|
+
switch (node.type) {
|
|
18369
|
+
case 3:
|
|
18370
|
+
case 9:
|
|
18371
|
+
case 8:
|
|
18372
|
+
case 7:
|
|
18373
|
+
return node.value;
|
|
18374
|
+
case 5:
|
|
18375
|
+
return node.index.toString();
|
|
18376
|
+
case 4:
|
|
18377
|
+
return node.key;
|
|
18378
|
+
default:
|
|
18379
|
+
return void 0;
|
|
18380
|
+
}
|
|
18381
|
+
}
|
|
18382
|
+
function advancePositionWithSource(pos, source2, numberOfCharacters = source2.length) {
|
|
18383
|
+
let linesCount = 0;
|
|
18384
|
+
let lastNewLinePos = -1;
|
|
18385
|
+
for (let i3 = 0; i3 < numberOfCharacters; i3++) {
|
|
18386
|
+
if (source2.charCodeAt(i3) === 10) {
|
|
18387
|
+
linesCount++;
|
|
18388
|
+
lastNewLinePos = i3;
|
|
18389
|
+
}
|
|
18390
|
+
}
|
|
18391
|
+
pos.offset += numberOfCharacters;
|
|
18392
|
+
pos.line += linesCount;
|
|
18393
|
+
pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
|
|
18394
|
+
return pos;
|
|
18395
|
+
}
|
|
16599
18396
|
function baseCompile(source2, options = {}) {
|
|
16600
|
-
const assignedOptions = assign({}, options);
|
|
18397
|
+
const assignedOptions = shared$2.assign({}, options);
|
|
16601
18398
|
const parser = createParser(assignedOptions);
|
|
16602
18399
|
const ast = parser.parse(source2);
|
|
16603
18400
|
transform(ast, assignedOptions);
|
|
16604
18401
|
return generate(ast, assignedOptions);
|
|
16605
18402
|
}
|
|
18403
|
+
messageCompiler_cjs.CompileErrorCodes = CompileErrorCodes;
|
|
18404
|
+
messageCompiler_cjs.ERROR_DOMAIN = ERROR_DOMAIN;
|
|
18405
|
+
messageCompiler_cjs.LocationStub = LocationStub;
|
|
18406
|
+
messageCompiler_cjs.baseCompile = baseCompile;
|
|
18407
|
+
messageCompiler_cjs.createCompileError = createCompileError;
|
|
18408
|
+
messageCompiler_cjs.createLocation = createLocation;
|
|
18409
|
+
messageCompiler_cjs.createParser = createParser;
|
|
18410
|
+
messageCompiler_cjs.createPosition = createPosition;
|
|
18411
|
+
messageCompiler_cjs.defaultOnError = defaultOnError;
|
|
18412
|
+
messageCompiler_cjs.errorMessages = errorMessages$2;
|
|
18413
|
+
{
|
|
18414
|
+
messageCompiler$1.exports = messageCompiler_cjs;
|
|
18415
|
+
}
|
|
18416
|
+
var devtoolsIf$1 = { exports: {} };
|
|
18417
|
+
var devtoolsIf_cjs = {};
|
|
16606
18418
|
/*!
|
|
16607
18419
|
* devtools-if v9.2.2
|
|
16608
18420
|
* (c) 2022 kazuya kawaguchi
|
|
16609
18421
|
* Released under the MIT License.
|
|
16610
18422
|
*/
|
|
18423
|
+
Object.defineProperty(devtoolsIf_cjs, "__esModule", { value: true });
|
|
16611
18424
|
const IntlifyDevToolsHooks = {
|
|
16612
18425
|
I18nInit: "i18n:init",
|
|
16613
18426
|
FunctionTranslate: "function:translate"
|
|
16614
18427
|
};
|
|
18428
|
+
devtoolsIf_cjs.IntlifyDevToolsHooks = IntlifyDevToolsHooks;
|
|
18429
|
+
{
|
|
18430
|
+
devtoolsIf$1.exports = devtoolsIf_cjs;
|
|
18431
|
+
}
|
|
16615
18432
|
/*!
|
|
16616
18433
|
* core-base v9.2.2
|
|
16617
18434
|
* (c) 2022 kazuya kawaguchi
|
|
16618
18435
|
* Released under the MIT License.
|
|
16619
18436
|
*/
|
|
18437
|
+
Object.defineProperty(coreBase_cjs, "__esModule", { value: true });
|
|
18438
|
+
var messageCompiler = messageCompiler$1.exports;
|
|
18439
|
+
var shared$1 = shared$3.exports;
|
|
18440
|
+
var devtoolsIf = devtoolsIf$1.exports;
|
|
16620
18441
|
const pathStateMachine = [];
|
|
16621
18442
|
pathStateMachine[0] = {
|
|
16622
18443
|
["w"]: [0],
|
|
@@ -16793,10 +18614,10 @@ function parse$1(path) {
|
|
|
16793
18614
|
}
|
|
16794
18615
|
const cache = /* @__PURE__ */ new Map();
|
|
16795
18616
|
function resolveWithKeyValue(obj, path) {
|
|
16796
|
-
return isObject
|
|
18617
|
+
return shared$1.isObject(obj) ? obj[path] : null;
|
|
16797
18618
|
}
|
|
16798
18619
|
function resolveValue(obj, path) {
|
|
16799
|
-
if (!isObject
|
|
18620
|
+
if (!shared$1.isObject(obj)) {
|
|
16800
18621
|
return null;
|
|
16801
18622
|
}
|
|
16802
18623
|
let hit = cache.get(path);
|
|
@@ -16826,7 +18647,7 @@ const DEFAULT_MODIFIER = (str) => str;
|
|
|
16826
18647
|
const DEFAULT_MESSAGE = (ctx) => "";
|
|
16827
18648
|
const DEFAULT_MESSAGE_DATA_TYPE = "text";
|
|
16828
18649
|
const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
|
|
16829
|
-
const DEFAULT_INTERPOLATE = toDisplayString;
|
|
18650
|
+
const DEFAULT_INTERPOLATE = shared$1.toDisplayString;
|
|
16830
18651
|
function pluralDefault(choice, choicesLength) {
|
|
16831
18652
|
choice = Math.abs(choice);
|
|
16832
18653
|
if (choicesLength === 2) {
|
|
@@ -16835,8 +18656,8 @@ function pluralDefault(choice, choicesLength) {
|
|
|
16835
18656
|
return choice ? Math.min(choice, 2) : 0;
|
|
16836
18657
|
}
|
|
16837
18658
|
function getPluralIndex(options) {
|
|
16838
|
-
const index2 =
|
|
16839
|
-
return options.named && (
|
|
18659
|
+
const index2 = shared$1.isNumber(options.pluralIndex) ? options.pluralIndex : -1;
|
|
18660
|
+
return options.named && (shared$1.isNumber(options.named.count) || shared$1.isNumber(options.named.n)) ? shared$1.isNumber(options.named.count) ? options.named.count : shared$1.isNumber(options.named.n) ? options.named.n : index2 : index2;
|
|
16840
18661
|
}
|
|
16841
18662
|
function normalizeNamed(pluralIndex, props) {
|
|
16842
18663
|
if (!props.count) {
|
|
@@ -16849,45 +18670,45 @@ function normalizeNamed(pluralIndex, props) {
|
|
|
16849
18670
|
function createMessageContext(options = {}) {
|
|
16850
18671
|
const locale2 = options.locale;
|
|
16851
18672
|
const pluralIndex = getPluralIndex(options);
|
|
16852
|
-
const pluralRule = isObject
|
|
16853
|
-
const orgPluralRule = isObject
|
|
18673
|
+
const pluralRule = shared$1.isObject(options.pluralRules) && shared$1.isString(locale2) && shared$1.isFunction(options.pluralRules[locale2]) ? options.pluralRules[locale2] : pluralDefault;
|
|
18674
|
+
const orgPluralRule = shared$1.isObject(options.pluralRules) && shared$1.isString(locale2) && shared$1.isFunction(options.pluralRules[locale2]) ? pluralDefault : void 0;
|
|
16854
18675
|
const plural = (messages) => {
|
|
16855
18676
|
return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
|
|
16856
18677
|
};
|
|
16857
18678
|
const _list = options.list || [];
|
|
16858
18679
|
const list = (index2) => _list[index2];
|
|
16859
18680
|
const _named = options.named || {};
|
|
16860
|
-
|
|
18681
|
+
shared$1.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
|
|
16861
18682
|
const named = (key) => _named[key];
|
|
16862
18683
|
function message(key) {
|
|
16863
|
-
const msg =
|
|
18684
|
+
const msg = shared$1.isFunction(options.messages) ? options.messages(key) : shared$1.isObject(options.messages) ? options.messages[key] : false;
|
|
16864
18685
|
return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
|
|
16865
18686
|
}
|
|
16866
18687
|
const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
|
|
16867
|
-
const normalize2 = isPlainObject(options.processor) &&
|
|
16868
|
-
const interpolate = isPlainObject(options.processor) &&
|
|
16869
|
-
const type = isPlainObject(options.processor) &&
|
|
18688
|
+
const normalize2 = shared$1.isPlainObject(options.processor) && shared$1.isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
|
|
18689
|
+
const interpolate = shared$1.isPlainObject(options.processor) && shared$1.isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
|
|
18690
|
+
const type = shared$1.isPlainObject(options.processor) && shared$1.isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
|
|
16870
18691
|
const linked = (key, ...args) => {
|
|
16871
18692
|
const [arg1, arg2] = args;
|
|
16872
18693
|
let type2 = "text";
|
|
16873
18694
|
let modifier = "";
|
|
16874
18695
|
if (args.length === 1) {
|
|
16875
|
-
if (isObject
|
|
18696
|
+
if (shared$1.isObject(arg1)) {
|
|
16876
18697
|
modifier = arg1.modifier || modifier;
|
|
16877
18698
|
type2 = arg1.type || type2;
|
|
16878
|
-
} else if (
|
|
18699
|
+
} else if (shared$1.isString(arg1)) {
|
|
16879
18700
|
modifier = arg1 || modifier;
|
|
16880
18701
|
}
|
|
16881
18702
|
} else if (args.length === 2) {
|
|
16882
|
-
if (
|
|
18703
|
+
if (shared$1.isString(arg1)) {
|
|
16883
18704
|
modifier = arg1 || modifier;
|
|
16884
18705
|
}
|
|
16885
|
-
if (
|
|
18706
|
+
if (shared$1.isString(arg2)) {
|
|
16886
18707
|
type2 = arg2 || type2;
|
|
16887
18708
|
}
|
|
16888
18709
|
}
|
|
16889
18710
|
let msg = message(key)(ctx);
|
|
16890
|
-
if (type2 === "vnode" && isArray
|
|
18711
|
+
if (type2 === "vnode" && shared$1.isArray(msg) && modifier) {
|
|
16891
18712
|
msg = msg[0];
|
|
16892
18713
|
}
|
|
16893
18714
|
return modifier ? _modifier(modifier)(msg, type2) : msg;
|
|
@@ -16908,15 +18729,18 @@ let devtools = null;
|
|
|
16908
18729
|
function setDevToolsHook(hook) {
|
|
16909
18730
|
devtools = hook;
|
|
16910
18731
|
}
|
|
18732
|
+
function getDevToolsHook() {
|
|
18733
|
+
return devtools;
|
|
18734
|
+
}
|
|
16911
18735
|
function initI18nDevTools(i18n2, version2, meta) {
|
|
16912
|
-
devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
|
|
18736
|
+
devtools && devtools.emit(devtoolsIf.IntlifyDevToolsHooks.I18nInit, {
|
|
16913
18737
|
timestamp: Date.now(),
|
|
16914
18738
|
i18n: i18n2,
|
|
16915
18739
|
version: version2,
|
|
16916
18740
|
meta
|
|
16917
18741
|
});
|
|
16918
18742
|
}
|
|
16919
|
-
const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
|
|
18743
|
+
const translateDevTools = /* @__PURE__ */ createDevToolsHook(devtoolsIf.IntlifyDevToolsHooks.FunctionTranslate);
|
|
16920
18744
|
function createDevToolsHook(hook) {
|
|
16921
18745
|
return (payloads) => devtools && devtools.emit(hook, payloads);
|
|
16922
18746
|
}
|
|
@@ -16938,16 +18762,16 @@ const warnMessages$1 = {
|
|
|
16938
18762
|
[CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`
|
|
16939
18763
|
};
|
|
16940
18764
|
function getWarnMessage$1(code2, ...args) {
|
|
16941
|
-
return format
|
|
18765
|
+
return shared$1.format(warnMessages$1[code2], ...args);
|
|
16942
18766
|
}
|
|
16943
18767
|
function fallbackWithSimple(ctx, fallback, start2) {
|
|
16944
18768
|
return [.../* @__PURE__ */ new Set([
|
|
16945
18769
|
start2,
|
|
16946
|
-
...isArray
|
|
18770
|
+
...shared$1.isArray(fallback) ? fallback : shared$1.isObject(fallback) ? Object.keys(fallback) : shared$1.isString(fallback) ? [fallback] : [start2]
|
|
16947
18771
|
])];
|
|
16948
18772
|
}
|
|
16949
18773
|
function fallbackWithLocaleChain(ctx, fallback, start2) {
|
|
16950
|
-
const startLocale =
|
|
18774
|
+
const startLocale = shared$1.isString(start2) ? start2 : DEFAULT_LOCALE$1;
|
|
16951
18775
|
const context = ctx;
|
|
16952
18776
|
if (!context.__localeChainCache) {
|
|
16953
18777
|
context.__localeChainCache = /* @__PURE__ */ new Map();
|
|
@@ -16956,12 +18780,12 @@ function fallbackWithLocaleChain(ctx, fallback, start2) {
|
|
|
16956
18780
|
if (!chain) {
|
|
16957
18781
|
chain = [];
|
|
16958
18782
|
let block = [start2];
|
|
16959
|
-
while (isArray
|
|
18783
|
+
while (shared$1.isArray(block)) {
|
|
16960
18784
|
block = appendBlockToChain(chain, block, fallback);
|
|
16961
18785
|
}
|
|
16962
|
-
const defaults2 = isArray
|
|
16963
|
-
block =
|
|
16964
|
-
if (isArray
|
|
18786
|
+
const defaults2 = shared$1.isArray(fallback) || !shared$1.isPlainObject(fallback) ? fallback : fallback["default"] ? fallback["default"] : null;
|
|
18787
|
+
block = shared$1.isString(defaults2) ? [defaults2] : defaults2;
|
|
18788
|
+
if (shared$1.isArray(block)) {
|
|
16965
18789
|
appendBlockToChain(chain, block, false);
|
|
16966
18790
|
}
|
|
16967
18791
|
context.__localeChainCache.set(startLocale, chain);
|
|
@@ -16970,9 +18794,9 @@ function fallbackWithLocaleChain(ctx, fallback, start2) {
|
|
|
16970
18794
|
}
|
|
16971
18795
|
function appendBlockToChain(chain, block, blocks) {
|
|
16972
18796
|
let follow = true;
|
|
16973
|
-
for (let i3 = 0; i3 < block.length && isBoolean(follow); i3++) {
|
|
18797
|
+
for (let i3 = 0; i3 < block.length && shared$1.isBoolean(follow); i3++) {
|
|
16974
18798
|
const locale2 = block[i3];
|
|
16975
|
-
if (
|
|
18799
|
+
if (shared$1.isString(locale2)) {
|
|
16976
18800
|
follow = appendLocaleToChain(chain, block[i3], blocks);
|
|
16977
18801
|
}
|
|
16978
18802
|
}
|
|
@@ -16996,7 +18820,7 @@ function appendItemToChain(chain, target, blocks) {
|
|
|
16996
18820
|
follow = target[target.length - 1] !== "!";
|
|
16997
18821
|
const locale2 = target.replace(/!/g, "");
|
|
16998
18822
|
chain.push(locale2);
|
|
16999
|
-
if ((isArray
|
|
18823
|
+
if ((shared$1.isArray(blocks) || shared$1.isPlainObject(blocks)) && blocks[locale2]) {
|
|
17000
18824
|
follow = blocks[locale2];
|
|
17001
18825
|
}
|
|
17002
18826
|
}
|
|
@@ -17011,13 +18835,13 @@ const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)
|
|
|
17011
18835
|
function getDefaultLinkedModifiers() {
|
|
17012
18836
|
return {
|
|
17013
18837
|
upper: (val, type) => {
|
|
17014
|
-
return type === "text" &&
|
|
18838
|
+
return type === "text" && shared$1.isString(val) ? val.toUpperCase() : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? val.children.toUpperCase() : val;
|
|
17015
18839
|
},
|
|
17016
18840
|
lower: (val, type) => {
|
|
17017
|
-
return type === "text" &&
|
|
18841
|
+
return type === "text" && shared$1.isString(val) ? val.toLowerCase() : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? val.children.toLowerCase() : val;
|
|
17018
18842
|
},
|
|
17019
18843
|
capitalize: (val, type) => {
|
|
17020
|
-
return type === "text" &&
|
|
18844
|
+
return type === "text" && shared$1.isString(val) ? capitalize(val) : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? capitalize(val.children) : val;
|
|
17021
18845
|
}
|
|
17022
18846
|
};
|
|
17023
18847
|
}
|
|
@@ -17045,32 +18869,32 @@ const setFallbackContext = (context) => {
|
|
|
17045
18869
|
const getFallbackContext = () => _fallbackContext;
|
|
17046
18870
|
let _cid = 0;
|
|
17047
18871
|
function createCoreContext(options = {}) {
|
|
17048
|
-
const version2 =
|
|
17049
|
-
const locale2 =
|
|
17050
|
-
const fallbackLocale = isArray
|
|
17051
|
-
const messages = isPlainObject(options.messages) ? options.messages : { [locale2]: {} };
|
|
17052
|
-
const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale2]: {} };
|
|
17053
|
-
const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale2]: {} };
|
|
17054
|
-
const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
|
|
18872
|
+
const version2 = shared$1.isString(options.version) ? options.version : VERSION$1;
|
|
18873
|
+
const locale2 = shared$1.isString(options.locale) ? options.locale : DEFAULT_LOCALE$1;
|
|
18874
|
+
const fallbackLocale = shared$1.isArray(options.fallbackLocale) || shared$1.isPlainObject(options.fallbackLocale) || shared$1.isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
|
|
18875
|
+
const messages = shared$1.isPlainObject(options.messages) ? options.messages : { [locale2]: {} };
|
|
18876
|
+
const datetimeFormats = shared$1.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale2]: {} };
|
|
18877
|
+
const numberFormats = shared$1.isPlainObject(options.numberFormats) ? options.numberFormats : { [locale2]: {} };
|
|
18878
|
+
const modifiers = shared$1.assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
|
|
17055
18879
|
const pluralRules = options.pluralRules || {};
|
|
17056
|
-
const missing =
|
|
17057
|
-
const missingWarn = isBoolean(options.missingWarn) ||
|
|
17058
|
-
const fallbackWarn = isBoolean(options.fallbackWarn) ||
|
|
18880
|
+
const missing = shared$1.isFunction(options.missing) ? options.missing : null;
|
|
18881
|
+
const missingWarn = shared$1.isBoolean(options.missingWarn) || shared$1.isRegExp(options.missingWarn) ? options.missingWarn : true;
|
|
18882
|
+
const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) || shared$1.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
17059
18883
|
const fallbackFormat = !!options.fallbackFormat;
|
|
17060
18884
|
const unresolving = !!options.unresolving;
|
|
17061
|
-
const postTranslation =
|
|
17062
|
-
const processor = isPlainObject(options.processor) ? options.processor : null;
|
|
17063
|
-
const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
18885
|
+
const postTranslation = shared$1.isFunction(options.postTranslation) ? options.postTranslation : null;
|
|
18886
|
+
const processor = shared$1.isPlainObject(options.processor) ? options.processor : null;
|
|
18887
|
+
const warnHtmlMessage = shared$1.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
17064
18888
|
const escapeParameter = !!options.escapeParameter;
|
|
17065
|
-
const
|
|
17066
|
-
const messageResolver =
|
|
17067
|
-
const localeFallbacker =
|
|
17068
|
-
const fallbackContext = isObject
|
|
17069
|
-
const onWarn =
|
|
18889
|
+
const messageCompiler2 = shared$1.isFunction(options.messageCompiler) ? options.messageCompiler : _compiler;
|
|
18890
|
+
const messageResolver = shared$1.isFunction(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue;
|
|
18891
|
+
const localeFallbacker = shared$1.isFunction(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple;
|
|
18892
|
+
const fallbackContext = shared$1.isObject(options.fallbackContext) ? options.fallbackContext : void 0;
|
|
18893
|
+
const onWarn = shared$1.isFunction(options.onWarn) ? options.onWarn : shared$1.warn;
|
|
17070
18894
|
const internalOptions = options;
|
|
17071
|
-
const __datetimeFormatters = isObject
|
|
17072
|
-
const __numberFormatters = isObject
|
|
17073
|
-
const __meta = isObject
|
|
18895
|
+
const __datetimeFormatters = shared$1.isObject(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
|
|
18896
|
+
const __numberFormatters = shared$1.isObject(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
|
|
18897
|
+
const __meta = shared$1.isObject(internalOptions.__meta) ? internalOptions.__meta : {};
|
|
17074
18898
|
_cid++;
|
|
17075
18899
|
const context = {
|
|
17076
18900
|
version: version2,
|
|
@@ -17089,7 +18913,7 @@ function createCoreContext(options = {}) {
|
|
|
17089
18913
|
processor,
|
|
17090
18914
|
warnHtmlMessage,
|
|
17091
18915
|
escapeParameter,
|
|
17092
|
-
messageCompiler,
|
|
18916
|
+
messageCompiler: messageCompiler2,
|
|
17093
18917
|
messageResolver,
|
|
17094
18918
|
localeFallbacker,
|
|
17095
18919
|
fallbackContext,
|
|
@@ -17131,7 +18955,7 @@ function handleMissing(context, key, locale2, missingWarn, type) {
|
|
|
17131
18955
|
}
|
|
17132
18956
|
if (missing !== null) {
|
|
17133
18957
|
const ret = missing(context, locale2, key, type);
|
|
17134
|
-
return
|
|
18958
|
+
return shared$1.isString(ret) ? ret : key;
|
|
17135
18959
|
} else {
|
|
17136
18960
|
if (isTranslateMissingWarn(missingWarn, key)) {
|
|
17137
18961
|
onWarn(getWarnMessage$1(CoreWarnCodes.NOT_FOUND_KEY, { key, locale: locale2 }));
|
|
@@ -17147,13 +18971,16 @@ function updateFallbackLocale(ctx, locale2, fallback) {
|
|
|
17147
18971
|
const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
|
|
17148
18972
|
const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
|
|
17149
18973
|
function checkHtmlMessage(source2, options) {
|
|
17150
|
-
const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
18974
|
+
const warnHtmlMessage = shared$1.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
17151
18975
|
if (warnHtmlMessage && RE_HTML_TAG.test(source2)) {
|
|
17152
|
-
warn$1
|
|
18976
|
+
shared$1.warn(shared$1.format(WARN_MESSAGE, { source: source2 }));
|
|
17153
18977
|
}
|
|
17154
18978
|
}
|
|
17155
18979
|
const defaultOnCacheKey = (source2) => source2;
|
|
17156
18980
|
let compileCache = /* @__PURE__ */ Object.create(null);
|
|
18981
|
+
function clearCompileCache() {
|
|
18982
|
+
compileCache = /* @__PURE__ */ Object.create(null);
|
|
18983
|
+
}
|
|
17157
18984
|
function compileToFunction(source2, options = {}) {
|
|
17158
18985
|
{
|
|
17159
18986
|
checkHtmlMessage(source2, options);
|
|
@@ -17164,17 +18991,17 @@ function compileToFunction(source2, options = {}) {
|
|
|
17164
18991
|
return cached;
|
|
17165
18992
|
}
|
|
17166
18993
|
let occurred = false;
|
|
17167
|
-
const onError = options.onError || defaultOnError;
|
|
18994
|
+
const onError = options.onError || messageCompiler.defaultOnError;
|
|
17168
18995
|
options.onError = (err) => {
|
|
17169
18996
|
occurred = true;
|
|
17170
18997
|
onError(err);
|
|
17171
18998
|
};
|
|
17172
|
-
const { code: code2 } = baseCompile(source2, options);
|
|
18999
|
+
const { code: code2 } = messageCompiler.baseCompile(source2, options);
|
|
17173
19000
|
const msg = new Function(`return ${code2}`)();
|
|
17174
19001
|
return !occurred ? compileCache[key] = msg : msg;
|
|
17175
19002
|
}
|
|
17176
19003
|
}
|
|
17177
|
-
let code$2 = CompileErrorCodes.__EXTEND_POINT__;
|
|
19004
|
+
let code$2 = messageCompiler.CompileErrorCodes.__EXTEND_POINT__;
|
|
17178
19005
|
const inc$2 = () => ++code$2;
|
|
17179
19006
|
const CoreErrorCodes = {
|
|
17180
19007
|
INVALID_ARGUMENT: code$2,
|
|
@@ -17183,7 +19010,7 @@ const CoreErrorCodes = {
|
|
|
17183
19010
|
__EXTEND_POINT__: inc$2()
|
|
17184
19011
|
};
|
|
17185
19012
|
function createCoreError(code2) {
|
|
17186
|
-
return createCompileError(code2, null, { messages: errorMessages$1 });
|
|
19013
|
+
return messageCompiler.createCompileError(code2, null, { messages: errorMessages$1 });
|
|
17187
19014
|
}
|
|
17188
19015
|
const errorMessages$1 = {
|
|
17189
19016
|
[CoreErrorCodes.INVALID_ARGUMENT]: "Invalid arguments",
|
|
@@ -17191,17 +19018,17 @@ const errorMessages$1 = {
|
|
|
17191
19018
|
[CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string"
|
|
17192
19019
|
};
|
|
17193
19020
|
const NOOP_MESSAGE_FUNCTION = () => "";
|
|
17194
|
-
const isMessageFunction = (val) =>
|
|
19021
|
+
const isMessageFunction = (val) => shared$1.isFunction(val);
|
|
17195
19022
|
function translate$1(context, ...args) {
|
|
17196
|
-
const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
|
|
19023
|
+
const { fallbackFormat, postTranslation, unresolving, messageCompiler: messageCompiler2, fallbackLocale, messages } = context;
|
|
17197
19024
|
const [key, options] = parseTranslateArgs(...args);
|
|
17198
|
-
const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
17199
|
-
const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
17200
|
-
const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
|
|
19025
|
+
const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
19026
|
+
const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
19027
|
+
const escapeParameter = shared$1.isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
|
|
17201
19028
|
const resolvedMessage = !!options.resolvedMessage;
|
|
17202
|
-
const defaultMsgOrKey =
|
|
19029
|
+
const defaultMsgOrKey = shared$1.isString(options.default) || shared$1.isBoolean(options.default) ? !shared$1.isBoolean(options.default) ? options.default : !messageCompiler2 ? () => key : key : fallbackFormat ? !messageCompiler2 ? () => key : key : "";
|
|
17203
19030
|
const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
|
|
17204
|
-
const locale2 =
|
|
19031
|
+
const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
|
|
17205
19032
|
escapeParameter && escapeParams(options);
|
|
17206
19033
|
let [formatScope, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWarn, missingWarn) : [
|
|
17207
19034
|
key,
|
|
@@ -17210,17 +19037,17 @@ function translate$1(context, ...args) {
|
|
|
17210
19037
|
];
|
|
17211
19038
|
let format2 = formatScope;
|
|
17212
19039
|
let cacheBaseKey = key;
|
|
17213
|
-
if (!resolvedMessage && !(
|
|
19040
|
+
if (!resolvedMessage && !(shared$1.isString(format2) || isMessageFunction(format2))) {
|
|
17214
19041
|
if (enableDefaultMsg) {
|
|
17215
19042
|
format2 = defaultMsgOrKey;
|
|
17216
19043
|
cacheBaseKey = format2;
|
|
17217
19044
|
}
|
|
17218
19045
|
}
|
|
17219
|
-
if (!resolvedMessage && (!(
|
|
19046
|
+
if (!resolvedMessage && (!(shared$1.isString(format2) || isMessageFunction(format2)) || !shared$1.isString(targetLocale))) {
|
|
17220
19047
|
return unresolving ? NOT_REOSLVED : key;
|
|
17221
19048
|
}
|
|
17222
|
-
if (
|
|
17223
|
-
|
|
19049
|
+
if (shared$1.isString(format2) && context.messageCompiler == null) {
|
|
19050
|
+
shared$1.warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
|
|
17224
19051
|
return key;
|
|
17225
19052
|
}
|
|
17226
19053
|
let occurred = false;
|
|
@@ -17238,23 +19065,23 @@ function translate$1(context, ...args) {
|
|
|
17238
19065
|
{
|
|
17239
19066
|
const payloads = {
|
|
17240
19067
|
timestamp: Date.now(),
|
|
17241
|
-
key:
|
|
19068
|
+
key: shared$1.isString(key) ? key : isMessageFunction(format2) ? format2.key : "",
|
|
17242
19069
|
locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
|
|
17243
|
-
format:
|
|
19070
|
+
format: shared$1.isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
|
|
17244
19071
|
message: ret
|
|
17245
19072
|
};
|
|
17246
|
-
payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
|
|
19073
|
+
payloads.meta = shared$1.assign({}, context.__meta, getAdditionalMeta() || {});
|
|
17247
19074
|
translateDevTools(payloads);
|
|
17248
19075
|
}
|
|
17249
19076
|
return ret;
|
|
17250
19077
|
}
|
|
17251
19078
|
function escapeParams(options) {
|
|
17252
|
-
if (isArray
|
|
17253
|
-
options.list = options.list.map((item) =>
|
|
17254
|
-
} else if (isObject
|
|
19079
|
+
if (shared$1.isArray(options.list)) {
|
|
19080
|
+
options.list = options.list.map((item) => shared$1.isString(item) ? shared$1.escapeHtml(item) : item);
|
|
19081
|
+
} else if (shared$1.isObject(options.named)) {
|
|
17255
19082
|
Object.keys(options.named).forEach((key) => {
|
|
17256
|
-
if (
|
|
17257
|
-
options.named[key] = escapeHtml(options.named[key]);
|
|
19083
|
+
if (shared$1.isString(options.named[key])) {
|
|
19084
|
+
options.named[key] = shared$1.escapeHtml(options.named[key]);
|
|
17258
19085
|
}
|
|
17259
19086
|
});
|
|
17260
19087
|
}
|
|
@@ -17292,16 +19119,16 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
|
|
|
17292
19119
|
let start2 = null;
|
|
17293
19120
|
let startTag;
|
|
17294
19121
|
let endTag;
|
|
17295
|
-
if (inBrowser) {
|
|
19122
|
+
if (shared$1.inBrowser) {
|
|
17296
19123
|
start2 = window.performance.now();
|
|
17297
19124
|
startTag = "intlify-message-resolve-start";
|
|
17298
19125
|
endTag = "intlify-message-resolve-end";
|
|
17299
|
-
mark && mark(startTag);
|
|
19126
|
+
shared$1.mark && shared$1.mark(startTag);
|
|
17300
19127
|
}
|
|
17301
19128
|
if ((format2 = resolveValue2(message, key)) === null) {
|
|
17302
19129
|
format2 = message[key];
|
|
17303
19130
|
}
|
|
17304
|
-
if (inBrowser) {
|
|
19131
|
+
if (shared$1.inBrowser) {
|
|
17305
19132
|
const end2 = window.performance.now();
|
|
17306
19133
|
const emitter = context.__v_emitter;
|
|
17307
19134
|
if (emitter && start2 && format2) {
|
|
@@ -17313,12 +19140,12 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
|
|
|
17313
19140
|
groupId: `${type}:${key}`
|
|
17314
19141
|
});
|
|
17315
19142
|
}
|
|
17316
|
-
if (startTag && endTag && mark && measure) {
|
|
17317
|
-
mark(endTag);
|
|
17318
|
-
measure("intlify message resolve", startTag, endTag);
|
|
19143
|
+
if (startTag && endTag && shared$1.mark && shared$1.measure) {
|
|
19144
|
+
shared$1.mark(endTag);
|
|
19145
|
+
shared$1.measure("intlify message resolve", startTag, endTag);
|
|
17319
19146
|
}
|
|
17320
19147
|
}
|
|
17321
|
-
if (
|
|
19148
|
+
if (shared$1.isString(format2) || shared$1.isFunction(format2))
|
|
17322
19149
|
break;
|
|
17323
19150
|
const missingRet = handleMissing(
|
|
17324
19151
|
context,
|
|
@@ -17335,14 +19162,14 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
|
|
|
17335
19162
|
return [format2, targetLocale, message];
|
|
17336
19163
|
}
|
|
17337
19164
|
function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
|
|
17338
|
-
const { messageCompiler, warnHtmlMessage } = context;
|
|
19165
|
+
const { messageCompiler: messageCompiler2, warnHtmlMessage } = context;
|
|
17339
19166
|
if (isMessageFunction(format2)) {
|
|
17340
19167
|
const msg2 = format2;
|
|
17341
19168
|
msg2.locale = msg2.locale || targetLocale;
|
|
17342
19169
|
msg2.key = msg2.key || key;
|
|
17343
19170
|
return msg2;
|
|
17344
19171
|
}
|
|
17345
|
-
if (
|
|
19172
|
+
if (messageCompiler2 == null) {
|
|
17346
19173
|
const msg2 = () => format2;
|
|
17347
19174
|
msg2.locale = targetLocale;
|
|
17348
19175
|
msg2.key = key;
|
|
@@ -17351,14 +19178,14 @@ function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey,
|
|
|
17351
19178
|
let start2 = null;
|
|
17352
19179
|
let startTag;
|
|
17353
19180
|
let endTag;
|
|
17354
|
-
if (inBrowser) {
|
|
19181
|
+
if (shared$1.inBrowser) {
|
|
17355
19182
|
start2 = window.performance.now();
|
|
17356
19183
|
startTag = "intlify-message-compilation-start";
|
|
17357
19184
|
endTag = "intlify-message-compilation-end";
|
|
17358
|
-
mark && mark(startTag);
|
|
19185
|
+
shared$1.mark && shared$1.mark(startTag);
|
|
17359
19186
|
}
|
|
17360
|
-
const msg =
|
|
17361
|
-
if (inBrowser) {
|
|
19187
|
+
const msg = messageCompiler2(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
|
|
19188
|
+
if (shared$1.inBrowser) {
|
|
17362
19189
|
const end2 = window.performance.now();
|
|
17363
19190
|
const emitter = context.__v_emitter;
|
|
17364
19191
|
if (emitter && start2) {
|
|
@@ -17369,9 +19196,9 @@ function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey,
|
|
|
17369
19196
|
groupId: `${"translate"}:${key}`
|
|
17370
19197
|
});
|
|
17371
19198
|
}
|
|
17372
|
-
if (startTag && endTag && mark && measure) {
|
|
17373
|
-
mark(endTag);
|
|
17374
|
-
measure("intlify message compilation", startTag, endTag);
|
|
19199
|
+
if (startTag && endTag && shared$1.mark && shared$1.measure) {
|
|
19200
|
+
shared$1.mark(endTag);
|
|
19201
|
+
shared$1.measure("intlify message compilation", startTag, endTag);
|
|
17375
19202
|
}
|
|
17376
19203
|
}
|
|
17377
19204
|
msg.locale = targetLocale;
|
|
@@ -17383,14 +19210,14 @@ function evaluateMessage(context, msg, msgCtx) {
|
|
|
17383
19210
|
let start2 = null;
|
|
17384
19211
|
let startTag;
|
|
17385
19212
|
let endTag;
|
|
17386
|
-
if (inBrowser) {
|
|
19213
|
+
if (shared$1.inBrowser) {
|
|
17387
19214
|
start2 = window.performance.now();
|
|
17388
19215
|
startTag = "intlify-message-evaluation-start";
|
|
17389
19216
|
endTag = "intlify-message-evaluation-end";
|
|
17390
|
-
mark && mark(startTag);
|
|
19217
|
+
shared$1.mark && shared$1.mark(startTag);
|
|
17391
19218
|
}
|
|
17392
19219
|
const messaged = msg(msgCtx);
|
|
17393
|
-
if (inBrowser) {
|
|
19220
|
+
if (shared$1.inBrowser) {
|
|
17394
19221
|
const end2 = window.performance.now();
|
|
17395
19222
|
const emitter = context.__v_emitter;
|
|
17396
19223
|
if (emitter && start2) {
|
|
@@ -17401,9 +19228,9 @@ function evaluateMessage(context, msg, msgCtx) {
|
|
|
17401
19228
|
groupId: `${"translate"}:${msg.key}`
|
|
17402
19229
|
});
|
|
17403
19230
|
}
|
|
17404
|
-
if (startTag && endTag && mark && measure) {
|
|
17405
|
-
mark(endTag);
|
|
17406
|
-
measure("intlify message evaluation", startTag, endTag);
|
|
19231
|
+
if (startTag && endTag && shared$1.mark && shared$1.measure) {
|
|
19232
|
+
shared$1.mark(endTag);
|
|
19233
|
+
shared$1.measure("intlify message evaluation", startTag, endTag);
|
|
17407
19234
|
}
|
|
17408
19235
|
}
|
|
17409
19236
|
return messaged;
|
|
@@ -17411,25 +19238,25 @@ function evaluateMessage(context, msg, msgCtx) {
|
|
|
17411
19238
|
function parseTranslateArgs(...args) {
|
|
17412
19239
|
const [arg1, arg2, arg3] = args;
|
|
17413
19240
|
const options = {};
|
|
17414
|
-
if (!
|
|
19241
|
+
if (!shared$1.isString(arg1) && !shared$1.isNumber(arg1) && !isMessageFunction(arg1)) {
|
|
17415
19242
|
throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
|
|
17416
19243
|
}
|
|
17417
|
-
const key =
|
|
17418
|
-
if (
|
|
19244
|
+
const key = shared$1.isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
|
|
19245
|
+
if (shared$1.isNumber(arg2)) {
|
|
17419
19246
|
options.plural = arg2;
|
|
17420
|
-
} else if (
|
|
19247
|
+
} else if (shared$1.isString(arg2)) {
|
|
17421
19248
|
options.default = arg2;
|
|
17422
|
-
} else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
|
|
19249
|
+
} else if (shared$1.isPlainObject(arg2) && !shared$1.isEmptyObject(arg2)) {
|
|
17423
19250
|
options.named = arg2;
|
|
17424
|
-
} else if (isArray
|
|
19251
|
+
} else if (shared$1.isArray(arg2)) {
|
|
17425
19252
|
options.list = arg2;
|
|
17426
19253
|
}
|
|
17427
|
-
if (
|
|
19254
|
+
if (shared$1.isNumber(arg3)) {
|
|
17428
19255
|
options.plural = arg3;
|
|
17429
|
-
} else if (
|
|
19256
|
+
} else if (shared$1.isString(arg3)) {
|
|
17430
19257
|
options.default = arg3;
|
|
17431
|
-
} else if (isPlainObject(arg3)) {
|
|
17432
|
-
assign(options, arg3);
|
|
19258
|
+
} else if (shared$1.isPlainObject(arg3)) {
|
|
19259
|
+
shared$1.assign(options, arg3);
|
|
17433
19260
|
}
|
|
17434
19261
|
return [key, options];
|
|
17435
19262
|
}
|
|
@@ -17440,7 +19267,7 @@ function getCompileOptions(context, locale2, key, source2, warnHtmlMessage, erro
|
|
|
17440
19267
|
errorDetector && errorDetector(err);
|
|
17441
19268
|
{
|
|
17442
19269
|
const message = `Message compilation error: ${err.message}`;
|
|
17443
|
-
const codeFrame = err.location && generateCodeFrame(source2, err.location.start.offset, err.location.end.offset);
|
|
19270
|
+
const codeFrame = err.location && shared$1.generateCodeFrame(source2, err.location.start.offset, err.location.end.offset);
|
|
17444
19271
|
const emitter = context.__v_emitter;
|
|
17445
19272
|
if (emitter) {
|
|
17446
19273
|
emitter.emit("compile-error", {
|
|
@@ -17455,7 +19282,7 @@ function getCompileOptions(context, locale2, key, source2, warnHtmlMessage, erro
|
|
|
17455
19282
|
${codeFrame}` : message);
|
|
17456
19283
|
}
|
|
17457
19284
|
},
|
|
17458
|
-
onCacheKey: (source3) => generateFormatCacheKey(locale2, key, source3)
|
|
19285
|
+
onCacheKey: (source3) => shared$1.generateFormatCacheKey(locale2, key, source3)
|
|
17459
19286
|
};
|
|
17460
19287
|
}
|
|
17461
19288
|
function getMessageContextOptions(context, locale2, message, options) {
|
|
@@ -17466,7 +19293,7 @@ function getMessageContextOptions(context, locale2, message, options) {
|
|
|
17466
19293
|
const [, , message2] = resolveMessageFormat(fallbackContext, key, locale2, fallbackLocale, fallbackWarn, missingWarn);
|
|
17467
19294
|
val = resolveValue2(message2, key);
|
|
17468
19295
|
}
|
|
17469
|
-
if (
|
|
19296
|
+
if (shared$1.isString(val)) {
|
|
17470
19297
|
let occurred = false;
|
|
17471
19298
|
const errorDetector = () => {
|
|
17472
19299
|
occurred = true;
|
|
@@ -17494,7 +19321,7 @@ function getMessageContextOptions(context, locale2, message, options) {
|
|
|
17494
19321
|
if (options.named) {
|
|
17495
19322
|
ctxOptions.named = options.named;
|
|
17496
19323
|
}
|
|
17497
|
-
if (
|
|
19324
|
+
if (shared$1.isNumber(options.plural)) {
|
|
17498
19325
|
ctxOptions.pluralIndex = options.plural;
|
|
17499
19326
|
}
|
|
17500
19327
|
return ctxOptions;
|
|
@@ -17512,16 +19339,16 @@ function datetime(context, ...args) {
|
|
|
17512
19339
|
return MISSING_RESOLVE_VALUE;
|
|
17513
19340
|
}
|
|
17514
19341
|
const [key, value, options, overrides] = parseDateTimeArgs(...args);
|
|
17515
|
-
const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
17516
|
-
const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
19342
|
+
const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
19343
|
+
const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
17517
19344
|
const part = !!options.part;
|
|
17518
|
-
const locale2 =
|
|
19345
|
+
const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
|
|
17519
19346
|
const locales = localeFallbacker(
|
|
17520
19347
|
context,
|
|
17521
19348
|
fallbackLocale,
|
|
17522
19349
|
locale2
|
|
17523
19350
|
);
|
|
17524
|
-
if (!
|
|
19351
|
+
if (!shared$1.isString(key) || key === "") {
|
|
17525
19352
|
return new Intl.DateTimeFormat(locale2, overrides).format(value);
|
|
17526
19353
|
}
|
|
17527
19354
|
let datetimeFormat = {};
|
|
@@ -17552,21 +19379,21 @@ function datetime(context, ...args) {
|
|
|
17552
19379
|
}
|
|
17553
19380
|
datetimeFormat = datetimeFormats[targetLocale] || {};
|
|
17554
19381
|
format2 = datetimeFormat[key];
|
|
17555
|
-
if (isPlainObject(format2))
|
|
19382
|
+
if (shared$1.isPlainObject(format2))
|
|
17556
19383
|
break;
|
|
17557
19384
|
handleMissing(context, key, targetLocale, missingWarn, type);
|
|
17558
19385
|
from = to;
|
|
17559
19386
|
}
|
|
17560
|
-
if (!isPlainObject(format2) || !
|
|
19387
|
+
if (!shared$1.isPlainObject(format2) || !shared$1.isString(targetLocale)) {
|
|
17561
19388
|
return unresolving ? NOT_REOSLVED : key;
|
|
17562
19389
|
}
|
|
17563
19390
|
let id = `${targetLocale}__${key}`;
|
|
17564
|
-
if (!isEmptyObject(overrides)) {
|
|
19391
|
+
if (!shared$1.isEmptyObject(overrides)) {
|
|
17565
19392
|
id = `${id}__${JSON.stringify(overrides)}`;
|
|
17566
19393
|
}
|
|
17567
19394
|
let formatter = __datetimeFormatters.get(id);
|
|
17568
19395
|
if (!formatter) {
|
|
17569
|
-
formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
|
|
19396
|
+
formatter = new Intl.DateTimeFormat(targetLocale, shared$1.assign({}, format2, overrides));
|
|
17570
19397
|
__datetimeFormatters.set(id, formatter);
|
|
17571
19398
|
}
|
|
17572
19399
|
return !part ? formatter.format(value) : formatter.formatToParts(value);
|
|
@@ -17598,7 +19425,7 @@ function parseDateTimeArgs(...args) {
|
|
|
17598
19425
|
const options = {};
|
|
17599
19426
|
let overrides = {};
|
|
17600
19427
|
let value;
|
|
17601
|
-
if (
|
|
19428
|
+
if (shared$1.isString(arg1)) {
|
|
17602
19429
|
const matches2 = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
17603
19430
|
if (!matches2) {
|
|
17604
19431
|
throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
|
|
@@ -17610,19 +19437,19 @@ function parseDateTimeArgs(...args) {
|
|
|
17610
19437
|
} catch (e3) {
|
|
17611
19438
|
throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
|
|
17612
19439
|
}
|
|
17613
|
-
} else if (isDate(arg1)) {
|
|
19440
|
+
} else if (shared$1.isDate(arg1)) {
|
|
17614
19441
|
if (isNaN(arg1.getTime())) {
|
|
17615
19442
|
throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
|
|
17616
19443
|
}
|
|
17617
19444
|
value = arg1;
|
|
17618
|
-
} else if (
|
|
19445
|
+
} else if (shared$1.isNumber(arg1)) {
|
|
17619
19446
|
value = arg1;
|
|
17620
19447
|
} else {
|
|
17621
19448
|
throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
|
|
17622
19449
|
}
|
|
17623
|
-
if (
|
|
19450
|
+
if (shared$1.isString(arg2)) {
|
|
17624
19451
|
options.key = arg2;
|
|
17625
|
-
} else if (isPlainObject(arg2)) {
|
|
19452
|
+
} else if (shared$1.isPlainObject(arg2)) {
|
|
17626
19453
|
Object.keys(arg2).forEach((key) => {
|
|
17627
19454
|
if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
|
|
17628
19455
|
overrides[key] = arg2[key];
|
|
@@ -17631,12 +19458,12 @@ function parseDateTimeArgs(...args) {
|
|
|
17631
19458
|
}
|
|
17632
19459
|
});
|
|
17633
19460
|
}
|
|
17634
|
-
if (
|
|
19461
|
+
if (shared$1.isString(arg3)) {
|
|
17635
19462
|
options.locale = arg3;
|
|
17636
|
-
} else if (isPlainObject(arg3)) {
|
|
19463
|
+
} else if (shared$1.isPlainObject(arg3)) {
|
|
17637
19464
|
overrides = arg3;
|
|
17638
19465
|
}
|
|
17639
|
-
if (isPlainObject(arg4)) {
|
|
19466
|
+
if (shared$1.isPlainObject(arg4)) {
|
|
17640
19467
|
overrides = arg4;
|
|
17641
19468
|
}
|
|
17642
19469
|
return [options.key || "", value, options, overrides];
|
|
@@ -17659,16 +19486,16 @@ function number$1(context, ...args) {
|
|
|
17659
19486
|
return MISSING_RESOLVE_VALUE;
|
|
17660
19487
|
}
|
|
17661
19488
|
const [key, value, options, overrides] = parseNumberArgs(...args);
|
|
17662
|
-
const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
17663
|
-
const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
19489
|
+
const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
|
|
19490
|
+
const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
|
|
17664
19491
|
const part = !!options.part;
|
|
17665
|
-
const locale2 =
|
|
19492
|
+
const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
|
|
17666
19493
|
const locales = localeFallbacker(
|
|
17667
19494
|
context,
|
|
17668
19495
|
fallbackLocale,
|
|
17669
19496
|
locale2
|
|
17670
19497
|
);
|
|
17671
|
-
if (!
|
|
19498
|
+
if (!shared$1.isString(key) || key === "") {
|
|
17672
19499
|
return new Intl.NumberFormat(locale2, overrides).format(value);
|
|
17673
19500
|
}
|
|
17674
19501
|
let numberFormat = {};
|
|
@@ -17699,21 +19526,21 @@ function number$1(context, ...args) {
|
|
|
17699
19526
|
}
|
|
17700
19527
|
numberFormat = numberFormats[targetLocale] || {};
|
|
17701
19528
|
format2 = numberFormat[key];
|
|
17702
|
-
if (isPlainObject(format2))
|
|
19529
|
+
if (shared$1.isPlainObject(format2))
|
|
17703
19530
|
break;
|
|
17704
19531
|
handleMissing(context, key, targetLocale, missingWarn, type);
|
|
17705
19532
|
from = to;
|
|
17706
19533
|
}
|
|
17707
|
-
if (!isPlainObject(format2) || !
|
|
19534
|
+
if (!shared$1.isPlainObject(format2) || !shared$1.isString(targetLocale)) {
|
|
17708
19535
|
return unresolving ? NOT_REOSLVED : key;
|
|
17709
19536
|
}
|
|
17710
19537
|
let id = `${targetLocale}__${key}`;
|
|
17711
|
-
if (!isEmptyObject(overrides)) {
|
|
19538
|
+
if (!shared$1.isEmptyObject(overrides)) {
|
|
17712
19539
|
id = `${id}__${JSON.stringify(overrides)}`;
|
|
17713
19540
|
}
|
|
17714
19541
|
let formatter = __numberFormatters.get(id);
|
|
17715
19542
|
if (!formatter) {
|
|
17716
|
-
formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
|
|
19543
|
+
formatter = new Intl.NumberFormat(targetLocale, shared$1.assign({}, format2, overrides));
|
|
17717
19544
|
__numberFormatters.set(id, formatter);
|
|
17718
19545
|
}
|
|
17719
19546
|
return !part ? formatter.format(value) : formatter.formatToParts(value);
|
|
@@ -17744,13 +19571,13 @@ function parseNumberArgs(...args) {
|
|
|
17744
19571
|
const [arg1, arg2, arg3, arg4] = args;
|
|
17745
19572
|
const options = {};
|
|
17746
19573
|
let overrides = {};
|
|
17747
|
-
if (!
|
|
19574
|
+
if (!shared$1.isNumber(arg1)) {
|
|
17748
19575
|
throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
|
|
17749
19576
|
}
|
|
17750
19577
|
const value = arg1;
|
|
17751
|
-
if (
|
|
19578
|
+
if (shared$1.isString(arg2)) {
|
|
17752
19579
|
options.key = arg2;
|
|
17753
|
-
} else if (isPlainObject(arg2)) {
|
|
19580
|
+
} else if (shared$1.isPlainObject(arg2)) {
|
|
17754
19581
|
Object.keys(arg2).forEach((key) => {
|
|
17755
19582
|
if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
|
|
17756
19583
|
overrides[key] = arg2[key];
|
|
@@ -17759,12 +19586,12 @@ function parseNumberArgs(...args) {
|
|
|
17759
19586
|
}
|
|
17760
19587
|
});
|
|
17761
19588
|
}
|
|
17762
|
-
if (
|
|
19589
|
+
if (shared$1.isString(arg3)) {
|
|
17763
19590
|
options.locale = arg3;
|
|
17764
|
-
} else if (isPlainObject(arg3)) {
|
|
19591
|
+
} else if (shared$1.isPlainObject(arg3)) {
|
|
17765
19592
|
overrides = arg3;
|
|
17766
19593
|
}
|
|
17767
|
-
if (isPlainObject(arg4)) {
|
|
19594
|
+
if (shared$1.isPlainObject(arg4)) {
|
|
17768
19595
|
overrides = arg4;
|
|
17769
19596
|
}
|
|
17770
19597
|
return [options.key || "", value, options, overrides];
|
|
@@ -17779,51 +19606,66 @@ function clearNumberFormat(ctx, locale2, format2) {
|
|
|
17779
19606
|
context.__numberFormatters.delete(id);
|
|
17780
19607
|
}
|
|
17781
19608
|
}
|
|
19609
|
+
coreBase_cjs.CompileErrorCodes = messageCompiler.CompileErrorCodes;
|
|
19610
|
+
coreBase_cjs.createCompileError = messageCompiler.createCompileError;
|
|
19611
|
+
coreBase_cjs.CoreErrorCodes = CoreErrorCodes;
|
|
19612
|
+
coreBase_cjs.CoreWarnCodes = CoreWarnCodes;
|
|
19613
|
+
coreBase_cjs.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;
|
|
19614
|
+
coreBase_cjs.DEFAULT_LOCALE = DEFAULT_LOCALE$1;
|
|
19615
|
+
coreBase_cjs.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;
|
|
19616
|
+
coreBase_cjs.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;
|
|
19617
|
+
coreBase_cjs.NOT_REOSLVED = NOT_REOSLVED;
|
|
19618
|
+
coreBase_cjs.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;
|
|
19619
|
+
coreBase_cjs.VERSION = VERSION$1;
|
|
19620
|
+
coreBase_cjs.clearCompileCache = clearCompileCache;
|
|
19621
|
+
coreBase_cjs.clearDateTimeFormat = clearDateTimeFormat;
|
|
19622
|
+
coreBase_cjs.clearNumberFormat = clearNumberFormat;
|
|
19623
|
+
coreBase_cjs.compileToFunction = compileToFunction;
|
|
19624
|
+
coreBase_cjs.createCoreContext = createCoreContext;
|
|
19625
|
+
coreBase_cjs.createCoreError = createCoreError;
|
|
19626
|
+
coreBase_cjs.createMessageContext = createMessageContext;
|
|
19627
|
+
coreBase_cjs.datetime = datetime;
|
|
19628
|
+
coreBase_cjs.fallbackWithLocaleChain = fallbackWithLocaleChain;
|
|
19629
|
+
coreBase_cjs.fallbackWithSimple = fallbackWithSimple;
|
|
19630
|
+
coreBase_cjs.getAdditionalMeta = getAdditionalMeta;
|
|
19631
|
+
coreBase_cjs.getDevToolsHook = getDevToolsHook;
|
|
19632
|
+
coreBase_cjs.getFallbackContext = getFallbackContext;
|
|
19633
|
+
coreBase_cjs.getWarnMessage = getWarnMessage$1;
|
|
19634
|
+
coreBase_cjs.handleMissing = handleMissing;
|
|
19635
|
+
coreBase_cjs.initI18nDevTools = initI18nDevTools;
|
|
19636
|
+
coreBase_cjs.isMessageFunction = isMessageFunction;
|
|
19637
|
+
coreBase_cjs.isTranslateFallbackWarn = isTranslateFallbackWarn;
|
|
19638
|
+
coreBase_cjs.isTranslateMissingWarn = isTranslateMissingWarn;
|
|
19639
|
+
coreBase_cjs.number = number$1;
|
|
19640
|
+
coreBase_cjs.parse = parse$1;
|
|
19641
|
+
coreBase_cjs.parseDateTimeArgs = parseDateTimeArgs;
|
|
19642
|
+
coreBase_cjs.parseNumberArgs = parseNumberArgs;
|
|
19643
|
+
coreBase_cjs.parseTranslateArgs = parseTranslateArgs;
|
|
19644
|
+
coreBase_cjs.registerLocaleFallbacker = registerLocaleFallbacker;
|
|
19645
|
+
coreBase_cjs.registerMessageCompiler = registerMessageCompiler;
|
|
19646
|
+
coreBase_cjs.registerMessageResolver = registerMessageResolver;
|
|
19647
|
+
coreBase_cjs.resolveValue = resolveValue;
|
|
19648
|
+
coreBase_cjs.resolveWithKeyValue = resolveWithKeyValue;
|
|
19649
|
+
coreBase_cjs.setAdditionalMeta = setAdditionalMeta;
|
|
19650
|
+
coreBase_cjs.setDevToolsHook = setDevToolsHook;
|
|
19651
|
+
coreBase_cjs.setFallbackContext = setFallbackContext;
|
|
19652
|
+
coreBase_cjs.translate = translate$1;
|
|
19653
|
+
coreBase_cjs.translateDevTools = translateDevTools;
|
|
19654
|
+
coreBase_cjs.updateFallbackLocale = updateFallbackLocale;
|
|
17782
19655
|
{
|
|
17783
|
-
|
|
17784
|
-
getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
|
|
17785
|
-
}
|
|
19656
|
+
coreBase$1.exports = coreBase_cjs;
|
|
17786
19657
|
}
|
|
17787
|
-
/*!
|
|
17788
|
-
* vue-devtools v9.2.2
|
|
17789
|
-
* (c) 2022 kazuya kawaguchi
|
|
17790
|
-
* Released under the MIT License.
|
|
17791
|
-
*/
|
|
17792
|
-
const VueDevToolsLabels = {
|
|
17793
|
-
["vue-devtools-plugin-vue-i18n"]: "Vue I18n devtools",
|
|
17794
|
-
["vue-i18n-resource-inspector"]: "I18n Resources",
|
|
17795
|
-
["vue-i18n-timeline"]: "Vue I18n"
|
|
17796
|
-
};
|
|
17797
|
-
const VueDevToolsPlaceholders = {
|
|
17798
|
-
["vue-i18n-resource-inspector"]: "Search for scopes ..."
|
|
17799
|
-
};
|
|
17800
|
-
const VueDevToolsTimelineColors = {
|
|
17801
|
-
["vue-i18n-timeline"]: 16764185
|
|
17802
|
-
};
|
|
17803
19658
|
/*!
|
|
17804
19659
|
* vue-i18n v9.2.2
|
|
17805
19660
|
* (c) 2022 kazuya kawaguchi
|
|
17806
19661
|
* Released under the MIT License.
|
|
17807
19662
|
*/
|
|
19663
|
+
Object.defineProperty(vueI18n_cjs, "__esModule", { value: true });
|
|
19664
|
+
var shared = shared$3.exports;
|
|
19665
|
+
var coreBase = coreBase$1.exports;
|
|
19666
|
+
var vue = require$$0;
|
|
17808
19667
|
const VERSION = "9.2.2";
|
|
17809
|
-
|
|
17810
|
-
let needWarn = false;
|
|
17811
|
-
if (typeof __VUE_I18N_FULL_INSTALL__ !== "boolean") {
|
|
17812
|
-
needWarn = true;
|
|
17813
|
-
getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;
|
|
17814
|
-
}
|
|
17815
|
-
if (typeof __VUE_I18N_LEGACY_API__ !== "boolean") {
|
|
17816
|
-
needWarn = true;
|
|
17817
|
-
getGlobalThis().__VUE_I18N_LEGACY_API__ = true;
|
|
17818
|
-
}
|
|
17819
|
-
if (typeof __INTLIFY_PROD_DEVTOOLS__ !== "boolean") {
|
|
17820
|
-
getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
|
|
17821
|
-
}
|
|
17822
|
-
if (needWarn) {
|
|
17823
|
-
console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`);
|
|
17824
|
-
}
|
|
17825
|
-
}
|
|
17826
|
-
let code$1 = CoreWarnCodes.__EXTEND_POINT__;
|
|
19668
|
+
let code$1 = coreBase.CoreWarnCodes.__EXTEND_POINT__;
|
|
17827
19669
|
const inc$1 = () => ++code$1;
|
|
17828
19670
|
const I18nWarnCodes = {
|
|
17829
19671
|
FALLBACK_TO_ROOT: code$1,
|
|
@@ -17844,9 +19686,9 @@ const warnMessages = {
|
|
|
17844
19686
|
[I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`
|
|
17845
19687
|
};
|
|
17846
19688
|
function getWarnMessage(code2, ...args) {
|
|
17847
|
-
return format
|
|
19689
|
+
return shared.format(warnMessages[code2], ...args);
|
|
17848
19690
|
}
|
|
17849
|
-
let code = CompileErrorCodes.__EXTEND_POINT__;
|
|
19691
|
+
let code = coreBase.CompileErrorCodes.__EXTEND_POINT__;
|
|
17850
19692
|
const inc = () => ++code;
|
|
17851
19693
|
const I18nErrorCodes = {
|
|
17852
19694
|
UNEXPECTED_RETURN_TYPE: code,
|
|
@@ -17866,7 +19708,7 @@ const I18nErrorCodes = {
|
|
|
17866
19708
|
__EXTEND_POINT__: inc()
|
|
17867
19709
|
};
|
|
17868
19710
|
function createI18nError(code2, ...args) {
|
|
17869
|
-
return createCompileError(code2, null, { messages: errorMessages, args });
|
|
19711
|
+
return coreBase.createCompileError(code2, null, { messages: errorMessages, args });
|
|
17870
19712
|
}
|
|
17871
19713
|
const errorMessages = {
|
|
17872
19714
|
[I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
@@ -17884,24 +19726,25 @@ const errorMessages = {
|
|
|
17884
19726
|
[I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: "Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",
|
|
17885
19727
|
[I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
17886
19728
|
};
|
|
17887
|
-
const TransrateVNodeSymbol = /* @__PURE__ */ makeSymbol("__transrateVNode");
|
|
17888
|
-
const DatetimePartsSymbol = /* @__PURE__ */ makeSymbol("__datetimeParts");
|
|
17889
|
-
const NumberPartsSymbol = /* @__PURE__ */ makeSymbol("__numberParts");
|
|
17890
|
-
const EnableEmitter = /* @__PURE__ */ makeSymbol("__enableEmitter");
|
|
17891
|
-
const DisableEmitter = /* @__PURE__ */ makeSymbol("__disableEmitter");
|
|
17892
|
-
const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
|
|
17893
|
-
makeSymbol("__intlifyMeta");
|
|
17894
|
-
const InejctWithOption = /* @__PURE__ */ makeSymbol("__injectWithOption");
|
|
19729
|
+
const TransrateVNodeSymbol = /* @__PURE__ */ shared.makeSymbol("__transrateVNode");
|
|
19730
|
+
const DatetimePartsSymbol = /* @__PURE__ */ shared.makeSymbol("__datetimeParts");
|
|
19731
|
+
const NumberPartsSymbol = /* @__PURE__ */ shared.makeSymbol("__numberParts");
|
|
19732
|
+
const EnableEmitter = /* @__PURE__ */ shared.makeSymbol("__enableEmitter");
|
|
19733
|
+
const DisableEmitter = /* @__PURE__ */ shared.makeSymbol("__disableEmitter");
|
|
19734
|
+
const SetPluralRulesSymbol = shared.makeSymbol("__setPluralRules");
|
|
19735
|
+
shared.makeSymbol("__intlifyMeta");
|
|
19736
|
+
const InejctWithOption = /* @__PURE__ */ shared.makeSymbol("__injectWithOption");
|
|
19737
|
+
const __VUE_I18N_BRIDGE__ = "__VUE_I18N_BRIDGE__";
|
|
17895
19738
|
function handleFlatJson(obj) {
|
|
17896
|
-
if (!isObject
|
|
19739
|
+
if (!shared.isObject(obj)) {
|
|
17897
19740
|
return obj;
|
|
17898
19741
|
}
|
|
17899
19742
|
for (const key in obj) {
|
|
17900
|
-
if (!hasOwn
|
|
19743
|
+
if (!shared.hasOwn(obj, key)) {
|
|
17901
19744
|
continue;
|
|
17902
19745
|
}
|
|
17903
19746
|
if (!key.includes(".")) {
|
|
17904
|
-
if (isObject
|
|
19747
|
+
if (shared.isObject(obj[key])) {
|
|
17905
19748
|
handleFlatJson(obj[key]);
|
|
17906
19749
|
}
|
|
17907
19750
|
} else {
|
|
@@ -17916,7 +19759,7 @@ function handleFlatJson(obj) {
|
|
|
17916
19759
|
}
|
|
17917
19760
|
currentObj[subKeys[lastIndex]] = obj[key];
|
|
17918
19761
|
delete obj[key];
|
|
17919
|
-
if (isObject
|
|
19762
|
+
if (shared.isObject(currentObj[subKeys[lastIndex]])) {
|
|
17920
19763
|
handleFlatJson(currentObj[subKeys[lastIndex]]);
|
|
17921
19764
|
}
|
|
17922
19765
|
}
|
|
@@ -17925,8 +19768,8 @@ function handleFlatJson(obj) {
|
|
|
17925
19768
|
}
|
|
17926
19769
|
function getLocaleMessages(locale2, options) {
|
|
17927
19770
|
const { messages, __i18n, messageResolver, flatJson } = options;
|
|
17928
|
-
const ret = isPlainObject(messages) ? messages : isArray
|
|
17929
|
-
if (isArray
|
|
19771
|
+
const ret = shared.isPlainObject(messages) ? messages : shared.isArray(__i18n) ? {} : { [locale2]: {} };
|
|
19772
|
+
if (shared.isArray(__i18n)) {
|
|
17930
19773
|
__i18n.forEach((custom) => {
|
|
17931
19774
|
if ("locale" in custom && "resource" in custom) {
|
|
17932
19775
|
const { locale: locale3, resource } = custom;
|
|
@@ -17937,26 +19780,26 @@ function getLocaleMessages(locale2, options) {
|
|
|
17937
19780
|
deepCopy(resource, ret);
|
|
17938
19781
|
}
|
|
17939
19782
|
} else {
|
|
17940
|
-
isString
|
|
19783
|
+
shared.isString(custom) && deepCopy(JSON.parse(custom), ret);
|
|
17941
19784
|
}
|
|
17942
19785
|
});
|
|
17943
19786
|
}
|
|
17944
19787
|
if (messageResolver == null && flatJson) {
|
|
17945
19788
|
for (const key in ret) {
|
|
17946
|
-
if (hasOwn
|
|
19789
|
+
if (shared.hasOwn(ret, key)) {
|
|
17947
19790
|
handleFlatJson(ret[key]);
|
|
17948
19791
|
}
|
|
17949
19792
|
}
|
|
17950
19793
|
}
|
|
17951
19794
|
return ret;
|
|
17952
19795
|
}
|
|
17953
|
-
const isNotObjectOrIsArray = (val) => !isObject
|
|
19796
|
+
const isNotObjectOrIsArray = (val) => !shared.isObject(val) || shared.isArray(val);
|
|
17954
19797
|
function deepCopy(src, des) {
|
|
17955
19798
|
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
|
17956
19799
|
throw createI18nError(I18nErrorCodes.INVALID_VALUE);
|
|
17957
19800
|
}
|
|
17958
19801
|
for (const key in src) {
|
|
17959
|
-
if (hasOwn
|
|
19802
|
+
if (shared.hasOwn(src, key)) {
|
|
17960
19803
|
if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
|
|
17961
19804
|
des[key] = src[key];
|
|
17962
19805
|
} else {
|
|
@@ -17969,7 +19812,7 @@ function getComponentOptions(instance) {
|
|
|
17969
19812
|
return instance.type;
|
|
17970
19813
|
}
|
|
17971
19814
|
function adjustI18nResources(global2, options, componentOptions) {
|
|
17972
|
-
let messages = isObject
|
|
19815
|
+
let messages = shared.isObject(options.messages) ? options.messages : {};
|
|
17973
19816
|
if ("__i18nGlobal" in componentOptions) {
|
|
17974
19817
|
messages = getLocaleMessages(global2.locale.value, {
|
|
17975
19818
|
messages,
|
|
@@ -17983,7 +19826,7 @@ function adjustI18nResources(global2, options, componentOptions) {
|
|
|
17983
19826
|
});
|
|
17984
19827
|
}
|
|
17985
19828
|
{
|
|
17986
|
-
if (isObject
|
|
19829
|
+
if (shared.isObject(options.datetimeFormats)) {
|
|
17987
19830
|
const locales2 = Object.keys(options.datetimeFormats);
|
|
17988
19831
|
if (locales2.length) {
|
|
17989
19832
|
locales2.forEach((locale2) => {
|
|
@@ -17991,7 +19834,7 @@ function adjustI18nResources(global2, options, componentOptions) {
|
|
|
17991
19834
|
});
|
|
17992
19835
|
}
|
|
17993
19836
|
}
|
|
17994
|
-
if (isObject
|
|
19837
|
+
if (shared.isObject(options.numberFormats)) {
|
|
17995
19838
|
const locales2 = Object.keys(options.numberFormats);
|
|
17996
19839
|
if (locales2.length) {
|
|
17997
19840
|
locales2.forEach((locale2) => {
|
|
@@ -18002,47 +19845,47 @@ function adjustI18nResources(global2, options, componentOptions) {
|
|
|
18002
19845
|
}
|
|
18003
19846
|
}
|
|
18004
19847
|
function createTextNode$1(key) {
|
|
18005
|
-
return createVNode
|
|
19848
|
+
return vue.createVNode(vue.Text, null, key, 0);
|
|
18006
19849
|
}
|
|
18007
19850
|
const DEVTOOLS_META = "__INTLIFY_META__";
|
|
18008
19851
|
let composerID = 0;
|
|
18009
19852
|
function defineCoreMissingHandler(missing) {
|
|
18010
19853
|
return (ctx, locale2, key, type) => {
|
|
18011
|
-
return missing(locale2, key, getCurrentInstance() || void 0, type);
|
|
19854
|
+
return missing(locale2, key, vue.getCurrentInstance() || void 0, type);
|
|
18012
19855
|
};
|
|
18013
19856
|
}
|
|
18014
19857
|
const getMetaInfo = () => {
|
|
18015
|
-
const instance = getCurrentInstance();
|
|
19858
|
+
const instance = vue.getCurrentInstance();
|
|
18016
19859
|
let meta = null;
|
|
18017
19860
|
return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META]) ? { [DEVTOOLS_META]: meta } : null;
|
|
18018
19861
|
};
|
|
18019
19862
|
function createComposer(options = {}, VueI18nLegacy) {
|
|
18020
19863
|
const { __root } = options;
|
|
18021
19864
|
const _isGlobal = __root === void 0;
|
|
18022
|
-
let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
|
|
18023
|
-
const _locale = ref(
|
|
18024
|
-
__root && _inheritLocale ? __root.locale.value : isString
|
|
19865
|
+
let _inheritLocale = shared.isBoolean(options.inheritLocale) ? options.inheritLocale : true;
|
|
19866
|
+
const _locale = vue.ref(
|
|
19867
|
+
__root && _inheritLocale ? __root.locale.value : shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE
|
|
18025
19868
|
);
|
|
18026
|
-
const _fallbackLocale = ref(
|
|
18027
|
-
__root && _inheritLocale ? __root.fallbackLocale.value : isString
|
|
19869
|
+
const _fallbackLocale = vue.ref(
|
|
19870
|
+
__root && _inheritLocale ? __root.fallbackLocale.value : shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
|
|
18028
19871
|
);
|
|
18029
|
-
const _messages = ref(getLocaleMessages(_locale.value, options));
|
|
18030
|
-
const _datetimeFormats = ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
|
|
18031
|
-
const _numberFormats = ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
|
|
18032
|
-
let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp
|
|
18033
|
-
let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp
|
|
18034
|
-
let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
19872
|
+
const _messages = vue.ref(getLocaleMessages(_locale.value, options));
|
|
19873
|
+
const _datetimeFormats = vue.ref(shared.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
|
|
19874
|
+
const _numberFormats = vue.ref(shared.isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
|
|
19875
|
+
let _missingWarn = __root ? __root.missingWarn : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn) ? options.missingWarn : true;
|
|
19876
|
+
let _fallbackWarn = __root ? __root.fallbackWarn : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
19877
|
+
let _fallbackRoot = __root ? __root.fallbackRoot : shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
18035
19878
|
let _fallbackFormat = !!options.fallbackFormat;
|
|
18036
|
-
let _missing = isFunction
|
|
18037
|
-
let _runtimeMissing = isFunction
|
|
18038
|
-
let _postTranslation = isFunction
|
|
18039
|
-
let _warnHtmlMessage = __root ? __root.warnHtmlMessage : isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
19879
|
+
let _missing = shared.isFunction(options.missing) ? options.missing : null;
|
|
19880
|
+
let _runtimeMissing = shared.isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null;
|
|
19881
|
+
let _postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : null;
|
|
19882
|
+
let _warnHtmlMessage = __root ? __root.warnHtmlMessage : shared.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
18040
19883
|
let _escapeParameter = !!options.escapeParameter;
|
|
18041
|
-
const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
19884
|
+
const _modifiers = __root ? __root.modifiers : shared.isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
18042
19885
|
let _pluralRules = options.pluralRules || __root && __root.pluralRules;
|
|
18043
19886
|
let _context;
|
|
18044
19887
|
const getCoreContext = () => {
|
|
18045
|
-
_isGlobal && setFallbackContext(null);
|
|
19888
|
+
_isGlobal && coreBase.setFallbackContext(null);
|
|
18046
19889
|
const ctxOptions = {
|
|
18047
19890
|
version: VERSION,
|
|
18048
19891
|
locale: _locale.value,
|
|
@@ -18064,18 +19907,18 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18064
19907
|
{
|
|
18065
19908
|
ctxOptions.datetimeFormats = _datetimeFormats.value;
|
|
18066
19909
|
ctxOptions.numberFormats = _numberFormats.value;
|
|
18067
|
-
ctxOptions.__datetimeFormatters = isPlainObject(_context) ? _context.__datetimeFormatters : void 0;
|
|
18068
|
-
ctxOptions.__numberFormatters = isPlainObject(_context) ? _context.__numberFormatters : void 0;
|
|
19910
|
+
ctxOptions.__datetimeFormatters = shared.isPlainObject(_context) ? _context.__datetimeFormatters : void 0;
|
|
19911
|
+
ctxOptions.__numberFormatters = shared.isPlainObject(_context) ? _context.__numberFormatters : void 0;
|
|
18069
19912
|
}
|
|
18070
19913
|
{
|
|
18071
|
-
ctxOptions.__v_emitter = isPlainObject(_context) ? _context.__v_emitter : void 0;
|
|
19914
|
+
ctxOptions.__v_emitter = shared.isPlainObject(_context) ? _context.__v_emitter : void 0;
|
|
18072
19915
|
}
|
|
18073
|
-
const ctx = createCoreContext(ctxOptions);
|
|
18074
|
-
_isGlobal && setFallbackContext(ctx);
|
|
19916
|
+
const ctx = coreBase.createCoreContext(ctxOptions);
|
|
19917
|
+
_isGlobal && coreBase.setFallbackContext(ctx);
|
|
18075
19918
|
return ctx;
|
|
18076
19919
|
};
|
|
18077
19920
|
_context = getCoreContext();
|
|
18078
|
-
updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
19921
|
+
coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
18079
19922
|
function trackReactivityValues() {
|
|
18080
19923
|
return [
|
|
18081
19924
|
_locale.value,
|
|
@@ -18085,26 +19928,26 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18085
19928
|
_numberFormats.value
|
|
18086
19929
|
];
|
|
18087
19930
|
}
|
|
18088
|
-
const locale2 = computed({
|
|
19931
|
+
const locale2 = vue.computed({
|
|
18089
19932
|
get: () => _locale.value,
|
|
18090
19933
|
set: (val) => {
|
|
18091
19934
|
_locale.value = val;
|
|
18092
19935
|
_context.locale = _locale.value;
|
|
18093
19936
|
}
|
|
18094
19937
|
});
|
|
18095
|
-
const fallbackLocale = computed({
|
|
19938
|
+
const fallbackLocale = vue.computed({
|
|
18096
19939
|
get: () => _fallbackLocale.value,
|
|
18097
19940
|
set: (val) => {
|
|
18098
19941
|
_fallbackLocale.value = val;
|
|
18099
19942
|
_context.fallbackLocale = _fallbackLocale.value;
|
|
18100
|
-
updateFallbackLocale(_context, _locale.value, val);
|
|
19943
|
+
coreBase.updateFallbackLocale(_context, _locale.value, val);
|
|
18101
19944
|
}
|
|
18102
19945
|
});
|
|
18103
|
-
const messages = computed(() => _messages.value);
|
|
18104
|
-
const datetimeFormats = /* @__PURE__ */ computed(() => _datetimeFormats.value);
|
|
18105
|
-
const numberFormats = /* @__PURE__ */ computed(() => _numberFormats.value);
|
|
19946
|
+
const messages = vue.computed(() => _messages.value);
|
|
19947
|
+
const datetimeFormats = /* @__PURE__ */ vue.computed(() => _datetimeFormats.value);
|
|
19948
|
+
const numberFormats = /* @__PURE__ */ vue.computed(() => _numberFormats.value);
|
|
18106
19949
|
function getPostTranslationHandler() {
|
|
18107
|
-
return isFunction
|
|
19950
|
+
return shared.isFunction(_postTranslation) ? _postTranslation : null;
|
|
18108
19951
|
}
|
|
18109
19952
|
function setPostTranslationHandler(handler) {
|
|
18110
19953
|
_postTranslation = handler;
|
|
@@ -18128,23 +19971,23 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18128
19971
|
let ret;
|
|
18129
19972
|
{
|
|
18130
19973
|
try {
|
|
18131
|
-
setAdditionalMeta(getMetaInfo());
|
|
19974
|
+
coreBase.setAdditionalMeta(getMetaInfo());
|
|
18132
19975
|
if (!_isGlobal) {
|
|
18133
|
-
_context.fallbackContext = __root ? getFallbackContext() : void 0;
|
|
19976
|
+
_context.fallbackContext = __root ? coreBase.getFallbackContext() : void 0;
|
|
18134
19977
|
}
|
|
18135
19978
|
ret = fn(_context);
|
|
18136
19979
|
} finally {
|
|
18137
|
-
setAdditionalMeta(null);
|
|
19980
|
+
coreBase.setAdditionalMeta(null);
|
|
18138
19981
|
if (!_isGlobal) {
|
|
18139
19982
|
_context.fallbackContext = void 0;
|
|
18140
19983
|
}
|
|
18141
19984
|
}
|
|
18142
19985
|
}
|
|
18143
|
-
if (isNumber
|
|
19986
|
+
if (shared.isNumber(ret) && ret === coreBase.NOT_REOSLVED) {
|
|
18144
19987
|
const [key, arg2] = argumentParser();
|
|
18145
|
-
if (__root && isString
|
|
18146
|
-
if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
|
|
18147
|
-
warn
|
|
19988
|
+
if (__root && shared.isString(key) && isResolvedTranslateMessage(warnType, arg2)) {
|
|
19989
|
+
if (_fallbackRoot && (coreBase.isTranslateFallbackWarn(_fallbackWarn, key) || coreBase.isTranslateMissingWarn(_missingWarn, key))) {
|
|
19990
|
+
shared.warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {
|
|
18148
19991
|
key,
|
|
18149
19992
|
type: warnType
|
|
18150
19993
|
}));
|
|
@@ -18169,23 +20012,23 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18169
20012
|
}
|
|
18170
20013
|
};
|
|
18171
20014
|
function t3(...args) {
|
|
18172
|
-
return wrapWithDeps((context) => Reflect.apply(translate
|
|
20015
|
+
return wrapWithDeps((context) => Reflect.apply(coreBase.translate, null, [context, ...args]), () => coreBase.parseTranslateArgs(...args), "translate", (root) => Reflect.apply(root.t, root, [...args]), (key) => key, (val) => shared.isString(val));
|
|
18173
20016
|
}
|
|
18174
20017
|
function rt2(...args) {
|
|
18175
20018
|
const [arg1, arg2, arg3] = args;
|
|
18176
|
-
if (arg3 && !isObject
|
|
20019
|
+
if (arg3 && !shared.isObject(arg3)) {
|
|
18177
20020
|
throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
|
|
18178
20021
|
}
|
|
18179
|
-
return t3(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
|
|
20022
|
+
return t3(...[arg1, arg2, shared.assign({ resolvedMessage: true }, arg3 || {})]);
|
|
18180
20023
|
}
|
|
18181
20024
|
function d3(...args) {
|
|
18182
|
-
return wrapWithDeps((context) => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), "datetime format", (root) => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, (val) => isString
|
|
20025
|
+
return wrapWithDeps((context) => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), "datetime format", (root) => Reflect.apply(root.d, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, (val) => shared.isString(val));
|
|
18183
20026
|
}
|
|
18184
20027
|
function n2(...args) {
|
|
18185
|
-
return wrapWithDeps((context) => Reflect.apply(number
|
|
20028
|
+
return wrapWithDeps((context) => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), "number format", (root) => Reflect.apply(root.n, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, (val) => shared.isString(val));
|
|
18186
20029
|
}
|
|
18187
20030
|
function normalize2(values) {
|
|
18188
|
-
return values.map((val) => isString
|
|
20031
|
+
return values.map((val) => shared.isString(val) || shared.isNumber(val) || shared.isBoolean(val) ? createTextNode$1(String(val)) : val);
|
|
18189
20032
|
}
|
|
18190
20033
|
const interpolate = (val) => val;
|
|
18191
20034
|
const processor = {
|
|
@@ -18200,37 +20043,37 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18200
20043
|
const _context2 = context;
|
|
18201
20044
|
try {
|
|
18202
20045
|
_context2.processor = processor;
|
|
18203
|
-
ret = Reflect.apply(translate
|
|
20046
|
+
ret = Reflect.apply(coreBase.translate, null, [_context2, ...args]);
|
|
18204
20047
|
} finally {
|
|
18205
20048
|
_context2.processor = null;
|
|
18206
20049
|
}
|
|
18207
20050
|
return ret;
|
|
18208
20051
|
},
|
|
18209
|
-
() => parseTranslateArgs(...args),
|
|
20052
|
+
() => coreBase.parseTranslateArgs(...args),
|
|
18210
20053
|
"translate",
|
|
18211
20054
|
(root) => root[TransrateVNodeSymbol](...args),
|
|
18212
20055
|
(key) => [createTextNode$1(key)],
|
|
18213
|
-
(val) => isArray
|
|
20056
|
+
(val) => shared.isArray(val)
|
|
18214
20057
|
);
|
|
18215
20058
|
}
|
|
18216
20059
|
function numberParts(...args) {
|
|
18217
20060
|
return wrapWithDeps(
|
|
18218
|
-
(context) => Reflect.apply(number
|
|
18219
|
-
() => parseNumberArgs(...args),
|
|
20061
|
+
(context) => Reflect.apply(coreBase.number, null, [context, ...args]),
|
|
20062
|
+
() => coreBase.parseNumberArgs(...args),
|
|
18220
20063
|
"number format",
|
|
18221
20064
|
(root) => root[NumberPartsSymbol](...args),
|
|
18222
20065
|
() => [],
|
|
18223
|
-
(val) => isString
|
|
20066
|
+
(val) => shared.isString(val) || shared.isArray(val)
|
|
18224
20067
|
);
|
|
18225
20068
|
}
|
|
18226
20069
|
function datetimeParts(...args) {
|
|
18227
20070
|
return wrapWithDeps(
|
|
18228
|
-
(context) => Reflect.apply(datetime, null, [context, ...args]),
|
|
18229
|
-
() => parseDateTimeArgs(...args),
|
|
20071
|
+
(context) => Reflect.apply(coreBase.datetime, null, [context, ...args]),
|
|
20072
|
+
() => coreBase.parseDateTimeArgs(...args),
|
|
18230
20073
|
"datetime format",
|
|
18231
20074
|
(root) => root[DatetimePartsSymbol](...args),
|
|
18232
20075
|
() => [],
|
|
18233
|
-
(val) => isString
|
|
20076
|
+
(val) => shared.isString(val) || shared.isArray(val)
|
|
18234
20077
|
);
|
|
18235
20078
|
}
|
|
18236
20079
|
function setPluralRules(rules) {
|
|
@@ -18238,13 +20081,13 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18238
20081
|
_context.pluralRules = _pluralRules;
|
|
18239
20082
|
}
|
|
18240
20083
|
function te(key, locale3) {
|
|
18241
|
-
const targetLocale = isString
|
|
20084
|
+
const targetLocale = shared.isString(locale3) ? locale3 : _locale.value;
|
|
18242
20085
|
const message = getLocaleMessage(targetLocale);
|
|
18243
20086
|
return _context.messageResolver(message, key) !== null;
|
|
18244
20087
|
}
|
|
18245
20088
|
function resolveMessages(key) {
|
|
18246
20089
|
let messages2 = null;
|
|
18247
|
-
const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);
|
|
20090
|
+
const locales = coreBase.fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);
|
|
18248
20091
|
for (let i3 = 0; i3 < locales.length; i3++) {
|
|
18249
20092
|
const targetLocaleMessages = _messages.value[locales[i3]] || {};
|
|
18250
20093
|
const messageValue = _context.messageResolver(targetLocaleMessages, key);
|
|
@@ -18277,12 +20120,12 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18277
20120
|
function setDateTimeFormat(locale3, format2) {
|
|
18278
20121
|
_datetimeFormats.value[locale3] = format2;
|
|
18279
20122
|
_context.datetimeFormats = _datetimeFormats.value;
|
|
18280
|
-
clearDateTimeFormat(_context, locale3, format2);
|
|
20123
|
+
coreBase.clearDateTimeFormat(_context, locale3, format2);
|
|
18281
20124
|
}
|
|
18282
20125
|
function mergeDateTimeFormat(locale3, format2) {
|
|
18283
|
-
_datetimeFormats.value[locale3] = assign(_datetimeFormats.value[locale3] || {}, format2);
|
|
20126
|
+
_datetimeFormats.value[locale3] = shared.assign(_datetimeFormats.value[locale3] || {}, format2);
|
|
18284
20127
|
_context.datetimeFormats = _datetimeFormats.value;
|
|
18285
|
-
clearDateTimeFormat(_context, locale3, format2);
|
|
20128
|
+
coreBase.clearDateTimeFormat(_context, locale3, format2);
|
|
18286
20129
|
}
|
|
18287
20130
|
function getNumberFormat(locale3) {
|
|
18288
20131
|
return _numberFormats.value[locale3] || {};
|
|
@@ -18290,27 +20133,27 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18290
20133
|
function setNumberFormat(locale3, format2) {
|
|
18291
20134
|
_numberFormats.value[locale3] = format2;
|
|
18292
20135
|
_context.numberFormats = _numberFormats.value;
|
|
18293
|
-
clearNumberFormat(_context, locale3, format2);
|
|
20136
|
+
coreBase.clearNumberFormat(_context, locale3, format2);
|
|
18294
20137
|
}
|
|
18295
20138
|
function mergeNumberFormat(locale3, format2) {
|
|
18296
|
-
_numberFormats.value[locale3] = assign(_numberFormats.value[locale3] || {}, format2);
|
|
20139
|
+
_numberFormats.value[locale3] = shared.assign(_numberFormats.value[locale3] || {}, format2);
|
|
18297
20140
|
_context.numberFormats = _numberFormats.value;
|
|
18298
|
-
clearNumberFormat(_context, locale3, format2);
|
|
20141
|
+
coreBase.clearNumberFormat(_context, locale3, format2);
|
|
18299
20142
|
}
|
|
18300
20143
|
composerID++;
|
|
18301
|
-
if (__root && inBrowser) {
|
|
18302
|
-
watch(__root.locale, (val) => {
|
|
20144
|
+
if (__root && shared.inBrowser) {
|
|
20145
|
+
vue.watch(__root.locale, (val) => {
|
|
18303
20146
|
if (_inheritLocale) {
|
|
18304
20147
|
_locale.value = val;
|
|
18305
20148
|
_context.locale = val;
|
|
18306
|
-
updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
20149
|
+
coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
18307
20150
|
}
|
|
18308
20151
|
});
|
|
18309
|
-
watch(__root.fallbackLocale, (val) => {
|
|
20152
|
+
vue.watch(__root.fallbackLocale, (val) => {
|
|
18310
20153
|
if (_inheritLocale) {
|
|
18311
20154
|
_fallbackLocale.value = val;
|
|
18312
20155
|
_context.fallbackLocale = val;
|
|
18313
|
-
updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
20156
|
+
coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
18314
20157
|
}
|
|
18315
20158
|
});
|
|
18316
20159
|
}
|
|
@@ -18326,7 +20169,7 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18326
20169
|
if (val && __root) {
|
|
18327
20170
|
_locale.value = __root.locale.value;
|
|
18328
20171
|
_fallbackLocale.value = __root.fallbackLocale.value;
|
|
18329
|
-
updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
20172
|
+
coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
|
|
18330
20173
|
}
|
|
18331
20174
|
},
|
|
18332
20175
|
get availableLocales() {
|
|
@@ -18423,32 +20266,32 @@ function createComposer(options = {}, VueI18nLegacy) {
|
|
|
18423
20266
|
return composer;
|
|
18424
20267
|
}
|
|
18425
20268
|
function convertComposerOptions(options) {
|
|
18426
|
-
const locale2 = isString
|
|
18427
|
-
const fallbackLocale = isString
|
|
18428
|
-
const missing = isFunction
|
|
18429
|
-
const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp
|
|
18430
|
-
const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp
|
|
18431
|
-
const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
20269
|
+
const locale2 = shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE;
|
|
20270
|
+
const fallbackLocale = shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
|
|
20271
|
+
const missing = shared.isFunction(options.missing) ? options.missing : void 0;
|
|
20272
|
+
const missingWarn = shared.isBoolean(options.silentTranslationWarn) || shared.isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
|
|
20273
|
+
const fallbackWarn = shared.isBoolean(options.silentFallbackWarn) || shared.isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
|
|
20274
|
+
const fallbackRoot = shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
18432
20275
|
const fallbackFormat = !!options.formatFallbackMessages;
|
|
18433
|
-
const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
20276
|
+
const modifiers = shared.isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
18434
20277
|
const pluralizationRules = options.pluralizationRules;
|
|
18435
|
-
const postTranslation = isFunction
|
|
18436
|
-
const warnHtmlMessage = isString
|
|
20278
|
+
const postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : void 0;
|
|
20279
|
+
const warnHtmlMessage = shared.isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
|
|
18437
20280
|
const escapeParameter = !!options.escapeParameterHtml;
|
|
18438
|
-
const inheritLocale = isBoolean(options.sync) ? options.sync : true;
|
|
20281
|
+
const inheritLocale = shared.isBoolean(options.sync) ? options.sync : true;
|
|
18439
20282
|
if (options.formatter) {
|
|
18440
|
-
warn
|
|
20283
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
|
|
18441
20284
|
}
|
|
18442
20285
|
if (options.preserveDirectiveContent) {
|
|
18443
|
-
warn
|
|
20286
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
|
|
18444
20287
|
}
|
|
18445
20288
|
let messages = options.messages;
|
|
18446
|
-
if (isPlainObject(options.sharedMessages)) {
|
|
20289
|
+
if (shared.isPlainObject(options.sharedMessages)) {
|
|
18447
20290
|
const sharedMessages = options.sharedMessages;
|
|
18448
20291
|
const locales = Object.keys(sharedMessages);
|
|
18449
20292
|
messages = locales.reduce((messages2, locale3) => {
|
|
18450
20293
|
const message = messages2[locale3] || (messages2[locale3] = {});
|
|
18451
|
-
assign(message, sharedMessages[locale3]);
|
|
20294
|
+
shared.assign(message, sharedMessages[locale3]);
|
|
18452
20295
|
return messages2;
|
|
18453
20296
|
}, messages || {});
|
|
18454
20297
|
}
|
|
@@ -18510,7 +20353,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18510
20353
|
return composer.availableLocales;
|
|
18511
20354
|
},
|
|
18512
20355
|
get formatter() {
|
|
18513
|
-
warn
|
|
20356
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
|
|
18514
20357
|
return {
|
|
18515
20358
|
interpolate() {
|
|
18516
20359
|
return [];
|
|
@@ -18518,7 +20361,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18518
20361
|
};
|
|
18519
20362
|
},
|
|
18520
20363
|
set formatter(val) {
|
|
18521
|
-
warn
|
|
20364
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
|
|
18522
20365
|
},
|
|
18523
20366
|
get missing() {
|
|
18524
20367
|
return composer.getMissingHandler();
|
|
@@ -18527,16 +20370,16 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18527
20370
|
composer.setMissingHandler(handler);
|
|
18528
20371
|
},
|
|
18529
20372
|
get silentTranslationWarn() {
|
|
18530
|
-
return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
|
|
20373
|
+
return shared.isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
|
|
18531
20374
|
},
|
|
18532
20375
|
set silentTranslationWarn(val) {
|
|
18533
|
-
composer.missingWarn = isBoolean(val) ? !val : val;
|
|
20376
|
+
composer.missingWarn = shared.isBoolean(val) ? !val : val;
|
|
18534
20377
|
},
|
|
18535
20378
|
get silentFallbackWarn() {
|
|
18536
|
-
return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
|
|
20379
|
+
return shared.isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
|
|
18537
20380
|
},
|
|
18538
20381
|
set silentFallbackWarn(val) {
|
|
18539
|
-
composer.fallbackWarn = isBoolean(val) ? !val : val;
|
|
20382
|
+
composer.fallbackWarn = shared.isBoolean(val) ? !val : val;
|
|
18540
20383
|
},
|
|
18541
20384
|
get modifiers() {
|
|
18542
20385
|
return composer.modifiers;
|
|
@@ -18572,11 +20415,11 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18572
20415
|
composer.escapeParameter = val;
|
|
18573
20416
|
},
|
|
18574
20417
|
get preserveDirectiveContent() {
|
|
18575
|
-
warn
|
|
20418
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
|
|
18576
20419
|
return true;
|
|
18577
20420
|
},
|
|
18578
20421
|
set preserveDirectiveContent(val) {
|
|
18579
|
-
warn
|
|
20422
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
|
|
18580
20423
|
},
|
|
18581
20424
|
get pluralizationRules() {
|
|
18582
20425
|
return composer.pluralRules || {};
|
|
@@ -18587,20 +20430,20 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18587
20430
|
const options2 = {};
|
|
18588
20431
|
let list = null;
|
|
18589
20432
|
let named = null;
|
|
18590
|
-
if (!isString
|
|
20433
|
+
if (!shared.isString(arg1)) {
|
|
18591
20434
|
throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
|
|
18592
20435
|
}
|
|
18593
20436
|
const key = arg1;
|
|
18594
|
-
if (isString
|
|
20437
|
+
if (shared.isString(arg2)) {
|
|
18595
20438
|
options2.locale = arg2;
|
|
18596
|
-
} else if (isArray
|
|
20439
|
+
} else if (shared.isArray(arg2)) {
|
|
18597
20440
|
list = arg2;
|
|
18598
|
-
} else if (isPlainObject(arg2)) {
|
|
20441
|
+
} else if (shared.isPlainObject(arg2)) {
|
|
18599
20442
|
named = arg2;
|
|
18600
20443
|
}
|
|
18601
|
-
if (isArray
|
|
20444
|
+
if (shared.isArray(arg3)) {
|
|
18602
20445
|
list = arg3;
|
|
18603
|
-
} else if (isPlainObject(arg3)) {
|
|
20446
|
+
} else if (shared.isPlainObject(arg3)) {
|
|
18604
20447
|
named = arg3;
|
|
18605
20448
|
}
|
|
18606
20449
|
return Reflect.apply(composer.t, composer, [
|
|
@@ -18617,24 +20460,24 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18617
20460
|
const options2 = { plural: 1 };
|
|
18618
20461
|
let list = null;
|
|
18619
20462
|
let named = null;
|
|
18620
|
-
if (!isString
|
|
20463
|
+
if (!shared.isString(arg1)) {
|
|
18621
20464
|
throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
|
|
18622
20465
|
}
|
|
18623
20466
|
const key = arg1;
|
|
18624
|
-
if (isString
|
|
20467
|
+
if (shared.isString(arg2)) {
|
|
18625
20468
|
options2.locale = arg2;
|
|
18626
|
-
} else if (isNumber
|
|
20469
|
+
} else if (shared.isNumber(arg2)) {
|
|
18627
20470
|
options2.plural = arg2;
|
|
18628
|
-
} else if (isArray
|
|
20471
|
+
} else if (shared.isArray(arg2)) {
|
|
18629
20472
|
list = arg2;
|
|
18630
|
-
} else if (isPlainObject(arg2)) {
|
|
20473
|
+
} else if (shared.isPlainObject(arg2)) {
|
|
18631
20474
|
named = arg2;
|
|
18632
20475
|
}
|
|
18633
|
-
if (isString
|
|
20476
|
+
if (shared.isString(arg3)) {
|
|
18634
20477
|
options2.locale = arg3;
|
|
18635
|
-
} else if (isArray
|
|
20478
|
+
} else if (shared.isArray(arg3)) {
|
|
18636
20479
|
list = arg3;
|
|
18637
|
-
} else if (isPlainObject(arg3)) {
|
|
20480
|
+
} else if (shared.isPlainObject(arg3)) {
|
|
18638
20481
|
named = arg3;
|
|
18639
20482
|
}
|
|
18640
20483
|
return Reflect.apply(composer.t, composer, [
|
|
@@ -18683,7 +20526,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
|
|
|
18683
20526
|
composer.mergeNumberFormat(locale2, format2);
|
|
18684
20527
|
},
|
|
18685
20528
|
getChoiceIndex(choice, choicesLength) {
|
|
18686
|
-
warn
|
|
20529
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));
|
|
18687
20530
|
return -1;
|
|
18688
20531
|
},
|
|
18689
20532
|
__onComponentInstanceCreated(target) {
|
|
@@ -18728,7 +20571,7 @@ function getInterpolateArg({ slots }, keys2) {
|
|
|
18728
20571
|
return ret.reduce((slot, current) => {
|
|
18729
20572
|
return slot = [
|
|
18730
20573
|
...slot,
|
|
18731
|
-
...isArray
|
|
20574
|
+
...shared.isArray(current.children) ? current.children : [current]
|
|
18732
20575
|
];
|
|
18733
20576
|
}, []);
|
|
18734
20577
|
} else {
|
|
@@ -18742,18 +20585,18 @@ function getInterpolateArg({ slots }, keys2) {
|
|
|
18742
20585
|
}
|
|
18743
20586
|
}
|
|
18744
20587
|
function getFragmentableTag(tag) {
|
|
18745
|
-
return Fragment;
|
|
20588
|
+
return vue.Fragment;
|
|
18746
20589
|
}
|
|
18747
20590
|
const Translation = {
|
|
18748
20591
|
name: "i18n-t",
|
|
18749
|
-
props: assign({
|
|
20592
|
+
props: shared.assign({
|
|
18750
20593
|
keypath: {
|
|
18751
20594
|
type: String,
|
|
18752
20595
|
required: true
|
|
18753
20596
|
},
|
|
18754
20597
|
plural: {
|
|
18755
20598
|
type: [Number, String],
|
|
18756
|
-
validator: (val) => isNumber
|
|
20599
|
+
validator: (val) => shared.isNumber(val) || !isNaN(val)
|
|
18757
20600
|
}
|
|
18758
20601
|
}, baseFormatProps),
|
|
18759
20602
|
setup(props, context) {
|
|
@@ -18769,18 +20612,18 @@ const Translation = {
|
|
|
18769
20612
|
options.locale = props.locale;
|
|
18770
20613
|
}
|
|
18771
20614
|
if (props.plural !== void 0) {
|
|
18772
|
-
options.plural = isString
|
|
20615
|
+
options.plural = shared.isString(props.plural) ? +props.plural : props.plural;
|
|
18773
20616
|
}
|
|
18774
20617
|
const arg = getInterpolateArg(context, keys2);
|
|
18775
20618
|
const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options);
|
|
18776
|
-
const assignedAttrs = assign({}, attrs);
|
|
18777
|
-
const tag = isString
|
|
18778
|
-
return h(tag, assignedAttrs, children);
|
|
20619
|
+
const assignedAttrs = shared.assign({}, attrs);
|
|
20620
|
+
const tag = shared.isString(props.tag) || shared.isObject(props.tag) ? props.tag : getFragmentableTag();
|
|
20621
|
+
return vue.h(tag, assignedAttrs, children);
|
|
18779
20622
|
};
|
|
18780
20623
|
}
|
|
18781
20624
|
};
|
|
18782
20625
|
function isVNode(target) {
|
|
18783
|
-
return isArray
|
|
20626
|
+
return shared.isArray(target) && !shared.isString(target[0]);
|
|
18784
20627
|
}
|
|
18785
20628
|
function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
18786
20629
|
const { slots, attrs } = context;
|
|
@@ -18790,19 +20633,19 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
|
18790
20633
|
if (props.locale) {
|
|
18791
20634
|
options.locale = props.locale;
|
|
18792
20635
|
}
|
|
18793
|
-
if (isString
|
|
20636
|
+
if (shared.isString(props.format)) {
|
|
18794
20637
|
options.key = props.format;
|
|
18795
|
-
} else if (isObject
|
|
18796
|
-
if (isString
|
|
20638
|
+
} else if (shared.isObject(props.format)) {
|
|
20639
|
+
if (shared.isString(props.format.key)) {
|
|
18797
20640
|
options.key = props.format.key;
|
|
18798
20641
|
}
|
|
18799
20642
|
overrides = Object.keys(props.format).reduce((options2, prop) => {
|
|
18800
|
-
return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2;
|
|
20643
|
+
return slotKeys.includes(prop) ? shared.assign({}, options2, { [prop]: props.format[prop] }) : options2;
|
|
18801
20644
|
}, {});
|
|
18802
20645
|
}
|
|
18803
20646
|
const parts = partFormatter(...[props.value, options, overrides]);
|
|
18804
20647
|
let children = [options.key];
|
|
18805
|
-
if (isArray
|
|
20648
|
+
if (shared.isArray(parts)) {
|
|
18806
20649
|
children = parts.map((part, index2) => {
|
|
18807
20650
|
const slot = slots[part.type];
|
|
18808
20651
|
const node = slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value];
|
|
@@ -18811,17 +20654,17 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
|
18811
20654
|
}
|
|
18812
20655
|
return node;
|
|
18813
20656
|
});
|
|
18814
|
-
} else if (isString
|
|
20657
|
+
} else if (shared.isString(parts)) {
|
|
18815
20658
|
children = [parts];
|
|
18816
20659
|
}
|
|
18817
|
-
const assignedAttrs = assign({}, attrs);
|
|
18818
|
-
const tag = isString
|
|
18819
|
-
return h(tag, assignedAttrs, children);
|
|
20660
|
+
const assignedAttrs = shared.assign({}, attrs);
|
|
20661
|
+
const tag = shared.isString(props.tag) || shared.isObject(props.tag) ? props.tag : getFragmentableTag();
|
|
20662
|
+
return vue.h(tag, assignedAttrs, children);
|
|
18820
20663
|
};
|
|
18821
20664
|
}
|
|
18822
20665
|
const NumberFormat = {
|
|
18823
20666
|
name: "i18n-n",
|
|
18824
|
-
props: assign({
|
|
20667
|
+
props: shared.assign({
|
|
18825
20668
|
value: {
|
|
18826
20669
|
type: Number,
|
|
18827
20670
|
required: true
|
|
@@ -18832,12 +20675,12 @@ const NumberFormat = {
|
|
|
18832
20675
|
}, baseFormatProps),
|
|
18833
20676
|
setup(props, context) {
|
|
18834
20677
|
const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
|
|
18835
|
-
return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => i18n2[NumberPartsSymbol](...args));
|
|
20678
|
+
return renderFormatter(props, context, coreBase.NUMBER_FORMAT_OPTIONS_KEYS, (...args) => i18n2[NumberPartsSymbol](...args));
|
|
18836
20679
|
}
|
|
18837
20680
|
};
|
|
18838
20681
|
const DatetimeFormat = {
|
|
18839
20682
|
name: "i18n-d",
|
|
18840
|
-
props: assign({
|
|
20683
|
+
props: shared.assign({
|
|
18841
20684
|
value: {
|
|
18842
20685
|
type: [Number, Date],
|
|
18843
20686
|
required: true
|
|
@@ -18848,10 +20691,10 @@ const DatetimeFormat = {
|
|
|
18848
20691
|
}, baseFormatProps),
|
|
18849
20692
|
setup(props, context) {
|
|
18850
20693
|
const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
|
|
18851
|
-
return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => i18n2[DatetimePartsSymbol](...args));
|
|
20694
|
+
return renderFormatter(props, context, coreBase.DATETIME_FORMAT_OPTIONS_KEYS, (...args) => i18n2[DatetimePartsSymbol](...args));
|
|
18852
20695
|
}
|
|
18853
20696
|
};
|
|
18854
|
-
function getComposer$
|
|
20697
|
+
function getComposer$1(i18n2, instance) {
|
|
18855
20698
|
const i18nInternal = i18n2;
|
|
18856
20699
|
if (i18n2.mode === "composition") {
|
|
18857
20700
|
return i18nInternal.__getInstance(instance) || i18n2.global;
|
|
@@ -18866,9 +20709,9 @@ function vTDirective(i18n2) {
|
|
|
18866
20709
|
if (!instance || !instance.$) {
|
|
18867
20710
|
throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
|
|
18868
20711
|
}
|
|
18869
|
-
const composer = getComposer$
|
|
20712
|
+
const composer = getComposer$1(i18n2, instance.$);
|
|
18870
20713
|
if (modifiers.preserve) {
|
|
18871
|
-
warn
|
|
20714
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));
|
|
18872
20715
|
}
|
|
18873
20716
|
const parsedValue = parseValue(value);
|
|
18874
20717
|
return [
|
|
@@ -18878,8 +20721,8 @@ function vTDirective(i18n2) {
|
|
|
18878
20721
|
};
|
|
18879
20722
|
const register3 = (el, binding) => {
|
|
18880
20723
|
const [textContent, composer] = _process(binding);
|
|
18881
|
-
if (inBrowser && i18n2.global === composer) {
|
|
18882
|
-
el.__i18nWatcher = watch(composer.locale, () => {
|
|
20724
|
+
if (shared.inBrowser && i18n2.global === composer) {
|
|
20725
|
+
el.__i18nWatcher = vue.watch(composer.locale, () => {
|
|
18883
20726
|
binding.instance && binding.instance.$forceUpdate();
|
|
18884
20727
|
});
|
|
18885
20728
|
}
|
|
@@ -18887,7 +20730,7 @@ function vTDirective(i18n2) {
|
|
|
18887
20730
|
el.textContent = textContent;
|
|
18888
20731
|
};
|
|
18889
20732
|
const unregister3 = (el) => {
|
|
18890
|
-
if (inBrowser && el.__i18nWatcher) {
|
|
20733
|
+
if (shared.inBrowser && el.__i18nWatcher) {
|
|
18891
20734
|
el.__i18nWatcher();
|
|
18892
20735
|
el.__i18nWatcher = void 0;
|
|
18893
20736
|
delete el.__i18nWatcher;
|
|
@@ -18918,9 +20761,9 @@ function vTDirective(i18n2) {
|
|
|
18918
20761
|
};
|
|
18919
20762
|
}
|
|
18920
20763
|
function parseValue(value) {
|
|
18921
|
-
if (isString
|
|
20764
|
+
if (shared.isString(value)) {
|
|
18922
20765
|
return { path: value };
|
|
18923
|
-
} else if (isPlainObject(value)) {
|
|
20766
|
+
} else if (shared.isPlainObject(value)) {
|
|
18924
20767
|
if (!("path" in value)) {
|
|
18925
20768
|
throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, "path");
|
|
18926
20769
|
}
|
|
@@ -18933,23 +20776,23 @@ function makeParams(value) {
|
|
|
18933
20776
|
const { path, locale: locale2, args, choice, plural } = value;
|
|
18934
20777
|
const options = {};
|
|
18935
20778
|
const named = args || {};
|
|
18936
|
-
if (isString
|
|
20779
|
+
if (shared.isString(locale2)) {
|
|
18937
20780
|
options.locale = locale2;
|
|
18938
20781
|
}
|
|
18939
|
-
if (isNumber
|
|
20782
|
+
if (shared.isNumber(choice)) {
|
|
18940
20783
|
options.plural = choice;
|
|
18941
20784
|
}
|
|
18942
|
-
if (isNumber
|
|
20785
|
+
if (shared.isNumber(plural)) {
|
|
18943
20786
|
options.plural = plural;
|
|
18944
20787
|
}
|
|
18945
20788
|
return [path, named, options];
|
|
18946
20789
|
}
|
|
18947
20790
|
function apply(app, i18n2, ...options) {
|
|
18948
|
-
const pluginOptions = isPlainObject(options[0]) ? options[0] : {};
|
|
20791
|
+
const pluginOptions = shared.isPlainObject(options[0]) ? options[0] : {};
|
|
18949
20792
|
const useI18nComponentName = !!pluginOptions.useI18nComponentName;
|
|
18950
|
-
const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
|
|
20793
|
+
const globalInstall = shared.isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
|
|
18951
20794
|
if (globalInstall && useI18nComponentName) {
|
|
18952
|
-
warn
|
|
20795
|
+
shared.warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {
|
|
18953
20796
|
name: Translation.name
|
|
18954
20797
|
}));
|
|
18955
20798
|
}
|
|
@@ -18962,328 +20805,10 @@ function apply(app, i18n2, ...options) {
|
|
|
18962
20805
|
app.directive("t", vTDirective(i18n2));
|
|
18963
20806
|
}
|
|
18964
20807
|
}
|
|
18965
|
-
const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
|
|
18966
|
-
let devtoolsApi;
|
|
18967
|
-
async function enableDevTools(app, i18n2) {
|
|
18968
|
-
return new Promise((resolve, reject) => {
|
|
18969
|
-
try {
|
|
18970
|
-
setupDevtoolsPlugin({
|
|
18971
|
-
id: "vue-devtools-plugin-vue-i18n",
|
|
18972
|
-
label: VueDevToolsLabels["vue-devtools-plugin-vue-i18n"],
|
|
18973
|
-
packageName: "vue-i18n",
|
|
18974
|
-
homepage: "https://vue-i18n.intlify.dev",
|
|
18975
|
-
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
18976
|
-
componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
|
|
18977
|
-
app
|
|
18978
|
-
}, (api2) => {
|
|
18979
|
-
devtoolsApi = api2;
|
|
18980
|
-
api2.on.visitComponentTree(({ componentInstance, treeNode }) => {
|
|
18981
|
-
updateComponentTreeTags(componentInstance, treeNode, i18n2);
|
|
18982
|
-
});
|
|
18983
|
-
api2.on.inspectComponent(({ componentInstance, instanceData }) => {
|
|
18984
|
-
if (componentInstance.vnode.el && componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
|
|
18985
|
-
if (i18n2.mode === "legacy") {
|
|
18986
|
-
if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
|
|
18987
|
-
inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
|
|
18988
|
-
}
|
|
18989
|
-
} else {
|
|
18990
|
-
inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
|
|
18991
|
-
}
|
|
18992
|
-
}
|
|
18993
|
-
});
|
|
18994
|
-
api2.addInspector({
|
|
18995
|
-
id: "vue-i18n-resource-inspector",
|
|
18996
|
-
label: VueDevToolsLabels["vue-i18n-resource-inspector"],
|
|
18997
|
-
icon: "language",
|
|
18998
|
-
treeFilterPlaceholder: VueDevToolsPlaceholders["vue-i18n-resource-inspector"]
|
|
18999
|
-
});
|
|
19000
|
-
api2.on.getInspectorTree((payload) => {
|
|
19001
|
-
if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
|
|
19002
|
-
registerScope(payload, i18n2);
|
|
19003
|
-
}
|
|
19004
|
-
});
|
|
19005
|
-
const roots2 = /* @__PURE__ */ new Map();
|
|
19006
|
-
api2.on.getInspectorState(async (payload) => {
|
|
19007
|
-
if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
|
|
19008
|
-
api2.unhighlightElement();
|
|
19009
|
-
inspectScope(payload, i18n2);
|
|
19010
|
-
if (payload.nodeId === "global") {
|
|
19011
|
-
if (!roots2.has(payload.app)) {
|
|
19012
|
-
const [root] = await api2.getComponentInstances(payload.app);
|
|
19013
|
-
roots2.set(payload.app, root);
|
|
19014
|
-
}
|
|
19015
|
-
api2.highlightElement(roots2.get(payload.app));
|
|
19016
|
-
} else {
|
|
19017
|
-
const instance = getComponentInstance(payload.nodeId, i18n2);
|
|
19018
|
-
instance && api2.highlightElement(instance);
|
|
19019
|
-
}
|
|
19020
|
-
}
|
|
19021
|
-
});
|
|
19022
|
-
api2.on.editInspectorState((payload) => {
|
|
19023
|
-
if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
|
|
19024
|
-
editScope(payload, i18n2);
|
|
19025
|
-
}
|
|
19026
|
-
});
|
|
19027
|
-
api2.addTimelineLayer({
|
|
19028
|
-
id: "vue-i18n-timeline",
|
|
19029
|
-
label: VueDevToolsLabels["vue-i18n-timeline"],
|
|
19030
|
-
color: VueDevToolsTimelineColors["vue-i18n-timeline"]
|
|
19031
|
-
});
|
|
19032
|
-
resolve(true);
|
|
19033
|
-
});
|
|
19034
|
-
} catch (e3) {
|
|
19035
|
-
console.error(e3);
|
|
19036
|
-
reject(false);
|
|
19037
|
-
}
|
|
19038
|
-
});
|
|
19039
|
-
}
|
|
19040
|
-
function getI18nScopeLable(instance) {
|
|
19041
|
-
return instance.type.name || instance.type.displayName || instance.type.__file || "Anonymous";
|
|
19042
|
-
}
|
|
19043
|
-
function updateComponentTreeTags(instance, treeNode, i18n2) {
|
|
19044
|
-
const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
|
|
19045
|
-
if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {
|
|
19046
|
-
if (instance.vnode.el.__VUE_I18N__ !== global2) {
|
|
19047
|
-
const tag = {
|
|
19048
|
-
label: `i18n (${getI18nScopeLable(instance)} Scope)`,
|
|
19049
|
-
textColor: 0,
|
|
19050
|
-
backgroundColor: 16764185
|
|
19051
|
-
};
|
|
19052
|
-
treeNode.tags.push(tag);
|
|
19053
|
-
}
|
|
19054
|
-
}
|
|
19055
|
-
}
|
|
19056
|
-
function inspectComposer(instanceData, composer) {
|
|
19057
|
-
const type = VUE_I18N_COMPONENT_TYPES;
|
|
19058
|
-
instanceData.state.push({
|
|
19059
|
-
type,
|
|
19060
|
-
key: "locale",
|
|
19061
|
-
editable: true,
|
|
19062
|
-
value: composer.locale.value
|
|
19063
|
-
});
|
|
19064
|
-
instanceData.state.push({
|
|
19065
|
-
type,
|
|
19066
|
-
key: "availableLocales",
|
|
19067
|
-
editable: false,
|
|
19068
|
-
value: composer.availableLocales
|
|
19069
|
-
});
|
|
19070
|
-
instanceData.state.push({
|
|
19071
|
-
type,
|
|
19072
|
-
key: "fallbackLocale",
|
|
19073
|
-
editable: true,
|
|
19074
|
-
value: composer.fallbackLocale.value
|
|
19075
|
-
});
|
|
19076
|
-
instanceData.state.push({
|
|
19077
|
-
type,
|
|
19078
|
-
key: "inheritLocale",
|
|
19079
|
-
editable: true,
|
|
19080
|
-
value: composer.inheritLocale
|
|
19081
|
-
});
|
|
19082
|
-
instanceData.state.push({
|
|
19083
|
-
type,
|
|
19084
|
-
key: "messages",
|
|
19085
|
-
editable: false,
|
|
19086
|
-
value: getLocaleMessageValue(composer.messages.value)
|
|
19087
|
-
});
|
|
19088
|
-
{
|
|
19089
|
-
instanceData.state.push({
|
|
19090
|
-
type,
|
|
19091
|
-
key: "datetimeFormats",
|
|
19092
|
-
editable: false,
|
|
19093
|
-
value: composer.datetimeFormats.value
|
|
19094
|
-
});
|
|
19095
|
-
instanceData.state.push({
|
|
19096
|
-
type,
|
|
19097
|
-
key: "numberFormats",
|
|
19098
|
-
editable: false,
|
|
19099
|
-
value: composer.numberFormats.value
|
|
19100
|
-
});
|
|
19101
|
-
}
|
|
19102
|
-
}
|
|
19103
|
-
function getLocaleMessageValue(messages) {
|
|
19104
|
-
const value = {};
|
|
19105
|
-
Object.keys(messages).forEach((key) => {
|
|
19106
|
-
const v = messages[key];
|
|
19107
|
-
if (isFunction$1(v) && "source" in v) {
|
|
19108
|
-
value[key] = getMessageFunctionDetails(v);
|
|
19109
|
-
} else if (isObject$4(v)) {
|
|
19110
|
-
value[key] = getLocaleMessageValue(v);
|
|
19111
|
-
} else {
|
|
19112
|
-
value[key] = v;
|
|
19113
|
-
}
|
|
19114
|
-
});
|
|
19115
|
-
return value;
|
|
19116
|
-
}
|
|
19117
|
-
const ESC = {
|
|
19118
|
-
"<": "<",
|
|
19119
|
-
">": ">",
|
|
19120
|
-
'"': """,
|
|
19121
|
-
"&": "&"
|
|
19122
|
-
};
|
|
19123
|
-
function escape$1(s3) {
|
|
19124
|
-
return s3.replace(/[<>"&]/g, escapeChar);
|
|
19125
|
-
}
|
|
19126
|
-
function escapeChar(a3) {
|
|
19127
|
-
return ESC[a3] || a3;
|
|
19128
|
-
}
|
|
19129
|
-
function getMessageFunctionDetails(func) {
|
|
19130
|
-
const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
|
|
19131
|
-
return {
|
|
19132
|
-
_custom: {
|
|
19133
|
-
type: "function",
|
|
19134
|
-
display: `<span>\u0192</span> ${argString}`
|
|
19135
|
-
}
|
|
19136
|
-
};
|
|
19137
|
-
}
|
|
19138
|
-
function registerScope(payload, i18n2) {
|
|
19139
|
-
payload.rootNodes.push({
|
|
19140
|
-
id: "global",
|
|
19141
|
-
label: "Global Scope"
|
|
19142
|
-
});
|
|
19143
|
-
const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
|
|
19144
|
-
for (const [keyInstance, instance] of i18n2.__instances) {
|
|
19145
|
-
const composer = i18n2.mode === "composition" ? instance : instance.__composer;
|
|
19146
|
-
if (global2 === composer) {
|
|
19147
|
-
continue;
|
|
19148
|
-
}
|
|
19149
|
-
payload.rootNodes.push({
|
|
19150
|
-
id: composer.id.toString(),
|
|
19151
|
-
label: `${getI18nScopeLable(keyInstance)} Scope`
|
|
19152
|
-
});
|
|
19153
|
-
}
|
|
19154
|
-
}
|
|
19155
|
-
function getComponentInstance(nodeId, i18n2) {
|
|
19156
|
-
let instance = null;
|
|
19157
|
-
if (nodeId !== "global") {
|
|
19158
|
-
for (const [component, composer] of i18n2.__instances.entries()) {
|
|
19159
|
-
if (composer.id.toString() === nodeId) {
|
|
19160
|
-
instance = component;
|
|
19161
|
-
break;
|
|
19162
|
-
}
|
|
19163
|
-
}
|
|
19164
|
-
}
|
|
19165
|
-
return instance;
|
|
19166
|
-
}
|
|
19167
|
-
function getComposer$1(nodeId, i18n2) {
|
|
19168
|
-
if (nodeId === "global") {
|
|
19169
|
-
return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
|
|
19170
|
-
} else {
|
|
19171
|
-
const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
|
|
19172
|
-
if (instance) {
|
|
19173
|
-
return i18n2.mode === "composition" ? instance : instance.__composer;
|
|
19174
|
-
} else {
|
|
19175
|
-
return null;
|
|
19176
|
-
}
|
|
19177
|
-
}
|
|
19178
|
-
}
|
|
19179
|
-
function inspectScope(payload, i18n2) {
|
|
19180
|
-
const composer = getComposer$1(payload.nodeId, i18n2);
|
|
19181
|
-
if (composer) {
|
|
19182
|
-
payload.state = makeScopeInspectState(composer);
|
|
19183
|
-
}
|
|
19184
|
-
return null;
|
|
19185
|
-
}
|
|
19186
|
-
function makeScopeInspectState(composer) {
|
|
19187
|
-
const state = {};
|
|
19188
|
-
const localeType = "Locale related info";
|
|
19189
|
-
const localeStates = [
|
|
19190
|
-
{
|
|
19191
|
-
type: localeType,
|
|
19192
|
-
key: "locale",
|
|
19193
|
-
editable: true,
|
|
19194
|
-
value: composer.locale.value
|
|
19195
|
-
},
|
|
19196
|
-
{
|
|
19197
|
-
type: localeType,
|
|
19198
|
-
key: "fallbackLocale",
|
|
19199
|
-
editable: true,
|
|
19200
|
-
value: composer.fallbackLocale.value
|
|
19201
|
-
},
|
|
19202
|
-
{
|
|
19203
|
-
type: localeType,
|
|
19204
|
-
key: "availableLocales",
|
|
19205
|
-
editable: false,
|
|
19206
|
-
value: composer.availableLocales
|
|
19207
|
-
},
|
|
19208
|
-
{
|
|
19209
|
-
type: localeType,
|
|
19210
|
-
key: "inheritLocale",
|
|
19211
|
-
editable: true,
|
|
19212
|
-
value: composer.inheritLocale
|
|
19213
|
-
}
|
|
19214
|
-
];
|
|
19215
|
-
state[localeType] = localeStates;
|
|
19216
|
-
const localeMessagesType = "Locale messages info";
|
|
19217
|
-
const localeMessagesStates = [
|
|
19218
|
-
{
|
|
19219
|
-
type: localeMessagesType,
|
|
19220
|
-
key: "messages",
|
|
19221
|
-
editable: false,
|
|
19222
|
-
value: getLocaleMessageValue(composer.messages.value)
|
|
19223
|
-
}
|
|
19224
|
-
];
|
|
19225
|
-
state[localeMessagesType] = localeMessagesStates;
|
|
19226
|
-
{
|
|
19227
|
-
const datetimeFormatsType = "Datetime formats info";
|
|
19228
|
-
const datetimeFormatsStates = [
|
|
19229
|
-
{
|
|
19230
|
-
type: datetimeFormatsType,
|
|
19231
|
-
key: "datetimeFormats",
|
|
19232
|
-
editable: false,
|
|
19233
|
-
value: composer.datetimeFormats.value
|
|
19234
|
-
}
|
|
19235
|
-
];
|
|
19236
|
-
state[datetimeFormatsType] = datetimeFormatsStates;
|
|
19237
|
-
const numberFormatsType = "Datetime formats info";
|
|
19238
|
-
const numberFormatsStates = [
|
|
19239
|
-
{
|
|
19240
|
-
type: numberFormatsType,
|
|
19241
|
-
key: "numberFormats",
|
|
19242
|
-
editable: false,
|
|
19243
|
-
value: composer.numberFormats.value
|
|
19244
|
-
}
|
|
19245
|
-
];
|
|
19246
|
-
state[numberFormatsType] = numberFormatsStates;
|
|
19247
|
-
}
|
|
19248
|
-
return state;
|
|
19249
|
-
}
|
|
19250
|
-
function addTimelineEvent(event, payload) {
|
|
19251
|
-
if (devtoolsApi) {
|
|
19252
|
-
let groupId;
|
|
19253
|
-
if (payload && "groupId" in payload) {
|
|
19254
|
-
groupId = payload.groupId;
|
|
19255
|
-
delete payload.groupId;
|
|
19256
|
-
}
|
|
19257
|
-
devtoolsApi.addTimelineEvent({
|
|
19258
|
-
layerId: "vue-i18n-timeline",
|
|
19259
|
-
event: {
|
|
19260
|
-
title: event,
|
|
19261
|
-
groupId,
|
|
19262
|
-
time: Date.now(),
|
|
19263
|
-
meta: {},
|
|
19264
|
-
data: payload || {},
|
|
19265
|
-
logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
|
|
19266
|
-
}
|
|
19267
|
-
});
|
|
19268
|
-
}
|
|
19269
|
-
}
|
|
19270
|
-
function editScope(payload, i18n2) {
|
|
19271
|
-
const composer = getComposer$1(payload.nodeId, i18n2);
|
|
19272
|
-
if (composer) {
|
|
19273
|
-
const [field] = payload.path;
|
|
19274
|
-
if (field === "locale" && isString$1(payload.state.value)) {
|
|
19275
|
-
composer.locale.value = payload.state.value;
|
|
19276
|
-
} else if (field === "fallbackLocale" && (isString$1(payload.state.value) || isArray$2(payload.state.value) || isObject$4(payload.state.value))) {
|
|
19277
|
-
composer.fallbackLocale.value = payload.state.value;
|
|
19278
|
-
} else if (field === "inheritLocale" && isBoolean(payload.state.value)) {
|
|
19279
|
-
composer.inheritLocale = payload.state.value;
|
|
19280
|
-
}
|
|
19281
|
-
}
|
|
19282
|
-
}
|
|
19283
20808
|
function defineMixin(vuei18n, composer, i18n2) {
|
|
19284
20809
|
return {
|
|
19285
20810
|
beforeCreate() {
|
|
19286
|
-
const instance = getCurrentInstance();
|
|
20811
|
+
const instance = vue.getCurrentInstance();
|
|
19287
20812
|
if (!instance) {
|
|
19288
20813
|
throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
|
|
19289
20814
|
}
|
|
@@ -19327,30 +20852,12 @@ function defineMixin(vuei18n, composer, i18n2) {
|
|
|
19327
20852
|
this.$tm = (key) => this.$i18n.tm(key);
|
|
19328
20853
|
},
|
|
19329
20854
|
mounted() {
|
|
19330
|
-
if (this.$el && this.$i18n) {
|
|
19331
|
-
this.$el.__VUE_I18N__ = this.$i18n.__composer;
|
|
19332
|
-
const emitter = this.__v_emitter = createEmitter();
|
|
19333
|
-
const _vueI18n = this.$i18n;
|
|
19334
|
-
_vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
|
|
19335
|
-
emitter.on("*", addTimelineEvent);
|
|
19336
|
-
}
|
|
19337
20855
|
},
|
|
19338
20856
|
unmounted() {
|
|
19339
|
-
const instance = getCurrentInstance();
|
|
20857
|
+
const instance = vue.getCurrentInstance();
|
|
19340
20858
|
if (!instance) {
|
|
19341
20859
|
throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
|
|
19342
20860
|
}
|
|
19343
|
-
if (this.$el && this.$el.__VUE_I18N__) {
|
|
19344
|
-
if (this.__v_emitter) {
|
|
19345
|
-
this.__v_emitter.off("*", addTimelineEvent);
|
|
19346
|
-
delete this.__v_emitter;
|
|
19347
|
-
}
|
|
19348
|
-
if (this.$i18n) {
|
|
19349
|
-
const _vueI18n = this.$i18n;
|
|
19350
|
-
_vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
|
|
19351
|
-
delete this.$el.__VUE_I18N__;
|
|
19352
|
-
}
|
|
19353
|
-
}
|
|
19354
20861
|
delete this.$t;
|
|
19355
20862
|
delete this.$rt;
|
|
19356
20863
|
delete this.$tc;
|
|
@@ -19388,14 +20895,14 @@ function mergeToRoot(root, options) {
|
|
|
19388
20895
|
}
|
|
19389
20896
|
return root;
|
|
19390
20897
|
}
|
|
19391
|
-
const I18nInjectionKey = /* @__PURE__ */ makeSymbol("global-vue-i18n");
|
|
20898
|
+
const I18nInjectionKey = /* @__PURE__ */ shared.makeSymbol("global-vue-i18n");
|
|
19392
20899
|
function createI18n(options = {}, VueI18nLegacy) {
|
|
19393
|
-
const __legacyMode =
|
|
19394
|
-
const __globalInjection = isBoolean(options.globalInjection) ? options.globalInjection : true;
|
|
19395
|
-
const __allowComposition =
|
|
20900
|
+
const __legacyMode = shared.isBoolean(options.legacy) ? options.legacy : true;
|
|
20901
|
+
const __globalInjection = shared.isBoolean(options.globalInjection) ? options.globalInjection : true;
|
|
20902
|
+
const __allowComposition = __legacyMode ? !!options.allowComposition : true;
|
|
19396
20903
|
const __instances = /* @__PURE__ */ new Map();
|
|
19397
20904
|
const [globalScope, __global] = createGlobal(options, __legacyMode);
|
|
19398
|
-
const symbol = makeSymbol("vue-i18n");
|
|
20905
|
+
const symbol = shared.makeSymbol("vue-i18n");
|
|
19399
20906
|
function __getInstance(component) {
|
|
19400
20907
|
return __instances.get(component) || null;
|
|
19401
20908
|
}
|
|
@@ -19408,24 +20915,21 @@ function createI18n(options = {}, VueI18nLegacy) {
|
|
|
19408
20915
|
{
|
|
19409
20916
|
const i18n2 = {
|
|
19410
20917
|
get mode() {
|
|
19411
|
-
return
|
|
20918
|
+
return __legacyMode ? "legacy" : "composition";
|
|
19412
20919
|
},
|
|
19413
20920
|
get allowComposition() {
|
|
19414
20921
|
return __allowComposition;
|
|
19415
20922
|
},
|
|
19416
20923
|
async install(app, ...options2) {
|
|
19417
|
-
{
|
|
19418
|
-
app.__VUE_I18N__ = i18n2;
|
|
19419
|
-
}
|
|
19420
20924
|
app.__VUE_I18N_SYMBOL__ = symbol;
|
|
19421
20925
|
app.provide(app.__VUE_I18N_SYMBOL__, i18n2);
|
|
19422
20926
|
if (!__legacyMode && __globalInjection) {
|
|
19423
20927
|
injectGlobalFields(app, i18n2.global);
|
|
19424
20928
|
}
|
|
19425
|
-
|
|
20929
|
+
{
|
|
19426
20930
|
apply(app, i18n2, ...options2);
|
|
19427
20931
|
}
|
|
19428
|
-
if (
|
|
20932
|
+
if (__legacyMode) {
|
|
19429
20933
|
app.mixin(defineMixin(__global, __global.__composer, i18n2));
|
|
19430
20934
|
}
|
|
19431
20935
|
const unmountApp = app.unmount;
|
|
@@ -19433,21 +20937,6 @@ function createI18n(options = {}, VueI18nLegacy) {
|
|
|
19433
20937
|
i18n2.dispose();
|
|
19434
20938
|
unmountApp();
|
|
19435
20939
|
};
|
|
19436
|
-
{
|
|
19437
|
-
const ret = await enableDevTools(app, i18n2);
|
|
19438
|
-
if (!ret) {
|
|
19439
|
-
throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
19440
|
-
}
|
|
19441
|
-
const emitter = createEmitter();
|
|
19442
|
-
if (__legacyMode) {
|
|
19443
|
-
const _vueI18n = __global;
|
|
19444
|
-
_vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
|
|
19445
|
-
} else {
|
|
19446
|
-
const _composer = __global;
|
|
19447
|
-
_composer[EnableEmitter] && _composer[EnableEmitter](emitter);
|
|
19448
|
-
}
|
|
19449
|
-
emitter.on("*", addTimelineEvent);
|
|
19450
|
-
}
|
|
19451
20940
|
},
|
|
19452
20941
|
get global() {
|
|
19453
20942
|
return __global;
|
|
@@ -19464,7 +20953,7 @@ function createI18n(options = {}, VueI18nLegacy) {
|
|
|
19464
20953
|
}
|
|
19465
20954
|
}
|
|
19466
20955
|
function useI18n(options = {}) {
|
|
19467
|
-
const instance = getCurrentInstance();
|
|
20956
|
+
const instance = vue.getCurrentInstance();
|
|
19468
20957
|
if (instance == null) {
|
|
19469
20958
|
throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);
|
|
19470
20959
|
}
|
|
@@ -19475,7 +20964,7 @@ function useI18n(options = {}) {
|
|
|
19475
20964
|
const global2 = getGlobalComposer(i18n2);
|
|
19476
20965
|
const componentOptions = getComponentOptions(instance);
|
|
19477
20966
|
const scope = getScope(options, componentOptions);
|
|
19478
|
-
|
|
20967
|
+
{
|
|
19479
20968
|
if (i18n2.mode === "legacy" && !options.__useComponent) {
|
|
19480
20969
|
if (!i18n2.allowComposition) {
|
|
19481
20970
|
throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);
|
|
@@ -19491,7 +20980,7 @@ function useI18n(options = {}) {
|
|
|
19491
20980
|
let composer2 = getComposer(i18n2, instance, options.__useComponent);
|
|
19492
20981
|
if (composer2 == null) {
|
|
19493
20982
|
{
|
|
19494
|
-
warn
|
|
20983
|
+
shared.warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));
|
|
19495
20984
|
}
|
|
19496
20985
|
composer2 = global2;
|
|
19497
20986
|
}
|
|
@@ -19500,7 +20989,7 @@ function useI18n(options = {}) {
|
|
|
19500
20989
|
const i18nInternal = i18n2;
|
|
19501
20990
|
let composer = i18nInternal.__getInstance(instance);
|
|
19502
20991
|
if (composer == null) {
|
|
19503
|
-
const composerOptions = assign({}, options);
|
|
20992
|
+
const composerOptions = shared.assign({}, options);
|
|
19504
20993
|
if ("__i18n" in componentOptions) {
|
|
19505
20994
|
composerOptions.__i18n = componentOptions.__i18n;
|
|
19506
20995
|
}
|
|
@@ -19508,15 +20997,21 @@ function useI18n(options = {}) {
|
|
|
19508
20997
|
composerOptions.__root = global2;
|
|
19509
20998
|
}
|
|
19510
20999
|
composer = createComposer(composerOptions);
|
|
19511
|
-
setupLifeCycle(i18nInternal, instance
|
|
21000
|
+
setupLifeCycle(i18nInternal, instance);
|
|
19512
21001
|
i18nInternal.__setInstance(instance, composer);
|
|
19513
21002
|
}
|
|
19514
21003
|
return composer;
|
|
19515
21004
|
}
|
|
21005
|
+
const castToVueI18n = (i18n2) => {
|
|
21006
|
+
if (!(__VUE_I18N_BRIDGE__ in i18n2)) {
|
|
21007
|
+
throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);
|
|
21008
|
+
}
|
|
21009
|
+
return i18n2;
|
|
21010
|
+
};
|
|
19516
21011
|
function createGlobal(options, legacyMode, VueI18nLegacy) {
|
|
19517
|
-
const scope = effectScope();
|
|
21012
|
+
const scope = vue.effectScope();
|
|
19518
21013
|
{
|
|
19519
|
-
const obj =
|
|
21014
|
+
const obj = legacyMode ? scope.run(() => createVueI18n(options)) : scope.run(() => createComposer(options));
|
|
19520
21015
|
if (obj == null) {
|
|
19521
21016
|
throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
|
|
19522
21017
|
}
|
|
@@ -19525,7 +21020,7 @@ function createGlobal(options, legacyMode, VueI18nLegacy) {
|
|
|
19525
21020
|
}
|
|
19526
21021
|
function getI18nInstance(instance) {
|
|
19527
21022
|
{
|
|
19528
|
-
const i18n2 = inject(!instance.isCE ? instance.appContext.app.__VUE_I18N_SYMBOL__ : I18nInjectionKey);
|
|
21023
|
+
const i18n2 = vue.inject(!instance.isCE ? instance.appContext.app.__VUE_I18N_SYMBOL__ : I18nInjectionKey);
|
|
19529
21024
|
if (!i18n2) {
|
|
19530
21025
|
throw createI18nError(!instance.isCE ? I18nErrorCodes.UNEXPECTED_ERROR : I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE);
|
|
19531
21026
|
}
|
|
@@ -19533,7 +21028,7 @@ function getI18nInstance(instance) {
|
|
|
19533
21028
|
}
|
|
19534
21029
|
}
|
|
19535
21030
|
function getScope(options, componentOptions) {
|
|
19536
|
-
return isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
|
|
21031
|
+
return shared.isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
|
|
19537
21032
|
}
|
|
19538
21033
|
function getGlobalComposer(i18n2) {
|
|
19539
21034
|
return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
|
|
@@ -19547,7 +21042,7 @@ function getComposer(i18n2, target, useComponent = false) {
|
|
|
19547
21042
|
if (i18n2.mode === "composition") {
|
|
19548
21043
|
composer = i18nInternal.__getInstance(current);
|
|
19549
21044
|
} else {
|
|
19550
|
-
|
|
21045
|
+
{
|
|
19551
21046
|
const vueI18n = i18nInternal.__getInstance(current);
|
|
19552
21047
|
if (vueI18n != null) {
|
|
19553
21048
|
composer = vueI18n.__composer;
|
|
@@ -19568,53 +21063,39 @@ function getComposer(i18n2, target, useComponent = false) {
|
|
|
19568
21063
|
return composer;
|
|
19569
21064
|
}
|
|
19570
21065
|
function setupLifeCycle(i18n2, target, composer) {
|
|
19571
|
-
let emitter = null;
|
|
19572
21066
|
{
|
|
19573
|
-
onMounted(() => {
|
|
19574
|
-
if (target.vnode.el) {
|
|
19575
|
-
target.vnode.el.__VUE_I18N__ = composer;
|
|
19576
|
-
emitter = createEmitter();
|
|
19577
|
-
const _composer = composer;
|
|
19578
|
-
_composer[EnableEmitter] && _composer[EnableEmitter](emitter);
|
|
19579
|
-
emitter.on("*", addTimelineEvent);
|
|
19580
|
-
}
|
|
21067
|
+
vue.onMounted(() => {
|
|
19581
21068
|
}, target);
|
|
19582
|
-
onUnmounted(() => {
|
|
19583
|
-
if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
|
|
19584
|
-
emitter && emitter.off("*", addTimelineEvent);
|
|
19585
|
-
const _composer = composer;
|
|
19586
|
-
_composer[DisableEmitter] && _composer[DisableEmitter]();
|
|
19587
|
-
delete target.vnode.el.__VUE_I18N__;
|
|
19588
|
-
}
|
|
21069
|
+
vue.onUnmounted(() => {
|
|
19589
21070
|
i18n2.__deleteInstance(target);
|
|
19590
21071
|
}, target);
|
|
19591
21072
|
}
|
|
19592
21073
|
}
|
|
19593
21074
|
function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
19594
21075
|
const isLocale = scope === "local";
|
|
19595
|
-
const _composer = shallowRef(null);
|
|
21076
|
+
const _composer = vue.shallowRef(null);
|
|
19596
21077
|
if (isLocale && instance.proxy && !(instance.proxy.$options.i18n || instance.proxy.$options.__i18n)) {
|
|
19597
21078
|
throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);
|
|
19598
21079
|
}
|
|
19599
|
-
const _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
|
|
19600
|
-
const _locale = ref(
|
|
19601
|
-
isLocale && _inheritLocale ? root.locale.value : isString
|
|
21080
|
+
const _inheritLocale = shared.isBoolean(options.inheritLocale) ? options.inheritLocale : true;
|
|
21081
|
+
const _locale = vue.ref(
|
|
21082
|
+
isLocale && _inheritLocale ? root.locale.value : shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE
|
|
19602
21083
|
);
|
|
19603
|
-
const _fallbackLocale = ref(
|
|
19604
|
-
isLocale && _inheritLocale ? root.fallbackLocale.value : isString
|
|
21084
|
+
const _fallbackLocale = vue.ref(
|
|
21085
|
+
isLocale && _inheritLocale ? root.fallbackLocale.value : shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
|
|
19605
21086
|
);
|
|
19606
|
-
const _messages = ref(getLocaleMessages(_locale.value, options));
|
|
19607
|
-
const _datetimeFormats = ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
|
|
19608
|
-
const _numberFormats = ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
|
|
19609
|
-
const _missingWarn = isLocale ? root.missingWarn : isBoolean(options.missingWarn) || isRegExp
|
|
19610
|
-
const _fallbackWarn = isLocale ? root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp
|
|
19611
|
-
const _fallbackRoot = isLocale ? root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
21087
|
+
const _messages = vue.ref(getLocaleMessages(_locale.value, options));
|
|
21088
|
+
const _datetimeFormats = vue.ref(shared.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
|
|
21089
|
+
const _numberFormats = vue.ref(shared.isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
|
|
21090
|
+
const _missingWarn = isLocale ? root.missingWarn : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn) ? options.missingWarn : true;
|
|
21091
|
+
const _fallbackWarn = isLocale ? root.fallbackWarn : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
|
|
21092
|
+
const _fallbackRoot = isLocale ? root.fallbackRoot : shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
|
|
19612
21093
|
const _fallbackFormat = !!options.fallbackFormat;
|
|
19613
|
-
const _missing = isFunction
|
|
19614
|
-
const _postTranslation = isFunction
|
|
19615
|
-
const _warnHtmlMessage = isLocale ? root.warnHtmlMessage : isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
21094
|
+
const _missing = shared.isFunction(options.missing) ? options.missing : null;
|
|
21095
|
+
const _postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : null;
|
|
21096
|
+
const _warnHtmlMessage = isLocale ? root.warnHtmlMessage : shared.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
|
|
19616
21097
|
const _escapeParameter = !!options.escapeParameter;
|
|
19617
|
-
const _modifiers = isLocale ? root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
21098
|
+
const _modifiers = isLocale ? root.modifiers : shared.isPlainObject(options.modifiers) ? options.modifiers : {};
|
|
19618
21099
|
const _pluralRules = options.pluralRules || isLocale && root.pluralRules;
|
|
19619
21100
|
function trackReactivityValues() {
|
|
19620
21101
|
return [
|
|
@@ -19625,7 +21106,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
19625
21106
|
_numberFormats.value
|
|
19626
21107
|
];
|
|
19627
21108
|
}
|
|
19628
|
-
const locale2 = computed({
|
|
21109
|
+
const locale2 = vue.computed({
|
|
19629
21110
|
get: () => {
|
|
19630
21111
|
return _composer.value ? _composer.value.locale.value : _locale.value;
|
|
19631
21112
|
},
|
|
@@ -19636,7 +21117,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
19636
21117
|
_locale.value = val;
|
|
19637
21118
|
}
|
|
19638
21119
|
});
|
|
19639
|
-
const fallbackLocale = computed({
|
|
21120
|
+
const fallbackLocale = vue.computed({
|
|
19640
21121
|
get: () => {
|
|
19641
21122
|
return _composer.value ? _composer.value.fallbackLocale.value : _fallbackLocale.value;
|
|
19642
21123
|
},
|
|
@@ -19647,15 +21128,15 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
19647
21128
|
_fallbackLocale.value = val;
|
|
19648
21129
|
}
|
|
19649
21130
|
});
|
|
19650
|
-
const messages = computed(() => {
|
|
21131
|
+
const messages = vue.computed(() => {
|
|
19651
21132
|
if (_composer.value) {
|
|
19652
21133
|
return _composer.value.messages.value;
|
|
19653
21134
|
} else {
|
|
19654
21135
|
return _messages.value;
|
|
19655
21136
|
}
|
|
19656
21137
|
});
|
|
19657
|
-
const datetimeFormats = computed(() => _datetimeFormats.value);
|
|
19658
|
-
const numberFormats = computed(() => _numberFormats.value);
|
|
21138
|
+
const datetimeFormats = vue.computed(() => _datetimeFormats.value);
|
|
21139
|
+
const numberFormats = vue.computed(() => _numberFormats.value);
|
|
19659
21140
|
function getPostTranslationHandler() {
|
|
19660
21141
|
return _composer.value ? _composer.value.getPostTranslationHandler() : _postTranslation;
|
|
19661
21142
|
}
|
|
@@ -19852,7 +21333,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
|
|
|
19852
21333
|
composer.missingWarn = _missingWarn;
|
|
19853
21334
|
composer.warnHtmlMessage = _warnHtmlMessage;
|
|
19854
21335
|
}
|
|
19855
|
-
onBeforeMount(() => {
|
|
21336
|
+
vue.onBeforeMount(() => {
|
|
19856
21337
|
if (instance.proxy == null || instance.proxy.$i18n == null) {
|
|
19857
21338
|
throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);
|
|
19858
21339
|
}
|
|
@@ -19882,7 +21363,7 @@ function injectGlobalFields(app, composer) {
|
|
|
19882
21363
|
if (!desc) {
|
|
19883
21364
|
throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
|
|
19884
21365
|
}
|
|
19885
|
-
const wrap = isRef(desc.value) ? {
|
|
21366
|
+
const wrap = vue.isRef(desc.value) ? {
|
|
19886
21367
|
get() {
|
|
19887
21368
|
return desc.value.value;
|
|
19888
21369
|
},
|
|
@@ -19905,18 +21386,24 @@ function injectGlobalFields(app, composer) {
|
|
|
19905
21386
|
Object.defineProperty(app.config.globalProperties, `$${method}`, desc);
|
|
19906
21387
|
});
|
|
19907
21388
|
}
|
|
19908
|
-
registerMessageCompiler(compileToFunction);
|
|
19909
|
-
registerMessageResolver(resolveValue);
|
|
19910
|
-
registerLocaleFallbacker(fallbackWithLocaleChain);
|
|
19911
|
-
{
|
|
19912
|
-
initFeatureFlags();
|
|
19913
|
-
}
|
|
21389
|
+
coreBase.registerMessageCompiler(coreBase.compileToFunction);
|
|
21390
|
+
coreBase.registerMessageResolver(coreBase.resolveValue);
|
|
21391
|
+
coreBase.registerLocaleFallbacker(coreBase.fallbackWithLocaleChain);
|
|
19914
21392
|
{
|
|
19915
|
-
const target = getGlobalThis();
|
|
21393
|
+
const target = shared.getGlobalThis();
|
|
19916
21394
|
target.__INTLIFY__ = true;
|
|
19917
|
-
setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
19918
|
-
}
|
|
19919
|
-
|
|
21395
|
+
coreBase.setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
21396
|
+
}
|
|
21397
|
+
vueI18n_cjs.DatetimeFormat = DatetimeFormat;
|
|
21398
|
+
vueI18n_cjs.I18nInjectionKey = I18nInjectionKey;
|
|
21399
|
+
vueI18n_cjs.NumberFormat = NumberFormat;
|
|
21400
|
+
vueI18n_cjs.Translation = Translation;
|
|
21401
|
+
vueI18n_cjs.VERSION = VERSION;
|
|
21402
|
+
vueI18n_cjs.castToVueI18n = castToVueI18n;
|
|
21403
|
+
var createI18n_1 = vueI18n_cjs.createI18n = createI18n;
|
|
21404
|
+
vueI18n_cjs.useI18n = useI18n;
|
|
21405
|
+
vueI18n_cjs.vTDirective = vTDirective;
|
|
21406
|
+
var i18n$1 = createI18n_1({
|
|
19920
21407
|
allowComposition: true,
|
|
19921
21408
|
globalInjection: true,
|
|
19922
21409
|
fallbackWarn: false,
|
|
@@ -19962,7 +21449,7 @@ var i18n = {
|
|
|
19962
21449
|
},
|
|
19963
21450
|
actions: {
|
|
19964
21451
|
setLocale({ state }, { locale: locale2 = Setting.i18n.default, vm }) {
|
|
19965
|
-
const db2 = util$
|
|
21452
|
+
const db2 = util$8.db.get(
|
|
19966
21453
|
pathInit({
|
|
19967
21454
|
dbName: "database",
|
|
19968
21455
|
path: "",
|
|
@@ -19981,7 +21468,7 @@ var i18n = {
|
|
|
19981
21468
|
},
|
|
19982
21469
|
async load({ state }, app) {
|
|
19983
21470
|
let locale2;
|
|
19984
|
-
const db2 = util$
|
|
21471
|
+
const db2 = util$8.db.get(
|
|
19985
21472
|
pathInit({
|
|
19986
21473
|
dbName: "database",
|
|
19987
21474
|
path: "",
|
|
@@ -20300,8 +21787,8 @@ var log$2 = {
|
|
|
20300
21787
|
time: format$3(new Date(), "yyyy-MM-dd HH:mm:ss"),
|
|
20301
21788
|
meta: {
|
|
20302
21789
|
user: rootState.admin.user.info,
|
|
20303
|
-
uuid: util$
|
|
20304
|
-
token: util$
|
|
21790
|
+
uuid: util$8.cookies.get("uuid"),
|
|
21791
|
+
token: util$8.cookies.get("token"),
|
|
20305
21792
|
url: lodash$1.exports.get(window, "location.href", ""),
|
|
20306
21793
|
...meta
|
|
20307
21794
|
}
|
|
@@ -21258,7 +22745,7 @@ const initRouter = (pages2, routes) => {
|
|
|
21258
22745
|
});
|
|
21259
22746
|
} else {
|
|
21260
22747
|
if (to.matched.some((item) => item.meta.auth)) {
|
|
21261
|
-
const token = util$
|
|
22748
|
+
const token = util$8.cookies.get("token");
|
|
21262
22749
|
if (token && token !== "undefined") {
|
|
21263
22750
|
const permissions = store.getters["admin/menu/permission"];
|
|
21264
22751
|
if (permissions[to.fullPath.substring(1)]) {
|
|
@@ -21373,7 +22860,7 @@ var mixinPage = {
|
|
|
21373
22860
|
return this.apiBaseURL + "api/Attachment/add";
|
|
21374
22861
|
},
|
|
21375
22862
|
uploadHeaders() {
|
|
21376
|
-
const token = util$
|
|
22863
|
+
const token = util$8.cookies.get("token");
|
|
21377
22864
|
return {
|
|
21378
22865
|
Authorization: "Bearer " + token
|
|
21379
22866
|
};
|
|
@@ -33821,7 +35308,7 @@ const _sfc_main$D = {
|
|
|
33821
35308
|
},
|
|
33822
35309
|
computed: {
|
|
33823
35310
|
config() {
|
|
33824
|
-
const token = util$
|
|
35311
|
+
const token = util$8.cookies.get("token");
|
|
33825
35312
|
return {
|
|
33826
35313
|
height: this.height == null ? 500 : this.height,
|
|
33827
35314
|
fileTools_requestHeaders: {
|
|
@@ -47072,7 +48559,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47072
48559
|
var propertyIsEnumerableModule = __webpack_require__("d1e7");
|
|
47073
48560
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
47074
48561
|
var redefine = __webpack_require__("6eeb");
|
|
47075
|
-
var
|
|
48562
|
+
var shared2 = __webpack_require__("5692");
|
|
47076
48563
|
var sharedKey = __webpack_require__("f772");
|
|
47077
48564
|
var hiddenKeys = __webpack_require__("d012");
|
|
47078
48565
|
var uid = __webpack_require__("90e3");
|
|
@@ -47095,11 +48582,11 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47095
48582
|
var nativeDefineProperty = definePropertyModule.f;
|
|
47096
48583
|
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
|
|
47097
48584
|
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
47098
|
-
var AllSymbols =
|
|
47099
|
-
var ObjectPrototypeSymbols =
|
|
47100
|
-
var StringToSymbolRegistry =
|
|
47101
|
-
var SymbolToStringRegistry =
|
|
47102
|
-
var WellKnownSymbolsStore =
|
|
48585
|
+
var AllSymbols = shared2("symbols");
|
|
48586
|
+
var ObjectPrototypeSymbols = shared2("op-symbols");
|
|
48587
|
+
var StringToSymbolRegistry = shared2("string-to-symbol-registry");
|
|
48588
|
+
var SymbolToStringRegistry = shared2("symbol-to-string-registry");
|
|
48589
|
+
var WellKnownSymbolsStore = shared2("wks");
|
|
47103
48590
|
var QObject = global2.QObject;
|
|
47104
48591
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
47105
48592
|
var setSymbolDescriptor = DESCRIPTORS && fails(function() {
|
|
@@ -47128,7 +48615,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47128
48615
|
symbol.description = description;
|
|
47129
48616
|
return symbol;
|
|
47130
48617
|
};
|
|
47131
|
-
var
|
|
48618
|
+
var isSymbol2 = USE_SYMBOL_AS_UID ? function(it) {
|
|
47132
48619
|
return typeof it == "symbol";
|
|
47133
48620
|
} : function(it) {
|
|
47134
48621
|
return Object(it) instanceof $Symbol;
|
|
@@ -47264,7 +48751,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47264
48751
|
return symbol;
|
|
47265
48752
|
},
|
|
47266
48753
|
keyFor: function keyFor(sym) {
|
|
47267
|
-
if (!
|
|
48754
|
+
if (!isSymbol2(sym))
|
|
47268
48755
|
throw TypeError(sym + " is not a symbol");
|
|
47269
48756
|
if (has2(SymbolToStringRegistry, sym))
|
|
47270
48757
|
return SymbolToStringRegistry[sym];
|
|
@@ -47306,13 +48793,13 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47306
48793
|
while (arguments.length > index2)
|
|
47307
48794
|
args.push(arguments[index2++]);
|
|
47308
48795
|
$replacer = replacer;
|
|
47309
|
-
if (!isObject2(replacer) && it === void 0 ||
|
|
48796
|
+
if (!isObject2(replacer) && it === void 0 || isSymbol2(it))
|
|
47310
48797
|
return;
|
|
47311
48798
|
if (!isArray2(replacer))
|
|
47312
48799
|
replacer = function(key, value) {
|
|
47313
48800
|
if (typeof $replacer == "function")
|
|
47314
48801
|
value = $replacer.call(this, key, value);
|
|
47315
|
-
if (!
|
|
48802
|
+
if (!isSymbol2(value))
|
|
47316
48803
|
return value;
|
|
47317
48804
|
};
|
|
47318
48805
|
args[1] = replacer;
|
|
@@ -47490,12 +48977,12 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
47490
48977
|
},
|
|
47491
48978
|
"b622": function(module2, exports2, __webpack_require__) {
|
|
47492
48979
|
var global2 = __webpack_require__("da84");
|
|
47493
|
-
var
|
|
48980
|
+
var shared2 = __webpack_require__("5692");
|
|
47494
48981
|
var has2 = __webpack_require__("5135");
|
|
47495
48982
|
var uid = __webpack_require__("90e3");
|
|
47496
48983
|
var NATIVE_SYMBOL = __webpack_require__("4930");
|
|
47497
48984
|
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
|
|
47498
|
-
var WellKnownSymbolsStore =
|
|
48985
|
+
var WellKnownSymbolsStore = shared2("wks");
|
|
47499
48986
|
var Symbol2 = global2.Symbol;
|
|
47500
48987
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
|
|
47501
48988
|
module2.exports = function(name) {
|
|
@@ -48194,9 +49681,9 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
48194
49681
|
};
|
|
48195
49682
|
},
|
|
48196
49683
|
"f772": function(module2, exports2, __webpack_require__) {
|
|
48197
|
-
var
|
|
49684
|
+
var shared2 = __webpack_require__("5692");
|
|
48198
49685
|
var uid = __webpack_require__("90e3");
|
|
48199
|
-
var keys2 =
|
|
49686
|
+
var keys2 = shared2("keys");
|
|
48200
49687
|
module2.exports = function(key) {
|
|
48201
49688
|
return keys2[key] || (keys2[key] = uid(key));
|
|
48202
49689
|
};
|
|
@@ -84506,10 +85993,10 @@ var SVGPainter = function() {
|
|
|
84506
85993
|
}
|
|
84507
85994
|
this._oldVNode = null;
|
|
84508
85995
|
};
|
|
84509
|
-
SVGPainter2.prototype.toDataURL = function(
|
|
85996
|
+
SVGPainter2.prototype.toDataURL = function(base642) {
|
|
84510
85997
|
var str = this.renderToString();
|
|
84511
85998
|
var prefix2 = "data:image/svg+xml;";
|
|
84512
|
-
if (
|
|
85999
|
+
if (base642) {
|
|
84513
86000
|
str = encodeBase64(str);
|
|
84514
86001
|
return str && prefix2 + "base64," + str;
|
|
84515
86002
|
}
|
|
@@ -125854,4 +127341,4 @@ const created = async (app, routes, files2) => {
|
|
|
125854
127341
|
store.dispatch("admin/account/load");
|
|
125855
127342
|
app.config.globalProperties.$pages = pages;
|
|
125856
127343
|
};
|
|
125857
|
-
export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request, router$1 as router, Setting as setting, store, taskApi, util$
|
|
127344
|
+
export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request, router$1 as router, Setting as setting, store, taskApi, util$8 as util };
|