"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function (e) { try {
    var r = fnToStr.call(e).replace(/\/\/.*\n/g, "").replace(/\/\*[.\s\S]*\*\//g, "").replace(/\n/gm, " ").replace(/ {2}/g, " ");
    return constructorRegex.test(r);
}
catch (e) {
    return !1;
} }, tryFunctionObject = function (e) { try {
    return !isES6ClassFn(e) && (fnToStr.call(e), !0);
}
catch (e) {
    return !1;
} }, toStr = Object.prototype.toString, fnClass = "[object Function]", genClass = "[object GeneratorFunction]", hasToStringTag = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag, isCallable = function (e) { if (!e)
    return !1; if ("function" != typeof e && "object" != typeof e)
    return !1; if (hasToStringTag)
    return tryFunctionObject(e); if (isES6ClassFn(e))
    return !1; var r = toStr.call(e); return r === fnClass || r === genClass; }, toStr$1 = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, forEachArray = function (e, r, t) { for (var o = 0, n = e.length; o < n; o++)
    hasOwnProperty.call(e, o) && (null == t ? r(e[o], o, e) : r.call(t, e[o], o, e)); }, forEachString = function (e, r, t) { for (var o = 0, n = e.length; o < n; o++)
    null == t ? r(e.charAt(o), o, e) : r.call(t, e.charAt(o), o, e); }, forEachObject = function (e, r, t) { for (var o in e)
    hasOwnProperty.call(e, o) && (null == t ? r(e[o], o, e) : r.call(t, e[o], o, e)); }, forEach = function (e, r, t) { if (!isCallable(r))
    throw new TypeError("iterator must be a function"); var o; arguments.length >= 3 && (o = t), "[object Array]" === toStr$1.call(e) ? forEachArray(e, r, o) : "string" == typeof e ? forEachString(e, r, o) : forEachObject(e, r, o); }, forEach_1 = forEach, warning = function () { }, warning_1 = warning, ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", slice = Array.prototype.slice, toStr$2 = Object.prototype.toString, funcType = "[object Function]", implementation = function (e) { var r = this; if ("function" != typeof r || toStr$2.call(r) !== funcType)
    throw new TypeError(ERROR_MESSAGE + r); for (var t, o = slice.call(arguments, 1), n = Math.max(0, r.length - o.length), a = [], i = 0; i < n; i++)
    a.push("$" + i); if (t = Function("binder", "return function (" + a.join(",") + "){ return binder.apply(this,arguments); }")(function () { if (this instanceof t) {
    var n = r.apply(this, o.concat(slice.call(arguments)));
    return Object(n) === n ? n : this;
} return r.apply(e, o.concat(slice.call(arguments))); }), r.prototype) {
    var l = function () { };
    l.prototype = r.prototype, t.prototype = new l, l.prototype = null;
} return t; }, functionBind = Function.prototype.bind || implementation, src = functionBind.call(Function.call, Object.prototype.hasOwnProperty), toStr$3 = Object.prototype.toString, isArguments = function (e) { var r = toStr$3.call(e), t = "[object Arguments]" === r; return t || (t = "[object Array]" !== r && null !== e && "object" == typeof e && "number" == typeof e.length && e.length >= 0 && "[object Function]" === toStr$3.call(e.callee)), t; }, has = Object.prototype.hasOwnProperty, toStr$4 = Object.prototype.toString, slice$1 = Array.prototype.slice, isEnumerable = Object.prototype.propertyIsEnumerable, hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"), hasProtoEnumBug = isEnumerable.call(function () { }, "prototype"), dontEnums = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], equalsConstructorPrototype = function (e) { var r = e.constructor; return r && r.prototype === e; }, excludedKeys = { $console: !0, $external: !0, $frame: !0, $frameElement: !0, $frames: !0, $innerHeight: !0, $innerWidth: !0, $outerHeight: !0, $outerWidth: !0, $pageXOffset: !0, $pageYOffset: !0, $parent: !0, $scrollLeft: !0, $scrollTop: !0, $scrollX: !0, $scrollY: !0, $self: !0, $webkitIndexedDB: !0, $webkitStorageInfo: !0, $window: !0 }, hasAutomationEqualityBug = function () { if ("undefined" == typeof window)
    return !1; for (var e in window)
    try {
        if (!excludedKeys["$" + e] && has.call(window, e) && null !== window[e] && "object" == typeof window[e])
            try {
                equalsConstructorPrototype(window[e]);
            }
            catch (e) {
                return !0;
            }
    }
    catch (e) {
        return !0;
    } return !1; }(), equalsConstructorPrototypeIfNotBuggy = function (e) { if ("undefined" == typeof window || !hasAutomationEqualityBug)
    return equalsConstructorPrototype(e); try {
    return equalsConstructorPrototype(e);
}
catch (e) {
    return !1;
} }, keysShim = function (e) { var r = null !== e && "object" == typeof e, t = "[object Function]" === toStr$4.call(e), o = isArguments(e), n = r && "[object String]" === toStr$4.call(e), a = []; if (!r && !t && !o)
    throw new TypeError("Object.keys called on a non-object"); var i = hasProtoEnumBug && t; if (n && e.length > 0 && !has.call(e, 0))
    for (var l = 0; l < e.length; ++l)
        a.push(String(l)); if (o && e.length > 0)
    for (var u = 0; u < e.length; ++u)
        a.push(String(u));
else
    for (var s in e)
        i && "prototype" === s || !has.call(e, s) || a.push(String(s)); if (hasDontEnumBug)
    for (var p = equalsConstructorPrototypeIfNotBuggy(e), c = 0; c < dontEnums.length; ++c)
        p && "constructor" === dontEnums[c] || !has.call(e, dontEnums[c]) || a.push(dontEnums[c]); return a; };
