{"version":3,"file":"vendors-node_modules_estee_elc-formatters_src_business-unit-id-parser_BusinessUnitIdParser_ts-aad9ca.46f222790411528e8c67.bundle.js","mappings":"mUAAA,MAAMA,EAAuB,0DAGtB,MAAMC,EAKT,WAAAC,CAAYC,GAJZ,KAAOC,MAAgB,GACvB,KAAOC,OAAiB,KACxB,KAAOC,SAAmB,KAItB,IAAKN,EAAqBO,KAAKJ,GAC3B,MAAM,IAAIK,MAVS,2DAavB,MAAOJ,EAAOC,EAAQC,GAAYH,EAAeM,MAL/B,KAKgDC,OAAO,GACzEC,KAAKP,MAAQA,EACbO,KAAKN,OAASA,EACdM,KAAKL,SAAWA,CACpB,CAEA,UAAWM,GACP,MAAO,GAAGD,KAAKL,YAAYK,KAAKN,OAAOQ,qBAC3C,E,qHC4BG,MAAMC,EAA0B,CACnCC,EAAG,CAAEC,MAAO,WACZC,GAAI,CAAED,MAAO,WACbE,IAAK,CAAEF,MAAO,SACdG,KAAM,CAAEH,MAAO,QACfI,EAAG,CAAEC,IAAK,WACVC,GAAI,CAAED,IAAK,WACXE,GAAI,CAAEC,KAAM,WACZC,KAAM,CAAED,KAAM,YAILE,EAAiB,SC/CvB,MAAMC,EAGT,WAAAzB,CAAY0B,GAGZ,KAAQC,WAAcC,IAClB,MAAMC,EAAkB,WAAC,kDACnB,OAAEC,EAAS,CAAC,GAAMD,EAAgBE,KAAKH,IAAe,CAAC,GAEvD,KAAEN,EAAI,MAAER,EAAK,IAAEK,GAAQW,EAEvBE,GADc,IAAIC,MAAOC,cAAcC,WAChBC,QAAQ,iBAAkB,KAAKd,KAI5D,OAFa,IAAIW,MAAMD,GADDlB,EAAQ,GACkBK,EAErC,EAGf,KAAQkB,SAAW,EAAG3B,SAAQ4B,UAASC,UACnC,IAAIC,KAAKC,eAAe/B,EAAQ4B,GAASI,OAAOH,GAEpD,KAAQI,iBAAoBC,GAAsBpB,EAAenB,KAAKuC,GAEtE,KAAQC,iBAAmB,EAAGnC,SAAQoC,aAAYP,UAC/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AOmF,KAAOnF,EAAO7G,SAAWuQ,EAAWT,UAyB/C,OArBAG,EAAaA,GAAepJ,EAAOmF,MAAQmE,EAAQpU,UAEhC6U,GACjBT,EAAQ5N,QAAQ,IAGb4N,EAAQpU,OAIX8K,EAAOsF,SAAWgE,EAAQ/X,KAAK,MAH/ByO,EAAOsF,SAAW,KAClBtF,EAAO3G,KAAO,MAMX0L,EAAK4E,OAAO3J,EAAOsF,WAAcP,EAAK4E,OAAO3J,EAAOqF,UACvDrF,EAAO3G,MAAQ2G,EAAOsF,SAAWtF,EAAOsF,SAAW,KACpCtF,EAAOqF,OAASrF,EAAOqF,OAAS,KAEjDrF,EAAOkF,KAAOO,EAASP,MAAQlF,EAAOkF,KACtClF,EAAOiF,QAAUjF,EAAOiF,SAAWQ,EAASR,QAC5CjF,EAAOuF,KAAOvF,EAAOzQ,SACdyQ,CACT,EAEAgF,EAAI1Q,UAAUkT,UAAY,WACxB,IAAIrC,EAAO7X,KAAK6X,KACZ/L,EAAOyM,EAAYjX,KAAKuW,GACxB/L,IAEW,OADbA,EAAOA,EAAK,MAEV9L,KAAK8L,KAAOA,EAAKuE,OAAO,IAE1BwH,EAAOA,EAAKxH,OAAO,EAAGwH,EAAKjQ,OAASkE,EAAKlE,SAEvCiQ,IAAM7X,KAAK6L,SAAWgM,EAC5B,C,gDCztBAlR,EAAOF,QAAU,CACf4R,SAAU,SAASqE,GACjB,MAAuB,iBAAV,CACf,EACArD,SAAU,SAASqD,GACjB,MAAuB,iBAAV,GAA8B,OAARA,CACrC,EACAL,OAAQ,SAASK,GACf,OAAe,OAARA,CACT,EACAP,kBAAmB,SAASO,GAC1B,OAAc,MAAPA,CACT,E","sources":["webpack://elc-service-prodcat/./node_modules/@estee/elc-formatters/src/business-unit-id-parser/BusinessUnitIdParser.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-formatters/src/date-formatter/DateFormatterConstants.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-formatters/src/date-formatter/DateFormatter.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-formatters/src/price-formatter/PriceFormatter.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-formatters/src/url-formatter/UrlFormatter.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-service/src/ViewController.ts","webpack://elc-service-prodcat/./node_modules/@estee/elc-service/src/decorators/Decorators.ts","webpack://elc-service-prodcat/./node_modules/base-64/base64.js","webpack://elc-service-prodcat/./node_modules/graphql.js/graphql.js","webpack://elc-service-prodcat/./node_modules/querystring/decode.js","webpack://elc-service-prodcat/./node_modules/querystring/encode.js","webpack://elc-service-prodcat/./node_modules/querystring/index.js","webpack://elc-service-prodcat/./node_modules/url/node_modules/punycode/punycode.js","webpack://elc-service-prodcat/./node_modules/url/url.js","webpack://elc-service-prodcat/./node_modules/url/util.js"],"sourcesContent":["const BUSINESS_UNIT_ID_REG = /([1-9])(-)([a-z]{1,3})(-)([a-z]{1,3})(-)([a-z]{1,3})\\w+/;\nconst WRONG_BUSINESS_UNIT_ID = 'Please provide a valid business unit id like 1-xx-xx-xx';\n\nexport class BusinessUnitIdParser {\n public brand: string = '';\n public region: string = 'us';\n public language: string = 'en';\n\n constructor(businessUnitId: string) {\n const separator = '-';\n if (!BUSINESS_UNIT_ID_REG.test(businessUnitId)) {\n throw new Error(WRONG_BUSINESS_UNIT_ID);\n }\n\n const [brand, region, language] = businessUnitId.split(separator).slice(-4);\n this.brand = brand;\n this.region = region;\n this.language = language;\n }\n\n public get locale() {\n return `${this.language}-${this.region.toLocaleUpperCase()}`;\n }\n}\n","import { BusinessUnitIdParser } from '../index';\n\ninterface IDay {\n day: 'numeric' | '2-digit';\n}\n\ninterface IYear {\n year: 'numeric' | '2-digit';\n}\n\ninterface IMonth {\n month: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long';\n}\n\ninterface IDateTokens {\n M: IMonth;\n MM: IMonth;\n MMM: IMonth;\n MMMM: IMonth;\n D: IDay;\n DD: IDay;\n YY: IYear;\n YYYY: IYear;\n}\n\ninterface IDateLocaleFormat {\n locale: BusinessUnitIdParser['locale'];\n date: Date;\n}\n\nexport type IDateToken = keyof IDateTokens;\n\nexport interface IDateFormatOptions extends IDateLocaleFormat {\n formats: IDay | IMonth | IYear;\n}\n\nexport interface IDateFormat extends IDateLocaleFormat {\n dateFormat: string;\n}\n\nexport interface IDate {\n dateFormat?: IDateFormat['dateFormat'];\n date: string;\n}\n\nexport interface IDateMessageFormat extends IDate {\n message: string;\n placeholderRegex: RegExp;\n}\n\nexport const dateTokens: IDateTokens = {\n M: { month: 'numeric' },\n MM: { month: '2-digit' },\n MMM: { month: 'short' },\n MMMM: { month: 'long' },\n D: { day: 'numeric' },\n DD: { day: '2-digit' },\n YY: { year: '2-digit' },\n YYYY: { year: 'numeric' }\n};\n\nexport const defaultDateFormat = 'DD/MM';\nexport const DateTokenRegex = /[MDY]+/;\nexport const preorderDatePlaceholderRegex = /::PREORDER_DATE::/gi;\n","import {\n DateTokenRegex,\n dateTokens,\n defaultDateFormat,\n IDate,\n IDateFormat,\n IDateFormatOptions,\n IDateMessageFormat,\n IDateToken\n} from './DateFormatterConstants';\n\nexport interface IDateFormatter {\n locale: string;\n}\n\nexport class DateFormatter {\n private locale: string;\n\n constructor(config: IDateFormatter) {\n this.locale = config.locale;\n }\n private createDate = (dateString: string) => {\n const parsedDateRegex = /(?\\d{2})(?\\d{2})(?\\d{2})/;\n const { groups = {} } = parsedDateRegex.exec(dateString) || {};\n\n const { year, month, day } = groups;\n const currentYear = new Date().getFullYear().toString();\n const fullYear = currentYear.replace(/(\\d{2})(\\d{2})/, `$1${year}`);\n const correctMonth = +month - 1;\n const date = new Date(+fullYear, correctMonth, +day);\n\n return date;\n };\n\n private byLocale = ({ locale, formats, date }: IDateFormatOptions) =>\n new Intl.DateTimeFormat(locale, formats).format(date);\n\n private isValidDateToken = (token: IDateToken) => DateTokenRegex.test(token);\n\n private getFormattedDate = ({ locale, dateFormat, date }: IDateFormat) => {\n const tokens = dateFormat.split(/[\\/\\.\\- ]+/).filter(this.isValidDateToken);\n\n return tokens.reduce((dateTemplate: string, token: IDateToken) => {\n const dateFormatByLocale = this.byLocale({ locale, formats: dateTokens[token], date });\n\n return dateTemplate.replace(token, dateFormatByLocale);\n }, dateFormat);\n };\n\n private formatDateFromString = ({ date, dateFormat }: IDate): string => {\n const { locale } = this;\n const dateTemplate = dateFormat || defaultDateFormat;\n\n const formattedDate = this.getFormattedDate({\n locale,\n dateFormat: dateTemplate,\n date: this.createDate(date)\n });\n\n return formattedDate;\n };\n\n public formatDateWithPlaceholder = (dateFormatConfig: IDateMessageFormat) => {\n const { date, dateFormat, message, placeholderRegex } = dateFormatConfig;\n\n const formattedDate = this.formatDateFromString({ date, dateFormat });\n\n return message.replace(placeholderRegex, formattedDate);\n };\n}\n","export interface IPriceFormatter {\n currency: string;\n decimalSeparator?: string;\n locale: string;\n numberOfDecimals?: number;\n hideZeroDecimals?: boolean;\n}\n\nconst ZERO_DECIMALS = '00';\n\nexport class PriceFormatter {\n private decimalSeparator?: string;\n private hideZeroFraction?: boolean;\n private formatter: Intl.NumberFormat;\n\n constructor(config: IPriceFormatter) {\n const { locale, currency, numberOfDecimals, decimalSeparator, hideZeroDecimals } = config;\n this.decimalSeparator = decimalSeparator;\n this.hideZeroFraction = hideZeroDecimals;\n this.formatter = new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n maximumFractionDigits: numberOfDecimals,\n minimumFractionDigits: numberOfDecimals\n });\n }\n\n private replaceDecimalSeparator = (\n decimalSeparator: string,\n parts: Intl.NumberFormatPart[]\n ) => {\n const { value: fraction } = parts.find(\n ({ type }: Intl.NumberFormatPart) => type === 'fraction'\n ) as Intl.NumberFormatPart;\n\n return this.hideZeroFraction && fraction === ZERO_DECIMALS\n ? null\n : this.decimalSeparator || decimalSeparator;\n };\n\n private replaceFraction = (fraction: string) =>\n this.hideZeroFraction && fraction === ZERO_DECIMALS ? null : fraction;\n\n private replacePart = (\n { type, value }: Intl.NumberFormatPart,\n index: number,\n parts: Intl.NumberFormatPart[]\n ) => {\n switch (type) {\n case 'decimal':\n return this.replaceDecimalSeparator(value, parts);\n case 'fraction':\n return this.replaceFraction(value);\n default:\n return value;\n }\n };\n\n public formatPriceWithCurrency = (price: number) =>\n this.formatter.formatToParts(price).map(this.replacePart).join('');\n}\n","export interface IUrlFormatter {\n langPrefix: string;\n}\n\nexport class UrlFormatter {\n private langPrefix: string;\n\n constructor(config: IUrlFormatter) {\n this.langPrefix = this.prefixHandler(config.langPrefix);\n }\n\n private prefixHandler = (prefix: string | null | undefined) => {\n return prefix !== null && prefix !== undefined ? prefix.replace(/^\\/+|\\/+$/g, '') : '';\n };\n\n public langPrefixUrl = (url: string = '') => {\n return this.langPrefix !== '' ? `/${this.langPrefix}${url}` : url;\n };\n}\n","import { observable } from 'mobx';\nimport {\n IComponentViewController,\n IViewControllerData,\n ViewControllerLoadedMethod\n} from '@estee/elc-universal-utils';\n\nexport class ViewController implements IComponentViewController {\n public id?: string;\n public dataState?: IViewControllerData;\n public loaded?: ViewControllerLoadedMethod;\n public configMergeStrategy?: Function;\n @observable public isLoading: boolean = true;\n\n public setSSRState = (data?: IViewControllerData) => {\n this.dataState = data;\n };\n\n public setId = (id?: string) => {\n this.id = id && btoa(unescape(encodeURIComponent(id)));\n };\n\n public get data(): IViewControllerData {\n return {};\n }\n}\n","import { Container } from 'hypo-container';\nexport const getDecorators = (container: Container) => ({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n lazyInject: (name?: string) => (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: any,\n key: string,\n descriptor?: PropertyDescriptor\n ) => {\n const resourceName = name || key;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sbGetter = function (this: any) {\n const resource = container.get(resourceName);\n if (!resource) {\n throw new Error(`The requested ${resourceName} does not exists`);\n }\n\n return resource;\n };\n let propertyDescriptor = descriptor || {};\n if (!descriptor) {\n propertyDescriptor = {\n get: sbGetter\n };\n Object.defineProperty(target, key, propertyDescriptor);\n } else {\n propertyDescriptor.get = sbGetter;\n }\n }\n});\n","/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code, and use\n\t// it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar InvalidCharacterError = function(message) {\n\t\tthis.message = message;\n\t};\n\tInvalidCharacterError.prototype = new Error;\n\tInvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n\tvar error = function(message) {\n\t\t// Note: the error messages used throughout this file match those used by\n\t\t// the native `atob`/`btoa` implementation in Chromium.\n\t\tthrow new InvalidCharacterError(message);\n\t};\n\n\tvar TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t// http://whatwg.org/html/common-microsyntaxes.html#space-character\n\tvar REGEX_SPACE_CHARACTERS = /[\\t\\n\\f\\r ]/g;\n\n\t// `decode` is designed to be fully compatible with `atob` as described in the\n\t// HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob\n\t// The optimized base64-decoding algorithm used is based on @atk’s excellent\n\t// implementation. https://gist.github.com/atk/1020396\n\tvar decode = function(input) {\n\t\tinput = String(input)\n\t\t\t.replace(REGEX_SPACE_CHARACTERS, '');\n\t\tvar length = input.length;\n\t\tif (length % 4 == 0) {\n\t\t\tinput = input.replace(/==?$/, '');\n\t\t\tlength = input.length;\n\t\t}\n\t\tif (\n\t\t\tlength % 4 == 1 ||\n\t\t\t// http://whatwg.org/C#alphanumeric-ascii-characters\n\t\t\t/[^+a-zA-Z0-9/]/.test(input)\n\t\t) {\n\t\t\terror(\n\t\t\t\t'Invalid character: the string to be decoded is not correctly encoded.'\n\t\t\t);\n\t\t}\n\t\tvar bitCounter = 0;\n\t\tvar bitStorage;\n\t\tvar buffer;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\twhile (++position < length) {\n\t\t\tbuffer = TABLE.indexOf(input.charAt(position));\n\t\t\tbitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;\n\t\t\t// Unless this is the first of a group of 4 characters…\n\t\t\tif (bitCounter++ % 4) {\n\t\t\t\t// …convert the first 8 bits to a single ASCII character.\n\t\t\t\toutput += String.fromCharCode(\n\t\t\t\t\t0xFF & bitStorage >> (-2 * bitCounter & 6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t};\n\n\t// `encode` is designed to be fully compatible with `btoa` as described in the\n\t// HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa\n\tvar encode = function(input) {\n\t\tinput = String(input);\n\t\tif (/[^\\0-\\xFF]/.test(input)) {\n\t\t\t// Note: no need to special-case astral symbols here, as surrogates are\n\t\t\t// matched, and the input is supposed to only contain ASCII anyway.\n\t\t\terror(\n\t\t\t\t'The string to be encoded contains characters outside of the ' +\n\t\t\t\t'Latin1 range.'\n\t\t\t);\n\t\t}\n\t\tvar padding = input.length % 3;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\tvar a;\n\t\tvar b;\n\t\tvar c;\n\t\tvar buffer;\n\t\t// Make sure any padding is handled outside of the loop.\n\t\tvar length = input.length - padding;\n\n\t\twhile (++position < length) {\n\t\t\t// Read three bytes, i.e. 24 bits.\n\t\t\ta = input.charCodeAt(position) << 16;\n\t\t\tb = input.charCodeAt(++position) << 8;\n\t\t\tc = input.charCodeAt(++position);\n\t\t\tbuffer = a + b + c;\n\t\t\t// Turn the 24 bits into four chunks of 6 bits each, and append the\n\t\t\t// matching character for each of them to the output.\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 18 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 12 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 6 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer & 0x3F)\n\t\t\t);\n\t\t}\n\n\t\tif (padding == 2) {\n\t\t\ta = input.charCodeAt(position) << 8;\n\t\t\tb = input.charCodeAt(++position);\n\t\t\tbuffer = a + b;\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 10) +\n\t\t\t\tTABLE.charAt((buffer >> 4) & 0x3F) +\n\t\t\t\tTABLE.charAt((buffer << 2) & 0x3F) +\n\t\t\t\t'='\n\t\t\t);\n\t\t} else if (padding == 1) {\n\t\t\tbuffer = input.charCodeAt(position);\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 2) +\n\t\t\t\tTABLE.charAt((buffer << 4) & 0x3F) +\n\t\t\t\t'=='\n\t\t\t);\n\t\t}\n\n\t\treturn output;\n\t};\n\n\tvar base64 = {\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'version': '1.0.0'\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn base64;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = base64;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in base64) {\n\t\t\t\tbase64.hasOwnProperty(key) && (freeExports[key] = base64[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.base64 = base64;\n\t}\n\n}(this));\n","(function () {\n function __extend() {\n var extended = {}, deep = false, i = 0, length = arguments.length\n if (Object.prototype.toString.call( arguments[0] ) == '[object Boolean]') {\n deep = arguments[0]\n i++\n }\n var merge = function (obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n if (deep && Object.prototype.toString.call(obj[prop]) == '[object Object]') {\n extended[prop] = __extend(true, extended[prop], obj[prop])\n } else {\n extended[prop] = obj[prop]\n }\n }\n }\n }\n\n for (; i < length; i++) {\n var obj = arguments[i]\n merge(obj)\n }\n\n return extended\n }\n\n function __unique(array) {\n return array.filter( function onlyUnique(value, index, self) {\n return self.indexOf(value) === index;\n })\n }\n\n var __doRequest\n\n if (typeof XMLHttpRequest !== 'undefined') {\n __doRequest = function (\n method, url, contentType, accept, headers, body, _onRequestError, callback\n ) {\n var xhr = new XMLHttpRequest\n xhr.open(method, url, true)\n xhr.setRequestHeader('Content-Type', contentType)\n xhr.setRequestHeader('Accept', accept)\n for (var key in headers) { xhr.setRequestHeader(key, headers[key]) }\n xhr.onerror = function () { callback(xhr, xhr.status) }\n xhr.onload = function () {\n try {\n callback(JSON.parse(xhr.responseText), xhr.status)\n }\n catch (e) {\n callback(xhr, xhr.status)\n }\n }\n xhr.send(body)\n }\n } else if (typeof require === 'function') {\n __doRequest = function (\n method, url, contentType, accept, headers, body, onRequestError, callback\n ) {\n var http = require('http'), https = require('https'), URL = require('url'), uri = URL.parse(url)\n var req = (uri.protocol === 'https:' ? https : http).request({\n protocol: uri.protocol,\n hostname: uri.hostname,\n port: uri.port,\n path: uri.path,\n method: method.toUpperCase(),\n headers: __extend({ 'Content-type': contentType, 'Accept': accept }, headers)\n }, function (response) {\n var str = ''\n response.setEncoding('utf8')\n response.on('data', function (chunk) { str += chunk })\n response.on('end', function () {\n callback(JSON.parse(str), response.statusCode)\n })\n })\n if (typeof onRequestError === 'function') {\n req.on('error', function (err) {\n onRequestError(err);\n });\n }\n req.write(body)\n req.end()\n }\n }\n\n function __request(debug, method, url, headers, data, asJson, onRequestError, callback) {\n if (!url) {\n return;\n }\n if (asJson) {\n var body = JSON.stringify({query: data.query, variables: data.variables});\n } else {\n var body = \"query=\" + encodeURIComponent(data.query) + \"&variables=\" + encodeURIComponent(JSON.stringify(data.variables))\n }\n if (debug) {\n console.groupCollapsed('[graphql]: '\n + method.toUpperCase() + ' ' + url + ': '\n + data.query.split(/\\n/)[0].substr(0, 50) + '... with '\n + JSON.stringify(data.variables).substr(0, 50) + '...')\n console.log('QUERY: %c%s', 'font-weight: bold', data.query)\n console.log('VARIABLES: %c%s\\n\\nsending as ' + (asJson ? 'json' : 'form url-data'), 'font-weight: bold', JSON.stringify(data.variables, null, 2), data.variables)\n console.groupEnd()\n }\n\n for (var key in headers) {\n if (typeof headers[key] === 'function') {\n headers[key] = headers[key]()\n }\n }\n\n __doRequest(\n method,\n url,\n asJson ? 'application/json' : 'application/x-www-form-urlencoded',\n 'application/json',\n headers,\n body,\n onRequestError,\n callback\n )\n }\n\n function __isTagCall(strings) {\n return Object.prototype.toString.call(strings) == '[object Array]' && strings.raw\n }\n\n function GraphQLClient(url, options) {\n if (!(this instanceof GraphQLClient)) {\n var client = new GraphQLClient(url, options, true)\n var _lazy = client._sender\n for (var m in client) {\n if (typeof client[m] == 'function') {\n _lazy[m] = client[m].bind(client)\n if (client[m].declare) _lazy[m].declare = client[m].declare.bind(client)\n if (client[m].run) _lazy[m].run = client[m].run.bind(client)\n }\n }\n return _lazy\n } else if (arguments[2] !== true) {\n throw new Error(\"You cannot create GraphQLClient instance. Please call GraphQLClient as function.\")\n }\n if (!options)\n options = {}\n\n if (!options.fragments)\n options.fragments = {}\n\n this.url = url\n this.options = options || {}\n this._fragments = this.buildFragments(options.fragments)\n this._sender = this.createSenderFunction(options.debug)\n this.createHelpers(this._sender)\n this._transaction = {}\n }\n\n // \"fragment auth.login\" will be \"fragment auth_login\"\n var FRAGMENT_SEPERATOR = \"_\"\n\n // The autodeclare keyword.\n GraphQLClient.AUTODECLARE_PATTERN = /\\(@autodeclare\\)|\\(@autotype\\)/g\n\n GraphQLClient.FRAGMENT_PATTERN = /\\.\\.\\.\\s*([A-Za-z0-9\\.\\_]+)/g\n\n // Flattens nested object\n /*\n * {a: {b: {c: 1, d: 2}}} => {\"a.b.c\": 1, \"a.b.d\": 2}\n */\n GraphQLClient.prototype.flatten = function (object) {\n var prefix = arguments[1] || \"\", out = arguments[2] || {}, name\n for (name in object) {\n if (object.hasOwnProperty(name)) {\n typeof object[name] == \"object\"\n ? this.flatten(object[name], prefix + name + FRAGMENT_SEPERATOR, out)\n : out[prefix + name] = object[name]\n }\n }\n return out\n }\n\n GraphQLClient.prototype.setUrl = function (url) {\n this.url = url\n return this.url\n }\n\n GraphQLClient.prototype.getUrl = function () {\n return this.url\n }\n\n // Gets path from object\n /*\n * {a: {b: {c: 1, d: 2}}}, \"a.b.c\" => 1\n */\n GraphQLClient.prototype.fragmentPath = function (fragments, path) {\n var getter = new Function(\"fragments\", \"return fragments.\" + path.replace(/\\./g, FRAGMENT_SEPERATOR))\n var obj = getter(fragments)\n if (path != \"on\" && (!obj || typeof obj != \"string\")) {\n throw new Error(\"Fragment \" + path + \" not found\")\n }\n return obj\n }\n\n GraphQLClient.prototype.collectFragments = function (query, fragments) {\n var that = this\n var fragmentRegexp = GraphQLClient.FRAGMENT_PATTERN\n var collectedFragments = []\n ;(query.match(fragmentRegexp)||[]).forEach(function (fragment) {\n var path = fragment.replace(fragmentRegexp, function (_, $m) {return $m})\n var fragment = that.fragmentPath(fragments, path)\n if (fragment) {\n var pathRegexp = new RegExp(fragmentRegexp.source.replace(/\\((.*)\\)/, path) + '$')\n if (fragment.match(pathRegexp)) {\n throw new Error(\"Recursive fragment usage detected on \" + path + \".\")\n }\n collectedFragments.push(fragment)\n // Collect sub fragments\n var alreadyCollectedFragments = collectedFragments.filter(function (alreadyCollected) {\n return alreadyCollected.match(new RegExp(\"fragment \" + path))\n })\n if (alreadyCollectedFragments.length > 0 && fragmentRegexp.test(fragment)) {\n that.collectFragments(fragment, fragments).forEach(function (fragment) {\n collectedFragments.unshift(fragment)\n })\n }\n }\n })\n return __unique(collectedFragments)\n }\n\n GraphQLClient.prototype.processQuery = function (query, fragments) {\n if (typeof query == 'object' && query.hasOwnProperty('kind') && query.hasOwnProperty('definitions')) {\n throw new Error(\"Do not use graphql AST to send requests. Please generate query as string first using `graphql.print(query)`\")\n }\n var fragmentRegexp = GraphQLClient.FRAGMENT_PATTERN\n var collectedFragments = this.collectFragments(query, fragments)\n query = query.replace(fragmentRegexp, function (_, $m) {\n return \"... \" + $m.split(\".\").join(FRAGMENT_SEPERATOR)\n })\n return [query].concat(collectedFragments.filter(function (fragment) {\n // Remove already used fragments\n return !query.match(fragment)\n })).join(\"\\n\")\n }\n\n GraphQLClient.prototype.autoDeclare = function (query, variables) {\n var that = this\n var typeMap = {\n string: \"String\",\n number: function (value) {\n return value % 1 === 0 ? \"Int\" : \"Float\";\n },\n boolean: \"Boolean\"\n }\n return query.replace(GraphQLClient.AUTODECLARE_PATTERN, function () {\n var types = []\n for (var key in variables) {\n var value = variables[key]\n var keyAndType = key.split(/^(.*?)\\!/)\n if (keyAndType.length > 1) {\n keyAndType = keyAndType.slice(1)\n keyAndType[1] = keyAndType[1].replace(/(.*?)\\!$/, \"$1\")\n }\n var mapping = typeMap[typeof(value)]\n var mappedType = typeof(mapping) === \"function\" ? mapping(value) : mapping\n if (!key.match(\"!\") && keyAndType[0].match(/_?id/i)) {\n mappedType = \"ID\"\n }\n var type = (keyAndType[1] || mappedType)\n if (type) {\n types.push(\"$\" + keyAndType[0] + \": \" + type + \"!\")\n }\n }\n types = types.join(\", \")\n return types ? \"(\"+ types +\")\" : \"\"\n })\n }\n\n GraphQLClient.prototype.cleanAutoDeclareAnnotations = function (variables) {\n if (!variables) variables = {}\n var newVariables = {}\n for (var key in variables) {\n var value = variables[key]\n var keyAndType = key.split(\"!\")\n newVariables[keyAndType[0]] = value\n }\n return newVariables\n }\n\n GraphQLClient.prototype.buildFragments = function (fragments) {\n var that = this\n fragments = this.flatten(fragments || {})\n var fragmentObject = {}\n for (var name in fragments) {\n var fragment = fragments[name]\n if (typeof fragment == \"object\") {\n fragmentObject[name] = that.buildFragments(fragment)\n } else {\n fragmentObject[name] = \"\\nfragment \" + name + \" \" + fragment\n }\n }\n return fragmentObject\n }\n\n GraphQLClient.prototype.buildQuery = function (query, variables) {\n return this.autoDeclare(this.processQuery(query, this._fragments), variables)\n }\n\n GraphQLClient.prototype.parseType = function (query) {\n var match = query.trim().match(/^(query|mutation|subscription)/)\n if (!match) return 'query'\n return match[1]\n }\n\n GraphQLClient.prototype.createSenderFunction = function (debug) {\n var that = this\n return function (query, originalQuery, type) {\n if (__isTagCall(query)) {\n return that.run(that.ql.apply(that, arguments))\n }\n var caller = function (variables, requestOptions) {\n if (!requestOptions) requestOptions = {}\n if (!variables) variables = {}\n var fragmentedQuery = that.buildQuery(query, variables)\n var headers = __extend((that.options.headers||{}), (requestOptions.headers||{}))\n\n return new Promise(function (resolve, reject) {\n __request(debug, that.options.method || \"post\", that.getUrl(), headers, {\n query: fragmentedQuery,\n variables: that.cleanAutoDeclareAnnotations(variables)\n }, !!that.options.asJSON, that.options.onRequestError, function (response, status) {\n if (status == 200) {\n if (response.errors) {\n reject(response.errors)\n } else if (response.data) {\n resolve(response.data)\n } else {\n resolve(response)\n }\n } else {\n reject(response)\n }\n })\n })\n }\n\n caller.merge = function (mergeName, variables) {\n if (!type) {\n type = that.parseType(query)\n query = query.trim()\n .replace(/^(query|mutation|subscription)\\s*/, '').trim()\n .replace(GraphQLClient.AUTODECLARE_PATTERN, '').trim()\n .replace(/^\\{|\\}$/g, '')\n }\n if (!originalQuery) {\n originalQuery = query\n }\n that._transaction[mergeName] = that._transaction[mergeName] || {\n query: [],\n mutation: []\n }\n return new Promise(function (resolve) {\n that._transaction[mergeName][type].push({\n type: type,\n query: originalQuery,\n variables: variables,\n resolver: resolve\n })\n })\n }\n if (arguments.length > 3) {\n return caller.apply(null, Array.prototype.slice.call(arguments, 3))\n }\n return caller\n }\n }\n\n GraphQLClient.prototype.commit = function (mergeName) {\n if (!this._transaction[mergeName]) {\n throw new Error(\"You cannot commit the merge \" + mergeName + \" without creating it first.\")\n }\n var that = this\n var resolveMap = {}\n var mergedVariables = {}\n var mergedQueries = {}\n Object.keys(this._transaction[mergeName]).forEach(function (method) {\n if (that._transaction[mergeName][method].length === 0) return\n var subQuery = that._transaction[mergeName][method].map(function (merge) {\n var reqId = 'merge' + Math.random().toString().split('.')[1].substr(0, 6)\n resolveMap[reqId] = merge.resolver\n var query = merge.query.replace(/\\$([^\\.\\,\\s\\)]*)/g, function (_, m) {\n if (!merge.variables) {\n throw new Error('Unused variable on merge ' + mergeName + ': $' + m[0])\n }\n var matchingKey = Object.keys(merge.variables).filter(function (key) {\n return key === m || key.match(new RegExp('^' + m + '!'))\n })[0]\n var variable = reqId + '__' + matchingKey\n mergedVariables[method] = mergedVariables[method] || {}\n mergedVariables[method][variable] = merge.variables[matchingKey]\n return '$' + variable.split('!')[0]\n })\n // remove the wrapping {}\n query = query.replace(/^\\{|\\}\\s*$/g, '').trim()\n\n var alias = query.trim().match(/^[^\\(]+\\:/)\n if (!alias) {\n alias = query.match(/^[^\\(\\{]+/)[0] + ':'\n } else {\n query = query.replace(/^[^\\(]+\\:/, '')\n }\n return reqId + '_' + alias + query\n }).join('\\n')\n\n mergedQueries[method] = mergedQueries[method] || []\n mergedQueries[method].push(method + \" (@autodeclare) {\\n\" + subQuery + \"\\n }\")\n })\n\n return Promise.all(Object.keys(mergedQueries).map(function (method) {\n var query = mergedQueries[method].join('\\n')\n var variables = mergedVariables[method]\n return that._sender(query, query, null, variables)\n })).then(function (responses) {\n var newResponses = {}\n responses.forEach(function (response) {\n Object.keys(response).forEach(function (mergeKey) {\n var parsedKey = mergeKey.match(/^(merge\\d+)\\_(.*)/)\n if (!parsedKey) {\n throw new Error('Multiple root keys detected on response. Merging doesn\\'t support it yet.')\n }\n var reqId = parsedKey[1]\n var fieldName = parsedKey[2]\n var newResponse = {}\n newResponse[fieldName] = response[mergeKey]\n newResponses[fieldName] = (newResponses[fieldName] || []).concat([response[mergeKey]])\n resolveMap[reqId](newResponse)\n })\n })\n return newResponses\n }).catch(function (responses) {\n return { error: true, errors: responses }\n }).finally(function (responses) {\n that._transaction[mergeName] = { query: [], mutation: [] }\n return responses\n })\n }\n\n GraphQLClient.prototype.createHelpers = function (sender) {\n var that = this\n function helper(query) {\n if (__isTagCall(query)) {\n that.__prefix = this.prefix\n that.__suffix = this.suffix\n var result = that.run(that.ql.apply(that, arguments))\n that.__prefix = \"\"\n that.__suffix = \"\"\n return result\n }\n var caller = sender(this.prefix + \" \" + query + \" \" + this.suffix, query.trim(), this.type)\n if (arguments.length > 1 && arguments[1] != null) {\n return caller.apply(null, Array.prototype.slice.call(arguments, 1))\n }\n return caller\n }\n\n var helpers = [\n {method: 'mutate', type: 'mutation'},\n {method: 'query', type: 'query'},\n {method: 'subscribe', type: 'subscription'}\n ]\n helpers.forEach(function (m) {\n that[m.method] = function (query, variables, options) {\n if (that.options.alwaysAutodeclare === true || (options && options.declare === true)) {\n return helper.call({type: m.type, prefix: m.type + \" (@autodeclare) {\", suffix: \"}\"}, query, variables)\n }\n return helper.call({type: m.type, prefix: m.type, suffix: \"\"}, query, variables)\n }\n that[m.method].run = function (query, options) {\n return that[m.method](query, options)({})\n }\n })\n this.run = function (query) {\n return sender(query, originalQuery, m.type, {})\n }\n }\n\n GraphQLClient.prototype.fragments = function () {\n return this._fragments\n }\n\n GraphQLClient.prototype.getOptions = function () {\n return this.options || {}\n }\n\n GraphQLClient.prototype.headers = function (newHeaders) {\n return this.options.headers = __extend(this.options.headers, newHeaders)\n }\n\n GraphQLClient.prototype.fragment = function (fragment) {\n if (typeof fragment == 'string') {\n var _fragment = this._fragments[fragment.replace(/\\./g, FRAGMENT_SEPERATOR)]\n if (!_fragment) {\n throw \"Fragment \" + fragment + \" not found!\"\n }\n return _fragment.trim()\n } else {\n this.options.fragments = __extend(true, this.options.fragments, fragment)\n this._fragments = this.buildFragments(this.options.fragments)\n return this._fragments\n }\n }\n\n GraphQLClient.prototype.ql = function (strings) {\n fragments = Array.prototype.slice.call(arguments, 1)\n fragments = fragments.map(function (fragment) {\n if (typeof fragment == 'string') {\n return fragment.match(/fragment\\s+([^\\s]*)\\s/)[1]\n }\n })\n var query = (typeof strings == 'string') ? strings : strings.reduce(function (acc, seg, i) {\n return acc + fragments[i - 1] + seg\n })\n query = this.buildQuery(query)\n query = ((this.__prefix||\"\") + \" \" + query + \" \" + (this.__suffix||\"\")).trim()\n return query\n }\n\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return (root.graphql = factory(GraphQLClient))\n });\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory(root.GraphQLClient)\n } else {\n root.graphql = factory(root.GraphQLClient)\n }\n }(this || self, function () {\n return GraphQLClient\n }))\n})()\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n"],"names":["BUSINESS_UNIT_ID_REG","BusinessUnitIdParser","constructor","businessUnitId","brand","region","language","test","Error","split","slice","this","locale","toLocaleUpperCase","dateTokens","M","month","MM","MMM","MMMM","D","day","DD","YY","year","YYYY","DateTokenRegex","DateFormatter","config","createDate","dateString","parsedDateRegex","groups","exec","fullYear","Date","getFullYear","toString","replace","byLocale","formats","date","Intl","DateTimeFormat","format","isValidDateToken","token","getFormattedDate","dateFormat","filter","reduce","dateTemplate","dateFormatByLocale","formatDateFromString","formatDateWithPlaceholder","dateFormatConfig","message","placeholderRegex","formattedDate","PriceFormatter","replaceDecimalSeparator","decimalSeparator","parts","value","fraction","find","type","hideZeroFraction","replaceFraction","replacePart","index","formatPriceWithCurrency","price","formatter","formatToParts","map","join","currency","numberOfDecimals","hideZeroDecimals","NumberFormat","style","maximumFractionDigits","minimumFractionDigits","UrlFormatter","prefixHandler","prefix","langPrefixUrl","url","langPrefix","ViewController","isLoading","setSSRState","data","dataState","setId","id","btoa","unescape","encodeURIComponent","getDecorators","container","lazyInject","name","target","key","descriptor","resourceName","sbGetter","resource","get","propertyDescriptor","Object","defineProperty","root","freeExports","exports","freeGlobal","module","g","global","window","InvalidCharacterError","prototype","error","TABLE","REGEX_SPACE_CHARACTERS","base64","input","String","a","b","c","buffer","padding","length","output","position","charCodeAt","charAt","bitStorage","bitCounter","indexOf","fromCharCode","__extend","extended","deep","i","arguments","call","merge","obj","prop","hasOwnProperty","__doRequest","__isTagCall","strings","raw","GraphQLClient","options","client","_lazy","_sender","m","bind","declare","run","fragments","_fragments","buildFragments","createSenderFunction","debug","createHelpers","_transaction","XMLHttpRequest","method","contentType","accept","headers","body","_onRequestError","callback","xhr","open","setRequestHeader","onerror","status","onload","JSON","parse","responseText","e","send","onRequestError","http","https","uri","req","protocol","request","hostname","port","path","toUpperCase","response","str","setEncoding","on","chunk","statusCode","err","write","end","FRAGMENT_SEPERATOR","AUTODECLARE_PATTERN","FRAGMENT_PATTERN","flatten","object","out","setUrl","getUrl","fragmentPath","Function","getter","collectFragments","query","that","fragmentRegexp","collectedFragments","match","forEach","fragment","_","$m","pathRegexp","RegExp","source","push","alreadyCollected","unshift","self","processQuery","concat","autoDeclare","variables","typeMap","string","number","boolean","types","keyAndType","mapping","mappedType","cleanAutoDeclareAnnotations","newVariables","fragmentObject","buildQuery","parseType","trim","originalQuery","ql","apply","caller","requestOptions","fragmentedQuery","Promise","resolve","reject","asJson","stringify","console","groupCollapsed","substr","log","groupEnd","__request","asJSON","errors","mergeName","mutation","resolver","Array","commit","resolveMap","mergedVariables","mergedQueries","keys","subQuery","reqId","Math","random","matchingKey","variable","alias","all","then","responses","newResponses","mergeKey","parsedKey","fieldName","newResponse","catch","finally","sender","helper","__prefix","__suffix","suffix","result","alwaysAutodeclare","getOptions","newHeaders","_fragment","acc","seg","graphql","qs","sep","eq","regexp","maxKeys","len","kstr","vstr","k","v","x","idx","decodeURIComponent","isArray","stringifyPrimitive","isFinite","undefined","ks","decode","encode","nodeType","punycode","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","baseMinusTMin","floor","stringFromCharCode","RangeError","array","fn","mapDomain","ucs2decode","extra","counter","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","basic","j","oldi","w","t","baseMinusT","codePoint","inputLength","n","bias","lastIndexOf","splice","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toLowerCase","util","Url","slashes","auth","host","hash","search","pathname","href","urlParse","relative","resolveObject","isString","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","querystring","parseQueryString","slashesDenoteHost","isObject","u","TypeError","queryIndex","splitter","uSplit","rest","simplePath","proto","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","l","part","newpart","validParts","notHost","bit","toASCII","p","h","ae","esc","escape","qm","s","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","up","isAbsolute","arg"],"sourceRoot":""}