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uC,KAAKe,YAAY7C,GACjB8B,KAAKe,YAAYpC,GACjBqB,KAAKe,YAAYlC,GACjBmB,KAAKe,YAAY5B,GACjBa,KAAKe,YAAY9E,GACjB+D,KAAKe,YAAYpB,EACnB,GACC,CACDS,IAAK,cACLzE,MAAO,SAAqBqF,GAC1BhB,KAAKE,UAAUc,EAASvG,MAAQuG,CAClC,GACC,CACDZ,IAAK,SACLzE,MAAO,SAAgBsF,GACrB,IAAIC,EAAQlB,KAEPiB,IAAgBA,EAAiBjB,KAAKrF,QAAQgG,OACnD,IAAIQ,EAAW,GASf,OARAF,EAAe5G,SAAQ,SAAU+G,GAC/B,GAAIF,EAAMhB,UAAUkB,GAAe,CACjC,IAAI1G,EAASwG,EAAMhB,UAAUkB,GAAc1G,OAAOwG,EAAMvG,SAEpDD,GAA4B,iBAAXA,IAAqBA,EAAS,CAACA,IAChDA,IAAQyG,EAAWA,EAASE,OAAO3G,GACzC,CACF,IACIsF,KAAKD,SAASuB,cAAcC,sBAA8BJ,EAEvDA,EAAS9F,OAAS,EAAI8F,EAAS,GAAK,IAC7C,GACC,CACDf,IAAK,oBACLzE,MAAO,SAA2BD,EAAKkF,GACrC,IAAIY,EAASxB,KAERY,IAAQA,EAASZ,KAAKrF,QAAQiG,QAC9BA,IACDZ,KAAKrF,QAAQkG,iBAAmBb,KAAKrF,QAAQkG,gBAAgBrF,QAAQE,IAAQ,GACjFkF,EAAOvG,SAAQ,SAAUoH,GACnBD,EAAOtB,UAAUuB,IAAYD,EAAOtB,UAAUuB,GAAWhG,kBAAkBC,EAAK8F,EAAO7G,QAC7F,IACF,KAGKmF,CACT,CArE2B,GAuE3BA,EAAQG,KAAO,kB","sources":["webpack://drbinaryweb/./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js"],"sourcesContent":["import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nfunction defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\n\n// eslint-disable-next-line no-control-regex\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nvar serializeCookie = function serializeCookie(name, val, options) {\n var opt = options || {};\n opt.path = opt.path || '/';\n var value = encodeURIComponent(val);\n var str = name + '=' + value;\n\n if (opt.maxAge > 0) {\n var maxAge = opt.maxAge - 0;\n if (isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += '; Domain=' + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += '; Path=' + opt.path;\n }\n\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n\n str += '; Expires=' + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n\n case 'lax':\n str += '; SameSite=Lax';\n break;\n\n case 'strict':\n str += '; SameSite=Strict';\n break;\n\n case 'none':\n str += '; SameSite=None';\n break;\n\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n};\n\nvar cookie = {\n create: function create(name, value, minutes, domain) {\n var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);\n },\n read: function read(name) {\n var nameEQ = name + '=';\n var ca = document.cookie.split(';');\n\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n\n return null;\n },\n remove: function remove(name) {\n this.create(name, '', -1);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupCookie && typeof document !== 'undefined') {\n var c = cookie.read(options.lookupCookie);\n if (c) found = c;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupCookie && typeof document !== 'undefined') {\n cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var query = window.location.search.substring(1);\n var params = query.split('&');\n\n for (var i = 0; i < params.length; i++) {\n var pos = params[i].indexOf('=');\n\n if (pos > 0) {\n var key = params[i].substring(0, pos);\n\n if (key === options.lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n\n return found;\n }\n};\n\nvar hasLocalStorageSupport = null;\n\nvar localStorageAvailable = function localStorageAvailable() {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n\n try {\n hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n\n return hasLocalStorageSupport;\n};\n\nvar localStorage = {\n name: 'localStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupLocalStorage && localStorageAvailable()) {\n var lng = window.localStorage.getItem(options.lookupLocalStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(options.lookupLocalStorage, lng);\n }\n }\n};\n\nvar hasSessionStorageSupport = null;\n\nvar sessionStorageAvailable = function sessionStorageAvailable() {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n\n try {\n hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n\n return hasSessionStorageSupport;\n};\n\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n var lng = window.sessionStorage.getItem(options.lookupSessionStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(options.lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup: function lookup(options) {\n var found = [];\n\n if (typeof navigator !== 'undefined') {\n if (navigator.languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (var i = 0; i < navigator.languages.length; i++) {\n found.push(navigator.languages[i]);\n }\n }\n\n if (navigator.userLanguage) {\n found.push(navigator.userLanguage);\n }\n\n if (navigator.language) {\n found.push(navigator.language);\n }\n }\n\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n lookup: function lookup(options) {\n var found;\n var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n found = htmlTag.getAttribute('lang');\n }\n\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n\n if (language instanceof Array) {\n if (typeof options.lookupFromPathIndex === 'number') {\n if (typeof language[options.lookupFromPathIndex] !== 'string') {\n return undefined;\n }\n\n found = language[options.lookupFromPathIndex].replace('/', '');\n } else {\n found = language[0].replace('/', '');\n }\n }\n }\n\n return found;\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var language = window.location.href.match(/(?:http[s]*\\:\\/\\/)*(.*?)\\.(?=[^\\/]*\\..{2,5})/gi);\n\n if (language instanceof Array) {\n if (typeof options.lookupFromSubdomainIndex === 'number') {\n found = language[options.lookupFromSubdomainIndex].replace('http://', '').replace('https://', '').replace('.', '');\n } else {\n found = language[0].replace('http://', '').replace('https://', '').replace('.', '');\n }\n }\n }\n\n return found;\n }\n};\n\nfunction getDefaults() {\n return {\n order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'] //cookieMinutes: 10,\n //cookieDomain: 'myDomain'\n\n };\n}\n\nvar Browser = /*#__PURE__*/function () {\n function Browser(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Browser);\n\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n\n _createClass(Browser, [{\n key: \"init\",\n value: function init(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults()); // backwards compatibility\n\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n }\n }, {\n key: \"addDetector\",\n value: function addDetector(detector) {\n this.detectors[detector.name] = detector;\n }\n }, {\n key: \"detect\",\n value: function detect(detectionOrder) {\n var _this = this;\n\n if (!detectionOrder) detectionOrder = this.options.order;\n var detected = [];\n detectionOrder.forEach(function (detectorName) {\n if (_this.detectors[detectorName]) {\n var lookup = _this.detectors[detectorName].lookup(_this.options);\n\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n }, {\n key: \"cacheUserLanguage\",\n value: function cacheUserLanguage(lng, caches) {\n var _this2 = this;\n\n if (!caches) caches = this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(function (cacheName) {\n if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);\n });\n }\n }]);\n\n return Browser;\n}();\n\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n"],"names":["arr","each","forEach","slice","fieldContentRegExp","cookie$1","name","lookup","options","found","lookupCookie","document","c","nameEQ","ca","cookie","split","i","length","charAt","substring","indexOf","cacheUserLanguage","lng","value","minutes","domain","cookieOptions","arguments","undefined","path","sameSite","expires","Date","setTime","getTime","val","opt","str","encodeURIComponent","maxAge","isNaN","Error","Math","floor","test","TypeError","toUTCString","httpOnly","secure","toLowerCase","serializeCookie","cookieMinutes","cookieDomain","querystring","window","params","location","search","pos","lookupQuerystring","hasLocalStorageSupport","localStorageAvailable","localStorage","testKey","setItem","removeItem","e","lookupLocalStorage","getItem","hasSessionStorageSupport","sessionStorageAvailable","sessionStorage","lookupSessionStorage","navigator$1","navigator","languages","push","userLanguage","language","htmlTag","documentElement","getAttribute","pathname","match","Array","lookupFromPathIndex","replace","subdomain","href","lookupFromSubdomainIndex","Browser","services","this","type","detectors","init","key","i18nOptions","obj","call","source","prop","defaults","order","caches","excludeCacheFor","lookupFromUrlIndex","addDetector","detector","detectionOrder","_this","detected","detectorName","concat","languageUtils","getBestMatchFromCodes","_this2","cacheName"],"sourceRoot":""}