keysShim.shim = function () { if (Object.keys) {
    if (!function () { return 2 === (Object.keys(arguments) || "").length; }(1, 2)) {
        var e = Object.keys;
        Object.keys = function (r) { return isArguments(r) ? e(slice$1.call(r)) : e(r); };
    }
}
else
    Object.keys = keysShim; return Object.keys || keysShim; };
var objectKeys = keysShim, hasOwn = Object.prototype.hasOwnProperty, toString = Object.prototype.toString, foreach = function (e, r, t) { if ("[object Function]" !== toString.call(r))
    throw new TypeError("iterator must be a function"); var o = e.length; if (o === +o)
    for (var n = 0; n < o; n++)
        r.call(t, e[n], n, e);
else
    for (var a in e)
        hasOwn.call(e, a) && r.call(t, e[a], a, e); }, hasSymbols = "function" == typeof Symbol && "symbol" == typeof Symbol(), toStr$5 = Object.prototype.toString, isFunction = function (e) { return "function" == typeof e && "[object Function]" === toStr$5.call(e); }, arePropertyDescriptorsSupported = function () { var e = {}; try {
    for (var r in Object.defineProperty(e, "x", { enumerable: !1, value: e }), e)
        return !1;
    return e.x === e;
}
catch (e) {
    return !1;
} }, supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported(), defineProperty = function (e, r, t, o) { (!(r in e) || isFunction(o) && o()) && (supportsDescriptors ? Object.defineProperty(e, r, { configurable: !0, enumerable: !1, value: t, writable: !0 }) : e[r] = t); }, defineProperties = function (e, r) { var t = arguments.length > 2 ? arguments[2] : {}, o = objectKeys(r); hasSymbols && (o = o.concat(Object.getOwnPropertySymbols(r))), foreach(o, function (o) { defineProperty(e, o, r[o], t[o]); }); };
defineProperties.supportsDescriptors = !!supportsDescriptors;
var undefined$1, defineProperties_1 = defineProperties, ThrowTypeError = Object.getOwnPropertyDescriptor ? function () { return Object.getOwnPropertyDescriptor(arguments, "callee").get; }() : function () { throw new TypeError; }, hasSymbols$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator, getProto = Object.getPrototypeOf || function (e) { return e.__proto__; }, generatorFunction = undefined$1, asyncFunction = undefined$1, asyncGenFunction = undefined$1, TypedArray = "undefined" == typeof Uint8Array ? undefined$1 : getProto(Uint8Array), INTRINSICS = { "$ %Array%": Array, "$ %ArrayBuffer%": "undefined" == typeof ArrayBuffer ? undefined$1 : ArrayBuffer, "$ %ArrayBufferPrototype%": "undefined" == typeof ArrayBuffer ? undefined$1 : ArrayBuffer.prototype, "$ %ArrayIteratorPrototype%": hasSymbols$1 ? getProto([][Symbol.iterator]()) : undefined$1, "$ %ArrayPrototype%": Array.prototype, "$ %ArrayProto_entries%": Array.prototype.entries, "$ %ArrayProto_forEach%": Array.prototype.forEach, "$ %ArrayProto_keys%": Array.prototype.keys, "$ %ArrayProto_values%": Array.prototype.values, "$ %AsyncFromSyncIteratorPrototype%": undefined$1, "$ %AsyncFunction%": asyncFunction, "$ %AsyncFunctionPrototype%": undefined$1, "$ %AsyncGenerator%": undefined$1, "$ %AsyncGeneratorFunction%": asyncGenFunction, "$ %AsyncGeneratorPrototype%": undefined$1, "$ %AsyncIteratorPrototype%": undefined$1, "$ %Atomics%": "undefined" == typeof Atomics ? undefined$1 : Atomics, "$ %Boolean%": Boolean, "$ %BooleanPrototype%": Boolean.prototype, "$ %DataView%": "undefined" == typeof DataView ? undefined$1 : DataView, "$ %DataViewPrototype%": "undefined" == typeof DataView ? undefined$1 : DataView.prototype, "$ %Date%": Date, "$ %DatePrototype%": Date.prototype, "$ %decodeURI%": decodeURI, "$ %decodeURIComponent%": decodeURIComponent, "$ %encodeURI%": encodeURI, "$ %encodeURIComponent%": encodeURIComponent, "$ %Error%": Error, "$ %ErrorPrototype%": Error.prototype, "$ %eval%": eval, "$ %EvalError%": EvalError, "$ %EvalErrorPrototype%": EvalError.prototype, "$ %Float32Array%": "undefined" == typeof Float32Array ? undefined$1 : Float32Array, "$ %Float32ArrayPrototype%": "undefined" == typeof Float32Array ? undefined$1 : Float32Array.prototype, "$ %Float64Array%": "undefined" == typeof Float64Array ? undefined$1 : Float64Array, "$ %Float64ArrayPrototype%": "undefined" == typeof Float64Array ? undefined$1 : Float64Array.prototype, "$ %Function%": Function, "$ %FunctionPrototype%": Function.prototype, "$ %Generator%": undefined$1, "$ %GeneratorFunction%": generatorFunction, "$ %GeneratorPrototype%": undefined$1, "$ %Int8Array%": "undefined" == typeof Int8Array ? undefined$1 : Int8Array, "$ %Int8ArrayPrototype%": "undefined" == typeof Int8Array ? undefined$1 : Int8Array.prototype, "$ %Int16Array%": "undefined" == typeof Int16Array ? undefined$1 : Int16Array, "$ %Int16ArrayPrototype%": "undefined" == typeof Int16Array ? undefined$1 : Int8Array.prototype, "$ %Int32Array%": "undefined" == typeof Int32Array ? undefined$1 : Int32Array, "$ %Int32ArrayPrototype%": "undefined" == typeof Int32Array ? undefined$1 : Int32Array.prototype, "$ %isFinite%": isFinite, "$ %isNaN%": isNaN, "$ %IteratorPrototype%": hasSymbols$1 ? getProto(getProto([][Symbol.iterator]())) : undefined$1, "$ %JSON%": JSON, "$ %JSONParse%": JSON.parse, "$ %Map%": "undefined" == typeof Map ? undefined$1 : Map, "$ %MapIteratorPrototype%": "undefined" != typeof Map && hasSymbols$1 ? getProto((new Map)[Symbol.iterator]()) : undefined$1, "$ %MapPrototype%": "undefined" == typeof Map ? undefined$1 : Map.prototype, "$ %Math%": Math, "$ %Number%": Number, "$ %NumberPrototype%": Number.prototype, "$ %Object%": Object, "$ %ObjectPrototype%": Object.prototype, "$ %ObjProto_toString%": Object.prototype.toString, "$ %ObjProto_valueOf%": Object.prototype.valueOf, "$ %parseFloat%": parseFloat, "$ %parseInt%": parseInt, "$ %Promise%": "undefined" == typeof Promise ? undefined$1 : Promise, "$ %PromisePrototype%": "undefined" == typeof Promise ? undefined$1 : Promise.prototype, "$ %PromiseProto_then%": "undefined" == typeof Promise ? undefined$1 : Promise.prototype.then, "$ %Promise_all%": "undefined" == typeof Promise ? undefined$1 : Promise.all, "$ %Promise_reject%": "undefined" == typeof Promise ? undefined$1 : Promise.reject, "$ %Promise_resolve%": "undefined" == typeof Promise ? undefined$1 : Promise.resolve, "$ %Proxy%": "undefined" == typeof Proxy ? undefined$1 : Proxy, "$ %RangeError%": RangeError, "$ %RangeErrorPrototype%": RangeError.prototype, "$ %ReferenceError%": ReferenceError, "$ %ReferenceErrorPrototype%": ReferenceError.prototype, "$ %Reflect%": "undefined" == typeof Reflect ? undefined$1 : Reflect, "$ %RegExp%": RegExp, "$ %RegExpPrototype%": RegExp.prototype, "$ %Set%": "undefined" == typeof Set ? undefined$1 : Set, "$ %SetIteratorPrototype%": "undefined" != typeof Set && hasSymbols$1 ? getProto((new Set)[Symbol.iterator]()) : undefined$1, "$ %SetPrototype%": "undefined" == typeof Set ? undefined$1 : Set.prototype, "$ %SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? undefined$1 : SharedArrayBuffer, "$ %SharedArrayBufferPrototype%": "undefined" == typeof SharedArrayBuffer ? undefined$1 : SharedArrayBuffer.prototype, "$ %String%": String, "$ %StringIteratorPrototype%": hasSymbols$1 ? getProto(""[Symbol.iterator]()) : undefined$1, "$ %StringPrototype%": String.prototype, "$ %Symbol%": hasSymbols$1 ? Symbol : undefined$1, "$ %SymbolPrototype%": hasSymbols$1 ? Symbol.prototype : undefined$1, "$ %SyntaxError%": SyntaxError, "$ %SyntaxErrorPrototype%": SyntaxError.prototype, "$ %ThrowTypeError%": ThrowTypeError, "$ %TypedArray%": TypedArray, "$ %TypedArrayPrototype%": TypedArray ? TypedArray.prototype : undefined$1, "$ %TypeError%": TypeError, "$ %TypeErrorPrototype%": TypeError.prototype, "$ %Uint8Array%": "undefined" == typeof Uint8Array ? undefined$1 : Uint8Array, "$ %Uint8ArrayPrototype%": "undefined" == typeof Uint8Array ? undefined$1 : Uint8Array.prototype, "$ %Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? undefined$1 : Uint8ClampedArray, "$ %Uint8ClampedArrayPrototype%": "undefined" == typeof Uint8ClampedArray ? undefined$1 : Uint8ClampedArray.prototype, "$ %Uint16Array%": "undefined" == typeof Uint16Array ? undefined$1 : Uint16Array, "$ %Uint16ArrayPrototype%": "undefined" == typeof Uint16Array ? undefined$1 : Uint16Array.prototype, "$ %Uint32Array%": "undefined" == typeof Uint32Array ? undefined$1 : Uint32Array, "$ %Uint32ArrayPrototype%": "undefined" == typeof Uint32Array ? undefined$1 : Uint32Array.prototype, "$ %URIError%": URIError, "$ %URIErrorPrototype%": URIError.prototype, "$ %WeakMap%": "undefined" == typeof WeakMap ? undefined$1 : WeakMap, "$ %WeakMapPrototype%": "undefined" == typeof WeakMap ? undefined$1 : WeakMap.prototype, "$ %WeakSet%": "undefined" == typeof WeakSet ? undefined$1 : WeakSet, "$ %WeakSetPrototype%": "undefined" == typeof WeakSet ? undefined$1 : WeakSet.prototype }, GetIntrinsic = function (e, r) { if (arguments.length > 1 && "boolean" != typeof r)
    throw new TypeError('"allowMissing" argument must be a boolean'); var t = "$ " + e; if (!(t in INTRINSICS))
    throw new SyntaxError("intrinsic " + e + " does not exist!"); if (void 0 === INTRINSICS[t] && !r)
    throw new TypeError("intrinsic " + e + " exists, but is not available. Please file an issue!"); return INTRINSICS[t]; }, _isNaN = Number.isNaN || function (e) { return e != e; }, $isNaN = Number.isNaN || function (e) { return e != e; }, _isFinite = Number.isFinite || function (e) { return "number" == typeof e && !$isNaN(e) && e !== 1 / 0 && e !== -1 / 0; }, sign = function (e) { return e >= 0 ? 1 : -1; }, mod = function (e, r) { var t = e % r; return Math.floor(t >= 0 ? t : t + r); }, isPrimitive = function (e) { return null === e || "function" != typeof e && "object" != typeof e; }, toStr$6 = Object.prototype.toString, ES5internalSlots = { "[[DefaultValue]]": function (e, r) { var t = r || ("[object Date]" === toStr$6.call(e) ? String : Number); if (t === String || t === Number) {
        var o, n, a = t === String ? ["toString", "valueOf"] : ["valueOf", "toString"];
        for (n = 0; n < a.length; ++n)
            if (isCallable(e[a[n]]) && (o = e[a[n]](), isPrimitive(o)))
                return o;
        throw new TypeError("No default value");
    } throw new TypeError("invalid [[DefaultValue]] hint supplied"); } }, es5 = function (e, r) { return isPrimitive(e) ? e : ES5internalSlots["[[DefaultValue]]"](e, r); }, $Object = GetIntrinsic("%Object%"), $TypeError = GetIntrinsic("%TypeError%"), $String = GetIntrinsic("%String%"), ES5 = { ToPrimitive: es5, ToBoolean: function (e) { return !!e; }, ToNumber: function (e) { return +e; }, ToInteger: function (e) { var r = this.ToNumber(e); return _isNaN(r) ? 0 : 0 !== r && _isFinite(r) ? sign(r) * Math.floor(Math.abs(r)) : r; }, ToInt32: function (e) { return this.ToNumber(e) >> 0; }, ToUint32: function (e) { return this.ToNumber(e) >>> 0; }, ToUint16: function (e) { var r = this.ToNumber(e); if (_isNaN(r) || 0 === r || !_isFinite(r))
        return 0; var t = sign(r) * Math.floor(Math.abs(r)); return mod(t, 65536); }, ToString: function (e) { return $String(e); }, ToObject: function (e) { return this.CheckObjectCoercible(e), $Object(e); }, CheckObjectCoercible: function (e, r) { if (null == e)
        throw new $TypeError(r || "Cannot call method on " + e); return e; }, IsCallable: isCallable, SameValue: function (e, r) { return e === r ? 0 !== e || 1 / e == 1 / r : _isNaN(e) && _isNaN(r); }, Type: function (e) { return null === e ? "Null" : void 0 === e ? "Undefined" : "function" == typeof e || "object" == typeof e ? "Object" : "number" == typeof e ? "Number" : "boolean" == typeof e ? "Boolean" : "string" == typeof e ? "String" : void 0; }, IsPropertyDescriptor: function (e) { if ("Object" !== this.Type(e))
        return !1; var r = { "[[Configurable]]": !0, "[[Enumerable]]": !0, "[[Get]]": !0, "[[Set]]": !0, "[[Value]]": !0, "[[Writable]]": !0 }; for (var t in e)
        if (src(e, t) && !r[t])
            return !1; var o = src(e, "[[Value]]"), n = src(e, "[[Get]]") || src(e, "[[Set]]"); if (o && n)
        throw new $TypeError("Property Descriptors may not be both accessor and data descriptors"); return !0; }, IsAccessorDescriptor: function (e) { if (void 0 === e)
        return !1; if (!this.IsPropertyDescriptor(e))
        throw new $TypeError("Desc must be a Property Descriptor"); return !(!src(e, "[[Get]]") && !src(e, "[[Set]]")); }, IsDataDescriptor: function (e) { if (void 0 === e)
        return !1; if (!this.IsPropertyDescriptor(e))
        throw new $TypeError("Desc must be a Property Descriptor"); return !(!src(e, "[[Value]]") && !src(e, "[[Writable]]")); }, IsGenericDescriptor: function (e) { if (void 0 === e)
        return !1; if (!this.IsPropertyDescriptor(e))
        throw new $TypeError("Desc must be a Property Descriptor"); return !this.IsAccessorDescriptor(e) && !this.IsDataDescriptor(e); }, FromPropertyDescriptor: function (e) { if (void 0 === e)
        return e; if (!this.IsPropertyDescriptor(e))
        throw new $TypeError("Desc must be a Property Descriptor"); if (this.IsDataDescriptor(e))
        return { value: e["[[Value]]"], writable: !!e["[[Writable]]"], enumerable: !!e["[[Enumerable]]"], configurable: !!e["[[Configurable]]"] }; if (this.IsAccessorDescriptor(e))
        return { get: e["[[Get]]"], set: e["[[Set]]"], enumerable: !!e["[[Enumerable]]"], configurable: !!e["[[Configurable]]"] }; throw new $TypeError("FromPropertyDescriptor must be called with a fully populated Property Descriptor"); }, ToPropertyDescriptor: function (e) { if ("Object" !== this.Type(e))
        throw new $TypeError("ToPropertyDescriptor requires an object"); var r = {}; if (src(e, "enumerable") && (r["[[Enumerable]]"] = this.ToBoolean(e.enumerable)), src(e, "configurable") && (r["[[Configurable]]"] = this.ToBoolean(e.configurable)), src(e, "value") && (r["[[Value]]"] = e.value), src(e, "writable") && (r["[[Writable]]"] = this.ToBoolean(e.writable)), src(e, "get")) {
        var t = e.get;
        if (void 0 !== t && !this.IsCallable(t))
            throw new TypeError("getter must be a function");
        r["[[Get]]"] = t;
    } if (src(e, "set")) {
        var o = e.set;
        if (void 0 !== o && !this.IsCallable(o))
            throw new $TypeError("setter must be a function");
        r["[[Set]]"] = o;
    } if ((src(r, "[[Get]]") || src(r, "[[Set]]")) && (src(r, "[[Value]]") || src(r, "[[Writable]]")))
        throw new $TypeError("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute"); return r; } }, es5$1 = ES5, replace = functionBind.call(Function.call, String.prototype.replace), leftWhitespace = /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/, rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/, implementation$1 = function () { var e = es5$1.ToString(es5$1.CheckObjectCoercible(this)); return replace(replace(e, leftWhitespace, ""), rightWhitespace, ""); }, zeroWidthSpace = "​", polyfill = function () { return String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace ? String.prototype.trim : implementation$1; }, shim = function () { var e = polyfill(); return defineProperties_1(String.prototype, { trim: e }, { trim: function () { return String.prototype.trim !== e; } }), e; }, boundTrim = functionBind.call(Function.call, polyfill());
