@ohif/app 3.14.0-beta.37 → 3.14.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{1284.bundle.037ad04e.js → 1284.bundle.a489bd1d.js} +1 -1
- package/dist/{1568.bundle.d0ef69c3.js → 1568.bundle.64bca1c8.js} +6 -6
- package/dist/{1645.bundle.f8dbffd7.js → 1645.bundle.65cff869.js} +2 -2
- package/dist/{3465.bundle.eaebe5d9.js → 1724.bundle.b4757283.js} +29 -115
- package/dist/{1895.bundle.b0a2902c.js → 1895.bundle.4b452681.js} +4 -4
- package/dist/{2478.bundle.73d4b52c.js → 2478.bundle.e3049512.js} +2 -2
- package/dist/{2894.bundle.4b23283a.js → 2894.bundle.d612efb2.js} +2 -2
- package/dist/{2991.bundle.ae5cf321.js → 2991.bundle.ac7aa56c.js} +2 -2
- package/dist/{3004.bundle.645ab782.js → 3004.bundle.bd170f24.js} +3 -3
- package/dist/{3255.bundle.db3a8e33.js → 3255.bundle.13e205ac.js} +2 -2
- package/dist/{3468.bundle.89ef8e85.js → 3468.bundle.6a84fef1.js} +2 -2
- package/dist/{347.bundle.9a18d379.js → 347.bundle.25158724.js} +6 -6
- package/dist/{3763.bundle.95841727.js → 3474.bundle.aaec7b9f.js} +22 -13
- package/dist/{3622.bundle.a1e9521b.js → 3622.bundle.f4cf2d16.js} +2 -2
- package/dist/{4004.bundle.46cc94b3.js → 4004.bundle.da822fd2.js} +1 -1
- package/dist/{7487.bundle.0190eb57.js → 4324.bundle.8645d6b4.js} +769 -936
- package/dist/{4426.bundle.d0ba0109.js → 4426.bundle.a924350c.js} +12 -12
- package/dist/{4606.bundle.1dce436b.js → 4606.bundle.25513ce9.js} +1 -1
- package/dist/{230.bundle.92899e1b.js → 5383.bundle.d393d2f5.js} +33 -42
- package/dist/{5895.bundle.6d7af3aa.js → 5895.bundle.b4892e1b.js} +1 -1
- package/dist/{6212.bundle.41d8896e.js → 6212.bundle.62bb3701.js} +2 -2
- package/dist/{7526.bundle.d736148f.js → 7526.bundle.dcbd9c10.js} +4 -4
- package/dist/{8788.bundle.169cbc6c.js → 8788.bundle.4bb4c65b.js} +2 -2
- package/dist/{9481.bundle.0a9a6f81.js → 9481.bundle.4d5eb37b.js} +2 -2
- package/dist/{7151.bundle.0b419a14.js → 9589.bundle.5650b7c4.js} +42 -92
- package/dist/{9841.bundle.4b9afba9.js → 9841.bundle.74186de7.js} +2 -2
- package/dist/{9892.bundle.1cc411a9.js → 9892.bundle.242557da.js} +3 -3
- package/dist/{app.bundle.d1c78ee9.js → app.bundle.b7b6f03d.js} +59 -59
- package/dist/{compute.bundle.52c8efdd.js → compute.bundle.caab94e6.js} +3 -3
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.db7e72cd.js → polySeg.bundle.34a58c4f.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["rspackChunk_ohif_app"] ||= []).push([[
|
|
1
|
+
(globalThis["rspackChunk_ohif_app"] ||= []).push([[4324], {
|
|
2
2
|
32602(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
3
3
|
"use strict";
|
|
4
4
|
/* import */ var react__rspack_import_0 = __webpack_require__(14041);
|
|
@@ -40440,77 +40440,11 @@ module.exports["default"] = main;
|
|
|
40440
40440
|
|
|
40441
40441
|
|
|
40442
40442
|
},
|
|
40443
|
-
|
|
40443
|
+
86137(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
40444
40444
|
"use strict";
|
|
40445
|
-
|
|
40446
|
-
|
|
40447
|
-
__webpack_require__
|
|
40448
|
-
A: () => (/* binding */ i18nextLocizeBackend)
|
|
40449
|
-
});
|
|
40450
|
-
|
|
40451
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
40452
|
-
function _typeof(o) {
|
|
40453
|
-
"@babel/helpers - typeof";
|
|
40454
|
-
|
|
40455
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
40456
|
-
return typeof o;
|
|
40457
|
-
} : function (o) {
|
|
40458
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
40459
|
-
}, _typeof(o);
|
|
40460
|
-
}
|
|
40461
|
-
|
|
40462
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
40463
|
-
|
|
40464
|
-
function toPrimitive(t, r) {
|
|
40465
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
40466
|
-
var e = t[Symbol.toPrimitive];
|
|
40467
|
-
if (void 0 !== e) {
|
|
40468
|
-
var i = e.call(t, r || "default");
|
|
40469
|
-
if ("object" != _typeof(i)) return i;
|
|
40470
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
40471
|
-
}
|
|
40472
|
-
return ("string" === r ? String : Number)(t);
|
|
40473
|
-
}
|
|
40474
|
-
|
|
40475
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
40476
|
-
|
|
40477
|
-
|
|
40478
|
-
function toPropertyKey(t) {
|
|
40479
|
-
var i = toPrimitive(t, "string");
|
|
40480
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
40481
|
-
}
|
|
40482
|
-
|
|
40483
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
40484
|
-
|
|
40485
|
-
function _defineProperty(e, r, t) {
|
|
40486
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
40487
|
-
value: t,
|
|
40488
|
-
enumerable: !0,
|
|
40489
|
-
configurable: !0,
|
|
40490
|
-
writable: !0
|
|
40491
|
-
}) : e[r] = t, e;
|
|
40492
|
-
}
|
|
40493
|
-
|
|
40494
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
40495
|
-
function _classCallCheck(a, n) {
|
|
40496
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
40497
|
-
}
|
|
40498
|
-
|
|
40499
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
40500
|
-
|
|
40501
|
-
function _defineProperties(e, r) {
|
|
40502
|
-
for (var t = 0; t < r.length; t++) {
|
|
40503
|
-
var o = r[t];
|
|
40504
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
40505
|
-
}
|
|
40506
|
-
}
|
|
40507
|
-
function _createClass(e, r, t) {
|
|
40508
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
40509
|
-
writable: !1
|
|
40510
|
-
}), e;
|
|
40511
|
-
}
|
|
40512
|
-
|
|
40513
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next-locize-backend/dist/esm/i18nextLocizeBackend.js
|
|
40445
|
+
/* import */ var _babel_runtime_helpers_esm_defineProperty__rspack_import_0 = __webpack_require__(24586);
|
|
40446
|
+
/* import */ var _babel_runtime_helpers_esm_classCallCheck__rspack_import_1 = __webpack_require__(55152);
|
|
40447
|
+
/* import */ var _babel_runtime_helpers_esm_createClass__rspack_import_2 = __webpack_require__(30414);
|
|
40514
40448
|
|
|
40515
40449
|
|
|
40516
40450
|
|
|
@@ -40620,7 +40554,7 @@ function isMissingOption(obj, props) {
|
|
|
40620
40554
|
|
|
40621
40555
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
40622
40556
|
|
|
40623
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) {
|
|
40557
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_esm_defineProperty__rspack_import_0/* ["default"] */.A)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
40624
40558
|
|
|
40625
40559
|
function ajax(url, options, callback, data, cache) {
|
|
40626
40560
|
try {
|
|
@@ -40671,11 +40605,11 @@ function getDefaults() {
|
|
|
40671
40605
|
};
|
|
40672
40606
|
}
|
|
40673
40607
|
|
|
40674
|
-
var
|
|
40608
|
+
var I18NextLocizeBackend =
|
|
40675
40609
|
/*#__PURE__*/
|
|
40676
40610
|
function () {
|
|
40677
40611
|
function I18NextLocizeBackend(services, options, callback) {
|
|
40678
|
-
|
|
40612
|
+
(0,_babel_runtime_helpers_esm_classCallCheck__rspack_import_1/* ["default"] */.A)(this, I18NextLocizeBackend);
|
|
40679
40613
|
|
|
40680
40614
|
if (services && services.projectId) {
|
|
40681
40615
|
this.init(null, services, {}, options);
|
|
@@ -40686,7 +40620,7 @@ function () {
|
|
|
40686
40620
|
this.type = 'backend';
|
|
40687
40621
|
}
|
|
40688
40622
|
|
|
40689
|
-
|
|
40623
|
+
(0,_babel_runtime_helpers_esm_createClass__rspack_import_2/* ["default"] */.A)(I18NextLocizeBackend, [{
|
|
40690
40624
|
key: "init",
|
|
40691
40625
|
value: function init(services) {
|
|
40692
40626
|
var _this = this;
|
|
@@ -40990,13 +40924,13 @@ function () {
|
|
|
40990
40924
|
return I18NextLocizeBackend;
|
|
40991
40925
|
}();
|
|
40992
40926
|
|
|
40993
|
-
|
|
40927
|
+
I18NextLocizeBackend.type = 'backend';
|
|
40994
40928
|
|
|
40995
|
-
/* export default */
|
|
40929
|
+
/* export default */ __webpack_exports__.A = (I18NextLocizeBackend);
|
|
40996
40930
|
|
|
40997
40931
|
|
|
40998
40932
|
},
|
|
40999
|
-
|
|
40933
|
+
96392(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
41000
40934
|
"use strict";
|
|
41001
40935
|
|
|
41002
40936
|
// EXPORTS
|
|
@@ -41004,113 +40938,35 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
41004
40938
|
A: () => (/* binding */ esm_i18next)
|
|
41005
40939
|
});
|
|
41006
40940
|
|
|
41007
|
-
|
|
41008
|
-
|
|
41009
|
-
|
|
41010
|
-
|
|
41011
|
-
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
41019
|
-
|
|
41020
|
-
function toPrimitive(t, r) {
|
|
41021
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
41022
|
-
var e = t[Symbol.toPrimitive];
|
|
41023
|
-
if (void 0 !== e) {
|
|
41024
|
-
var i = e.call(t, r || "default");
|
|
41025
|
-
if ("object" != _typeof(i)) return i;
|
|
41026
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
41027
|
-
}
|
|
41028
|
-
return ("string" === r ? String : Number)(t);
|
|
41029
|
-
}
|
|
41030
|
-
|
|
41031
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
41032
|
-
|
|
41033
|
-
|
|
41034
|
-
function toPropertyKey(t) {
|
|
41035
|
-
var i = toPrimitive(t, "string");
|
|
41036
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
41037
|
-
}
|
|
41038
|
-
|
|
41039
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
41040
|
-
|
|
41041
|
-
function _defineProperty(e, r, t) {
|
|
41042
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
41043
|
-
value: t,
|
|
41044
|
-
enumerable: !0,
|
|
41045
|
-
configurable: !0,
|
|
41046
|
-
writable: !0
|
|
41047
|
-
}) : e[r] = t, e;
|
|
41048
|
-
}
|
|
41049
|
-
|
|
41050
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/objectSpread.js
|
|
41051
|
-
|
|
41052
|
-
function _objectSpread(e) {
|
|
41053
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
41054
|
-
var t = null != arguments[r] ? Object(arguments[r]) : {},
|
|
41055
|
-
o = Object.keys(t);
|
|
41056
|
-
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) {
|
|
41057
|
-
return Object.getOwnPropertyDescriptor(t, e).enumerable;
|
|
41058
|
-
})), o.forEach(function (r) {
|
|
41059
|
-
_defineProperty(e, r, t[r]);
|
|
41060
|
-
});
|
|
41061
|
-
}
|
|
41062
|
-
return e;
|
|
41063
|
-
}
|
|
41064
|
-
|
|
41065
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
41066
|
-
function _classCallCheck(a, n) {
|
|
41067
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
41068
|
-
}
|
|
41069
|
-
|
|
41070
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
41071
|
-
|
|
41072
|
-
function _defineProperties(e, r) {
|
|
41073
|
-
for (var t = 0; t < r.length; t++) {
|
|
41074
|
-
var o = r[t];
|
|
41075
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
41076
|
-
}
|
|
41077
|
-
}
|
|
41078
|
-
function _createClass(e, r, t) {
|
|
41079
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
41080
|
-
writable: !1
|
|
41081
|
-
}), e;
|
|
41082
|
-
}
|
|
41083
|
-
|
|
41084
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
41085
|
-
function _assertThisInitialized(e) {
|
|
41086
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
41087
|
-
return e;
|
|
41088
|
-
}
|
|
41089
|
-
|
|
41090
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
40941
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
40942
|
+
var esm_typeof = __webpack_require__(17545);
|
|
40943
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectSpread.js
|
|
40944
|
+
var objectSpread = __webpack_require__(6460);
|
|
40945
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
40946
|
+
var classCallCheck = __webpack_require__(55152);
|
|
40947
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
40948
|
+
var createClass = __webpack_require__(30414);
|
|
40949
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
40950
|
+
var assertThisInitialized = __webpack_require__(2474);
|
|
40951
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
41091
40952
|
|
|
41092
40953
|
|
|
41093
40954
|
function _possibleConstructorReturn(t, e) {
|
|
41094
|
-
if (e && ("object" ==
|
|
40955
|
+
if (e && ("object" == (0,esm_typeof/* ["default"] */.A)(e) || "function" == typeof e)) return e;
|
|
41095
40956
|
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
41096
|
-
return
|
|
40957
|
+
return (0,assertThisInitialized/* ["default"] */.A)(t);
|
|
41097
40958
|
}
|
|
41098
40959
|
|
|
41099
|
-
;// CONCATENATED MODULE: ../../node_modules
|
|
40960
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
41100
40961
|
function _getPrototypeOf(t) {
|
|
41101
40962
|
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
41102
40963
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
41103
40964
|
}, _getPrototypeOf(t);
|
|
41104
40965
|
}
|
|
41105
40966
|
|
|
41106
|
-
|
|
41107
|
-
|
|
41108
|
-
|
|
41109
|
-
return t.__proto__ = e, t;
|
|
41110
|
-
}, _setPrototypeOf(t, e);
|
|
41111
|
-
}
|
|
41112
|
-
|
|
41113
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
40967
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
40968
|
+
var setPrototypeOf = __webpack_require__(1087);
|
|
40969
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
41114
40970
|
|
|
41115
40971
|
function _inherits(t, e) {
|
|
41116
40972
|
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -41122,97 +40978,7 @@ function _inherits(t, e) {
|
|
|
41122
40978
|
}
|
|
41123
40979
|
}), Object.defineProperty(t, "prototype", {
|
|
41124
40980
|
writable: !1
|
|
41125
|
-
}), e &&
|
|
41126
|
-
}
|
|
41127
|
-
|
|
41128
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
41129
|
-
function _arrayLikeToArray(r, a) {
|
|
41130
|
-
(null == a || a > r.length) && (a = r.length);
|
|
41131
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
41132
|
-
return n;
|
|
41133
|
-
}
|
|
41134
|
-
|
|
41135
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
|
41136
|
-
|
|
41137
|
-
function _arrayWithoutHoles(r) {
|
|
41138
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
41139
|
-
}
|
|
41140
|
-
|
|
41141
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
|
41142
|
-
function _iterableToArray(r) {
|
|
41143
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
41144
|
-
}
|
|
41145
|
-
|
|
41146
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
41147
|
-
|
|
41148
|
-
function _unsupportedIterableToArray(r, a) {
|
|
41149
|
-
if (r) {
|
|
41150
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
41151
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
41152
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
41153
|
-
}
|
|
41154
|
-
}
|
|
41155
|
-
|
|
41156
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
|
41157
|
-
function _nonIterableSpread() {
|
|
41158
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41159
|
-
}
|
|
41160
|
-
|
|
41161
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
|
41162
|
-
|
|
41163
|
-
|
|
41164
|
-
|
|
41165
|
-
|
|
41166
|
-
function _toConsumableArray(r) {
|
|
41167
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
41168
|
-
}
|
|
41169
|
-
|
|
41170
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
41171
|
-
function _arrayWithHoles(r) {
|
|
41172
|
-
if (Array.isArray(r)) return r;
|
|
41173
|
-
}
|
|
41174
|
-
|
|
41175
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
41176
|
-
function _iterableToArrayLimit(r, l) {
|
|
41177
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
41178
|
-
if (null != t) {
|
|
41179
|
-
var e,
|
|
41180
|
-
n,
|
|
41181
|
-
i,
|
|
41182
|
-
u,
|
|
41183
|
-
a = [],
|
|
41184
|
-
f = !0,
|
|
41185
|
-
o = !1;
|
|
41186
|
-
try {
|
|
41187
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
41188
|
-
if (Object(t) !== t) return;
|
|
41189
|
-
f = !1;
|
|
41190
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
41191
|
-
} catch (r) {
|
|
41192
|
-
o = !0, n = r;
|
|
41193
|
-
} finally {
|
|
41194
|
-
try {
|
|
41195
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
41196
|
-
} finally {
|
|
41197
|
-
if (o) throw n;
|
|
41198
|
-
}
|
|
41199
|
-
}
|
|
41200
|
-
return a;
|
|
41201
|
-
}
|
|
41202
|
-
}
|
|
41203
|
-
|
|
41204
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
41205
|
-
function _nonIterableRest() {
|
|
41206
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41207
|
-
}
|
|
41208
|
-
|
|
41209
|
-
;// CONCATENATED MODULE: ../../node_modules/i18next/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
41210
|
-
|
|
41211
|
-
|
|
41212
|
-
|
|
41213
|
-
|
|
41214
|
-
function _slicedToArray(r, e) {
|
|
41215
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
40981
|
+
}), e && (0,setPrototypeOf/* ["default"] */.A)(t, e);
|
|
41216
40982
|
}
|
|
41217
40983
|
|
|
41218
40984
|
;// CONCATENATED MODULE: ../../node_modules/i18next/dist/esm/i18next.js
|
|
@@ -41225,8 +40991,6 @@ function _slicedToArray(r, e) {
|
|
|
41225
40991
|
|
|
41226
40992
|
|
|
41227
40993
|
|
|
41228
|
-
|
|
41229
|
-
|
|
41230
40994
|
var consoleLogger = {
|
|
41231
40995
|
type: 'logger',
|
|
41232
40996
|
log: function log(args) {
|
|
@@ -41239,25 +41003,20 @@ var consoleLogger = {
|
|
|
41239
41003
|
this.output('error', args);
|
|
41240
41004
|
},
|
|
41241
41005
|
output: function output(type, args) {
|
|
41242
|
-
|
|
41243
|
-
|
|
41244
|
-
/* eslint no-console: 0 */
|
|
41245
|
-
if (console && console[type]) (_console = console)[type].apply(_console, _toConsumableArray(args));
|
|
41006
|
+
if (console && console[type]) console[type].apply(console, args);
|
|
41246
41007
|
}
|
|
41247
41008
|
};
|
|
41248
41009
|
|
|
41249
|
-
var i18next_Logger =
|
|
41250
|
-
/*#__PURE__*/
|
|
41251
|
-
function () {
|
|
41010
|
+
var i18next_Logger = function () {
|
|
41252
41011
|
function Logger(concreteLogger) {
|
|
41253
41012
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41254
41013
|
|
|
41255
|
-
|
|
41014
|
+
(0,classCallCheck/* ["default"] */.A)(this, Logger);
|
|
41256
41015
|
|
|
41257
41016
|
this.init(concreteLogger, options);
|
|
41258
41017
|
}
|
|
41259
41018
|
|
|
41260
|
-
|
|
41019
|
+
(0,createClass/* ["default"] */.A)(Logger, [{
|
|
41261
41020
|
key: "init",
|
|
41262
41021
|
value: function init(concreteLogger) {
|
|
41263
41022
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -41317,7 +41076,7 @@ function () {
|
|
|
41317
41076
|
}, {
|
|
41318
41077
|
key: "create",
|
|
41319
41078
|
value: function create(moduleName) {
|
|
41320
|
-
return new Logger(this.logger,
|
|
41079
|
+
return new Logger(this.logger, (0,objectSpread/* ["default"] */.A)({}, {
|
|
41321
41080
|
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
|
41322
41081
|
}, this.options));
|
|
41323
41082
|
}
|
|
@@ -41328,16 +41087,14 @@ function () {
|
|
|
41328
41087
|
|
|
41329
41088
|
var baseLogger = new i18next_Logger();
|
|
41330
41089
|
|
|
41331
|
-
var i18next_EventEmitter =
|
|
41332
|
-
/*#__PURE__*/
|
|
41333
|
-
function () {
|
|
41090
|
+
var i18next_EventEmitter = function () {
|
|
41334
41091
|
function EventEmitter() {
|
|
41335
|
-
|
|
41092
|
+
(0,classCallCheck/* ["default"] */.A)(this, EventEmitter);
|
|
41336
41093
|
|
|
41337
41094
|
this.observers = {};
|
|
41338
41095
|
}
|
|
41339
41096
|
|
|
41340
|
-
|
|
41097
|
+
(0,createClass/* ["default"] */.A)(EventEmitter, [{
|
|
41341
41098
|
key: "on",
|
|
41342
41099
|
value: function on(events, listener) {
|
|
41343
41100
|
var _this = this;
|
|
@@ -41390,7 +41147,6 @@ function () {
|
|
|
41390
41147
|
return EventEmitter;
|
|
41391
41148
|
}();
|
|
41392
41149
|
|
|
41393
|
-
// http://lea.verou.me/2016/12/resolve-promises-externally-with-this-one-weird-trick/
|
|
41394
41150
|
function defer() {
|
|
41395
41151
|
var res;
|
|
41396
41152
|
var rej;
|
|
@@ -41404,11 +41160,9 @@ function defer() {
|
|
|
41404
41160
|
}
|
|
41405
41161
|
function makeString(object) {
|
|
41406
41162
|
if (object == null) return '';
|
|
41407
|
-
/* eslint prefer-template: 0 */
|
|
41408
|
-
|
|
41409
41163
|
return '' + object;
|
|
41410
41164
|
}
|
|
41411
|
-
function
|
|
41165
|
+
function i18next_copy(a, s, t) {
|
|
41412
41166
|
a.forEach(function (m) {
|
|
41413
41167
|
if (s[m]) t[m] = s[m];
|
|
41414
41168
|
});
|
|
@@ -41429,7 +41183,12 @@ function getLastOfPath(object, path, Empty) {
|
|
|
41429
41183
|
if (canNotTraverseDeeper()) return {};
|
|
41430
41184
|
var key = cleanKey(stack.shift());
|
|
41431
41185
|
if (!object[key] && Empty) object[key] = new Empty();
|
|
41432
|
-
|
|
41186
|
+
|
|
41187
|
+
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
41188
|
+
object = object[key];
|
|
41189
|
+
} else {
|
|
41190
|
+
object = {};
|
|
41191
|
+
}
|
|
41433
41192
|
}
|
|
41434
41193
|
|
|
41435
41194
|
if (canNotTraverseDeeper()) return {};
|
|
@@ -41468,34 +41227,30 @@ function getPathWithDefaults(data, defaultData, key) {
|
|
|
41468
41227
|
|
|
41469
41228
|
if (value !== undefined) {
|
|
41470
41229
|
return value;
|
|
41471
|
-
}
|
|
41472
|
-
|
|
41230
|
+
}
|
|
41473
41231
|
|
|
41474
41232
|
return getPath(defaultData, key);
|
|
41475
41233
|
}
|
|
41476
41234
|
function deepExtend(target, source, overwrite) {
|
|
41477
|
-
/* eslint no-restricted-syntax: 0 */
|
|
41478
41235
|
for (var prop in source) {
|
|
41479
|
-
if (prop
|
|
41480
|
-
|
|
41481
|
-
|
|
41482
|
-
|
|
41236
|
+
if (prop !== '__proto__' && prop !== 'constructor') {
|
|
41237
|
+
if (prop in target) {
|
|
41238
|
+
if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
|
|
41239
|
+
if (overwrite) target[prop] = source[prop];
|
|
41240
|
+
} else {
|
|
41241
|
+
deepExtend(target[prop], source[prop], overwrite);
|
|
41242
|
+
}
|
|
41483
41243
|
} else {
|
|
41484
|
-
|
|
41244
|
+
target[prop] = source[prop];
|
|
41485
41245
|
}
|
|
41486
|
-
} else {
|
|
41487
|
-
target[prop] = source[prop];
|
|
41488
41246
|
}
|
|
41489
41247
|
}
|
|
41490
41248
|
|
|
41491
41249
|
return target;
|
|
41492
41250
|
}
|
|
41493
41251
|
function regexEscape(str) {
|
|
41494
|
-
/* eslint no-useless-escape: 0 */
|
|
41495
41252
|
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
41496
41253
|
}
|
|
41497
|
-
/* eslint-disable */
|
|
41498
|
-
|
|
41499
41254
|
var _entityMap = {
|
|
41500
41255
|
'&': '&',
|
|
41501
41256
|
'<': '<',
|
|
@@ -41504,8 +41259,6 @@ var _entityMap = {
|
|
|
41504
41259
|
"'": ''',
|
|
41505
41260
|
'/': '/'
|
|
41506
41261
|
};
|
|
41507
|
-
/* eslint-enable */
|
|
41508
|
-
|
|
41509
41262
|
function i18next_escape(data) {
|
|
41510
41263
|
if (typeof data === 'string') {
|
|
41511
41264
|
return data.replace(/[&<>"'\/]/g, function (s) {
|
|
@@ -41515,10 +41268,9 @@ function i18next_escape(data) {
|
|
|
41515
41268
|
|
|
41516
41269
|
return data;
|
|
41517
41270
|
}
|
|
41271
|
+
var isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
|
41518
41272
|
|
|
41519
|
-
var i18next_ResourceStore =
|
|
41520
|
-
/*#__PURE__*/
|
|
41521
|
-
function (_EventEmitter) {
|
|
41273
|
+
var i18next_ResourceStore = function (_EventEmitter) {
|
|
41522
41274
|
_inherits(ResourceStore, _EventEmitter);
|
|
41523
41275
|
|
|
41524
41276
|
function ResourceStore(data) {
|
|
@@ -41529,10 +41281,13 @@ function (_EventEmitter) {
|
|
|
41529
41281
|
defaultNS: 'translation'
|
|
41530
41282
|
};
|
|
41531
41283
|
|
|
41532
|
-
|
|
41284
|
+
(0,classCallCheck/* ["default"] */.A)(this, ResourceStore);
|
|
41533
41285
|
|
|
41534
41286
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));
|
|
41535
|
-
|
|
41287
|
+
|
|
41288
|
+
if (isIE10) {
|
|
41289
|
+
i18next_EventEmitter.call((0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
41290
|
+
}
|
|
41536
41291
|
|
|
41537
41292
|
_this.data = data || {};
|
|
41538
41293
|
_this.options = options;
|
|
@@ -41544,7 +41299,7 @@ function (_EventEmitter) {
|
|
|
41544
41299
|
return _this;
|
|
41545
41300
|
}
|
|
41546
41301
|
|
|
41547
|
-
|
|
41302
|
+
(0,createClass/* ["default"] */.A)(ResourceStore, [{
|
|
41548
41303
|
key: "addNamespaces",
|
|
41549
41304
|
value: function addNamespaces(ns) {
|
|
41550
41305
|
if (this.options.ns.indexOf(ns) < 0) {
|
|
@@ -41603,7 +41358,6 @@ function (_EventEmitter) {
|
|
|
41603
41358
|
silent: false
|
|
41604
41359
|
};
|
|
41605
41360
|
|
|
41606
|
-
/* eslint no-restricted-syntax: 0 */
|
|
41607
41361
|
for (var m in resources) {
|
|
41608
41362
|
if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {
|
|
41609
41363
|
silent: true
|
|
@@ -41633,7 +41387,7 @@ function (_EventEmitter) {
|
|
|
41633
41387
|
if (deep) {
|
|
41634
41388
|
deepExtend(pack, resources, overwrite);
|
|
41635
41389
|
} else {
|
|
41636
|
-
pack =
|
|
41390
|
+
pack = (0,objectSpread/* ["default"] */.A)({}, pack, resources);
|
|
41637
41391
|
}
|
|
41638
41392
|
|
|
41639
41393
|
setPath(this.data, path, pack);
|
|
@@ -41657,9 +41411,8 @@ function (_EventEmitter) {
|
|
|
41657
41411
|
}, {
|
|
41658
41412
|
key: "getResourceBundle",
|
|
41659
41413
|
value: function getResourceBundle(lng, ns) {
|
|
41660
|
-
if (!ns) ns = this.options.defaultNS;
|
|
41661
|
-
|
|
41662
|
-
if (this.options.compatibilityAPI === 'v1') return _objectSpread({}, {}, this.getResource(lng, ns));
|
|
41414
|
+
if (!ns) ns = this.options.defaultNS;
|
|
41415
|
+
if (this.options.compatibilityAPI === 'v1') return (0,objectSpread/* ["default"] */.A)({}, {}, this.getResource(lng, ns));
|
|
41663
41416
|
return this.getResource(lng, ns);
|
|
41664
41417
|
}
|
|
41665
41418
|
}, {
|
|
@@ -41692,9 +41445,9 @@ var postProcessor = {
|
|
|
41692
41445
|
}
|
|
41693
41446
|
};
|
|
41694
41447
|
|
|
41695
|
-
var
|
|
41696
|
-
|
|
41697
|
-
function (_EventEmitter) {
|
|
41448
|
+
var checkedLoadedFor = {};
|
|
41449
|
+
|
|
41450
|
+
var i18next_Translator = function (_EventEmitter) {
|
|
41698
41451
|
_inherits(Translator, _EventEmitter);
|
|
41699
41452
|
|
|
41700
41453
|
function Translator(services) {
|
|
@@ -41702,12 +41455,15 @@ function (_EventEmitter) {
|
|
|
41702
41455
|
|
|
41703
41456
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41704
41457
|
|
|
41705
|
-
|
|
41458
|
+
(0,classCallCheck/* ["default"] */.A)(this, Translator);
|
|
41706
41459
|
|
|
41707
41460
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));
|
|
41708
|
-
i18next_EventEmitter.call(_assertThisInitialized(_this)); // <=IE10 fix (unable to call parent constructor)
|
|
41709
41461
|
|
|
41710
|
-
|
|
41462
|
+
if (isIE10) {
|
|
41463
|
+
i18next_EventEmitter.call((0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
41464
|
+
}
|
|
41465
|
+
|
|
41466
|
+
i18next_copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, (0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
41711
41467
|
_this.options = options;
|
|
41712
41468
|
|
|
41713
41469
|
if (_this.options.keySeparator === undefined) {
|
|
@@ -41718,7 +41474,7 @@ function (_EventEmitter) {
|
|
|
41718
41474
|
return _this;
|
|
41719
41475
|
}
|
|
41720
41476
|
|
|
41721
|
-
|
|
41477
|
+
(0,createClass/* ["default"] */.A)(Translator, [{
|
|
41722
41478
|
key: "changeLanguage",
|
|
41723
41479
|
value: function changeLanguage(lng) {
|
|
41724
41480
|
if (lng) this.language = lng;
|
|
@@ -41735,12 +41491,21 @@ function (_EventEmitter) {
|
|
|
41735
41491
|
}, {
|
|
41736
41492
|
key: "extractFromKey",
|
|
41737
41493
|
value: function extractFromKey(key, options) {
|
|
41738
|
-
var nsSeparator = options.nsSeparator
|
|
41494
|
+
var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
|
|
41739
41495
|
if (nsSeparator === undefined) nsSeparator = ':';
|
|
41740
41496
|
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
41741
41497
|
var namespaces = options.ns || this.options.defaultNS;
|
|
41742
41498
|
|
|
41743
41499
|
if (nsSeparator && key.indexOf(nsSeparator) > -1) {
|
|
41500
|
+
var m = key.match(this.interpolator.nestingRegexp);
|
|
41501
|
+
|
|
41502
|
+
if (m && m.length > 0) {
|
|
41503
|
+
return {
|
|
41504
|
+
key: key,
|
|
41505
|
+
namespaces: namespaces
|
|
41506
|
+
};
|
|
41507
|
+
}
|
|
41508
|
+
|
|
41744
41509
|
var parts = key.split(nsSeparator);
|
|
41745
41510
|
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
|
|
41746
41511
|
key = parts.join(keySeparator);
|
|
@@ -41754,27 +41519,23 @@ function (_EventEmitter) {
|
|
|
41754
41519
|
}
|
|
41755
41520
|
}, {
|
|
41756
41521
|
key: "translate",
|
|
41757
|
-
value: function translate(keys, options) {
|
|
41522
|
+
value: function translate(keys, options, lastKey) {
|
|
41758
41523
|
var _this2 = this;
|
|
41759
41524
|
|
|
41760
|
-
if (
|
|
41761
|
-
/* eslint prefer-rest-params: 0 */
|
|
41525
|
+
if ((0,esm_typeof/* ["default"] */.A)(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
|
41762
41526
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
41763
41527
|
}
|
|
41764
41528
|
|
|
41765
|
-
if (!options) options = {};
|
|
41766
|
-
|
|
41529
|
+
if (!options) options = {};
|
|
41767
41530
|
if (keys === undefined || keys === null) return '';
|
|
41768
|
-
if (!Array.isArray(keys)) keys = [String(keys)];
|
|
41769
|
-
|
|
41770
|
-
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator; // get namespace(s)
|
|
41531
|
+
if (!Array.isArray(keys)) keys = [String(keys)];
|
|
41532
|
+
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
41771
41533
|
|
|
41772
41534
|
var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),
|
|
41773
41535
|
key = _this$extractFromKey.key,
|
|
41774
41536
|
namespaces = _this$extractFromKey.namespaces;
|
|
41775
41537
|
|
|
41776
|
-
var namespace = namespaces[namespaces.length - 1];
|
|
41777
|
-
|
|
41538
|
+
var namespace = namespaces[namespaces.length - 1];
|
|
41778
41539
|
var lng = options.lng || this.language;
|
|
41779
41540
|
var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
41780
41541
|
|
|
@@ -41785,8 +41546,7 @@ function (_EventEmitter) {
|
|
|
41785
41546
|
}
|
|
41786
41547
|
|
|
41787
41548
|
return key;
|
|
41788
|
-
}
|
|
41789
|
-
|
|
41549
|
+
}
|
|
41790
41550
|
|
|
41791
41551
|
var resolved = this.resolve(keys, options);
|
|
41792
41552
|
var res = resolved && resolved.res;
|
|
@@ -41794,8 +41554,7 @@ function (_EventEmitter) {
|
|
|
41794
41554
|
var resExactUsedKey = resolved && resolved.exactUsedKey || key;
|
|
41795
41555
|
var resType = Object.prototype.toString.apply(res);
|
|
41796
41556
|
var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
|
|
41797
|
-
var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
|
|
41798
|
-
|
|
41557
|
+
var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
|
|
41799
41558
|
var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
|
|
41800
41559
|
var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';
|
|
41801
41560
|
|
|
@@ -41803,61 +41562,59 @@ function (_EventEmitter) {
|
|
|
41803
41562
|
if (!options.returnObjects && !this.options.returnObjects) {
|
|
41804
41563
|
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
|
|
41805
41564
|
return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, options) : "key '".concat(key, " (").concat(this.language, ")' returned an object instead of string.");
|
|
41806
|
-
}
|
|
41807
|
-
// as having it set to false means no hierarchy so no lookup for nested values
|
|
41808
|
-
|
|
41565
|
+
}
|
|
41809
41566
|
|
|
41810
41567
|
if (keySeparator) {
|
|
41811
41568
|
var resTypeIsArray = resType === '[object Array]';
|
|
41812
|
-
var copy
|
|
41813
|
-
|
|
41814
|
-
/* eslint no-restricted-syntax: 0 */
|
|
41815
|
-
|
|
41569
|
+
var copy = resTypeIsArray ? [] : {};
|
|
41816
41570
|
var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
|
|
41817
41571
|
|
|
41818
41572
|
for (var m in res) {
|
|
41819
41573
|
if (Object.prototype.hasOwnProperty.call(res, m)) {
|
|
41820
41574
|
var deepKey = "".concat(newKeyToUse).concat(keySeparator).concat(m);
|
|
41821
|
-
copy
|
|
41575
|
+
copy[m] = this.translate(deepKey, (0,objectSpread/* ["default"] */.A)({}, options, {
|
|
41822
41576
|
joinArrays: false,
|
|
41823
41577
|
ns: namespaces
|
|
41824
41578
|
}));
|
|
41825
|
-
if (copy
|
|
41579
|
+
if (copy[m] === deepKey) copy[m] = res[m];
|
|
41826
41580
|
}
|
|
41827
41581
|
}
|
|
41828
41582
|
|
|
41829
|
-
res = copy
|
|
41583
|
+
res = copy;
|
|
41830
41584
|
}
|
|
41831
41585
|
} else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
|
|
41832
|
-
// array special treatment
|
|
41833
41586
|
res = res.join(joinArrays);
|
|
41834
|
-
if (res) res = this.extendTranslation(res, keys, options);
|
|
41587
|
+
if (res) res = this.extendTranslation(res, keys, options, lastKey);
|
|
41835
41588
|
} else {
|
|
41836
|
-
// string, empty or null
|
|
41837
41589
|
var usedDefault = false;
|
|
41838
|
-
var usedKey = false;
|
|
41590
|
+
var usedKey = false;
|
|
41591
|
+
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
|
41592
|
+
var hasDefaultValue = Translator.hasDefaultValue(options);
|
|
41593
|
+
var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count) : '';
|
|
41594
|
+
var defaultValue = options["defaultValue".concat(defaultValueSuffix)] || options.defaultValue;
|
|
41839
41595
|
|
|
41840
|
-
if (!this.isValidLookup(res) &&
|
|
41596
|
+
if (!this.isValidLookup(res) && hasDefaultValue) {
|
|
41841
41597
|
usedDefault = true;
|
|
41842
|
-
|
|
41843
|
-
if (options.count !== undefined) {
|
|
41844
|
-
var suffix = this.pluralResolver.getSuffix(lng, options.count);
|
|
41845
|
-
res = options["defaultValue".concat(suffix)];
|
|
41846
|
-
}
|
|
41847
|
-
|
|
41848
|
-
if (!res) res = options.defaultValue;
|
|
41598
|
+
res = defaultValue;
|
|
41849
41599
|
}
|
|
41850
41600
|
|
|
41851
41601
|
if (!this.isValidLookup(res)) {
|
|
41852
41602
|
usedKey = true;
|
|
41853
41603
|
res = key;
|
|
41854
|
-
}
|
|
41855
|
-
|
|
41604
|
+
}
|
|
41856
41605
|
|
|
41857
|
-
var updateMissing =
|
|
41606
|
+
var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
|
|
41858
41607
|
|
|
41859
41608
|
if (usedKey || usedDefault || updateMissing) {
|
|
41860
|
-
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ?
|
|
41609
|
+
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
|
|
41610
|
+
|
|
41611
|
+
if (keySeparator) {
|
|
41612
|
+
var fk = this.resolve(key, (0,objectSpread/* ["default"] */.A)({}, options, {
|
|
41613
|
+
keySeparator: false
|
|
41614
|
+
}));
|
|
41615
|
+
if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
|
|
41616
|
+
}
|
|
41617
|
+
|
|
41861
41618
|
var lngs = [];
|
|
41862
41619
|
var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
|
|
41863
41620
|
|
|
@@ -41871,47 +41628,39 @@ function (_EventEmitter) {
|
|
|
41871
41628
|
lngs.push(options.lng || this.language);
|
|
41872
41629
|
}
|
|
41873
41630
|
|
|
41874
|
-
var send = function send(l, k) {
|
|
41631
|
+
var send = function send(l, k, fallbackValue) {
|
|
41875
41632
|
if (_this2.options.missingKeyHandler) {
|
|
41876
|
-
_this2.options.missingKeyHandler(l, namespace, k, updateMissing ?
|
|
41633
|
+
_this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);
|
|
41877
41634
|
} else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {
|
|
41878
|
-
_this2.backendConnector.saveMissing(l, namespace, k, updateMissing ?
|
|
41635
|
+
_this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);
|
|
41879
41636
|
}
|
|
41880
41637
|
|
|
41881
41638
|
_this2.emit('missingKey', l, namespace, k, res);
|
|
41882
41639
|
};
|
|
41883
41640
|
|
|
41884
41641
|
if (this.options.saveMissing) {
|
|
41885
|
-
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
|
41886
|
-
|
|
41887
41642
|
if (this.options.saveMissingPlurals && needsPluralHandling) {
|
|
41888
|
-
lngs.forEach(function (
|
|
41889
|
-
|
|
41890
|
-
|
|
41891
|
-
plurals.forEach(function (p) {
|
|
41892
|
-
return send([l], p);
|
|
41643
|
+
lngs.forEach(function (language) {
|
|
41644
|
+
_this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {
|
|
41645
|
+
send([language], key + suffix, options["defaultValue".concat(suffix)] || defaultValue);
|
|
41893
41646
|
});
|
|
41894
41647
|
});
|
|
41895
41648
|
} else {
|
|
41896
|
-
send(lngs, key);
|
|
41649
|
+
send(lngs, key, defaultValue);
|
|
41897
41650
|
}
|
|
41898
41651
|
}
|
|
41899
|
-
}
|
|
41900
|
-
|
|
41901
|
-
|
|
41902
|
-
res = this.extendTranslation(res, keys, options, resolved); // append namespace if still key
|
|
41903
|
-
|
|
41904
|
-
if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = "".concat(namespace, ":").concat(key); // parseMissingKeyHandler
|
|
41652
|
+
}
|
|
41905
41653
|
|
|
41654
|
+
res = this.extendTranslation(res, keys, options, resolved, lastKey);
|
|
41655
|
+
if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = "".concat(namespace, ":").concat(key);
|
|
41906
41656
|
if (usedKey && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);
|
|
41907
|
-
}
|
|
41908
|
-
|
|
41657
|
+
}
|
|
41909
41658
|
|
|
41910
41659
|
return res;
|
|
41911
41660
|
}
|
|
41912
41661
|
}, {
|
|
41913
41662
|
key: "extendTranslation",
|
|
41914
|
-
value: function extendTranslation(res, key, options, resolved) {
|
|
41663
|
+
value: function extendTranslation(res, key, options, resolved, lastKey) {
|
|
41915
41664
|
var _this3 = this;
|
|
41916
41665
|
|
|
41917
41666
|
if (this.i18nFormat && this.i18nFormat.parse) {
|
|
@@ -41919,27 +41668,48 @@ function (_EventEmitter) {
|
|
|
41919
41668
|
resolved: resolved
|
|
41920
41669
|
});
|
|
41921
41670
|
} else if (!options.skipInterpolation) {
|
|
41922
|
-
|
|
41923
|
-
|
|
41924
|
-
|
|
41925
|
-
|
|
41671
|
+
if (options.interpolation) this.interpolator.init((0,objectSpread/* ["default"] */.A)({}, options, {
|
|
41672
|
+
interpolation: (0,objectSpread/* ["default"] */.A)({}, this.options.interpolation, options.interpolation)
|
|
41673
|
+
}));
|
|
41674
|
+
var skipOnVariables = options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
|
|
41675
|
+
var nestBef;
|
|
41676
|
+
|
|
41677
|
+
if (skipOnVariables) {
|
|
41678
|
+
var nb = res.match(this.interpolator.nestingRegexp);
|
|
41679
|
+
nestBef = nb && nb.length;
|
|
41680
|
+
}
|
|
41926
41681
|
|
|
41927
41682
|
var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
|
|
41928
|
-
if (this.options.interpolation.defaultVariables) data =
|
|
41929
|
-
res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
|
|
41683
|
+
if (this.options.interpolation.defaultVariables) data = (0,objectSpread/* ["default"] */.A)({}, this.options.interpolation.defaultVariables, data);
|
|
41684
|
+
res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
|
|
41685
|
+
|
|
41686
|
+
if (skipOnVariables) {
|
|
41687
|
+
var na = res.match(this.interpolator.nestingRegexp);
|
|
41688
|
+
var nestAft = na && na.length;
|
|
41689
|
+
if (nestBef < nestAft) options.nest = false;
|
|
41690
|
+
}
|
|
41930
41691
|
|
|
41931
41692
|
if (options.nest !== false) res = this.interpolator.nest(res, function () {
|
|
41932
|
-
|
|
41693
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41694
|
+
args[_key] = arguments[_key];
|
|
41695
|
+
}
|
|
41696
|
+
|
|
41697
|
+
if (lastKey && lastKey[0] === args[0] && !options.context) {
|
|
41698
|
+
_this3.logger.warn("It seems you are nesting recursively key: ".concat(args[0], " in key: ").concat(key[0]));
|
|
41699
|
+
|
|
41700
|
+
return null;
|
|
41701
|
+
}
|
|
41702
|
+
|
|
41703
|
+
return _this3.translate.apply(_this3, args.concat([key]));
|
|
41933
41704
|
}, options);
|
|
41934
41705
|
if (options.interpolation) this.interpolator.reset();
|
|
41935
|
-
}
|
|
41936
|
-
|
|
41706
|
+
}
|
|
41937
41707
|
|
|
41938
41708
|
var postProcess = options.postProcess || this.options.postProcess;
|
|
41939
41709
|
var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
|
|
41940
41710
|
|
|
41941
41711
|
if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
|
|
41942
|
-
res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ?
|
|
41712
|
+
res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? (0,objectSpread/* ["default"] */.A)({
|
|
41943
41713
|
i18nResolved: resolved
|
|
41944
41714
|
}, options) : options, this);
|
|
41945
41715
|
}
|
|
@@ -41953,14 +41723,11 @@ function (_EventEmitter) {
|
|
|
41953
41723
|
|
|
41954
41724
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41955
41725
|
var found;
|
|
41956
|
-
var usedKey;
|
|
41957
|
-
|
|
41958
|
-
var exactUsedKey; // key with context / plural
|
|
41959
|
-
|
|
41726
|
+
var usedKey;
|
|
41727
|
+
var exactUsedKey;
|
|
41960
41728
|
var usedLng;
|
|
41961
41729
|
var usedNS;
|
|
41962
|
-
if (typeof keys === 'string') keys = [keys];
|
|
41963
|
-
|
|
41730
|
+
if (typeof keys === 'string') keys = [keys];
|
|
41964
41731
|
keys.forEach(function (k) {
|
|
41965
41732
|
if (_this4.isValidLookup(found)) return;
|
|
41966
41733
|
|
|
@@ -41977,8 +41744,10 @@ function (_EventEmitter) {
|
|
|
41977
41744
|
if (_this4.isValidLookup(found)) return;
|
|
41978
41745
|
usedNS = ns;
|
|
41979
41746
|
|
|
41980
|
-
if (_this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
|
|
41981
|
-
|
|
41747
|
+
if (!checkedLoadedFor["".concat(codes[0], "-").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
|
|
41748
|
+
checkedLoadedFor["".concat(codes[0], "-").concat(ns)] = true;
|
|
41749
|
+
|
|
41750
|
+
_this4.logger.warn("key \"".concat(usedKey, "\" for languages \"").concat(codes.join(', '), "\" won't get resolved as namespace \"").concat(usedNS, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
|
|
41982
41751
|
}
|
|
41983
41752
|
|
|
41984
41753
|
codes.forEach(function (code) {
|
|
@@ -41991,18 +41760,13 @@ function (_EventEmitter) {
|
|
|
41991
41760
|
_this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
|
|
41992
41761
|
} else {
|
|
41993
41762
|
var pluralSuffix;
|
|
41994
|
-
if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);
|
|
41995
|
-
|
|
41996
|
-
if (
|
|
41997
|
-
|
|
41998
|
-
if (needsContextHandling) finalKeys.push(finalKey += "".concat(_this4.options.contextSeparator).concat(options.context)); // get key for plural if needed
|
|
41999
|
-
|
|
41763
|
+
if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);
|
|
41764
|
+
if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);
|
|
41765
|
+
if (needsContextHandling) finalKeys.push(finalKey += "".concat(_this4.options.contextSeparator).concat(options.context));
|
|
42000
41766
|
if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);
|
|
42001
|
-
}
|
|
42002
|
-
|
|
41767
|
+
}
|
|
42003
41768
|
|
|
42004
41769
|
var possibleKey;
|
|
42005
|
-
/* eslint no-cond-assign: 0 */
|
|
42006
41770
|
|
|
42007
41771
|
while (possibleKey = finalKeys.pop()) {
|
|
42008
41772
|
if (!_this4.isValidLookup(found)) {
|
|
@@ -42033,6 +41797,19 @@ function (_EventEmitter) {
|
|
|
42033
41797
|
if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
|
|
42034
41798
|
return this.resourceStore.getResource(code, ns, key, options);
|
|
42035
41799
|
}
|
|
41800
|
+
}], [{
|
|
41801
|
+
key: "hasDefaultValue",
|
|
41802
|
+
value: function hasDefaultValue(options) {
|
|
41803
|
+
var prefix = 'defaultValue';
|
|
41804
|
+
|
|
41805
|
+
for (var option in options) {
|
|
41806
|
+
if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
|
|
41807
|
+
return true;
|
|
41808
|
+
}
|
|
41809
|
+
}
|
|
41810
|
+
|
|
41811
|
+
return false;
|
|
41812
|
+
}
|
|
42036
41813
|
}]);
|
|
42037
41814
|
|
|
42038
41815
|
return Translator;
|
|
@@ -42042,24 +41819,24 @@ function capitalize(string) {
|
|
|
42042
41819
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
42043
41820
|
}
|
|
42044
41821
|
|
|
42045
|
-
var i18next_LanguageUtil =
|
|
42046
|
-
/*#__PURE__*/
|
|
42047
|
-
function () {
|
|
41822
|
+
var i18next_LanguageUtil = function () {
|
|
42048
41823
|
function LanguageUtil(options) {
|
|
42049
|
-
|
|
41824
|
+
(0,classCallCheck/* ["default"] */.A)(this, LanguageUtil);
|
|
42050
41825
|
|
|
42051
41826
|
this.options = options;
|
|
42052
|
-
this.whitelist = this.options.
|
|
41827
|
+
this.whitelist = this.options.supportedLngs || false;
|
|
41828
|
+
this.supportedLngs = this.options.supportedLngs || false;
|
|
42053
41829
|
this.logger = baseLogger.create('languageUtils');
|
|
42054
41830
|
}
|
|
42055
41831
|
|
|
42056
|
-
|
|
41832
|
+
(0,createClass/* ["default"] */.A)(LanguageUtil, [{
|
|
42057
41833
|
key: "getScriptPartFromCode",
|
|
42058
41834
|
value: function getScriptPartFromCode(code) {
|
|
42059
41835
|
if (!code || code.indexOf('-') < 0) return null;
|
|
42060
41836
|
var p = code.split('-');
|
|
42061
41837
|
if (p.length === 2) return null;
|
|
42062
41838
|
p.pop();
|
|
41839
|
+
if (p[p.length - 1].toLowerCase() === 'x') return null;
|
|
42063
41840
|
return this.formatLanguageCode(p.join('-'));
|
|
42064
41841
|
}
|
|
42065
41842
|
}, {
|
|
@@ -42072,7 +41849,6 @@ function () {
|
|
|
42072
41849
|
}, {
|
|
42073
41850
|
key: "formatLanguageCode",
|
|
42074
41851
|
value: function formatLanguageCode(code) {
|
|
42075
|
-
// http://www.iana.org/assignments/language-tags/language-tags.xhtml
|
|
42076
41852
|
if (typeof code === 'string' && code.indexOf('-') > -1) {
|
|
42077
41853
|
var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
|
|
42078
41854
|
var p = code.split('-');
|
|
@@ -42086,8 +41862,7 @@ function () {
|
|
|
42086
41862
|
p[1] = p[1].toUpperCase();
|
|
42087
41863
|
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
|
42088
41864
|
} else if (p.length === 3) {
|
|
42089
|
-
p[0] = p[0].toLowerCase();
|
|
42090
|
-
|
|
41865
|
+
p[0] = p[0].toLowerCase();
|
|
42091
41866
|
if (p[1].length === 2) p[1] = p[1].toUpperCase();
|
|
42092
41867
|
if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
|
|
42093
41868
|
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
|
@@ -42102,30 +41877,68 @@ function () {
|
|
|
42102
41877
|
}, {
|
|
42103
41878
|
key: "isWhitelisted",
|
|
42104
41879
|
value: function isWhitelisted(code) {
|
|
42105
|
-
|
|
41880
|
+
this.logger.deprecate('languageUtils.isWhitelisted', 'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.');
|
|
41881
|
+
return this.isSupportedCode(code);
|
|
41882
|
+
}
|
|
41883
|
+
}, {
|
|
41884
|
+
key: "isSupportedCode",
|
|
41885
|
+
value: function isSupportedCode(code) {
|
|
41886
|
+
if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
|
|
42106
41887
|
code = this.getLanguagePartFromCode(code);
|
|
42107
41888
|
}
|
|
42108
41889
|
|
|
42109
|
-
return !this.
|
|
41890
|
+
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
|
|
41891
|
+
}
|
|
41892
|
+
}, {
|
|
41893
|
+
key: "getBestMatchFromCodes",
|
|
41894
|
+
value: function getBestMatchFromCodes(codes) {
|
|
41895
|
+
var _this = this;
|
|
41896
|
+
|
|
41897
|
+
if (!codes) return null;
|
|
41898
|
+
var found;
|
|
41899
|
+
codes.forEach(function (code) {
|
|
41900
|
+
if (found) return;
|
|
41901
|
+
|
|
41902
|
+
var cleanedLng = _this.formatLanguageCode(code);
|
|
41903
|
+
|
|
41904
|
+
if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
|
|
41905
|
+
});
|
|
41906
|
+
|
|
41907
|
+
if (!found && this.options.supportedLngs) {
|
|
41908
|
+
codes.forEach(function (code) {
|
|
41909
|
+
if (found) return;
|
|
41910
|
+
|
|
41911
|
+
var lngOnly = _this.getLanguagePartFromCode(code);
|
|
41912
|
+
|
|
41913
|
+
if (_this.isSupportedCode(lngOnly)) return found = lngOnly;
|
|
41914
|
+
found = _this.options.supportedLngs.find(function (supportedLng) {
|
|
41915
|
+
if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
|
|
41916
|
+
});
|
|
41917
|
+
});
|
|
41918
|
+
}
|
|
41919
|
+
|
|
41920
|
+
if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
|
|
41921
|
+
return found;
|
|
42110
41922
|
}
|
|
42111
41923
|
}, {
|
|
42112
41924
|
key: "getFallbackCodes",
|
|
42113
41925
|
value: function getFallbackCodes(fallbacks, code) {
|
|
42114
41926
|
if (!fallbacks) return [];
|
|
41927
|
+
if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
|
|
42115
41928
|
if (typeof fallbacks === 'string') fallbacks = [fallbacks];
|
|
42116
41929
|
if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
|
|
42117
|
-
if (!code) return fallbacks["default"] || [];
|
|
42118
|
-
|
|
41930
|
+
if (!code) return fallbacks["default"] || [];
|
|
42119
41931
|
var found = fallbacks[code];
|
|
42120
41932
|
if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
|
|
42121
41933
|
if (!found) found = fallbacks[this.formatLanguageCode(code)];
|
|
41934
|
+
if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
|
|
42122
41935
|
if (!found) found = fallbacks["default"];
|
|
42123
41936
|
return found || [];
|
|
42124
41937
|
}
|
|
42125
41938
|
}, {
|
|
42126
41939
|
key: "toResolveHierarchy",
|
|
42127
41940
|
value: function toResolveHierarchy(code, fallbackCode) {
|
|
42128
|
-
var
|
|
41941
|
+
var _this2 = this;
|
|
42129
41942
|
|
|
42130
41943
|
var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
|
|
42131
41944
|
var codes = [];
|
|
@@ -42133,10 +41946,10 @@ function () {
|
|
|
42133
41946
|
var addCode = function addCode(c) {
|
|
42134
41947
|
if (!c) return;
|
|
42135
41948
|
|
|
42136
|
-
if (
|
|
41949
|
+
if (_this2.isSupportedCode(c)) {
|
|
42137
41950
|
codes.push(c);
|
|
42138
41951
|
} else {
|
|
42139
|
-
|
|
41952
|
+
_this2.logger.warn("rejecting language code not found in supportedLngs: ".concat(c));
|
|
42140
41953
|
}
|
|
42141
41954
|
};
|
|
42142
41955
|
|
|
@@ -42149,7 +41962,7 @@ function () {
|
|
|
42149
41962
|
}
|
|
42150
41963
|
|
|
42151
41964
|
fallbackCodes.forEach(function (fc) {
|
|
42152
|
-
if (codes.indexOf(fc) < 0) addCode(
|
|
41965
|
+
if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));
|
|
42153
41966
|
});
|
|
42154
41967
|
return codes;
|
|
42155
41968
|
}
|
|
@@ -42158,10 +41971,8 @@ function () {
|
|
|
42158
41971
|
return LanguageUtil;
|
|
42159
41972
|
}();
|
|
42160
41973
|
|
|
42161
|
-
/* eslint-disable */
|
|
42162
|
-
|
|
42163
41974
|
var sets = [{
|
|
42164
|
-
lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'ti', 'tr', 'uz', 'wa'],
|
|
41975
|
+
lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],
|
|
42165
41976
|
nr: [1, 2],
|
|
42166
41977
|
fc: 1
|
|
42167
41978
|
}, {
|
|
@@ -42169,7 +41980,7 @@ var sets = [{
|
|
|
42169
41980
|
nr: [1, 2],
|
|
42170
41981
|
fc: 2
|
|
42171
41982
|
}, {
|
|
42172
|
-
lngs: ['ay', 'bo', 'cgg', 'fa', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
|
|
41983
|
+
lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
|
|
42173
41984
|
nr: [1],
|
|
42174
41985
|
fc: 3
|
|
42175
41986
|
}, {
|
|
@@ -42249,7 +42060,7 @@ var sets = [{
|
|
|
42249
42060
|
nr: [5, 1, 2, 3],
|
|
42250
42061
|
fc: 21
|
|
42251
42062
|
}, {
|
|
42252
|
-
lngs: ['he'],
|
|
42063
|
+
lngs: ['he', 'iw'],
|
|
42253
42064
|
nr: [1, 2, 20, 21],
|
|
42254
42065
|
fc: 22
|
|
42255
42066
|
}];
|
|
@@ -42267,7 +42078,7 @@ var _rulesPluralsTypes = {
|
|
|
42267
42078
|
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
|
42268
42079
|
},
|
|
42269
42080
|
5: function _(n) {
|
|
42270
|
-
return Number(n
|
|
42081
|
+
return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
|
|
42271
42082
|
},
|
|
42272
42083
|
6: function _(n) {
|
|
42273
42084
|
return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
|
|
@@ -42303,25 +42114,24 @@ var _rulesPluralsTypes = {
|
|
|
42303
42114
|
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
|
|
42304
42115
|
},
|
|
42305
42116
|
17: function _(n) {
|
|
42306
|
-
return Number(n == 1 || n % 10 == 1 ? 0 : 1);
|
|
42117
|
+
return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
|
|
42307
42118
|
},
|
|
42308
42119
|
18: function _(n) {
|
|
42309
42120
|
return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
|
|
42310
42121
|
},
|
|
42311
42122
|
19: function _(n) {
|
|
42312
|
-
return Number(n == 1 ? 0 : n
|
|
42123
|
+
return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
|
|
42313
42124
|
},
|
|
42314
42125
|
20: function _(n) {
|
|
42315
|
-
return Number(n == 1 ? 0 : n
|
|
42126
|
+
return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
|
|
42316
42127
|
},
|
|
42317
42128
|
21: function _(n) {
|
|
42318
42129
|
return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
|
|
42319
42130
|
},
|
|
42320
42131
|
22: function _(n) {
|
|
42321
|
-
return Number(n
|
|
42132
|
+
return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
|
|
42322
42133
|
}
|
|
42323
42134
|
};
|
|
42324
|
-
/* eslint-enable */
|
|
42325
42135
|
|
|
42326
42136
|
function createRules() {
|
|
42327
42137
|
var rules = {};
|
|
@@ -42336,13 +42146,11 @@ function createRules() {
|
|
|
42336
42146
|
return rules;
|
|
42337
42147
|
}
|
|
42338
42148
|
|
|
42339
|
-
var i18next_PluralResolver =
|
|
42340
|
-
/*#__PURE__*/
|
|
42341
|
-
function () {
|
|
42149
|
+
var i18next_PluralResolver = function () {
|
|
42342
42150
|
function PluralResolver(languageUtils) {
|
|
42343
42151
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
42344
42152
|
|
|
42345
|
-
|
|
42153
|
+
(0,classCallCheck/* ["default"] */.A)(this, PluralResolver);
|
|
42346
42154
|
|
|
42347
42155
|
this.languageUtils = languageUtils;
|
|
42348
42156
|
this.options = options;
|
|
@@ -42350,7 +42158,7 @@ function () {
|
|
|
42350
42158
|
this.rules = createRules();
|
|
42351
42159
|
}
|
|
42352
42160
|
|
|
42353
|
-
|
|
42161
|
+
(0,createClass/* ["default"] */.A)(PluralResolver, [{
|
|
42354
42162
|
key: "addRule",
|
|
42355
42163
|
value: function addRule(lng, obj) {
|
|
42356
42164
|
this.rules[lng] = obj;
|
|
@@ -42369,17 +42177,24 @@ function () {
|
|
|
42369
42177
|
}, {
|
|
42370
42178
|
key: "getPluralFormsOfKey",
|
|
42371
42179
|
value: function getPluralFormsOfKey(code, key) {
|
|
42180
|
+
return this.getSuffixes(code).map(function (suffix) {
|
|
42181
|
+
return key + suffix;
|
|
42182
|
+
});
|
|
42183
|
+
}
|
|
42184
|
+
}, {
|
|
42185
|
+
key: "getSuffixes",
|
|
42186
|
+
value: function getSuffixes(code) {
|
|
42372
42187
|
var _this = this;
|
|
42373
42188
|
|
|
42374
|
-
var ret = [];
|
|
42375
42189
|
var rule = this.getRule(code);
|
|
42376
|
-
if (!rule) return ret;
|
|
42377
|
-
rule.numbers.forEach(function (n) {
|
|
42378
|
-
var suffix = _this.getSuffix(code, n);
|
|
42379
42190
|
|
|
42380
|
-
|
|
42191
|
+
if (!rule) {
|
|
42192
|
+
return [];
|
|
42193
|
+
}
|
|
42194
|
+
|
|
42195
|
+
return rule.numbers.map(function (number) {
|
|
42196
|
+
return _this.getSuffix(code, number);
|
|
42381
42197
|
});
|
|
42382
|
-
return ret;
|
|
42383
42198
|
}
|
|
42384
42199
|
}, {
|
|
42385
42200
|
key: "getSuffix",
|
|
@@ -42389,9 +42204,8 @@ function () {
|
|
|
42389
42204
|
var rule = this.getRule(code);
|
|
42390
42205
|
|
|
42391
42206
|
if (rule) {
|
|
42392
|
-
// if (rule.numbers.length === 1) return ''; // only singular
|
|
42393
42207
|
var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
|
|
42394
|
-
var suffix = rule.numbers[idx];
|
|
42208
|
+
var suffix = rule.numbers[idx];
|
|
42395
42209
|
|
|
42396
42210
|
if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
|
42397
42211
|
if (suffix === 2) {
|
|
@@ -42403,21 +42217,15 @@ function () {
|
|
|
42403
42217
|
|
|
42404
42218
|
var returnSuffix = function returnSuffix() {
|
|
42405
42219
|
return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();
|
|
42406
|
-
};
|
|
42407
|
-
// v1
|
|
42408
|
-
|
|
42220
|
+
};
|
|
42409
42221
|
|
|
42410
42222
|
if (this.options.compatibilityJSON === 'v1') {
|
|
42411
42223
|
if (suffix === 1) return '';
|
|
42412
42224
|
if (typeof suffix === 'number') return "_plural_".concat(suffix.toString());
|
|
42413
42225
|
return returnSuffix();
|
|
42414
|
-
} else if (
|
|
42415
|
-
/* v2 */
|
|
42416
|
-
this.options.compatibilityJSON === 'v2') {
|
|
42226
|
+
} else if (this.options.compatibilityJSON === 'v2') {
|
|
42417
42227
|
return returnSuffix();
|
|
42418
|
-
} else if (
|
|
42419
|
-
/* v3 - gettext index */
|
|
42420
|
-
this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
|
42228
|
+
} else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
|
42421
42229
|
return returnSuffix();
|
|
42422
42230
|
}
|
|
42423
42231
|
|
|
@@ -42432,13 +42240,11 @@ function () {
|
|
|
42432
42240
|
return PluralResolver;
|
|
42433
42241
|
}();
|
|
42434
42242
|
|
|
42435
|
-
var i18next_Interpolator =
|
|
42436
|
-
/*#__PURE__*/
|
|
42437
|
-
function () {
|
|
42243
|
+
var i18next_Interpolator = function () {
|
|
42438
42244
|
function Interpolator() {
|
|
42439
42245
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
42440
42246
|
|
|
42441
|
-
|
|
42247
|
+
(0,classCallCheck/* ["default"] */.A)(this, Interpolator);
|
|
42442
42248
|
|
|
42443
42249
|
this.logger = baseLogger.create('interpolator');
|
|
42444
42250
|
this.options = options;
|
|
@@ -42449,10 +42255,8 @@ function () {
|
|
|
42449
42255
|
|
|
42450
42256
|
this.init(options);
|
|
42451
42257
|
}
|
|
42452
|
-
/* eslint no-param-reassign: 0 */
|
|
42453
|
-
|
|
42454
42258
|
|
|
42455
|
-
|
|
42259
|
+
(0,createClass/* ["default"] */.A)(Interpolator, [{
|
|
42456
42260
|
key: "init",
|
|
42457
42261
|
value: function init() {
|
|
42458
42262
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -42470,8 +42274,9 @@ function () {
|
|
|
42470
42274
|
this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
|
|
42471
42275
|
this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
|
|
42472
42276
|
this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
|
|
42473
|
-
this.
|
|
42474
|
-
|
|
42277
|
+
this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
|
|
42278
|
+
this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
|
|
42279
|
+
this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
|
|
42475
42280
|
this.resetRegExp();
|
|
42476
42281
|
}
|
|
42477
42282
|
}, {
|
|
@@ -42482,7 +42287,6 @@ function () {
|
|
|
42482
42287
|
}, {
|
|
42483
42288
|
key: "resetRegExp",
|
|
42484
42289
|
value: function resetRegExp() {
|
|
42485
|
-
// the regexp
|
|
42486
42290
|
var regexpStr = "".concat(this.prefix, "(.+?)").concat(this.suffix);
|
|
42487
42291
|
this.regexp = new RegExp(regexpStr, 'g');
|
|
42488
42292
|
var regexpUnescapeStr = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
|
|
@@ -42506,123 +42310,125 @@ function () {
|
|
|
42506
42310
|
|
|
42507
42311
|
var handleFormat = function handleFormat(key) {
|
|
42508
42312
|
if (key.indexOf(_this.formatSeparator) < 0) {
|
|
42509
|
-
|
|
42313
|
+
var path = getPathWithDefaults(data, defaultData, key);
|
|
42314
|
+
return _this.alwaysFormat ? _this.format(path, undefined, lng) : path;
|
|
42510
42315
|
}
|
|
42511
42316
|
|
|
42512
42317
|
var p = key.split(_this.formatSeparator);
|
|
42513
42318
|
var k = p.shift().trim();
|
|
42514
42319
|
var f = p.join(_this.formatSeparator).trim();
|
|
42515
|
-
return _this.format(getPathWithDefaults(data, defaultData, k), f, lng);
|
|
42320
|
+
return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, options);
|
|
42516
42321
|
};
|
|
42517
42322
|
|
|
42518
42323
|
this.resetRegExp();
|
|
42519
42324
|
var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
|
42520
|
-
|
|
42521
|
-
|
|
42522
|
-
|
|
42523
|
-
|
|
42524
|
-
|
|
42525
|
-
value = handleFormat(match[1].trim());
|
|
42526
|
-
|
|
42527
|
-
if (value === undefined) {
|
|
42528
|
-
if (typeof missingInterpolationHandler === 'function') {
|
|
42529
|
-
var temp = missingInterpolationHandler(str, match, options);
|
|
42530
|
-
value = typeof temp === 'string' ? temp : '';
|
|
42531
|
-
} else {
|
|
42532
|
-
this.logger.warn("missed to pass in variable ".concat(match[1], " for interpolating ").concat(str));
|
|
42533
|
-
value = '';
|
|
42534
|
-
}
|
|
42535
|
-
} else if (typeof value !== 'string' && !this.useRawValueToEscape) {
|
|
42536
|
-
value = makeString(value);
|
|
42325
|
+
var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
|
|
42326
|
+
var todos = [{
|
|
42327
|
+
regex: this.regexpUnescape,
|
|
42328
|
+
safeValue: function safeValue(val) {
|
|
42329
|
+
return regexSafe(val);
|
|
42537
42330
|
}
|
|
42538
|
-
|
|
42539
|
-
|
|
42540
|
-
|
|
42541
|
-
|
|
42542
|
-
|
|
42543
|
-
if (replaces >= this.maxReplaces) {
|
|
42544
|
-
break;
|
|
42331
|
+
}, {
|
|
42332
|
+
regex: this.regexp,
|
|
42333
|
+
safeValue: function safeValue(val) {
|
|
42334
|
+
return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);
|
|
42545
42335
|
}
|
|
42546
|
-
}
|
|
42547
|
-
|
|
42548
|
-
|
|
42549
|
-
|
|
42550
|
-
|
|
42551
|
-
|
|
42552
|
-
|
|
42553
|
-
|
|
42554
|
-
|
|
42555
|
-
|
|
42336
|
+
}];
|
|
42337
|
+
todos.forEach(function (todo) {
|
|
42338
|
+
replaces = 0;
|
|
42339
|
+
|
|
42340
|
+
while (match = todo.regex.exec(str)) {
|
|
42341
|
+
value = handleFormat(match[1].trim());
|
|
42342
|
+
|
|
42343
|
+
if (value === undefined) {
|
|
42344
|
+
if (typeof missingInterpolationHandler === 'function') {
|
|
42345
|
+
var temp = missingInterpolationHandler(str, match, options);
|
|
42346
|
+
value = typeof temp === 'string' ? temp : '';
|
|
42347
|
+
} else if (skipOnVariables) {
|
|
42348
|
+
value = match[0];
|
|
42349
|
+
continue;
|
|
42350
|
+
} else {
|
|
42351
|
+
_this.logger.warn("missed to pass in variable ".concat(match[1], " for interpolating ").concat(str));
|
|
42556
42352
|
|
|
42557
|
-
|
|
42558
|
-
|
|
42559
|
-
|
|
42560
|
-
value =
|
|
42353
|
+
value = '';
|
|
42354
|
+
}
|
|
42355
|
+
} else if (typeof value !== 'string' && !_this.useRawValueToEscape) {
|
|
42356
|
+
value = makeString(value);
|
|
42561
42357
|
}
|
|
42562
|
-
} else if (typeof value !== 'string' && !this.useRawValueToEscape) {
|
|
42563
|
-
value = makeString(value);
|
|
42564
|
-
}
|
|
42565
42358
|
|
|
42566
|
-
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
replaces++;
|
|
42359
|
+
str = str.replace(match[0], todo.safeValue(value));
|
|
42360
|
+
todo.regex.lastIndex = 0;
|
|
42361
|
+
replaces++;
|
|
42570
42362
|
|
|
42571
|
-
|
|
42572
|
-
|
|
42363
|
+
if (replaces >= _this.maxReplaces) {
|
|
42364
|
+
break;
|
|
42365
|
+
}
|
|
42573
42366
|
}
|
|
42574
|
-
}
|
|
42575
|
-
|
|
42367
|
+
});
|
|
42576
42368
|
return str;
|
|
42577
42369
|
}
|
|
42578
42370
|
}, {
|
|
42579
42371
|
key: "nest",
|
|
42580
42372
|
value: function nest(str, fc) {
|
|
42373
|
+
var _this2 = this;
|
|
42374
|
+
|
|
42581
42375
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
42582
42376
|
var match;
|
|
42583
42377
|
var value;
|
|
42584
42378
|
|
|
42585
|
-
var clonedOptions =
|
|
42586
|
-
|
|
42587
|
-
clonedOptions.applyPostProcessor = false; // avoid post processing on nested lookup
|
|
42379
|
+
var clonedOptions = (0,objectSpread/* ["default"] */.A)({}, options);
|
|
42588
42380
|
|
|
42589
|
-
|
|
42590
|
-
|
|
42381
|
+
clonedOptions.applyPostProcessor = false;
|
|
42382
|
+
delete clonedOptions.defaultValue;
|
|
42591
42383
|
|
|
42592
42384
|
function handleHasOptions(key, inheritedOptions) {
|
|
42593
|
-
|
|
42594
|
-
|
|
42595
|
-
|
|
42596
|
-
var optionsString =
|
|
42385
|
+
var sep = this.nestingOptionsSeparator;
|
|
42386
|
+
if (key.indexOf(sep) < 0) return key;
|
|
42387
|
+
var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
|
|
42388
|
+
var optionsString = "{".concat(c[1]);
|
|
42389
|
+
key = c[0];
|
|
42597
42390
|
optionsString = this.interpolate(optionsString, clonedOptions);
|
|
42598
42391
|
optionsString = optionsString.replace(/'/g, '"');
|
|
42599
42392
|
|
|
42600
42393
|
try {
|
|
42601
42394
|
clonedOptions = JSON.parse(optionsString);
|
|
42602
|
-
if (inheritedOptions) clonedOptions =
|
|
42395
|
+
if (inheritedOptions) clonedOptions = (0,objectSpread/* ["default"] */.A)({}, inheritedOptions, clonedOptions);
|
|
42603
42396
|
} catch (e) {
|
|
42604
|
-
this.logger.
|
|
42605
|
-
|
|
42606
|
-
|
|
42397
|
+
this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
|
|
42398
|
+
return "".concat(key).concat(sep).concat(optionsString);
|
|
42399
|
+
}
|
|
42607
42400
|
|
|
42608
42401
|
delete clonedOptions.defaultValue;
|
|
42609
42402
|
return key;
|
|
42610
|
-
}
|
|
42611
|
-
|
|
42403
|
+
}
|
|
42612
42404
|
|
|
42613
42405
|
while (match = this.nestingRegexp.exec(str)) {
|
|
42614
|
-
|
|
42406
|
+
var formatters = [];
|
|
42407
|
+
var doReduce = false;
|
|
42615
42408
|
|
|
42616
|
-
if (
|
|
42409
|
+
if (match[0].includes(this.formatSeparator) && !/{.*}/.test(match[1])) {
|
|
42410
|
+
var r = match[1].split(this.formatSeparator).map(function (elem) {
|
|
42411
|
+
return elem.trim();
|
|
42412
|
+
});
|
|
42413
|
+
match[1] = r.shift();
|
|
42414
|
+
formatters = r;
|
|
42415
|
+
doReduce = true;
|
|
42416
|
+
}
|
|
42617
42417
|
|
|
42418
|
+
value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
|
|
42419
|
+
if (value && match[0] === str && typeof value !== 'string') return value;
|
|
42618
42420
|
if (typeof value !== 'string') value = makeString(value);
|
|
42619
42421
|
|
|
42620
42422
|
if (!value) {
|
|
42621
42423
|
this.logger.warn("missed to resolve ".concat(match[1], " for nesting ").concat(str));
|
|
42622
42424
|
value = '';
|
|
42623
|
-
}
|
|
42624
|
-
// value = this.escapeValue ? regexSafe(utils.escape(value)) : regexSafe(value);
|
|
42425
|
+
}
|
|
42625
42426
|
|
|
42427
|
+
if (doReduce) {
|
|
42428
|
+
value = formatters.reduce(function (v, f) {
|
|
42429
|
+
return _this2.format(v, f, options.lng, options);
|
|
42430
|
+
}, value.trim());
|
|
42431
|
+
}
|
|
42626
42432
|
|
|
42627
42433
|
str = str.replace(match[0], value);
|
|
42628
42434
|
this.regexp.lastIndex = 0;
|
|
@@ -42644,9 +42450,7 @@ function remove(arr, what) {
|
|
|
42644
42450
|
}
|
|
42645
42451
|
}
|
|
42646
42452
|
|
|
42647
|
-
var i18next_Connector =
|
|
42648
|
-
/*#__PURE__*/
|
|
42649
|
-
function (_EventEmitter) {
|
|
42453
|
+
var i18next_Connector = function (_EventEmitter) {
|
|
42650
42454
|
_inherits(Connector, _EventEmitter);
|
|
42651
42455
|
|
|
42652
42456
|
function Connector(backend, store, services) {
|
|
@@ -42654,10 +42458,13 @@ function (_EventEmitter) {
|
|
|
42654
42458
|
|
|
42655
42459
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
42656
42460
|
|
|
42657
|
-
|
|
42461
|
+
(0,classCallCheck/* ["default"] */.A)(this, Connector);
|
|
42658
42462
|
|
|
42659
42463
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));
|
|
42660
|
-
|
|
42464
|
+
|
|
42465
|
+
if (isIE10) {
|
|
42466
|
+
i18next_EventEmitter.call((0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
42467
|
+
}
|
|
42661
42468
|
|
|
42662
42469
|
_this.backend = backend;
|
|
42663
42470
|
_this.store = store;
|
|
@@ -42675,12 +42482,11 @@ function (_EventEmitter) {
|
|
|
42675
42482
|
return _this;
|
|
42676
42483
|
}
|
|
42677
42484
|
|
|
42678
|
-
|
|
42485
|
+
(0,createClass/* ["default"] */.A)(Connector, [{
|
|
42679
42486
|
key: "queueLoad",
|
|
42680
42487
|
value: function queueLoad(languages, namespaces, options, callback) {
|
|
42681
42488
|
var _this2 = this;
|
|
42682
42489
|
|
|
42683
|
-
// find what needs to be loaded
|
|
42684
42490
|
var toLoad = [];
|
|
42685
42491
|
var pending = [];
|
|
42686
42492
|
var toLoadLanguages = [];
|
|
@@ -42691,12 +42497,11 @@ function (_EventEmitter) {
|
|
|
42691
42497
|
var name = "".concat(lng, "|").concat(ns);
|
|
42692
42498
|
|
|
42693
42499
|
if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {
|
|
42694
|
-
_this2.state[name] = 2;
|
|
42500
|
+
_this2.state[name] = 2;
|
|
42695
42501
|
} else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {
|
|
42696
42502
|
if (pending.indexOf(name) < 0) pending.push(name);
|
|
42697
42503
|
} else {
|
|
42698
|
-
_this2.state[name] = 1;
|
|
42699
|
-
|
|
42504
|
+
_this2.state[name] = 1;
|
|
42700
42505
|
hasAllNamespaces = false;
|
|
42701
42506
|
if (pending.indexOf(name) < 0) pending.push(name);
|
|
42702
42507
|
if (toLoad.indexOf(name) < 0) toLoad.push(name);
|
|
@@ -42725,29 +42530,23 @@ function (_EventEmitter) {
|
|
|
42725
42530
|
}, {
|
|
42726
42531
|
key: "loaded",
|
|
42727
42532
|
value: function loaded(name, err, data) {
|
|
42728
|
-
var
|
|
42729
|
-
|
|
42730
|
-
|
|
42731
|
-
ns = _name$split2[1];
|
|
42732
|
-
|
|
42533
|
+
var s = name.split('|');
|
|
42534
|
+
var lng = s[0];
|
|
42535
|
+
var ns = s[1];
|
|
42733
42536
|
if (err) this.emit('failedLoading', lng, ns, err);
|
|
42734
42537
|
|
|
42735
42538
|
if (data) {
|
|
42736
42539
|
this.store.addResourceBundle(lng, ns, data);
|
|
42737
|
-
}
|
|
42738
|
-
|
|
42739
|
-
|
|
42740
|
-
this.state[name] = err ? -1 : 2; // consolidated loading done in this run - only emit once for a loaded namespace
|
|
42741
|
-
|
|
42742
|
-
var loaded = {}; // callback if ready
|
|
42540
|
+
}
|
|
42743
42541
|
|
|
42542
|
+
this.state[name] = err ? -1 : 2;
|
|
42543
|
+
var loaded = {};
|
|
42744
42544
|
this.queue.forEach(function (q) {
|
|
42745
42545
|
pushPath(q.loaded, [lng], ns);
|
|
42746
42546
|
remove(q.pending, name);
|
|
42747
42547
|
if (err) q.errors.push(err);
|
|
42748
42548
|
|
|
42749
42549
|
if (q.pending.length === 0 && !q.done) {
|
|
42750
|
-
// only do once per loaded -> this.emit('loaded', q.loaded);
|
|
42751
42550
|
Object.keys(q.loaded).forEach(function (l) {
|
|
42752
42551
|
if (!loaded[l]) loaded[l] = [];
|
|
42753
42552
|
|
|
@@ -42757,8 +42556,6 @@ function (_EventEmitter) {
|
|
|
42757
42556
|
});
|
|
42758
42557
|
}
|
|
42759
42558
|
});
|
|
42760
|
-
/* eslint no-param-reassign: 0 */
|
|
42761
|
-
|
|
42762
42559
|
q.done = true;
|
|
42763
42560
|
|
|
42764
42561
|
if (q.errors.length) {
|
|
@@ -42767,10 +42564,8 @@ function (_EventEmitter) {
|
|
|
42767
42564
|
q.callback();
|
|
42768
42565
|
}
|
|
42769
42566
|
}
|
|
42770
|
-
});
|
|
42771
|
-
|
|
42772
|
-
this.emit('loaded', loaded); // remove done load requests
|
|
42773
|
-
|
|
42567
|
+
});
|
|
42568
|
+
this.emit('loaded', loaded);
|
|
42774
42569
|
this.queue = this.queue.filter(function (q) {
|
|
42775
42570
|
return !q.done;
|
|
42776
42571
|
});
|
|
@@ -42781,14 +42576,11 @@ function (_EventEmitter) {
|
|
|
42781
42576
|
var _this3 = this;
|
|
42782
42577
|
|
|
42783
42578
|
var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
42784
|
-
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] :
|
|
42579
|
+
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;
|
|
42785
42580
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
42786
|
-
if (!lng.length) return callback(null, {});
|
|
42787
|
-
|
|
42581
|
+
if (!lng.length) return callback(null, {});
|
|
42788
42582
|
return this.backend[fcName](lng, ns, function (err, data) {
|
|
42789
|
-
if (err && data
|
|
42790
|
-
/* = retryFlag */
|
|
42791
|
-
&& tried < 5) {
|
|
42583
|
+
if (err && data && tried < 5) {
|
|
42792
42584
|
setTimeout(function () {
|
|
42793
42585
|
_this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
|
|
42794
42586
|
}, wait);
|
|
@@ -42798,8 +42590,6 @@ function (_EventEmitter) {
|
|
|
42798
42590
|
callback(err, data);
|
|
42799
42591
|
});
|
|
42800
42592
|
}
|
|
42801
|
-
/* eslint consistent-return: 0 */
|
|
42802
|
-
|
|
42803
42593
|
}, {
|
|
42804
42594
|
key: "prepareLoading",
|
|
42805
42595
|
value: function prepareLoading(languages, namespaces) {
|
|
@@ -42818,9 +42608,8 @@ function (_EventEmitter) {
|
|
|
42818
42608
|
var toLoad = this.queueLoad(languages, namespaces, options, callback);
|
|
42819
42609
|
|
|
42820
42610
|
if (!toLoad.toLoad.length) {
|
|
42821
|
-
if (!toLoad.pending.length) callback();
|
|
42822
|
-
|
|
42823
|
-
return null; // pendings will trigger callback
|
|
42611
|
+
if (!toLoad.pending.length) callback();
|
|
42612
|
+
return null;
|
|
42824
42613
|
}
|
|
42825
42614
|
|
|
42826
42615
|
toLoad.toLoad.forEach(function (name) {
|
|
@@ -42845,13 +42634,10 @@ function (_EventEmitter) {
|
|
|
42845
42634
|
var _this5 = this;
|
|
42846
42635
|
|
|
42847
42636
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
42848
|
-
|
|
42849
|
-
var
|
|
42850
|
-
|
|
42851
|
-
|
|
42852
|
-
ns = _name$split4[1];
|
|
42853
|
-
|
|
42854
|
-
this.read(lng, ns, 'read', null, null, function (err, data) {
|
|
42637
|
+
var s = name.split('|');
|
|
42638
|
+
var lng = s[0];
|
|
42639
|
+
var ns = s[1];
|
|
42640
|
+
this.read(lng, ns, 'read', undefined, undefined, function (err, data) {
|
|
42855
42641
|
if (err) _this5.logger.warn("".concat(prefix, "loading namespace ").concat(ns, " for language ").concat(lng, " failed"), err);
|
|
42856
42642
|
if (!err && data) _this5.logger.log("".concat(prefix, "loaded namespace ").concat(ns, " for language ").concat(lng), data);
|
|
42857
42643
|
|
|
@@ -42864,18 +42650,17 @@ function (_EventEmitter) {
|
|
|
42864
42650
|
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
42865
42651
|
|
|
42866
42652
|
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
|
|
42867
|
-
this.logger.warn("did not save key \"".concat(key, "\"
|
|
42653
|
+
this.logger.warn("did not save key \"".concat(key, "\" as the namespace \"").concat(namespace, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
|
|
42868
42654
|
return;
|
|
42869
42655
|
}
|
|
42870
42656
|
|
|
42657
|
+
if (key === undefined || key === null || key === '') return;
|
|
42658
|
+
|
|
42871
42659
|
if (this.backend && this.backend.create) {
|
|
42872
|
-
this.backend.create(languages, namespace, key, fallbackValue, null
|
|
42873
|
-
/* unused callback */
|
|
42874
|
-
, _objectSpread({}, options, {
|
|
42660
|
+
this.backend.create(languages, namespace, key, fallbackValue, null, (0,objectSpread/* ["default"] */.A)({}, options, {
|
|
42875
42661
|
isUpdate: isUpdate
|
|
42876
42662
|
}));
|
|
42877
|
-
}
|
|
42878
|
-
|
|
42663
|
+
}
|
|
42879
42664
|
|
|
42880
42665
|
if (!languages || !languages[0]) return;
|
|
42881
42666
|
this.store.addResource(languages[0], namespace, key, fallbackValue);
|
|
@@ -42893,57 +42678,41 @@ function get() {
|
|
|
42893
42678
|
defaultNS: ['translation'],
|
|
42894
42679
|
fallbackLng: ['dev'],
|
|
42895
42680
|
fallbackNS: false,
|
|
42896
|
-
// string or array of namespaces
|
|
42897
42681
|
whitelist: false,
|
|
42898
|
-
// array with whitelisted languages
|
|
42899
42682
|
nonExplicitWhitelist: false,
|
|
42683
|
+
supportedLngs: false,
|
|
42684
|
+
nonExplicitSupportedLngs: false,
|
|
42900
42685
|
load: 'all',
|
|
42901
|
-
// | currentOnly | languageOnly
|
|
42902
42686
|
preload: false,
|
|
42903
|
-
// array with preload languages
|
|
42904
42687
|
simplifyPluralSuffix: true,
|
|
42905
42688
|
keySeparator: '.',
|
|
42906
42689
|
nsSeparator: ':',
|
|
42907
42690
|
pluralSeparator: '_',
|
|
42908
42691
|
contextSeparator: '_',
|
|
42909
42692
|
partialBundledLanguages: false,
|
|
42910
|
-
// allow bundling certain languages that are not remotely fetched
|
|
42911
42693
|
saveMissing: false,
|
|
42912
|
-
// enable to send missing values
|
|
42913
42694
|
updateMissing: false,
|
|
42914
|
-
// enable to update default values if different from translated value (only useful on initial development, or when keeping code as source of truth)
|
|
42915
42695
|
saveMissingTo: 'fallback',
|
|
42916
|
-
// 'current' || 'all'
|
|
42917
42696
|
saveMissingPlurals: true,
|
|
42918
|
-
// will save all forms not only singular key
|
|
42919
42697
|
missingKeyHandler: false,
|
|
42920
|
-
// function(lng, ns, key, fallbackValue) -> override if prefer on handling
|
|
42921
42698
|
missingInterpolationHandler: false,
|
|
42922
|
-
// function(str, match)
|
|
42923
42699
|
postProcess: false,
|
|
42924
|
-
// string or array of postProcessor names
|
|
42925
42700
|
postProcessPassResolved: false,
|
|
42926
|
-
// pass resolved object into 'options.i18nResolved' for postprocessor
|
|
42927
42701
|
returnNull: true,
|
|
42928
|
-
// allows null value as valid translation
|
|
42929
42702
|
returnEmptyString: true,
|
|
42930
|
-
// allows empty string value as valid translation
|
|
42931
42703
|
returnObjects: false,
|
|
42932
42704
|
joinArrays: false,
|
|
42933
|
-
// or string to join array
|
|
42934
42705
|
returnedObjectHandler: false,
|
|
42935
|
-
// function(key, value, options) triggered if key returns object but returnObjects is set to false
|
|
42936
42706
|
parseMissingKeyHandler: false,
|
|
42937
|
-
// function(key) parsed a key that was not found in t() before returning
|
|
42938
42707
|
appendNamespaceToMissingKey: false,
|
|
42939
42708
|
appendNamespaceToCIMode: false,
|
|
42940
42709
|
overloadTranslationOptionHandler: function handle(args) {
|
|
42941
42710
|
var ret = {};
|
|
42942
|
-
if (
|
|
42711
|
+
if ((0,esm_typeof/* ["default"] */.A)(args[1]) === 'object') ret = args[1];
|
|
42943
42712
|
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
|
42944
42713
|
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
|
42945
42714
|
|
|
42946
|
-
if (
|
|
42715
|
+
if ((0,esm_typeof/* ["default"] */.A)(args[2]) === 'object' || (0,esm_typeof/* ["default"] */.A)(args[3]) === 'object') {
|
|
42947
42716
|
var options = args[3] || args[2];
|
|
42948
42717
|
Object.keys(options).forEach(function (key) {
|
|
42949
42718
|
ret[key] = options[key];
|
|
@@ -42954,36 +42723,40 @@ function get() {
|
|
|
42954
42723
|
},
|
|
42955
42724
|
interpolation: {
|
|
42956
42725
|
escapeValue: true,
|
|
42957
|
-
format: function format(value, _format, lng) {
|
|
42726
|
+
format: function format(value, _format, lng, options) {
|
|
42958
42727
|
return value;
|
|
42959
42728
|
},
|
|
42960
42729
|
prefix: '{{',
|
|
42961
42730
|
suffix: '}}',
|
|
42962
42731
|
formatSeparator: ',',
|
|
42963
|
-
// prefixEscaped: '{{',
|
|
42964
|
-
// suffixEscaped: '}}',
|
|
42965
|
-
// unescapeSuffix: '',
|
|
42966
42732
|
unescapePrefix: '-',
|
|
42967
42733
|
nestingPrefix: '$t(',
|
|
42968
42734
|
nestingSuffix: ')',
|
|
42969
|
-
|
|
42970
|
-
|
|
42971
|
-
|
|
42972
|
-
maxReplaces: 1000 // max replaces to prevent endless loop
|
|
42973
|
-
|
|
42735
|
+
nestingOptionsSeparator: ',',
|
|
42736
|
+
maxReplaces: 1000,
|
|
42737
|
+
skipOnVariables: false
|
|
42974
42738
|
}
|
|
42975
42739
|
};
|
|
42976
42740
|
}
|
|
42977
|
-
/* eslint no-param-reassign: 0 */
|
|
42978
|
-
|
|
42979
42741
|
function transformOptions(options) {
|
|
42980
|
-
// create namespace object if namespace is passed in as string
|
|
42981
42742
|
if (typeof options.ns === 'string') options.ns = [options.ns];
|
|
42982
42743
|
if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
|
|
42983
|
-
if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
|
|
42744
|
+
if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
|
|
42745
|
+
|
|
42746
|
+
if (options.whitelist) {
|
|
42747
|
+
if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {
|
|
42748
|
+
options.whitelist = options.whitelist.concat(['cimode']);
|
|
42749
|
+
}
|
|
42984
42750
|
|
|
42985
|
-
|
|
42986
|
-
|
|
42751
|
+
options.supportedLngs = options.whitelist;
|
|
42752
|
+
}
|
|
42753
|
+
|
|
42754
|
+
if (options.nonExplicitWhitelist) {
|
|
42755
|
+
options.nonExplicitSupportedLngs = options.nonExplicitWhitelist;
|
|
42756
|
+
}
|
|
42757
|
+
|
|
42758
|
+
if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {
|
|
42759
|
+
options.supportedLngs = options.supportedLngs.concat(['cimode']);
|
|
42987
42760
|
}
|
|
42988
42761
|
|
|
42989
42762
|
return options;
|
|
@@ -42991,9 +42764,7 @@ function transformOptions(options) {
|
|
|
42991
42764
|
|
|
42992
42765
|
function noop() {}
|
|
42993
42766
|
|
|
42994
|
-
var i18next_I18n =
|
|
42995
|
-
/*#__PURE__*/
|
|
42996
|
-
function (_EventEmitter) {
|
|
42767
|
+
var i18next_I18n = function (_EventEmitter) {
|
|
42997
42768
|
_inherits(I18n, _EventEmitter);
|
|
42998
42769
|
|
|
42999
42770
|
function I18n() {
|
|
@@ -43002,10 +42773,13 @@ function (_EventEmitter) {
|
|
|
43002
42773
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
43003
42774
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
43004
42775
|
|
|
43005
|
-
|
|
42776
|
+
(0,classCallCheck/* ["default"] */.A)(this, I18n);
|
|
43006
42777
|
|
|
43007
42778
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));
|
|
43008
|
-
|
|
42779
|
+
|
|
42780
|
+
if (isIE10) {
|
|
42781
|
+
i18next_EventEmitter.call((0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
42782
|
+
}
|
|
43009
42783
|
|
|
43010
42784
|
_this.options = transformOptions(options);
|
|
43011
42785
|
_this.services = {};
|
|
@@ -43015,11 +42789,10 @@ function (_EventEmitter) {
|
|
|
43015
42789
|
};
|
|
43016
42790
|
|
|
43017
42791
|
if (callback && !_this.isInitialized && !options.isClone) {
|
|
43018
|
-
// https://github.com/i18next/i18next/issues/879
|
|
43019
42792
|
if (!_this.options.initImmediate) {
|
|
43020
42793
|
_this.init(options, callback);
|
|
43021
42794
|
|
|
43022
|
-
return _possibleConstructorReturn(_this,
|
|
42795
|
+
return _possibleConstructorReturn(_this, (0,assertThisInitialized/* ["default"] */.A)(_this));
|
|
43023
42796
|
}
|
|
43024
42797
|
|
|
43025
42798
|
setTimeout(function () {
|
|
@@ -43030,7 +42803,7 @@ function (_EventEmitter) {
|
|
|
43030
42803
|
return _this;
|
|
43031
42804
|
}
|
|
43032
42805
|
|
|
43033
|
-
|
|
42806
|
+
(0,createClass/* ["default"] */.A)(I18n, [{
|
|
43034
42807
|
key: "init",
|
|
43035
42808
|
value: function init() {
|
|
43036
42809
|
var _this2 = this;
|
|
@@ -43043,7 +42816,15 @@ function (_EventEmitter) {
|
|
|
43043
42816
|
options = {};
|
|
43044
42817
|
}
|
|
43045
42818
|
|
|
43046
|
-
|
|
42819
|
+
if (options.whitelist && !options.supportedLngs) {
|
|
42820
|
+
this.logger.deprecate('whitelist', 'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.');
|
|
42821
|
+
}
|
|
42822
|
+
|
|
42823
|
+
if (options.nonExplicitWhitelist && !options.nonExplicitSupportedLngs) {
|
|
42824
|
+
this.logger.deprecate('whitelist', 'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.');
|
|
42825
|
+
}
|
|
42826
|
+
|
|
42827
|
+
this.options = (0,objectSpread/* ["default"] */.A)({}, get(), this.options, transformOptions(options));
|
|
43047
42828
|
this.format = this.options.interpolation.format;
|
|
43048
42829
|
if (!callback) callback = noop;
|
|
43049
42830
|
|
|
@@ -43051,8 +42832,7 @@ function (_EventEmitter) {
|
|
|
43051
42832
|
if (!ClassOrObject) return null;
|
|
43052
42833
|
if (typeof ClassOrObject === 'function') return new ClassOrObject();
|
|
43053
42834
|
return ClassOrObject;
|
|
43054
|
-
}
|
|
43055
|
-
|
|
42835
|
+
}
|
|
43056
42836
|
|
|
43057
42837
|
if (!this.options.isClone) {
|
|
43058
42838
|
if (this.modules.logger) {
|
|
@@ -43076,8 +42856,7 @@ function (_EventEmitter) {
|
|
|
43076
42856
|
s.utils = {
|
|
43077
42857
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
43078
42858
|
};
|
|
43079
|
-
s.backendConnector = new i18next_Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
|
|
43080
|
-
|
|
42859
|
+
s.backendConnector = new i18next_Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
|
|
43081
42860
|
s.backendConnector.on('*', function (event) {
|
|
43082
42861
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
43083
42862
|
args[_key - 1] = arguments[_key];
|
|
@@ -43096,8 +42875,7 @@ function (_EventEmitter) {
|
|
|
43096
42875
|
if (s.i18nFormat.init) s.i18nFormat.init(this);
|
|
43097
42876
|
}
|
|
43098
42877
|
|
|
43099
|
-
this.translator = new i18next_Translator(this.services, this.options);
|
|
43100
|
-
|
|
42878
|
+
this.translator = new i18next_Translator(this.services, this.options);
|
|
43101
42879
|
this.translator.on('*', function (event) {
|
|
43102
42880
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
43103
42881
|
args[_key2 - 1] = arguments[_key2];
|
|
@@ -43108,10 +42886,18 @@ function (_EventEmitter) {
|
|
|
43108
42886
|
this.modules.external.forEach(function (m) {
|
|
43109
42887
|
if (m.init) m.init(_this2);
|
|
43110
42888
|
});
|
|
43111
|
-
}
|
|
42889
|
+
}
|
|
43112
42890
|
|
|
42891
|
+
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
42892
|
+
var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
42893
|
+
if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
|
|
42894
|
+
}
|
|
43113
42895
|
|
|
43114
|
-
|
|
42896
|
+
if (!this.services.languageDetector && !this.options.lng) {
|
|
42897
|
+
this.logger.warn('init: no languageDetector is used and no lng is defined');
|
|
42898
|
+
}
|
|
42899
|
+
|
|
42900
|
+
var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
|
|
43115
42901
|
storeApi.forEach(function (fcName) {
|
|
43116
42902
|
_this2[fcName] = function () {
|
|
43117
42903
|
var _this2$store;
|
|
@@ -43119,20 +42905,33 @@ function (_EventEmitter) {
|
|
|
43119
42905
|
return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);
|
|
43120
42906
|
};
|
|
43121
42907
|
});
|
|
42908
|
+
var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
|
|
42909
|
+
storeApiChained.forEach(function (fcName) {
|
|
42910
|
+
_this2[fcName] = function () {
|
|
42911
|
+
var _this2$store2;
|
|
42912
|
+
|
|
42913
|
+
(_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);
|
|
42914
|
+
|
|
42915
|
+
return _this2;
|
|
42916
|
+
};
|
|
42917
|
+
});
|
|
43122
42918
|
var deferred = defer();
|
|
43123
42919
|
|
|
43124
42920
|
var load = function load() {
|
|
43125
|
-
|
|
42921
|
+
var finish = function finish(err, t) {
|
|
42922
|
+
if (_this2.isInitialized) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');
|
|
43126
42923
|
_this2.isInitialized = true;
|
|
43127
|
-
|
|
43128
|
-
_this2.logger.log('initialized', _this2.options);
|
|
42924
|
+
if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);
|
|
43129
42925
|
|
|
43130
42926
|
_this2.emit('initialized', _this2.options);
|
|
43131
42927
|
|
|
43132
|
-
deferred.resolve(t);
|
|
43133
|
-
|
|
42928
|
+
deferred.resolve(t);
|
|
43134
42929
|
callback(err, t);
|
|
43135
|
-
}
|
|
42930
|
+
};
|
|
42931
|
+
|
|
42932
|
+
if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));
|
|
42933
|
+
|
|
42934
|
+
_this2.changeLanguage(_this2.options.lng, finish);
|
|
43136
42935
|
};
|
|
43137
42936
|
|
|
43138
42937
|
if (this.options.resources || !this.options.initImmediate) {
|
|
@@ -43143,18 +42942,18 @@ function (_EventEmitter) {
|
|
|
43143
42942
|
|
|
43144
42943
|
return deferred;
|
|
43145
42944
|
}
|
|
43146
|
-
/* eslint consistent-return: 0 */
|
|
43147
|
-
|
|
43148
42945
|
}, {
|
|
43149
42946
|
key: "loadResources",
|
|
43150
|
-
value: function loadResources() {
|
|
42947
|
+
value: function loadResources(language) {
|
|
43151
42948
|
var _this3 = this;
|
|
43152
42949
|
|
|
43153
|
-
var callback = arguments.length >
|
|
42950
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
|
42951
|
+
var usedCallback = callback;
|
|
42952
|
+
var usedLng = typeof language === 'string' ? language : this.language;
|
|
42953
|
+
if (typeof language === 'function') usedCallback = language;
|
|
43154
42954
|
|
|
43155
42955
|
if (!this.options.resources || this.options.partialBundledLanguages) {
|
|
43156
|
-
if (
|
|
43157
|
-
|
|
42956
|
+
if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();
|
|
43158
42957
|
var toLoad = [];
|
|
43159
42958
|
|
|
43160
42959
|
var append = function append(lng) {
|
|
@@ -43167,14 +42966,13 @@ function (_EventEmitter) {
|
|
|
43167
42966
|
});
|
|
43168
42967
|
};
|
|
43169
42968
|
|
|
43170
|
-
if (!
|
|
43171
|
-
// at least load fallbacks in this case
|
|
42969
|
+
if (!usedLng) {
|
|
43172
42970
|
var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
43173
42971
|
fallbacks.forEach(function (l) {
|
|
43174
42972
|
return append(l);
|
|
43175
42973
|
});
|
|
43176
42974
|
} else {
|
|
43177
|
-
append(
|
|
42975
|
+
append(usedLng);
|
|
43178
42976
|
}
|
|
43179
42977
|
|
|
43180
42978
|
if (this.options.preload) {
|
|
@@ -43183,9 +42981,9 @@ function (_EventEmitter) {
|
|
|
43183
42981
|
});
|
|
43184
42982
|
}
|
|
43185
42983
|
|
|
43186
|
-
this.services.backendConnector.load(toLoad, this.options.ns,
|
|
42984
|
+
this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);
|
|
43187
42985
|
} else {
|
|
43188
|
-
|
|
42986
|
+
usedCallback(null);
|
|
43189
42987
|
}
|
|
43190
42988
|
}
|
|
43191
42989
|
}, {
|
|
@@ -43196,8 +42994,7 @@ function (_EventEmitter) {
|
|
|
43196
42994
|
if (!ns) ns = this.options.ns;
|
|
43197
42995
|
if (!callback) callback = noop;
|
|
43198
42996
|
this.services.backendConnector.reload(lngs, ns, function (err) {
|
|
43199
|
-
deferred.resolve();
|
|
43200
|
-
|
|
42997
|
+
deferred.resolve();
|
|
43201
42998
|
callback(err);
|
|
43202
42999
|
});
|
|
43203
43000
|
return deferred;
|
|
@@ -43205,6 +43002,9 @@ function (_EventEmitter) {
|
|
|
43205
43002
|
}, {
|
|
43206
43003
|
key: "use",
|
|
43207
43004
|
value: function use(module) {
|
|
43005
|
+
if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
|
|
43006
|
+
if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
|
|
43007
|
+
|
|
43208
43008
|
if (module.type === 'backend') {
|
|
43209
43009
|
this.modules.backend = module;
|
|
43210
43010
|
}
|
|
@@ -43236,16 +43036,24 @@ function (_EventEmitter) {
|
|
|
43236
43036
|
value: function changeLanguage(lng, callback) {
|
|
43237
43037
|
var _this4 = this;
|
|
43238
43038
|
|
|
43039
|
+
this.isLanguageChangingTo = lng;
|
|
43239
43040
|
var deferred = defer();
|
|
43240
43041
|
this.emit('languageChanging', lng);
|
|
43241
43042
|
|
|
43242
43043
|
var done = function done(err, l) {
|
|
43243
|
-
_this4.translator.changeLanguage(l);
|
|
43244
|
-
|
|
43245
43044
|
if (l) {
|
|
43045
|
+
_this4.language = l;
|
|
43046
|
+
_this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
|
|
43047
|
+
|
|
43048
|
+
_this4.translator.changeLanguage(l);
|
|
43049
|
+
|
|
43050
|
+
_this4.isLanguageChangingTo = undefined;
|
|
43051
|
+
|
|
43246
43052
|
_this4.emit('languageChanged', l);
|
|
43247
43053
|
|
|
43248
43054
|
_this4.logger.log('languageChanged', l);
|
|
43055
|
+
} else {
|
|
43056
|
+
_this4.isLanguageChangingTo = undefined;
|
|
43249
43057
|
}
|
|
43250
43058
|
|
|
43251
43059
|
deferred.resolve(function () {
|
|
@@ -43256,15 +43064,20 @@ function (_EventEmitter) {
|
|
|
43256
43064
|
});
|
|
43257
43065
|
};
|
|
43258
43066
|
|
|
43259
|
-
var setLng = function setLng(
|
|
43067
|
+
var setLng = function setLng(lngs) {
|
|
43068
|
+
var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);
|
|
43069
|
+
|
|
43260
43070
|
if (l) {
|
|
43261
|
-
_this4.language
|
|
43262
|
-
|
|
43071
|
+
if (!_this4.language) {
|
|
43072
|
+
_this4.language = l;
|
|
43073
|
+
_this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
|
|
43074
|
+
}
|
|
43075
|
+
|
|
43263
43076
|
if (!_this4.translator.language) _this4.translator.changeLanguage(l);
|
|
43264
43077
|
if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);
|
|
43265
43078
|
}
|
|
43266
43079
|
|
|
43267
|
-
_this4.loadResources(function (err) {
|
|
43080
|
+
_this4.loadResources(l, function (err) {
|
|
43268
43081
|
done(err, l);
|
|
43269
43082
|
});
|
|
43270
43083
|
};
|
|
@@ -43287,14 +43100,14 @@ function (_EventEmitter) {
|
|
|
43287
43100
|
var fixedT = function fixedT(key, opts) {
|
|
43288
43101
|
var options;
|
|
43289
43102
|
|
|
43290
|
-
if (
|
|
43103
|
+
if ((0,esm_typeof/* ["default"] */.A)(opts) !== 'object') {
|
|
43291
43104
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
|
43292
43105
|
rest[_key3 - 2] = arguments[_key3];
|
|
43293
43106
|
}
|
|
43294
43107
|
|
|
43295
43108
|
options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));
|
|
43296
43109
|
} else {
|
|
43297
|
-
options =
|
|
43110
|
+
options = (0,objectSpread/* ["default"] */.A)({}, opts);
|
|
43298
43111
|
}
|
|
43299
43112
|
|
|
43300
43113
|
options.lng = options.lng || fixedT.lng;
|
|
@@ -43336,6 +43149,8 @@ function (_EventEmitter) {
|
|
|
43336
43149
|
value: function hasLoadedNamespace(ns) {
|
|
43337
43150
|
var _this6 = this;
|
|
43338
43151
|
|
|
43152
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
43153
|
+
|
|
43339
43154
|
if (!this.isInitialized) {
|
|
43340
43155
|
this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
|
|
43341
43156
|
return false;
|
|
@@ -43348,21 +43163,22 @@ function (_EventEmitter) {
|
|
|
43348
43163
|
|
|
43349
43164
|
var lng = this.languages[0];
|
|
43350
43165
|
var fallbackLng = this.options ? this.options.fallbackLng : false;
|
|
43351
|
-
var lastLng = this.languages[this.languages.length - 1];
|
|
43352
|
-
|
|
43166
|
+
var lastLng = this.languages[this.languages.length - 1];
|
|
43353
43167
|
if (lng.toLowerCase() === 'cimode') return true;
|
|
43354
43168
|
|
|
43355
43169
|
var loadNotPending = function loadNotPending(l, n) {
|
|
43356
43170
|
var loadState = _this6.services.backendConnector.state["".concat(l, "|").concat(n)];
|
|
43357
43171
|
|
|
43358
43172
|
return loadState === -1 || loadState === 2;
|
|
43359
|
-
};
|
|
43360
|
-
|
|
43361
|
-
|
|
43362
|
-
if (this.hasResourceBundle(lng, ns)) return true; // were not loading at all -> SEMI SUCCESS
|
|
43173
|
+
};
|
|
43363
43174
|
|
|
43364
|
-
if (
|
|
43175
|
+
if (options.precheck) {
|
|
43176
|
+
var preResult = options.precheck(this, loadNotPending);
|
|
43177
|
+
if (preResult !== undefined) return preResult;
|
|
43178
|
+
}
|
|
43365
43179
|
|
|
43180
|
+
if (this.hasResourceBundle(lng, ns)) return true;
|
|
43181
|
+
if (!this.services.backendConnector.backend) return true;
|
|
43366
43182
|
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
|
43367
43183
|
return false;
|
|
43368
43184
|
}
|
|
@@ -43396,7 +43212,7 @@ function (_EventEmitter) {
|
|
|
43396
43212
|
var preloaded = this.options.preload || [];
|
|
43397
43213
|
var newLngs = lngs.filter(function (lng) {
|
|
43398
43214
|
return preloaded.indexOf(lng) < 0;
|
|
43399
|
-
});
|
|
43215
|
+
});
|
|
43400
43216
|
|
|
43401
43217
|
if (!newLngs.length) {
|
|
43402
43218
|
if (callback) callback();
|
|
@@ -43415,11 +43231,9 @@ function (_EventEmitter) {
|
|
|
43415
43231
|
value: function dir(lng) {
|
|
43416
43232
|
if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;
|
|
43417
43233
|
if (!lng) return 'rtl';
|
|
43418
|
-
var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];
|
|
43234
|
+
var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];
|
|
43419
43235
|
return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';
|
|
43420
43236
|
}
|
|
43421
|
-
/* eslint class-methods-use-this: 0 */
|
|
43422
|
-
|
|
43423
43237
|
}, {
|
|
43424
43238
|
key: "createInstance",
|
|
43425
43239
|
value: function createInstance() {
|
|
@@ -43435,7 +43249,7 @@ function (_EventEmitter) {
|
|
|
43435
43249
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
43436
43250
|
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
|
43437
43251
|
|
|
43438
|
-
var mergedOptions =
|
|
43252
|
+
var mergedOptions = (0,objectSpread/* ["default"] */.A)({}, this.options, options, {
|
|
43439
43253
|
isClone: true
|
|
43440
43254
|
});
|
|
43441
43255
|
|
|
@@ -43444,6 +43258,10 @@ function (_EventEmitter) {
|
|
|
43444
43258
|
membersToCopy.forEach(function (m) {
|
|
43445
43259
|
clone[m] = _this8[m];
|
|
43446
43260
|
});
|
|
43261
|
+
clone.services = (0,objectSpread/* ["default"] */.A)({}, this.services);
|
|
43262
|
+
clone.services.utils = {
|
|
43263
|
+
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
|
43264
|
+
};
|
|
43447
43265
|
clone.translator = new i18next_Translator(clone.services, clone.options);
|
|
43448
43266
|
clone.translator.on('*', function (event) {
|
|
43449
43267
|
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
@@ -43453,8 +43271,10 @@ function (_EventEmitter) {
|
|
|
43453
43271
|
clone.emit.apply(clone, [event].concat(args));
|
|
43454
43272
|
});
|
|
43455
43273
|
clone.init(mergedOptions, callback);
|
|
43456
|
-
clone.translator.options = clone.options;
|
|
43457
|
-
|
|
43274
|
+
clone.translator.options = clone.options;
|
|
43275
|
+
clone.translator.backendConnector.services.utils = {
|
|
43276
|
+
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
|
43277
|
+
};
|
|
43458
43278
|
return clone;
|
|
43459
43279
|
}
|
|
43460
43280
|
}]);
|
|
@@ -43734,73 +43554,10 @@ __rspack_unused_export = self.btoa.bind(self);
|
|
|
43734
43554
|
|
|
43735
43555
|
|
|
43736
43556
|
},
|
|
43737
|
-
|
|
43557
|
+
83711(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
43738
43558
|
"use strict";
|
|
43739
|
-
|
|
43740
|
-
|
|
43741
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
43742
|
-
A: () => (/* binding */ locize_editor)
|
|
43743
|
-
});
|
|
43744
|
-
|
|
43745
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
43746
|
-
function _typeof(o) {
|
|
43747
|
-
"@babel/helpers - typeof";
|
|
43748
|
-
|
|
43749
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
43750
|
-
return typeof o;
|
|
43751
|
-
} : function (o) {
|
|
43752
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
43753
|
-
}, _typeof(o);
|
|
43754
|
-
}
|
|
43755
|
-
|
|
43756
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
43757
|
-
|
|
43758
|
-
function toPrimitive(t, r) {
|
|
43759
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
43760
|
-
var e = t[Symbol.toPrimitive];
|
|
43761
|
-
if (void 0 !== e) {
|
|
43762
|
-
var i = e.call(t, r || "default");
|
|
43763
|
-
if ("object" != _typeof(i)) return i;
|
|
43764
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
43765
|
-
}
|
|
43766
|
-
return ("string" === r ? String : Number)(t);
|
|
43767
|
-
}
|
|
43768
|
-
|
|
43769
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
43770
|
-
|
|
43771
|
-
|
|
43772
|
-
function toPropertyKey(t) {
|
|
43773
|
-
var i = toPrimitive(t, "string");
|
|
43774
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
43775
|
-
}
|
|
43776
|
-
|
|
43777
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
43778
|
-
|
|
43779
|
-
function _defineProperty(e, r, t) {
|
|
43780
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43781
|
-
value: t,
|
|
43782
|
-
enumerable: !0,
|
|
43783
|
-
configurable: !0,
|
|
43784
|
-
writable: !0
|
|
43785
|
-
}) : e[r] = t, e;
|
|
43786
|
-
}
|
|
43787
|
-
|
|
43788
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/node_modules/@babel/runtime/helpers/esm/objectSpread.js
|
|
43789
|
-
|
|
43790
|
-
function _objectSpread(e) {
|
|
43791
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
43792
|
-
var t = null != arguments[r] ? Object(arguments[r]) : {},
|
|
43793
|
-
o = Object.keys(t);
|
|
43794
|
-
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) {
|
|
43795
|
-
return Object.getOwnPropertyDescriptor(t, e).enumerable;
|
|
43796
|
-
})), o.forEach(function (r) {
|
|
43797
|
-
_defineProperty(e, r, t[r]);
|
|
43798
|
-
});
|
|
43799
|
-
}
|
|
43800
|
-
return e;
|
|
43801
|
-
}
|
|
43802
|
-
|
|
43803
|
-
;// CONCATENATED MODULE: ../../node_modules/locize-editor/dist/esm/locize-editor.js
|
|
43559
|
+
/* import */ var _babel_runtime_helpers_esm_objectSpread__rspack_import_0 = __webpack_require__(6460);
|
|
43560
|
+
/* import */ var _babel_runtime_helpers_esm_typeof__rspack_import_1 = __webpack_require__(17545);
|
|
43804
43561
|
|
|
43805
43562
|
|
|
43806
43563
|
|
|
@@ -43823,7 +43580,7 @@ function offset(elem) {
|
|
|
43823
43580
|
docElem = doc && doc.documentElement;
|
|
43824
43581
|
if (!docElem) return box;
|
|
43825
43582
|
|
|
43826
|
-
if (
|
|
43583
|
+
if ((0,_babel_runtime_helpers_esm_typeof__rspack_import_1/* ["default"] */.A)(elem.getBoundingClientRect) !== ("undefined")) {
|
|
43827
43584
|
box = elem.getBoundingClientRect();
|
|
43828
43585
|
}
|
|
43829
43586
|
|
|
@@ -44044,7 +43801,7 @@ var editor = {
|
|
|
44044
43801
|
if (i18next && !i18next.init) i18next = convertOptionsToI18next(i18next);
|
|
44045
43802
|
this.enabled = false;
|
|
44046
43803
|
this.i18next = i18next;
|
|
44047
|
-
this.options =
|
|
43804
|
+
this.options = (0,_babel_runtime_helpers_esm_objectSpread__rspack_import_0/* ["default"] */.A)({}, defaultOptions, i18next.options.editor); //this.locizeUrl = (i18next.options.editor && i18next.options.editor.url) || 'https://www.locize.io';
|
|
44048
43805
|
|
|
44049
43806
|
this.handler = this.handler.bind(this);
|
|
44050
43807
|
this.handleSavedMissing = this.handleSavedMissing.bind(this);
|
|
@@ -44149,7 +43906,7 @@ var editor = {
|
|
|
44149
43906
|
}
|
|
44150
43907
|
};
|
|
44151
43908
|
|
|
44152
|
-
/* export default */
|
|
43909
|
+
/* export default */ __webpack_exports__.A = (editor);
|
|
44153
43910
|
|
|
44154
43911
|
|
|
44155
43912
|
},
|
|
@@ -102233,8 +101990,8 @@ var DragDropManagerImpl_DragDropManagerImpl = /*#__PURE__*/function () {
|
|
|
102233
101990
|
|
|
102234
101991
|
return DragDropManagerImpl;
|
|
102235
101992
|
}();
|
|
102236
|
-
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
102237
|
-
var esm_defineProperty = __webpack_require__(
|
|
101993
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
101994
|
+
var esm_defineProperty = __webpack_require__(24586);
|
|
102238
101995
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
102239
101996
|
|
|
102240
101997
|
function objectSpread2_ownKeys(e, r) {
|
|
@@ -114070,33 +113827,242 @@ module.exports = {
|
|
|
114070
113827
|
|
|
114071
113828
|
|
|
114072
113829
|
},
|
|
114073
|
-
|
|
113830
|
+
2474(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113831
|
+
"use strict";
|
|
113832
|
+
function _assertThisInitialized(e) {
|
|
113833
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
113834
|
+
return e;
|
|
113835
|
+
}
|
|
113836
|
+
|
|
113837
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113838
|
+
A: () => (_assertThisInitialized)
|
|
113839
|
+
});
|
|
113840
|
+
|
|
113841
|
+
|
|
113842
|
+
},
|
|
113843
|
+
55152(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113844
|
+
"use strict";
|
|
113845
|
+
function _classCallCheck(a, n) {
|
|
113846
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
113847
|
+
}
|
|
113848
|
+
|
|
113849
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113850
|
+
A: () => (_classCallCheck)
|
|
113851
|
+
});
|
|
113852
|
+
|
|
113853
|
+
|
|
113854
|
+
},
|
|
113855
|
+
30414(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113856
|
+
"use strict";
|
|
113857
|
+
/* import */ var _toPropertyKey_js__rspack_import_0 = __webpack_require__(25196);
|
|
113858
|
+
|
|
113859
|
+
function _defineProperties(e, r) {
|
|
113860
|
+
for (var t = 0; t < r.length; t++) {
|
|
113861
|
+
var o = r[t];
|
|
113862
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,_toPropertyKey_js__rspack_import_0/* ["default"] */.A)(o.key), o);
|
|
113863
|
+
}
|
|
113864
|
+
}
|
|
113865
|
+
function _createClass(e, r, t) {
|
|
113866
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
113867
|
+
writable: !1
|
|
113868
|
+
}), e;
|
|
113869
|
+
}
|
|
113870
|
+
|
|
113871
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113872
|
+
A: () => (_createClass)
|
|
113873
|
+
});
|
|
113874
|
+
|
|
113875
|
+
|
|
113876
|
+
},
|
|
113877
|
+
24586(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113878
|
+
"use strict";
|
|
113879
|
+
/* import */ var _toPropertyKey_js__rspack_import_0 = __webpack_require__(25196);
|
|
113880
|
+
|
|
113881
|
+
function _defineProperty(e, r, t) {
|
|
113882
|
+
return (r = (0,_toPropertyKey_js__rspack_import_0/* ["default"] */.A)(r)) in e ? Object.defineProperty(e, r, {
|
|
113883
|
+
value: t,
|
|
113884
|
+
enumerable: !0,
|
|
113885
|
+
configurable: !0,
|
|
113886
|
+
writable: !0
|
|
113887
|
+
}) : e[r] = t, e;
|
|
113888
|
+
}
|
|
113889
|
+
|
|
113890
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113891
|
+
A: () => (_defineProperty)
|
|
113892
|
+
});
|
|
113893
|
+
|
|
113894
|
+
|
|
113895
|
+
},
|
|
113896
|
+
6460(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113897
|
+
"use strict";
|
|
113898
|
+
/* import */ var _defineProperty_js__rspack_import_0 = __webpack_require__(24586);
|
|
113899
|
+
|
|
113900
|
+
function _objectSpread(e) {
|
|
113901
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
113902
|
+
var t = null != arguments[r] ? Object(arguments[r]) : {},
|
|
113903
|
+
o = Object.keys(t);
|
|
113904
|
+
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) {
|
|
113905
|
+
return Object.getOwnPropertyDescriptor(t, e).enumerable;
|
|
113906
|
+
})), o.forEach(function (r) {
|
|
113907
|
+
(0,_defineProperty_js__rspack_import_0/* ["default"] */.A)(e, r, t[r]);
|
|
113908
|
+
});
|
|
113909
|
+
}
|
|
113910
|
+
return e;
|
|
113911
|
+
}
|
|
113912
|
+
|
|
113913
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113914
|
+
A: () => (_objectSpread)
|
|
113915
|
+
});
|
|
113916
|
+
|
|
113917
|
+
|
|
113918
|
+
},
|
|
113919
|
+
39850(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113920
|
+
"use strict";
|
|
113921
|
+
/* import */ var _objectWithoutPropertiesLoose_js__rspack_import_0 = __webpack_require__(17502);
|
|
113922
|
+
|
|
113923
|
+
function _objectWithoutProperties(e, t) {
|
|
113924
|
+
if (null == e) return {};
|
|
113925
|
+
var o,
|
|
113926
|
+
r,
|
|
113927
|
+
i = (0,_objectWithoutPropertiesLoose_js__rspack_import_0/* ["default"] */.A)(e, t);
|
|
113928
|
+
if (Object.getOwnPropertySymbols) {
|
|
113929
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
113930
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
113931
|
+
}
|
|
113932
|
+
return i;
|
|
113933
|
+
}
|
|
113934
|
+
|
|
113935
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113936
|
+
A: () => (_objectWithoutProperties)
|
|
113937
|
+
});
|
|
113938
|
+
|
|
113939
|
+
|
|
113940
|
+
},
|
|
113941
|
+
17502(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113942
|
+
"use strict";
|
|
113943
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
113944
|
+
if (null == r) return {};
|
|
113945
|
+
var t = {};
|
|
113946
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
113947
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
113948
|
+
t[n] = r[n];
|
|
113949
|
+
}
|
|
113950
|
+
return t;
|
|
113951
|
+
}
|
|
113952
|
+
|
|
113953
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113954
|
+
A: () => (_objectWithoutPropertiesLoose)
|
|
113955
|
+
});
|
|
113956
|
+
|
|
113957
|
+
|
|
113958
|
+
},
|
|
113959
|
+
1087(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
113960
|
+
"use strict";
|
|
113961
|
+
function _setPrototypeOf(t, e) {
|
|
113962
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
113963
|
+
return t.__proto__ = e, t;
|
|
113964
|
+
}, _setPrototypeOf(t, e);
|
|
113965
|
+
}
|
|
113966
|
+
|
|
113967
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
113968
|
+
A: () => (_setPrototypeOf)
|
|
113969
|
+
});
|
|
113970
|
+
|
|
113971
|
+
|
|
113972
|
+
},
|
|
113973
|
+
90489(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
114074
113974
|
"use strict";
|
|
114075
113975
|
|
|
114076
113976
|
// EXPORTS
|
|
114077
113977
|
__webpack_require__.d(__webpack_exports__, {
|
|
114078
|
-
A: () => (/* binding */
|
|
113978
|
+
A: () => (/* binding */ _slicedToArray)
|
|
114079
113979
|
});
|
|
114080
113980
|
|
|
114081
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/
|
|
114082
|
-
function
|
|
114083
|
-
|
|
113981
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
113982
|
+
function _arrayWithHoles(r) {
|
|
113983
|
+
if (Array.isArray(r)) return r;
|
|
113984
|
+
}
|
|
114084
113985
|
|
|
114085
|
-
|
|
114086
|
-
|
|
114087
|
-
|
|
114088
|
-
|
|
114089
|
-
|
|
113986
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
113987
|
+
function _iterableToArrayLimit(r, l) {
|
|
113988
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
113989
|
+
if (null != t) {
|
|
113990
|
+
var e,
|
|
113991
|
+
n,
|
|
113992
|
+
i,
|
|
113993
|
+
u,
|
|
113994
|
+
a = [],
|
|
113995
|
+
f = !0,
|
|
113996
|
+
o = !1;
|
|
113997
|
+
try {
|
|
113998
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
113999
|
+
if (Object(t) !== t) return;
|
|
114000
|
+
f = !1;
|
|
114001
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
114002
|
+
} catch (r) {
|
|
114003
|
+
o = !0, n = r;
|
|
114004
|
+
} finally {
|
|
114005
|
+
try {
|
|
114006
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
114007
|
+
} finally {
|
|
114008
|
+
if (o) throw n;
|
|
114009
|
+
}
|
|
114010
|
+
}
|
|
114011
|
+
return a;
|
|
114012
|
+
}
|
|
114013
|
+
}
|
|
114014
|
+
|
|
114015
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
114016
|
+
function _arrayLikeToArray(r, a) {
|
|
114017
|
+
(null == a || a > r.length) && (a = r.length);
|
|
114018
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
114019
|
+
return n;
|
|
114020
|
+
}
|
|
114021
|
+
|
|
114022
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
114023
|
+
|
|
114024
|
+
function _unsupportedIterableToArray(r, a) {
|
|
114025
|
+
if (r) {
|
|
114026
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
114027
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
114028
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
114029
|
+
}
|
|
114030
|
+
}
|
|
114031
|
+
|
|
114032
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
114033
|
+
function _nonIterableRest() {
|
|
114034
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
114090
114035
|
}
|
|
114091
114036
|
|
|
114037
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
114038
|
+
|
|
114039
|
+
|
|
114040
|
+
|
|
114041
|
+
|
|
114042
|
+
function _slicedToArray(r, e) {
|
|
114043
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
114044
|
+
}
|
|
114045
|
+
|
|
114046
|
+
|
|
114047
|
+
},
|
|
114048
|
+
25196(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
114049
|
+
"use strict";
|
|
114050
|
+
|
|
114051
|
+
// EXPORTS
|
|
114052
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
114053
|
+
A: () => (/* binding */ toPropertyKey)
|
|
114054
|
+
});
|
|
114055
|
+
|
|
114056
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
114057
|
+
var esm_typeof = __webpack_require__(17545);
|
|
114092
114058
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
114093
114059
|
|
|
114094
114060
|
function toPrimitive(t, r) {
|
|
114095
|
-
if ("object" !=
|
|
114061
|
+
if ("object" != (0,esm_typeof/* ["default"] */.A)(t) || !t) return t;
|
|
114096
114062
|
var e = t[Symbol.toPrimitive];
|
|
114097
114063
|
if (void 0 !== e) {
|
|
114098
114064
|
var i = e.call(t, r || "default");
|
|
114099
|
-
if ("object" !=
|
|
114065
|
+
if ("object" != (0,esm_typeof/* ["default"] */.A)(i)) return i;
|
|
114100
114066
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
114101
114067
|
}
|
|
114102
114068
|
return ("string" === r ? String : Number)(t);
|
|
@@ -114107,20 +114073,27 @@ function toPrimitive(t, r) {
|
|
|
114107
114073
|
|
|
114108
114074
|
function toPropertyKey(t) {
|
|
114109
114075
|
var i = toPrimitive(t, "string");
|
|
114110
|
-
return "symbol" ==
|
|
114076
|
+
return "symbol" == (0,esm_typeof/* ["default"] */.A)(i) ? i : i + "";
|
|
114111
114077
|
}
|
|
114112
114078
|
|
|
114113
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
114114
114079
|
|
|
114115
|
-
|
|
114116
|
-
|
|
114117
|
-
|
|
114118
|
-
|
|
114119
|
-
|
|
114120
|
-
|
|
114121
|
-
|
|
114080
|
+
},
|
|
114081
|
+
17545(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
114082
|
+
"use strict";
|
|
114083
|
+
function _typeof(o) {
|
|
114084
|
+
"@babel/helpers - typeof";
|
|
114085
|
+
|
|
114086
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
114087
|
+
return typeof o;
|
|
114088
|
+
} : function (o) {
|
|
114089
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
114090
|
+
}, _typeof(o);
|
|
114122
114091
|
}
|
|
114123
114092
|
|
|
114093
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
114094
|
+
A: () => (_typeof)
|
|
114095
|
+
});
|
|
114096
|
+
|
|
114124
114097
|
|
|
114125
114098
|
},
|
|
114126
114099
|
65477(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
@@ -284909,7 +284882,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
284909
284882
|
|
|
284910
284883
|
|
|
284911
284884
|
},
|
|
284912
|
-
|
|
284885
|
+
35261(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
284913
284886
|
"use strict";
|
|
284914
284887
|
|
|
284915
284888
|
// EXPORTS
|
|
@@ -284922,76 +284895,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
284922
284895
|
|
|
284923
284896
|
// UNUSED EXPORTS: I18nContext, Trans, TransWithoutContext, Translation, composeInitialProps, date, getDefaults, getI18n, getInitialProps, number, plural, select, selectOrdinal, setDefaults, setI18n, time, useSSR, withSSR
|
|
284924
284897
|
|
|
284925
|
-
|
|
284926
|
-
|
|
284927
|
-
|
|
284928
|
-
|
|
284929
|
-
return typeof_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
284930
|
-
return typeof o;
|
|
284931
|
-
} : function (o) {
|
|
284932
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
284933
|
-
}, typeof_typeof(o);
|
|
284934
|
-
}
|
|
284935
|
-
|
|
284936
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
284937
|
-
|
|
284938
|
-
function toPrimitive(t, r) {
|
|
284939
|
-
if ("object" != typeof_typeof(t) || !t) return t;
|
|
284940
|
-
var e = t[Symbol.toPrimitive];
|
|
284941
|
-
if (void 0 !== e) {
|
|
284942
|
-
var i = e.call(t, r || "default");
|
|
284943
|
-
if ("object" != typeof_typeof(i)) return i;
|
|
284944
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
284945
|
-
}
|
|
284946
|
-
return ("string" === r ? String : Number)(t);
|
|
284947
|
-
}
|
|
284948
|
-
|
|
284949
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
284950
|
-
|
|
284951
|
-
|
|
284952
|
-
function toPropertyKey(t) {
|
|
284953
|
-
var i = toPrimitive(t, "string");
|
|
284954
|
-
return "symbol" == typeof_typeof(i) ? i : i + "";
|
|
284955
|
-
}
|
|
284956
|
-
|
|
284957
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
284958
|
-
|
|
284959
|
-
function defineProperty_defineProperty(e, r, t) {
|
|
284960
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
284961
|
-
value: t,
|
|
284962
|
-
enumerable: !0,
|
|
284963
|
-
configurable: !0,
|
|
284964
|
-
writable: !0
|
|
284965
|
-
}) : e[r] = t, e;
|
|
284966
|
-
}
|
|
284967
|
-
|
|
284968
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
284969
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
284970
|
-
if (null == r) return {};
|
|
284971
|
-
var t = {};
|
|
284972
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
284973
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
284974
|
-
t[n] = r[n];
|
|
284975
|
-
}
|
|
284976
|
-
return t;
|
|
284977
|
-
}
|
|
284978
|
-
|
|
284979
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
284980
|
-
|
|
284981
|
-
function objectWithoutProperties_objectWithoutProperties(e, t) {
|
|
284982
|
-
if (null == e) return {};
|
|
284983
|
-
var o,
|
|
284984
|
-
r,
|
|
284985
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
284986
|
-
if (Object.getOwnPropertySymbols) {
|
|
284987
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
284988
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
284989
|
-
}
|
|
284990
|
-
return i;
|
|
284991
|
-
}
|
|
284992
|
-
|
|
284898
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
284899
|
+
var defineProperty = __webpack_require__(24586);
|
|
284900
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
284901
|
+
var objectWithoutProperties = __webpack_require__(39850);
|
|
284993
284902
|
// EXTERNAL MODULE: ../../node_modules/react/index.js
|
|
284994
284903
|
var react = __webpack_require__(14041);
|
|
284904
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
284905
|
+
var esm_typeof = __webpack_require__(17545);
|
|
284995
284906
|
// EXTERNAL MODULE: ../../node_modules/void-elements/index.js
|
|
284996
284907
|
var void_elements = __webpack_require__(29002);
|
|
284997
284908
|
;// CONCATENATED MODULE: ../../node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
|
|
@@ -285131,7 +285042,7 @@ var unescape_unescape = function unescape(text) {
|
|
|
285131
285042
|
|
|
285132
285043
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
285133
285044
|
|
|
285134
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) {
|
|
285045
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,defineProperty/* ["default"] */.A)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
285135
285046
|
|
|
285136
285047
|
|
|
285137
285048
|
var defaultOptions = {
|
|
@@ -285432,25 +285343,10 @@ function Trans(_ref) {
|
|
|
285432
285343
|
var useAsParent = parent !== undefined ? parent : reactI18nextOptions.defaultTransParent;
|
|
285433
285344
|
return useAsParent ? createElement(useAsParent, additionalProps, content) : content;
|
|
285434
285345
|
}
|
|
285435
|
-
|
|
285436
|
-
|
|
285437
|
-
|
|
285438
|
-
|
|
285439
|
-
|
|
285440
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
285441
|
-
|
|
285442
|
-
function _defineProperties(e, r) {
|
|
285443
|
-
for (var t = 0; t < r.length; t++) {
|
|
285444
|
-
var o = r[t];
|
|
285445
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
285446
|
-
}
|
|
285447
|
-
}
|
|
285448
|
-
function _createClass(e, r, t) {
|
|
285449
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
285450
|
-
writable: !1
|
|
285451
|
-
}), e;
|
|
285452
|
-
}
|
|
285453
|
-
|
|
285346
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
285347
|
+
var classCallCheck = __webpack_require__(55152);
|
|
285348
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
285349
|
+
var createClass = __webpack_require__(30414);
|
|
285454
285350
|
;// CONCATENATED MODULE: ../../node_modules/react-i18next/dist/es/initReactI18next.js
|
|
285455
285351
|
|
|
285456
285352
|
|
|
@@ -285478,12 +285374,12 @@ function context_objectSpread(target) { for (var i = 1; i < arguments.length; i+
|
|
|
285478
285374
|
var context_I18nContext = (0,react.createContext)();
|
|
285479
285375
|
var context_ReportNamespaces = function () {
|
|
285480
285376
|
function ReportNamespaces() {
|
|
285481
|
-
|
|
285377
|
+
(0,classCallCheck/* ["default"] */.A)(this, ReportNamespaces);
|
|
285482
285378
|
|
|
285483
285379
|
this.usedNamespaces = {};
|
|
285484
285380
|
}
|
|
285485
285381
|
|
|
285486
|
-
|
|
285382
|
+
(0,createClass/* ["default"] */.A)(ReportNamespaces, [{
|
|
285487
285383
|
key: "addUsedNamespaces",
|
|
285488
285384
|
value: function addUsedNamespaces(namespaces) {
|
|
285489
285385
|
var _this = this;
|
|
@@ -285583,71 +285479,8 @@ function Trans_Trans(_ref) {
|
|
|
285583
285479
|
shouldUnescape: shouldUnescape
|
|
285584
285480
|
}, additionalProps));
|
|
285585
285481
|
}
|
|
285586
|
-
|
|
285587
|
-
|
|
285588
|
-
if (Array.isArray(r)) return r;
|
|
285589
|
-
}
|
|
285590
|
-
|
|
285591
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
285592
|
-
function _iterableToArrayLimit(r, l) {
|
|
285593
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
285594
|
-
if (null != t) {
|
|
285595
|
-
var e,
|
|
285596
|
-
n,
|
|
285597
|
-
i,
|
|
285598
|
-
u,
|
|
285599
|
-
a = [],
|
|
285600
|
-
f = !0,
|
|
285601
|
-
o = !1;
|
|
285602
|
-
try {
|
|
285603
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
285604
|
-
if (Object(t) !== t) return;
|
|
285605
|
-
f = !1;
|
|
285606
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
285607
|
-
} catch (r) {
|
|
285608
|
-
o = !0, n = r;
|
|
285609
|
-
} finally {
|
|
285610
|
-
try {
|
|
285611
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
285612
|
-
} finally {
|
|
285613
|
-
if (o) throw n;
|
|
285614
|
-
}
|
|
285615
|
-
}
|
|
285616
|
-
return a;
|
|
285617
|
-
}
|
|
285618
|
-
}
|
|
285619
|
-
|
|
285620
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
285621
|
-
function _arrayLikeToArray(r, a) {
|
|
285622
|
-
(null == a || a > r.length) && (a = r.length);
|
|
285623
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
285624
|
-
return n;
|
|
285625
|
-
}
|
|
285626
|
-
|
|
285627
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
285628
|
-
|
|
285629
|
-
function _unsupportedIterableToArray(r, a) {
|
|
285630
|
-
if (r) {
|
|
285631
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
285632
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
285633
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
285634
|
-
}
|
|
285635
|
-
}
|
|
285636
|
-
|
|
285637
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
285638
|
-
function _nonIterableRest() {
|
|
285639
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
285640
|
-
}
|
|
285641
|
-
|
|
285642
|
-
;// CONCATENATED MODULE: ../../node_modules/react-i18next/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
285643
|
-
|
|
285644
|
-
|
|
285645
|
-
|
|
285646
|
-
|
|
285647
|
-
function slicedToArray_slicedToArray(r, e) {
|
|
285648
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
285649
|
-
}
|
|
285650
|
-
|
|
285482
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 5 modules
|
|
285483
|
+
var slicedToArray = __webpack_require__(90489);
|
|
285651
285484
|
;// CONCATENATED MODULE: ../../node_modules/react-i18next/dist/es/useTranslation.js
|
|
285652
285485
|
|
|
285653
285486
|
|
|
@@ -285655,7 +285488,7 @@ function slicedToArray_slicedToArray(r, e) {
|
|
|
285655
285488
|
|
|
285656
285489
|
function useTranslation_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
285657
285490
|
|
|
285658
|
-
function useTranslation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { useTranslation_ownKeys(Object(source), true).forEach(function (key) {
|
|
285491
|
+
function useTranslation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { useTranslation_ownKeys(Object(source), true).forEach(function (key) { (0,defineProperty/* ["default"] */.A)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { useTranslation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
285659
285492
|
|
|
285660
285493
|
|
|
285661
285494
|
|
|
@@ -285685,7 +285518,7 @@ function useTranslation_useTranslation(ns) {
|
|
|
285685
285518
|
|
|
285686
285519
|
var notReadyT = function notReadyT(k, optsOrDefaultValue) {
|
|
285687
285520
|
if (typeof optsOrDefaultValue === 'string') return optsOrDefaultValue;
|
|
285688
|
-
if (optsOrDefaultValue &&
|
|
285521
|
+
if (optsOrDefaultValue && (0,esm_typeof/* ["default"] */.A)(optsOrDefaultValue) === 'object' && typeof optsOrDefaultValue.defaultValue === 'string') return optsOrDefaultValue.defaultValue;
|
|
285689
285522
|
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
285690
285523
|
};
|
|
285691
285524
|
|
|
@@ -285714,7 +285547,7 @@ function useTranslation_useTranslation(ns) {
|
|
|
285714
285547
|
}
|
|
285715
285548
|
|
|
285716
285549
|
var _useState = (0,react.useState)(getT),
|
|
285717
|
-
_useState2 =
|
|
285550
|
+
_useState2 = (0,slicedToArray/* ["default"] */.A)(_useState, 2),
|
|
285718
285551
|
t = _useState2[0],
|
|
285719
285552
|
setT = _useState2[1];
|
|
285720
285553
|
|
|
@@ -285793,7 +285626,7 @@ var withTranslation_excluded = ["forwardedRef"];
|
|
|
285793
285626
|
|
|
285794
285627
|
function withTranslation_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
285795
285628
|
|
|
285796
|
-
function withTranslation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { withTranslation_ownKeys(Object(source), true).forEach(function (key) {
|
|
285629
|
+
function withTranslation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { withTranslation_ownKeys(Object(source), true).forEach(function (key) { (0,defineProperty/* ["default"] */.A)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { withTranslation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
285797
285630
|
|
|
285798
285631
|
|
|
285799
285632
|
|
|
@@ -285803,12 +285636,12 @@ function withTranslation(ns) {
|
|
|
285803
285636
|
return function Extend(WrappedComponent) {
|
|
285804
285637
|
function I18nextWithTranslation(_ref) {
|
|
285805
285638
|
var forwardedRef = _ref.forwardedRef,
|
|
285806
|
-
rest =
|
|
285639
|
+
rest = (0,objectWithoutProperties/* ["default"] */.A)(_ref, withTranslation_excluded);
|
|
285807
285640
|
|
|
285808
285641
|
var _useTranslation = useTranslation_useTranslation(ns, withTranslation_objectSpread(withTranslation_objectSpread({}, rest), {}, {
|
|
285809
285642
|
keyPrefix: options.keyPrefix
|
|
285810
285643
|
})),
|
|
285811
|
-
_useTranslation2 =
|
|
285644
|
+
_useTranslation2 = (0,slicedToArray/* ["default"] */.A)(_useTranslation, 3),
|
|
285812
285645
|
t = _useTranslation2[0],
|
|
285813
285646
|
i18n = _useTranslation2[1],
|
|
285814
285647
|
ready = _useTranslation2[2];
|