://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return toString.call(val) === '[object FormData]';\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return toString.call(val) === '[object URLSearchParams]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","class AgentSender {\n\tconstructor(innerSender) {\n\t\tthis.sender = innerSender;\n\t}\n\n\tsend(request) {\n\t\trequest.parameters.agent = \"smarty (sdk:javascript@\" + require(\"../package.json\").version + \")\";\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject);\n\t\t});\n\t}\n}\n\nmodule.exports = AgentSender;","class BaseUrlSender {\n\tconstructor(innerSender, urlOverride) {\n\t\tthis.urlOverride = urlOverride;\n\t\tthis.sender = innerSender;\n\t}\n\n\tsend(request) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\trequest.baseUrl = this.urlOverride;\n\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject);\n\t\t});\n\t}\n}\n\nmodule.exports = BaseUrlSender;","const BatchFullError = require(\"./Errors\").BatchFullError;\n\n/**\n * This class contains a collection of up to 100 lookups to be sent to one of the Smarty APIs
\n * all at once. This is more efficient than sending them one at a time.\n */\nclass Batch {\n\tconstructor () {\n\t\tthis.lookups = [];\n\t}\n\n\tadd (lookup) {\n\t\tif (this.lookupsHasRoomForLookup()) this.lookups.push(lookup);\n\t\telse throw new BatchFullError();\n\t}\n\n\tlookupsHasRoomForLookup() {\n\t\tconst maxNumberOfLookups = 100;\n\t\treturn this.lookups.length < maxNumberOfLookups;\n\t}\n\n\tlength() {\n\t\treturn this.lookups.length;\n\t}\n\n\tgetByIndex(index) {\n\t\treturn this.lookups[index];\n\t}\n\n\tgetByInputId(inputId) {\n\t\treturn this.lookups.filter(lookup => {\n\t\t\treturn lookup.inputId === inputId;\n\t\t})[0];\n\t}\n\n\t/**\n\t * Clears the lookups stored in the batch so it can be used again.
\n\t * This helps avoid the overhead of building a new Batch object for each group of lookups.\n\t */\n\tclear () {\n\t\tthis.lookups = [];\n\t}\n\n\tisEmpty () {\n\t\treturn this.length() === 0;\n\t}\n}\n\nmodule.exports = Batch;","const HttpSender = require(\"./HttpSender\");\nconst SigningSender = require(\"./SigningSender\");\nconst BaseUrlSender = require(\"./BaseUrlSender\");\nconst AgentSender = require(\"./AgentSender\");\nconst StaticCredentials = require(\"./StaticCredentials\");\nconst SharedCredentials = require(\"./SharedCredentials\");\nconst CustomHeaderSender = require(\"./CustomHeaderSender\");\nconst StatusCodeSender = require(\"./StatusCodeSender\");\nconst LicenseSender = require(\"./LicenseSender\");\nconst BadCredentialsError = require(\"./Errors\").BadCredentialsError;\n\n//TODO: refactor this to work more cleanly with a bundler.\nconst UsStreetClient = require(\"./us_street/Client\");\nconst UsZipcodeClient = require(\"./us_zipcode/Client\");\nconst UsAutocompleteClient = require(\"./us_autocomplete/Client\");\nconst UsAutocompleteProClient = require(\"./us_autocomplete_pro/Client\");\nconst UsExtractClient = require(\"./us_extract/Client\");\nconst InternationalStreetClient = require(\"./international_street/Client\");\nconst UsReverseGeoClient = require(\"./us_reverse_geo/Client\");\nconst InternationalAddressAutocompleteClient = require(\"./international_address_autocomplete/Client\");\n\nconst INTERNATIONAL_STREET_API_URI = \"https://international-street.api.smartystreets.com/verify\";\nconst US_AUTOCOMPLETE_API_URL = \"https://us-autocomplete.api.smartystreets.com/suggest\";\nconst US_AUTOCOMPLETE_PRO_API_URL = \"https://us-autocomplete-pro.api.smartystreets.com/lookup\";\nconst US_EXTRACT_API_URL = \"https://us-extract.api.smartystreets.com/\";\nconst US_STREET_API_URL = \"https://us-street.api.smartystreets.com/street-address\";\nconst US_ZIP_CODE_API_URL = \"https://us-zipcode.api.smartystreets.com/lookup\";\nconst US_REVERSE_GEO_API_URL = \"https://us-reverse-geo.api.smartystreets.com/lookup\";\nconst INTERNATIONAL_ADDRESS_AUTOCOMPLETE_API_URL = \"https://international-autocomplete.api.smartystreets.com/lookup\";\n\n/**\n * The ClientBuilder class helps you build a client object for one of the supported Smarty APIs.
\n * You can use ClientBuilder's methods to customize settings like maximum retries or timeout duration. These methods
\n * are chainable, so you can usually get set up with one line of code.\n */\nclass ClientBuilder {\n\tconstructor(signer) {\n\t\tif (noCredentialsProvided()) throw new BadCredentialsError();\n\n\t\tthis.signer = signer;\n\t\tthis.httpSender = undefined;\n\t\tthis.maxRetries = 5;\n\t\tthis.maxTimeout = 10000;\n\t\tthis.baseUrl = undefined;\n\t\tthis.proxy = undefined;\n\t\tthis.customHeaders = {};\n\t\tthis.debug = undefined;\n\t\tthis.licenses = [];\n\n\t\tfunction noCredentialsProvided() {\n\t\t\treturn !signer instanceof StaticCredentials || !signer instanceof SharedCredentials;\n\t\t}\n\t}\n\n\t/**\n\t * @param retries The maximum number of times to retry sending the request to the API. (Default is 5)\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithMaxRetries(retries) {\n\t\tthis.maxRetries = retries;\n\t\treturn this;\n\t}\n\n\t/**\n\t * @param timeout The maximum time (in milliseconds) to wait for a connection, and also to wait for
\n\t * the response to be read. (Default is 10000)\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithMaxTimeout(timeout) {\n\t\tthis.maxTimeout = timeout;\n\t\treturn this;\n\t}\n\n\t/**\n\t * @param sender Default is a series of nested senders. See buildSender().\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithSender(sender) {\n\t\tthis.httpSender = sender;\n\t\treturn this;\n\t}\n\n\t/**\n\t * This may be useful when using a local installation of the Smarty APIs.\n\t * @param url Defaults to the URL for the API corresponding to the Client object being built.\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithBaseUrl(url) {\n\t\tthis.baseUrl = url;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Use this to specify a proxy through which to send all lookups.\n\t * @param host The host of the proxy server (do not include the port).\n\t * @param port The port on the proxy server to which you wish to connect.\n\t * @param protocol The protocol on the proxy server to which you wish to connect. If the proxy server uses HTTPS, then you must set the protocol to 'https'.\n\t * @param username The username to login to the proxy.\n\t * @param password The password to login to the proxy.\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithProxy(host, port, protocol, username, password) {\n\t\tthis.proxy = {\n\t\t\thost: host,\n\t\t\tport: port,\n\t\t\tprotocol: protocol,\n\t\t};\n\n\t\tif (username && password) {\n\t\t\tthis.proxy.auth = {\n\t\t\t\tusername: username,\n\t\t\t\tpassword: password,\n\t\t\t};\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Use this to add any additional headers you need.\n\t * @param customHeaders A String to Object Map of header name/value pairs.\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithCustomHeaders(customHeaders) {\n\t\tthis.customHeaders = customHeaders;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Enables debug mode, which will print information about the HTTP request and response to console.log\n\t * @return Returns this to accommodate method chaining.\n\t */\n\twithDebug() {\n\t\tthis.debug = true;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Allows the caller to specify the subscription license (aka \"track\") they wish to use.\n\t * @param licenses A String Array of licenses.\n\t * @returns Returns this to accommodate method chaining.\n\t */\n\twithLicenses(licenses) {\n\t\tthis.licenses = licenses;\n\n\t\treturn this;\n\t}\n\n\tbuildSender() {\n\t\tif (this.httpSender) return this.httpSender;\n\n\t\tconst httpSender = new HttpSender(this.maxTimeout, this.maxRetries, this.proxy, this.debug);\n\t\tconst statusCodeSender = new StatusCodeSender(httpSender);\n\t\tconst signingSender = new SigningSender(statusCodeSender, this.signer);\n\t\tconst agentSender = new AgentSender(signingSender);\n\t\tconst customHeaderSender = new CustomHeaderSender(agentSender, this.customHeaders);\n\t\tconst baseUrlSender = new BaseUrlSender(customHeaderSender, this.baseUrl);\n\t\tconst licenseSender = new LicenseSender(baseUrlSender, this.licenses);\n\n\t\treturn licenseSender;\n\t}\n\n\tbuildClient(baseUrl, Client) {\n\t\tif (!this.baseUrl) {\n\t\t\tthis.baseUrl = baseUrl;\n\t\t}\n\n\t\treturn new Client(this.buildSender());\n\t}\n\n\tbuildUsStreetApiClient() {\n\t\treturn this.buildClient(US_STREET_API_URL, UsStreetClient);\n\t}\n\n\tbuildUsZipcodeClient() {\n\t\treturn this.buildClient(US_ZIP_CODE_API_URL, UsZipcodeClient);\n\t}\n\n\tbuildUsAutocompleteClient() { // Deprecated\n\t\treturn this.buildClient(US_AUTOCOMPLETE_API_URL, UsAutocompleteClient);\n\t}\n\n\tbuildUsAutocompleteProClient() {\n\t\treturn this.buildClient(US_AUTOCOMPLETE_PRO_API_URL, UsAutocompleteProClient);\n\t}\n\n\tbuildUsExtractClient() {\n\t\treturn this.buildClient(US_EXTRACT_API_URL, UsExtractClient);\n\t}\n\n\tbuildInternationalStreetClient() {\n\t\treturn this.buildClient(INTERNATIONAL_STREET_API_URI, InternationalStreetClient);\n\t}\n\n\tbuildUsReverseGeoClient() {\n\t\treturn this.buildClient(US_REVERSE_GEO_API_URL, UsReverseGeoClient);\n\t}\n\n\tbuildInternationalAddressAutocompleteClient() {\n\t\treturn this.buildClient(INTERNATIONAL_ADDRESS_AUTOCOMPLETE_API_URL, InternationalAddressAutocompleteClient);\n\t}\n}\n\nmodule.exports = ClientBuilder;","class CustomHeaderSender {\n\tconstructor(innerSender, customHeaders) {\n\t\tthis.sender = innerSender;\n\t\tthis.customHeaders = customHeaders;\n\t}\n\n\tsend(request) {\n\t\tfor (let key in this.customHeaders) {\n\t\t\trequest.headers[key] = this.customHeaders[key];\n\t\t}\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject);\n\t\t});\n\t}\n}\n\nmodule.exports = CustomHeaderSender;","class SmartyError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t}\n}\n\nclass BatchFullError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"A batch can contain a max of 100 lookups.\");\n\t}\n}\n\nclass BatchEmptyError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"A batch must contain at least 1 lookup.\");\n\t}\n}\n\nclass UndefinedLookupError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"The lookup provided is missing or undefined. Make sure you're passing a Lookup object.\");\n\t}\n}\n\nclass BadCredentialsError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Unauthorized: The credentials were provided incorrectly or did not match any existing active credentials.\");\n\t}\n}\n\nclass PaymentRequiredError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Payment Required: There is no active subscription for the account associated with the credentials submitted with the request.\");\n\t}\n}\n\nclass RequestEntityTooLargeError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Request Entity Too Large: The request body has exceeded the maximum size.\");\n\t}\n}\n\nclass BadRequestError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Bad Request (Malformed Payload): A GET request lacked a street field or the request body of a POST request contained malformed JSON.\");\n\t}\n}\n\nclass UnprocessableEntityError extends SmartyError {\n\tconstructor(message) {\n\t\tsuper(message);\n\t}\n}\n\nclass TooManyRequestsError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"When using the public 'embedded key' authentication, we restrict the number of requests coming from a given source over too short of a time.\");\n\t}\n}\n\nclass InternalServerError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Internal Server Error.\");\n\t}\n}\n\nclass ServiceUnavailableError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"Service Unavailable. Try again later.\");\n\t}\n}\n\nclass GatewayTimeoutError extends SmartyError {\n\tconstructor() {\n\t\tsuper(\"The upstream data provider did not respond in a timely fashion and the request failed. A serious, yet rare occurrence indeed.\");\n\t}\n}\n\nmodule.exports = {\n\tBatchFullError: BatchFullError,\n\tBatchEmptyError: BatchEmptyError,\n\tUndefinedLookupError: UndefinedLookupError,\n\tBadCredentialsError: BadCredentialsError,\n\tPaymentRequiredError: PaymentRequiredError,\n\tRequestEntityTooLargeError: RequestEntityTooLargeError,\n\tBadRequestError: BadRequestError,\n\tUnprocessableEntityError: UnprocessableEntityError,\n\tTooManyRequestsError: TooManyRequestsError,\n\tInternalServerError: InternalServerError,\n\tServiceUnavailableError: ServiceUnavailableError,\n\tGatewayTimeoutError: GatewayTimeoutError\n};","const Response = require(\"./Response\");\nconst Axios = require(\"axios\");\nconst axiosRetry = require(\"axios-retry\");\n\nclass HttpSender {\n\tconstructor(timeout = 10000, retries = 5, proxyConfig, debug = false) {\n\t\taxiosRetry(Axios, {\n\t\t\tretries: retries,\n\t\t});\n\t\tthis.timeout = timeout;\n\t\tthis.proxyConfig = proxyConfig;\n\t\tif (debug) this.enableDebug();\n\t}\n\n\tbuildRequestConfig({payload, parameters, headers, baseUrl}) {\n\t\tlet config = {\n\t\t\tmethod: \"GET\",\n\t\t\ttimeout: this.timeout,\n\t\t\tparams: parameters,\n\t\t\theaders: headers,\n\t\t\tbaseURL: baseUrl,\n\t\t\tvalidateStatus: function (status) {\n\t\t\t\treturn status < 500;\n\t\t\t},\n\t\t};\n\n\t\tif (payload) {\n\t\t\tconfig.method = \"POST\";\n\t\t\tconfig.data = payload;\n\t\t}\n\n\t\tif (this.proxyConfig) config.proxy = this.proxyConfig;\n\t\treturn config;\n\t}\n\n\tbuildSmartyResponse(response, error) {\n\t\tif (response) return new Response(response.status, response.data);\n\t\treturn new Response(undefined, undefined, error)\n\t}\n\n\tsend(request) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet requestConfig = this.buildRequestConfig(request);\n\n\t\t\tAxios(requestConfig)\n\t\t\t\t.then(response => {\n\t\t\t\t\tlet smartyResponse = this.buildSmartyResponse(response);\n\n\t\t\t\t\tif (smartyResponse.statusCode >= 400) reject(smartyResponse);\n\n\t\t\t\t\tresolve(smartyResponse);\n\t\t\t\t})\n\t\t\t\t.catch(error => reject(this.buildSmartyResponse(undefined, error)));\n\t\t});\n\t}\n\n\tenableDebug() {\n\t\tAxios.interceptors.request.use(request => {\n\t\t\tconsole.log('Request:\\r\\n', request);\n\t\t\tconsole.log('\\r\\n*******************************************\\r\\n');\n\t\t\treturn request\n\t\t});\n\n\t\tAxios.interceptors.response.use(response => {\n\t\t\tconsole.log('Response:\\r\\n');\n\t\t\tconsole.log('Status:', response.status, response.statusText);\n\t\t\tconsole.log('Headers:', response.headers);\n\t\t\tconsole.log('Data:', response.data);\n\t\t\treturn response\n\t\t})\n\t}\n}\n\nmodule.exports = HttpSender;","class InputData {\n\tconstructor(lookup) {\n\t\tthis.lookup = lookup;\n\t\tthis.data = {};\n\t}\n\n\tadd(apiField, lookupField) {\n\t\tif (this.lookupFieldIsPopulated(lookupField)) this.data[apiField] = this.lookup[lookupField];\n\t}\n\n\tlookupFieldIsPopulated(lookupField) {\n\t\treturn this.lookup[lookupField] !== \"\" && this.lookup[lookupField] !== undefined;\n\t}\n}\n\nmodule.exports = InputData;","class LicenseSender {\n\tconstructor(innerSender, licenses) {\n\t\tthis.sender = innerSender;\n\t\tthis.licenses = licenses;\n\t}\n\n\tsend(request) {\n\t\tif (this.licenses.length !== 0) {\n\t\t\trequest.parameters[\"license\"] = this.licenses.join(\",\");\n\t\t}\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject);\n\t\t});\n\t}\n}\n\nmodule.exports = LicenseSender;","class Request {\n\tconstructor(payload) {\n\t\tthis.baseUrl = \"\";\n\t\tthis.payload = payload;\n\t\tthis.headers = {\n\t\t\t\"Content-Type\": \"application/json; charset=utf-8\",\n\t\t};\n\n\t\tthis.parameters = {};\n\t}\n}\n\nmodule.exports = Request;","class Response {\n\tconstructor (statusCode, payload, error = undefined) {\n\t\tthis.statusCode = statusCode;\n\t\tthis.payload = payload;\n\t\tthis.error = error;\n\t}\n}\n\nmodule.exports = Response;","class SharedCredentials {\n\tconstructor(authId, hostName) {\n\t\tthis.authId = authId;\n\t\tthis.hostName = hostName;\n\t}\n\n\tsign(request) {\n\t\trequest.parameters[\"key\"] = this.authId;\n\t\tif (this.hostName) request.headers[\"Referer\"] = \"https://\" + this.hostName;\n\t}\n}\n\nmodule.exports = SharedCredentials;","const UnprocessableEntityError = require(\"./Errors\").UnprocessableEntityError;\nconst SharedCredentials = require(\"./SharedCredentials\");\n\nclass SigningSender {\n\tconstructor(innerSender, signer) {\n\t\tthis.signer = signer;\n\t\tthis.sender = innerSender;\n\t}\n\n\tsend(request) {\n\t\tconst sendingPostWithSharedCredentials = request.payload && this.signer instanceof SharedCredentials;\n\t\tif (sendingPostWithSharedCredentials) {\n\t\t\tconst message = \"Shared credentials cannot be used in batches with a length greater than 1 or when using the US Extract API.\";\n\t\t\tthrow new UnprocessableEntityError(message);\n\t\t}\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.signer.sign(request);\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject);\n\t\t});\n\t}\n}\n\nmodule.exports = SigningSender;","class StaticCredentials {\n\tconstructor (authId, authToken) {\n\t\tthis.authId = authId;\n\t\tthis.authToken = authToken;\n\t}\n\n\tsign (request) {\n\t\trequest.parameters[\"auth-id\"] = this.authId;\n\t\trequest.parameters[\"auth-token\"] = this.authToken;\n\t}\n}\n\nmodule.exports = StaticCredentials;","const Errors = require(\"./Errors\");\n\nclass StatusCodeSender {\n\tconstructor(innerSender) {\n\t\tthis.sender = innerSender;\n\t}\n\n\tsend(request) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(error => {\n\t\t\t\t\tswitch (error.statusCode) {\n\t\t\t\t\t\tcase 400:\n\t\t\t\t\t\t\terror.error = new Errors.BadRequestError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 401:\n\t\t\t\t\t\t\terror.error = new Errors.BadCredentialsError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 402:\n\t\t\t\t\t\t\terror.error = new Errors.PaymentRequiredError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 413:\n\t\t\t\t\t\t\terror.error = new Errors.RequestEntityTooLargeError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 422:\n\t\t\t\t\t\t\terror.error = new Errors.UnprocessableEntityError(\"GET request lacked required fields.\");\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 429:\n\t\t\t\t\t\t\terror.error = new Errors.TooManyRequestsError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 500:\n\t\t\t\t\t\t\terror.error = new Errors.InternalServerError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 503:\n\t\t\t\t\t\t\terror.error = new Errors.ServiceUnavailableError();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 504:\n\t\t\t\t\t\t\terror.error = new Errors.GatewayTimeoutError();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t});\n\t}\n}\n\nmodule.exports = StatusCodeSender;","const Errors = require(\"../Errors\");\nconst Request = require(\"../Request\");\nconst Suggestion = require(\"./Suggestion\");\n\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new Errors.UndefinedLookupError();\n\n\t\tlet request = new Request();\n\t\trequest.parameters = {\n\t\t\tsearch: lookup.search,\n\t\t\tcountry: lookup.country,\n\t\t\tmax_results: lookup.max_results,\n\t\t\tinclude_only_administrative_area: lookup.include_only_administrative_area,\n\t\t\tinclude_only_locality: lookup.include_only_locality,\n\t\t\tinclude_only_postal_code: lookup.include_only_postal_code,\n\t\t};\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tlookup.result = buildSuggestionsFromResponse(response.payload);\n\t\t\t\t\tresolve(lookup);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction buildSuggestionsFromResponse(payload) {\n\t\t\tif (payload && payload.candidates === null) return [];\n\n\t\t\treturn payload.candidates.map(suggestion => new Suggestion(suggestion));\n\t\t}\n\t}\n}\n\nmodule.exports = Client;","class Lookup {\n\tconstructor(search = \"\", country = \"United States\", max_results = undefined, include_only_administrative_area = \"\", include_only_locality = \"\", include_only_postal_code = \"\") {\n\t\tthis.result = [];\n\n\t\tthis.search = search;\n\t\tthis.country = country;\n\t\tthis.max_results = max_results;\n\t\tthis.include_only_administrative_area = include_only_administrative_area;\n\t\tthis.include_only_locality = include_only_locality;\n\t\tthis.include_only_postal_code = include_only_postal_code;\n\t}\n}\n\nmodule.exports = Lookup;","class Suggestion {\n\tconstructor(responseData) {\n\t\tthis.street = responseData.street;\n\t\tthis.locality = responseData.locality;\n\t\tthis.administrativeArea = responseData.administrative_area;\n\t\tthis.postalCode = responseData.postal_code;\n\t\tthis.countryIso3 = responseData.country_iso3;\n\t}\n}\n\nmodule.exports = Suggestion;","/**\n * A candidate is a possible match for an address that was submitted.
\n * A lookup can have multiple candidates if the address was ambiguous.\n *\n * @see \"https://www.smarty.com/docs/cloud/international-street-api#root\"\n */\nclass Candidate {\n\tconstructor(responseData) {\n\t\tthis.organization = responseData.organization;\n\t\tthis.address1 = responseData.address1;\n\t\tthis.address2 = responseData.address2;\n\t\tthis.address3 = responseData.address3;\n\t\tthis.address4 = responseData.address4;\n\t\tthis.address5 = responseData.address5;\n\t\tthis.address6 = responseData.address6;\n\t\tthis.address7 = responseData.address7;\n\t\tthis.address8 = responseData.address8;\n\t\tthis.address9 = responseData.address9;\n\t\tthis.address10 = responseData.address10;\n\t\tthis.address11 = responseData.address11;\n\t\tthis.address12 = responseData.address12;\n\n\t\tthis.components = {};\n\t\tif (responseData.components !== undefined) {\n\t\t\tthis.components.countryIso3 = responseData.components.country_iso_3;\n\t\t\tthis.components.superAdministrativeArea = responseData.components.super_administrative_area;\n\t\t\tthis.components.administrativeArea = responseData.components.administrative_area;\n\t\t\tthis.components.subAdministrativeArea = responseData.components.sub_administrative_area;\n\t\t\tthis.components.dependentLocality = responseData.components.dependent_locality;\n\t\t\tthis.components.dependentLocalityName = responseData.components.dependent_locality_name;\n\t\t\tthis.components.doubleDependentLocality = responseData.components.double_dependent_locality;\n\t\t\tthis.components.locality = responseData.components.locality;\n\t\t\tthis.components.postalCode = responseData.components.postal_code;\n\t\t\tthis.components.postalCodeShort = responseData.components.postal_code_short;\n\t\t\tthis.components.postalCodeExtra = responseData.components.postal_code_extra;\n\t\t\tthis.components.premise = responseData.components.premise;\n\t\t\tthis.components.premiseExtra = responseData.components.premise_extra;\n\t\t\tthis.components.premisePrefixNumber = responseData.components.premise_prefix_number;\n\t\t\tthis.components.premiseNumber = responseData.components.premise_number;\n\t\t\tthis.components.premiseType = responseData.components.premise_type;\n\t\t\tthis.components.thoroughfare = responseData.components.thoroughfare;\n\t\t\tthis.components.thoroughfarePredirection = responseData.components.thoroughfare_predirection;\n\t\t\tthis.components.thoroughfarePostdirection = responseData.components.thoroughfare_postdirection;\n\t\t\tthis.components.thoroughfareName = responseData.components.thoroughfare_name;\n\t\t\tthis.components.thoroughfareTrailingType = responseData.components.thoroughfare_trailing_type;\n\t\t\tthis.components.thoroughfareType = responseData.components.thoroughfare_type;\n\t\t\tthis.components.dependentThoroughfare = responseData.components.dependent_thoroughfare;\n\t\t\tthis.components.dependentThoroughfarePredirection = responseData.components.dependent_thoroughfare_predirection;\n\t\t\tthis.components.dependentThoroughfarePostdirection = responseData.components.dependent_thoroughfare_postdirection;\n\t\t\tthis.components.dependentThoroughfareName = responseData.components.dependent_thoroughfare_name;\n\t\t\tthis.components.dependentThoroughfareTrailingType = responseData.components.dependent_thoroughfare_trailing_type;\n\t\t\tthis.components.dependentThoroughfareType = responseData.components.dependent_thoroughfare_type;\n\t\t\tthis.components.building = responseData.components.building;\n\t\t\tthis.components.buildingLeadingType = responseData.components.building_leading_type;\n\t\t\tthis.components.buildingName = responseData.components.building_name;\n\t\t\tthis.components.buildingTrailingType = responseData.components.building_trailing_type;\n\t\t\tthis.components.subBuildingType = responseData.components.sub_building_type;\n\t\t\tthis.components.subBuildingNumber = responseData.components.sub_building_number;\n\t\t\tthis.components.subBuildingName = responseData.components.sub_building_name;\n\t\t\tthis.components.subBuilding = responseData.components.sub_building;\n\t\t\tthis.components.postBox = responseData.components.post_box;\n\t\t\tthis.components.postBoxType = responseData.components.post_box_type;\n\t\t\tthis.components.postBoxNumber = responseData.components.post_box_number;\n\t\t}\n\n\t\tthis.analysis = {};\n\t\tif (responseData.analysis !== undefined) {\n\t\t\tthis.analysis.verificationStatus = responseData.analysis.verification_status;\n\t\t\tthis.analysis.addressPrecision = responseData.analysis.address_precision;\n\t\t\tthis.analysis.maxAddressPrecision = responseData.analysis.max_address_precision;\n\n\t\t\tthis.analysis.changes = {};\n\t\t\tif (responseData.analysis.changes !== undefined) {\n\t\t\t\tthis.analysis.changes.organization = responseData.analysis.changes.organization;\n\t\t\t\tthis.analysis.changes.address1 = responseData.analysis.changes.address1;\n\t\t\t\tthis.analysis.changes.address2 = responseData.analysis.changes.address2;\n\t\t\t\tthis.analysis.changes.address3 = responseData.analysis.changes.address3;\n\t\t\t\tthis.analysis.changes.address4 = responseData.analysis.changes.address4;\n\t\t\t\tthis.analysis.changes.address5 = responseData.analysis.changes.address5;\n\t\t\t\tthis.analysis.changes.address6 = responseData.analysis.changes.address6;\n\t\t\t\tthis.analysis.changes.address7 = responseData.analysis.changes.address7;\n\t\t\t\tthis.analysis.changes.address8 = responseData.analysis.changes.address8;\n\t\t\t\tthis.analysis.changes.address9 = responseData.analysis.changes.address9;\n\t\t\t\tthis.analysis.changes.address10 = responseData.analysis.changes.address10;\n\t\t\t\tthis.analysis.changes.address11 = responseData.analysis.changes.address11;\n\t\t\t\tthis.analysis.changes.address12 = responseData.analysis.changes.address12;\n\n\t\t\t\tthis.analysis.changes.components = {};\n\t\t\t\tif (responseData.analysis.changes.components !== undefined) {\n\t\t\t\t\tthis.analysis.changes.components.countryIso3 = responseData.analysis.changes.components.country_iso_3;\n\t\t\t\t\tthis.analysis.changes.components.superAdministrativeArea = responseData.analysis.changes.components.super_administrative_area;\n\t\t\t\t\tthis.analysis.changes.components.administrativeArea = responseData.analysis.changes.components.administrative_area;\n\t\t\t\t\tthis.analysis.changes.components.subAdministrativeArea = responseData.analysis.changes.components.sub_administrative_area;\n\t\t\t\t\tthis.analysis.changes.components.dependentLocality = responseData.analysis.changes.components.dependent_locality;\n\t\t\t\t\tthis.analysis.changes.components.dependentLocalityName = responseData.analysis.changes.components.dependent_locality_name;\n\t\t\t\t\tthis.analysis.changes.components.doubleDependentLocality = responseData.analysis.changes.components.double_dependent_locality;\n\t\t\t\t\tthis.analysis.changes.components.locality = responseData.analysis.changes.components.locality;\n\t\t\t\t\tthis.analysis.changes.components.postalCode = responseData.analysis.changes.components.postal_code;\n\t\t\t\t\tthis.analysis.changes.components.postalCodeShort = responseData.analysis.changes.components.postal_code_short;\n\t\t\t\t\tthis.analysis.changes.components.postalCodeExtra = responseData.analysis.changes.components.postal_code_extra;\n\t\t\t\t\tthis.analysis.changes.components.premise = responseData.analysis.changes.components.premise;\n\t\t\t\t\tthis.analysis.changes.components.premiseExtra = responseData.analysis.changes.components.premise_extra;\n\t\t\t\t\tthis.analysis.changes.components.premisePrefixNumber = responseData.analysis.changes.components.premise_prefix_number;\n\t\t\t\t\tthis.analysis.changes.components.premiseNumber = responseData.analysis.changes.components.premise_number;\n\t\t\t\t\tthis.analysis.changes.components.premiseType = responseData.analysis.changes.components.premise_type;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfare = responseData.analysis.changes.components.thoroughfare;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfarePredirection = responseData.analysis.changes.components.thoroughfare_predirection;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfarePostdirection = responseData.analysis.changes.components.thoroughfare_postdirection;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfareName = responseData.analysis.changes.components.thoroughfare_name;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfareTrailingType = responseData.analysis.changes.components.thoroughfare_trailing_type;\n\t\t\t\t\tthis.analysis.changes.components.thoroughfareType = responseData.analysis.changes.components.thoroughfare_type;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfare = responseData.analysis.changes.components.dependent_thoroughfare;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfarePredirection = responseData.analysis.changes.components.dependent_thoroughfare_predirection;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfarePostdirection = responseData.analysis.changes.components.dependent_thoroughfare_postdirection;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfareName = responseData.analysis.changes.components.dependent_thoroughfare_name;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfareTrailingType = responseData.analysis.changes.components.dependent_thoroughfare_trailing_type;\n\t\t\t\t\tthis.analysis.changes.components.dependentThoroughfareType = responseData.analysis.changes.components.dependent_thoroughfare_type;\n\t\t\t\t\tthis.analysis.changes.components.building = responseData.analysis.changes.components.building;\n\t\t\t\t\tthis.analysis.changes.components.buildingLeadingType = responseData.analysis.changes.components.building_leading_type;\n\t\t\t\t\tthis.analysis.changes.components.buildingName = responseData.analysis.changes.components.building_name;\n\t\t\t\t\tthis.analysis.changes.components.buildingTrailingType = responseData.analysis.changes.components.building_trailing_type;\n\t\t\t\t\tthis.analysis.changes.components.subBuildingType = responseData.analysis.changes.components.sub_building_type;\n\t\t\t\t\tthis.analysis.changes.components.subBuildingNumber = responseData.analysis.changes.components.sub_building_number;\n\t\t\t\t\tthis.analysis.changes.components.subBuildingName = responseData.analysis.changes.components.sub_building_name;\n\t\t\t\t\tthis.analysis.changes.components.subBuilding = responseData.analysis.changes.components.sub_building;\n\t\t\t\t\tthis.analysis.changes.components.postBox = responseData.analysis.changes.components.post_box;\n\t\t\t\t\tthis.analysis.changes.components.postBoxType = responseData.analysis.changes.components.post_box_type;\n\t\t\t\t\tthis.analysis.changes.components.postBoxNumber = responseData.analysis.changes.components.post_box_number;\n\t\t\t\t}\n\t\t\t\t//TODO: Fill in the rest of these fields and their corresponding tests.\n\t\t\t}\n\t\t}\n\n\t\tthis.metadata = {};\n\t\tif (responseData.metadata !== undefined) {\n\t\t\tthis.metadata.latitude = responseData.metadata.latitude;\n\t\t\tthis.metadata.longitude = responseData.metadata.longitude;\n\t\t\tthis.metadata.geocodePrecision = responseData.metadata.geocode_precision;\n\t\t\tthis.metadata.maxGeocodePrecision = responseData.metadata.max_geocode_precision;\n\t\t\tthis.metadata.addressFormat = responseData.metadata.address_format;\n\t\t}\n\t}\n}\n\nmodule.exports = Candidate;","const Request = require(\"../Request\");\nconst Errors = require(\"../Errors\");\nconst Candidate = require(\"./Candidate\");\nconst buildInputData = require(\"../util/buildInputData\");\nconst keyTranslationFormat = require(\"../util/apiToSDKKeyMap\").internationalStreet;\n\n/**\n * This client sends lookups to the Smarty International Street API,
\n * and attaches the results to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new Errors.UndefinedLookupError();\n\n\t\tlet request = new Request();\n\t\trequest.parameters = buildInputData(lookup, keyTranslationFormat);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tresolve(attachLookupCandidates(response, lookup));\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction attachLookupCandidates(response, lookup) {\n\t\t\tresponse.payload.map(rawCandidate => {\n\t\t\t\tlookup.result.push(new Candidate(rawCandidate));\n\t\t\t});\n\n\t\t\treturn lookup;\n\t\t}\n\t}\n}\n\nmodule.exports = Client;","const UnprocessableEntityError = require(\"../Errors\").UnprocessableEntityError;\nconst messages = {\n\tcountryRequired: \"Country field is required.\",\n\tfreeformOrAddress1Required: \"Either freeform or address1 is required.\",\n\tinsufficientInformation: \"Insufficient information: One or more required fields were not set on the lookup.\",\n\tbadGeocode: \"Invalid input: geocode can only be set to 'true' (default is 'false'.\",\n\tinvalidLanguage: \"Invalid input: language can only be set to 'latin' or 'native'. When not set, the the output language will match the language of the input values.\"\n};\n\n\n/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * Note: Lookups must have certain required fields set with non-blank values.
\n * These can be found at the URL below.
\n * @see \"https://www.smarty.com/docs/cloud/international-street-api#http-input-fields\"\n */\nclass Lookup {\n\tconstructor(country, freeform) {\n\t\tthis.result = [];\n\n\t\tthis.country = country;\n\t\tthis.freeform = freeform;\n\t\tthis.address1 = undefined;\n\t\tthis.address2 = undefined;\n\t\tthis.address3 = undefined;\n\t\tthis.address4 = undefined;\n\t\tthis.organization = undefined;\n\t\tthis.locality = undefined;\n\t\tthis.administrativeArea = undefined;\n\t\tthis.postalCode = undefined;\n\t\tthis.geocode = undefined;\n\t\tthis.language = undefined;\n\t\tthis.inputId = undefined;\n\n\t\tthis.ensureEnoughInfo = this.ensureEnoughInfo.bind(this);\n\t\tthis.ensureValidData = this.ensureValidData.bind(this);\n\t}\n\n\tensureEnoughInfo() {\n\t\tif (fieldIsMissing(this.country)) throw new UnprocessableEntityError(messages.countryRequired);\n\n\t\tif (fieldIsSet(this.freeform)) return true;\n\n\t\tif (fieldIsMissing(this.address1)) throw new UnprocessableEntityError(messages.freeformOrAddress1Required);\n\n\t\tif (fieldIsSet(this.postalCode)) return true;\n\n\t\tif (fieldIsMissing(this.locality) || fieldIsMissing(this.administrativeArea)) throw new UnprocessableEntityError(messages.insufficientInformation);\n\n\t\treturn true;\n\t}\n\n\tensureValidData() {\n\t\tlet languageIsSetIncorrectly = () => {\n\t\t\tlet isLanguage = language => this.language.toLowerCase() === language;\n\n\t\t\treturn fieldIsSet(this.language) && !(isLanguage(\"latin\") || isLanguage(\"native\"));\n\t\t};\n\n\t\tlet geocodeIsSetIncorrectly = () => {\n\t\t\treturn fieldIsSet(this.geocode) && this.geocode.toLowerCase() !== \"true\";\n\t\t};\n\n\t\tif (geocodeIsSetIncorrectly()) throw new UnprocessableEntityError(messages.badGeocode);\n\n\t\tif (languageIsSetIncorrectly()) throw new UnprocessableEntityError(messages.invalidLanguage);\n\n\t\treturn true;\n\t}\n}\n\nfunction fieldIsMissing (field) {\n\tif (!field) return true;\n\n\tconst whitespaceCharacters = /\\s/g;\n\n\treturn field.replace(whitespaceCharacters, \"\").length < 1;\n}\n\nfunction fieldIsSet (field) {\n\treturn !fieldIsMissing(field);\n}\n\nmodule.exports = Lookup;","const Errors = require(\"../Errors\");\nconst Request = require(\"../Request\");\nconst Suggestion = require(\"./Suggestion\");\n\n/**\n * This client sends lookups to the Smarty US Autocomplete API,
\n * and attaches the results to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new Errors.UndefinedLookupError();\n\n\t\tlet request = new Request();\n\t\trequest.parameters = buildRequestParameters(lookup);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tlookup.result = buildSuggestionsFromResponse(response.payload);\n\t\t\t\t\tresolve(lookup);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction buildRequestParameters(lookup) {\n\t\t\treturn {\n\t\t\t\tprefix: lookup.prefix,\n\t\t\t\tsuggestions: lookup.maxSuggestions,\n\t\t\t\tcity_filter: joinFieldWith(lookup.cityFilter, \",\"),\n\t\t\t\tstate_filter: joinFieldWith(lookup.stateFilter, \",\"),\n\t\t\t\tprefer: joinFieldWith(lookup.prefer, \";\"),\n\t\t\t\tprefer_ratio: lookup.preferRatio,\n\t\t\t\tgeolocate: lookup.geolocate,\n\t\t\t\tgeolocate_precision: lookup.geolocatePrecision,\n\t\t\t};\n\n\t\t\tfunction joinFieldWith(field, delimiter) {\n\t\t\t\tif (field.length) return field.join(delimiter);\n\t\t\t}\n\t\t}\n\n\t\tfunction buildSuggestionsFromResponse(payload) {\n\t\t\tif (payload.suggestions === null) return [];\n\n\t\t\treturn payload.suggestions.map(suggestion => new Suggestion(suggestion));\n\t\t}\n\t}\n}\n\nmodule.exports = Client;","/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-autocomplete-api#http-request-input-fields\"\n */\nclass Lookup {\n\t/**\n\t * @param prefix The beginning of an address. This is required to be set.\n\t */\n\tconstructor(prefix) {\n\t\tthis.result = [];\n\n\t\tthis.prefix = prefix;\n\t\tthis.maxSuggestions = undefined;\n\t\tthis.cityFilter = [];\n\t\tthis.stateFilter = [];\n\t\tthis.prefer = [];\n\t\tthis.preferRatio = undefined;\n\t\tthis.geolocate = undefined;\n\t\tthis.geolocatePrecision = undefined;\n\t}\n}\n\nmodule.exports = Lookup;","/**\n * @see \"https://www.smarty.com/docs/cloud/us-autocomplete-api#http-response\"\n */\nclass Suggestion {\n\tconstructor(responseData) {\n\t\tthis.text = responseData.text;\n\t\tthis.streetLine = responseData.street_line;\n\t\tthis.city = responseData.city;\n\t\tthis.state = responseData.state;\n\t}\n}\n\nmodule.exports = Suggestion;","const Errors = require(\"../Errors\");\nconst Request = require(\"../Request\");\nconst Suggestion = require(\"./Suggestion\");\n\n/**\n * This client sends lookups to the Smarty US Autocomplete Pro API,
\n * and attaches the suggestions to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new Errors.UndefinedLookupError();\n\n\t\tlet request = new Request();\n\t\trequest.parameters = buildRequestParameters(lookup);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tlookup.result = buildSuggestionsFromResponse(response.payload);\n\t\t\t\t\tresolve(lookup);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction buildRequestParameters(lookup) {\n\t\t\treturn {\n\t\t\t\tsearch: lookup.search,\n\t\t\t\tselected: lookup.selected,\n\t\t\t\tmax_results: lookup.maxResults,\n\t\t\t\tinclude_only_cities: joinFieldWith(lookup.includeOnlyCities, \";\"),\n\t\t\t\tinclude_only_states: joinFieldWith(lookup.includeOnlyStates, \";\"),\n\t\t\t\tinclude_only_zip_codes: joinFieldWith(lookup.includeOnlyZIPCodes, \";\"),\n\t\t\t\texclude_states: joinFieldWith(lookup.excludeStates, \";\"),\n\t\t\t\tprefer_cities: joinFieldWith(lookup.preferCities, \";\"),\n\t\t\t\tprefer_states: joinFieldWith(lookup.preferStates, \";\"),\n\t\t\t\tprefer_zip_codes: joinFieldWith(lookup.preferZIPCodes, \";\"),\n\t\t\t\tprefer_ratio: lookup.preferRatio,\n\t\t\t\tprefer_geolocation: lookup.preferGeolocation,\n\t\t\t\tsource: lookup.source,\n\t\t\t};\n\n\t\t\tfunction joinFieldWith(field, delimiter) {\n\t\t\t\tif (field.length) return field.join(delimiter);\n\t\t\t}\n\t\t}\n\n\t\tfunction buildSuggestionsFromResponse(payload) {\n\t\t\tif (payload.suggestions === null) return [];\n\n\t\t\treturn payload.suggestions.map(suggestion => new Suggestion(suggestion));\n\t\t}\n\t}\n}\n\nmodule.exports = Client;","/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-autocomplete-api#pro-http-request-input-fields\"\n */\nclass Lookup {\n\t/**\n\t * @param search The beginning of an address. This is required to be set.\n\t */\n\tconstructor(search) {\n\t\tthis.result = [];\n\n\t\tthis.search = search;\n\t\tthis.selected = undefined;\n\t\tthis.maxResults = undefined;\n\t\tthis.includeOnlyCities = [];\n\t\tthis.includeOnlyStates = [];\n\t\tthis.includeOnlyZIPCodes = [];\n\t\tthis.excludeStates = [];\n\t\tthis.preferCities = [];\n\t\tthis.preferStates = [];\n\t\tthis.preferZIPCodes = [];\n\t\tthis.preferRatio = undefined;\n\t\tthis.preferGeolocation = undefined;\n\t\tthis.source = undefined\n\t}\n}\n\nmodule.exports = Lookup;","/**\n * @see \"https://www.smarty.com/docs/cloud/us-autocomplete-api#pro-http-response\"\n */\nclass Suggestion {\n\tconstructor(responseData) {\n\t\tthis.streetLine = responseData.street_line;\n\t\tthis.secondary = responseData.secondary;\n\t\tthis.city = responseData.city;\n\t\tthis.state = responseData.state;\n\t\tthis.zipcode = responseData.zipcode;\n\t\tthis.entries = responseData.entries;\n\t}\n}\n\nmodule.exports = Suggestion;","const Candidate = require(\"../us_street/Candidate\");\n\n/**\n * @see Smarty US Extract API docs\n */\nclass Address {\n\tconstructor (responseData) {\n\t\tthis.text = responseData.text;\n\t\tthis.verified = responseData.verified;\n\t\tthis.line = responseData.line;\n\t\tthis.start = responseData.start;\n\t\tthis.end = responseData.end;\n\t\tthis.candidates = responseData.api_output.map(rawAddress => new Candidate(rawAddress));\n\t}\n}\n\nmodule.exports = Address;","const Errors = require(\"../Errors\");\nconst Request = require(\"../Request\");\nconst Result = require(\"./Result\");\n\n/**\n * This client sends lookups to the Smarty US Extract API,
\n * and attaches the results to the Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new Errors.UndefinedLookupError();\n\n\t\tlet request = new Request(lookup.text);\n\t\trequest.parameters = buildRequestParams(lookup);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tlookup.result = new Result(response.payload);\n\t\t\t\t\tresolve(lookup);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction buildRequestParams(lookup) {\n\t\t\treturn {\n\t\t\t\thtml: lookup.html,\n\t\t\t\taggressive: lookup.aggressive,\n\t\t\t\taddr_line_breaks: lookup.addressesHaveLineBreaks,\n\t\t\t\taddr_per_line: lookup.addressesPerLine,\n\t\t\t};\n\t\t}\n\t}\n}\n\nmodule.exports = Client;","/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-extract-api#http-request-input-fields\"\n */\nclass Lookup {\n\t/**\n\t * @param text The text that is to have addresses extracted out of it for verification (required)\n\t */\n\tconstructor(text) {\n\t\tthis.result = {\n\t\t\tmeta: {},\n\t\t\taddresses: [],\n\t\t};\n\t\t//TODO: require the text field.\n\t\tthis.text = text;\n\t\tthis.html = undefined;\n\t\tthis.aggressive = undefined;\n\t\tthis.addressesHaveLineBreaks = undefined;\n\t\tthis.addressesPerLine = undefined;\n\t}\n}\n\nmodule.exports = Lookup;","const Address = require(\"./Address\");\n\n/**\n * @see Smarty US Extract API docs\n */\nclass Result {\n\tconstructor({meta, addresses}) {\n\t\tthis.meta = {\n\t\t\tlines: meta.lines,\n\t\t\tunicode: meta.unicode,\n\t\t\taddressCount: meta.address_count,\n\t\t\tverifiedCount: meta.verified_count,\n\t\t\tbytes: meta.bytes,\n\t\t\tcharacterCount: meta.character_count,\n\t\t};\n\n\t\tthis.addresses = addresses.map(rawAddress => new Address(rawAddress));\n\t}\n}\n\nmodule.exports = Result;","const Request = require(\"../Request\");\nconst Response = require(\"./Response\");\nconst buildInputData = require(\"../util/buildInputData\");\nconst keyTranslationFormat = require(\"../util/apiToSDKKeyMap\").usReverseGeo;\nconst {UndefinedLookupError} = require(\"../Errors.js\");\n\n/**\n * This client sends lookups to the Smarty US Reverse Geo API,
\n * and attaches the results to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\tsend(lookup) {\n\t\tif (typeof lookup === \"undefined\") throw new UndefinedLookupError();\n\n\t\tlet request = new Request();\n\t\trequest.parameters = buildInputData(lookup, keyTranslationFormat);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.sender.send(request)\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\t\tresolve(attachLookupResults(response, lookup));\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\n\t\tfunction attachLookupResults(response, lookup) {\n\t\t\tlookup.response = new Response(response.payload);\n\n\t\t\treturn lookup;\n\t\t}\n\t}\n}\n\nmodule.exports = Client;\n","const Response = require(\"./Response\");\n\n/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-street-api#input-fields\"\n */\nclass Lookup {\n\tconstructor(latitude, longitude) {\n\t\tthis.latitude = latitude.toFixed(8);\n\t\tthis.longitude = longitude.toFixed(8);\n\t\tthis.response = new Response();\n\t}\n}\n\nmodule.exports = Lookup;\n","const Result = require(\"./Result\");\n\n/**\n * The SmartyResponse contains the response from a call to the US Reverse Geo API.\n */\nclass Response {\n\tconstructor(responseData) {\n\t\tthis.results = [];\n\n\t\tif (responseData)\n\t\t\tresponseData.results.map(rawResult => {\n\t\t\t\tthis.results.push(new Result(rawResult));\n\t\t\t});\n\t}\n}\n\nmodule.exports = Response;\n","/**\n * A candidate is a possible match for an address that was submitted.
\n * A lookup can have multiple candidates if the address was ambiguous.\n *\n * @see \"https://www.smarty.com/docs/cloud/us-reverse-geo-api#result\"\n */\nclass Result {\n\tconstructor(responseData) {\n\t\tthis.distance = responseData.distance;\n\n\t\tthis.address = {};\n\t\tif (responseData.address) {\n\t\t\tthis.address.street = responseData.address.street;\n\t\t\tthis.address.city = responseData.address.city;\n\t\t\tthis.address.state_abbreviation = responseData.address.state_abbreviation;\n\t\t\tthis.address.zipcode = responseData.address.zipcode;\n\t\t}\n\n\t\tthis.coordinate = {};\n\t\tif (responseData.coordinate) {\n\t\t\tthis.coordinate.latitude = responseData.coordinate.latitude;\n\t\t\tthis.coordinate.longitude = responseData.coordinate.longitude;\n\t\t\tthis.coordinate.accuracy = responseData.coordinate.accuracy;\n\t\t\tswitch (responseData.coordinate.license) {\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.coordinate.license = \"SmartyStreets Proprietary\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.coordinate.license = \"SmartyStreets\";\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = Result;","/**\n * A candidate is a possible match for an address that was submitted.
\n * A lookup can have multiple candidates if the address was ambiguous, and
\n * the maxCandidates field is set higher than 1.\n *\n * @see \"https://www.smarty.com/docs/cloud/us-street-api#root\"\n */\nclass Candidate {\n\tconstructor(responseData) {\n\t\tthis.inputIndex = responseData.input_index;\n\t\tthis.candidateIndex = responseData.candidate_index;\n\t\tthis.addressee = responseData.addressee;\n\t\tthis.deliveryLine1 = responseData.delivery_line_1;\n\t\tthis.deliveryLine2 = responseData.delivery_line_2;\n\t\tthis.lastLine = responseData.last_line;\n\t\tthis.deliveryPointBarcode = responseData.delivery_point_barcode;\n\n\t\tthis.components = {};\n\t\tif (responseData.components !== undefined) {\n\t\t\tthis.components.urbanization = responseData.components.urbanization;\n\t\t\tthis.components.primaryNumber = responseData.components.primary_number;\n\t\t\tthis.components.streetName = responseData.components.street_name;\n\t\t\tthis.components.streetPredirection = responseData.components.street_predirection;\n\t\t\tthis.components.streetPostdirection = responseData.components.street_postdirection;\n\t\t\tthis.components.streetSuffix = responseData.components.street_suffix;\n\t\t\tthis.components.secondaryNumber = responseData.components.secondary_number;\n\t\t\tthis.components.secondaryDesignator = responseData.components.secondary_designator;\n\t\t\tthis.components.extraSecondaryNumber = responseData.components.extra_secondary_number;\n\t\t\tthis.components.extraSecondaryDesignator = responseData.components.extra_secondary_designator;\n\t\t\tthis.components.pmbDesignator = responseData.components.pmb_designator;\n\t\t\tthis.components.pmbNumber = responseData.components.pmb_number;\n\t\t\tthis.components.cityName = responseData.components.city_name;\n\t\t\tthis.components.defaultCityName = responseData.components.default_city_name;\n\t\t\tthis.components.state = responseData.components.state_abbreviation;\n\t\t\tthis.components.zipCode = responseData.components.zipcode;\n\t\t\tthis.components.plus4Code = responseData.components.plus4_code;\n\t\t\tthis.components.deliveryPoint = responseData.components.delivery_point;\n\t\t\tthis.components.deliveryPointCheckDigit = responseData.components.delivery_point_check_digit;\n\t\t}\n\n\t\tthis.metadata = {};\n\t\tif (responseData.metadata !== undefined) {\n\t\t\tthis.metadata.recordType = responseData.metadata.record_type;\n\t\t\tthis.metadata.zipType = responseData.metadata.zip_type;\n\t\t\tthis.metadata.countyFips = responseData.metadata.county_fips;\n\t\t\tthis.metadata.countyName = responseData.metadata.county_name;\n\t\t\tthis.metadata.carrierRoute = responseData.metadata.carrier_route;\n\t\t\tthis.metadata.congressionalDistrict = responseData.metadata.congressional_district;\n\t\t\tthis.metadata.buildingDefaultIndicator = responseData.metadata.building_default_indicator;\n\t\t\tthis.metadata.rdi = responseData.metadata.rdi;\n\t\t\tthis.metadata.elotSequence = responseData.metadata.elot_sequence;\n\t\t\tthis.metadata.elotSort = responseData.metadata.elot_sort;\n\t\t\tthis.metadata.latitude = responseData.metadata.latitude;\n\t\t\tthis.metadata.longitude = responseData.metadata.longitude;\n\t\t\tswitch (responseData.metadata.coordinate_license)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.metadata.coordinateLicense = \"SmartyStreets Proprietary\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.metadata.coordinateLicense = \"SmartyStreets\";\n\t\t\t}\n\t\t\tthis.metadata.precision = responseData.metadata.precision;\n\t\t\tthis.metadata.timeZone = responseData.metadata.time_zone;\n\t\t\tthis.metadata.utcOffset = responseData.metadata.utc_offset;\n\t\t\tthis.metadata.obeysDst = responseData.metadata.dst;\n\t\t\tthis.metadata.isEwsMatch = responseData.metadata.ews_match;\n\t\t}\n\n\t\tthis.analysis = {};\n\t\tif (responseData.analysis !== undefined) {\n\t\t\tthis.analysis.dpvMatchCode = responseData.analysis.dpv_match_code;\n\t\t\tthis.analysis.dpvFootnotes = responseData.analysis.dpv_footnotes;\n\t\t\tthis.analysis.cmra = responseData.analysis.dpv_cmra;\n\t\t\tthis.analysis.vacant = responseData.analysis.dpv_vacant;\n\t\t\tthis.analysis.noStat = responseData.analysis.dpv_no_stat;\n\t\t\tthis.analysis.active = responseData.analysis.active;\n\t\t\tthis.analysis.isEwsMatch = responseData.analysis.ews_match; // Deprecated, refer to metadata.ews_match\n\t\t\tthis.analysis.footnotes = responseData.analysis.footnotes;\n\t\t\tthis.analysis.lacsLinkCode = responseData.analysis.lacslink_code;\n\t\t\tthis.analysis.lacsLinkIndicator = responseData.analysis.lacslink_indicator;\n\t\t\tthis.analysis.isSuiteLinkMatch = responseData.analysis.suitelink_match;\n\t\t\tthis.analysis.enhancedMatch = responseData.analysis.enhanced_match;\n\t\t}\n\t}\n}\n\nmodule.exports = Candidate;","const Candidate = require(\"./Candidate\");\nconst Lookup = require(\"./Lookup\");\nconst Batch = require(\"../Batch\");\nconst UndefinedLookupError = require(\"../Errors\").UndefinedLookupError;\nconst sendBatch = require(\"../util/sendBatch\");\nconst keyTranslationFormat = require(\"../util/apiToSDKKeyMap\").usStreet;\n\n/**\n * This client sends lookups to the Smarty US Street API,
\n * and attaches the results to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\t/**\n\t * Sends up to 100 lookups for validation.\n\t * @param data may be a Lookup object, or a Batch which must contain between 1 and 100 Lookup objects\n\t * @throws SmartyException\n\t */\n\tsend(data) {\n\t\tconst dataIsBatch = data instanceof Batch;\n\t\tconst dataIsLookup = data instanceof Lookup;\n\n\t\tif (!dataIsLookup && !dataIsBatch) throw new UndefinedLookupError;\n\n\t\tlet batch;\n\n\t\tif (dataIsLookup) {\n\t\t\tif (data.maxCandidates == null && data.match == \"enhanced\")\n\t\t\t\tdata.maxCandidates = 5;\n\t\t\tbatch = new Batch();\n\t\t\tbatch.add(data);\n\t\t} else {\n\t\t\tbatch = data;\n\t\t}\n\n\t\treturn sendBatch(batch, this.sender, Candidate, keyTranslationFormat);\n\t}\n}\n\nmodule.exports = Client;","/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-street-api#input-fields\"\n */\nclass Lookup {\n\tconstructor(street, street2, secondary, city, state, zipCode, lastLine, addressee, urbanization, match, maxCandidates, inputId) {\n\t\tthis.street = street;\n\t\tthis.street2 = street2;\n\t\tthis.secondary = secondary;\n\t\tthis.city = city;\n\t\tthis.state = state;\n\t\tthis.zipCode = zipCode;\n\t\tthis.lastLine = lastLine;\n\t\tthis.addressee = addressee;\n\t\tthis.urbanization = urbanization;\n\t\tthis.match = match;\n\t\tthis.maxCandidates = maxCandidates;\n\t\tthis.inputId = inputId;\n\t\tthis.result = [];\n\t}\n}\n\nmodule.exports = Lookup;\n","const Lookup = require(\"./Lookup\");\nconst Result = require(\"./Result\");\nconst Batch = require(\"../Batch\");\nconst UndefinedLookupError = require(\"../Errors\").UndefinedLookupError;\nconst sendBatch = require(\"../util/sendBatch\");\nconst keyTranslationFormat = require(\"../util/apiToSDKKeyMap\").usZipcode;\n\n/**\n * This client sends lookups to the Smarty US ZIP Code API,
\n * and attaches the results to the appropriate Lookup objects.\n */\nclass Client {\n\tconstructor(sender) {\n\t\tthis.sender = sender;\n\t}\n\n\t/**\n\t * Sends up to 100 lookups for validation.\n\t * @param data May be a Lookup object, or a Batch which must contain between 1 and 100 Lookup objects\n\t * @throws SmartyException\n\t */\n\tsend(data) {\n\t\tconst dataIsBatch = data instanceof Batch;\n\t\tconst dataIsLookup = data instanceof Lookup;\n\n\t\tif (!dataIsLookup && !dataIsBatch) throw new UndefinedLookupError;\n\n\t\tlet batch;\n\n\t\tif (dataIsLookup) {\n\t\t\tbatch = new Batch();\n\t\t\tbatch.add(data);\n\t\t} else batch = data;\n\n\t\treturn sendBatch(batch, this.sender, Result, keyTranslationFormat);\n\t}\n}\n\nmodule.exports = Client;","/**\n * In addition to holding all of the input data for this lookup, this class also
\n * will contain the result of the lookup after it comes back from the API.\n * @see \"https://www.smarty.com/docs/cloud/us-zipcode-api#http-request-input-fields\"\n */\nclass Lookup {\n\tconstructor(city, state, zipCode, inputId) {\n\t\tthis.city = city;\n\t\tthis.state = state;\n\t\tthis.zipCode = zipCode;\n\t\tthis.inputId = inputId;\n\t\tthis.result = [];\n\t}\n}\n\nmodule.exports = Lookup;","/**\n * @see \"https://www.smarty.com/docs/cloud/us-zipcode-api#root\"\n */\nclass Result {\n\tconstructor(responseData) {\n\t\tthis.inputIndex = responseData.input_index;\n\t\tthis.status = responseData.status;\n\t\tthis.reason = responseData.reason;\n\t\tthis.valid = this.status === undefined && this.reason === undefined;\n\n\t\tthis.cities = !responseData.city_states ? [] : responseData.city_states.map(city => {\n\t\t\treturn {\n\t\t\t\tcity: city.city,\n\t\t\t\tstateAbbreviation: city.state_abbreviation,\n\t\t\t\tstate: city.state,\n\t\t\t\tmailableCity: city.mailable_city,\n\t\t\t};\n\t\t});\n\n\t\tthis.zipcodes = !responseData.zipcodes ? [] : responseData.zipcodes.map(zipcode => {\n\t\t\treturn {\n\t\t\t\tzipcode: zipcode.zipcode,\n\t\t\t\tzipcodeType: zipcode.zipcode_type,\n\t\t\t\tdefaultCity: zipcode.default_city,\n\t\t\t\tcountyFips: zipcode.county_fips,\n\t\t\t\tcountyName: zipcode.county_name,\n\t\t\t\tlatitude: zipcode.latitude,\n\t\t\t\tlongitude: zipcode.longitude,\n\t\t\t\tprecision: zipcode.precision,\n\t\t\t\tstateAbbreviation: zipcode.state_abbreviation,\n\t\t\t\tstate: zipcode.state,\n\t\t\t\talternateCounties: !zipcode.alternate_counties ? [] : zipcode.alternate_counties.map(county => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcountyFips: county.county_fips,\n\t\t\t\t\t\tcountyName: county.county_name,\n\t\t\t\t\t\tstateAbbreviation: county.state_abbreviation,\n\t\t\t\t\t\tstate: county.state,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t};\n\t\t});\n\t}\n}\n\nmodule.exports = Result;","module.exports = {\n\tusStreet: {\n\t\t\"street\": \"street\",\n\t\t\"street2\": \"street2\",\n\t\t\"secondary\": \"secondary\",\n\t\t\"city\": \"city\",\n\t\t\"state\": \"state\",\n\t\t\"zipcode\": \"zipCode\",\n\t\t\"lastline\": \"lastLine\",\n\t\t\"addressee\": \"addressee\",\n\t\t\"urbanization\": \"urbanization\",\n\t\t\"match\": \"match\",\n\t\t\"candidates\": \"maxCandidates\",\n\t},\n\tusZipcode: {\n\t\t\"city\": \"city\",\n\t\t\"state\": \"state\",\n\t\t\"zipcode\": \"zipCode\",\n\t},\n\tinternationalStreet: {\n\t\t\"country\": \"country\",\n\t\t\"freeform\": \"freeform\",\n\t\t\"address1\": \"address1\",\n\t\t\"address2\": \"address2\",\n\t\t\"address3\": \"address3\",\n\t\t\"address4\": \"address4\",\n\t\t\"organization\": \"organization\",\n\t\t\"locality\": \"locality\",\n\t\t\"administrative_area\": \"administrativeArea\",\n\t\t\"postal_code\": \"postalCode\",\n\t\t\"geocode\": \"geocode\",\n\t\t\"language\": \"language\",\n\t},\n\tusReverseGeo: {\n\t\t\"latitude\": \"latitude\",\n\t\t\"longitude\": \"longitude\",\n\t}\n};","const ClientBuilder = require(\"../ClientBuilder\");\n\nfunction instantiateClientBuilder(credentials) {\n\treturn new ClientBuilder(credentials);\n}\n\nfunction buildUsStreetApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsStreetApiClient();\n}\n\nfunction buildUsAutocompleteApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsAutocompleteClient();\n}\n\nfunction buildUsAutocompleteProApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsAutocompleteProClient();\n}\n\nfunction buildUsExtractApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsExtractClient();\n}\n\nfunction buildUsZipcodeApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsZipcodeClient();\n}\n\nfunction buildInternationalStreetApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildInternationalStreetClient();\n}\n\nfunction buildUsReverseGeoApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildUsReverseGeoClient();\n}\n\nfunction buildInternationalAddressAutocompleteApiClient(credentials) {\n\treturn instantiateClientBuilder(credentials).buildInternationalAddressAutocompleteClient();\n}\n\nmodule.exports = {\n\tusStreet: buildUsStreetApiClient,\n\tusAutocomplete: buildUsAutocompleteApiClient,\n\tusAutocompletePro: buildUsAutocompleteProApiClient,\n\tusExtract: buildUsExtractApiClient,\n\tusZipcode: buildUsZipcodeApiClient,\n\tinternationalStreet: buildInternationalStreetApiClient,\n\tusReverseGeo: buildUsReverseGeoApiClient,\n\tinternationalAddressAutocomplete: buildInternationalAddressAutocompleteApiClient,\n};","const InputData = require(\"../InputData\");\n\nmodule.exports = (lookup, keyTranslationFormat) => {\n\tlet inputData = new InputData(lookup);\n\n\tfor (let key in keyTranslationFormat) {\n\t\tinputData.add(key, keyTranslationFormat[key]);\n\t}\n\n\treturn inputData.data;\n};\n","const Request = require(\"../Request\");\nconst Errors = require(\"../Errors\");\nconst buildInputData = require(\"../util/buildInputData\");\n\nmodule.exports = (batch, sender, Result, keyTranslationFormat) => {\n\tif (batch.isEmpty()) throw new Errors.BatchEmptyError;\n\n\tlet request = new Request();\n\n\tif (batch.length() === 1) request.parameters = generateRequestPayload(batch)[0];\n\telse request.payload = generateRequestPayload(batch);\n\n\treturn new Promise((resolve, reject) => {\n\t\tsender.send(request)\n\t\t\t.then(response => {\n\t\t\t\tif (response.error) reject(response.error);\n\n\t\t\t\tresolve(assignResultsToLookups(batch, response));\n\t\t\t})\n\t\t\t.catch(reject);\n\t});\n\n\tfunction generateRequestPayload(batch) {\n\t\treturn batch.lookups.map((lookup) => {\n\t\t\treturn buildInputData(lookup, keyTranslationFormat);\n\t\t});\n\t}\n\n\tfunction assignResultsToLookups(batch, response) {\n\t\tresponse.payload.map(rawResult => {\n\t\t\tlet result = new Result(rawResult);\n\t\t\tlet lookup = batch.getByIndex(result.inputIndex);\n\n\t\t\tlookup.result.push(result);\n\t\t});\n\n\t\treturn batch;\n\t}\n};\n"],"names":["module","exports","_typeof","Symbol","iterator","obj","constructor","prototype","axiosRetry","_isRetryAllowed","_isRetryAllowed2","__esModule","default","namespace","isNetworkError","error","response","Boolean","code","SAFE_HTTP_METHODS","IDEMPOTENT_HTTP_METHODS","concat","isRetryableError","status","isSafeRequestError","config","indexOf","method","isIdempotentRequestError","isNetworkOrIdempotentRequestError","noDelay","exponentialDelay","retryNumber","arguments","length","undefined","delay","Math","pow","random","getCurrentState","currentState","retryCount","axios","defaultOptions","interceptors","request","use","lastRequestTime","Date","now","async","Promise","reject","_getRequestOptions","Object","assign","getRequestOptions","_getRequestOptions$re","retries","_getRequestOptions$re2","retryCondition","_getRequestOptions$re3","retryDelay","_getRequestOptions$sh","shouldResetTimeout","shouldRetryOrPromise","_err","shouldRetry","defaults","agent","httpAgent","httpsAgent","fixConfig","timeout","lastRequestDuration","max","transformRequest","data","resolve","setTimeout","util","elem","container","nodeType","getWindow","allowHorizontalScroll","onlyScrollIfNeeded","alignWithTop","alignWithLeft","containerOffset","ch","cw","containerScroll","diffTop","diffBottom","win","winScroll","ww","wh","isWin","isWindow","elemOffset","offset","eh","outerHeight","ew","outerWidth","height","width","left","scrollLeft","top","scrollTop","clientHeight","clientWidth","parseFloat","css","getScroll","w","ret","d","document","documentElement","body","getScrollLeft","getScrollTop","getOffset","el","pos","box","x","y","doc","ownerDocument","docElem","getBoundingClientRect","clientLeft","clientTop","getClientPosition","defaultView","parentWindow","getComputedStyleX","_RE_NUM_NO_PX","RegExp","source","RE_POS","CURRENT_STYLE","RUNTIME_STYLE","LEFT","each","arr","fn","i","isBorderBoxFn","window","getComputedStyle","name","computedStyle","val","getPropertyValue","test","style","rsLeft","pixelLeft","BOX_MODELS","CONTENT_INDEX","PADDING_INDEX","BORDER_INDEX","getPBMWidth","props","which","prop","j","value","cssProp","domUtils","getWH","extra","viewportWidth","viewportHeight","docWidth","docHeight","borderBoxValue","offsetWidth","offsetHeight","isBorderBox","cssBoxValue","Number","borderBoxValueOrIsBorderBox","slice","refWin","documentElementProp","compatMode","cssShow","position","visibility","display","getWHIgnoreDisplay","args","apply","options","callback","old","call","swap","mix","to","from","first","charAt","toUpperCase","includeMargin","utils","node","current","key","setOffset","clone","overflow","v","scrollTo","merge","WHITELIST","BLACKLIST","err","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","Error","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","_extends","target","hasOwnProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","defineProperty","Constructor","protoProps","staticProps","React","findDOMNode","scrollIntoView","IMPERATIVE_API","Autocomplete","_React$Component","instance","TypeError","_classCallCheck","this","_this","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","state","isOpen","highlightedIndex","_debugStates","ensureHighlightedIndex","bind","exposeAPI","handleInputFocus","handleInputBlur","handleChange","handleKeyDown","handleInputClick","maybeAutoCompleteText","subClass","superClass","create","setPrototypeOf","_inherits","refs","_ignoreBlur","_ignoreFocus","_scrollOffset","_scrollTimer","clearTimeout","nextProps","setState","autoHighlight","setMenuPositions","prevProps","prevState","open","maybeScrollItemIntoView","onMenuVisibilityChange","_this2","input","forEach","ev","itemNode","menuNode","menu","event","keyDownHandlers","onChange","items","shouldItemRender","filter","item","sortItems","sort","a","b","getItemValue","index","getFilteredItems","isItemSelectable","matchedItem","toLowerCase","rect","g","marginBottom","parseInt","marginLeft","marginRight","menuTop","bottom","menuLeft","menuWidth","_this3","setIgnoreBlur","onSelect","ignore","_this4","map","renderItem","cursor","cloneElement","onMouseEnter","highlightItemFromMouse","onClick","selectItemFromMouse","ref","e","minWidth","renderMenu","onTouchStart","onMouseLeave","_this5","pageXOffset","parentNode","pageYOffset","focus","setStateCallback","selectOnBlur","onBlur","inputProps","_this6","onFocus","activeElement","isInputFocused","internal","external","debug","push","id","createElement","wrapperStyle","wrapperProps","renderInput","role","autoComplete","onKeyDown","composeEventHandlers","JSON","stringify","Component","propTypes","menuStyle","defaultProps","children","borderRadius","boxShadow","background","padding","fontSize","maxHeight","ArrowDown","preventDefault","p","ArrowUp","Enter","_this7","keyCode","select","setSelectionRange","Escape","Tab","core","Batch","ClientBuilder","buildClient","SharedCredentials","StaticCredentials","Errors","usStreet","Lookup","Candidate","usZipcode","Result","usAutocomplete","Suggestion","usAutocompletePro","usExtract","internationalStreet","usReverseGeo","internationalAddressAutocomplete","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","transitionalDefaults","Cancel","onCanceled","requestData","requestHeaders","headers","responseType","done","cancelToken","unsubscribe","signal","removeEventListener","isFormData","XMLHttpRequest","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","baseURL","url","onloadend","responseHeaders","getAllResponseHeaders","responseText","statusText","params","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","onerror","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","xsrfValue","withCredentials","xsrfCookieName","read","xsrfHeaderName","setRequestHeader","isUndefined","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","type","abort","subscribe","aborted","send","Axios","mergeConfig","createInstance","defaultConfig","context","extend","instanceConfig","CancelToken","isCancel","VERSION","all","promises","spread","isAxiosError","message","toString","__CANCEL__","executor","resolvePromise","promise","token","then","_listeners","l","onfulfilled","_resolve","reason","throwIfRequested","listener","splice","c","InterceptorManager","dispatchRequest","validator","validators","configOrUrl","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","responseInterceptorChain","chain","Array","shift","newConfig","onFulfilled","onRejected","getUri","replace","handlers","eject","h","isAbsoluteURL","combineURLs","requestedURL","enhanceError","transformData","throwIfCancellationRequested","common","adapter","transformResponse","toJSON","description","fileName","lineNumber","columnNumber","stack","config1","config2","getMergedValue","isPlainObject","isArray","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","keys","configValue","validateStatus","fns","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","process","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","isObject","rawValue","parser","encoder","isString","parse","trim","stringifySafely","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","encode","serializedParams","parts","isDate","toISOString","join","hashmarkIndex","relativeURL","write","expires","path","domain","secure","cookie","isNumber","toGMTString","match","decodeURIComponent","remove","payload","originURL","msie","navigator","userAgent","urlParsingNode","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","requestURL","parsed","normalizedName","ignoreDuplicateOf","split","line","substr","thing","deprecatedWarnings","version","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","result","isFunction","ArrayBuffer","isView","pipe","product","assignValue","str","stripBOM","content","charCodeAt","innerSender","sender","parameters","catch","urlOverride","baseUrl","BatchFullError","lookups","add","lookup","lookupsHasRoomForLookup","getByIndex","getByInputId","inputId","clear","isEmpty","HttpSender","SigningSender","BaseUrlSender","AgentSender","CustomHeaderSender","StatusCodeSender","LicenseSender","BadCredentialsError","UsStreetClient","UsZipcodeClient","UsAutocompleteClient","UsAutocompleteProClient","UsExtractClient","InternationalStreetClient","UsReverseGeoClient","InternationalAddressAutocompleteClient","signer","httpSender","maxRetries","maxTimeout","proxy","customHeaders","licenses","withMaxRetries","withMaxTimeout","withSender","withBaseUrl","withProxy","withCustomHeaders","withDebug","withLicenses","buildSender","statusCodeSender","signingSender","agentSender","customHeaderSender","baseUrlSender","Client","buildUsStreetApiClient","buildUsZipcodeClient","buildUsAutocompleteClient","buildUsAutocompleteProClient","buildUsExtractClient","buildInternationalStreetClient","buildUsReverseGeoClient","buildInternationalAddressAutocompleteClient","SmartyError","super","BatchEmptyError","UndefinedLookupError","PaymentRequiredError","RequestEntityTooLargeError","BadRequestError","UnprocessableEntityError","TooManyRequestsError","InternalServerError","ServiceUnavailableError","GatewayTimeoutError","Response","proxyConfig","enableDebug","buildRequestConfig","buildSmartyResponse","requestConfig","smartyResponse","statusCode","log","apiField","lookupField","lookupFieldIsPopulated","authId","hostName","sign","authToken","Request","country","max_results","include_only_administrative_area","include_only_locality","include_only_postal_code","candidates","suggestion","responseData","street","locality","administrativeArea","administrative_area","postalCode","postal_code","countryIso3","country_iso3","organization","address1","address2","address3","address4","address5","address6","address7","address8","address9","address10","address11","address12","components","country_iso_3","superAdministrativeArea","super_administrative_area","subAdministrativeArea","sub_administrative_area","dependentLocality","dependent_locality","dependentLocalityName","dependent_locality_name","doubleDependentLocality","double_dependent_locality","postalCodeShort","postal_code_short","postalCodeExtra","postal_code_extra","premise","premiseExtra","premise_extra","premisePrefixNumber","premise_prefix_number","premiseNumber","premise_number","premiseType","premise_type","thoroughfare","thoroughfarePredirection","thoroughfare_predirection","thoroughfarePostdirection","thoroughfare_postdirection","thoroughfareName","thoroughfare_name","thoroughfareTrailingType","thoroughfare_trailing_type","thoroughfareType","thoroughfare_type","dependentThoroughfare","dependent_thoroughfare","dependentThoroughfarePredirection","dependent_thoroughfare_predirection","dependentThoroughfarePostdirection","dependent_thoroughfare_postdirection","dependentThoroughfareName","dependent_thoroughfare_name","dependentThoroughfareTrailingType","dependent_thoroughfare_trailing_type","dependentThoroughfareType","dependent_thoroughfare_type","building","buildingLeadingType","building_leading_type","buildingName","building_name","buildingTrailingType","building_trailing_type","subBuildingType","sub_building_type","subBuildingNumber","sub_building_number","subBuildingName","sub_building_name","subBuilding","sub_building","postBox","post_box","postBoxType","post_box_type","postBoxNumber","post_box_number","analysis","verificationStatus","verification_status","addressPrecision","address_precision","maxAddressPrecision","max_address_precision","changes","metadata","latitude","longitude","geocodePrecision","geocode_precision","maxGeocodePrecision","max_geocode_precision","addressFormat","address_format","buildInputData","keyTranslationFormat","rawCandidate","attachLookupCandidates","messages","fieldIsMissing","field","fieldIsSet","freeform","geocode","language","ensureEnoughInfo","ensureValidData","geocodeIsSetIncorrectly","isLanguage","languageIsSetIncorrectly","prefix","suggestions","maxSuggestions","city_filter","joinFieldWith","cityFilter","state_filter","stateFilter","prefer","prefer_ratio","preferRatio","geolocate","geolocate_precision","geolocatePrecision","delimiter","buildRequestParameters","text","streetLine","street_line","city","selected","maxResults","include_only_cities","includeOnlyCities","include_only_states","includeOnlyStates","include_only_zip_codes","includeOnlyZIPCodes","exclude_states","excludeStates","prefer_cities","preferCities","prefer_states","preferStates","prefer_zip_codes","preferZIPCodes","prefer_geolocation","preferGeolocation","secondary","zipcode","entries","verified","start","end","api_output","rawAddress","html","aggressive","addr_line_breaks","addressesHaveLineBreaks","addr_per_line","addressesPerLine","buildRequestParams","meta","addresses","Address","lines","unicode","addressCount","address_count","verifiedCount","verified_count","bytes","characterCount","character_count","attachLookupResults","toFixed","results","rawResult","distance","address","state_abbreviation","coordinate","accuracy","license","inputIndex","input_index","candidateIndex","candidate_index","addressee","deliveryLine1","delivery_line_1","deliveryLine2","delivery_line_2","lastLine","last_line","deliveryPointBarcode","delivery_point_barcode","urbanization","primaryNumber","primary_number","streetName","street_name","streetPredirection","street_predirection","streetPostdirection","street_postdirection","streetSuffix","street_suffix","secondaryNumber","secondary_number","secondaryDesignator","secondary_designator","extraSecondaryNumber","extra_secondary_number","extraSecondaryDesignator","extra_secondary_designator","pmbDesignator","pmb_designator","pmbNumber","pmb_number","cityName","city_name","defaultCityName","default_city_name","zipCode","plus4Code","plus4_code","deliveryPoint","delivery_point","deliveryPointCheckDigit","delivery_point_check_digit","recordType","record_type","zipType","zip_type","countyFips","county_fips","countyName","county_name","carrierRoute","carrier_route","congressionalDistrict","congressional_district","buildingDefaultIndicator","building_default_indicator","rdi","elotSequence","elot_sequence","elotSort","elot_sort","coordinate_license","coordinateLicense","precision","timeZone","time_zone","utcOffset","utc_offset","obeysDst","dst","isEwsMatch","ews_match","dpvMatchCode","dpv_match_code","dpvFootnotes","dpv_footnotes","cmra","dpv_cmra","vacant","dpv_vacant","noStat","dpv_no_stat","active","footnotes","lacsLinkCode","lacslink_code","lacsLinkIndicator","lacslink_indicator","isSuiteLinkMatch","suitelink_match","enhancedMatch","enhanced_match","sendBatch","dataIsLookup","batch","maxCandidates","street2","valid","cities","city_states","stateAbbreviation","mailableCity","mailable_city","zipcodes","zipcodeType","zipcode_type","defaultCity","default_city","alternateCounties","alternate_counties","county","instantiateClientBuilder","credentials","InputData","inputData","generateRequestPayload","assignResultsToLookups"],"sourceRoot":""}