"use strict";
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["vendors-node_modules_taro_weapp_prebundle_i18next-browser-languagedetector_js"],{

/***/ "./node_modules/.taro/weapp/prebundle/chunk-SOUSFT7N.js":
/*!**************************************************************!*\
  !*** ./node_modules/.taro/weapp/prebundle/chunk-SOUSFT7N.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   _classCallCheck: function() { return /* binding */ _classCallCheck; },
/* harmony export */   _createClass: function() { return /* binding */ _createClass; },
/* harmony export */   _toPropertyKey: function() { return /* binding */ _toPropertyKey; },
/* harmony export */   _typeof: function() { return /* binding */ _typeof; },
/* harmony export */   init_classCallCheck: function() { return /* binding */ init_classCallCheck; },
/* harmony export */   init_createClass: function() { return /* binding */ init_createClass; },
/* harmony export */   init_toPropertyKey: function() { return /* binding */ init_toPropertyKey; },
/* harmony export */   init_typeof: function() { return /* binding */ init_typeof; }
/* harmony export */ });
/* harmony import */ var _chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-P7VEE7PG.js */ "./node_modules/.taro/weapp/prebundle/chunk-P7VEE7PG.js");

// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
var init_classCallCheck = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__.__esm)({
    "node_modules/@babel/runtime/helpers/esm/classCallCheck.js" () {}
});
// node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
    "@babel/helpers - typeof";
    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
        return typeof o2;
    } : function(o2) {
        return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
    }, _typeof(o);
}
var init_typeof = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__.__esm)({
    "node_modules/@babel/runtime/helpers/esm/typeof.js" () {}
});
// node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function _toPrimitive(input, hint) {
    if (_typeof(input) !== "object" || input === null) return input;
    var prim = input[Symbol.toPrimitive];
    if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (_typeof(res) !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (hint === "string" ? String : Number)(input);
}
var init_toPrimitive = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__.__esm)({
    "node_modules/@babel/runtime/helpers/esm/toPrimitive.js" () {
        init_typeof();
    }
});
// node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function _toPropertyKey(arg) {
    var key = _toPrimitive(arg, "string");
    return _typeof(key) === "symbol" ? key : String(key);
}
var init_toPropertyKey = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__.__esm)({
    "node_modules/@babel/runtime/helpers/esm/toPropertyKey.js" () {
        init_typeof();
        init_toPrimitive();
    }
});
// node_modules/@babel/runtime/helpers/esm/createClass.js
function _defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
    }
}
function _createClass(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    Object.defineProperty(Constructor, "prototype", {
        writable: false
    });
    return Constructor;
}
var init_createClass = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_0__.__esm)({
    "node_modules/@babel/runtime/helpers/esm/createClass.js" () {
        init_toPropertyKey();
    }
});



/***/ }),

/***/ "./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js":
/*!********************************************************************************!*\
  !*** ./node_modules/.taro/weapp/prebundle/i18next-browser-languagedetector.js ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ i18next_browser_languagedetector_default; }
/* harmony export */ });
/* harmony import */ var _chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-SOUSFT7N.js */ "./node_modules/.taro/weapp/prebundle/chunk-SOUSFT7N.js");
/* harmony import */ var _chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-P7VEE7PG.js */ "./node_modules/.taro/weapp/prebundle/chunk-P7VEE7PG.js");
/* provided dependency */ var document = __webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js")["document$1"];
/* provided dependency */ var window = __webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js")["window$1"];
/* provided dependency */ var navigator = __webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js")["nav"];


