blob: f55c6e9730114002d78f0dc1b6d2ddf3fa6371a1 [file] [log] [blame]
{"version":3,"file":"http.js","sources":["../../../packages/common/http/src/backend.js","../../../packages/common/http/src/headers.js","../../../packages/common/http/src/params.js","../../../packages/common/http/src/request.js","../../../packages/common/http/src/response.js","../../../packages/common/http/src/client.js","../../../packages/common/http/src/interceptor.js","../../../packages/common/http/src/jsonp.js","../../../packages/common/http/src/xhr.js","../../../packages/common/http/src/xsrf.js","../../../packages/common/http/src/module.js","../../../packages/common/http/public_api.js","../../../packages/common/http/http.js"],"sourcesContent":["/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * \\@stable\n * @abstract\n */\nexport class HttpHandler {\n}\nfunction HttpHandler_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} req\n * @return {?}\n */\n HttpHandler.prototype.handle = function (req) { };\n}\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * \\@stable\n * @abstract\n */\nexport class HttpBackend {\n}\nfunction HttpBackend_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} req\n * @return {?}\n */\n HttpBackend.prototype.handle = function (req) { };\n}\n//# sourceMappingURL=backend.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @record\n */\nfunction Update() { }\nfunction Update_tsickle_Closure_declarations() {\n /** @type {?} */\n Update.prototype.name;\n /** @type {?|undefined} */\n Update.prototype.value;\n /** @type {?} */\n Update.prototype.op;\n}\n/**\n * Immutable set of Http headers, with lazy parsing.\n * \\@stable\n */\nexport class HttpHeaders {\n /**\n * @param {?=} headers\n */\n constructor(headers) {\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = () => {\n this.headers = new Map();\n headers.split('\\n').forEach(line => {\n const /** @type {?} */ index = line.indexOf(':');\n if (index > 0) {\n const /** @type {?} */ name = line.slice(0, index);\n const /** @type {?} */ key = name.toLowerCase();\n const /** @type {?} */ value = line.slice(index + 1).trim();\n this.maybeSetNormalizedName(name, key);\n if (this.headers.has(key)) {\n /** @type {?} */ ((this.headers.get(key))).push(value);\n }\n else {\n this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = () => {\n this.headers = new Map();\n Object.keys(headers).forEach(name => {\n let /** @type {?} */ values = headers[name];\n const /** @type {?} */ key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n this.headers.set(key, values);\n this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of header by given name.\n * @param {?} name\n * @return {?}\n */\n has(name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n }\n /**\n * Returns first header that matches given name.\n * @param {?} name\n * @return {?}\n */\n get(name) {\n this.init();\n const /** @type {?} */ values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n /**\n * Returns the names of the headers\n * @return {?}\n */\n keys() {\n this.init();\n return Array.from(this.normalizedNames.values());\n }\n /**\n * Returns list of header values for a given name.\n * @param {?} name\n * @return {?}\n */\n getAll(name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n }\n /**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n append(name, value) {\n return this.clone({ name, value, op: 'a' });\n }\n /**\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n set(name, value) {\n return this.clone({ name, value, op: 's' });\n }\n /**\n * @param {?} name\n * @param {?=} value\n * @return {?}\n */\n delete(name, value) {\n return this.clone({ name, value, op: 'd' });\n }\n /**\n * @param {?} name\n * @param {?} lcName\n * @return {?}\n */\n maybeSetNormalizedName(name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n /**\n * @return {?}\n */\n init() {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(update => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n /**\n * @param {?} other\n * @return {?}\n */\n copyFrom(other) {\n other.init();\n Array.from(other.headers.keys()).forEach(key => {\n this.headers.set(key, /** @type {?} */ ((other.headers.get(key))));\n this.normalizedNames.set(key, /** @type {?} */ ((other.normalizedNames.get(key))));\n });\n }\n /**\n * @param {?} update\n * @return {?}\n */\n clone(update) {\n const /** @type {?} */ clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n /**\n * @param {?} update\n * @return {?}\n */\n applyUpdate(update) {\n const /** @type {?} */ key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let /** @type {?} */ value = /** @type {?} */ ((update.value));\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const /** @type {?} */ base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const /** @type {?} */ toDelete = /** @type {?} */ (update.value);\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n let /** @type {?} */ existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(value => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n /**\n * \\@internal\n * @param {?} fn\n * @return {?}\n */\n forEach(fn) {\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(key => fn(/** @type {?} */ ((this.normalizedNames.get(key))), /** @type {?} */ ((this.headers.get(key)))));\n }\n}\nfunction HttpHeaders_tsickle_Closure_declarations() {\n /**\n * Internal map of lowercase header names to values.\n * @type {?}\n */\n HttpHeaders.prototype.headers;\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n * @type {?}\n */\n HttpHeaders.prototype.normalizedNames;\n /**\n * Complete the lazy initialization of this object (needed before reading).\n * @type {?}\n */\n HttpHeaders.prototype.lazyInit;\n /**\n * Queued updates to be materialized the next initialization.\n * @type {?}\n */\n HttpHeaders.prototype.lazyUpdate;\n}\n//# sourceMappingURL=headers.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A codec for encoding and decoding parameters in URLs.\n *\n * Used by `HttpParams`.\n *\n * \\@stable\n *\n * @record\n */\nexport function HttpParameterCodec() { }\nfunction HttpParameterCodec_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpParameterCodec.prototype.encodeKey;\n /** @type {?} */\n HttpParameterCodec.prototype.encodeValue;\n /** @type {?} */\n HttpParameterCodec.prototype.decodeKey;\n /** @type {?} */\n HttpParameterCodec.prototype.decodeValue;\n}\n/**\n * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to\n * serialize and parse URL parameter keys and values.\n *\n * \\@stable\n */\nexport class HttpUrlEncodingCodec {\n /**\n * @param {?} k\n * @return {?}\n */\n encodeKey(k) { return standardEncoding(k); }\n /**\n * @param {?} v\n * @return {?}\n */\n encodeValue(v) { return standardEncoding(v); }\n /**\n * @param {?} k\n * @return {?}\n */\n decodeKey(k) { return decodeURIComponent(k); }\n /**\n * @param {?} v\n * @return {?}\n */\n decodeValue(v) { return decodeURIComponent(v); }\n}\n/**\n * @param {?} rawParams\n * @param {?} codec\n * @return {?}\n */\nfunction paramParser(rawParams, codec) {\n const /** @type {?} */ map = new Map();\n if (rawParams.length > 0) {\n const /** @type {?} */ params = rawParams.split('&');\n params.forEach((param) => {\n const /** @type {?} */ eqIdx = param.indexOf('=');\n const [key, val] = eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n const /** @type {?} */ list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * @param {?} v\n * @return {?}\n */\nfunction standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n}\n/**\n * @record\n */\nfunction Update() { }\nfunction Update_tsickle_Closure_declarations() {\n /** @type {?} */\n Update.prototype.param;\n /** @type {?|undefined} */\n Update.prototype.value;\n /** @type {?} */\n Update.prototype.op;\n}\n/**\n * Options used to construct an `HttpParams` instance.\n * @record\n */\nexport function HttpParamsOptions() { }\nfunction HttpParamsOptions_tsickle_Closure_declarations() {\n /**\n * String representation of the HTTP params in URL-query-string format. Mutually exclusive with\n * `fromObject`.\n * @type {?|undefined}\n */\n HttpParamsOptions.prototype.fromString;\n /**\n * Object map of the HTTP params. Mutally exclusive with `fromString`.\n * @type {?|undefined}\n */\n HttpParamsOptions.prototype.fromObject;\n /**\n * Encoding codec used to parse and serialize the params.\n * @type {?|undefined}\n */\n HttpParamsOptions.prototype.encoder;\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable - all mutation operations return a new instance.\n *\n * \\@stable\n */\nexport class HttpParams {\n /**\n * @param {?=} options\n */\n constructor(options = /** @type {?} */ ({})) {\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(`Cannot specify both fromString and fromObject.`);\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(key => {\n const /** @type {?} */ value = (/** @type {?} */ (options.fromObject))[key]; /** @type {?} */\n ((this.map)).set(key, Array.isArray(value) ? value : [value]);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Check whether the body has one or more values for the given parameter name.\n * @param {?} param\n * @return {?}\n */\n has(param) {\n this.init();\n return /** @type {?} */ ((this.map)).has(param);\n }\n /**\n * Get the first value for the given parameter name, or `null` if it's not present.\n * @param {?} param\n * @return {?}\n */\n get(param) {\n this.init();\n const /** @type {?} */ res = /** @type {?} */ ((this.map)).get(param);\n return !!res ? res[0] : null;\n }\n /**\n * Get all values for the given parameter name, or `null` if it's not present.\n * @param {?} param\n * @return {?}\n */\n getAll(param) {\n this.init();\n return /** @type {?} */ ((this.map)).get(param) || null;\n }\n /**\n * Get all the parameter names for this body.\n * @return {?}\n */\n keys() {\n this.init();\n return Array.from(/** @type {?} */ ((this.map)).keys());\n }\n /**\n * Construct a new body with an appended value for the given parameter name.\n * @param {?} param\n * @param {?} value\n * @return {?}\n */\n append(param, value) { return this.clone({ param, value, op: 'a' }); }\n /**\n * Construct a new body with a new value for the given parameter name.\n * @param {?} param\n * @param {?} value\n * @return {?}\n */\n set(param, value) { return this.clone({ param, value, op: 's' }); }\n /**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n * @param {?} param\n * @param {?=} value\n * @return {?}\n */\n delete(param, value) { return this.clone({ param, value, op: 'd' }); }\n /**\n * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n * @return {?}\n */\n toString() {\n this.init();\n return this.keys()\n .map(key => {\n const /** @type {?} */ eKey = this.encoder.encodeKey(key);\n return /** @type {?} */ ((/** @type {?} */ ((this.map)).get(key))).map(value => eKey + '=' + this.encoder.encodeValue(value)).join('&');\n })\n .join('&');\n }\n /**\n * @param {?} update\n * @return {?}\n */\n clone(update) {\n const /** @type {?} */ clone = new HttpParams(/** @type {?} */ ({ encoder: this.encoder }));\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat([update]);\n return clone;\n }\n /**\n * @return {?}\n */\n init() {\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(key => /** @type {?} */ ((this.map)).set(key, /** @type {?} */ ((/** @type {?} */ ((/** @type {?} */ ((this.cloneFrom)).map)).get(key))))); /** @type {?} */\n ((this.updates)).forEach(update => {\n switch (update.op) {\n case 'a':\n case 's':\n const /** @type {?} */ base = (update.op === 'a' ? /** @type {?} */ ((this.map)).get(update.param) : undefined) || [];\n base.push(/** @type {?} */ ((update.value))); /** @type {?} */\n ((this.map)).set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n let /** @type {?} */ base = /** @type {?} */ ((this.map)).get(update.param) || [];\n const /** @type {?} */ idx = base.indexOf(update.value);\n if (idx !== -1) {\n base.splice(idx, 1);\n }\n if (base.length > 0) {\n /** @type {?} */ ((this.map)).set(update.param, base);\n }\n else {\n /** @type {?} */ ((this.map)).delete(update.param);\n }\n }\n else {\n /** @type {?} */ ((this.map)).delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = null;\n }\n }\n}\nfunction HttpParams_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpParams.prototype.map;\n /** @type {?} */\n HttpParams.prototype.encoder;\n /** @type {?} */\n HttpParams.prototype.updates;\n /** @type {?} */\n HttpParams.prototype.cloneFrom;\n}\n//# sourceMappingURL=params.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { HttpHeaders } from './headers';\nimport { HttpParams } from './params';\n/**\n * Construction interface for `HttpRequest`s.\n *\n * All values are optional and will override default values if provided.\n * @record\n */\nfunction HttpRequestInit() { }\nfunction HttpRequestInit_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n HttpRequestInit.prototype.headers;\n /** @type {?|undefined} */\n HttpRequestInit.prototype.reportProgress;\n /** @type {?|undefined} */\n HttpRequestInit.prototype.params;\n /** @type {?|undefined} */\n HttpRequestInit.prototype.responseType;\n /** @type {?|undefined} */\n HttpRequestInit.prototype.withCredentials;\n}\n/**\n * Determine whether the given HTTP method may include a body.\n * @param {?} method\n * @return {?}\n */\nfunction mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n * @param {?} value\n * @return {?}\n */\nfunction isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * \\@stable\n */\nexport class HttpRequest {\n /**\n * @param {?} method\n * @param {?} url\n * @param {?=} third\n * @param {?=} fourth\n */\n constructor(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n let /** @type {?} */ options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? /** @type {?} */ (third) : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = /** @type {?} */ (third);\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n const /** @type {?} */ params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n const /** @type {?} */ qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n const /** @type {?} */ sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n * @return {?}\n */\n serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return (/** @type {?} */ (this.body)).toString();\n }\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n * @return {?}\n */\n detectContentTypeHeader() {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n Array.isArray(this.body)) {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n }\n /**\n * @param {?=} update\n * @return {?}\n */\n clone(update = {}) {\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n const /** @type {?} */ method = update.method || this.method;\n const /** @type {?} */ url = update.url || this.url;\n const /** @type {?} */ responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n const /** @type {?} */ body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n const /** @type {?} */ withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n const /** @type {?} */ reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n let /** @type {?} */ headers = update.headers || this.headers;\n let /** @type {?} */ params = update.params || this.params;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce((headers, name) => headers.set(name, /** @type {?} */ ((update.setHeaders))[name]), headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce((params, param) => params.set(param, /** @type {?} */ ((update.setParams))[param]), params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params, headers, reportProgress, responseType, withCredentials,\n });\n }\n}\nfunction HttpRequest_tsickle_Closure_declarations() {\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n * @type {?}\n */\n HttpRequest.prototype.body;\n /**\n * Outgoing headers for this request.\n * @type {?}\n */\n HttpRequest.prototype.headers;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n * @type {?}\n */\n HttpRequest.prototype.reportProgress;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n * @type {?}\n */\n HttpRequest.prototype.withCredentials;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n * @type {?}\n */\n HttpRequest.prototype.responseType;\n /**\n * The outgoing HTTP request method.\n * @type {?}\n */\n HttpRequest.prototype.method;\n /**\n * Outgoing URL parameters.\n * @type {?}\n */\n HttpRequest.prototype.params;\n /**\n * The outgoing URL with all URL parameters set.\n * @type {?}\n */\n HttpRequest.prototype.urlWithParams;\n}\n//# sourceMappingURL=request.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { HttpHeaders } from './headers';\n/** @enum {number} */\nconst HttpEventType = {\n /**\n * The request was sent out over the wire.\n */\n Sent: 0,\n /**\n * An upload progress event was received.\n */\n UploadProgress: 1,\n /**\n * The response status code and headers were received.\n */\n ResponseHeader: 2,\n /**\n * A download progress event was received.\n */\n DownloadProgress: 3,\n /**\n * The full response including the body was received.\n */\n Response: 4,\n /**\n * A custom event from an interceptor or a backend.\n */\n User: 5,\n};\nexport { HttpEventType };\nHttpEventType[HttpEventType.Sent] = \"Sent\";\nHttpEventType[HttpEventType.UploadProgress] = \"UploadProgress\";\nHttpEventType[HttpEventType.ResponseHeader] = \"ResponseHeader\";\nHttpEventType[HttpEventType.DownloadProgress] = \"DownloadProgress\";\nHttpEventType[HttpEventType.Response] = \"Response\";\nHttpEventType[HttpEventType.User] = \"User\";\n/**\n * Base interface for progress events.\n *\n * \\@stable\n * @record\n */\nexport function HttpProgressEvent() { }\nfunction HttpProgressEvent_tsickle_Closure_declarations() {\n /**\n * Progress event type is either upload or download.\n * @type {?}\n */\n HttpProgressEvent.prototype.type;\n /**\n * Number of bytes uploaded or downloaded.\n * @type {?}\n */\n HttpProgressEvent.prototype.loaded;\n /**\n * Total number of bytes to upload or download. Depending on the request or\n * response, this may not be computable and thus may not be present.\n * @type {?|undefined}\n */\n HttpProgressEvent.prototype.total;\n}\n/**\n * A download progress event.\n *\n * \\@stable\n * @record\n */\nexport function HttpDownloadProgressEvent() { }\nfunction HttpDownloadProgressEvent_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpDownloadProgressEvent.prototype.type;\n /**\n * The partial response body as downloaded so far.\n *\n * Only present if the responseType was `text`.\n * @type {?|undefined}\n */\n HttpDownloadProgressEvent.prototype.partialText;\n}\n/**\n * An upload progress event.\n *\n * \\@stable\n * @record\n */\nexport function HttpUploadProgressEvent() { }\nfunction HttpUploadProgressEvent_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpUploadProgressEvent.prototype.type;\n}\n/**\n * An event indicating that the request was sent to the server. Useful\n * when a request may be retried multiple times, to distinguish between\n * retries on the final event stream.\n *\n * \\@stable\n * @record\n */\nexport function HttpSentEvent() { }\nfunction HttpSentEvent_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpSentEvent.prototype.type;\n}\n/**\n * A user-defined event.\n *\n * Grouping all custom events under this type ensures they will be handled\n * and forwarded by all implementations of interceptors.\n *\n * \\@stable\n * @record\n */\nexport function HttpUserEvent() { }\nfunction HttpUserEvent_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpUserEvent.prototype.type;\n}\n/**\n * An error that represents a failed attempt to JSON.parse text coming back\n * from the server.\n *\n * It bundles the Error object with the actual response body that failed to parse.\n *\n * \\@stable\n * @record\n */\nexport function HttpJsonParseError() { }\nfunction HttpJsonParseError_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpJsonParseError.prototype.error;\n /** @type {?} */\n HttpJsonParseError.prototype.text;\n}\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * \\@stable\n * @abstract\n */\nexport class HttpResponseBase {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n * @param {?} init\n * @param {?=} defaultStatus\n * @param {?=} defaultStatusText\n */\n constructor(init, defaultStatus = 200, defaultStatusText = 'OK') {\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n}\nfunction HttpResponseBase_tsickle_Closure_declarations() {\n /**\n * All response headers.\n * @type {?}\n */\n HttpResponseBase.prototype.headers;\n /**\n * Response status code.\n * @type {?}\n */\n HttpResponseBase.prototype.status;\n /**\n * Textual description of response status code.\n *\n * Do not depend on this.\n * @type {?}\n */\n HttpResponseBase.prototype.statusText;\n /**\n * URL of the resource retrieved, or null if not available.\n * @type {?}\n */\n HttpResponseBase.prototype.url;\n /**\n * Whether the status code falls in the 2xx range.\n * @type {?}\n */\n HttpResponseBase.prototype.ok;\n /**\n * Type of the response, narrowed to either the full response or the header.\n * @type {?}\n */\n HttpResponseBase.prototype.type;\n}\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * \\@stable\n */\nexport class HttpHeaderResponse extends HttpResponseBase {\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n * @param {?=} init\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n * @param {?=} update\n * @return {?}\n */\n clone(update = {}) {\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\nfunction HttpHeaderResponse_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpHeaderResponse.prototype.type;\n}\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * \\@stable\n */\nexport class HttpResponse extends HttpResponseBase {\n /**\n * Construct a new `HttpResponse`.\n * @param {?=} init\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.Response;\n this.body = init.body !== undefined ? init.body : null;\n }\n /**\n * @param {?=} update\n * @return {?}\n */\n clone(update = {}) {\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\nfunction HttpResponse_tsickle_Closure_declarations() {\n /**\n * The response body, or `null` if one was not returned.\n * @type {?}\n */\n HttpResponse.prototype.body;\n /** @type {?} */\n HttpResponse.prototype.type;\n}\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * \\@stable\n */\nexport class HttpErrorResponse extends HttpResponseBase {\n /**\n * @param {?} init\n */\n constructor(init) {\n // Initialize with a default status of 0 / Unknown Error.\n super(init, 0, 'Unknown Error');\n this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (this.status >= 200 && this.status < 300) {\n this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n }\n else {\n this.message =\n `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n }\n this.error = init.error || null;\n }\n}\nfunction HttpErrorResponse_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpErrorResponse.prototype.name;\n /** @type {?} */\n HttpErrorResponse.prototype.message;\n /** @type {?} */\n HttpErrorResponse.prototype.error;\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n * @type {?}\n */\n HttpErrorResponse.prototype.ok;\n}\n//# sourceMappingURL=response.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Injectable } from '@angular/core';\nimport { of } from 'rxjs/observable/of';\nimport { concatMap } from 'rxjs/operator/concatMap';\nimport { filter } from 'rxjs/operator/filter';\nimport { map } from 'rxjs/operator/map';\nimport { HttpHandler } from './backend';\nimport { HttpHeaders } from './headers';\nimport { HttpParams } from './params';\nimport { HttpRequest } from './request';\nimport { HttpResponse } from './response';\n/**\n * Construct an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. Basically, this clones the object and adds the body.\n * @template T\n * @param {?} options\n * @param {?} body\n * @return {?}\n */\nfunction addBody(options, body) {\n return {\n body,\n headers: options.headers,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n/**\n * Perform HTTP requests.\n *\n * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies according to which\n * signature is called (mainly the values of `observe` and `responseType`).\n *\n * \\@stable\n */\nexport class HttpClient {\n /**\n * @param {?} handler\n */\n constructor(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an `Observable` for a particular HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * This method can be called in one of two ways. Either an `HttpRequest`\n * instance can be passed directly as the only parameter, or a method can be\n * passed as the first parameter, a string URL as the second, and an\n * options hash as the third.\n *\n * If a `HttpRequest` object is passed directly, an `Observable` of the\n * raw `HttpEvent` stream will be returned.\n *\n * If a request is instead built by providing a URL, the options object\n * determines the return type of `request()`. In addition to configuring\n * request parameters such as the outgoing headers and/or the body, the options\n * hash specifies two key pieces of information about the request: the\n * `responseType` and what to `observe`.\n *\n * The `responseType` value determines how a successful response body will be\n * parsed. If `responseType` is the default `json`, a type interface for the\n * resulting object may be passed as a type parameter to `request()`.\n *\n * The `observe` value determines the return type of `request()`, based on what\n * the consumer is interested in observing. A value of `events` will return an\n * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,\n * including progress events by default. A value of `response` will return an\n * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`\n * depends on the `responseType` and any optionally provided type parameter.\n * A value of `body` will return an `Observable<T>` with the same `T` body type.\n * @param {?} first\n * @param {?=} url\n * @param {?=} options\n * @return {?}\n */\n request(first, url, options = {}) {\n let /** @type {?} */ req;\n // Firstly, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = /** @type {?} */ (first);\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming GET unless a method is\n // provided.\n // Figure out the headers.\n let /** @type {?} */ headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n let /** @type {?} */ params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams(/** @type {?} */ ({ fromObject: options.params }));\n }\n }\n // Construct the request.\n req = new HttpRequest(first, /** @type {?} */ ((url)), (options.body !== undefined ? options.body : null), {\n headers,\n params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n const /** @type {?} */ events$ = concatMap.call(of(req), (req) => this.handler.handle(req));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n const /** @type {?} */ res$ = filter.call(events$, (event) => event instanceof HttpResponse);\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return map.call(res$, (res) => {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n });\n case 'blob':\n return map.call(res$, (res) => {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n });\n case 'text':\n return map.call(res$, (res) => {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n });\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return map.call(res$, (res) => res.body);\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n }\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * DELETE request to be executed on the server. See the individual overloads for\n * details of `delete()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\n delete(url, options = {}) {\n return this.request('DELETE', url, /** @type {?} */ (options));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * GET request to be executed on the server. See the individual overloads for\n * details of `get()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\n get(url, options = {}) {\n return this.request('GET', url, /** @type {?} */ (options));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * HEAD request to be executed on the server. See the individual overloads for\n * details of `head()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\n head(url, options = {}) {\n return this.request('HEAD', url, /** @type {?} */ (options));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause a request\n * with the special method `JSONP` to be dispatched via the interceptor pipeline.\n *\n * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).\n * If no such interceptor is reached, then the `JSONP` request will likely be\n * rejected by the configured backend.\n * @template T\n * @param {?} url\n * @param {?} callbackParam\n * @return {?}\n */\n jsonp(url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * OPTIONS request to be executed on the server. See the individual overloads for\n * details of `options()`'s return type based on the provided options.\n * @param {?} url\n * @param {?=} options\n * @return {?}\n */\n options(url, options = {}) {\n return this.request('OPTIONS', url, /** @type {?} */ (options));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * PATCH request to be executed on the server. See the individual overloads for\n * details of `patch()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\n patch(url, body, options = {}) {\n return this.request('PATCH', url, addBody(options, body));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\n post(url, body, options = {}) {\n return this.request('POST', url, addBody(options, body));\n }\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n * @param {?} url\n * @param {?} body\n * @param {?=} options\n * @return {?}\n */\n put(url, body, options = {}) {\n return this.request('PUT', url, addBody(options, body));\n }\n}\nHttpClient.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nHttpClient.ctorParameters = () => [\n { type: HttpHandler, },\n];\nfunction HttpClient_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpClient.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpClient.ctorParameters;\n /** @type {?} */\n HttpClient.prototype.handler;\n}\n//# sourceMappingURL=client.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Injectable, InjectionToken } from '@angular/core';\n/**\n * Intercepts `HttpRequest` and handles them.\n *\n * Most interceptors will transform the outgoing request before passing it to the\n * next interceptor in the chain, by calling `next.handle(transformedReq)`.\n *\n * In rare cases, interceptors may wish to completely handle a request themselves,\n * and not delegate to the remainder of the chain. This behavior is allowed.\n *\n * \\@stable\n * @record\n */\nexport function HttpInterceptor() { }\nfunction HttpInterceptor_tsickle_Closure_declarations() {\n /**\n * Intercept an outgoing `HttpRequest` and optionally transform it or the\n * response.\n *\n * Typically an interceptor will transform the outgoing request before returning\n * `next.handle(transformedReq)`. An interceptor may choose to transform the\n * response event stream as well, by applying additional Rx operators on the stream\n * returned by `next.handle()`.\n *\n * More rarely, an interceptor may choose to completely handle the request itself,\n * and compose a new event stream instead of invoking `next.handle()`. This is\n * acceptable behavior, but keep in mind further interceptors will be skipped entirely.\n *\n * It is also rare but valid for an interceptor to return multiple responses on the\n * event stream for a single request.\n * @type {?}\n */\n HttpInterceptor.prototype.intercept;\n}\n/**\n * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n * \\@stable\n */\nexport class HttpInterceptorHandler {\n /**\n * @param {?} next\n * @param {?} interceptor\n */\n constructor(next, interceptor) {\n this.next = next;\n this.interceptor = interceptor;\n }\n /**\n * @param {?} req\n * @return {?}\n */\n handle(req) {\n return this.interceptor.intercept(req, this.next);\n }\n}\nfunction HttpInterceptorHandler_tsickle_Closure_declarations() {\n /** @type {?} */\n HttpInterceptorHandler.prototype.next;\n /** @type {?} */\n HttpInterceptorHandler.prototype.interceptor;\n}\n/**\n * A multi-provider token which represents the array of `HttpInterceptor`s that\n * are registered.\n *\n * \\@stable\n */\nexport const /** @type {?} */ HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\nexport class NoopInterceptor {\n /**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\n intercept(req, next) {\n return next.handle(req);\n }\n}\nNoopInterceptor.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nNoopInterceptor.ctorParameters = () => [];\nfunction NoopInterceptor_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n NoopInterceptor.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n NoopInterceptor.ctorParameters;\n}\n//# sourceMappingURL=interceptor.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { HttpErrorResponse, HttpEventType, HttpResponse } from './response';\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet /** @type {?} */ nextRequestId = 0;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nexport const /** @type {?} */ JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nexport const /** @type {?} */ JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nexport const /** @type {?} */ JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n * \\@stable\n * @abstract\n */\nexport class JsonpCallbackContext {\n}\n/**\n * `HttpBackend` that only processes `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n *\n * \\@stable\n */\nexport class JsonpClientBackend {\n /**\n * @param {?} callbackMap\n * @param {?} document\n */\n constructor(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n * @return {?}\n */\n nextCallback() { return `ng_jsonp_callback_${nextRequestId++}`; }\n /**\n * Process a JSONP request and return an event stream of the results.\n * @param {?} req\n * @return {?}\n */\n handle(req) {\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable((observer) => {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n const /** @type {?} */ callback = this.nextCallback();\n const /** @type {?} */ url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n // Construct the <script> tag and point it at the URL.\n const /** @type {?} */ node = this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n let /** @type {?} */ body = null;\n // Whether the response callback has been called.\n let /** @type {?} */ finished = false;\n // Whether the request has been cancelled (and thus any other callbacks)\n // should be ignored.\n let /** @type {?} */ cancelled = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n this.callbackMap[callback] = (data) => {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete this.callbackMap[callback];\n // Next, make sure the request wasn't cancelled in the meantime.\n if (cancelled) {\n return;\n }\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n const /** @type {?} */ cleanup = () => {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n const /** @type {?} */ onLoad = (event) => {\n // Do nothing if the request has been cancelled.\n if (cancelled) {\n return;\n }\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body,\n status: 200,\n statusText: 'OK', url,\n }));\n // Complete the stream, the resposne is over.\n observer.complete();\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n const /** @type {?} */ onError = (error) => {\n // If the request was already cancelled, no need to emit anything.\n if (cancelled) {\n return;\n }\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error,\n status: 0,\n statusText: 'JSONP Error', url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return () => {\n // Track the cancellation so event listeners won't do anything even if already scheduled.\n cancelled = true;\n // Remove the event listeners so they won't run if the events later fire.\n node.removeEventListener('load', onLoad);\n node.removeEventListener('error', onError);\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\n}\nJsonpClientBackend.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nJsonpClientBackend.ctorParameters = () => [\n { type: JsonpCallbackContext, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n];\nfunction JsonpClientBackend_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n JsonpClientBackend.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n JsonpClientBackend.ctorParameters;\n /** @type {?} */\n JsonpClientBackend.prototype.callbackMap;\n /** @type {?} */\n JsonpClientBackend.prototype.document;\n}\n/**\n * An `HttpInterceptor` which identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * \\@stable\n */\nexport class JsonpInterceptor {\n /**\n * @param {?} jsonp\n */\n constructor(jsonp) {\n this.jsonp = jsonp;\n }\n /**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\n intercept(req, next) {\n if (req.method === 'JSONP') {\n return this.jsonp.handle(/** @type {?} */ (req));\n }\n // Fall through for normal HTTP requests.\n return next.handle(req);\n }\n}\nJsonpInterceptor.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nJsonpInterceptor.ctorParameters = () => [\n { type: JsonpClientBackend, },\n];\nfunction JsonpInterceptor_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n JsonpInterceptor.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n JsonpInterceptor.ctorParameters;\n /** @type {?} */\n JsonpInterceptor.prototype.jsonp;\n}\n//# sourceMappingURL=jsonp.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { HttpHeaders } from './headers';\nimport { HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse } from './response';\nconst /** @type {?} */ XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n * @param {?} xhr\n * @return {?}\n */\nfunction getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * \\@stable\n * @abstract\n */\nexport class XhrFactory {\n}\nfunction XhrFactory_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @return {?}\n */\n XhrFactory.prototype.build = function () { };\n}\n/**\n * A factory for \\@{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.\n *\n * \\@stable\n */\nexport class BrowserXhr {\n constructor() { }\n /**\n * @return {?}\n */\n build() { return /** @type {?} */ ((new XMLHttpRequest())); }\n}\nBrowserXhr.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nBrowserXhr.ctorParameters = () => [];\nfunction BrowserXhr_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n BrowserXhr.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n BrowserXhr.ctorParameters;\n}\n/**\n * Tracks a response from the server that does not yet have a body.\n * @record\n */\nfunction PartialResponse() { }\nfunction PartialResponse_tsickle_Closure_declarations() {\n /** @type {?} */\n PartialResponse.prototype.headers;\n /** @type {?} */\n PartialResponse.prototype.status;\n /** @type {?} */\n PartialResponse.prototype.statusText;\n /** @type {?} */\n PartialResponse.prototype.url;\n}\n/**\n * An `HttpBackend` which uses the XMLHttpRequest API to send\n * requests to a backend server.\n *\n * \\@stable\n */\nexport class HttpXhrBackend {\n /**\n * @param {?} xhrFactory\n */\n constructor(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Process a request and return a stream of response events.\n * @param {?} req\n * @return {?}\n */\n handle(req) {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the JsonpClientModule\n if (req.method === 'JSONP') {\n throw new Error(`Attempted to construct Jsonp request without JsonpClientModule installed.`);\n }\n // Everything happens on Observable subscription.\n return new Observable((observer) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n const /** @type {?} */ xhr = this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const /** @type {?} */ detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n const /** @type {?} */ responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = /** @type {?} */ (((responseType !== 'json') ? responseType : 'text'));\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n const /** @type {?} */ reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let /** @type {?} */ headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const /** @type {?} */ partialFromXhr = () => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).\n const /** @type {?} */ status = xhr.status === 1223 ? 204 : xhr.status;\n const /** @type {?} */ statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n const /** @type {?} */ headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const /** @type {?} */ url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers, status, statusText, url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n const /** @type {?} */ onLoad = () => {\n // Read response state from the memoized partial data.\n let { headers, status, statusText, url } = partialFromXhr();\n // The body will be read out if present.\n let /** @type {?} */ body = null;\n if (status !== 204) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let /** @type {?} */ ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n const /** @type {?} */ originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (/** @type {?} */ error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = /** @type {?} */ ({ error, text: body });\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const /** @type {?} */ onError = (error) => {\n const /** @type {?} */ res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progerss event.\n let /** @type {?} */ sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const /** @type {?} */ onDownProgress = (event) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n let /** @type {?} */ progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const /** @type {?} */ onUpProgress = (event) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let /** @type {?} */ progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n xhr.abort();\n };\n });\n }\n}\nHttpXhrBackend.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nHttpXhrBackend.ctorParameters = () => [\n { type: XhrFactory, },\n];\nfunction HttpXhrBackend_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpXhrBackend.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpXhrBackend.ctorParameters;\n /** @type {?} */\n HttpXhrBackend.prototype.xhrFactory;\n}\n//# sourceMappingURL=xhr.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { DOCUMENT, ɵparseCookieValue as parseCookieValue } from '@angular/common';\nimport { Inject, Injectable, InjectionToken, PLATFORM_ID } from '@angular/core';\nexport const /** @type {?} */ XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME');\nexport const /** @type {?} */ XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME');\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * \\@stable\n * @abstract\n */\nexport class HttpXsrfTokenExtractor {\n}\nfunction HttpXsrfTokenExtractor_tsickle_Closure_declarations() {\n /**\n * Get the XSRF token to use with an outgoing request.\n *\n * Will be called for every request, so the token may change between requests.\n * @abstract\n * @return {?}\n */\n HttpXsrfTokenExtractor.prototype.getToken = function () { };\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nexport class HttpXsrfCookieExtractor {\n /**\n * @param {?} doc\n * @param {?} platform\n * @param {?} cookieName\n */\n constructor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * \\@internal for testing\n */\n this.parseCount = 0;\n }\n /**\n * @return {?}\n */\n getToken() {\n if (this.platform === 'server') {\n return null;\n }\n const /** @type {?} */ cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = parseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n }\n}\nHttpXsrfCookieExtractor.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nHttpXsrfCookieExtractor.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] },] },\n { type: undefined, decorators: [{ type: Inject, args: [XSRF_COOKIE_NAME,] },] },\n];\nfunction HttpXsrfCookieExtractor_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpXsrfCookieExtractor.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpXsrfCookieExtractor.ctorParameters;\n /** @type {?} */\n HttpXsrfCookieExtractor.prototype.lastCookieString;\n /** @type {?} */\n HttpXsrfCookieExtractor.prototype.lastToken;\n /**\n * \\@internal for testing\n * @type {?}\n */\n HttpXsrfCookieExtractor.prototype.parseCount;\n /** @type {?} */\n HttpXsrfCookieExtractor.prototype.doc;\n /** @type {?} */\n HttpXsrfCookieExtractor.prototype.platform;\n /** @type {?} */\n HttpXsrfCookieExtractor.prototype.cookieName;\n}\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nexport class HttpXsrfInterceptor {\n /**\n * @param {?} tokenService\n * @param {?} headerName\n */\n constructor(tokenService, headerName) {\n this.tokenService = tokenService;\n this.headerName = headerName;\n }\n /**\n * @param {?} req\n * @param {?} next\n * @return {?}\n */\n intercept(req, next) {\n const /** @type {?} */ lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')) {\n return next.handle(req);\n }\n const /** @type {?} */ token = this.tokenService.getToken();\n // Be careful not to overwrite an existing header of the same name.\n if (token !== null && !req.headers.has(this.headerName)) {\n req = req.clone({ headers: req.headers.set(this.headerName, token) });\n }\n return next.handle(req);\n }\n}\nHttpXsrfInterceptor.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nHttpXsrfInterceptor.ctorParameters = () => [\n { type: HttpXsrfTokenExtractor, },\n { type: undefined, decorators: [{ type: Inject, args: [XSRF_HEADER_NAME,] },] },\n];\nfunction HttpXsrfInterceptor_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpXsrfInterceptor.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpXsrfInterceptor.ctorParameters;\n /** @type {?} */\n HttpXsrfInterceptor.prototype.tokenService;\n /** @type {?} */\n HttpXsrfInterceptor.prototype.headerName;\n}\n//# sourceMappingURL=xsrf.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Inject, NgModule, Optional } from '@angular/core';\nimport { HttpBackend, HttpHandler } from './backend';\nimport { HttpClient } from './client';\nimport { HTTP_INTERCEPTORS, HttpInterceptorHandler, NoopInterceptor } from './interceptor';\nimport { JsonpCallbackContext, JsonpClientBackend, JsonpInterceptor } from './jsonp';\nimport { BrowserXhr, HttpXhrBackend, XhrFactory } from './xhr';\nimport { HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor, XSRF_COOKIE_NAME, XSRF_HEADER_NAME } from './xsrf';\n/**\n * Constructs an `HttpHandler` that applies a bunch of `HttpInterceptor`s\n * to a request before passing it to the given `HttpBackend`.\n *\n * Meant to be used as a factory function within `HttpClientModule`.\n *\n * \\@stable\n * @param {?} backend\n * @param {?=} interceptors\n * @return {?}\n */\nexport function interceptingHandler(backend, interceptors = []) {\n if (!interceptors) {\n return backend;\n }\n return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n * \\@stable\n * @return {?}\n */\nexport function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * `NgModule` which adds XSRF protection support to outgoing requests.\n *\n * Provided the server supports a cookie-based XSRF protection system, this\n * module can be used directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no such names are provided, the default is to use `X-XSRF-TOKEN` for\n * the header name and `XSRF-TOKEN` for the cookie name.\n *\n * \\@stable\n */\nexport class HttpClientXsrfModule {\n /**\n * Disable the default XSRF protection.\n * @return {?}\n */\n static disable() {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n ],\n };\n }\n /**\n * Configure XSRF protection to use the given cookie name or header name,\n * or the default names (as described above) if not provided.\n * @param {?=} options\n * @return {?}\n */\n static withOptions(options = {}) {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],\n options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],\n ],\n };\n }\n}\nHttpClientXsrfModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n ],\n },] },\n];\n/** @nocollapse */\nHttpClientXsrfModule.ctorParameters = () => [];\nfunction HttpClientXsrfModule_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpClientXsrfModule.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpClientXsrfModule.ctorParameters;\n}\n/**\n * `NgModule` which provides the `HttpClient` and associated services.\n *\n * Interceptors can be added to the chain behind `HttpClient` by binding them\n * to the multiprovider for `HTTP_INTERCEPTORS`.\n *\n * \\@stable\n */\nexport class HttpClientModule {\n}\nHttpClientModule.decorators = [\n { type: NgModule, args: [{\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n }),\n ],\n providers: [\n HttpClient,\n // HttpHandler is the backend + interceptors and is constructed\n // using the interceptingHandler factory function.\n {\n provide: HttpHandler,\n useFactory: interceptingHandler,\n deps: [HttpBackend, [new Optional(), new Inject(HTTP_INTERCEPTORS)]],\n },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n BrowserXhr,\n { provide: XhrFactory, useExisting: BrowserXhr },\n ],\n },] },\n];\n/** @nocollapse */\nHttpClientModule.ctorParameters = () => [];\nfunction HttpClientModule_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpClientModule.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpClientModule.ctorParameters;\n}\n/**\n * `NgModule` which enables JSONP support in `HttpClient`.\n *\n * Without this module, Jsonp requests will reach the backend\n * with method JSONP, where they'll be rejected.\n *\n * \\@stable\n */\nexport class HttpClientJsonpModule {\n}\nHttpClientJsonpModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ],\n },] },\n];\n/** @nocollapse */\nHttpClientJsonpModule.ctorParameters = () => [];\nfunction HttpClientJsonpModule_tsickle_Closure_declarations() {\n /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */\n HttpClientJsonpModule.decorators;\n /**\n * @nocollapse\n * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}\n */\n HttpClientJsonpModule.ctorParameters;\n}\n//# sourceMappingURL=module.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport { HttpBackend, HttpHandler } from './src/backend';\nexport { HttpClient } from './src/client';\nexport { HttpHeaders } from './src/headers';\nexport { HTTP_INTERCEPTORS } from './src/interceptor';\nexport { JsonpClientBackend, JsonpInterceptor } from './src/jsonp';\nexport { HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, interceptingHandler as ɵinterceptingHandler } from './src/module';\nexport { HttpParams, HttpUrlEncodingCodec } from './src/params';\nexport { HttpRequest } from './src/request';\nexport { HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase } from './src/response';\nexport { HttpXhrBackend, XhrFactory } from './src/xhr';\nexport { HttpXsrfTokenExtractor } from './src/xsrf';\n//# sourceMappingURL=public_api.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Generated bundle index. Do not edit.\n */\nexport { HttpBackend, HttpHandler, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, JsonpClientBackend, JsonpInterceptor, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, ɵinterceptingHandler, HttpParams, HttpUrlEncodingCodec, HttpRequest, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpXhrBackend, XhrFactory, HttpXsrfTokenExtractor } from './public_api';\nexport { NoopInterceptor as ɵa } from './src/interceptor';\nexport { JsonpCallbackContext as ɵb } from './src/jsonp';\nexport { jsonpCallbackContext as ɵc } from './src/module';\nexport { BrowserXhr as ɵd } from './src/xhr';\nexport { HttpXsrfCookieExtractor as ɵg, HttpXsrfIn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