{ "version": 3, "sources": ["../../../node_modules/obj-case/index.js", "../../../node_modules/@segment/facade/lib/address.js", "../../../node_modules/@segment/facade/lib/clone.js", "../../../node_modules/@segment/facade/lib/is-enabled.js", "../../../node_modules/@segment/isodate/lib/index.js", "../../../node_modules/new-date/lib/milliseconds.js", "../../../node_modules/new-date/lib/seconds.js", "../../../node_modules/new-date/lib/index.js", "../../../node_modules/@segment/isodate-traverse/lib/index.js", "../../../node_modules/@segment/facade/lib/facade.js", "../../../node_modules/inherits/inherits_browser.js", "../../../node_modules/@segment/facade/lib/alias.js", "../../../node_modules/@segment/facade/lib/is-email.js", "../../../node_modules/@segment/facade/lib/group.js", "../../../node_modules/@segment/facade/lib/identify.js", "../../../node_modules/@segment/facade/lib/track.js", "../../../node_modules/@segment/facade/lib/page.js", "../../../node_modules/@segment/facade/lib/screen.js", "../../../node_modules/@segment/facade/lib/delete.js", "../../../node_modules/@segment/facade/lib/index.js", "../../../node_modules/dset/dist/index.mjs", "../../../node_modules/@segment/analytics-core/src/context/index.ts", "../../../node_modules/@lukeed/uuid/dist/index.mjs", "../../../node_modules/@segment/analytics-core/src/logger/index.ts", "../../../node_modules/@segment/analytics-core/src/stats/index.ts", "../../../node_modules/@june-so/analytics-next/src/lib/fetch.ts", "../../../node_modules/unfetch/src/index.mjs", "../../../node_modules/@june-so/analytics-next/src/lib/get-global.ts", "../../../node_modules/@june-so/analytics-next/src/generated/version.ts", "../../../node_modules/@june-so/analytics-next/node_modules/js-cookie/dist/js.cookie.mjs", "../../../node_modules/@june-so/analytics-next/src/core/user/tld.ts", "../../../node_modules/@june-so/analytics-next/src/lib/bind-all.ts", "../../../node_modules/@june-so/analytics-next/src/core/user/index.ts", "../../../node_modules/@june-so/analytics-next/src/plugins/segmentio/normalize.ts", "../../../node_modules/@june-so/analytics-next/src/core/stats/remote-metrics.ts", "../../../node_modules/@june-so/analytics-next/src/core/stats/index.ts", "../../../node_modules/@june-so/analytics-next/src/core/context/index.ts", "../../../node_modules/@june-so/analytics-next/src/lib/to-facade.ts", "../../../node_modules/@june-so/analytics-next/src/plugins/middleware/index.ts"], "sourcesContent": ["\nvar identity = function(_){ return _; };\n\n\n/**\n * Module exports, export\n */\n\nmodule.exports = multiple(find);\nmodule.exports.find = module.exports;\n\n\n/**\n * Export the replacement function, return the modified object\n */\n\nmodule.exports.replace = function (obj, key, val, options) {\n multiple(replace).call(this, obj, key, val, options);\n return obj;\n};\n\n\n/**\n * Export the delete function, return the modified object\n */\n\nmodule.exports.del = function (obj, key, options) {\n multiple(del).call(this, obj, key, null, options);\n return obj;\n};\n\n\n/**\n * Compose applying the function to a nested key\n */\n\nfunction multiple (fn) {\n return function (obj, path, val, options) {\n var normalize = options && isFunction(options.normalizer) ? options.normalizer : defaultNormalize;\n path = normalize(path);\n\n var key;\n var finished = false;\n\n while (!finished) loop();\n\n function loop() {\n for (key in obj) {\n var normalizedKey = normalize(key);\n if (0 === path.indexOf(normalizedKey)) {\n var temp = path.substr(normalizedKey.length);\n if (temp.charAt(0) === '.' || temp.length === 0) {\n path = temp.substr(1);\n var child = obj[key];\n\n // we're at the end and there is nothing.\n if (null == child) {\n finished = true;\n return;\n }\n\n // we're at the end and there is something.\n if (!path.length) {\n finished = true;\n return;\n }\n\n // step into child\n obj = child;\n\n // but we're done here\n return;\n }\n }\n }\n\n key = undefined;\n // if we found no matching properties\n // on the current object, there's no match.\n finished = true;\n }\n\n if (!key) return;\n if (null == obj) return obj;\n\n // the `obj` and `key` is one above the leaf object and key, so\n // start object: { a: { 'b.c': 10 } }\n // end object: { 'b.c': 10 }\n // end key: 'b.c'\n // this way, you can do `obj[key]` and get `10`.\n return fn(obj, key, val);\n };\n}\n\n\n/**\n * Find an object by its key\n *\n * find({ first_name : 'Calvin' }, 'firstName')\n */\n\nfunction find (obj, key) {\n if (obj.hasOwnProperty(key)) return obj[key];\n}\n\n\n/**\n * Delete a value for a given key\n *\n * del({ a : 'b', x : 'y' }, 'X' }) -> { a : 'b' }\n */\n\nfunction del (obj, key) {\n if (obj.hasOwnProperty(key)) delete obj[key];\n return obj;\n}\n\n\n/**\n * Replace an objects existing value with a new one\n *\n * replace({ a : 'b' }, 'a', 'c') -> { a : 'c' }\n */\n\nfunction replace (obj, key, val) {\n if (obj.hasOwnProperty(key)) obj[key] = val;\n return obj;\n}\n\n/**\n * Normalize a `dot.separated.path`.\n *\n * A.HELL(!*&#(!)O_WOR LD.bar => ahelloworldbar\n *\n * @param {String} path\n * @return {String}\n */\n\nfunction defaultNormalize(path) {\n return path.replace(/[^a-zA-Z0-9\\.]+/g, '').toLowerCase();\n}\n\n/**\n * Check if a value is a function.\n *\n * @param {*} val\n * @return {boolean} Returns `true` if `val` is a function, otherwise `false`.\n */\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\n", "\"use strict\";\n\nimport get from \"obj-case\";\n\nfunction trait(a, b) {\n return function () {\n // @ts-ignore\n let traits = this.traits();\n // @ts-ignore\n let props = this.properties ? this.properties() : {};\n\n return (\n get(traits, \"address.\" + a) ||\n get(traits, a) ||\n (b ? get(traits, \"address.\" + b) : null) ||\n (b ? get(traits, b) : null) ||\n get(props, \"address.\" + a) ||\n get(props, a) ||\n (b ? get(props, \"address.\" + b) : null) ||\n (b ? get(props, b) : null)\n );\n };\n}\n\n/**\n * Add address getters to `proto`.\n *\n * @ignore\n * @param {Function} proto\n */\nexport default function (proto) {\n proto.zip = trait(\"postalCode\", \"zip\");\n proto.country = trait(\"country\");\n proto.street = trait(\"street\");\n proto.state = trait(\"state\");\n proto.city = trait(\"city\");\n proto.region = trait(\"region\");\n}\n", "export function clone(properties) {\n if (typeof properties !== 'object') return properties\n\n if (Object.prototype.toString.call(properties) === '[object Object]') {\n const temp = {};\n for (const key in properties) {\n if (Object.prototype.hasOwnProperty.call(properties, key)) {\n temp[key] = clone(properties[key]);\n }\n }\n return temp;\n } else if (Array.isArray(properties)) {\n return properties.map(clone);\n } else {\n // this is dangerous because it means this is not cloned\n return properties;\n }\n}\n", "\"use strict\";\n\n// A few integrations are disabled by default. They must be explicitly enabled\n// by setting options[Provider] = true.\nlet disabled = {\n Salesforce: true,\n};\n\n/**\n * Check whether an integration should be enabled by default.\n *\n * @ignore\n * @param {string} integration\n * @return {boolean}\n */\nexport default function (integration) {\n return !disabled[integration];\n}\n", "'use strict';\n\n/**\n * Matcher, slightly modified from:\n *\n * https://github.com/csnover/js-iso8601/blob/lax/iso8601.js\n */\n\nvar matcher = /^(\\d{4})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:([ T])(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\n\n/**\n * Convert an ISO date string to a date. Fallback to native `Date.parse`.\n *\n * https://github.com/csnover/js-iso8601/blob/lax/iso8601.js\n *\n * @param {String} iso\n * @return {Date}\n */\n\nexports.parse = function(iso) {\n var numericKeys = [1, 5, 6, 7, 11, 12];\n var arr = matcher.exec(iso);\n var offset = 0;\n\n // fallback to native parsing\n if (!arr) {\n return new Date(iso);\n }\n\n /* eslint-disable no-cond-assign */\n // remove undefined values\n for (var i = 0, val; val = numericKeys[i]; i++) {\n arr[val] = parseInt(arr[val], 10) || 0;\n }\n /* eslint-enable no-cond-assign */\n\n // allow undefined days and months\n arr[2] = parseInt(arr[2], 10) || 1;\n arr[3] = parseInt(arr[3], 10) || 1;\n\n // month is 0-11\n arr[2]--;\n\n // allow abitrary sub-second precision\n arr[8] = arr[8] ? (arr[8] + '00').substring(0, 3) : 0;\n\n // apply timezone if one exists\n if (arr[4] === ' ') {\n offset = new Date().getTimezoneOffset();\n } else if (arr[9] !== 'Z' && arr[10]) {\n offset = arr[11] * 60 + arr[12];\n if (arr[10] === '+') {\n offset = 0 - offset;\n }\n }\n\n var millis = Date.UTC(arr[1], arr[2], arr[3], arr[5], arr[6] + offset, arr[7], arr[8]);\n return new Date(millis);\n};\n\n\n/**\n * Checks whether a `string` is an ISO date string. `strict` mode requires that\n * the date string at least have a year, month and date.\n *\n * @param {String} string\n * @param {Boolean} strict\n * @return {Boolean}\n */\n\nexports.is = function(string, strict) {\n if (typeof string !== 'string') {\n return false;\n }\n if (strict && (/^\\d{4}-\\d{2}-\\d{2}/).test(string) === false) {\n return false;\n }\n return matcher.test(string);\n};\n", "\"use strict\";\n\n/**\n * Matcher.\n */\n\nvar matcher = /\\d{13}/;\n\n/**\n * Check whether a string is a millisecond date string.\n *\n * @param {string} string\n * @return {boolean}\n */\nexports.is = function (string) {\n return matcher.test(string);\n};\n\n/**\n * Convert a millisecond string to a date.\n *\n * @param {string} millis\n * @return {Date}\n */\nexports.parse = function (millis) {\n millis = parseInt(millis, 10);\n return new Date(millis);\n};\n", "\"use strict\";\n\n/**\n * Matcher.\n */\n\nvar matcher = /\\d{10}/;\n\n/**\n * Check whether a string is a second date string.\n *\n * @param {string} string\n * @return {Boolean}\n */\nexports.is = function (string) {\n return matcher.test(string);\n};\n\n/**\n * Convert a second string to a date.\n *\n * @param {string} seconds\n * @return {Date}\n */\nexports.parse = function (seconds) {\n var millis = parseInt(seconds, 10) * 1000;\n return new Date(millis);\n};\n", "\"use strict\";\n\nvar isodate = require(\"@segment/isodate\");\nvar milliseconds = require(\"./milliseconds\");\nvar seconds = require(\"./seconds\");\n\nvar objProto = Object.prototype;\nvar toStr = objProto.toString;\n\nfunction isDate(value) {\n return toStr.call(value) === \"[object Date]\";\n}\n\nfunction isNumber(value) {\n return toStr.call(value) === \"[object Number]\";\n}\n\n/**\n * Returns a new Javascript Date object, allowing a variety of extra input types\n * over the native Date constructor.\n *\n * @param {Date|string|number} val\n */\nmodule.exports = function newDate(val) {\n if (isDate(val)) return val;\n if (isNumber(val)) return new Date(toMs(val));\n\n // date strings\n if (isodate.is(val)) {\n return isodate.parse(val);\n }\n if (milliseconds.is(val)) {\n return milliseconds.parse(val);\n }\n if (seconds.is(val)) {\n return seconds.parse(val);\n }\n\n // fallback to Date.parse\n return new Date(val);\n};\n\n/**\n * If the number passed val is seconds from the epoch, turn it into milliseconds.\n * Milliseconds would be greater than 31557600000 (December 31, 1970).\n *\n * @param {number} num\n */\nfunction toMs(num) {\n if (num < 31557600000) return num * 1000;\n return num;\n}\n", "'use strict';\n\nvar isodate = require('@segment/isodate');\n\n/**\n * Expose `traverse`.\n */\nmodule.exports = traverse;\n\n/**\n * Recursively traverse an object or array, and convert\n * all ISO date strings parse into Date objects.\n *\n * @param {Object} input - object, array, or string to convert\n * @param {Boolean} strict - only convert strings with year, month, and date\n * @return {Object}\n */\nfunction traverse(input, strict) {\n if (strict === undefined) strict = true;\n if (input && typeof input === 'object') {\n return traverseObject(input, strict);\n } else if (Array.isArray(input)) {\n return traverseArray(input, strict);\n } else if (isodate.is(input, strict)) {\n return isodate.parse(input);\n }\n return input;\n}\n\n/**\n * Object traverser helper function.\n *\n * @param {Object} obj - object to traverse\n * @param {Boolean} strict - only convert strings with year, month, and date\n * @return {Object}\n */\nfunction traverseObject(obj, strict) {\n Object.keys(obj).forEach(function(key) {\n obj[key] = traverse(obj[key], strict);\n });\n return obj;\n}\n\n/**\n * Array traverser helper function\n *\n * @param {Array} arr - array to traverse\n * @param {Boolean} strict - only convert strings with year, month, and date\n * @return {Array}\n */\nfunction traverseArray(arr, strict) {\n arr.forEach(function(value, index) {\n arr[index] = traverse(value, strict);\n });\n return arr;\n}\n", "\"use strict\";\n\nimport address from \"./address\";\nimport { clone } from \"./clone\";\nimport isEnabled from \"./is-enabled\";\nimport newDate from \"new-date\";\nimport objCase from \"obj-case\";\nimport traverse from \"@segment/isodate-traverse\";\n\n/**\n * A *Facade* is an object meant for creating convience wrappers around\n * objects. When developing integrations, you probably want to look at its\n * subclasses, such as {@link Track} or {@link Identify}, rather than this\n * general-purpose class.\n *\n * This letructor will initialize a new `Facade` with an `obj` of arguments.\n *\n * If the inputted `obj` doesn't have a `timestamp` property, one will be added\n * with the value `new Date()`. Otherwise, the `timestamp` property will be\n * converted to a Date using the `new-date` package.\n *\n * By default, the inputted object will be defensively copied, and all ISO\n * strings present in the string will be converted into Dates.\n *\n * @param {Object} obj - The object to wrap.\n * @param {Object} opts - Options about what kind of Facade to create.\n * @param {boolean} [opts.clone=true] - Whether to make defensive clones. If enabled,\n * the inputted object will be cloned, and any objects derived from this facade\n * will be cloned before being returned.\n * @param {boolean} [opts.traverse=true] - Whether to perform ISODate-Traverse\n * on the inputted object.\n *\n * @see {@link https://github.com/segmentio/new-date|new-date}\n * @see {@link https://github.com/segmentio/isodate-traverse|isodate-traverse}\n */\nexport function Facade (obj, opts) {\n opts = opts || {};\n this.raw = clone(obj);\n if (!(\"clone\" in opts)) opts.clone = true;\n if (opts.clone) obj = clone(obj);\n if (!(\"traverse\" in opts)) opts.traverse = true;\n if (!(\"timestamp\" in obj)) obj.timestamp = new Date();\n else obj.timestamp = newDate(obj.timestamp);\n if (opts.traverse) traverse(obj);\n this.opts = opts;\n this.obj = obj;\n}\n\nconst f = Facade.prototype;\n\n/**\n * Get a potentially-nested field in this facade. `field` should be a\n * period-separated sequence of properties.\n *\n * If the first field passed in points to a function (e.g. the `field` passed\n * in is `a.b.c` and this facade's `obj.a` is a function), then that function\n * will be called, and then the deeper fields will be fetched (using obj-case)\n * from what that function returns. If the first field isn't a function, then\n * this function works just like obj-case.\n *\n * Because this function uses obj-case, the camel- or snake-case of the input\n * is irrelevant.\n *\n * @example\n * YourClass.prototype.height = function() {\n * return this.proxy('getDimensions.height') ||\n * this.proxy('props.size.side_length');\n * }\n * @param {string} field - A sequence of properties, joined by periods (`.`).\n * @return {*} - A property of the inputted object.\n * @see {@link https://github.com/segmentio/obj-case|obj-case}\n */\nf.proxy = function(field) {\n let fields = field.split(\".\");\n field = fields.shift();\n\n // Call a function at the beginning to take advantage of facaded fields\n let obj = this[field] || this.obj[field];\n if (!obj) return obj;\n if (typeof obj === \"function\") obj = obj.call(this) || {};\n if (fields.length === 0) return this.opts.clone ? transform(obj) : obj;\n\n obj = objCase(obj, fields.join(\".\"));\n return this.opts.clone ? transform(obj) : obj;\n};\n\n/**\n * Directly access a specific `field` from the underlying object. Only\n * \"top-level\" fields will work with this function. \"Nested\" fields *will not\n * work* with this function.\n *\n * @param {string} field\n * @return {*}\n */\nf.field = function(field) {\n let obj = this.obj[field];\n return this.opts.clone ? transform(obj) : obj;\n};\n\n/**\n * Utility method to always proxy a particular `field`. In other words, it\n * returns a function that will always return `this.proxy(field)`.\n *\n * @example\n * MyClass.prototype.height = Facade.proxy('options.dimensions.height');\n *\n * @param {string} field\n * @return {Function}\n */\nFacade.proxy = function(field) {\n return function() {\n return this.proxy(field);\n };\n};\n\n/**\n * Utility method to always access a `field`. In other words, it returns a\n * function that will always return `this.field(field)`.\n *\n * @param {string} field\n * @return {Function}\n */\nFacade.field = function(field) {\n return function() {\n return this.field(field);\n };\n};\n\n/**\n * Create a helper function for fetching a \"plural\" thing.\n *\n * The generated method will take the inputted `path` and append an \"s\" to it\n * and calls `this.proxy` with this \"pluralized\" path. If that produces an\n * array, that will be returned. Otherwise, a one-element array containing\n * `this.proxy(path)` will be returned.\n *\n * @example\n * MyClass.prototype.birds = Facade.multi('animals.bird');\n *\n * @param {string} path\n * @return {Function}\n */\nFacade.multi = function(path) {\n return function() {\n let multi = this.proxy(path + \"s\");\n if (Array.isArray(multi)) return multi;\n let one = this.proxy(path);\n if (one) one = [this.opts.clone ? clone(one) : one];\n return one || [];\n };\n};\n\n/**\n * Create a helper function for getting a \"singular\" thing.\n *\n * The generated method will take the inputted path and call\n * `this.proxy(path)`. If a truthy thing is produced, it will be returned.\n * Otherwise, `this.proxy(path + 's')` will be called, and if that produces an\n * array the first element of that array will be returned. Otherwise,\n * `undefined` is returned.\n *\n * @example\n * MyClass.prototype.bird = Facade.one('animals.bird');\n *\n * @param {string} path\n * @return {Function}\n */\nFacade.one = function(path) {\n return function() {\n let one = this.proxy(path);\n if (one) return one;\n let multi = this.proxy(path + \"s\");\n if (Array.isArray(multi)) return multi[0];\n };\n};\n\n/**\n * Gets the underlying object this facade wraps around.\n *\n * If this facade has a property `type`, it will be invoked as a function and\n * will be assigned as the property `type` of the outputted object.\n *\n * @return {Object}\n */\nf.json = function() {\n let ret = this.opts.clone ? clone(this.obj) : this.obj;\n if (this.type) ret.type = this.type();\n return ret;\n};\n\n/**\n * Gets a copy of the unmodified input object this facade wraps around.\n * \n * Unlike the `json` method which does make some subtle modifications \n * to datetime values and the `type` property. This method returns a copy of \n * the unmodified input object\n * \n * @return {Object}\n */\nf.rawEvent = function() {\n return this.raw;\n};\n\n/**\n * Get the options of a call. If an integration is passed, only the options for\n * that integration are included. If the integration is not enabled, then\n * `undefined` is returned.\n *\n * Options are taken from the `options` property of the underlying object,\n * falling back to the object's `context` or simply `{}`.\n *\n * @param {string} integration - The name of the integration to get settings\n * for. Casing does not matter.\n * @return {Object|undefined}\n */\nf.options = function(integration) {\n let obj = this.obj.options || this.obj.context || {};\n let options = this.opts.clone ? clone(obj) : obj;\n if (!integration) return options;\n if (!this.enabled(integration)) return;\n let integrations = this.integrations();\n let value = integrations[integration] || objCase(integrations, integration);\n if (typeof value !== \"object\") value = objCase(this.options(), integration);\n return typeof value === \"object\" ? value : {};\n};\n\n/**\n * An alias for {@link Facade#options}.\n */\nf.context = f.options;\n\n/**\n * Check whether an integration is enabled.\n *\n * Basically, this method checks whether this integration is explicitly\n * enabled. If it isn'texplicitly mentioned, it checks whether it has been\n * enabled at the global level. Some integrations (e.g. Salesforce), cannot\n * enabled by these global event settings.\n *\n * More concretely, the deciding factors here are:\n *\n * 1. If `this.integrations()` has the integration set to `true`, return `true`.\n * 2. If `this.integrations().providers` has the integration set to `true`, return `true`.\n * 3. If integrations are set to default-disabled via global parameters (i.e.\n * `options.providers.all`, `options.all`, or `integrations.all`), then return\n * false.\n * 4. If the integration is one of the special default-deny integrations\n * (currently, only Salesforce), then return false.\n * 5. Else, return true.\n *\n * @param {string} integration\n * @return {boolean}\n */\nf.enabled = function(integration) {\n let allEnabled = this.proxy(\"options.providers.all\");\n if (typeof allEnabled !== \"boolean\") allEnabled = this.proxy(\"options.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = this.proxy(\"integrations.all\");\n if (typeof allEnabled !== \"boolean\") allEnabled = true;\n\n let enabled = allEnabled && isEnabled(integration);\n let options = this.integrations();\n\n // If the integration is explicitly enabled or disabled, use that\n // First, check options.providers for backwards compatibility\n if (options.providers && options.providers.hasOwnProperty(integration)) {\n enabled = options.providers[integration];\n }\n\n // Next, check for the integration's existence in 'options' to enable it.\n // If the settings are a boolean, use that, otherwise it should be enabled.\n if (options.hasOwnProperty(integration)) {\n let settings = options[integration];\n if (typeof settings === \"boolean\") {\n enabled = settings;\n } else {\n enabled = true;\n }\n }\n\n return !!enabled;\n};\n\n/**\n * Get all `integration` options.\n *\n * @ignore\n * @param {string} integration\n * @return {Object}\n */\nf.integrations = function() {\n return (\n this.obj.integrations || this.proxy(\"options.providers\") || this.options()\n );\n};\n\n/**\n * Check whether the user is active.\n *\n * @return {boolean}\n */\nf.active = function() {\n let active = this.proxy(\"options.active\");\n if (active === null || active === undefined) active = true;\n return active;\n};\n\n/**\n * Get `sessionId / anonymousId`.\n *\n * @return {*}\n */\nf.anonymousId = function() {\n return this.field(\"anonymousId\") || this.field(\"sessionId\");\n};\n\n/**\n * An alias for {@link Facade#anonymousId}.\n *\n * @function\n * @return {string}\n */\nf.sessionId = f.anonymousId;\n\n/**\n * Get `groupId` from `context.groupId`.\n *\n * @function\n * @return {string}\n */\nf.groupId = Facade.proxy(\"options.groupId\");\n\n/**\n * Get the call's \"traits\". All event types can pass in traits, though {@link\n * Identify} and {@link Group} override this implementation.\n *\n * Traits are gotten from `options.traits`, augmented with a property `id` with\n * the event's `userId`.\n *\n * The parameter `aliases` is meant to transform keys in `options.traits` into\n * new keys. Each alias like `{ \"xxx\": \"yyy\" }` will take whatever is at `xxx`\n * in the traits, and move it to `yyy`. If `xxx` is a method of this facade,\n * it'll be called as a function instead of treated as a key into the traits.\n *\n * @example\n * let obj = { options: { traits: { foo: \"bar\" } }, anonymousId: \"xxx\" }\n * let facade = new Facade(obj)\n *\n * facade.traits() // { \"foo\": \"bar\" }\n * facade.traits({ \"foo\": \"asdf\" }) // { \"asdf\": \"bar\" }\n * facade.traits({ \"sessionId\": \"rofl\" }) // { \"rofl\": \"xxx\" }\n *\n * @param {Object} aliases - A mapping from keys to the new keys they should be\n * transformed to.\n * @return {Object}\n */\nf.traits = function(aliases) {\n let ret = this.proxy(\"options.traits\") || {};\n let id = this.userId();\n aliases = aliases || {};\n\n if (id) ret.id = id;\n\n for (const alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n const value = this[alias] == null\n ? this.proxy(\"options.traits.\" + alias)\n : this[alias]();\n if (value == null) continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n\n return ret;\n};\n\n/**\n * The library and version of the client used to produce the message.\n *\n * If the library name cannot be determined, it is set to `\"unknown\"`. If the\n * version cannot be determined, it is set to `null`.\n *\n * @return {{name: string, version: string}}\n */\nf.library = function() {\n let library = this.proxy(\"options.library\");\n if (!library) return { name: \"unknown\", version: null };\n if (typeof library === \"string\") return { name: library, version: null };\n return library;\n};\n\n/**\n * Return the device information, falling back to an empty object.\n *\n * Interesting values of `type` are `\"ios\"` and `\"android\"`, but other values\n * are possible if the client is doing something unusual with `context.device`.\n *\n * @return {{type: string}}\n */\nf.device = function() {\n let device = this.proxy(\"context.device\");\n if (typeof device !== \"object\" || device === null) {\n device = {};\n }\n let library = this.library().name;\n if (device.type) return device;\n\n if (library.indexOf(\"ios\") > -1) device.type = \"ios\";\n if (library.indexOf(\"android\") > -1) device.type = \"android\";\n return device;\n};\n\n/**\n * Get the User-Agent from `context.userAgent`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return string\n */\nf.userAgent = Facade.proxy(\"context.userAgent\");\n\n/**\n * Get the timezone from `context.timezone`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return string\n */\nf.timezone = Facade.proxy(\"context.timezone\");\n\n/**\n * Get the timestamp from `context.timestamp`.\n *\n * @function\n * @return string\n */\nf.timestamp = Facade.field(\"timestamp\");\n\n/**\n * Get the channel from `channel`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return string\n */\nf.channel = Facade.field(\"channel\");\n\n/**\n * Get the IP address from `context.ip`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return string\n */\nf.ip = Facade.proxy(\"context.ip\");\n\n/**\n * Get the user ID from `userId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return string\n */\nf.userId = Facade.field(\"userId\");\n\n/**\n * Get the ZIP/Postal code from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name zip\n * @function\n * @memberof f\n * @return {string}\n */\n\n/**\n * Get the country from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name country\n * @function\n * @memberof f\n * @return {string}\n */\n\n/**\n * Get the street from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name street\n * @function\n * @memberof f\n * @return {string}\n */\n\n/**\n * Get the state from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name state\n * @function\n * @memberof f\n * @return {string}\n */\n\n/**\n * Get the city from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name city\n * @function\n * @memberof f\n * @return {string}\n */\n\n/**\n * Get the region from `traits`, `traits.address`, `properties`, or\n * `properties.address`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @name region\n * @function\n * @memberof f\n * @return {string}\n */\n\naddress(f);\n\n/**\n * Return the cloned and traversed object\n *\n * @ignore\n * @param {*} obj\n * @return {*}\n */\nfunction transform (obj) {\n return clone(obj);\n}\n", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport { Facade } from \"./facade\";\n\n/**\n * Initialize a new `Alias` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.from] - The previous ID of the user.\n * @param {string} [dictionary.to] - The new ID of the user.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Alias(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Alias, Facade);\n\n/**\n * Return the type of facade this is. This will always return `\"alias\"`.\n *\n * @return {string}\n */\nAlias.prototype.action = function () {\n return \"alias\";\n};\n\n/**\n * An alias for {@link Alias#action}.\n *\n * @function\n * @return {string}\n */\nAlias.prototype.type = Alias.prototype.action;\n\n/**\n * Get the user's previous ID from `previousId` or `from`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nAlias.prototype.previousId = function () {\n return this.field(\"previousId\") || this.field(\"from\");\n};\n\n/**\n * An alias for {@link Alias#previousId}.\n *\n * @function\n * @return {string}\n */\nAlias.prototype.from = Alias.prototype.previousId;\n\n/**\n * Get the user's new ID from `userId` or `to`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nAlias.prototype.userId = function () {\n return this.field(\"userId\") || this.field(\"to\");\n};\n\n/**\n * An alias for {@link Alias#userId}.\n *\n * @function\n * @return {string}\n */\nAlias.prototype.to = Alias.prototype.userId;\n", "const matcher = /.+\\@.+\\..+/;\n\nexport default function isEmail(string) {\n return matcher.test(string);\n}\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport isEmail from \"./is-email\";\nimport newDate from \"new-date\";\nimport { Facade } from \"./facade\";\n\n/**\n * Initialize a new `Group` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.userId] - The user to add to the group.\n * @param {string} [dictionary.groupId] - The ID of the group.\n * @param {Object} [dictionary.traits] - The traits of the group.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Group(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Group, Facade);\n\nconst g = Group.prototype;\n\n/**\n * Return the type of facade this is. This will always return `\"group\"`.\n *\n * @return {string}\n */\ng.action = function () {\n return \"group\";\n};\n\n/**\n * An alias for {@link Group#action}.\n *\n * @function\n * @return {string}\n */\ng.type = g.action;\n\n/**\n * Get the group ID from `groupId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ng.groupId = Facade.field(\"groupId\");\n\n/**\n * Get the time of creation of the group from `traits.createdAt`,\n * `traits.created`, `properties.createdAt`, or `properties.created`.\n *\n * @return {Date}\n */\ng.created = function () {\n var created =\n this.proxy(\"traits.createdAt\") ||\n this.proxy(\"traits.created\") ||\n this.proxy(\"properties.createdAt\") ||\n this.proxy(\"properties.created\");\n\n if (created) return newDate(created);\n};\n\n/**\n * Get the group's email from `traits.email`, falling back to `groupId` only if\n * it looks like a valid email.\n *\n * @return {string}\n */\ng.email = function () {\n var email = this.proxy(\"traits.email\");\n if (email) return email;\n var groupId = this.groupId();\n if (isEmail(groupId)) return groupId;\n};\n\n/**\n * Get the group's traits. This is identical to how {@link Facade#traits}\n * works, except it looks at `traits.*` instead of `options.traits.*`.\n *\n * Traits are gotten from `traits`, augmented with a property `id` with\n * the event's `groupId`.\n *\n * The parameter `aliases` is meant to transform keys in `traits` into new\n * keys. Each alias like `{ \"xxx\": \"yyy\" }` will take whatever is at `xxx` in\n * the traits, and move it to `yyy`. If `xxx` is a method of this facade, it'll\n * be called as a function instead of treated as a key into the traits.\n *\n * @example\n * var obj = { traits: { foo: \"bar\" }, anonymousId: \"xxx\" }\n * var group = new Group(obj)\n *\n * group.traits() // { \"foo\": \"bar\" }\n * group.traits({ \"foo\": \"asdf\" }) // { \"asdf\": \"bar\" }\n * group.traits({ \"sessionId\": \"rofl\" }) // { \"rofl\": \"xxx\" }\n *\n * @param {Object} aliases - A mapping from keys to the new keys they should be\n * transformed to.\n * @return {Object}\n */\ng.traits = function (aliases) {\n var ret = this.properties();\n var id = this.groupId();\n aliases = aliases || {};\n\n if (id) ret.id = id;\n\n for (const alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n const value = this[alias] == null\n ? this.proxy(\"traits.\" + alias)\n : this[alias]();\n if (value == null) continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n\n return ret;\n};\n\n/**\n * Get the group's name from `traits.name`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ng.name = Facade.proxy(\"traits.name\");\n\n/**\n * Get the group's industry from `traits.industry`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ng.industry = Facade.proxy(\"traits.industry\");\n\n/**\n * Get the group's employee count from `traits.employees`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\ng.employees = Facade.proxy(\"traits.employees\");\n\n/**\n * Get the group's properties from `traits` or `properties`, falling back to\n * simply an empty object.\n *\n * @return {Object}\n */\ng.properties = function () {\n // TODO remove this function\n return this.field(\"traits\") || this.field(\"properties\") || {};\n};\n", "\"use strict\";\n\nimport { Facade } from \"./facade\";\nimport get from \"obj-case\";\nimport inherit from \"inherits\";\nimport isEmail from \"./is-email\";\nimport newDate from \"new-date\";\n\nlet trim = (str) => str.trim();\n\n/**\n * Initialize a new `Identify` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.userId] - The ID of the user.\n * @param {string} [dictionary.anonymousId] - The anonymous ID of the user.\n * @param {string} [dictionary.traits] - The user's traits.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Identify(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Identify, Facade);\n\nconst i = Identify.prototype;\n\n/**\n * Return the type of facade this is. This will always return `\"identify\"`.\n *\n * @return {string}\n */\ni.action = function () {\n return \"identify\";\n};\n\n/**\n * An alias for {@link Identify#action}.\n *\n * @function\n * @return {string}\n */\ni.type = i.action;\n\n/**\n * Get the user's traits. This is identical to how {@link Facade#traits} works,\n * except it looks at `traits.*` instead of `options.traits.*`.\n *\n * Traits are gotten from `traits`, augmented with a property `id` with\n * the event's `userId`.\n *\n * The parameter `aliases` is meant to transform keys in `traits` into new\n * keys. Each alias like `{ \"xxx\": \"yyy\" }` will take whatever is at `xxx` in\n * the traits, and move it to `yyy`. If `xxx` is a method of this facade, it'll\n * be called as a function instead of treated as a key into the traits.\n *\n * @example\n * let obj = { traits: { foo: \"bar\" }, anonymousId: \"xxx\" }\n * let identify = new Identify(obj)\n *\n * identify.traits() // { \"foo\": \"bar\" }\n * identify.traits({ \"foo\": \"asdf\" }) // { \"asdf\": \"bar\" }\n * identify.traits({ \"sessionId\": \"rofl\" }) // { \"rofl\": \"xxx\" }\n *\n * @param {Object} aliases - A mapping from keys to the new keys they should be\n * transformed to.\n * @return {Object}\n */\ni.traits = function (aliases) {\n let ret = this.field(\"traits\") || {};\n let id = this.userId();\n aliases = aliases || {};\n\n if (id) ret.id = id;\n\n for (let alias in aliases) {\n let value =\n this[alias] == null ? this.proxy(\"traits.\" + alias) : this[alias]();\n if (value == null) continue;\n ret[aliases[alias]] = value;\n if (alias !== aliases[alias]) delete ret[alias];\n }\n\n return ret;\n};\n\n/**\n * Get the user's email from `traits.email`, falling back to `userId` only if\n * it looks like a valid email.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.email = function () {\n let email = this.proxy(\"traits.email\");\n if (email) return email;\n\n let userId = this.userId();\n if (isEmail(userId)) return userId;\n};\n\n/**\n * Get the time of creation of the user from `traits.created` or\n * `traits.createdAt`.\n *\n * @return {Date}\n */\ni.created = function () {\n let created = this.proxy(\"traits.created\") || this.proxy(\"traits.createdAt\");\n if (created) return newDate(created);\n};\n\n/**\n * Get the time of creation of the user's company from `traits.company.created`\n * or `traits.company.createdAt`.\n *\n * @return {Date}\n */\ni.companyCreated = function () {\n let created =\n this.proxy(\"traits.company.created\") ||\n this.proxy(\"traits.company.createdAt\");\n\n if (created) {\n return newDate(created);\n }\n};\n\n/**\n * Get the user's company name from `traits.company.name`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.companyName = function () {\n return this.proxy(\"traits.company.name\");\n};\n\n/**\n * Get the user's name `traits.name`, falling back to combining {@link\n * Identify#firstName} and {@link Identify#lastName} if possible.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.name = function () {\n let name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim(name);\n }\n\n let firstName = this.firstName();\n let lastName = this.lastName();\n if (firstName && lastName) {\n return trim(firstName + \" \" + lastName);\n }\n};\n\n/**\n * Get the user's first name from `traits.firstName`, optionally splitting it\n * out of a the full name if that's all that was provided.\n *\n * Splitting the full name works on the assumption that the full name is of the\n * form \"FirstName LastName\"; it will not work for non-Western names.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.firstName = function () {\n let firstName = this.proxy(\"traits.firstName\");\n if (typeof firstName === \"string\") {\n return trim(firstName);\n }\n\n let name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim(name).split(\" \")[0];\n }\n};\n\n/**\n * Get the user's last name from `traits.lastName`, optionally splitting it out\n * of a the full name if that's all that was provided.\n *\n * Splitting the full name works on the assumption that the full name is of the\n * form \"FirstName LastName\"; it will not work for non-Western names.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.lastName = function () {\n let lastName = this.proxy(\"traits.lastName\");\n if (typeof lastName === \"string\") {\n return trim(lastName);\n }\n\n let name = this.proxy(\"traits.name\");\n if (typeof name !== \"string\") {\n return;\n }\n\n let space = trim(name).indexOf(\" \");\n if (space === -1) {\n return;\n }\n\n return trim(name.substr(space + 1));\n};\n\n/**\n * Get the user's \"unique id\" from `userId`, `traits.username`, or\n * `traits.email`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.uid = function () {\n return this.userId() || this.username() || this.email();\n};\n\n/**\n * Get the user's description from `traits.description` or `traits.background`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.description = function () {\n return this.proxy(\"traits.description\") || this.proxy(\"traits.background\");\n};\n\n/**\n * Get the user's age from `traits.age`, falling back to computing it from\n * `traits.birthday` and the current time.\n *\n * @return {number}\n */\ni.age = function () {\n let date = this.birthday();\n let age = get(this.traits(), \"age\");\n if (age != null) return age;\n if (!(date instanceof Date)) return;\n let now = new Date();\n return now.getFullYear() - date.getFullYear();\n};\n\n/**\n * Get the URL of the user's avatar from `traits.avatar`, `traits.photoUrl`, or\n * `traits.avatarUrl`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.avatar = function () {\n let traits = this.traits();\n return (\n get(traits, \"avatar\") || get(traits, \"photoUrl\") || get(traits, \"avatarUrl\")\n );\n};\n\n/**\n * Get the user's job position from `traits.position` or `traits.jobTitle`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\ni.position = function () {\n let traits = this.traits();\n return get(traits, \"position\") || get(traits, \"jobTitle\");\n};\n\n/**\n * Get the user's username from `traits.username`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ni.username = Facade.proxy(\"traits.username\");\n\n/**\n * Get the user's website from `traits.website`, or if there are multiple in\n * `traits.websites`, return the first one.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ni.website = Facade.one(\"traits.website\");\n\n/**\n * Get the user's websites from `traits.websites`, or if there is only one in\n * `traits.website`, then wrap it in an array.\n *\n * This *should* be an array of strings, but may not be if the client isn't\n * adhering to the spec.\n *\n * @function\n * @return {array}\n */\ni.websites = Facade.multi(\"traits.website\");\n\n/**\n * Get the user's phone number from `traits.phone`, or if there are multiple in\n * `traits.phones`, return the first one.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ni.phone = Facade.one(\"traits.phone\");\n\n/**\n * Get the user's phone numbers from `traits.phones`, or if there is only one\n * in `traits.phone`, then wrap it in an array.\n *\n * This *should* be an array of strings, but may not be if the client isn't\n * adhering to the spec.\n *\n * @function\n * @return {array}\n */\ni.phones = Facade.multi(\"traits.phone\");\n\n/**\n * Get the user's address from `traits.address`.\n *\n * This *should* be an object, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {object}\n */\ni.address = Facade.proxy(\"traits.address\");\n\n/**\n * Get the user's gender from `traits.gender`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\ni.gender = Facade.proxy(\"traits.gender\");\n\n/**\n * Get the user's birthday from `traits.birthday`.\n *\n * This *should* be a Date if `opts.traverse` was enabled (it is by default)\n * when letructing this Identify. Otherwise, it should be a string. But it\n * may be neither if the client isn't adhering to the spec.\n * spec.\n *\n * @function\n * @return {object}\n */\ni.birthday = Facade.proxy(\"traits.birthday\");\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport { Facade } from \"./facade\";\nimport { Identify } from \"./identify\";\nimport isEmail from \"./is-email\";\nimport get from \"obj-case\";\n\n/**\n * Initialize a new `Track` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.event] - The name of the event being tracked.\n * @param {string} [dictionary.userId] - The ID of the user being tracked.\n * @param {string} [dictionary.anonymousId] - The anonymous ID of the user.\n * @param {string} [dictionary.properties] - Properties of the track event.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Track(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Track, Facade);\n\nlet t = Track.prototype;\n\n/**\n * Return the type of facade this is. This will always return `\"track\"`.\n *\n * @return {string}\n */\nt.action = function () {\n return \"track\";\n};\n\n/**\n * An alias for {@link Track#action}.\n *\n * @function\n * @return {string}\n */\nt.type = t.action;\n\n/**\n * Get the event name from `event`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.event = Facade.field(\"event\");\n\n/**\n * Get the event value, usually the monetary value, from `properties.value`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.value = Facade.proxy(\"properties.value\");\n\n/**\n * Get the event cateogry from `properties.category`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.category = Facade.proxy(\"properties.category\");\n\n/**\n * Get the event ID from `properties.id`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.id = Facade.proxy(\"properties.id\");\n\n/**\n * Get the product ID from `properties.productId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.productId = function () {\n return (\n this.proxy(\"properties.product_id\") || this.proxy(\"properties.productId\")\n );\n};\n\n/**\n * Get the promotion ID from `properties.promotionId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.promotionId = function () {\n return (\n this.proxy(\"properties.promotion_id\") ||\n this.proxy(\"properties.promotionId\")\n );\n};\n\n/**\n * Get the cart ID from `properties.cartId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.cartId = function () {\n return this.proxy(\"properties.cart_id\") || this.proxy(\"properties.cartId\");\n};\n\n/**\n * Get the checkout ID from `properties.checkoutId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.checkoutId = function () {\n return (\n this.proxy(\"properties.checkout_id\") || this.proxy(\"properties.checkoutId\")\n );\n};\n\n/**\n * Get the payment ID from `properties.paymentId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.paymentId = function () {\n return (\n this.proxy(\"properties.payment_id\") || this.proxy(\"properties.paymentId\")\n );\n};\n\n/**\n * Get the coupon ID from `properties.couponId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.couponId = function () {\n return (\n this.proxy(\"properties.coupon_id\") || this.proxy(\"properties.couponId\")\n );\n};\n\n/**\n * Get the wishlist ID from `properties.wishlistId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.wishlistId = function () {\n return (\n this.proxy(\"properties.wishlist_id\") || this.proxy(\"properties.wishlistId\")\n );\n};\n\n/**\n * Get the review ID from `properties.reviewId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.reviewId = function () {\n return (\n this.proxy(\"properties.review_id\") || this.proxy(\"properties.reviewId\")\n );\n};\n\n/**\n * Get the order ID from `properties.id` or `properties.orderId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.orderId = function () {\n // doesn't follow above convention since this fallback order was how it used to be\n return (\n this.proxy(\"properties.id\") ||\n this.proxy(\"properties.order_id\") ||\n this.proxy(\"properties.orderId\")\n );\n};\n\n/**\n * Get the SKU from `properties.sku`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.sku = Facade.proxy(\"properties.sku\");\n\n/**\n * Get the amount of tax for this purchase from `properties.tax`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.tax = Facade.proxy(\"properties.tax\");\n\n/**\n * Get the name of this event from `properties.name`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.name = Facade.proxy(\"properties.name\");\n\n/**\n * Get the price of this purchase from `properties.price`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.price = Facade.proxy(\"properties.price\");\n\n/**\n * Get the total for this purchase from `properties.total`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.total = Facade.proxy(\"properties.total\");\n\n/**\n * Whether this is a repeat purchase from `properties.repeat`.\n *\n * This *should* be a boolean, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {boolean}\n */\nt.repeat = Facade.proxy(\"properties.repeat\");\n\n/**\n * Get the coupon for this purchase from `properties.coupon`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.coupon = Facade.proxy(\"properties.coupon\");\n\n/**\n * Get the shipping for this purchase from `properties.shipping`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.shipping = Facade.proxy(\"properties.shipping\");\n\n/**\n * Get the discount for this purchase from `properties.discount`.\n *\n * This *should* be a number, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {number}\n */\nt.discount = Facade.proxy(\"properties.discount\");\n\n/**\n * Get the shipping method for this purchase from `properties.shippingMethod`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.shippingMethod = function () {\n return (\n this.proxy(\"properties.shipping_method\") ||\n this.proxy(\"properties.shippingMethod\")\n );\n};\n\n/**\n * Get the payment method for this purchase from `properties.paymentMethod`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.paymentMethod = function () {\n return (\n this.proxy(\"properties.payment_method\") ||\n this.proxy(\"properties.paymentMethod\")\n );\n};\n\n/**\n * Get a description for this event from `properties.description`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.description = Facade.proxy(\"properties.description\");\n\n/**\n * Get a plan, as in the plan the user is on, for this event from\n * `properties.plan`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string}\n */\nt.plan = Facade.proxy(\"properties.plan\");\n\n/**\n * Get the subtotal for this purchase from `properties.subtotal`.\n *\n * If `properties.subtotal` isn't available, then fall back to computing the\n * total from `properties.total` or `properties.revenue`, and then subtracting\n * tax, shipping, and discounts.\n *\n * If neither subtotal, total, nor revenue are available, then return 0.\n *\n * @return {number}\n */\nt.subtotal = function () {\n let subtotal = get(this.properties(), \"subtotal\");\n let total = this.total() || this.revenue();\n\n if (subtotal) return subtotal;\n if (!total) return 0;\n\n if (this.total()) {\n let n = this.tax();\n if (n) total -= n;\n n = this.shipping();\n if (n) total -= n;\n n = this.discount();\n if (n) total += n;\n }\n\n return total;\n};\n\n/**\n * Get the products for this event from `properties.products` if it's an\n * array, falling back to an empty array.\n *\n * @return {Array}\n */\nt.products = function () {\n let props = this.properties();\n let products = get(props, \"products\");\n if (Array.isArray(products)) {\n return products.filter(item => item !== null)\n }\n return [];\n};\n\n/**\n * Get the quantity for this event from `properties.quantity`, falling back to\n * a quantity of one.\n *\n * @return {number}\n */\nt.quantity = function () {\n let props = this.obj.properties || {};\n return props.quantity || 1;\n};\n\n/**\n * Get the currency for this event from `properties.currency`, falling back to\n * \"USD\".\n *\n * @return {string}\n */\nt.currency = function () {\n let props = this.obj.properties || {};\n return props.currency || \"USD\";\n};\n\n/**\n * Get the referrer for this event from `context.referrer.url`,\n * `context.page.referrer`, or `properties.referrer`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\nt.referrer = function () {\n // TODO re-examine whether this function is necessary\n return (\n this.proxy(\"context.referrer.url\") ||\n this.proxy(\"context.page.referrer\") ||\n this.proxy(\"properties.referrer\")\n );\n};\n\n/**\n * Get the query for this event from `options.query`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @function\n * @return {string|object}\n */\nt.query = Facade.proxy(\"options.query\");\n\n/**\n * Get the page's properties. This is identical to how {@link Facade#traits}\n * works, except it looks at `properties.*` instead of `options.traits.*`.\n *\n * Properties are gotten from `properties`.\n *\n * The parameter `aliases` is meant to transform keys in `properties` into new\n * keys. Each alias like `{ \"xxx\": \"yyy\" }` will take whatever is at `xxx` in\n * the traits, and move it to `yyy`. If `xxx` is a method of this facade, it'll\n * be called as a function instead of treated as a key into the traits.\n *\n * @example\n * let obj = { properties: { foo: \"bar\" }, anonymousId: \"xxx\" }\n * let track = new Track(obj)\n *\n * track.traits() // { \"foo\": \"bar\" }\n * track.traits({ \"foo\": \"asdf\" }) // { \"asdf\": \"bar\" }\n * track.traits({ \"sessionId\": \"rofl\" }) // { \"rofl\": \"xxx\" }\n *\n * @param {Object} aliases - A mapping from keys to the new keys they should be\n * transformed to.\n * @return {Object}\n */\nt.properties = function (aliases) {\n let ret = this.field(\"properties\") || {};\n aliases = aliases || {};\n\n for (const alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n const value = this[alias] == null\n ? this.proxy(\"properties.\" + alias)\n : this[alias]();\n if (value == null) continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n\n return ret;\n};\n\n/**\n * Get the username of the user for this event from `traits.username`,\n * `properties.username`, `userId`, or `anonymousId`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string|undefined}\n */\nt.username = function () {\n return (\n this.proxy(\"traits.username\") ||\n this.proxy(\"properties.username\") ||\n this.userId() ||\n this.sessionId()\n );\n};\n\n/**\n * Get the email of the user for this event from `trais.email`,\n * `properties.email`, or `options.traits.email`, falling back to `userId` if\n * it looks like a valid email.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string|undefined}\n */\nt.email = function () {\n let email =\n this.proxy(\"traits.email\") ||\n this.proxy(\"properties.email\") ||\n this.proxy(\"options.traits.email\");\n if (email) return email;\n\n let userId = this.userId();\n if (isEmail(userId)) return userId;\n};\n\n/**\n * Get the revenue for this event.\n *\n * If this is an \"Order Completed\" event, this will be the `properties.total`\n * falling back to the `properties.revenue`. For all other events, this is\n * simply taken from `properties.revenue`.\n *\n * If there are dollar signs in these properties, they will be removed. The\n * result will be parsed into a number.\n *\n * @return {number}\n */\nt.revenue = function () {\n let revenue = this.proxy(\"properties.revenue\");\n let event = this.event();\n let orderCompletedRegExp = /^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;\n\n // it's always revenue, unless it's called during an order completion.\n if (!revenue && event && event.match(orderCompletedRegExp)) {\n revenue = this.proxy(\"properties.total\");\n }\n\n return currency(revenue);\n};\n\n/**\n * Get the revenue for this event in \"cents\" -- in other words, multiply the\n * {@link Track#revenue} by 100, or return 0 if there isn't a numerical revenue\n * for this event.\n *\n * @return {number}\n */\nt.cents = function () {\n let revenue = this.revenue();\n return typeof revenue !== \"number\" ? this.value() || 0 : revenue * 100;\n};\n\n/**\n * Convert this event into an {@link Identify} facade.\n *\n * This works by taking this event's underlying object and creating an Identify\n * from it. This event's traits, taken from `options.traits`, will be used as\n * the Identify's traits.\n *\n * @return {Identify}\n */\nt.identify = function () {\n // TODO: remove me.\n let json = this.json();\n json.traits = this.traits();\n return new Identify(json, this.opts);\n};\n\n/**\n * Get float from currency value.\n *\n * @ignore\n * @param {*} val\n * @return {number}\n */\nfunction currency(val) {\n if (!val) return;\n if (typeof val === \"number\") {\n return val;\n }\n if (typeof val !== \"string\") {\n return;\n }\n\n val = val.replace(/\\$/g, \"\");\n val = parseFloat(val);\n\n if (!isNaN(val)) {\n return val;\n }\n}\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport { Facade } from \"./facade\";\nimport { Track } from \"./track\";\nimport isEmail from \"./is-email\";\n\n/**\n * Initialize a new `Page` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.category] - The page category.\n * @param {string} [dictionary.name] - The page name.\n * @param {string} [dictionary.properties] - The page properties.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Page(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Page, Facade);\n\nconst p = Page.prototype;\n\n/**\n * Return the type of facade this is. This will always return `\"page\"`.\n *\n * @return {string}\n */\np.action = function () {\n return \"page\";\n};\n\n/**\n * An alias for {@link Page#action}.\n *\n * @function\n * @return {string}\n */\np.type = p.action;\n\n/**\n * Get the page category from `category`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.category = Facade.field(\"category\");\n\n/**\n * Get the page name from `name`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.name = Facade.field(\"name\");\n\n/**\n * Get the page title from `properties.title`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.title = Facade.proxy(\"properties.title\");\n\n/**\n * Get the page path from `properties.path`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.path = Facade.proxy(\"properties.path\");\n\n/**\n * Get the page URL from `properties.url`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.url = Facade.proxy(\"properties.url\");\n\n/**\n * Get the HTTP referrer from `context.referrer.url`, `context.page.referrer`,\n * or `properties.referrer`.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.referrer = function () {\n return (\n this.proxy(\"context.referrer.url\") ||\n this.proxy(\"context.page.referrer\") ||\n this.proxy(\"properties.referrer\")\n );\n};\n\n/**\n * Get the page's properties. This is identical to how {@link Facade#traits}\n * works, except it looks at `properties.*` instead of `options.traits.*`.\n *\n * Properties are gotten from `properties`, augmented with the page's `name`\n * and `category`.\n *\n * The parameter `aliases` is meant to transform keys in `properties` into new\n * keys. Each alias like `{ \"xxx\": \"yyy\" }` will take whatever is at `xxx` in\n * the traits, and move it to `yyy`. If `xxx` is a method of this facade, it'll\n * be called as a function instead of treated as a key into the traits.\n *\n * @example\n * let obj = { properties: { foo: \"bar\" }, anonymousId: \"xxx\" }\n * let page = new Page(obj)\n *\n * page.traits() // { \"foo\": \"bar\" }\n * page.traits({ \"foo\": \"asdf\" }) // { \"asdf\": \"bar\" }\n * page.traits({ \"sessionId\": \"rofl\" }) // { \"rofl\": \"xxx\" }\n *\n * @param {Object} aliases - A mapping from keys to the new keys they should be\n * transformed to.\n * @return {Object}\n */\np.properties = function (aliases) {\n let props = this.field(\"properties\") || {};\n let category = this.category();\n let name = this.name();\n aliases = aliases || {};\n\n if (category) props.category = category;\n if (name) props.name = name;\n\n for (const alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n const value = this[alias] == null\n ? this.proxy(\"properties.\" + alias)\n : this[alias]();\n if (value == null) continue;\n props[aliases[alias]] = value;\n if (alias !== aliases[alias]) delete props[alias];\n }\n }\n\n return props;\n};\n\n/**\n * Get the user's email from `context.traits.email` or `properties.email`,\n * falling back to `userId` if it's a valid email.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.email = function () {\n let email =\n this.proxy(\"context.traits.email\") || this.proxy(\"properties.email\");\n if (email) return email;\n\n let userId = this.userId();\n if (isEmail(userId)) return userId;\n};\n\n/**\n * Get the page fullName. This is `$category $name` if both are present, and\n * just `name` otherwiser.\n *\n * This *should* be a string, but may not be if the client isn't adhering to\n * the spec.\n *\n * @return {string}\n */\np.fullName = function () {\n let category = this.category();\n let name = this.name();\n return name && category ? category + \" \" + name : name;\n};\n\n/**\n * Get an event name from this page call. If `name` is present, this will be\n * `Viewed $name Page`; otherwise, it will be `Loaded a Page`.\n *\n * @param {string} name - The name of this page.\n * @return {string}\n */\np.event = function (name) {\n return name ? \"Viewed \" + name + \" Page\" : \"Loaded a Page\";\n};\n\n/**\n * Convert this Page to a {@link Track} facade. The inputted `name` will be\n * converted to the Track's event name via {@link Page#event}.\n *\n * @param {string} name\n * @return {Track}\n */\np.track = function (name) {\n let json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new Track(json, this.opts);\n};\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport { Page } from \"./page\";\nimport { Track } from \"./track\";\n\n/**\n * Initialize a new `Screen` facade with a `dictionary` of arguments.\n *\n * Note that this class extends {@link Page}, so its methods are available to\n * instances of this class as well.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.category] - The page category.\n * @param {string} [dictionary.name] - The page name.\n * @param {string} [dictionary.properties] - The page properties.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Page\n */\nexport function Screen(dictionary, opts) {\n Page.call(this, dictionary, opts);\n}\n\ninherit(Screen, Page);\n\n/**\n * Return the type of facade this is. This will always return `\"screen\"`.\n *\n * @return {string}\n */\nScreen.prototype.action = function () {\n return \"screen\";\n};\n\n/**\n * An alias for {@link Screen#action}.\n *\n * @function\n * @return {string}\n */\nScreen.prototype.type = Screen.prototype.action;\n\n/**\n * Get an event name from this screen call. If `name` is present, this will be\n * `Viewed $name Screen`; otherwise, it will be `Loaded a Screen`.\n *\n * @param {string} name - The name of this screen.\n * @return {string}\n */\nScreen.prototype.event = function (name) {\n return name ? \"Viewed \" + name + \" Screen\" : \"Loaded a Screen\";\n};\n\n/**\n * Convert this Screen to a {@link Track} facade. The inputted `name` will be\n * converted to the Track's event name via {@link Screen#event}.\n *\n * @param {string} name\n * @return {Track}\n */\nScreen.prototype.track = function (name) {\n let json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new Track(json, this.opts);\n};\n", "\"use strict\";\n\nimport inherit from \"inherits\";\nimport { Facade } from \"./facade\";\n\n/**\n * Initialize a new `Delete` facade with a `dictionary` of arguments.\n *\n * @param {Object} dictionary - The object to wrap.\n * @param {string} [dictionary.category] - The delete category.\n * @param {string} [dictionary.name] - The delete name.\n * @param {string} [dictionary.properties] - The delete properties.\n * @param {Object} opts - Options about what kind of Facade to create.\n *\n * @augments Facade\n */\nexport function Delete(dictionary, opts) {\n Facade.call(this, dictionary, opts);\n}\n\ninherit(Delete, Facade);\n\n/**\n * Return the type of facade this is. This will always return `\"delete\"`.\n *\n * @return {string}\n */\nDelete.prototype.type = function () {\n return \"delete\";\n};\n", "\"use strict\";\n\nimport { Facade } from \"./facade\";\nimport { Alias } from \"./alias\";\nimport { Group } from \"./group\";\nimport { Identify } from \"./identify\";\nimport { Track } from \"./track\";\nimport { Page } from \"./page\";\nimport { Screen } from \"./screen\";\nimport { Delete } from \"./delete\";\n\nexport default {\n ...Facade,\n Alias,\n Group,\n Identify,\n Track,\n Page,\n Screen,\n Delete,\n};\n\nexport { Facade, Alias, Group, Identify, Track, Page, Screen, Delete };\n", "export function dset(obj, keys, val) {\n\tkeys.split && (keys=keys.split('.'));\n\tvar i=0, l=keys.length, t=obj, x, k;\n\twhile (i < l) {\n\t\tk = keys[i++];\n\t\tif (k === '__proto__' || k === 'constructor' || k === 'prototype') break;\n\t\tt = t[k] = (i === l) ? val : (typeof(x=t[k])===typeof(keys)) ? x : (keys[i]*0 !== 0 || !!~(''+keys[i]).indexOf('.')) ? {} : [];\n\t}\n}\n", null, "var IDX=256, HEX=[], BUFFER;\nwhile (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);\n\nexport function v4() {\n\tvar i=0, num, out='';\n\n\tif (!BUFFER || ((IDX + 16) > 256)) {\n\t\tBUFFER = Array(i=256);\n\t\twhile (i--) BUFFER[i] = 256 * Math.random() | 0;\n\t\ti = IDX = 0;\n\t}\n\n\tfor (; i < 16; i++) {\n\t\tnum = BUFFER[IDX + i];\n\t\tif (i==6) out += HEX[num & 15 | 64];\n\t\telse if (i==8) out += HEX[num & 63 | 128];\n\t\telse out += HEX[num];\n\n\t\tif (i & 1 && i > 1 && i < 11) out += '-';\n\t}\n\n\tIDX++;\n\treturn out;\n}\n", null, null, null, "export default function(url, options) {\n\toptions = options || {};\n\treturn new Promise( (resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\tconst keys = [];\n\t\tconst all = [];\n\t\tconst headers = {};\n\n\t\tconst response = () => ({\n\t\t\tok: (request.status/100|0) == 2,\t\t// 200-299\n\t\t\tstatusText: request.statusText,\n\t\t\tstatus: request.status,\n\t\t\turl: request.responseURL,\n\t\t\ttext: () => Promise.resolve(request.responseText),\n\t\t\tjson: () => Promise.resolve(request.responseText).then(JSON.parse),\n\t\t\tblob: () => Promise.resolve(new Blob([request.response])),\n\t\t\tclone: response,\n\t\t\theaders: {\n\t\t\t\tkeys: () => keys,\n\t\t\t\tentries: () => all,\n\t\t\t\tget: n => headers[n.toLowerCase()],\n\t\t\t\thas: n => n.toLowerCase() in headers\n\t\t\t}\n\t\t});\n\n\t\trequest.open(options.method || 'get', url, true);\n\n\t\trequest.onload = () => {\n\t\t\trequest.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, (m, key, value) => {\n\t\t\t\tkeys.push(key = key.toLowerCase());\n\t\t\t\tall.push([key, value]);\n\t\t\t\theaders[key] = headers[key] ? `${headers[key]},${value}` : value;\n\t\t\t});\n\t\t\tresolve(response());\n\t\t};\n\n\t\trequest.onerror = reject;\n\n\t\trequest.withCredentials = options.credentials=='include';\n\n\t\tfor (const i in options.headers) {\n\t\t\trequest.setRequestHeader(i, options.headers[i]);\n\t\t}\n\n\t\trequest.send(options.body || null);\n\t});\n}\n", null, null, "/*! js-cookie v3.0.1 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport default api;\n", null, null, null, null, null, null, null, null, null], "mappings": "6LAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,IAAA,CAAAC,IAAAC,IAQAF,EAAO,QAAUG,GAASC,EAAI,EAC9BJ,EAAO,QAAQ,KAAOA,EAAO,QAO7BA,EAAO,QAAQ,QAAU,SAAUK,EAAKC,EAAKC,EAAKC,EAAS,CACzD,OAAAL,GAASM,EAAO,EAAE,KAAK,KAAMJ,EAAKC,EAAKC,EAAKC,CAAO,EAC5CH,CACT,EAOAL,EAAO,QAAQ,IAAM,SAAUK,EAAKC,EAAKE,EAAS,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,KAAA,EACXM,IAAW,KACb,MAAA,CAAA,EAAO,IAAI,EAEbJ,EAAgBI,mBALD,OAAAF,iBAQjB,MAAA,CAAA,EAAOF,CAAa,OAvDAD,EAAAb,GAAA,8BA0DhB,SAAUmB,GACdb,EACAc,EAA0C,CAE1C,SAAeC,EAAMC,EAAY,+FAC3B,OAAAf,EAAa,GAEjB,CAAA,EAAMD,EAAG,CACP,QAASG,GAASa,EAAI,MAAO,CAC3B,MAAO,GACP,SAAU,GACX,EACD,aAAcF,GAAgB,CAAA,EAC9B,KAAI,SAAClB,EAAG,CACNK,EAAa,GACTL,IACFoB,EAAI,MAAQpB,EAAI,IAEpB,EACD,CAAC,SAEF,GAdAU,EAAA,KAAA,EAcI,CAACL,EACH,MAAM,IAAIgB,GAAmB,CAC3B,MAAO,GACP,KAAM,0BACN,OAAQ,qCACT,EAGH,MAAA,CAAA,EAAOD,CAAG,OAzBG,OAAAT,EAAAQ,EAAA,SA4BR,CACL,KAAM,qBAAA,OAAqBf,EAAG,IAAI,EAClC,KAAM,SACN,QAAS,QAET,SAAU,UAAA,CAAe,MAAA,EAAA,EACzB,KAAM,SAACgB,EAAG,CAAuB,OAAA,QAAQ,QAAQA,CAAG,CAAnB,EAEjC,MAAOD,EACP,KAAMA,EACN,SAAUA,EACV,MAAOA,EACP,MAAOA,EAEX,CA9CgBR,EAAAM,GAAA", "names": ["require_obj_case", "__commonJSMin", "exports", "module", "init_virtual_process_polyfill", "init_buffer", "multiple", "find", "obj", "key", "val", "options", "replace", "del", "fn", "path", "normalize", "isFunction", "defaultNormalize", "finished", "loop", "normalizedKey", "temp", "child", "__name", "require_address", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "obj_case_1", "__importDefault", "trait", "a", "b", "traits", "props", "__name", "default_1", "proto", "clone", "properties", "temp", "key", "__name", "exports", "require_is_enabled", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "disabled", "default_1", "integration", "__name", "require_lib", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "matcher", "iso", "numericKeys", "arr", "offset", "val", "millis", "string", "strict", "require_milliseconds", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "matcher", "string", "millis", "require_seconds", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "matcher", "string", "seconds", "millis", "require_lib", "__commonJSMin", "exports", "module", "init_virtual_process_polyfill", "init_buffer", "isodate", "milliseconds", "seconds", "objProto", "toStr", "isDate", "value", "__name", "isNumber", "val", "toMs", "num", "require_lib", "__commonJSMin", "exports", "module", "init_virtual_process_polyfill", "init_buffer", "isodate", "traverse", "input", "strict", "traverseObject", "traverseArray", "__name", "obj", "key", "arr", "value", "index", "require_facade", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "address_1", "__importDefault", "clone_1", "is_enabled_1", "new_date_1", "obj_case_1", "isodate_traverse_1", "Facade", "obj", "opts", "__name", "f", "field", "fields", "transform", "path", "multi", "one", "ret", "integration", "options", "integrations", "value", "allEnabled", "enabled", "settings", "active", "aliases", "id", "alias", "library", "device", "require_inherits_browser", "__commonJSMin", "exports", "module", "init_virtual_process_polyfill", "init_buffer", "__name", "ctor", "superCtor", "TempCtor", "require_alias", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "facade_1", "Alias", "dictionary", "opts", "__name", "matcher", "isEmail", "string", "__name", "exports", "require_group", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "is_email_1", "new_date_1", "facade_1", "Group", "dictionary", "opts", "__name", "g", "created", "email", "groupId", "aliases", "ret", "id", "alias", "value", "require_identify", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "facade_1", "obj_case_1", "__importDefault", "inherits_1", "is_email_1", "new_date_1", "trim", "__name", "str", "Identify", "dictionary", "opts", "i", "aliases", "ret", "id", "alias", "value", "email", "userId", "created", "name", "firstName", "lastName", "space", "date", "age", "now", "traits", "require_track", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "facade_1", "identify_1", "is_email_1", "obj_case_1", "Track", "dictionary", "opts", "__name", "t", "subtotal", "total", "n", "props", "products", "item", "aliases", "ret", "alias", "value", "email", "userId", "revenue", "event", "orderCompletedRegExp", "currency", "json", "val", "require_page", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "facade_1", "track_1", "is_email_1", "Page", "dictionary", "opts", "__name", "p", "aliases", "props", "category", "name", "alias", "value", "email", "userId", "json", "require_screen", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "page_1", "track_1", "Screen", "dictionary", "opts", "__name", "name", "json", "require_delete", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "inherits_1", "__importDefault", "facade_1", "Delete", "dictionary", "opts", "__name", "require_dist", "__commonJSMin", "exports", "init_virtual_process_polyfill", "init_buffer", "facade_1", "alias_1", "group_1", "identify_1", "track_1", "page_1", "screen_1", "delete_1", "__assign", "init_virtual_process_polyfill", "init_buffer", "dset", "obj", "keys", "val", "i", "l", "t", "x", "k", "__name", "init_virtual_process_polyfill", "init_buffer", "init_virtual_process_polyfill", "init_buffer", "IDX", "HEX", "BUFFER", "v4", "i", "num", "out", "__name", "CoreLogger", "__name", "level", "message", "extras", "time", "formatted", "logs", "log", "line", "__assign", "key", "_c", "_b", "_a", "logEntry", "compactMetricType", "__name", "type", "enums", "CoreStats", "metric", "by", "tags", "value", "formatted", "m", "__assign", "NullStats", "_super", "__extends", "__name", "_args", "_i", "CoreStats", "ContextCancelation", "options", "_a", "_b", "_c", "__name", "CoreContext", "event", "id", "stats", "logger", "v4", "NullStats", "CoreLogger", "__name", "other", "error", "ContextCancelation", "level", "message", "extras", "path", "val", "integrationName", "_a", "dset", "options", "init_virtual_process_polyfill", "init_buffer", "url", "options", "Promise", "resolve", "reject", "request", "XMLHttpRequest", "keys", "all", "headers", "response", "ok", "status", "statusText", "responseURL", "text", "responseText", "json", "then", "JSON", "parse", "blob", "Blob", "clone", "entries", "get", "n", "toLowerCase", "has", "i", "open", "method", "onload", "getAllResponseHeaders", "replace", "m", "key", "value", "push", "onerror", "withCredentials", "credentials", "setRequestHeader", "send", "body", "init_virtual_process_polyfill", "init_buffer", "getGlobal", "__name", "fetch", "__name", "args", "_i", "global", "getGlobal", "unfetch_module_default", "init_virtual_process_polyfill", "init_buffer", "version", "init_virtual_process_polyfill", "init_buffer", "assign", "target", "i", "source", "key", "__name", "defaultConverter", "value", "init", "converter", "defaultAttributes", "set", "attributes", "stringifiedAttributes", "attributeName", "get", "cookies", "jar", "parts", "foundKey", "api", "js_cookie_default", "init_virtual_process_polyfill", "init_buffer", "levels", "url", "host", "parts", "last", "i", "__name", "parseUrl", "tld", "parsedUrl", "lvls", "cname", "domain", "opts", "js_cookie_default", "init_virtual_process_polyfill", "init_buffer", "bindAll", "obj", "proto", "_i", "_a", "key", "desc", "__name", "defaults", "Store", "__name", "key", "value", "ONE_YEAR", "Cookie", "_super", "__extends", "options", "_this", "__assign", "cookieEnabled", "js_cookie_default", "tld", "localStorageWarning", "__name", "key", "state", "LocalStorage", "_super", "__extends", "test", "val", "value", "Store", "UniversalStorage", "stores", "storageOptions", "__name", "storeTypes", "_this", "storeType", "storage", "key", "val", "coercedValue", "_i", "_a", "store", "value", "getAvailableStorageOptions", "cookieOptions", "Cookie", "LocalStorage", "Store", "__name", "User", "options", "defaults", "_this", "id", "prevId", "changingIdentity", "retId", "retLeg", "val", "_a", "_b", "v4", "traits", "_d", "_c", "isDisabled", "shouldPersist", "defaultStorageTargets", "storageOptions", "t", "UniversalStorage", "legacyUser", "bindAll", "anon", "user", "currentId", "__assign", "groupDefaults", "Group", "_super", "__extends", "options", "cookie", "_this", "_id", "bindAll", "__name", "User", "cookieOptions", "getCookieOptions", "domain", "tld", "__name", "_version", "getVersionType", "_version", "__name", "ampId", "js_cookie_default", "utm", "query", "acc", "str", "_a", "k", "_b", "v", "utmParam", "gracefulDecodeURIComponent", "ads", "queryIds", "parts", "_i", "parts_1", "part", "referrerId", "ctx", "disablePersistance", "storage", "UniversalStorage", "getAvailableStorageOptions", "getCookieOptions", "stored", "ad", "__assign", "normalize", "analytics", "json", "settings", "integrations", "user", "locale", "type", "version", "_c", "failed", "bundled", "unbundled", "key", "integration", "_e", "settingsUnbundled", "configIds", "_d", "bundledConfigIds", "name", "id", "amp", "createRemoteMetric", "__name", "metric", "tags", "versionType", "formattedTags", "acc", "t", "_a", "k", "v", "__assign", "version", "logError", "err", "RemoteMetrics", "options", "_this", "_b", "_c", "_d", "flushing_1", "run_1", "remoteMetric", "getVersionType", "error", "payload", "headers", "url", "fetch", "remoteMetrics", "Stats", "_super", "__extends", "__name", "options", "RemoteMetrics", "metric", "by", "tags", "CoreStats", "Context", "_super", "__extends", "event", "id", "Stats", "__name", "CoreContext", "init_virtual_process_polyfill", "init_buffer", "import_facade", "toFacade", "evt", "options", "fcd", "__name", "applyDestinationMiddleware", "destination", "evt", "middleware", "applyMiddleware", "event", "fn", "nextCalled", "returnedEvent", "toFacade", "_b", "__assign", "_a", "__name", "modifiedEvent", "middleware_1", "_i", "md", "result", "sourceMiddlewarePlugin", "integrations", "apply", "ctx", "ContextCancelation"] }