defineProperties_1(boundTrim, { getPolyfill: polyfill, implementation: implementation$1, shim: shim });
var string_prototype_trim = boundTrim, warn = function (e) { warning_1(!1, e); }, replace$1 = String.prototype.replace, split = String.prototype.split, delimeter = "||||", pluralTypes = { arabic: function (e) { return e < 3 ? e : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5; }, chinese: function () { return 0; }, german: function (e) { return 1 !== e ? 1 : 0; }, french: function (e) { return e > 1 ? 1 : 0; }, russian: function (e) { return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2; }, czech: function (e) { return 1 === e ? 0 : e >= 2 && e <= 4 ? 1 : 2; }, polish: function (e) { return 1 === e ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2; }, icelandic: function (e) { return e % 10 != 1 || e % 100 == 11 ? 1 : 0; } }, pluralTypeToLanguages = { arabic: ["ar"], chinese: ["fa", "id", "ja", "ko", "lo", "ms", "th", "tr", "zh"], german: ["da", "de", "en", "es", "fi", "el", "he", "hu", "it", "nl", "no", "pt", "sv"], french: ["fr", "tl", "pt-br"], russian: ["hr", "ru", "lt"], czech: ["cs", "sk"], polish: ["pl"], icelandic: ["is"] };
function langToTypeMap(e) { var r = {}; return forEach_1(e, function (e, t) { forEach_1(e, function (e) { r[e] = t; }); }), r; }
function pluralTypeName(e) { var r = langToTypeMap(pluralTypeToLanguages); return r[e] || r[split.call(e, /-/, 1)[0]] || r.en; }
function pluralTypeIndex(e, r) { return pluralTypes[pluralTypeName(e)](r); }
var dollarRegex = /\$/g, dollarBillsYall = "$$", tokenRegex = /%\{(.*?)\}/g;
function transformPhrase(e, r, t) { if ("string" != typeof e)
    throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string"); if (null == r)
    return e; var o = e, n = "number" == typeof r ? { smart_count: r } : r; if (null != n.smart_count && o) {
    var a = split.call(o, delimeter);
    o = string_prototype_trim(a[pluralTypeIndex(t || "en", n.smart_count)] || a[0]);
} return replace$1.call(o, tokenRegex, function (e, r) { return src(n, r) && null != n[r] ? replace$1.call(n[r], dollarRegex, dollarBillsYall) : e; }); }
function Polyglot(e) { var r = e || {}; this.phrases = {}, this.extend(r.phrases || {}), this.currentLocale = r.locale || "en", this.onMissingKey = "function" == typeof r.onMissingKey ? r.onMissingKey : r.allowMissing ? transformPhrase : null, this.warn = r.warn || warn; }
Polyglot.prototype.locale = function (e) { return e && (this.currentLocale = e), this.currentLocale; }, Polyglot.prototype.extend = function (e, r) { forEach_1(e, function (e, t) { var o = r ? r + "." + t : t; "object" == typeof e ? this.extend(e, o) : this.phrases[o] = e; }, this); }, Polyglot.prototype.unset = function (e, r) { "string" == typeof e ? delete this.phrases[e] : forEach_1(e, function (e, t) { var o = r ? r + "." + t : t; "object" == typeof e ? this.unset(e, o) : delete this.phrases[o]; }, this); }, Polyglot.prototype.clear = function () { this.phrases = {}; }, Polyglot.prototype.replace = function (e) { this.clear(), this.extend(e); }, Polyglot.prototype.t = function (e, r) { var t, o, n = null == r ? {} : r; return "string" == typeof this.phrases[e] ? t = this.phrases[e] : "string" == typeof n._ ? t = n._ : this.onMissingKey ? o = (0, this.onMissingKey)(e, n, this.currentLocale) : (this.warn('Missing translation for key: "' + e + '"'), o = e), "string" == typeof t && (o = transformPhrase(t, n, this.currentLocale)), o; }, Polyglot.prototype.has = function (e) { return src(this.phrases, e); }, Polyglot.transformPhrase = transformPhrase;
var nodePolyglot = Polyglot, phrases = { webmapgl: { "attribute-values": { header: "Feature" }, "address-search": { prompt: "Search by address or place name…" }, app: { menulabel: "Legend" }, "basemap-switcher": { header: "Select a Basemap" }, basemaps: { title: "Change basemap" }, "draw-toolbar": { cancel: "Cancel", confirm: "Continue", label: "Add a Feature" }, "drawer-toggle": { label: "Toggle drawer" }, "download-button": { title: "Download files" }, "download-list": { header: "Select Files to Download", download: "Download %{file}" }, "feature-add": { success: "Saved successfully.", failure: "An error occurred while saving.", label: "Add a Feature" }, "feature-list": { loading: "Loading..." }, field: { required: "%{field} is required." }, "form-page": { back: "Back", submit: "Save", cancel: "Cancel" }, fullscreen: { enter: "Enter fullscreen mode", exit: "Exit fullscreen mode" }, table: { header: { "sort-action": { asc: "activate to sort column descending", desc: "activate to sort column ascending" } } }, "table-column-visibility": { close: "Close column visibility", label: "Column Visibility" } } }, phrases$1 = { webmapgl: { "attribute-values": { header: "Característica" }, "address-search": { prompt: "Buscar por dirección o nombre de lugar…" }, app: { menulabel: "Leyenda" }, "basemap-switcher": { header: "Seleccione un mapa base" }, basemaps: { title: "Cambie mapa base" }, "draw-toolbar": { cancel: "Cancelar", confirm: "Continuar", label: "Agrega una característica" }, "drawer-toggle": { label: "Cambia de opcion" }, "download-button": { title: "Descargar archivos" }, "download-list": { header: "Seleccione archivos para descargar", download: "Descargar %{file}" }, "feature-add": { success: "Guardado exitosamente.", failure: "Se produjo un error al guardar.", label: "Agrega una característica" }, "feature-list": { loading: "Cargando..." }, field: { required: "%{field} es requerido." }, "form-page": { back: "Atrás", submit: "Salvar", cancel: "Cancelar" }, fullscreen: { enter: "Ingresa al modo de pantalla completa", exit: "Sal del modo de pantalla completa" }, table: { header: { "sort-action": { asc: "activar para ordenar la columna descendente", desc: "activar para ordenar la columna ascendente" } } }, "table-column-visibility": { close: "Cerrar la visibilidad de columnas", label: "Visibilidad de Columnas" } } }, phraseMap = { en: phrases, es: phrases$1 };
function getLang(e) { return document && document.querySelector("html").lang || e; }
window.polyglot = window.polyglot || new nodePolyglot({ locale: getLang("en") });
var polyglot = window.polyglot, locale = polyglot.locale();
function _t(e, r) { return polyglot.t(e, r); }
exports.a = _t;
polyglot.extend(phrases), "en" !== locale && polyglot.extend(phraseMap[locale] || {});