// node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js
(0,_chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_0__.init_classCallCheck)();
(0,_chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_0__.init_createClass)();
var arr = [];
var each = arr.forEach;
var slice = arr.slice;
function defaults(obj) {
    each.call(slice.call(arguments, 1), function(source) {
        if (source) {
            for(var prop in source){
                if (obj[prop] === void 0) obj[prop] = source[prop];
            }
        }
    });
    return obj;
}
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
var serializeCookie = function serializeCookie2(name, val, options) {
    var opt = options || {};
    opt.path = opt.path || "/";
    var value = encodeURIComponent(val);
    var str = "".concat(name, "=").concat(value);
    if (opt.maxAge > 0) {
        var maxAge = opt.maxAge - 0;
        if (Number.isNaN(maxAge)) throw new Error("maxAge should be a Number");
        str += "; Max-Age=".concat(Math.floor(maxAge));
    }
    if (opt.domain) {
        if (!fieldContentRegExp.test(opt.domain)) {
            throw new TypeError("option domain is invalid");
        }
        str += "; Domain=".concat(opt.domain);
    }
    if (opt.path) {
        if (!fieldContentRegExp.test(opt.path)) {
            throw new TypeError("option path is invalid");
        }
        str += "; Path=".concat(opt.path);
    }
    if (opt.expires) {
        if (typeof opt.expires.toUTCString !== "function") {
            throw new TypeError("option expires is invalid");
        }
        str += "; Expires=".concat(opt.expires.toUTCString());
    }
    if (opt.httpOnly) str += "; HttpOnly";
    if (opt.secure) str += "; Secure";
    if (opt.sameSite) {
        var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
        switch(sameSite){
            case true:
                str += "; SameSite=Strict";
                break;
            case "lax":
                str += "; SameSite=Lax";
                break;
            case "strict":
                str += "; SameSite=Strict";
                break;
            case "none":
                str += "; SameSite=None";
                break;
            default:
                throw new TypeError("option sameSite is invalid");
        }
    }
    return str;
};
var cookie = {
    create: function create(name, value, minutes, domain) {
        var cookieOptions = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
            path: "/",
            sameSite: "strict"
        };
        if (minutes) {
            cookieOptions.expires = new Date();
            cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1e3);
        }
        if (domain) cookieOptions.domain = domain;
        document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
    },
    read: function read(name) {
        var nameEQ = "".concat(name, "=");
        var ca = document.cookie.split(";");
        for(var i = 0; i < ca.length; i++){
            var c = ca[i];
            while(c.charAt(0) === " "){
                c = c.substring(1, c.length);
            }
            if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    },
    remove: function remove(name) {
        this.create(name, "", -1);
    }
};
var cookie$1 = {
    name: "cookie",
    lookup: function lookup(options) {
        var found;
        if (options.lookupCookie && typeof document !== "undefined") {
            var c = cookie.read(options.lookupCookie);
            if (c) found = c;
        }
        return found;
    },
    cacheUserLanguage: function cacheUserLanguage(lng, options) {
        if (options.lookupCookie && typeof document !== "undefined") {
            cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);
        }
    }
};
var querystring = {
    name: "querystring",
    lookup: function lookup2(options) {
        var found;
        if (typeof window !== "undefined") {
            var search = window.location.search;
            if (!window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1) {
                search = window.location.hash.substring(window.location.hash.indexOf("?"));
            }
            var query = search.substring(1);
            var params = query.split("&");
            for(var i = 0; i < params.length; i++){
                var pos = params[i].indexOf("=");
                if (pos > 0) {
                    var key = params[i].substring(0, pos);
                    if (key === options.lookupQuerystring) {
                        found = params[i].substring(pos + 1);
                    }
                }
            }
        }
        return found;
    }
};
var hasLocalStorageSupport = null;
var localStorageAvailable = function localStorageAvailable2() {
    if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
    try {
        hasLocalStorageSupport = window !== "undefined" && window.localStorage !== null;
        var testKey = "i18next.translate.boo";
        window.localStorage.setItem(testKey, "foo");
        window.localStorage.removeItem(testKey);
    } catch (e) {
        hasLocalStorageSupport = false;
    }
    return hasLocalStorageSupport;
};
var localStorage = {
    name: "localStorage",
    lookup: function lookup3(options) {
        var found;
        if (options.lookupLocalStorage && localStorageAvailable()) {
            var lng = window.localStorage.getItem(options.lookupLocalStorage);
            if (lng) found = lng;
        }
        return found;
    },
    cacheUserLanguage: function cacheUserLanguage2(lng, options) {
        if (options.lookupLocalStorage && localStorageAvailable()) {
            window.localStorage.setItem(options.lookupLocalStorage, lng);
        }
    }
};
var hasSessionStorageSupport = null;
var sessionStorageAvailable = function sessionStorageAvailable2() {
    if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
    try {
        hasSessionStorageSupport = window !== "undefined" && window.sessionStorage !== null;
        var testKey = "i18next.translate.boo";
        window.sessionStorage.setItem(testKey, "foo");
        window.sessionStorage.removeItem(testKey);
    } catch (e) {
        hasSessionStorageSupport = false;
    }
    return hasSessionStorageSupport;
};
var sessionStorage = {
    name: "sessionStorage",
    lookup: function lookup4(options) {
        var found;
        if (options.lookupSessionStorage && sessionStorageAvailable()) {
            var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
            if (lng) found = lng;
        }
        return found;
    },
    cacheUserLanguage: function cacheUserLanguage3(lng, options) {
        if (options.lookupSessionStorage && sessionStorageAvailable()) {
            window.sessionStorage.setItem(options.lookupSessionStorage, lng);
        }
    }
};
var navigator$1 = {
    name: "navigator",
    lookup: function lookup5(options) {
        var found = [];
        if (typeof navigator !== "undefined") {
            if (navigator.languages) {
                for(var i = 0; i < navigator.languages.length; i++){
                    found.push(navigator.languages[i]);
                }
            }
            if (navigator.userLanguage) {
                found.push(navigator.userLanguage);
            }
            if (navigator.language) {
                found.push(navigator.language);
            }
        }
        return found.length > 0 ? found : void 0;
    }
};
var htmlTag = {
    name: "htmlTag",
    lookup: function lookup6(options) {
        var found;
        var htmlTag2 = options.htmlTag || (typeof document !== "undefined" ? document.documentElement : null);
        if (htmlTag2 && typeof htmlTag2.getAttribute === "function") {
            found = htmlTag2.getAttribute("lang");
        }
        return found;
    }
};
var path = {
    name: "path",
    lookup: function lookup7(options) {
        var found;
        if (typeof window !== "undefined") {
            var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
            if (language instanceof Array) {
                if (typeof options.lookupFromPathIndex === "number") {
                    if (typeof language[options.lookupFromPathIndex] !== "string") {
                        return void 0;
                    }
                    found = language[options.lookupFromPathIndex].replace("/", "");
                } else {
                    found = language[0].replace("/", "");
                }
            }
        }
        return found;
    }
};
var subdomain = {
    name: "subdomain",
    lookup: function lookup8(options) {
        var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === "number" ? options.lookupFromSubdomainIndex + 1 : 1;
        var language = typeof window !== "undefined" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
        if (!language) return void 0;
        return language[lookupFromSubdomainIndex];
    }
};
function getDefaults() {
    return {
        order: [
            "querystring",
            "cookie",
            "localStorage",
            "sessionStorage",
            "navigator",
            "htmlTag"
        ],
        lookupQuerystring: "lng",
        lookupCookie: "i18next",
        lookupLocalStorage: "i18nextLng",
        lookupSessionStorage: "i18nextLng",
        caches: [
            "localStorage"
        ],
        excludeCacheFor: [
            "cimode"
        ],
        convertDetectedLanguage: function convertDetectedLanguage(l) {
            return l;
        }
    };
}
var Browser = function() {
    function Browser2(services) {
        var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        (0,_chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_0__._classCallCheck)(this, Browser2);
        this.type = "languageDetector";
        this.detectors = {};
        this.init(services, options);
    }
    (0,_chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_0__._createClass)(Browser2, [
        {
            key: "init",
            value: function init(services) {
                var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
                var i18nOptions = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
                this.services = services || {
                    languageUtils: {}
                };
                this.options = defaults(options, this.options || {}, getDefaults());
                if (typeof this.options.convertDetectedLanguage === "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1) {
                    this.options.convertDetectedLanguage = function(l) {
                        return l.replace("-", "_");
                    };
                }
                if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
                this.i18nOptions = i18nOptions;
                this.addDetector(cookie$1);
                this.addDetector(querystring);
                this.addDetector(localStorage);
                this.addDetector(sessionStorage);
                this.addDetector(navigator$1);
                this.addDetector(htmlTag);
                this.addDetector(path);
                this.addDetector(subdomain);
            }
        },
        {
            key: "addDetector",
            value: function addDetector(detector) {
                this.detectors[detector.name] = detector;
            }
        },
        {
            key: "detect",
            value: function detect(detectionOrder) {
                var _this = this;
                if (!detectionOrder) detectionOrder = this.options.order;
                var detected = [];
                detectionOrder.forEach(function(detectorName) {
                    if (_this.detectors[detectorName]) {
                        var lookup9 = _this.detectors[detectorName].lookup(_this.options);
                        if (lookup9 && typeof lookup9 === "string") lookup9 = [
                            lookup9
                        ];
                        if (lookup9) detected = detected.concat(lookup9);
                    }
                });
                detected = detected.map(function(d) {
                    return _this.options.convertDetectedLanguage(d);
                });
                if (this.services.languageUtils.getBestMatchFromCodes) return detected;
                return detected.length > 0 ? detected[0] : null;
            }
        },
        {
            key: "cacheUserLanguage",
            value: function cacheUserLanguage4(lng, caches) {
                var _this2 = this;
                if (!caches) caches = this.options.caches;
                if (!caches) return;
                if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
                caches.forEach(function(cacheName) {
                    if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
                });
            }
        }
    ]);
    return Browser2;
}();
Browser.type = "languageDetector";
// entry:i18next-browser-languagedetector
var i18next_browser_languagedetector_default = Browser;



/***/ })

}]);