From 834e9831a09b9242bfd0a6bb37883f12dd4dd653 Mon Sep 17 00:00:00 2001 From: Shaun Grady Date: Sat, 4 Aug 2018 13:12:26 -0700 Subject: [PATCH] 2.0.18 --- lib/index.js | 892 +++++----- package-lock.json | 2 +- package.json | 2 +- release/angular-http-etag.js | 2238 ++++++++++++++++---------- release/angular-http-etag.min.js | 3 +- release/angular-http-etag.min.js.map | 2 +- 6 files changed, 1872 insertions(+), 1267 deletions(-) diff --git a/lib/index.js b/lib/index.js index bf23066..99b6232 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,6 @@ /** - * angular-http-etag v2.0.17 - * Shaun Grady (http://shaungrady.com), 2017 + * angular-http-etag v2.0.18 + * Shaun Grady (http://shaungrady.com), 2018 * https://github.com/shaungrady/angular-http-etag * Module Format: CommonJS * License: MIT @@ -10,52 +10,69 @@ module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; - +/******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { - +/******/ /******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) +/******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; - +/******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; - +/******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - +/******/ /******/ // Flag the module as loaded /******/ module.l = true; - +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } - - +/******/ +/******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; - +/******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; - -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; - +/******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; - +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -64,15 +81,16 @@ module.exports = /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; - +/******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - +/******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; - +/******/ +/******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 8); +/******/ return __webpack_require__(__webpack_require__.s = 4); /******/ }) /************************************************************************/ /******/ ([ @@ -83,183 +101,329 @@ module.exports = require("angular"); /***/ }), /* 1 */ +/***/ (function(module, exports) { + +module.exports = require("array-map"); + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +module.exports = require("deepcopy"); + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = require("object-keys"); + +/***/ }), +/* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); +__webpack_require__.r(__webpack_exports__); +// EXTERNAL MODULE: external "angular" +var external_angular_ = __webpack_require__(0); +var external_angular_default = /*#__PURE__*/__webpack_require__.n(external_angular_); -/* harmony default export */ __webpack_exports__["a"] = cacheAdaptersConfig; +// EXTERNAL MODULE: external "deepcopy" +var external_deepcopy_ = __webpack_require__(2); +var external_deepcopy_default = /*#__PURE__*/__webpack_require__.n(external_deepcopy_); -cacheAdaptersConfig.$inject = ['httpEtagProvider'] +// CONCATENATED MODULE: ./src/service.js -function cacheAdaptersConfig (httpEtagProvider) { - httpEtagProvider - .defineCacheServiceAdapter('$cacheFactory', { - config: { - storesDeepCopies: false - }, - methods: { - createCache: function createCache ($cacheFactory, cacheId, options) { - $cacheFactory(cacheId, options) - }, - getCache: function getCache ($cacheFactory, cacheId) { - return $cacheFactory.get(cacheId) - }, - setItem: function setItem (cache, itemKey, value) { - cache.put(itemKey, value) - }, - getItem: function getItem (cache, itemKey) { - return cache.get(itemKey) - }, - removeItem: function removeItem (cache, itemKey) { - cache.remove(itemKey) - }, - removeAllItems: function removeAllItems (cache, itemKey) { - cache.removeAll() - } - } - }) - .defineCacheServiceAdapter('localStorage', { - config: { - storesDeepCopies: true - }, - methods: { - createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop, - getCache: function getCache (localStorage, cacheId) { - return cacheId - }, - setItem: function setItem (cacheId, itemKey, value) { - try { - itemKey = cacheId + ':' + itemKey - localStorage.setItem(itemKey, JSON.stringify(value)) - } catch (e) { +/* harmony default export */ var src_service = (service_httpEtagProvider); - } - }, - getItem: function getItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - return JSON.parse(localStorage.getItem(itemKey)) - }, - removeItem: function removeItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - localStorage.removeItem(itemKey) - }, - removeAllItems: function removeAllItems (cacheId, itemKey) { - var keyPrefix = cacheId + ':' +function service_httpEtagProvider () { + var httpEtagProvider = this - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(localStorage, function (value, key) { - if (key.indexOf(keyPrefix) === 0) { - localStorage.removeItem(key) - } - }) - } - } - }) + var serviceAdapterMethods = [ + 'createCache', + 'getCache' + ] - .defineCacheServiceAdapter('sessionStorage', { - config: { - storesDeepCopies: true - }, - methods: { - createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop, - getCache: function getCache (sessionStorage, cacheId) { - return cacheId - }, - setItem: function setItem (cacheId, itemKey, value) { - try { - itemKey = cacheId + ':' + itemKey - sessionStorage.setItem(itemKey, JSON.stringify(value)) - } catch (e) { + var cacheAdapterMethods = [ + 'setItem', + 'getItem', + 'removeItem', + 'removeAllItems' + // info method hard-coded + ] - } - }, - getItem: function getItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - return JSON.parse(sessionStorage.getItem(itemKey)) - }, - removeItem: function removeItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - sessionStorage.removeItem(itemKey) - }, - removeAllItems: function removeAllItems (cacheId, itemKey) { - var keyPrefix = cacheId + ':' + var requiredAdapterMethods = serviceAdapterMethods.concat(cacheAdapterMethods) - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(sessionStorage, function (value, key) { - if (key.indexOf(keyPrefix) === 0) { - sessionStorage.removeItem(key) - } - }) - } - } - }) -} + // Built-in adapters defined in ./cacheServiceAdapters.js + var cacheAdapters = {} + var cacheDefinitions = {} + // Cache config defaults + var defaultCacheId = 'httpEtagCache' + var defaultEtagCacheConfig = { + deepCopy: false, + cacheResponseData: true, + cacheService: '$cacheFactory', + cacheOptions: { + number: 25 + } + } -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** + * SERVICE PROVIDER + * .setDefaultCacheConfig(config) + * .defineCache(cacheId, config) + * .defineCacheServiceAdapter(serviceName, config) + * .getCacheServiceAdapter(serviceName) + */ -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_object_keys__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map__ = __webpack_require__(5); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_array_map__); + httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) { + defaultEtagCacheConfig = external_angular_default.a.extend({}, defaultEtagCacheConfig, config) + return httpEtagProvider + } + httpEtagProvider.getDefaultCacheConfig = function httpEtagGetDefaultCacheOptions () { + return defaultEtagCacheConfig + } + httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) { + config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId }) + cacheDefinitions[cacheId] = config + return httpEtagProvider + } + httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) { + if (!config) throw new Error('Missing cache service adapter configuration') + if (!config.methods) throw new Error('Missing cache service adapter configuration methods') + external_angular_default.a.forEach(requiredAdapterMethods, function (method) { + if (typeof config.methods[method] !== 'function') { + throw new Error('Expected cache service adapter method "' + method + '" to be a function') + } + }) -/* harmony default export */ __webpack_exports__["a"] = httpEtagHttpDecorator; + cacheAdapters[serviceName] = config + return httpEtagProvider + } -httpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag'] + httpEtagProvider.getCacheServiceAdapter = function httpEtagGetCacheServiceAdapter (serviceName) { + return cacheAdapters[serviceName] + } -function httpEtagHttpDecorator ($delegate, httpEtag) { - var $http = $delegate - var cachableHttpMethods = [ - 'GET', - 'JSONP' - ] + /** + * SERVICE + * .info() + * .getCache(acheId) + * .getItemCache(cacheId, itemKey) + */ - function $httpDecorator (httpConfig) { - var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions() - var hasConfig = !!httpConfig.etagCache - var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0 - var isCachable = hasConfig && isCacheableMethod - var httpPromise + httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) { + var httpEtagService = {} - if (isCachable) { - var etagCacheConfig = processHttpConfigEtagValue(httpConfig) - if (etagCacheConfig) { - var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey) - if (!itemCache) throw new Error('No defined ETag caches match specified cache ID') + var services = {} + var adaptedServices = {} + var caches = {} + var adaptedCaches = {} - var cacheInfo = itemCache.info() - var rawCacheData = itemCache.$get() - var cachedEtag = rawCacheData && rawCacheData.etagHeader - var cachedResponse = cachedEtag && rawCacheData.responseData + // Add default cache if not already defined + if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId) - // Allow easy access to cache in interceptor - httpConfig.$$_itemCache = itemCache + // Find/inject cache service and create adapted versions + external_angular_default.a.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) { + var service = services[serviceName] = window[serviceName] || $injector.get(serviceName) + var adaptedService = adaptedServices[serviceName] = {} - if (cachedEtag) { - httpConfig.headers = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, httpConfig.headers, { - 'If-None-Match': cachedEtag - }) - } - } - } + external_angular_default.a.forEach(serviceAdapterMethods, function (method) { + adaptedService[method] = external_angular_default.a.bind({}, adapter.methods[method], service) + }) + }) - httpPromise = $http.apply($http, arguments) - httpEtagPromiseFactory(httpPromise) + // Instantiate caches and create adapted versions + external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) { + adaptedServices[config.cacheService].createCache(cacheId, config) + var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId) + var adaptedCache = adaptedCaches[cacheId] = {} + // Determine whether to perform deepcopying or not + var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies + var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy + var copy = function (value) { + return deepCopy ? external_deepcopy_default()(value) : value + } - function httpEtagPromiseFactory (httpPromise) { - var then = httpPromise.then - var success = httpPromise.success + external_angular_default.a.forEach(cacheAdapterMethods, function (method) { + var adapterMethod = cacheAdapters[config.cacheService].methods[method] + var wrappedMethod + var wrappedRawMethod + + // Wrap set/get methods to set/get to the `responseData` property of an + // object. This is where the $http interceptor stores response data. + if (method === 'getItem') { + wrappedMethod = function getCacheItemResponseData (cache, itemKey, options) { + var cachedData = adapterMethod(cache, itemKey, options) + return cachedData && copy(cachedData.responseData) + } + + wrappedRawMethod = function getCacheItemData (cache, itemKey, options) { + return copy(adapterMethod(cache, itemKey, options)) + } + } + + if (method === 'setItem') { + wrappedMethod = function setCacheItemResponseData (cache, itemKey, value, options) { + var cachedData = adaptedCache.$getItem(itemKey) + value = copy(value) + + if (cachedData && typeof cachedData === 'object') { + cachedData.responseData = value + value = cachedData + } else value = { responseData: value } + + adapterMethod(cache, itemKey, value, options) + } + + wrappedRawMethod = function setCacheItemData (cache, itemKey, value, options) { + adapterMethod(cache, itemKey, copy(value), options) + } + } + + adaptedCache[method] = external_angular_default.a.bind({}, (wrappedMethod || adapterMethod), cache) + if (wrappedRawMethod) { + adaptedCache['$' + method] = external_angular_default.a.bind({}, wrappedRawMethod, cache) + } + }) + + adaptedCache.unsetItem = function adaptedCacheUnsetItemCache (itemKey) { + adaptedCache.setItem(itemKey, undefined) + } + adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) { + var data = adaptedCache.$getItem(itemKey) + delete data.etagHeader + adaptedCache.$setItem(itemKey, data) + } + adaptedCache.getItemCache = function adaptedCacheGetItemCache (itemKey) { + return httpEtagService.getItemCache(cacheId, itemKey) + } + adaptedCache.info = function adaptedCacheInfo () { + return cacheDefinitions[cacheId] + } + adaptedCache.isCache = true + }) + + httpEtagService.info = function httpEtagServiceInfo () { + return cacheDefinitions + } + + httpEtagService.getCache = function httpEtagServiceGetCache (cacheId) { + var cache = adaptedCaches[processCacheId(cacheId)] + if (cache) return cache + } + + httpEtagService.getItemCache = function httpEtagServiceGeItemCache (cacheId, itemKey) { + var cache = httpEtagService.getCache(cacheId) + var itemCache = {} + if (!cache) return + + var methodMappings = [ + ['set', 'setItem'], + ['get', 'getItem'], + ['$set', '$setItem'], + ['$get', '$getItem'], + ['unset', 'unsetItem'], + ['expire', 'expireItem'], + ['remove', 'removeItem'] + ] + + external_angular_default.a.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) { + itemCache[methods[0]] = external_angular_default.a.bind({}, cache[methods[1]], itemKey) + }) + + itemCache.info = function itemCacheInfo () { + var itemCacheInfo = cache.info() + itemCacheInfo.itemKey = itemKey + return itemCacheInfo + } + + itemCache.isItemCache = true + + return itemCache + } + + httpEtagService.purgeCaches = function httpEtagPurgeCaches () { + external_angular_default.a.forEach(adaptedCaches, function (cache) { + cache.removeAllItems() + }) + } + + function processCacheId (cacheId) { + var type = typeof cacheId + var isDefined = type === 'number' || (type === 'string' && !!cacheId) + return isDefined ? cacheId : defaultCacheId + } + + return httpEtagService + }] +} + +// EXTERNAL MODULE: external "object-keys" +var external_object_keys_ = __webpack_require__(3); +var external_object_keys_default = /*#__PURE__*/__webpack_require__.n(external_object_keys_); + +// EXTERNAL MODULE: external "array-map" +var external_array_map_ = __webpack_require__(1); +var external_array_map_default = /*#__PURE__*/__webpack_require__.n(external_array_map_); + +// CONCATENATED MODULE: ./src/httpDecorator.js + + + + +/* harmony default export */ var httpDecorator = (httpEtagHttpDecorator); + +httpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag'] + +function httpEtagHttpDecorator ($delegate, httpEtag) { + var $http = $delegate + var cachableHttpMethods = [ + 'GET', + 'JSONP' + ] + + function $httpDecorator (httpConfig) { + var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions() + var hasConfig = !!httpConfig.etagCache + var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0 + var isCachable = hasConfig && isCacheableMethod + var httpPromise + + if (isCachable) { + var etagCacheConfig = processHttpConfigEtagValue(httpConfig) + if (etagCacheConfig) { + var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey) + if (!itemCache) throw new Error('No defined ETag caches match specified cache ID') + + var cacheInfo = itemCache.info() + var rawCacheData = itemCache.$get() + var cachedEtag = rawCacheData && rawCacheData.etagHeader + var cachedResponse = cachedEtag && rawCacheData.responseData + + // Allow easy access to cache in interceptor + httpConfig.$$_itemCache = itemCache + + if (cachedEtag) { + httpConfig.headers = external_angular_default.a.extend({}, httpConfig.headers, { + 'If-None-Match': cachedEtag + }) + } + } + } + + httpPromise = $http.apply($http, arguments) + httpEtagPromiseFactory(httpPromise) + + function httpEtagPromiseFactory (httpPromise) { + var then = httpPromise.then + var success = httpPromise.success if (useLegacyPromiseExtensions) { httpPromise.cached = function httpEtagPromiseCached (callback) { @@ -276,6 +440,8 @@ function httpEtagHttpDecorator ($delegate, httpEtag) { httpPromise.ifCached = function httpEtagPromiseIfCached (callback) { if (rawCacheData && cacheInfo.cacheResponseData) { + // We're simply mimicking the Angular API here, so... sorry, Standard. + // eslint-disable-next-line standard/no-callback-literal callback({ data: cachedResponse, status: 'cached', @@ -318,10 +484,10 @@ function httpEtagHttpDecorator ($delegate, httpEtag) { } // Decorate the cachable shortcut methods, too - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cachableHttpMethods, function (httpMethod) { + external_angular_default.a.forEach(cachableHttpMethods, function (httpMethod) { var method = httpMethod.toLowerCase() $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) { - config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, config, { + config = external_angular_default.a.extend({}, config, { method: httpMethod, url: url }) @@ -331,7 +497,7 @@ function httpEtagHttpDecorator ($delegate, httpEtag) { }) // Copy over all other properties and methods - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach($http, function copyHttpPropertyToDectorator (value, key) { + external_angular_default.a.forEach($http, function copyHttpPropertyToDectorator (value, key) { if (!$httpDecorator[key]) $httpDecorator[key] = value }) @@ -387,11 +553,11 @@ function httpEtagHttpDecorator ($delegate, httpEtag) { // Based on npm package "query-string" function stringifyParams (obj) { - return obj ? __WEBPACK_IMPORTED_MODULE_2_array_map___default()(__WEBPACK_IMPORTED_MODULE_1_object_keys___default()(obj).sort(), function (key) { + return obj ? external_array_map_default()(external_object_keys_default()(obj).sort(), function (key) { var val = obj[key] - if (__WEBPACK_IMPORTED_MODULE_0_angular___default.a.isArray(val)) { - return __WEBPACK_IMPORTED_MODULE_2_array_map___default()(val.sort(), function (val2) { + if (external_angular_default.a.isArray(val)) { + return external_array_map_default()(val.sort(), function (val2) { return encodeURIComponent(key) + '=' + encodeURIComponent(val2) }).join('&') } @@ -415,13 +581,8 @@ function httpEtagHttpDecorator ($delegate, httpEtag) { return $httpDecorator } - -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = httpEtagInterceptorFactory; +// CONCATENATED MODULE: ./src/httpInterceptor.js +/* harmony default export */ var httpInterceptor = (httpEtagInterceptorFactory); function httpEtagInterceptorFactory () { function responseInterceptor (response) { @@ -450,299 +611,138 @@ function httpEtagInterceptorFactory () { } } +// CONCATENATED MODULE: ./src/cacheServiceAdapters.js -/***/ }), -/* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy__ = __webpack_require__(6); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_deepcopy__); - - - -/* harmony default export */ __webpack_exports__["a"] = httpEtagProvider; - -function httpEtagProvider () { - var httpEtagProvider = this - - var serviceAdapterMethods = [ - 'createCache', - 'getCache' - ] - - var cacheAdapterMethods = [ - 'setItem', - 'getItem', - 'removeItem', - 'removeAllItems' - // info method hard-coded - ] - - var requiredAdapterMethods = serviceAdapterMethods.concat(cacheAdapterMethods) - - // Built-in adapters defined in ./cacheServiceAdapters.js - var cacheAdapters = {} - var cacheDefinitions = {} - - // Cache config defaults - var defaultCacheId = 'httpEtagCache' - var defaultEtagCacheConfig = { - deepCopy: false, - cacheResponseData: true, - cacheService: '$cacheFactory', - cacheOptions: { - number: 25 - } - } - - /** - * SERVICE PROVIDER - * .setDefaultCacheConfig(config) - * .defineCache(cacheId, config) - * .defineCacheServiceAdapter(serviceName, config) - * .getCacheServiceAdapter(serviceName) - */ - httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) { - defaultEtagCacheConfig = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config) - return httpEtagProvider - } +/* harmony default export */ var cacheServiceAdapters = (cacheAdaptersConfig); - httpEtagProvider.getDefaultCacheConfig = function httpEtagGetDefaultCacheOptions () { - return defaultEtagCacheConfig - } +cacheAdaptersConfig.$inject = ['httpEtagProvider'] - httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) { - config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId }) - cacheDefinitions[cacheId] = config - return httpEtagProvider - } +function cacheAdaptersConfig (httpEtagProvider) { + httpEtagProvider - httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) { - if (!config) throw new Error('Missing cache service adapter configuration') - if (!config.methods) throw new Error('Missing cache service adapter configuration methods') - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(requiredAdapterMethods, function (method) { - if (typeof config.methods[method] !== 'function') { - throw new Error('Expected cache service adapter method "' + method + '" to be a function') + .defineCacheServiceAdapter('$cacheFactory', { + config: { + storesDeepCopies: false + }, + methods: { + createCache: function createCache ($cacheFactory, cacheId, options) { + $cacheFactory(cacheId, options) + }, + getCache: function getCache ($cacheFactory, cacheId) { + return $cacheFactory.get(cacheId) + }, + setItem: function setItem (cache, itemKey, value) { + cache.put(itemKey, value) + }, + getItem: function getItem (cache, itemKey) { + return cache.get(itemKey) + }, + removeItem: function removeItem (cache, itemKey) { + cache.remove(itemKey) + }, + removeAllItems: function removeAllItems (cache, itemKey) { + cache.removeAll() + } } }) - cacheAdapters[serviceName] = config - return httpEtagProvider - } - - httpEtagProvider.getCacheServiceAdapter = function httpEtagGetCacheServiceAdapter (serviceName) { - return cacheAdapters[serviceName] - } - - /** - * SERVICE - * .info() - * .getCache(acheId) - * .getItemCache(cacheId, itemKey) - */ - - httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) { - var httpEtagService = {} - - var services = {} - var adaptedServices = {} - var caches = {} - var adaptedCaches = {} - - // Add default cache if not already defined - if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId) - - // Find/inject cache service and create adapted versions - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) { - var service = services[serviceName] = window[serviceName] || $injector.get(serviceName) - var adaptedService = adaptedServices[serviceName] = {} - - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(serviceAdapterMethods, function (method) { - adaptedService[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, adapter.methods[method], service) - }) - }) - - // Instantiate caches and create adapted versions - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) { - adaptedServices[config.cacheService].createCache(cacheId, config) - var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId) - var adaptedCache = adaptedCaches[cacheId] = {} - // Determine whether to perform deepcopying or not - var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies - var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy - var copy = function (value) { - return deepCopy ? __WEBPACK_IMPORTED_MODULE_1_deepcopy___default()(value) : value - } - - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapterMethods, function (method) { - var adapterMethod = cacheAdapters[config.cacheService].methods[method] - var wrappedMethod - var wrappedRawMethod + .defineCacheServiceAdapter('localStorage', { + config: { + storesDeepCopies: true + }, + methods: { + createCache: external_angular_default.a.noop, + getCache: function getCache (localStorage, cacheId) { + return cacheId + }, + setItem: function setItem (cacheId, itemKey, value) { + try { + itemKey = cacheId + ':' + itemKey + localStorage.setItem(itemKey, JSON.stringify(value)) + } catch (e) { - // Wrap set/get methods to set/get to the `responseData` property of an - // object. This is where the $http interceptor stores response data. - if (method === 'getItem') { - wrappedMethod = function getCacheItemResponseData (cache, itemKey, options) { - var cachedData = adapterMethod(cache, itemKey, options) - return cachedData && copy(cachedData.responseData) } + }, + getItem: function getItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + return JSON.parse(localStorage.getItem(itemKey)) + }, + removeItem: function removeItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + localStorage.removeItem(itemKey) + }, + removeAllItems: function removeAllItems (cacheId, itemKey) { + var keyPrefix = cacheId + ':' - wrappedRawMethod = function getCacheItemData (cache, itemKey, options) { - return copy(adapterMethod(cache, itemKey, options)) - } + external_angular_default.a.forEach(localStorage, function (value, key) { + if (key.indexOf(keyPrefix) === 0) { + localStorage.removeItem(key) + } + }) } + } + }) - if (method === 'setItem') { - wrappedMethod = function setCacheItemResponseData (cache, itemKey, value, options) { - var cachedData = adaptedCache.$getItem(itemKey) - value = copy(value) - - if (cachedData && typeof cachedData === 'object') { - cachedData.responseData = value - value = cachedData - } else value = { responseData: value } - - adapterMethod(cache, itemKey, value, options) - } + .defineCacheServiceAdapter('sessionStorage', { + config: { + storesDeepCopies: true + }, + methods: { + createCache: external_angular_default.a.noop, + getCache: function getCache (sessionStorage, cacheId) { + return cacheId + }, + setItem: function setItem (cacheId, itemKey, value) { + try { + itemKey = cacheId + ':' + itemKey + sessionStorage.setItem(itemKey, JSON.stringify(value)) + } catch (e) { - wrappedRawMethod = function setCacheItemData (cache, itemKey, value, options) { - adapterMethod(cache, itemKey, copy(value), options) } - } + }, + getItem: function getItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + return JSON.parse(sessionStorage.getItem(itemKey)) + }, + removeItem: function removeItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + sessionStorage.removeItem(itemKey) + }, + removeAllItems: function removeAllItems (cacheId, itemKey) { + var keyPrefix = cacheId + ':' - adaptedCache[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, (wrappedMethod || adapterMethod), cache) - if (wrappedRawMethod) { - adaptedCache['$' + method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, wrappedRawMethod, cache) + external_angular_default.a.forEach(sessionStorage, function (value, key) { + if (key.indexOf(keyPrefix) === 0) { + sessionStorage.removeItem(key) + } + }) } - }) - - adaptedCache.unsetItem = function adaptedCacheUnsetItemCache (itemKey) { - adaptedCache.setItem(itemKey, undefined) - } - adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) { - var data = adaptedCache.$getItem(itemKey) - delete data.etagHeader - adaptedCache.$setItem(itemKey, data) - } - adaptedCache.getItemCache = function adaptedCacheGetItemCache (itemKey) { - return httpEtagService.getItemCache(cacheId, itemKey) - } - adaptedCache.info = function adaptedCacheInfo () { - return cacheDefinitions[cacheId] } - adaptedCache.isCache = true }) - - httpEtagService.info = function httpEtagServiceInfo () { - return cacheDefinitions - } - - httpEtagService.getCache = function httpEtagServiceGetCache (cacheId) { - var cache = adaptedCaches[processCacheId(cacheId)] - if (cache) return cache - } - - httpEtagService.getItemCache = function httpEtagServiceGeItemCache (cacheId, itemKey) { - var cache = httpEtagService.getCache(cacheId) - var itemCache = {} - if (!cache) return - - var methodMappings = [ - ['set', 'setItem'], - ['get', 'getItem'], - ['$set', '$setItem'], - ['$get', '$getItem'], - ['unset', 'unsetItem'], - ['expire', 'expireItem'], - ['remove', 'removeItem'] - ] - - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) { - itemCache[methods[0]] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, cache[methods[1]], itemKey) - }) - - itemCache.info = function itemCacheInfo () { - var itemCacheInfo = cache.info() - itemCacheInfo.itemKey = itemKey - return itemCacheInfo - } - - itemCache.isItemCache = true - - return itemCache - } - - httpEtagService.purgeCaches = function httpEtagPurgeCaches () { - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(adaptedCaches, function (cache) { - cache.removeAllItems() - }) - } - - function processCacheId (cacheId) { - var type = typeof cacheId - var isDefined = type === 'number' || (type === 'string' && !!cacheId) - return isDefined ? cacheId : defaultCacheId - } - - return httpEtagService - }] } - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = require("array-map"); - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -module.exports = require("deepcopy"); - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -module.exports = require("object-keys"); - -/***/ }), -/* 8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__service__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__httpDecorator__ = __webpack_require__(2); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__httpInterceptor__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__ = __webpack_require__(1); +// CONCATENATED MODULE: ./src/index.js -/* harmony default export */ __webpack_exports__["default"] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a +/* harmony default export */ var src = __webpack_exports__["default"] = (external_angular_default.a .module('http-etag', []) - .provider('httpEtag', __WEBPACK_IMPORTED_MODULE_1__service__["a" /* default */]) - .config(__WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__["a" /* default */]) + .provider('httpEtag', src_service) + .config(cacheServiceAdapters) .config(['$provide', '$httpProvider', function addHttpEtagInterceptor ($provide, $httpProvider) { - __WEBPACK_IMPORTED_MODULE_2__httpDecorator__["a" /* default */].useLegacyPromiseExtensions = + httpDecorator.useLegacyPromiseExtensions = $httpProvider.useLegacyPromiseExtensions || function useLegacyPromiseExtensions () { - return __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.major === 1 && __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.minor < 6 + return external_angular_default.a.version.major === 1 && external_angular_default.a.version.minor < 6 } - $provide.decorator('$http', __WEBPACK_IMPORTED_MODULE_2__httpDecorator__["a" /* default */]) - $httpProvider.interceptors.push(__WEBPACK_IMPORTED_MODULE_3__httpInterceptor__["a" /* default */]) + $provide.decorator('$http', httpDecorator) + $httpProvider.interceptors.push(httpInterceptor) }]) - .name; + .name); /***/ }) diff --git a/package-lock.json b/package-lock.json index e4a734f..766c5c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "angular-http-etag", - "version": "2.0.17", + "version": "2.0.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3320f7f..bca6341 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-http-etag", - "version": "2.0.17", + "version": "2.0.18", "description": "Angular module for easy ETag-based caching of $http responses", "homepage": "https://github.com/shaungrady/angular-http-etag", "author": "Shaun Grady (http://shaungrady.com)", diff --git a/release/angular-http-etag.js b/release/angular-http-etag.js index 8c1aa89..7414c20 100644 --- a/release/angular-http-etag.js +++ b/release/angular-http-etag.js @@ -1,6 +1,6 @@ /** - * angular-http-etag v2.0.17 - * Shaun Grady (http://shaungrady.com), 2017 + * angular-http-etag v2.0.18 + * Shaun Grady (http://shaungrady.com), 2018 * https://github.com/shaungrady/angular-http-etag * Module Format: Universal Module Definition * License: MIT @@ -15,56 +15,73 @@ exports["http-etag"] = factory(require("angular")); else root["http-etag"] = factory(root["angular"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; - +/******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { - +/******/ /******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) +/******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; - +/******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; - +/******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - +/******/ /******/ // Flag the module as loaded /******/ module.l = true; - +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } - - +/******/ +/******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; - +/******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; - -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; - +/******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; - +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -73,488 +90,1174 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; - +/******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - +/******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; - +/******/ +/******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 12); +/******/ return __webpack_require__(__webpack_require__.s = 6); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_0__; +module.exports = __WEBPACK_EXTERNAL_MODULE__0__; /***/ }), /* 1 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +module.exports = function (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = xs[i]; + if (hasOwn.call(xs, i)) res.push(f(x, i, xs)); + } + return res; +}; +var hasOwn = Object.prototype.hasOwnProperty; -exports.__esModule = true; -var toString = Object.prototype.toString; -var isBuffer = typeof Buffer !== 'undefined' ? function isBuffer(obj) { - return Buffer.isBuffer(obj); -} : function isBuffer() { - // always return false in browsers - return false; -}; +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { -var getKeys = typeof Object.keys === 'function' ? function getKeys(obj) { - return Object.keys(obj); -} : function getKeys(obj) { - var objType = typeof obj; +/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; - if (obj === null || objType !== 'function' && objType !== 'object') { - throw new TypeError('obj must be an Object'); +/* ! + * type-detect + * Copyright(c) 2013 jake luer + * MIT Licensed + */ +var promiseExists = typeof Promise === 'function'; + +/* eslint-disable no-undef */ +var globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist + +var symbolExists = typeof Symbol !== 'undefined'; +var mapExists = typeof Map !== 'undefined'; +var setExists = typeof Set !== 'undefined'; +var weakMapExists = typeof WeakMap !== 'undefined'; +var weakSetExists = typeof WeakSet !== 'undefined'; +var dataViewExists = typeof DataView !== 'undefined'; +var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined'; +var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined'; +var setEntriesExists = setExists && typeof Set.prototype.entries === 'function'; +var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function'; +var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries()); +var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries()); +var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function'; +var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); +var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function'; +var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]()); +var toStringLeftSliceLength = 8; +var toStringRightSliceLength = -1; +/** + * ### typeOf (obj) + * + * Uses `Object.prototype.toString` to determine the type of an object, + * normalising behaviour across engine versions & well optimised. + * + * @param {Mixed} object + * @return {String} object type + * @api public + */ +function typeDetect(obj) { + /* ! Speed optimisation + * Pre: + * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled) + * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled) + * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled) + * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled) + * function x 2,556,769 ops/sec ±1.73% (77 runs sampled) + * Post: + * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled) + * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled) + * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled) + * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled) + * function x 31,296,870 ops/sec ±0.96% (83 runs sampled) + */ + var typeofObj = typeof obj; + if (typeofObj !== 'object') { + return typeofObj; } - var resultKeys = [], - key = void 0; - - for (key in obj) { - Object.prototype.hasOwnProperty.call(obj, key) && resultKeys.push(key); + /* ! Speed optimisation + * Pre: + * null x 28,645,765 ops/sec ±1.17% (82 runs sampled) + * Post: + * null x 36,428,962 ops/sec ±1.37% (84 runs sampled) + */ + if (obj === null) { + return 'null'; } - return resultKeys; -}; - -var getSymbols = typeof Symbol === 'function' ? function getSymbols(obj) { - return Object.getOwnPropertySymbols(obj); -} : function getSymbols() { - // always return empty Array when Symbol is not supported - return []; -}; - -// NOTE: -// -// Array.prototype.indexOf is cannot find NaN (in Chrome) -// Array.prototype.includes is can find NaN (in Chrome) -// -// this function can find NaN, because use SameValue algorithm -function indexOf(array, s) { - if (toString.call(array) !== '[object Array]') { - throw new TypeError('array must be an Array'); + /* ! Spec Conformance + * Test: `Object.prototype.toString.call(window)`` + * - Node === "[object global]" + * - Chrome === "[object global]" + * - Firefox === "[object Window]" + * - PhantomJS === "[object Window]" + * - Safari === "[object Window]" + * - IE 11 === "[object Window]" + * - IE Edge === "[object Window]" + * Test: `Object.prototype.toString.call(this)`` + * - Chrome Worker === "[object global]" + * - Firefox Worker === "[object DedicatedWorkerGlobalScope]" + * - Safari Worker === "[object DedicatedWorkerGlobalScope]" + * - IE 11 Worker === "[object WorkerGlobalScope]" + * - IE Edge Worker === "[object WorkerGlobalScope]" + */ + if (obj === globalObject) { + return 'global'; } - var i = void 0, - len = void 0, - value = void 0; - - for (i = 0, len = array.length; i < len; ++i) { - value = array[i]; - - // NOTE: - // - // it is SameValue algorithm - // http://stackoverflow.com/questions/27144277/comparing-a-variable-with-itself - // - // eslint-disable-next-line no-self-compare - if (value === s || value !== value && s !== s) { - return i; - } + /* ! Speed optimisation + * Pre: + * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled) + * Post: + * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled) + */ + if ( + Array.isArray(obj) && + (symbolToStringTagExists === false || !(Symbol.toStringTag in obj)) + ) { + return 'Array'; } - return -1; -} - -exports.getKeys = getKeys; -exports.getSymbols = getSymbols; -exports.indexOf = indexOf; -exports.isBuffer = isBuffer; - -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); - - -/* harmony default export */ __webpack_exports__["a"] = cacheAdaptersConfig; - -cacheAdaptersConfig.$inject = ['httpEtagProvider'] + // Not caching existence of `window` and related properties due to potential + // for `window` to be unset before tests in quasi-browser environments. + if (typeof window === 'object' && window !== null) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/browsers.html#location) + * WhatWG HTML$7.7.3 - The `Location` interface + * Test: `Object.prototype.toString.call(window.location)`` + * - IE <=11 === "[object Object]" + * - IE Edge <=13 === "[object Object]" + */ + if (typeof window.location === 'object' && obj === window.location) { + return 'Location'; + } -function cacheAdaptersConfig (httpEtagProvider) { - httpEtagProvider + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#document) + * WhatWG HTML$3.1.1 - The `Document` object + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * WhatWG HTML states: + * > For historical reasons, Window objects must also have a + * > writable, configurable, non-enumerable property named + * > HTMLDocument whose value is the Document interface object. + * Test: `Object.prototype.toString.call(document)`` + * - Chrome === "[object HTMLDocument]" + * - Firefox === "[object HTMLDocument]" + * - Safari === "[object HTMLDocument]" + * - IE <=10 === "[object Document]" + * - IE 11 === "[object HTMLDocument]" + * - IE Edge <=13 === "[object HTMLDocument]" + */ + if (typeof window.document === 'object' && obj === window.document) { + return 'Document'; + } - .defineCacheServiceAdapter('$cacheFactory', { - config: { - storesDeepCopies: false - }, - methods: { - createCache: function createCache ($cacheFactory, cacheId, options) { - $cacheFactory(cacheId, options) - }, - getCache: function getCache ($cacheFactory, cacheId) { - return $cacheFactory.get(cacheId) - }, - setItem: function setItem (cache, itemKey, value) { - cache.put(itemKey, value) - }, - getItem: function getItem (cache, itemKey) { - return cache.get(itemKey) - }, - removeItem: function removeItem (cache, itemKey) { - cache.remove(itemKey) - }, - removeAllItems: function removeAllItems (cache, itemKey) { - cache.removeAll() - } + if (typeof window.navigator === 'object') { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray + * Test: `Object.prototype.toString.call(navigator.mimeTypes)`` + * - IE <=10 === "[object MSMimeTypesCollection]" + */ + if (typeof window.navigator.mimeTypes === 'object' && + obj === window.navigator.mimeTypes) { + return 'MimeTypeArray'; } - }) - - .defineCacheServiceAdapter('localStorage', { - config: { - storesDeepCopies: true - }, - methods: { - createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop, - getCache: function getCache (localStorage, cacheId) { - return cacheId - }, - setItem: function setItem (cacheId, itemKey, value) { - try { - itemKey = cacheId + ':' + itemKey - localStorage.setItem(itemKey, JSON.stringify(value)) - } catch (e) { - - } - }, - getItem: function getItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - return JSON.parse(localStorage.getItem(itemKey)) - }, - removeItem: function removeItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - localStorage.removeItem(itemKey) - }, - removeAllItems: function removeAllItems (cacheId, itemKey) { - var keyPrefix = cacheId + ':' - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(localStorage, function (value, key) { - if (key.indexOf(keyPrefix) === 0) { - localStorage.removeItem(key) - } - }) - } + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray + * Test: `Object.prototype.toString.call(navigator.plugins)`` + * - IE <=10 === "[object MSPluginsCollection]" + */ + if (typeof window.navigator.plugins === 'object' && + obj === window.navigator.plugins) { + return 'PluginArray'; } - }) + } - .defineCacheServiceAdapter('sessionStorage', { - config: { - storesDeepCopies: true - }, - methods: { - createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop, - getCache: function getCache (sessionStorage, cacheId) { - return cacheId - }, - setItem: function setItem (cacheId, itemKey, value) { - try { - itemKey = cacheId + ':' + itemKey - sessionStorage.setItem(itemKey, JSON.stringify(value)) - } catch (e) { + if ((typeof window.HTMLElement === 'function' || + typeof window.HTMLElement === 'object') && + obj instanceof window.HTMLElement) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement` + * Test: `Object.prototype.toString.call(document.createElement('blockquote'))`` + * - IE <=10 === "[object HTMLBlockElement]" + */ + if (obj.tagName === 'BLOCKQUOTE') { + return 'HTMLQuoteElement'; + } - } - }, - getItem: function getItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - return JSON.parse(sessionStorage.getItem(itemKey)) - }, - removeItem: function removeItem (cacheId, itemKey) { - itemKey = cacheId + ':' + itemKey - sessionStorage.removeItem(itemKey) - }, - removeAllItems: function removeAllItems (cacheId, itemKey) { - var keyPrefix = cacheId + ':' + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltabledatacellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('td')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TD') { + return 'HTMLTableDataCellElement'; + } - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(sessionStorage, function (value, key) { - if (key.indexOf(keyPrefix) === 0) { - sessionStorage.removeItem(key) - } - }) - } + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltableheadercellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('th')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TH') { + return 'HTMLTableHeaderCellElement'; } - }) -} + } + } + /* ! Speed optimisation + * Pre: + * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled) + * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled) + * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled) + * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled) + * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled) + * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled) + * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled) + * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled) + * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled) + * Post: + * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled) + * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled) + * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled) + * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled) + * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled) + * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled) + * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled) + * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled) + * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled) + */ + var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]); + if (typeof stringTag === 'string') { + return stringTag; + } -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var objPrototype = Object.getPrototypeOf(obj); + /* ! Speed optimisation + * Pre: + * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled) + * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled) + * Post: + * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled) + * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled) + */ + if (objPrototype === RegExp.prototype) { + return 'RegExp'; + } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys__ = __webpack_require__(10); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_object_keys__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map__ = __webpack_require__(6); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_array_map__); + /* ! Speed optimisation + * Pre: + * date x 2,130,074 ops/sec ±4.42% (68 runs sampled) + * Post: + * date x 3,953,779 ops/sec ±1.35% (77 runs sampled) + */ + if (objPrototype === Date.prototype) { + return 'Date'; + } + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag) + * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise": + * Test: `Object.prototype.toString.call(Promise.resolve())`` + * - Chrome <=47 === "[object Object]" + * - Edge <=20 === "[object Object]" + * - Firefox 29-Latest === "[object Promise]" + * - Safari 7.1-Latest === "[object Promise]" + */ + if (promiseExists && objPrototype === Promise.prototype) { + return 'Promise'; + } + /* ! Speed optimisation + * Pre: + * set x 2,222,186 ops/sec ±1.31% (82 runs sampled) + * Post: + * set x 4,545,879 ops/sec ±1.13% (83 runs sampled) + */ + if (setExists && objPrototype === Set.prototype) { + return 'Set'; + } + /* ! Speed optimisation + * Pre: + * map x 2,396,842 ops/sec ±1.59% (81 runs sampled) + * Post: + * map x 4,183,945 ops/sec ±6.59% (82 runs sampled) + */ + if (mapExists && objPrototype === Map.prototype) { + return 'Map'; + } -/* harmony default export */ __webpack_exports__["a"] = httpEtagHttpDecorator; + /* ! Speed optimisation + * Pre: + * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled) + * Post: + * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled) + */ + if (weakSetExists && objPrototype === WeakSet.prototype) { + return 'WeakSet'; + } -httpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag'] + /* ! Speed optimisation + * Pre: + * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled) + * Post: + * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled) + */ + if (weakMapExists && objPrototype === WeakMap.prototype) { + return 'WeakMap'; + } -function httpEtagHttpDecorator ($delegate, httpEtag) { - var $http = $delegate - var cachableHttpMethods = [ - 'GET', - 'JSONP' - ] + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag) + * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView": + * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))`` + * - Edge <=13 === "[object Object]" + */ + if (dataViewExists && objPrototype === DataView.prototype) { + return 'DataView'; + } - function $httpDecorator (httpConfig) { - var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions() - var hasConfig = !!httpConfig.etagCache - var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0 - var isCachable = hasConfig && isCacheableMethod - var httpPromise + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag) + * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator": + * Test: `Object.prototype.toString.call(new Map().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (mapExists && objPrototype === mapIteratorPrototype) { + return 'Map Iterator'; + } - if (isCachable) { - var etagCacheConfig = processHttpConfigEtagValue(httpConfig) - if (etagCacheConfig) { - var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey) - if (!itemCache) throw new Error('No defined ETag caches match specified cache ID') + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag) + * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator": + * Test: `Object.prototype.toString.call(new Set().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (setExists && objPrototype === setIteratorPrototype) { + return 'Set Iterator'; + } - var cacheInfo = itemCache.info() - var rawCacheData = itemCache.$get() - var cachedEtag = rawCacheData && rawCacheData.etagHeader - var cachedResponse = cachedEtag && rawCacheData.responseData + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag) + * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator": + * Test: `Object.prototype.toString.call([][Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { + return 'Array Iterator'; + } - // Allow easy access to cache in interceptor - httpConfig.$$_itemCache = itemCache + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag) + * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator": + * Test: `Object.prototype.toString.call(''[Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (stringIteratorExists && objPrototype === stringIteratorPrototype) { + return 'String Iterator'; + } - if (cachedEtag) { - httpConfig.headers = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, httpConfig.headers, { - 'If-None-Match': cachedEtag - }) - } - } - } + /* ! Speed optimisation + * Pre: + * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled) + * Post: + * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled) + */ + if (objPrototype === null) { + return 'Object'; + } - httpPromise = $http.apply($http, arguments) - httpEtagPromiseFactory(httpPromise) + return Object + .prototype + .toString + .call(obj) + .slice(toStringLeftSliceLength, toStringRightSliceLength); +} - function httpEtagPromiseFactory (httpPromise) { - var then = httpPromise.then - var success = httpPromise.success +return typeDetect; - if (useLegacyPromiseExtensions) { - httpPromise.cached = function httpEtagPromiseCached (callback) { - if (rawCacheData && cacheInfo.cacheResponseData) { - callback(cachedResponse, 'cached', undefined, httpConfig, itemCache) - } - return httpPromise - } - } else { - httpPromise.cached = function deprecatedEtagPromiseCached () { - throw new Error('The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.') - } - } +}))); - httpPromise.ifCached = function httpEtagPromiseIfCached (callback) { - if (rawCacheData && cacheInfo.cacheResponseData) { - callback({ - data: cachedResponse, - status: 'cached', - headers: undefined, - config: httpConfig - }, itemCache) - } - return httpPromise - } +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) - httpPromise.then = function httpEtagThenWrapper (successCallback, errorCallback, progressBackCallback) { - var thenPromise = then.apply(httpPromise, [ - successCallback ? httpEtagSuccessWrapper : undefined, - errorCallback ? httpEtagErrorWrapper : undefined, - progressBackCallback - ]) +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { - function httpEtagSuccessWrapper (response) { - return successCallback(response, itemCache) - } +"use strict"; - function httpEtagErrorWrapper (response) { - return errorCallback(response, itemCache) - } - - return httpEtagPromiseFactory(thenPromise) - } - if (useLegacyPromiseExtensions && itemCache) { - httpPromise.success = function httpEtagPromiseSuccess (callback) { - var partializedCallback = partial(callback, undefined, undefined, undefined, undefined, itemCache) - return success.apply(httpPromise, [partializedCallback]) - } - } +// modified from https://github.com/es-shims/es5-shim +var has = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var slice = Array.prototype.slice; +var isArgs = __webpack_require__(5); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); +var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); +var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' +]; +var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; +}; +var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true +}; +var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; +}()); +var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } +}; - return httpPromise - } +var keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; - return httpPromise - } + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } - // Decorate the cachable shortcut methods, too - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cachableHttpMethods, function (httpMethod) { - var method = httpMethod.toLowerCase() - $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) { - config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, config, { - method: httpMethod, - url: url - }) + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } - return $httpDecorator.call($http, config) - } - }) + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } - // Copy over all other properties and methods - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach($http, function copyHttpPropertyToDectorator (value, key) { - if (!$httpDecorator[key]) $httpDecorator[key] = value - }) + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - /** - * HELPERS - */ + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; +}; - function processHttpConfigEtagValue (httpConfig) { - var etagValue = httpConfig.etagCache - var etagValueType = typeof etagValue - var etagCacheConfig = {} +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + return (Object.keys(arguments) || '').length === 2; + }(1, 2)); + if (!keysWorksWithArguments) { + var originalKeys = Object.keys; + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } else { + return originalKeys(object); + } + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; - // Evaluate function first - if (etagValueType === 'function') { - etagValue = etagValue(httpConfig) - etagValueType = typeof etagValue - } +module.exports = keysShim; - // Plain, cache, or itemCache objects - if (etagValueType === 'object') { - var id, itemKey - if (etagValue.isCache) { - id = etagValue.info().id - itemKey = generateCacheItemKey(httpConfig) - } else if (etagValue.isItemCache) { - id = etagValue.info().id - itemKey = etagValue.info().itemKey - } else { - id = etagValue.id - itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig) - } +/***/ }), +/* 4 */ +/***/ (function(module, exports) { - etagCacheConfig.id = id - etagCacheConfig.itemKey = itemKey - } else if (etagValueType === 'string') { - etagCacheConfig.id = etagValue - etagCacheConfig.itemKey = generateCacheItemKey(httpConfig) - } else if (etagValue === true) { - // Undefined cacheId will use the default cacheId as defined in provider - etagCacheConfig.itemKey = generateCacheItemKey(httpConfig) - } else return - return etagCacheConfig - } +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1, eval)("this"); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; - function generateCacheItemKey (httpConfig) { - var url = httpConfig.url - var params = stringifyParams(httpConfig.params) - var joiner = ((params && url.indexOf('?') > 0) ? '&' : '?') - var queryString = (params && joiner + params) || '' - return url + queryString - } - // Based on npm package "query-string" - function stringifyParams (obj) { - return obj ? __WEBPACK_IMPORTED_MODULE_2_array_map___default()(__WEBPACK_IMPORTED_MODULE_1_object_keys___default()(obj).sort(), function (key) { - var val = obj[key] +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { - if (__WEBPACK_IMPORTED_MODULE_0_angular___default.a.isArray(val)) { - return __WEBPACK_IMPORTED_MODULE_2_array_map___default()(val.sort(), function (val2) { - return encodeURIComponent(key) + '=' + encodeURIComponent(val2) - }).join('&') - } +"use strict"; - return encodeURIComponent(key) + '=' + encodeURIComponent(val) - }).join('&') : '' - } - // http://ejohn.org/blog/partial-functions-in-javascript/ - function partial (fn) { - var args = Array.prototype.slice.call(arguments, 1) - return function () { - var arg = 0 - for (var i = 0; i < args.length && arg < arguments.length; i++) { - if (args[i] === undefined) args[i] = arguments[arg++] - } - return fn.apply(this, args) - } - } +var toStr = Object.prototype.toString; - return $httpDecorator -} +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; /***/ }), -/* 4 */ +/* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony default export */ __webpack_exports__["a"] = httpEtagInterceptorFactory; +__webpack_require__.r(__webpack_exports__); + +// EXTERNAL MODULE: external "angular" +var external_angular_ = __webpack_require__(0); +var external_angular_default = /*#__PURE__*/__webpack_require__.n(external_angular_); + +// EXTERNAL MODULE: ./node_modules/type-detect/type-detect.js +var type_detect = __webpack_require__(2); + +// CONCATENATED MODULE: ./node_modules/deepcopy/src/buffer.mjs +const isBufferExists = typeof Buffer !== 'undefined'; +const isBufferFromExists = isBufferExists && typeof Buffer.from !== 'undefined'; + +const isBuffer = isBufferExists + ? /** + * is value is Buffer? + * + * @param {*} value + * @return {boolean} + */ + function isBuffer(value) { + return Buffer.isBuffer(value); + } + : /** + * return false + * + * NOTE: for Buffer unsupported + * + * @return {boolean} + */ + function isBuffer() { + return false; + }; + +const buffer_copy = isBufferFromExists + ? /** + * copy Buffer + * + * @param {Buffer} value + * @return {Buffer} + */ + function copy(value) { + return Buffer.from(value); + } + : isBufferExists + ? /** + * copy Buffer + * + * NOTE: for old node.js + * + * @param {Buffer} value + * @return {Buffer} + */ + function copy(value) { + return new Buffer(value); + } + : /** + * shallow copy + * + * NOTE: for Buffer unsupported + * + * @param {*} + * @return {*} + */ + function copy(value) { + return value; + }; -function httpEtagInterceptorFactory () { - function responseInterceptor (response) { - var itemCache = response.config.$$_itemCache +// CONCATENATED MODULE: ./node_modules/deepcopy/src/detector.mjs - if (itemCache) { - var cacheInfo = itemCache.info() - var cacheResponseData = cacheInfo.cacheResponseData - var etag = response.headers().etag - var cacheData = {} - if (etag) { - cacheData.etagHeader = etag - if (cacheResponseData) cacheData.responseData = response.data - itemCache.$set(cacheData) - } - delete response.config.$$_itemCache + +/** + * detect type of value + * + * @param {*} value + * @return {string} + */ +function detectType(value) { + // NOTE: isBuffer must execute before type-detect, + // because type-detect returns 'Uint8Array'. + if (isBuffer(value)) { + return 'Buffer'; + } + + return type_detect(value); +} + +// CONCATENATED MODULE: ./node_modules/deepcopy/src/collection.mjs + + +/** + * collection types + */ +const collectionTypeSet = new Set([ + 'Arguments', + 'Array', + 'Map', + 'Object', + 'Set' +]); + +/** + * get value from collection + * + * @param {Array|Object|Map|Set} collection + * @param {string|number|symbol} key + * @param {string} [type=null] + * @return {*} + */ +function get(collection, key, type = null) { + const valueType = type || detectType(collection); + + switch (valueType) { + case 'Arguments': + case 'Array': + case 'Object': + return collection[key]; + case 'Map': + return collection.get(key); + case 'Set': + // NOTE: Set.prototype.keys is alias of Set.prototype.values + // it means key is equals value + return key; + default: + } +} + +/** + * check to type string is collection + * + * @param {string} type + */ +function isCollection(type) { + return collectionTypeSet.has(type); +} + +/** + * set value to collection + * + * @param {Array|Object|Map|Set} collection + * @param {string|number|symbol} key + * @param {*} value + * @param {string} [type=null] + * @return {Array|Object|Map|Set} + */ +function set(collection, key, value, type = null) { + const valueType = type || detectType(collection); + + switch (valueType) { + case 'Arguments': + case 'Array': + case 'Object': + collection[key] = value; + break; + case 'Map': + collection.set(key, value); + break; + case 'Set': + collection.add(value); + break; + default: + } + + return collection; +} + +// CONCATENATED MODULE: ./node_modules/deepcopy/src/copy_map.mjs + + +const globalObject = Function('return this')(); + +/** + * copy ArrayBuffer + * + * @param {ArrayBuffer} value + * @return {ArrayBuffer} + */ +function copyArrayBuffer(value) { + return value.slice(0); +} + +/** + * copy Boolean + * + * @param {Boolean} value + * @return {Boolean} + */ +function copyBoolean(value) { + return new Boolean(value.valueOf()); +} + +/** + * copy DataView + * + * @param {DataView} value + * @return {DataView} + */ +function copyDataView(value) { + // TODO: copy ArrayBuffer? + return new DataView(value.buffer); +} + +/** + * copy Buffer + * + * @param {Buffer} value + * @return {Buffer} + */ +function copyBuffer(value) { + return buffer_copy(value); +} + +/** + * copy Date + * + * @param {Date} value + * @return {Date} + */ +function copyDate(value) { + return new Date(value.getTime()); +} + +/** + * copy Number + * + * @param {Number} value + * @return {Number} + */ +function copyNumber(value) { + return new Number(value); +} + +/** + * copy RegExp + * + * @param {RegExp} value + * @return {RegExp} + */ +function copyRegExp(value) { + return new RegExp(value.source || '(?:)', value.flags); +} + +/** + * copy String + * + * @param {String} value + * @return {String} + */ +function copyString(value) { + return new String(value); +} + +/** + * copy TypedArray + * + * @param {*} value + * @return {*} + */ +function copyTypedArray(value, type) { + return globalObject[type].from(value); +} + +/** + * shallow copy + * + * @param {*} value + * @return {*} + */ +function shallowCopy(value) { + return value; +} + +/** + * get empty Array + * + * @return {Array} + */ +function getEmptyArray() { + return []; +} + +/** + * get empty Map + * + * @return {Map} + */ +function getEmptyMap() { + return new Map(); +} + +/** + * get empty Object + * + * @return {Object} + */ +function getEmptyObject() { + return {}; +} + +/** + * get empty Set + * + * @return {Set} + */ +function getEmptySet() { + return new Set(); +} + +/* harmony default export */ var copy_map = (new Map([ + // deep copy + ['ArrayBuffer', copyArrayBuffer], + ['Boolean', copyBoolean], + ['Buffer', copyBuffer], + ['DataView', copyDataView], + ['Date', copyDate], + ['Number', copyNumber], + ['RegExp', copyRegExp], + ['String', copyString], + + // typed arrays + // TODO: pass bound function + ['Float32Array', copyTypedArray], + ['Float64Array', copyTypedArray], + ['Int16Array', copyTypedArray], + ['Int32Array', copyTypedArray], + ['Int8Array', copyTypedArray], + ['Uint16Array', copyTypedArray], + ['Uint32Array', copyTypedArray], + ['Uint8Array', copyTypedArray], + ['Uint8ClampedArray', copyTypedArray], + + // shallow copy + ['Array Iterator', shallowCopy], + ['Map Iterator', shallowCopy], + ['Promise', shallowCopy], + ['Set Iterator', shallowCopy], + ['String Iterator', shallowCopy], + ['function', shallowCopy], + ['global', shallowCopy], + // NOTE: WeakMap and WeakSet cannot get entries + ['WeakMap', shallowCopy], + ['WeakSet', shallowCopy], + + // primitives + ['boolean', shallowCopy], + ['null', shallowCopy], + ['number', shallowCopy], + ['string', shallowCopy], + ['symbol', shallowCopy], + ['undefined', shallowCopy], + + // collections + // NOTE: return empty value, because recursively copy later. + ['Arguments', getEmptyArray], + ['Array', getEmptyArray], + ['Map', getEmptyMap], + ['Object', getEmptyObject], + ['Set', getEmptySet] + + // NOTE: type-detect returns following types + // 'Location' + // 'Document' + // 'MimeTypeArray' + // 'PluginArray' + // 'HTMLQuoteElement' + // 'HTMLTableDataCellElement' + // 'HTMLTableHeaderCellElement' + + // TODO: is type-detect never return 'object'? + // 'object' +])); + +// CONCATENATED MODULE: ./node_modules/deepcopy/src/copier.mjs + + + +/** + * no operation + */ +function noop() {} + +/** + * copy value + * + * @param {*} value + * @param {string} [type=null] + * @param {Function} [customizer=noop] + * @return {*} + */ +function copier_copy(value, type = null, customizer = noop) { + if (arguments.length === 2 && typeof type === 'function') { + customizer = type; + type = null; + } + + const valueType = type || detectType(value); + const copyFunction = copy_map.get(valueType); + + if (valueType === 'Object') { + const result = customizer(value, valueType); + + if (result !== undefined) { + return result; } + } - return response + // NOTE: TypedArray needs pass type to argument + return copyFunction ? copyFunction(value, valueType) : value; +} + +// CONCATENATED MODULE: ./node_modules/deepcopy/src/index.mjs + + + + +/** + * deepcopy function + * + * @param {*} value + * @param {Object|Function} [options] + * @return {*} + */ +function deepcopy(value, options = {}) { + if (typeof options === 'function') { + options = { + customizer: options + }; } - return { - response: responseInterceptor + const { + // TODO: before/after customizer + customizer + // TODO: max depth + // depth = Infinity, + } = options; + + const valueType = detectType(value); + + if (!isCollection(valueType)) { + return recursiveCopy(value, null, null, null, customizer); } + + const copiedValue = copier_copy(value, valueType, customizer); + + const references = new WeakMap([[value, copiedValue]]); + const visited = new WeakSet([value]); + + return recursiveCopy(value, copiedValue, references, visited, customizer); } +/** + * recursively copy + * + * @param {*} value target value + * @param {*} clone clone of value + * @param {WeakMap} references visited references of clone + * @param {WeakSet} visited visited references of value + * @param {Function} customizer user customize function + * @return {*} + */ +function recursiveCopy(value, clone, references, visited, customizer) { + const type = detectType(value); + const copiedValue = copier_copy(value, type); -/***/ }), -/* 5 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // return if not a collection value + if (!isCollection(type)) { + return copiedValue; + } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_deepcopy__); + let keys; + + switch (type) { + case 'Arguments': + case 'Array': + keys = Object.keys(value); + break; + case 'Object': + keys = Object.keys(value); + keys.push(...Object.getOwnPropertySymbols(value)); + break; + case 'Map': + case 'Set': + keys = value.keys(); + break; + default: + } + + // walk within collection with iterator + for (let collectionKey of keys) { + const collectionValue = get(value, collectionKey, type); + + if (visited.has(collectionValue)) { + // for [Circular] + set(clone, collectionKey, references.get(collectionValue), type); + } else { + const collectionValueType = detectType(collectionValue); + const copiedCollectionValue = copier_copy(collectionValue, collectionValueType); + + // save reference if value is collection + if (isCollection(collectionValueType)) { + references.set(collectionValue, copiedCollectionValue); + visited.add(collectionValue); + } + + set( + clone, + collectionKey, + recursiveCopy( + collectionValue, + copiedCollectionValue, + references, + visited, + customizer + ), + type + ); + } + } + + // TODO: isSealed/isFrozen/isExtensible + + return clone; +} + +// CONCATENATED MODULE: ./node_modules/deepcopy/index.mjs + + +// CONCATENATED MODULE: ./src/service.js -/* harmony default export */ __webpack_exports__["a"] = httpEtagProvider; +/* harmony default export */ var src_service = (service_httpEtagProvider); -function httpEtagProvider () { +function service_httpEtagProvider () { var httpEtagProvider = this var serviceAdapterMethods = [ @@ -596,7 +1299,7 @@ function httpEtagProvider () { */ httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) { - defaultEtagCacheConfig = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config) + defaultEtagCacheConfig = external_angular_default.a.extend({}, defaultEtagCacheConfig, config) return httpEtagProvider } @@ -605,7 +1308,7 @@ function httpEtagProvider () { } httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) { - config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId }) + config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId }) cacheDefinitions[cacheId] = config return httpEtagProvider } @@ -613,7 +1316,7 @@ function httpEtagProvider () { httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) { if (!config) throw new Error('Missing cache service adapter configuration') if (!config.methods) throw new Error('Missing cache service adapter configuration methods') - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(requiredAdapterMethods, function (method) { + external_angular_default.a.forEach(requiredAdapterMethods, function (method) { if (typeof config.methods[method] !== 'function') { throw new Error('Expected cache service adapter method "' + method + '" to be a function') } @@ -646,17 +1349,17 @@ function httpEtagProvider () { if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId) // Find/inject cache service and create adapted versions - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) { + external_angular_default.a.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) { var service = services[serviceName] = window[serviceName] || $injector.get(serviceName) var adaptedService = adaptedServices[serviceName] = {} - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(serviceAdapterMethods, function (method) { - adaptedService[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, adapter.methods[method], service) + external_angular_default.a.forEach(serviceAdapterMethods, function (method) { + adaptedService[method] = external_angular_default.a.bind({}, adapter.methods[method], service) }) }) // Instantiate caches and create adapted versions - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) { + external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) { adaptedServices[config.cacheService].createCache(cacheId, config) var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId) var adaptedCache = adaptedCaches[cacheId] = {} @@ -664,10 +1367,10 @@ function httpEtagProvider () { var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy var copy = function (value) { - return deepCopy ? __WEBPACK_IMPORTED_MODULE_1_deepcopy___default()(value) : value + return deepCopy ? deepcopy(value) : value } - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapterMethods, function (method) { + external_angular_default.a.forEach(cacheAdapterMethods, function (method) { var adapterMethod = cacheAdapters[config.cacheService].methods[method] var wrappedMethod var wrappedRawMethod @@ -703,9 +1406,9 @@ function httpEtagProvider () { } } - adaptedCache[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, (wrappedMethod || adapterMethod), cache) + adaptedCache[method] = external_angular_default.a.bind({}, (wrappedMethod || adapterMethod), cache) if (wrappedRawMethod) { - adaptedCache['$' + method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, wrappedRawMethod, cache) + adaptedCache['$' + method] = external_angular_default.a.bind({}, wrappedRawMethod, cache) } }) @@ -750,8 +1453,8 @@ function httpEtagProvider () { ['remove', 'removeItem'] ] - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) { - itemCache[methods[0]] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, cache[methods[1]], itemKey) + external_angular_default.a.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) { + itemCache[methods[0]] = external_angular_default.a.bind({}, cache[methods[1]], itemKey) }) itemCache.info = function itemCacheInfo () { @@ -766,7 +1469,7 @@ function httpEtagProvider () { } httpEtagService.purgeCaches = function httpEtagPurgeCaches () { - __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(adaptedCaches, function (cache) { + external_angular_default.a.forEach(adaptedCaches, function (cache) { cache.removeAllItems() }) } @@ -781,481 +1484,384 @@ function httpEtagProvider () { }] } +// EXTERNAL MODULE: ./node_modules/object-keys/index.js +var object_keys = __webpack_require__(3); +var object_keys_default = /*#__PURE__*/__webpack_require__.n(object_keys); -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -module.exports = function (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = xs[i]; - if (hasOwn.call(xs, i)) res.push(f(x, i, xs)); - } - return res; -}; - -var hasOwn = Object.prototype.hasOwnProperty; +// EXTERNAL MODULE: ./node_modules/array-map/index.js +var array_map = __webpack_require__(1); +var array_map_default = /*#__PURE__*/__webpack_require__.n(array_map); +// CONCATENATED MODULE: ./src/httpDecorator.js -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(9); -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { +/* harmony default export */ var httpDecorator = (httpEtagHttpDecorator); -"use strict"; +httpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag'] +function httpEtagHttpDecorator ($delegate, httpEtag) { + var $http = $delegate + var cachableHttpMethods = [ + 'GET', + 'JSONP' + ] -exports.__esModule = true; -exports.copyValue = exports.copyCollection = exports.copy = void 0; + function $httpDecorator (httpConfig) { + var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions() + var hasConfig = !!httpConfig.etagCache + var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0 + var isCachable = hasConfig && isCacheableMethod + var httpPromise -var _polyfill = __webpack_require__(1); + if (isCachable) { + var etagCacheConfig = processHttpConfigEtagValue(httpConfig) + if (etagCacheConfig) { + var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey) + if (!itemCache) throw new Error('No defined ETag caches match specified cache ID') -var toString = Object.prototype.toString; + var cacheInfo = itemCache.info() + var rawCacheData = itemCache.$get() + var cachedEtag = rawCacheData && rawCacheData.etagHeader + var cachedResponse = cachedEtag && rawCacheData.responseData -function copy(target, customizer) { - var resultValue = copyValue(target); + // Allow easy access to cache in interceptor + httpConfig.$$_itemCache = itemCache - if (resultValue !== null) { - return resultValue; - } + if (cachedEtag) { + httpConfig.headers = external_angular_default.a.extend({}, httpConfig.headers, { + 'If-None-Match': cachedEtag + }) + } + } + } - return copyCollection(target, customizer); -} + httpPromise = $http.apply($http, arguments) + httpEtagPromiseFactory(httpPromise) -function copyCollection(target, customizer) { - if (typeof customizer !== 'function') { - throw new TypeError('customizer is must be a Function'); - } + function httpEtagPromiseFactory (httpPromise) { + var then = httpPromise.then + var success = httpPromise.success - if (typeof target === 'function') { - var source = String(target); - - // NOTE: - // - // https://gist.github.com/jdalton/5e34d890105aca44399f - // - // - https://gist.github.com/jdalton/5e34d890105aca44399f#gistcomment-1283831 - // - http://es5.github.io/#x15 - // - // native functions does not have prototype: - // - // Object.toString.prototype // => undefined - // (function() {}).prototype // => {} - // - // but cannot detect native constructor: - // - // typeof Object // => 'function' - // Object.prototype // => {} - // - // and cannot detect null binded function: - // - // String(Math.abs) - // // => 'function abs() { [native code] }' - // - // Firefox, Safari: - // String((function abs() {}).bind(null)) - // // => 'function abs() { [native code] }' - // - // Chrome: - // String((function abs() {}).bind(null)) - // // => 'function () { [native code] }' - if (/^\s*function\s*\S*\([^\)]*\)\s*{\s*\[native code\]\s*}/.test(source)) { - // native function - return target; - } else { - // user defined function - return new Function('return ' + String(source))(); - } - } + if (useLegacyPromiseExtensions) { + httpPromise.cached = function httpEtagPromiseCached (callback) { + if (rawCacheData && cacheInfo.cacheResponseData) { + callback(cachedResponse, 'cached', undefined, httpConfig, itemCache) + } + return httpPromise + } + } else { + httpPromise.cached = function deprecatedEtagPromiseCached () { + throw new Error('The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.') + } + } - var targetClass = toString.call(target); + httpPromise.ifCached = function httpEtagPromiseIfCached (callback) { + if (rawCacheData && cacheInfo.cacheResponseData) { + // We're simply mimicking the Angular API here, so... sorry, Standard. + // eslint-disable-next-line standard/no-callback-literal + callback({ + data: cachedResponse, + status: 'cached', + headers: undefined, + config: httpConfig + }, itemCache) + } + return httpPromise + } - if (targetClass === '[object Array]') { - return []; - } + httpPromise.then = function httpEtagThenWrapper (successCallback, errorCallback, progressBackCallback) { + var thenPromise = then.apply(httpPromise, [ + successCallback ? httpEtagSuccessWrapper : undefined, + errorCallback ? httpEtagErrorWrapper : undefined, + progressBackCallback + ]) - if (targetClass === '[object Object]' && target.constructor === Object) { - return {}; - } + function httpEtagSuccessWrapper (response) { + return successCallback(response, itemCache) + } - if (targetClass === '[object Date]') { - // NOTE: - // - // Firefox need to convert - // - // Firefox: - // var date = new Date; - // +date; // 1420909365967 - // +new Date(date); // 1420909365000 - // +new Date(+date); // 1420909365967 - // - // Chrome: - // var date = new Date; - // +date; // 1420909757913 - // +new Date(date); // 1420909757913 - // +new Date(+date); // 1420909757913 - return new Date(target.getTime()); - } + function httpEtagErrorWrapper (response) { + return errorCallback(response, itemCache) + } - if (targetClass === '[object RegExp]') { - // NOTE: - // - // Chrome, Safari: - // (new RegExp).source => "(?:)" - // - // Firefox: - // (new RegExp).source => "" - // - // Chrome, Safari, Firefox: - // String(new RegExp) => "/(?:)/" - var regexpText = String(target), - slashIndex = regexpText.lastIndexOf('/'); - - return new RegExp(regexpText.slice(1, slashIndex), regexpText.slice(slashIndex + 1)); - } + return httpEtagPromiseFactory(thenPromise) + } - if ((0, _polyfill.isBuffer)(target)) { - var buffer = new Buffer(target.length); + if (useLegacyPromiseExtensions && itemCache) { + httpPromise.success = function httpEtagPromiseSuccess (callback) { + var partializedCallback = partial(callback, undefined, undefined, undefined, undefined, itemCache) + return success.apply(httpPromise, [partializedCallback]) + } + } - target.copy(buffer); + return httpPromise + } - return buffer; + return httpPromise } - var customizerResult = customizer(target); - - if (customizerResult !== void 0) { - return customizerResult; - } - - return null; -} - -function copyValue(target) { - var targetType = typeof target; - - // copy String, Number, Boolean, undefined and Symbol - // without null and Function - if (target !== null && targetType !== 'object' && targetType !== 'function') { - return target; - } - - return null; -} - -exports.copy = copy; -exports.copyCollection = copyCollection; -exports.copyValue = copyValue; - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { + // Decorate the cachable shortcut methods, too + external_angular_default.a.forEach(cachableHttpMethods, function (httpMethod) { + var method = httpMethod.toLowerCase() + $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) { + config = external_angular_default.a.extend({}, config, { + method: httpMethod, + url: url + }) -"use strict"; + return $httpDecorator.call($http, config) + } + }) + // Copy over all other properties and methods + external_angular_default.a.forEach($http, function copyHttpPropertyToDectorator (value, key) { + if (!$httpDecorator[key]) $httpDecorator[key] = value + }) -exports.__esModule = true; + /** + * HELPERS + */ -var _copy = __webpack_require__(8); + function processHttpConfigEtagValue (httpConfig) { + var etagValue = httpConfig.etagCache + var etagValueType = typeof etagValue + var etagCacheConfig = {} -var _polyfill = __webpack_require__(1); + // Evaluate function first + if (etagValueType === 'function') { + etagValue = etagValue(httpConfig) + etagValueType = typeof etagValue + } -function defaultCustomizer(target) { - return void 0; -} + // Plain, cache, or itemCache objects + if (etagValueType === 'object') { + var id, itemKey -function deepcopy(target) { - var customizer = arguments.length <= 1 || arguments[1] === void 0 ? defaultCustomizer : arguments[1]; + if (etagValue.isCache) { + id = etagValue.info().id + itemKey = generateCacheItemKey(httpConfig) + } else if (etagValue.isItemCache) { + id = etagValue.info().id + itemKey = etagValue.info().itemKey + } else { + id = etagValue.id + itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig) + } - if (target === null) { - // copy null - return null; + etagCacheConfig.id = id + etagCacheConfig.itemKey = itemKey + } else if (etagValueType === 'string') { + etagCacheConfig.id = etagValue + etagCacheConfig.itemKey = generateCacheItemKey(httpConfig) + } else if (etagValue === true) { + // Undefined cacheId will use the default cacheId as defined in provider + etagCacheConfig.itemKey = generateCacheItemKey(httpConfig) + } else return + return etagCacheConfig } - var resultValue = (0, _copy.copyValue)(target); - - if (resultValue !== null) { - // copy some primitive types - return resultValue; + function generateCacheItemKey (httpConfig) { + var url = httpConfig.url + var params = stringifyParams(httpConfig.params) + var joiner = ((params && url.indexOf('?') > 0) ? '&' : '?') + var queryString = (params && joiner + params) || '' + return url + queryString } - var resultCollection = (0, _copy.copyCollection)(target, customizer), - clone = resultCollection !== null ? resultCollection : target; - - var visited = [target], - reference = [clone]; - - // recursively copy from collection - return recursiveCopy(target, customizer, clone, visited, reference); -} - -function recursiveCopy(target, customizer, clone, visited, reference) { - if (target === null) { - // copy null - return null; - } + // Based on npm package "query-string" + function stringifyParams (obj) { + return obj ? array_map_default()(object_keys_default()(obj).sort(), function (key) { + var val = obj[key] - var resultValue = (0, _copy.copyValue)(target); + if (external_angular_default.a.isArray(val)) { + return array_map_default()(val.sort(), function (val2) { + return encodeURIComponent(key) + '=' + encodeURIComponent(val2) + }).join('&') + } - if (resultValue !== null) { - // copy some primitive types - return resultValue; + return encodeURIComponent(key) + '=' + encodeURIComponent(val) + }).join('&') : '' } - var keys = (0, _polyfill.getKeys)(target).concat((0, _polyfill.getSymbols)(target)); - - var i = void 0, - len = void 0; - - var key = void 0, - value = void 0, - index = void 0, - resultCopy = void 0, - result = void 0, - ref = void 0; - - for (i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - value = target[key]; - index = (0, _polyfill.indexOf)(visited, value); - - resultCopy = void 0; - result = void 0; - ref = void 0; - - if (index === -1) { - resultCopy = (0, _copy.copy)(value, customizer); - result = resultCopy !== null ? resultCopy : value; - - if (value !== null && /^(?:function|object)$/.test(typeof value)) { - visited.push(value); - reference.push(result); + // http://ejohn.org/blog/partial-functions-in-javascript/ + function partial (fn) { + var args = Array.prototype.slice.call(arguments, 1) + return function () { + var arg = 0 + for (var i = 0; i < args.length && arg < arguments.length; i++) { + if (args[i] === undefined) args[i] = arguments[arg++] } - } else { - // circular reference - ref = reference[index]; + return fn.apply(this, args) } - - clone[key] = ref || recursiveCopy(value, customizer, result, visited, reference); } - return clone; + return $httpDecorator } -exports['default'] = deepcopy; -module.exports = exports['default']; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +// CONCATENATED MODULE: ./src/httpInterceptor.js +/* harmony default export */ var httpInterceptor = (httpEtagInterceptorFactory); +function httpEtagInterceptorFactory () { + function responseInterceptor (response) { + var itemCache = response.config.$$_itemCache -// modified from https://github.com/es-shims/es5-shim -var has = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var slice = Array.prototype.slice; -var isArgs = __webpack_require__(11); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); -var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); -var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' -]; -var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; -}; -var excludedKeys = { - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true -}; -var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; -}()); -var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } -}; + if (itemCache) { + var cacheInfo = itemCache.info() + var cacheResponseData = cacheInfo.cacheResponseData + var etag = response.headers().etag + var cacheData = {} -var keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; + if (etag) { + cacheData.etagHeader = etag + if (cacheResponseData) cacheData.responseData = response.data + itemCache.$set(cacheData) + } - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } + delete response.config.$$_itemCache + } - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } + return response + } - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } + return { + response: responseInterceptor + } +} - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); +// CONCATENATED MODULE: ./src/cacheServiceAdapters.js - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; -}; -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - return (Object.keys(arguments) || '').length === 2; - }(1, 2)); - if (!keysWorksWithArguments) { - var originalKeys = Object.keys; - Object.keys = function keys(object) { - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } else { - return originalKeys(object); - } - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; +/* harmony default export */ var cacheServiceAdapters = (cacheAdaptersConfig); -module.exports = keysShim; +cacheAdaptersConfig.$inject = ['httpEtagProvider'] +function cacheAdaptersConfig (httpEtagProvider) { + httpEtagProvider -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { + .defineCacheServiceAdapter('$cacheFactory', { + config: { + storesDeepCopies: false + }, + methods: { + createCache: function createCache ($cacheFactory, cacheId, options) { + $cacheFactory(cacheId, options) + }, + getCache: function getCache ($cacheFactory, cacheId) { + return $cacheFactory.get(cacheId) + }, + setItem: function setItem (cache, itemKey, value) { + cache.put(itemKey, value) + }, + getItem: function getItem (cache, itemKey) { + return cache.get(itemKey) + }, + removeItem: function removeItem (cache, itemKey) { + cache.remove(itemKey) + }, + removeAllItems: function removeAllItems (cache, itemKey) { + cache.removeAll() + } + } + }) -"use strict"; + .defineCacheServiceAdapter('localStorage', { + config: { + storesDeepCopies: true + }, + methods: { + createCache: external_angular_default.a.noop, + getCache: function getCache (localStorage, cacheId) { + return cacheId + }, + setItem: function setItem (cacheId, itemKey, value) { + try { + itemKey = cacheId + ':' + itemKey + localStorage.setItem(itemKey, JSON.stringify(value)) + } catch (e) { + } + }, + getItem: function getItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + return JSON.parse(localStorage.getItem(itemKey)) + }, + removeItem: function removeItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + localStorage.removeItem(itemKey) + }, + removeAllItems: function removeAllItems (cacheId, itemKey) { + var keyPrefix = cacheId + ':' -var toStr = Object.prototype.toString; + external_angular_default.a.forEach(localStorage, function (value, key) { + if (key.indexOf(keyPrefix) === 0) { + localStorage.removeItem(key) + } + }) + } + } + }) -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; + .defineCacheServiceAdapter('sessionStorage', { + config: { + storesDeepCopies: true + }, + methods: { + createCache: external_angular_default.a.noop, + getCache: function getCache (sessionStorage, cacheId) { + return cacheId + }, + setItem: function setItem (cacheId, itemKey, value) { + try { + itemKey = cacheId + ':' + itemKey + sessionStorage.setItem(itemKey, JSON.stringify(value)) + } catch (e) { + } + }, + getItem: function getItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + return JSON.parse(sessionStorage.getItem(itemKey)) + }, + removeItem: function removeItem (cacheId, itemKey) { + itemKey = cacheId + ':' + itemKey + sessionStorage.removeItem(itemKey) + }, + removeAllItems: function removeAllItems (cacheId, itemKey) { + var keyPrefix = cacheId + ':' -/***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + external_angular_default.a.forEach(sessionStorage, function (value, key) { + if (key.indexOf(keyPrefix) === 0) { + sessionStorage.removeItem(key) + } + }) + } + } + }) +} -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__service__ = __webpack_require__(5); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__httpDecorator__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__httpInterceptor__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__ = __webpack_require__(2); +// CONCATENATED MODULE: ./src/index.js -/* harmony default export */ __webpack_exports__["default"] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a +/* harmony default export */ var src = __webpack_exports__["default"] = (external_angular_default.a .module('http-etag', []) - .provider('httpEtag', __WEBPACK_IMPORTED_MODULE_1__service__["a" /* default */]) - .config(__WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__["a" /* default */]) + .provider('httpEtag', src_service) + .config(cacheServiceAdapters) .config(['$provide', '$httpProvider', function addHttpEtagInterceptor ($provide, $httpProvider) { - __WEBPACK_IMPORTED_MODULE_2__httpDecorator__["a" /* default */].useLegacyPromiseExtensions = + httpDecorator.useLegacyPromiseExtensions = $httpProvider.useLegacyPromiseExtensions || function useLegacyPromiseExtensions () { - return __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.major === 1 && __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.minor < 6 + return external_angular_default.a.version.major === 1 && external_angular_default.a.version.minor < 6 } - $provide.decorator('$http', __WEBPACK_IMPORTED_MODULE_2__httpDecorator__["a" /* default */]) - $httpProvider.interceptors.push(__WEBPACK_IMPORTED_MODULE_3__httpInterceptor__["a" /* default */]) + $provide.decorator('$http', httpDecorator) + $httpProvider.interceptors.push(httpInterceptor) }]) - .name; + .name); /***/ }) diff --git a/release/angular-http-etag.min.js b/release/angular-http-etag.min.js index 7f5e71c..60d48eb 100644 --- a/release/angular-http-etag.min.js +++ b/release/angular-http-etag.min.js @@ -1,3 +1,2 @@ -// angular-http-etag v2.0.17 -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular")):"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?exports["http-etag"]=t(require("angular")):e["http-etag"]=t(e.angular)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=12)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e,t){if("[object Array]"!==o.call(e))throw new TypeError("array must be an Array");var n=void 0,r=void 0,c=void 0;for(n=0,r=e.length;n=0,h=u&&f;if(h){var d=o(e);if(d){var v=t.getItemCache(d.id,d.itemKey);if(!v)throw new Error("No defined ETag caches match specified cache ID");var g=v.info(),m=v.$get(),y=m&&m.etagHeader,b=y&&m.responseData;e.$$_itemCache=v,y&&(e.headers=c.a.extend({},e.headers,{"If-None-Match":y}))}}return i=l.apply(l,arguments),n(i),i}function o(e){var t=e.etagCache,n=typeof t,r={};if("function"===n&&(t=t(e),n=typeof t),"object"===n){var o,c;t.isCache?(o=t.info().id,c=i(e)):t.isItemCache?(o=t.info().id,c=t.info().itemKey):(o=t.id,c=t.itemKey||i(e)),r.id=o,r.itemKey=c}else if("string"===n)r.id=t,r.itemKey=i(e);else{if(t!==!0)return;r.itemKey=i(e)}return r}function i(e){var t=e.url,n=u(e.params),r=n&&t.indexOf("?")>0?"&":"?",o=n&&r+n||"";return t+o}function u(e){return e?f()(a()(e).sort(),function(t){var n=e[t];return c.a.isArray(n)?f()(n.sort(),function(e){return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&"):encodeURIComponent(t)+"="+encodeURIComponent(n)}).join("&"):""}function s(e){var t=Array.prototype.slice.call(arguments,1);return function(){for(var n=0,r=0;r0&&!r.call(e,0))for(var h=0;h0)for(var v=0;v=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n.n(r),c=n(5),i=n(3),a=n(4),u=n(2);t.default=o.a.module("http-etag",[]).provider("httpEtag",c.a).config(u.a).config(["$provide","$httpProvider",function(e,t){i.a.useLegacyPromiseExtensions=t.useLegacyPromiseExtensions||function(){return 1===o.a.version.major&&o.a.version.minor<6},e.decorator("$http",i.a),t.interceptors.push(a.a)}]).name}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular")):"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?exports["http-etag"]=t(require("angular")):e["http-etag"]=t(e.angular)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(t,n){t.exports=e},function(e,t){e.exports=function(e,t){if(e.map)return e.map(t);for(var r=[],o=0;o0&&!r.call(e,0))for(var g=0;g0)for(var y=0;y=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(2);const a="undefined"!=typeof Buffer,c=a&&void 0!==Buffer.from,u=a?function(e){return Buffer.isBuffer(e)}:function(){return!1},f=c?function(e){return Buffer.from(e)}:a?function(e){return new Buffer(e)}:function(e){return e};function s(e){return u(e)?"Buffer":i(e)}const p=new Set(["Arguments","Array","Map","Object","Set"]);function l(e,t,n=null){switch(n||s(e)){case"Arguments":case"Array":case"Object":return e[t];case"Map":return e.get(t);case"Set":return t}}function d(e){return p.has(e)}function m(e,t,n,r=null){switch(r||s(e)){case"Arguments":case"Array":case"Object":e[t]=n;break;case"Map":e.set(t,n);break;case"Set":e.add(n)}return e}const g=Function("return this")();function y(e,t){return g[t].from(e)}function h(e){return e}function v(){return[]}var b=new Map([["ArrayBuffer",function(e){return e.slice(0)}],["Boolean",function(e){return new Boolean(e.valueOf())}],["Buffer",function(e){return f(e)}],["DataView",function(e){return new DataView(e.buffer)}],["Date",function(e){return new Date(e.getTime())}],["Number",function(e){return new Number(e)}],["RegExp",function(e){return new RegExp(e.source||"(?:)",e.flags)}],["String",function(e){return new String(e)}],["Float32Array",y],["Float64Array",y],["Int16Array",y],["Int32Array",y],["Int8Array",y],["Uint16Array",y],["Uint32Array",y],["Uint8Array",y],["Uint8ClampedArray",y],["Array Iterator",h],["Map Iterator",h],["Promise",h],["Set Iterator",h],["String Iterator",h],["function",h],["global",h],["WeakMap",h],["WeakSet",h],["boolean",h],["null",h],["number",h],["string",h],["symbol",h],["undefined",h],["Arguments",v],["Array",v],["Map",function(){return new Map}],["Object",function(){return{}}],["Set",function(){return new Set}]]);function w(e,t=null,n=function(){}){2===arguments.length&&"function"==typeof t&&(n=t,t=null);const r=t||s(e),o=b.get(r);if("Object"===r){const t=n(e,r);if(void 0!==t)return t}return o?o(e,r):e}function S(e,t,n,r,o){const i=s(e),a=w(e,i);if(!d(i))return a;let c;switch(i){case"Arguments":case"Array":c=Object.keys(e);break;case"Object":(c=Object.keys(e)).push(...Object.getOwnPropertySymbols(e));break;case"Map":case"Set":c=e.keys()}for(let a of c){const c=l(e,a,i);if(r.has(c))m(t,a,n.get(c),i);else{const e=s(c),u=w(c,e);d(e)&&(n.set(c,u),r.add(c)),m(t,a,S(c,u,n,r,o),i)}}return t}var I=function(){var e=this,t=["createCache","getCache"],n=["setItem","getItem","removeItem","removeAllItems"],r=t.concat(n),i={},a={},c="httpEtagCache",u={deepCopy:!1,cacheResponseData:!0,cacheService:"$cacheFactory",cacheOptions:{number:25}};e.setDefaultCacheConfig=function(t){return u=o.a.extend({},u,t),e},e.getDefaultCacheConfig=function(){return u},e.defineCache=function(t,n){return n=o.a.extend({},u,n,{id:t}),a[t]=n,e},e.defineCacheServiceAdapter=function(t,n){if(!n)throw new Error("Missing cache service adapter configuration");if(!n.methods)throw new Error("Missing cache service adapter configuration methods");return o.a.forEach(r,function(e){if("function"!=typeof n.methods[e])throw new Error('Expected cache service adapter method "'+e+'" to be a function')}),i[t]=n,e},e.getCacheServiceAdapter=function(e){return i[e]},e.$get=["$injector",function(r){var u={},f={},p={},l={},m={};return a[c]||e.defineCache(c),o.a.forEach(i,function(e,n){var i=f[n]=window[n]||r.get(n),a=p[n]={};o.a.forEach(t,function(t){a[t]=o.a.bind({},e.methods[t],i)})}),o.a.forEach(a,function(e,t){p[e.cacheService].createCache(t,e);var r=l[t]=p[e.cacheService].getCache(t),c=m[t]={},f=i[e.cacheService].config.storesDeepCopies,g=!f&&a[t].deepCopy,y=function(e){return g?function(e,t={}){"function"==typeof t&&(t={customizer:t});const{customizer:n}=t,r=s(e);if(!d(r))return S(e,null,null,null,n);const o=w(e,r,n);return S(e,o,new WeakMap([[e,o]]),new WeakSet([e]),n)}(e):e};o.a.forEach(n,function(t){var n,a,u=i[e.cacheService].methods[t];"getItem"===t&&(n=function(e,t,n){var r=u(e,t,n);return r&&y(r.responseData)},a=function(e,t,n){return y(u(e,t,n))}),"setItem"===t&&(n=function(e,t,n,r){var o=c.$getItem(t);n=y(n),o&&"object"==typeof o?(o.responseData=n,n=o):n={responseData:n},u(e,t,n,r)},a=function(e,t,n,r){u(e,t,y(n),r)}),c[t]=o.a.bind({},n||u,r),a&&(c["$"+t]=o.a.bind({},a,r))}),c.unsetItem=function(e){c.setItem(e,void 0)},c.expireItem=function(e){var t=c.$getItem(e);delete t.etagHeader,c.$setItem(e,t)},c.getItemCache=function(e){return u.getItemCache(t,e)},c.info=function(){return a[t]},c.isCache=!0}),u.info=function(){return a},u.getCache=function(e){var t=m[function(e){var t=typeof e;return"number"===t||"string"===t&&e?e:c}(e)];if(t)return t},u.getItemCache=function(e,t){var n=u.getCache(e),r={};if(n){return o.a.forEach([["set","setItem"],["get","getItem"],["$set","$setItem"],["$get","$getItem"],["unset","unsetItem"],["expire","expireItem"],["remove","removeItem"]],function(e){r[e[0]]=o.a.bind({},n[e[1]],t)}),r.info=function(){var e=n.info();return e.itemKey=t,e},r.isItemCache=!0,r}},u.purgeCaches=function(){o.a.forEach(m,function(e){e.removeAllItems()})},u}]};var j=n(3),O=n.n(j),C=n(1),$=n.n(C),A=E;function E(e,t){var n=e,r=["GET","JSONP"];function i(e){var i,c=E.useLegacyPromiseExtensions(),u=!!e.etagCache,f=r.indexOf(e.method)>=0;if(u&&f){var s=function(e){var t=e.etagCache,n=typeof t,r={};"function"===n&&(t=t(e),n=typeof t);if("object"===n){var o,i;t.isCache?(o=t.info().id,i=a(e)):t.isItemCache?(o=t.info().id,i=t.info().itemKey):(o=t.id,i=t.itemKey||a(e)),r.id=o,r.itemKey=i}else if("string"===n)r.id=t,r.itemKey=a(e);else{if(!0!==t)return;r.itemKey=a(e)}return r}(e);if(s){var p=t.getItemCache(s.id,s.itemKey);if(!p)throw new Error("No defined ETag caches match specified cache ID");var l=p.info(),d=p.$get(),m=d&&d.etagHeader,g=m&&d.responseData;e.$$_itemCache=p,m&&(e.headers=o.a.extend({},e.headers,{"If-None-Match":m}))}}return function t(n){var r=n.then;var o=n.success;n.cached=c?function(t){return d&&l.cacheResponseData&&t(g,"cached",void 0,e,p),n}:function(){throw new Error("The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.")};n.ifCached=function(t){return d&&l.cacheResponseData&&t({data:g,status:"cached",headers:void 0,config:e},p),n};n.then=function(e,o,i){var a=r.apply(n,[e?function(t){return e(t,p)}:void 0,o?function(e){return o(e,p)}:void 0,i]);return t(a)};c&&p&&(n.success=function(e){var t=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){for(var n=0,r=0;r0?"&":"?";return t+(n&&r+n||"")}return o.a.forEach(r,function(e){i[e.toLowerCase()]=function(t,r){return r=o.a.extend({},r,{method:e,url:t}),i.call(n,r)}}),o.a.forEach(n,function(e,t){i[t]||(i[t]=e)}),i}E.$inject=["$delegate","httpEtag"];var x=function(){return{response:function(e){var t=e.config.$$_itemCache;if(t){var n=t.info(),r=n.cacheResponseData,o=e.headers().etag,i={};o&&(i.etagHeader=o,r&&(i.responseData=e.data),t.$set(i)),delete e.config.$$_itemCache}return e}}};var M=D;function D(e){e.defineCacheServiceAdapter("$cacheFactory",{config:{storesDeepCopies:!1},methods:{createCache:function(e,t,n){e(t,n)},getCache:function(e,t){return e.get(t)},setItem:function(e,t,n){e.put(t,n)},getItem:function(e,t){return e.get(t)},removeItem:function(e,t){e.remove(t)},removeAllItems:function(e,t){e.removeAll()}}}).defineCacheServiceAdapter("localStorage",{config:{storesDeepCopies:!0},methods:{createCache:o.a.noop,getCache:function(e,t){return t},setItem:function(e,t,n){try{t=e+":"+t,localStorage.setItem(t,JSON.stringify(n))}catch(e){}},getItem:function(e,t){return t=e+":"+t,JSON.parse(localStorage.getItem(t))},removeItem:function(e,t){t=e+":"+t,localStorage.removeItem(t)},removeAllItems:function(e,t){var n=e+":";o.a.forEach(localStorage,function(e,t){0===t.indexOf(n)&&localStorage.removeItem(t)})}}}).defineCacheServiceAdapter("sessionStorage",{config:{storesDeepCopies:!0},methods:{createCache:o.a.noop,getCache:function(e,t){return t},setItem:function(e,t,n){try{t=e+":"+t,sessionStorage.setItem(t,JSON.stringify(n))}catch(e){}},getItem:function(e,t){return t=e+":"+t,JSON.parse(sessionStorage.getItem(t))},removeItem:function(e,t){t=e+":"+t,sessionStorage.removeItem(t)},removeAllItems:function(e,t){var n=e+":";o.a.forEach(sessionStorage,function(e,t){0===t.indexOf(n)&&sessionStorage.removeItem(t)})}}})}D.$inject=["httpEtagProvider"];t.default=o.a.module("http-etag",[]).provider("httpEtag",I).config(M).config(["$provide","$httpProvider",function(e,t){A.useLegacyPromiseExtensions=t.useLegacyPromiseExtensions||function(){return 1===o.a.version.major&&o.a.version.minor<6},e.decorator("$http",A),t.interceptors.push(x)}]).name}])}); //# sourceMappingURL=angular-http-etag.min.js.map \ No newline at end of file diff --git a/release/angular-http-etag.min.js.map b/release/angular-http-etag.min.js.map index aa5776c..9bd0dea 100644 --- a/release/angular-http-etag.min.js.map +++ b/release/angular-http-etag.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///angular-http-etag.min.js","webpack:///webpack/bootstrap 870e0f29eded9b4f88ee","webpack:///external \"angular\"","webpack:///./~/deepcopy/lib/polyfill.js","webpack:///./src/cacheServiceAdapters.js","webpack:///./src/httpDecorator.js","webpack:///./src/httpInterceptor.js","webpack:///./src/service.js","webpack:///./~/array-map/index.js","webpack:///./~/deepcopy/index.js","webpack:///./~/deepcopy/lib/copy.js","webpack:///./~/deepcopy/lib/index.js","webpack:///./~/object-keys/index.js","webpack:///./~/object-keys/isArguments.js","webpack:///./src/index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_0__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","indexOf","array","toString","TypeError","len","length","isBuffer","Buffer","obj","getKeys","keys","objType","resultKeys","key","push","getSymbols","Symbol","getOwnPropertySymbols","__webpack_exports__","cacheAdaptersConfig","httpEtagProvider","defineCacheServiceAdapter","config","storesDeepCopies","methods","createCache","$cacheFactory","cacheId","options","getCache","setItem","cache","itemKey","put","getItem","removeItem","remove","removeAllItems","removeAll","__WEBPACK_IMPORTED_MODULE_0_angular___default","a","noop","localStorage","JSON","stringify","e","parse","keyPrefix","forEach","sessionStorage","__WEBPACK_IMPORTED_MODULE_0_angular__","$inject","httpEtagHttpDecorator","$delegate","httpEtag","$httpDecorator","httpConfig","httpEtagPromiseFactory","httpPromise","then","success","useLegacyPromiseExtensions","cached","callback","rawCacheData","cacheInfo","cacheResponseData","cachedResponse","undefined","itemCache","Error","ifCached","data","status","headers","successCallback","errorCallback","progressBackCallback","httpEtagSuccessWrapper","response","httpEtagErrorWrapper","thenPromise","apply","partializedCallback","partial","hasConfig","etagCache","isCacheableMethod","cachableHttpMethods","method","isCachable","etagCacheConfig","processHttpConfigEtagValue","getItemCache","id","info","$get","cachedEtag","etagHeader","responseData","$$_itemCache","extend","If-None-Match","$http","arguments","etagValue","etagValueType","isCache","generateCacheItemKey","isItemCache","url","params","stringifyParams","joiner","queryString","__WEBPACK_IMPORTED_MODULE_2_array_map___default","__WEBPACK_IMPORTED_MODULE_1_object_keys___default","sort","val","isArray","val2","encodeURIComponent","join","fn","args","Array","slice","arg","httpMethod","toLowerCase","__WEBPACK_IMPORTED_MODULE_1_object_keys__","__WEBPACK_IMPORTED_MODULE_2_array_map__","httpEtagInterceptorFactory","responseInterceptor","etag","cacheData","$set","serviceAdapterMethods","cacheAdapterMethods","requiredAdapterMethods","concat","cacheAdapters","cacheDefinitions","defaultCacheId","defaultEtagCacheConfig","deepCopy","cacheService","cacheOptions","number","setDefaultCacheConfig","getDefaultCacheConfig","defineCache","serviceName","getCacheServiceAdapter","$injector","processCacheId","type","isDefined","httpEtagService","services","adaptedServices","caches","adaptedCaches","adapter","service","window","adaptedService","bind","adaptedCache","serviceDeepCopies","copy","__WEBPACK_IMPORTED_MODULE_1_deepcopy___default","wrappedMethod","wrappedRawMethod","adapterMethod","cachedData","$getItem","unsetItem","expireItem","$setItem","methodMappings","itemCacheInfo","purgeCaches","__WEBPACK_IMPORTED_MODULE_1_deepcopy__","xs","f","map","res","x","hasOwn","target","customizer","resultValue","copyValue","copyCollection","source","String","test","Function","targetClass","constructor","Date","getTime","regexpText","slashIndex","lastIndexOf","RegExp","_polyfill","buffer","customizerResult","targetType","defaultCustomizer","deepcopy","_copy","resultCollection","clone","visited","reference","recursiveCopy","index","resultCopy","result","ref","has","toStr","isArgs","isEnumerable","propertyIsEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","excludedKeys","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","k","equalsConstructorPrototypeIfNotBuggy","keysShim","isObject","isFunction","isArguments","isString","theKeys","skipProto","j","skipConstructor","shim","keysWorksWithArguments","originalKeys","str","callee","__WEBPACK_IMPORTED_MODULE_1__service__","__WEBPACK_IMPORTED_MODULE_2__httpDecorator__","__WEBPACK_IMPORTED_MODULE_3__httpInterceptor__","__WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__","provider","$provide","$httpProvider","version","major","minor","decorator","interceptors"],"mappings":";CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,YACA,kBAAAC,gBAAAC,IACAD,QAAA,WAAAJ,GACA,gBAAAC,SACAA,QAAA,aAAAD,EAAAG,QAAA,YAEAJ,EAAA,aAAAC,EAAAD,EAAA,UACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAZ,WAUA,OANAO,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,GAAA,EAGAX,EAAAD,QAvBA,GAAAU,KA+DA,OAnCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAG,EAAA,SAAAK,GAA2C,MAAAA,IAG3CR,EAAAS,EAAA,SAAAjB,EAAAkB,EAAAC,GACAX,EAAAY,EAAApB,EAAAkB,IACAG,OAAAC,eAAAtB,EAAAkB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAzB,GACA,GAAAkB,GAAAlB,KAAA0B,WACA,WAA2B,MAAA1B,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAO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OAAAuB,KAAA8F,YAAA,IAAAnG,QACG,IACH,KAAAsQ,EAAA,CACA,GAAAC,GAAAzR,OAAAuB,IACAvB,QAAAuB,KAAA,SAAAhB,GACA,MACAkR,GADA3C,EAAAvO,GACAoI,EAAAnJ,KAAAe,GAEAA,SAKAP,QAAAuB,KAAAuP,CAEA,OAAA9Q,QAAAuB,MAAAuP,GAGAlS,EAAAD,QAAAmS,GZiiCM,SAAUlS,EAAQD,EAASQ,GAEjC,Ya5qCA,IAAA0P,GAAA7O,OAAAS,UAAAM,QAEAnC,GAAAD,QAAA,SAAAgB,GACA,GAAA+R,GAAA7C,EAAArP,KAAAG,GACAmP,EAAA,uBAAA4C,CASA,OARA5C,KACAA,EAAA,mBAAA4C,GACA,OAAA/R,GACA,gBAAAA,IACA,gBAAAA,GAAAuB,QACAvB,EAAAuB,QAAA,GACA,sBAAA2N,EAAArP,KAAAG,EAAAgS,SAEA7C,IbqrCM,SAAUlQ,EAAQmD,EAAqB5C,GAE7C,YACAa,QAAOC,eAAe8B,EAAqB,cAAgBpC,OAAO,GAC7C,IAAIoE,GAAwC5E,EAAoB,GAC5DiE,EAAgDjE,EAAoBkB,EAAE0D,GACtE6N,EAAyCzS,EAAoB,GAC7D0S,EAA+C1S,EAAoB,GACnE2S,EAAiD3S,EAAoB,GACrE4S,EAAsD5S,EAAoB,EcvsCnG4C,GAAA,QAAAqB,EAAAC,EACAzE,OAAA,gBACAoT,SAAA,WAAAJ,EAAA,GACAzP,OAAA4P,EAAA,GACA5P,QAAA,oCAAA8P,EAAAC,GACAL,EAAA,EAAAnN,2BACAwN,EAAAxN,4BACA,WACA,WAAAtB,EAAAC,EAAA8O,QAAAC,OAAAhP,EAAAC,EAAA8O,QAAAE,MAAA,GAEAJ,EAAAK,UAAA,QAAAT,EAAA,GACAK,EAAAK,aAAA5Q,KAAAmQ,EAAA,MAEAjS","file":"angular-http-etag.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"http-etag\"] = factory(require(\"angular\"));\n\telse\n\t\troot[\"http-etag\"] = factory(root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"http-etag\"] = factory(require(\"angular\"));\n\telse\n\t\troot[\"http-etag\"] = factory(root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 12);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\nvar toString = Object.prototype.toString;\n\nvar isBuffer = typeof Buffer !== 'undefined' ? function isBuffer(obj) {\n return Buffer.isBuffer(obj);\n} : function isBuffer() {\n // always return false in browsers\n return false;\n};\n\nvar getKeys = typeof Object.keys === 'function' ? function getKeys(obj) {\n return Object.keys(obj);\n} : function getKeys(obj) {\n var objType = typeof obj;\n\n if (obj === null || objType !== 'function' && objType !== 'object') {\n throw new TypeError('obj must be an Object');\n }\n\n var resultKeys = [],\n key = void 0;\n\n for (key in obj) {\n Object.prototype.hasOwnProperty.call(obj, key) && resultKeys.push(key);\n }\n\n return resultKeys;\n};\n\nvar getSymbols = typeof Symbol === 'function' ? function getSymbols(obj) {\n return Object.getOwnPropertySymbols(obj);\n} : function getSymbols() {\n // always return empty Array when Symbol is not supported\n return [];\n};\n\n// NOTE:\n//\n// Array.prototype.indexOf is cannot find NaN (in Chrome)\n// Array.prototype.includes is can find NaN (in Chrome)\n//\n// this function can find NaN, because use SameValue algorithm\nfunction indexOf(array, s) {\n if (toString.call(array) !== '[object Array]') {\n throw new TypeError('array must be an Array');\n }\n\n var i = void 0,\n len = void 0,\n value = void 0;\n\n for (i = 0, len = array.length; i < len; ++i) {\n value = array[i];\n\n // NOTE:\n //\n // it is SameValue algorithm\n // http://stackoverflow.com/questions/27144277/comparing-a-variable-with-itself\n //\n // eslint-disable-next-line no-self-compare\n if (value === s || value !== value && s !== s) {\n return i;\n }\n }\n\n return -1;\n}\n\nexports.getKeys = getKeys;\nexports.getSymbols = getSymbols;\nexports.indexOf = indexOf;\nexports.isBuffer = isBuffer;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = cacheAdaptersConfig;\n\ncacheAdaptersConfig.$inject = ['httpEtagProvider']\n\nfunction cacheAdaptersConfig (httpEtagProvider) {\n httpEtagProvider\n\n .defineCacheServiceAdapter('$cacheFactory', {\n config: {\n storesDeepCopies: false\n },\n methods: {\n createCache: function createCache ($cacheFactory, cacheId, options) {\n $cacheFactory(cacheId, options)\n },\n getCache: function getCache ($cacheFactory, cacheId) {\n return $cacheFactory.get(cacheId)\n },\n setItem: function setItem (cache, itemKey, value) {\n cache.put(itemKey, value)\n },\n getItem: function getItem (cache, itemKey) {\n return cache.get(itemKey)\n },\n removeItem: function removeItem (cache, itemKey) {\n cache.remove(itemKey)\n },\n removeAllItems: function removeAllItems (cache, itemKey) {\n cache.removeAll()\n }\n }\n })\n\n .defineCacheServiceAdapter('localStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop,\n getCache: function getCache (localStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n localStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(localStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n localStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(localStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key)\n }\n })\n }\n }\n })\n\n .defineCacheServiceAdapter('sessionStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: __WEBPACK_IMPORTED_MODULE_0_angular___default.a.noop,\n getCache: function getCache (sessionStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(sessionStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(sessionStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n sessionStorage.removeItem(key)\n }\n })\n }\n }\n })\n}\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_object_keys__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_array_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_array_map__);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = httpEtagHttpDecorator;\n\nhttpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag']\n\nfunction httpEtagHttpDecorator ($delegate, httpEtag) {\n var $http = $delegate\n var cachableHttpMethods = [\n 'GET',\n 'JSONP'\n ]\n\n function $httpDecorator (httpConfig) {\n var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()\n var hasConfig = !!httpConfig.etagCache\n var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0\n var isCachable = hasConfig && isCacheableMethod\n var httpPromise\n\n if (isCachable) {\n var etagCacheConfig = processHttpConfigEtagValue(httpConfig)\n if (etagCacheConfig) {\n var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey)\n if (!itemCache) throw new Error('No defined ETag caches match specified cache ID')\n\n var cacheInfo = itemCache.info()\n var rawCacheData = itemCache.$get()\n var cachedEtag = rawCacheData && rawCacheData.etagHeader\n var cachedResponse = cachedEtag && rawCacheData.responseData\n\n // Allow easy access to cache in interceptor\n httpConfig.$$_itemCache = itemCache\n\n if (cachedEtag) {\n httpConfig.headers = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, httpConfig.headers, {\n 'If-None-Match': cachedEtag\n })\n }\n }\n }\n\n httpPromise = $http.apply($http, arguments)\n httpEtagPromiseFactory(httpPromise)\n\n function httpEtagPromiseFactory (httpPromise) {\n var then = httpPromise.then\n var success = httpPromise.success\n\n if (useLegacyPromiseExtensions) {\n httpPromise.cached = function httpEtagPromiseCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n callback(cachedResponse, 'cached', undefined, httpConfig, itemCache)\n }\n return httpPromise\n }\n } else {\n httpPromise.cached = function deprecatedEtagPromiseCached () {\n throw new Error('The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.')\n }\n }\n\n httpPromise.ifCached = function httpEtagPromiseIfCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n callback({\n data: cachedResponse,\n status: 'cached',\n headers: undefined,\n config: httpConfig\n }, itemCache)\n }\n return httpPromise\n }\n\n httpPromise.then = function httpEtagThenWrapper (successCallback, errorCallback, progressBackCallback) {\n var thenPromise = then.apply(httpPromise, [\n successCallback ? httpEtagSuccessWrapper : undefined,\n errorCallback ? httpEtagErrorWrapper : undefined,\n progressBackCallback\n ])\n\n function httpEtagSuccessWrapper (response) {\n return successCallback(response, itemCache)\n }\n\n function httpEtagErrorWrapper (response) {\n return errorCallback(response, itemCache)\n }\n\n return httpEtagPromiseFactory(thenPromise)\n }\n\n if (useLegacyPromiseExtensions && itemCache) {\n httpPromise.success = function httpEtagPromiseSuccess (callback) {\n var partializedCallback = partial(callback, undefined, undefined, undefined, undefined, itemCache)\n return success.apply(httpPromise, [partializedCallback])\n }\n }\n\n return httpPromise\n }\n\n return httpPromise\n }\n\n // Decorate the cachable shortcut methods, too\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cachableHttpMethods, function (httpMethod) {\n var method = httpMethod.toLowerCase()\n $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) {\n config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, config, {\n method: httpMethod,\n url: url\n })\n\n return $httpDecorator.call($http, config)\n }\n })\n\n // Copy over all other properties and methods\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach($http, function copyHttpPropertyToDectorator (value, key) {\n if (!$httpDecorator[key]) $httpDecorator[key] = value\n })\n\n /**\n * HELPERS\n */\n\n function processHttpConfigEtagValue (httpConfig) {\n var etagValue = httpConfig.etagCache\n var etagValueType = typeof etagValue\n var etagCacheConfig = {}\n\n // Evaluate function first\n if (etagValueType === 'function') {\n etagValue = etagValue(httpConfig)\n etagValueType = typeof etagValue\n }\n\n // Plain, cache, or itemCache objects\n if (etagValueType === 'object') {\n var id, itemKey\n\n if (etagValue.isCache) {\n id = etagValue.info().id\n itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue.isItemCache) {\n id = etagValue.info().id\n itemKey = etagValue.info().itemKey\n } else {\n id = etagValue.id\n itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig)\n }\n\n etagCacheConfig.id = id\n etagCacheConfig.itemKey = itemKey\n } else if (etagValueType === 'string') {\n etagCacheConfig.id = etagValue\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue === true) {\n // Undefined cacheId will use the default cacheId as defined in provider\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else return\n return etagCacheConfig\n }\n\n function generateCacheItemKey (httpConfig) {\n var url = httpConfig.url\n var params = stringifyParams(httpConfig.params)\n var joiner = ((params && url.indexOf('?') > 0) ? '&' : '?')\n var queryString = (params && joiner + params) || ''\n return url + queryString\n }\n\n // Based on npm package \"query-string\"\n function stringifyParams (obj) {\n return obj ? __WEBPACK_IMPORTED_MODULE_2_array_map___default()(__WEBPACK_IMPORTED_MODULE_1_object_keys___default()(obj).sort(), function (key) {\n var val = obj[key]\n\n if (__WEBPACK_IMPORTED_MODULE_0_angular___default.a.isArray(val)) {\n return __WEBPACK_IMPORTED_MODULE_2_array_map___default()(val.sort(), function (val2) {\n return encodeURIComponent(key) + '=' + encodeURIComponent(val2)\n }).join('&')\n }\n\n return encodeURIComponent(key) + '=' + encodeURIComponent(val)\n }).join('&') : ''\n }\n\n // http://ejohn.org/blog/partial-functions-in-javascript/\n function partial (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n return function () {\n var arg = 0\n for (var i = 0; i < args.length && arg < arguments.length; i++) {\n if (args[i] === undefined) args[i] = arguments[arg++]\n }\n return fn.apply(this, args)\n }\n }\n\n return $httpDecorator\n}\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = httpEtagInterceptorFactory;\n\nfunction httpEtagInterceptorFactory () {\n function responseInterceptor (response) {\n var itemCache = response.config.$$_itemCache\n\n if (itemCache) {\n var cacheInfo = itemCache.info()\n var cacheResponseData = cacheInfo.cacheResponseData\n var etag = response.headers().etag\n var cacheData = {}\n\n if (etag) {\n cacheData.etagHeader = etag\n if (cacheResponseData) cacheData.responseData = response.data\n itemCache.$set(cacheData)\n }\n\n delete response.config.$$_itemCache\n }\n\n return response\n }\n\n return {\n response: responseInterceptor\n }\n}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_deepcopy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_deepcopy__);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = httpEtagProvider;\n\nfunction httpEtagProvider () {\n var httpEtagProvider = this\n\n var serviceAdapterMethods = [\n 'createCache',\n 'getCache'\n ]\n\n var cacheAdapterMethods = [\n 'setItem',\n 'getItem',\n 'removeItem',\n 'removeAllItems'\n // info method hard-coded\n ]\n\n var requiredAdapterMethods = serviceAdapterMethods.concat(cacheAdapterMethods)\n\n // Built-in adapters defined in ./cacheServiceAdapters.js\n var cacheAdapters = {}\n var cacheDefinitions = {}\n\n // Cache config defaults\n var defaultCacheId = 'httpEtagCache'\n var defaultEtagCacheConfig = {\n deepCopy: false,\n cacheResponseData: true,\n cacheService: '$cacheFactory',\n cacheOptions: {\n number: 25\n }\n }\n\n /**\n * SERVICE PROVIDER\n * .setDefaultCacheConfig(config)\n * .defineCache(cacheId, config)\n * .defineCacheServiceAdapter(serviceName, config)\n * .getCacheServiceAdapter(serviceName)\n */\n\n httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) {\n defaultEtagCacheConfig = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config)\n return httpEtagProvider\n }\n\n httpEtagProvider.getDefaultCacheConfig = function httpEtagGetDefaultCacheOptions () {\n return defaultEtagCacheConfig\n }\n\n httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {\n config = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId })\n cacheDefinitions[cacheId] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) {\n if (!config) throw new Error('Missing cache service adapter configuration')\n if (!config.methods) throw new Error('Missing cache service adapter configuration methods')\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(requiredAdapterMethods, function (method) {\n if (typeof config.methods[method] !== 'function') {\n throw new Error('Expected cache service adapter method \"' + method + '\" to be a function')\n }\n })\n\n cacheAdapters[serviceName] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.getCacheServiceAdapter = function httpEtagGetCacheServiceAdapter (serviceName) {\n return cacheAdapters[serviceName]\n }\n\n /**\n * SERVICE\n * .info()\n * .getCache(acheId)\n * .getItemCache(cacheId, itemKey)\n */\n\n httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {\n var httpEtagService = {}\n\n var services = {}\n var adaptedServices = {}\n var caches = {}\n var adaptedCaches = {}\n\n // Add default cache if not already defined\n if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId)\n\n // Find/inject cache service and create adapted versions\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) {\n var service = services[serviceName] = window[serviceName] || $injector.get(serviceName)\n var adaptedService = adaptedServices[serviceName] = {}\n\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(serviceAdapterMethods, function (method) {\n adaptedService[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, adapter.methods[method], service)\n })\n })\n\n // Instantiate caches and create adapted versions\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {\n adaptedServices[config.cacheService].createCache(cacheId, config)\n var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)\n var adaptedCache = adaptedCaches[cacheId] = {}\n // Determine whether to perform deepcopying or not\n var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies\n var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy\n var copy = function (value) {\n return deepCopy ? __WEBPACK_IMPORTED_MODULE_1_deepcopy___default()(value) : value\n }\n\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(cacheAdapterMethods, function (method) {\n var adapterMethod = cacheAdapters[config.cacheService].methods[method]\n var wrappedMethod\n var wrappedRawMethod\n\n // Wrap set/get methods to set/get to the `responseData` property of an\n // object. This is where the $http interceptor stores response data.\n if (method === 'getItem') {\n wrappedMethod = function getCacheItemResponseData (cache, itemKey, options) {\n var cachedData = adapterMethod(cache, itemKey, options)\n return cachedData && copy(cachedData.responseData)\n }\n\n wrappedRawMethod = function getCacheItemData (cache, itemKey, options) {\n return copy(adapterMethod(cache, itemKey, options))\n }\n }\n\n if (method === 'setItem') {\n wrappedMethod = function setCacheItemResponseData (cache, itemKey, value, options) {\n var cachedData = adaptedCache.$getItem(itemKey)\n value = copy(value)\n\n if (cachedData && typeof cachedData === 'object') {\n cachedData.responseData = value\n value = cachedData\n } else value = { responseData: value }\n\n adapterMethod(cache, itemKey, value, options)\n }\n\n wrappedRawMethod = function setCacheItemData (cache, itemKey, value, options) {\n adapterMethod(cache, itemKey, copy(value), options)\n }\n }\n\n adaptedCache[method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, (wrappedMethod || adapterMethod), cache)\n if (wrappedRawMethod) {\n adaptedCache['$' + method] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, wrappedRawMethod, cache)\n }\n })\n\n adaptedCache.unsetItem = function adaptedCacheUnsetItemCache (itemKey) {\n adaptedCache.setItem(itemKey, undefined)\n }\n adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {\n var data = adaptedCache.$getItem(itemKey)\n delete data.etagHeader\n adaptedCache.$setItem(itemKey, data)\n }\n adaptedCache.getItemCache = function adaptedCacheGetItemCache (itemKey) {\n return httpEtagService.getItemCache(cacheId, itemKey)\n }\n adaptedCache.info = function adaptedCacheInfo () {\n return cacheDefinitions[cacheId]\n }\n adaptedCache.isCache = true\n })\n\n httpEtagService.info = function httpEtagServiceInfo () {\n return cacheDefinitions\n }\n\n httpEtagService.getCache = function httpEtagServiceGetCache (cacheId) {\n var cache = adaptedCaches[processCacheId(cacheId)]\n if (cache) return cache\n }\n\n httpEtagService.getItemCache = function httpEtagServiceGeItemCache (cacheId, itemKey) {\n var cache = httpEtagService.getCache(cacheId)\n var itemCache = {}\n if (!cache) return\n\n var methodMappings = [\n ['set', 'setItem'],\n ['get', 'getItem'],\n ['$set', '$setItem'],\n ['$get', '$getItem'],\n ['unset', 'unsetItem'],\n ['expire', 'expireItem'],\n ['remove', 'removeItem']\n ]\n\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) {\n itemCache[methods[0]] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a.bind({}, cache[methods[1]], itemKey)\n })\n\n itemCache.info = function itemCacheInfo () {\n var itemCacheInfo = cache.info()\n itemCacheInfo.itemKey = itemKey\n return itemCacheInfo\n }\n\n itemCache.isItemCache = true\n\n return itemCache\n }\n\n httpEtagService.purgeCaches = function httpEtagPurgeCaches () {\n __WEBPACK_IMPORTED_MODULE_0_angular___default.a.forEach(adaptedCaches, function (cache) {\n cache.removeAllItems()\n })\n }\n\n function processCacheId (cacheId) {\n var type = typeof cacheId\n var isDefined = type === 'number' || (type === 'string' && !!cacheId)\n return isDefined ? cacheId : defaultCacheId\n }\n\n return httpEtagService\n }]\n}\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = xs[i];\n if (hasOwn.call(xs, i)) res.push(f(x, i, xs));\n }\n return res;\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(9);\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\nexports.copyValue = exports.copyCollection = exports.copy = void 0;\n\nvar _polyfill = __webpack_require__(1);\n\nvar toString = Object.prototype.toString;\n\nfunction copy(target, customizer) {\n var resultValue = copyValue(target);\n\n if (resultValue !== null) {\n return resultValue;\n }\n\n return copyCollection(target, customizer);\n}\n\nfunction copyCollection(target, customizer) {\n if (typeof customizer !== 'function') {\n throw new TypeError('customizer is must be a Function');\n }\n\n if (typeof target === 'function') {\n var source = String(target);\n\n // NOTE:\n //\n // https://gist.github.com/jdalton/5e34d890105aca44399f\n //\n // - https://gist.github.com/jdalton/5e34d890105aca44399f#gistcomment-1283831\n // - http://es5.github.io/#x15\n //\n // native functions does not have prototype:\n //\n // Object.toString.prototype // => undefined\n // (function() {}).prototype // => {}\n //\n // but cannot detect native constructor:\n //\n // typeof Object // => 'function'\n // Object.prototype // => {}\n //\n // and cannot detect null binded function:\n //\n // String(Math.abs)\n // // => 'function abs() { [native code] }'\n //\n // Firefox, Safari:\n // String((function abs() {}).bind(null))\n // // => 'function abs() { [native code] }'\n //\n // Chrome:\n // String((function abs() {}).bind(null))\n // // => 'function () { [native code] }'\n if (/^\\s*function\\s*\\S*\\([^\\)]*\\)\\s*{\\s*\\[native code\\]\\s*}/.test(source)) {\n // native function\n return target;\n } else {\n // user defined function\n return new Function('return ' + String(source))();\n }\n }\n\n var targetClass = toString.call(target);\n\n if (targetClass === '[object Array]') {\n return [];\n }\n\n if (targetClass === '[object Object]' && target.constructor === Object) {\n return {};\n }\n\n if (targetClass === '[object Date]') {\n // NOTE:\n //\n // Firefox need to convert\n //\n // Firefox:\n // var date = new Date;\n // +date; // 1420909365967\n // +new Date(date); // 1420909365000\n // +new Date(+date); // 1420909365967\n //\n // Chrome:\n // var date = new Date;\n // +date; // 1420909757913\n // +new Date(date); // 1420909757913\n // +new Date(+date); // 1420909757913\n return new Date(target.getTime());\n }\n\n if (targetClass === '[object RegExp]') {\n // NOTE:\n //\n // Chrome, Safari:\n // (new RegExp).source => \"(?:)\"\n //\n // Firefox:\n // (new RegExp).source => \"\"\n //\n // Chrome, Safari, Firefox:\n // String(new RegExp) => \"/(?:)/\"\n var regexpText = String(target),\n slashIndex = regexpText.lastIndexOf('/');\n\n return new RegExp(regexpText.slice(1, slashIndex), regexpText.slice(slashIndex + 1));\n }\n\n if ((0, _polyfill.isBuffer)(target)) {\n var buffer = new Buffer(target.length);\n\n target.copy(buffer);\n\n return buffer;\n }\n\n var customizerResult = customizer(target);\n\n if (customizerResult !== void 0) {\n return customizerResult;\n }\n\n return null;\n}\n\nfunction copyValue(target) {\n var targetType = typeof target;\n\n // copy String, Number, Boolean, undefined and Symbol\n // without null and Function\n if (target !== null && targetType !== 'object' && targetType !== 'function') {\n return target;\n }\n\n return null;\n}\n\nexports.copy = copy;\nexports.copyCollection = copyCollection;\nexports.copyValue = copyValue;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _copy = __webpack_require__(8);\n\nvar _polyfill = __webpack_require__(1);\n\nfunction defaultCustomizer(target) {\n return void 0;\n}\n\nfunction deepcopy(target) {\n var customizer = arguments.length <= 1 || arguments[1] === void 0 ? defaultCustomizer : arguments[1];\n\n if (target === null) {\n // copy null\n return null;\n }\n\n var resultValue = (0, _copy.copyValue)(target);\n\n if (resultValue !== null) {\n // copy some primitive types\n return resultValue;\n }\n\n var resultCollection = (0, _copy.copyCollection)(target, customizer),\n clone = resultCollection !== null ? resultCollection : target;\n\n var visited = [target],\n reference = [clone];\n\n // recursively copy from collection\n return recursiveCopy(target, customizer, clone, visited, reference);\n}\n\nfunction recursiveCopy(target, customizer, clone, visited, reference) {\n if (target === null) {\n // copy null\n return null;\n }\n\n var resultValue = (0, _copy.copyValue)(target);\n\n if (resultValue !== null) {\n // copy some primitive types\n return resultValue;\n }\n\n var keys = (0, _polyfill.getKeys)(target).concat((0, _polyfill.getSymbols)(target));\n\n var i = void 0,\n len = void 0;\n\n var key = void 0,\n value = void 0,\n index = void 0,\n resultCopy = void 0,\n result = void 0,\n ref = void 0;\n\n for (i = 0, len = keys.length; i < len; ++i) {\n key = keys[i];\n value = target[key];\n index = (0, _polyfill.indexOf)(visited, value);\n\n resultCopy = void 0;\n result = void 0;\n ref = void 0;\n\n if (index === -1) {\n resultCopy = (0, _copy.copy)(value, customizer);\n result = resultCopy !== null ? resultCopy : value;\n\n if (value !== null && /^(?:function|object)$/.test(typeof value)) {\n visited.push(value);\n reference.push(result);\n }\n } else {\n // circular reference\n ref = reference[index];\n }\n\n clone[key] = ref || recursiveCopy(value, customizer, result, visited, reference);\n }\n\n return clone;\n}\n\nexports['default'] = deepcopy;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = __webpack_require__(11);\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\nvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar excludedKeys = {\n\t$console: true,\n\t$external: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$innerHeight: true,\n\t$innerWidth: true,\n\t$outerHeight: true,\n\t$outerWidth: true,\n\t$pageXOffset: true,\n\t$pageYOffset: true,\n\t$parent: true,\n\t$scrollLeft: true,\n\t$scrollTop: true,\n\t$scrollX: true,\n\t$scrollY: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__service__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__httpDecorator__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__httpInterceptor__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__ = __webpack_require__(2);\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = __WEBPACK_IMPORTED_MODULE_0_angular___default.a\n .module('http-etag', [])\n .provider('httpEtag', __WEBPACK_IMPORTED_MODULE_1__service__[\"a\" /* default */])\n .config(__WEBPACK_IMPORTED_MODULE_4__cacheServiceAdapters__[\"a\" /* default */])\n .config(['$provide', '$httpProvider', function addHttpEtagInterceptor ($provide, $httpProvider) {\n __WEBPACK_IMPORTED_MODULE_2__httpDecorator__[\"a\" /* default */].useLegacyPromiseExtensions =\n $httpProvider.useLegacyPromiseExtensions ||\n function useLegacyPromiseExtensions () {\n return __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.major === 1 && __WEBPACK_IMPORTED_MODULE_0_angular___default.a.version.minor < 6\n }\n $provide.decorator('$http', __WEBPACK_IMPORTED_MODULE_2__httpDecorator__[\"a\" /* default */])\n $httpProvider.interceptors.push(__WEBPACK_IMPORTED_MODULE_3__httpInterceptor__[\"a\" /* default */])\n }])\n .name;\n\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// angular-http-etag.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 870e0f29eded9b4f88ee","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"angular\"\n// module id = 0\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\nvar toString = Object.prototype.toString;\n\nvar isBuffer = typeof Buffer !== 'undefined' ? function isBuffer(obj) {\n return Buffer.isBuffer(obj);\n} : function isBuffer() {\n // always return false in browsers\n return false;\n};\n\nvar getKeys = typeof Object.keys === 'function' ? function getKeys(obj) {\n return Object.keys(obj);\n} : function getKeys(obj) {\n var objType = typeof obj;\n\n if (obj === null || objType !== 'function' && objType !== 'object') {\n throw new TypeError('obj must be an Object');\n }\n\n var resultKeys = [],\n key = void 0;\n\n for (key in obj) {\n Object.prototype.hasOwnProperty.call(obj, key) && resultKeys.push(key);\n }\n\n return resultKeys;\n};\n\nvar getSymbols = typeof Symbol === 'function' ? function getSymbols(obj) {\n return Object.getOwnPropertySymbols(obj);\n} : function getSymbols() {\n // always return empty Array when Symbol is not supported\n return [];\n};\n\n// NOTE:\n//\n// Array.prototype.indexOf is cannot find NaN (in Chrome)\n// Array.prototype.includes is can find NaN (in Chrome)\n//\n// this function can find NaN, because use SameValue algorithm\nfunction indexOf(array, s) {\n if (toString.call(array) !== '[object Array]') {\n throw new TypeError('array must be an Array');\n }\n\n var i = void 0,\n len = void 0,\n value = void 0;\n\n for (i = 0, len = array.length; i < len; ++i) {\n value = array[i];\n\n // NOTE:\n //\n // it is SameValue algorithm\n // http://stackoverflow.com/questions/27144277/comparing-a-variable-with-itself\n //\n // eslint-disable-next-line no-self-compare\n if (value === s || value !== value && s !== s) {\n return i;\n }\n }\n\n return -1;\n}\n\nexports.getKeys = getKeys;\nexports.getSymbols = getSymbols;\nexports.indexOf = indexOf;\nexports.isBuffer = isBuffer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/deepcopy/lib/polyfill.js\n// module id = 1\n// module chunks = 0","import angular from 'angular'\n\nexport default cacheAdaptersConfig\n\ncacheAdaptersConfig.$inject = ['httpEtagProvider']\n\nfunction cacheAdaptersConfig (httpEtagProvider) {\n httpEtagProvider\n\n .defineCacheServiceAdapter('$cacheFactory', {\n config: {\n storesDeepCopies: false\n },\n methods: {\n createCache: function createCache ($cacheFactory, cacheId, options) {\n $cacheFactory(cacheId, options)\n },\n getCache: function getCache ($cacheFactory, cacheId) {\n return $cacheFactory.get(cacheId)\n },\n setItem: function setItem (cache, itemKey, value) {\n cache.put(itemKey, value)\n },\n getItem: function getItem (cache, itemKey) {\n return cache.get(itemKey)\n },\n removeItem: function removeItem (cache, itemKey) {\n cache.remove(itemKey)\n },\n removeAllItems: function removeAllItems (cache, itemKey) {\n cache.removeAll()\n }\n }\n })\n\n .defineCacheServiceAdapter('localStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: angular.noop,\n getCache: function getCache (localStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n localStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(localStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n localStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n angular.forEach(localStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key)\n }\n })\n }\n }\n })\n\n .defineCacheServiceAdapter('sessionStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: angular.noop,\n getCache: function getCache (sessionStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(sessionStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n angular.forEach(sessionStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n sessionStorage.removeItem(key)\n }\n })\n }\n }\n })\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/cacheServiceAdapters.js\n// module id = 2\n// module chunks = 0","import angular from 'angular'\nimport objectKeys from 'object-keys'\nimport arrayMap from 'array-map'\n\nexport default httpEtagHttpDecorator\n\nhttpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag']\n\nfunction httpEtagHttpDecorator ($delegate, httpEtag) {\n var $http = $delegate\n var cachableHttpMethods = [\n 'GET',\n 'JSONP'\n ]\n\n function $httpDecorator (httpConfig) {\n var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()\n var hasConfig = !!httpConfig.etagCache\n var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0\n var isCachable = hasConfig && isCacheableMethod\n var httpPromise\n\n if (isCachable) {\n var etagCacheConfig = processHttpConfigEtagValue(httpConfig)\n if (etagCacheConfig) {\n var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey)\n if (!itemCache) throw new Error('No defined ETag caches match specified cache ID')\n\n var cacheInfo = itemCache.info()\n var rawCacheData = itemCache.$get()\n var cachedEtag = rawCacheData && rawCacheData.etagHeader\n var cachedResponse = cachedEtag && rawCacheData.responseData\n\n // Allow easy access to cache in interceptor\n httpConfig.$$_itemCache = itemCache\n\n if (cachedEtag) {\n httpConfig.headers = angular.extend({}, httpConfig.headers, {\n 'If-None-Match': cachedEtag\n })\n }\n }\n }\n\n httpPromise = $http.apply($http, arguments)\n httpEtagPromiseFactory(httpPromise)\n\n function httpEtagPromiseFactory (httpPromise) {\n var then = httpPromise.then\n var success = httpPromise.success\n\n if (useLegacyPromiseExtensions) {\n httpPromise.cached = function httpEtagPromiseCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n callback(cachedResponse, 'cached', undefined, httpConfig, itemCache)\n }\n return httpPromise\n }\n } else {\n httpPromise.cached = function deprecatedEtagPromiseCached () {\n throw new Error('The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.')\n }\n }\n\n httpPromise.ifCached = function httpEtagPromiseIfCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n callback({\n data: cachedResponse,\n status: 'cached',\n headers: undefined,\n config: httpConfig\n }, itemCache)\n }\n return httpPromise\n }\n\n httpPromise.then = function httpEtagThenWrapper (successCallback, errorCallback, progressBackCallback) {\n var thenPromise = then.apply(httpPromise, [\n successCallback ? httpEtagSuccessWrapper : undefined,\n errorCallback ? httpEtagErrorWrapper : undefined,\n progressBackCallback\n ])\n\n function httpEtagSuccessWrapper (response) {\n return successCallback(response, itemCache)\n }\n\n function httpEtagErrorWrapper (response) {\n return errorCallback(response, itemCache)\n }\n\n return httpEtagPromiseFactory(thenPromise)\n }\n\n if (useLegacyPromiseExtensions && itemCache) {\n httpPromise.success = function httpEtagPromiseSuccess (callback) {\n var partializedCallback = partial(callback, undefined, undefined, undefined, undefined, itemCache)\n return success.apply(httpPromise, [partializedCallback])\n }\n }\n\n return httpPromise\n }\n\n return httpPromise\n }\n\n // Decorate the cachable shortcut methods, too\n angular.forEach(cachableHttpMethods, function (httpMethod) {\n var method = httpMethod.toLowerCase()\n $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) {\n config = angular.extend({}, config, {\n method: httpMethod,\n url: url\n })\n\n return $httpDecorator.call($http, config)\n }\n })\n\n // Copy over all other properties and methods\n angular.forEach($http, function copyHttpPropertyToDectorator (value, key) {\n if (!$httpDecorator[key]) $httpDecorator[key] = value\n })\n\n /**\n * HELPERS\n */\n\n function processHttpConfigEtagValue (httpConfig) {\n var etagValue = httpConfig.etagCache\n var etagValueType = typeof etagValue\n var etagCacheConfig = {}\n\n // Evaluate function first\n if (etagValueType === 'function') {\n etagValue = etagValue(httpConfig)\n etagValueType = typeof etagValue\n }\n\n // Plain, cache, or itemCache objects\n if (etagValueType === 'object') {\n var id, itemKey\n\n if (etagValue.isCache) {\n id = etagValue.info().id\n itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue.isItemCache) {\n id = etagValue.info().id\n itemKey = etagValue.info().itemKey\n } else {\n id = etagValue.id\n itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig)\n }\n\n etagCacheConfig.id = id\n etagCacheConfig.itemKey = itemKey\n } else if (etagValueType === 'string') {\n etagCacheConfig.id = etagValue\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue === true) {\n // Undefined cacheId will use the default cacheId as defined in provider\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else return\n return etagCacheConfig\n }\n\n function generateCacheItemKey (httpConfig) {\n var url = httpConfig.url\n var params = stringifyParams(httpConfig.params)\n var joiner = ((params && url.indexOf('?') > 0) ? '&' : '?')\n var queryString = (params && joiner + params) || ''\n return url + queryString\n }\n\n // Based on npm package \"query-string\"\n function stringifyParams (obj) {\n return obj ? arrayMap(objectKeys(obj).sort(), function (key) {\n var val = obj[key]\n\n if (angular.isArray(val)) {\n return arrayMap(val.sort(), function (val2) {\n return encodeURIComponent(key) + '=' + encodeURIComponent(val2)\n }).join('&')\n }\n\n return encodeURIComponent(key) + '=' + encodeURIComponent(val)\n }).join('&') : ''\n }\n\n // http://ejohn.org/blog/partial-functions-in-javascript/\n function partial (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n return function () {\n var arg = 0\n for (var i = 0; i < args.length && arg < arguments.length; i++) {\n if (args[i] === undefined) args[i] = arguments[arg++]\n }\n return fn.apply(this, args)\n }\n }\n\n return $httpDecorator\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/httpDecorator.js\n// module id = 3\n// module chunks = 0","export default httpEtagInterceptorFactory\n\nfunction httpEtagInterceptorFactory () {\n function responseInterceptor (response) {\n var itemCache = response.config.$$_itemCache\n\n if (itemCache) {\n var cacheInfo = itemCache.info()\n var cacheResponseData = cacheInfo.cacheResponseData\n var etag = response.headers().etag\n var cacheData = {}\n\n if (etag) {\n cacheData.etagHeader = etag\n if (cacheResponseData) cacheData.responseData = response.data\n itemCache.$set(cacheData)\n }\n\n delete response.config.$$_itemCache\n }\n\n return response\n }\n\n return {\n response: responseInterceptor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/httpInterceptor.js\n// module id = 4\n// module chunks = 0","import angular from 'angular'\nimport deepcopy from 'deepcopy'\n\nexport default httpEtagProvider\n\nfunction httpEtagProvider () {\n var httpEtagProvider = this\n\n var serviceAdapterMethods = [\n 'createCache',\n 'getCache'\n ]\n\n var cacheAdapterMethods = [\n 'setItem',\n 'getItem',\n 'removeItem',\n 'removeAllItems'\n // info method hard-coded\n ]\n\n var requiredAdapterMethods = serviceAdapterMethods.concat(cacheAdapterMethods)\n\n // Built-in adapters defined in ./cacheServiceAdapters.js\n var cacheAdapters = {}\n var cacheDefinitions = {}\n\n // Cache config defaults\n var defaultCacheId = 'httpEtagCache'\n var defaultEtagCacheConfig = {\n deepCopy: false,\n cacheResponseData: true,\n cacheService: '$cacheFactory',\n cacheOptions: {\n number: 25\n }\n }\n\n /**\n * SERVICE PROVIDER\n * .setDefaultCacheConfig(config)\n * .defineCache(cacheId, config)\n * .defineCacheServiceAdapter(serviceName, config)\n * .getCacheServiceAdapter(serviceName)\n */\n\n httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) {\n defaultEtagCacheConfig = angular.extend({}, defaultEtagCacheConfig, config)\n return httpEtagProvider\n }\n\n httpEtagProvider.getDefaultCacheConfig = function httpEtagGetDefaultCacheOptions () {\n return defaultEtagCacheConfig\n }\n\n httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {\n config = angular.extend({}, defaultEtagCacheConfig, config, { id: cacheId })\n cacheDefinitions[cacheId] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) {\n if (!config) throw new Error('Missing cache service adapter configuration')\n if (!config.methods) throw new Error('Missing cache service adapter configuration methods')\n angular.forEach(requiredAdapterMethods, function (method) {\n if (typeof config.methods[method] !== 'function') {\n throw new Error('Expected cache service adapter method \"' + method + '\" to be a function')\n }\n })\n\n cacheAdapters[serviceName] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.getCacheServiceAdapter = function httpEtagGetCacheServiceAdapter (serviceName) {\n return cacheAdapters[serviceName]\n }\n\n /**\n * SERVICE\n * .info()\n * .getCache(acheId)\n * .getItemCache(cacheId, itemKey)\n */\n\n httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {\n var httpEtagService = {}\n\n var services = {}\n var adaptedServices = {}\n var caches = {}\n var adaptedCaches = {}\n\n // Add default cache if not already defined\n if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId)\n\n // Find/inject cache service and create adapted versions\n angular.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) {\n var service = services[serviceName] = window[serviceName] || $injector.get(serviceName)\n var adaptedService = adaptedServices[serviceName] = {}\n\n angular.forEach(serviceAdapterMethods, function (method) {\n adaptedService[method] = angular.bind({}, adapter.methods[method], service)\n })\n })\n\n // Instantiate caches and create adapted versions\n angular.forEach(cacheDefinitions, function adaptCache (config, cacheId) {\n adaptedServices[config.cacheService].createCache(cacheId, config)\n var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)\n var adaptedCache = adaptedCaches[cacheId] = {}\n // Determine whether to perform deepcopying or not\n var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies\n var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy\n var copy = function (value) {\n return deepCopy ? deepcopy(value) : value\n }\n\n angular.forEach(cacheAdapterMethods, function (method) {\n var adapterMethod = cacheAdapters[config.cacheService].methods[method]\n var wrappedMethod\n var wrappedRawMethod\n\n // Wrap set/get methods to set/get to the `responseData` property of an\n // object. This is where the $http interceptor stores response data.\n if (method === 'getItem') {\n wrappedMethod = function getCacheItemResponseData (cache, itemKey, options) {\n var cachedData = adapterMethod(cache, itemKey, options)\n return cachedData && copy(cachedData.responseData)\n }\n\n wrappedRawMethod = function getCacheItemData (cache, itemKey, options) {\n return copy(adapterMethod(cache, itemKey, options))\n }\n }\n\n if (method === 'setItem') {\n wrappedMethod = function setCacheItemResponseData (cache, itemKey, value, options) {\n var cachedData = adaptedCache.$getItem(itemKey)\n value = copy(value)\n\n if (cachedData && typeof cachedData === 'object') {\n cachedData.responseData = value\n value = cachedData\n } else value = { responseData: value }\n\n adapterMethod(cache, itemKey, value, options)\n }\n\n wrappedRawMethod = function setCacheItemData (cache, itemKey, value, options) {\n adapterMethod(cache, itemKey, copy(value), options)\n }\n }\n\n adaptedCache[method] = angular.bind({}, (wrappedMethod || adapterMethod), cache)\n if (wrappedRawMethod) {\n adaptedCache['$' + method] = angular.bind({}, wrappedRawMethod, cache)\n }\n })\n\n adaptedCache.unsetItem = function adaptedCacheUnsetItemCache (itemKey) {\n adaptedCache.setItem(itemKey, undefined)\n }\n adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {\n var data = adaptedCache.$getItem(itemKey)\n delete data.etagHeader\n adaptedCache.$setItem(itemKey, data)\n }\n adaptedCache.getItemCache = function adaptedCacheGetItemCache (itemKey) {\n return httpEtagService.getItemCache(cacheId, itemKey)\n }\n adaptedCache.info = function adaptedCacheInfo () {\n return cacheDefinitions[cacheId]\n }\n adaptedCache.isCache = true\n })\n\n httpEtagService.info = function httpEtagServiceInfo () {\n return cacheDefinitions\n }\n\n httpEtagService.getCache = function httpEtagServiceGetCache (cacheId) {\n var cache = adaptedCaches[processCacheId(cacheId)]\n if (cache) return cache\n }\n\n httpEtagService.getItemCache = function httpEtagServiceGeItemCache (cacheId, itemKey) {\n var cache = httpEtagService.getCache(cacheId)\n var itemCache = {}\n if (!cache) return\n\n var methodMappings = [\n ['set', 'setItem'],\n ['get', 'getItem'],\n ['$set', '$setItem'],\n ['$get', '$getItem'],\n ['unset', 'unsetItem'],\n ['expire', 'expireItem'],\n ['remove', 'removeItem']\n ]\n\n angular.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) {\n itemCache[methods[0]] = angular.bind({}, cache[methods[1]], itemKey)\n })\n\n itemCache.info = function itemCacheInfo () {\n var itemCacheInfo = cache.info()\n itemCacheInfo.itemKey = itemKey\n return itemCacheInfo\n }\n\n itemCache.isItemCache = true\n\n return itemCache\n }\n\n httpEtagService.purgeCaches = function httpEtagPurgeCaches () {\n angular.forEach(adaptedCaches, function (cache) {\n cache.removeAllItems()\n })\n }\n\n function processCacheId (cacheId) {\n var type = typeof cacheId\n var isDefined = type === 'number' || (type === 'string' && !!cacheId)\n return isDefined ? cacheId : defaultCacheId\n }\n\n return httpEtagService\n }]\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/service.js\n// module id = 5\n// module chunks = 0","module.exports = function (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = xs[i];\n if (hasOwn.call(xs, i)) res.push(f(x, i, xs));\n }\n return res;\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/array-map/index.js\n// module id = 6\n// module chunks = 0","module.exports = require('./lib');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/deepcopy/index.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\nexports.copyValue = exports.copyCollection = exports.copy = void 0;\n\nvar _polyfill = require('./polyfill');\n\nvar toString = Object.prototype.toString;\n\nfunction copy(target, customizer) {\n var resultValue = copyValue(target);\n\n if (resultValue !== null) {\n return resultValue;\n }\n\n return copyCollection(target, customizer);\n}\n\nfunction copyCollection(target, customizer) {\n if (typeof customizer !== 'function') {\n throw new TypeError('customizer is must be a Function');\n }\n\n if (typeof target === 'function') {\n var source = String(target);\n\n // NOTE:\n //\n // https://gist.github.com/jdalton/5e34d890105aca44399f\n //\n // - https://gist.github.com/jdalton/5e34d890105aca44399f#gistcomment-1283831\n // - http://es5.github.io/#x15\n //\n // native functions does not have prototype:\n //\n // Object.toString.prototype // => undefined\n // (function() {}).prototype // => {}\n //\n // but cannot detect native constructor:\n //\n // typeof Object // => 'function'\n // Object.prototype // => {}\n //\n // and cannot detect null binded function:\n //\n // String(Math.abs)\n // // => 'function abs() { [native code] }'\n //\n // Firefox, Safari:\n // String((function abs() {}).bind(null))\n // // => 'function abs() { [native code] }'\n //\n // Chrome:\n // String((function abs() {}).bind(null))\n // // => 'function () { [native code] }'\n if (/^\\s*function\\s*\\S*\\([^\\)]*\\)\\s*{\\s*\\[native code\\]\\s*}/.test(source)) {\n // native function\n return target;\n } else {\n // user defined function\n return new Function('return ' + String(source))();\n }\n }\n\n var targetClass = toString.call(target);\n\n if (targetClass === '[object Array]') {\n return [];\n }\n\n if (targetClass === '[object Object]' && target.constructor === Object) {\n return {};\n }\n\n if (targetClass === '[object Date]') {\n // NOTE:\n //\n // Firefox need to convert\n //\n // Firefox:\n // var date = new Date;\n // +date; // 1420909365967\n // +new Date(date); // 1420909365000\n // +new Date(+date); // 1420909365967\n //\n // Chrome:\n // var date = new Date;\n // +date; // 1420909757913\n // +new Date(date); // 1420909757913\n // +new Date(+date); // 1420909757913\n return new Date(target.getTime());\n }\n\n if (targetClass === '[object RegExp]') {\n // NOTE:\n //\n // Chrome, Safari:\n // (new RegExp).source => \"(?:)\"\n //\n // Firefox:\n // (new RegExp).source => \"\"\n //\n // Chrome, Safari, Firefox:\n // String(new RegExp) => \"/(?:)/\"\n var regexpText = String(target),\n slashIndex = regexpText.lastIndexOf('/');\n\n return new RegExp(regexpText.slice(1, slashIndex), regexpText.slice(slashIndex + 1));\n }\n\n if ((0, _polyfill.isBuffer)(target)) {\n var buffer = new Buffer(target.length);\n\n target.copy(buffer);\n\n return buffer;\n }\n\n var customizerResult = customizer(target);\n\n if (customizerResult !== void 0) {\n return customizerResult;\n }\n\n return null;\n}\n\nfunction copyValue(target) {\n var targetType = typeof target;\n\n // copy String, Number, Boolean, undefined and Symbol\n // without null and Function\n if (target !== null && targetType !== 'object' && targetType !== 'function') {\n return target;\n }\n\n return null;\n}\n\nexports.copy = copy;\nexports.copyCollection = copyCollection;\nexports.copyValue = copyValue;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/deepcopy/lib/copy.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nexports.__esModule = true;\n\nvar _copy = require('./copy');\n\nvar _polyfill = require('./polyfill');\n\nfunction defaultCustomizer(target) {\n return void 0;\n}\n\nfunction deepcopy(target) {\n var customizer = arguments.length <= 1 || arguments[1] === void 0 ? defaultCustomizer : arguments[1];\n\n if (target === null) {\n // copy null\n return null;\n }\n\n var resultValue = (0, _copy.copyValue)(target);\n\n if (resultValue !== null) {\n // copy some primitive types\n return resultValue;\n }\n\n var resultCollection = (0, _copy.copyCollection)(target, customizer),\n clone = resultCollection !== null ? resultCollection : target;\n\n var visited = [target],\n reference = [clone];\n\n // recursively copy from collection\n return recursiveCopy(target, customizer, clone, visited, reference);\n}\n\nfunction recursiveCopy(target, customizer, clone, visited, reference) {\n if (target === null) {\n // copy null\n return null;\n }\n\n var resultValue = (0, _copy.copyValue)(target);\n\n if (resultValue !== null) {\n // copy some primitive types\n return resultValue;\n }\n\n var keys = (0, _polyfill.getKeys)(target).concat((0, _polyfill.getSymbols)(target));\n\n var i = void 0,\n len = void 0;\n\n var key = void 0,\n value = void 0,\n index = void 0,\n resultCopy = void 0,\n result = void 0,\n ref = void 0;\n\n for (i = 0, len = keys.length; i < len; ++i) {\n key = keys[i];\n value = target[key];\n index = (0, _polyfill.indexOf)(visited, value);\n\n resultCopy = void 0;\n result = void 0;\n ref = void 0;\n\n if (index === -1) {\n resultCopy = (0, _copy.copy)(value, customizer);\n result = resultCopy !== null ? resultCopy : value;\n\n if (value !== null && /^(?:function|object)$/.test(typeof value)) {\n visited.push(value);\n reference.push(result);\n }\n } else {\n // circular reference\n ref = reference[index];\n }\n\n clone[key] = ref || recursiveCopy(value, customizer, result, visited, reference);\n }\n\n return clone;\n}\n\nexports['default'] = deepcopy;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/deepcopy/lib/index.js\n// module id = 9\n// module chunks = 0","'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\nvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar excludedKeys = {\n\t$console: true,\n\t$external: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$innerHeight: true,\n\t$innerWidth: true,\n\t$outerHeight: true,\n\t$outerWidth: true,\n\t$pageXOffset: true,\n\t$pageYOffset: true,\n\t$parent: true,\n\t$scrollLeft: true,\n\t$scrollTop: true,\n\t$scrollX: true,\n\t$scrollY: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/object-keys/index.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/object-keys/isArguments.js\n// module id = 11\n// module chunks = 0","import angular from 'angular'\nimport service from './service'\nimport httpDecorator from './httpDecorator'\nimport httpInterceptor from './httpInterceptor'\nimport cacheServiceAdapters from './cacheServiceAdapters'\n\nexport default angular\n .module('http-etag', [])\n .provider('httpEtag', service)\n .config(cacheServiceAdapters)\n .config(['$provide', '$httpProvider', function addHttpEtagInterceptor ($provide, $httpProvider) {\n httpDecorator.useLegacyPromiseExtensions =\n $httpProvider.useLegacyPromiseExtensions ||\n function useLegacyPromiseExtensions () {\n return angular.version.major === 1 && angular.version.minor < 6\n }\n $provide.decorator('$http', httpDecorator)\n $httpProvider.interceptors.push(httpInterceptor)\n }])\n .name\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 12\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://http-etag/webpack/universalModuleDefinition","webpack://http-etag/webpack/bootstrap","webpack://http-etag/external \"angular\"","webpack://http-etag/./node_modules/array-map/index.js","webpack://http-etag/./node_modules/type-detect/type-detect.js","webpack://http-etag/./node_modules/object-keys/index.js","webpack://http-etag/(webpack)/buildin/global.js","webpack://http-etag/./node_modules/object-keys/isArguments.js","webpack://http-etag/./node_modules/deepcopy/src/buffer.mjs","webpack://http-etag/./node_modules/deepcopy/src/detector.mjs","webpack://http-etag/./node_modules/deepcopy/src/collection.mjs","webpack://http-etag/./node_modules/deepcopy/src/copy_map.mjs","webpack://http-etag/./node_modules/deepcopy/src/copier.mjs","webpack://http-etag/./node_modules/deepcopy/src/index.mjs","webpack://http-etag/./src/service.js","webpack://http-etag/./src/httpDecorator.js","webpack://http-etag/./src/httpInterceptor.js","webpack://http-etag/./src/cacheServiceAdapters.js","webpack://http-etag/./src/index.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","xs","f","map","res","length","x","hasOwn","push","global","this","promiseExists","Promise","globalObject","self","symbolExists","mapExists","Map","setExists","Set","weakMapExists","WeakMap","weakSetExists","WeakSet","dataViewExists","DataView","symbolIteratorExists","iterator","symbolToStringTagExists","setEntriesExists","entries","mapEntriesExists","setIteratorPrototype","getPrototypeOf","mapIteratorPrototype","arrayIteratorExists","Array","arrayIteratorPrototype","stringIteratorExists","String","stringIteratorPrototype","toStringLeftSliceLength","toStringRightSliceLength","obj","typeofObj","isArray","location","document","navigator","mimeTypes","plugins","HTMLElement","tagName","stringTag","objPrototype","RegExp","Date","toString","slice","has","toStr","isArgs","isEnumerable","propertyIsEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","constructor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","k","e","keysShim","isObject","isFunction","isArguments","isString","theKeys","TypeError","skipProto","j","skipConstructor","equalsConstructorPrototypeIfNotBuggy","shim","keys","arguments","originalKeys","g","Function","eval","str","callee","isBufferExists","Buffer","isBufferFromExists","from","isBuffer","buffer_copy","detectType","type_detect","collectionTypeSet","collection","type","isCollection","set","add","copyTypedArray","shallowCopy","getEmptyArray","copy_map","Boolean","valueOf","buffer","getTime","Number","source","flags","copier_copy","customizer","valueType","copyFunction","result","undefined","recursiveCopy","clone","references","visited","copiedValue","getOwnPropertySymbols","collectionKey","collectionValue","collectionValueType","copiedCollectionValue","httpEtagProvider","serviceAdapterMethods","cacheAdapterMethods","requiredAdapterMethods","concat","cacheAdapters","cacheDefinitions","defaultCacheId","defaultEtagCacheConfig","deepCopy","cacheResponseData","cacheService","cacheOptions","number","setDefaultCacheConfig","config","external_angular_default","a","extend","getDefaultCacheConfig","defineCache","cacheId","id","defineCacheServiceAdapter","serviceName","Error","methods","forEach","method","getCacheServiceAdapter","$get","$injector","httpEtagService","services","adaptedServices","caches","adaptedCaches","adapter","service","adaptedService","createCache","cache","getCache","adaptedCache","serviceDeepCopies","storesDeepCopies","copy","options","deepcopy","wrappedMethod","wrappedRawMethod","adapterMethod","itemKey","cachedData","responseData","$getItem","unsetItem","setItem","expireItem","data","etagHeader","$setItem","getItemCache","info","isCache","processCacheId","itemCache","itemCacheInfo","isItemCache","purgeCaches","removeAllItems","httpDecorator","httpEtagHttpDecorator","$delegate","httpEtag","$http","cachableHttpMethods","$httpDecorator","httpConfig","httpPromise","useLegacyPromiseExtensions","hasConfig","etagCache","isCacheableMethod","indexOf","etagCacheConfig","etagValue","etagValueType","generateCacheItemKey","processHttpConfigEtagValue","cacheInfo","rawCacheData","cachedEtag","cachedResponse","$$_itemCache","headers","If-None-Match","httpEtagPromiseFactory","then","success","cached","callback","ifCached","status","successCallback","errorCallback","progressBackCallback","thenPromise","apply","response","partializedCallback","fn","args","arg","partial","url","params","array_map_default","object_keys_default","sort","val","val2","encodeURIComponent","join","stringifyParams","joiner","httpMethod","toLowerCase","$inject","httpInterceptor","etag","cacheData","$set","cacheServiceAdapters","cacheAdaptersConfig","$cacheFactory","put","getItem","removeItem","remove","removeAll","noop","localStorage","JSON","stringify","parse","keyPrefix","sessionStorage","__webpack_exports__","provider","src_service","$provide","$httpProvider","version","major","minor","decorator","interceptors"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,YACA,mBAAAC,eAAAC,IACAD,QAAA,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AAA+B,EACA2F,KAAAE,MAAAE,eAAAV,QAAArF,KAEAsF,WAAA,SAAArH,EAAA+B,GACAA,EAAA/B,EAAA,IAAA+B,EACA+F,eAAAT,WAAAtF,IAEAkB,eAAA,SAAAjD,EAAA+B,GACA,IAAA8F,EAAA7H,EAAA,IAEAL,EAAAC,EAAAU,QAAAwH,eAAA,SAAA7T,EAAAM,GACA,IAAAA,EAAAwP,QAAA8D,IACAC,eAAAT,WAAA9S,SAlGA0S,EAAAN,SAAA,oBCEAoB,EAAA,QAAApI,EAAAC,EACArN,OAAA,gBACAyV,SAAA,WAAAC,GACAvI,OAAAsH,GACAtH,QAAA,oCAAAwI,EAAAC,GACAjF,EAAAS,2BACAwE,EAAAxE,4BACA,WACA,WAAAhE,EAAAC,EAAAwI,QAAAC,OAAA1I,EAAAC,EAAAwI,QAAAE,MAAA,GAEAJ,EAAAK,UAAA,QAAArF,GACAiF,EAAAK,aAAAjT,KAAAqR,MAEA","file":"angular-http-etag.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"http-etag\"] = factory(require(\"angular\"));\n\telse\n\t\troot[\"http-etag\"] = factory(root[\"angular\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = function (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = xs[i];\n if (hasOwn.call(xs, i)) res.push(f(x, i, xs));\n }\n return res;\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.typeDetect = factory());\n}(this, (function () { 'use strict';\n\n/* !\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\nvar promiseExists = typeof Promise === 'function';\n\n/* eslint-disable no-undef */\nvar globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist\n\nvar symbolExists = typeof Symbol !== 'undefined';\nvar mapExists = typeof Map !== 'undefined';\nvar setExists = typeof Set !== 'undefined';\nvar weakMapExists = typeof WeakMap !== 'undefined';\nvar weakSetExists = typeof WeakSet !== 'undefined';\nvar dataViewExists = typeof DataView !== 'undefined';\nvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\nvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\nvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\nvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\nvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\nvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\nvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\nvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\nvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\nvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\nvar toStringLeftSliceLength = 8;\nvar toStringRightSliceLength = -1;\n/**\n * ### typeOf (obj)\n *\n * Uses `Object.prototype.toString` to determine the type of an object,\n * normalising behaviour across engine versions & well optimised.\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nfunction typeDetect(obj) {\n /* ! Speed optimisation\n * Pre:\n * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)\n * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)\n * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)\n * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)\n * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)\n * Post:\n * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)\n * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)\n * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)\n * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)\n * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)\n */\n var typeofObj = typeof obj;\n if (typeofObj !== 'object') {\n return typeofObj;\n }\n\n /* ! Speed optimisation\n * Pre:\n * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)\n * Post:\n * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)\n */\n if (obj === null) {\n return 'null';\n }\n\n /* ! Spec Conformance\n * Test: `Object.prototype.toString.call(window)``\n * - Node === \"[object global]\"\n * - Chrome === \"[object global]\"\n * - Firefox === \"[object Window]\"\n * - PhantomJS === \"[object Window]\"\n * - Safari === \"[object Window]\"\n * - IE 11 === \"[object Window]\"\n * - IE Edge === \"[object Window]\"\n * Test: `Object.prototype.toString.call(this)``\n * - Chrome Worker === \"[object global]\"\n * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n */\n if (obj === globalObject) {\n return 'global';\n }\n\n /* ! Speed optimisation\n * Pre:\n * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)\n * Post:\n * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)\n */\n if (\n Array.isArray(obj) &&\n (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n ) {\n return 'Array';\n }\n\n // Not caching existence of `window` and related properties due to potential\n // for `window` to be unset before tests in quasi-browser environments.\n if (typeof window === 'object' && window !== null) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n * WhatWG HTML$7.7.3 - The `Location` interface\n * Test: `Object.prototype.toString.call(window.location)``\n * - IE <=11 === \"[object Object]\"\n * - IE Edge <=13 === \"[object Object]\"\n */\n if (typeof window.location === 'object' && obj === window.location) {\n return 'Location';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#document)\n * WhatWG HTML$3.1.1 - The `Document` object\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * WhatWG HTML states:\n * > For historical reasons, Window objects must also have a\n * > writable, configurable, non-enumerable property named\n * > HTMLDocument whose value is the Document interface object.\n * Test: `Object.prototype.toString.call(document)``\n * - Chrome === \"[object HTMLDocument]\"\n * - Firefox === \"[object HTMLDocument]\"\n * - Safari === \"[object HTMLDocument]\"\n * - IE <=10 === \"[object Document]\"\n * - IE 11 === \"[object HTMLDocument]\"\n * - IE Edge <=13 === \"[object HTMLDocument]\"\n */\n if (typeof window.document === 'object' && obj === window.document) {\n return 'Document';\n }\n\n if (typeof window.navigator === 'object') {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n * - IE <=10 === \"[object MSMimeTypesCollection]\"\n */\n if (typeof window.navigator.mimeTypes === 'object' &&\n obj === window.navigator.mimeTypes) {\n return 'MimeTypeArray';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n * Test: `Object.prototype.toString.call(navigator.plugins)``\n * - IE <=10 === \"[object MSPluginsCollection]\"\n */\n if (typeof window.navigator.plugins === 'object' &&\n obj === window.navigator.plugins) {\n return 'PluginArray';\n }\n }\n\n if ((typeof window.HTMLElement === 'function' ||\n typeof window.HTMLElement === 'object') &&\n obj instanceof window.HTMLElement) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n * - IE <=10 === \"[object HTMLBlockElement]\"\n */\n if (obj.tagName === 'BLOCKQUOTE') {\n return 'HTMLQuoteElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('td'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TD') {\n return 'HTMLTableDataCellElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('th'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TH') {\n return 'HTMLTableHeaderCellElement';\n }\n }\n }\n\n /* ! Speed optimisation\n * Pre:\n * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)\n * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)\n * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)\n * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)\n * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)\n * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)\n * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)\n * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)\n * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)\n * Post:\n * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)\n * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)\n * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)\n * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)\n * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)\n * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)\n * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)\n * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)\n * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)\n */\n var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n if (typeof stringTag === 'string') {\n return stringTag;\n }\n\n var objPrototype = Object.getPrototypeOf(obj);\n /* ! Speed optimisation\n * Pre:\n * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)\n * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)\n * Post:\n * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)\n * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)\n */\n if (objPrototype === RegExp.prototype) {\n return 'RegExp';\n }\n\n /* ! Speed optimisation\n * Pre:\n * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)\n * Post:\n * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)\n */\n if (objPrototype === Date.prototype) {\n return 'Date';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n * Test: `Object.prototype.toString.call(Promise.resolve())``\n * - Chrome <=47 === \"[object Object]\"\n * - Edge <=20 === \"[object Object]\"\n * - Firefox 29-Latest === \"[object Promise]\"\n * - Safari 7.1-Latest === \"[object Promise]\"\n */\n if (promiseExists && objPrototype === Promise.prototype) {\n return 'Promise';\n }\n\n /* ! Speed optimisation\n * Pre:\n * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)\n * Post:\n * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)\n */\n if (setExists && objPrototype === Set.prototype) {\n return 'Set';\n }\n\n /* ! Speed optimisation\n * Pre:\n * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)\n * Post:\n * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)\n */\n if (mapExists && objPrototype === Map.prototype) {\n return 'Map';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)\n * Post:\n * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)\n */\n if (weakSetExists && objPrototype === WeakSet.prototype) {\n return 'WeakSet';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)\n * Post:\n * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)\n */\n if (weakMapExists && objPrototype === WeakMap.prototype) {\n return 'WeakMap';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n * - Edge <=13 === \"[object Object]\"\n */\n if (dataViewExists && objPrototype === DataView.prototype) {\n return 'DataView';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n * Test: `Object.prototype.toString.call(new Map().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (mapExists && objPrototype === mapIteratorPrototype) {\n return 'Map Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n * Test: `Object.prototype.toString.call(new Set().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (setExists && objPrototype === setIteratorPrototype) {\n return 'Set Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n return 'Array Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n return 'String Iterator';\n }\n\n /* ! Speed optimisation\n * Pre:\n * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)\n * Post:\n * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)\n */\n if (objPrototype === null) {\n return 'Object';\n }\n\n return Object\n .prototype\n .toString\n .call(obj)\n .slice(toStringLeftSliceLength, toStringRightSliceLength);\n}\n\nreturn typeDetect;\n\n})));\n","'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\nvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar excludedKeys = {\n\t$applicationCache: true,\n\t$console: true,\n\t$external: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$innerHeight: true,\n\t$innerWidth: true,\n\t$outerHeight: true,\n\t$outerWidth: true,\n\t$pageXOffset: true,\n\t$pageYOffset: true,\n\t$parent: true,\n\t$scrollLeft: true,\n\t$scrollTop: true,\n\t$scrollX: true,\n\t$scrollY: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","const isBufferExists = typeof Buffer !== 'undefined';\nconst isBufferFromExists = isBufferExists && typeof Buffer.from !== 'undefined';\n\nexport const isBuffer = isBufferExists\n ? /**\n * is value is Buffer?\n *\n * @param {*} value\n * @return {boolean}\n */\n function isBuffer(value) {\n return Buffer.isBuffer(value);\n }\n : /**\n * return false\n *\n * NOTE: for Buffer unsupported\n *\n * @return {boolean}\n */\n function isBuffer() {\n return false;\n };\n\nexport const copy = isBufferFromExists\n ? /**\n * copy Buffer\n *\n * @param {Buffer} value\n * @return {Buffer}\n */\n function copy(value) {\n return Buffer.from(value);\n }\n : isBufferExists\n ? /**\n * copy Buffer\n *\n * NOTE: for old node.js\n *\n * @param {Buffer} value\n * @return {Buffer}\n */\n function copy(value) {\n return new Buffer(value);\n }\n : /**\n * shallow copy\n *\n * NOTE: for Buffer unsupported\n *\n * @param {*}\n * @return {*}\n */\n function copy(value) {\n return value;\n };\n","import typeDetect from 'type-detect';\n\nimport { isBuffer } from './buffer';\n\n/**\n * detect type of value\n *\n * @param {*} value\n * @return {string}\n */\nexport function detectType(value) {\n // NOTE: isBuffer must execute before type-detect,\n // because type-detect returns 'Uint8Array'.\n if (isBuffer(value)) {\n return 'Buffer';\n }\n\n return typeDetect(value);\n}\n","import { detectType } from './detector';\n\n/**\n * collection types\n */\nconst collectionTypeSet = new Set([\n 'Arguments',\n 'Array',\n 'Map',\n 'Object',\n 'Set'\n]);\n\n/**\n * get value from collection\n *\n * @param {Array|Object|Map|Set} collection\n * @param {string|number|symbol} key\n * @param {string} [type=null]\n * @return {*}\n */\nexport function get(collection, key, type = null) {\n const valueType = type || detectType(collection);\n\n switch (valueType) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n return collection[key];\n case 'Map':\n return collection.get(key);\n case 'Set':\n // NOTE: Set.prototype.keys is alias of Set.prototype.values\n // it means key is equals value\n return key;\n default:\n }\n}\n\n/**\n * check to type string is collection\n *\n * @param {string} type\n */\nexport function isCollection(type) {\n return collectionTypeSet.has(type);\n}\n\n/**\n * set value to collection\n *\n * @param {Array|Object|Map|Set} collection\n * @param {string|number|symbol} key\n * @param {*} value\n * @param {string} [type=null]\n * @return {Array|Object|Map|Set}\n */\nexport function set(collection, key, value, type = null) {\n const valueType = type || detectType(collection);\n\n switch (valueType) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n collection[key] = value;\n break;\n case 'Map':\n collection.set(key, value);\n break;\n case 'Set':\n collection.add(value);\n break;\n default:\n }\n\n return collection;\n}\n","import { copy as cloneBuffer } from './buffer';\n\nconst globalObject = Function('return this')();\n\n/**\n * copy ArrayBuffer\n *\n * @param {ArrayBuffer} value\n * @return {ArrayBuffer}\n */\nfunction copyArrayBuffer(value) {\n return value.slice(0);\n}\n\n/**\n * copy Boolean\n *\n * @param {Boolean} value\n * @return {Boolean}\n */\nfunction copyBoolean(value) {\n return new Boolean(value.valueOf());\n}\n\n/**\n * copy DataView\n *\n * @param {DataView} value\n * @return {DataView}\n */\nfunction copyDataView(value) {\n // TODO: copy ArrayBuffer?\n return new DataView(value.buffer);\n}\n\n/**\n * copy Buffer\n *\n * @param {Buffer} value\n * @return {Buffer}\n */\nfunction copyBuffer(value) {\n return cloneBuffer(value);\n}\n\n/**\n * copy Date\n *\n * @param {Date} value\n * @return {Date}\n */\nfunction copyDate(value) {\n return new Date(value.getTime());\n}\n\n/**\n * copy Number\n *\n * @param {Number} value\n * @return {Number}\n */\nfunction copyNumber(value) {\n return new Number(value);\n}\n\n/**\n * copy RegExp\n *\n * @param {RegExp} value\n * @return {RegExp}\n */\nfunction copyRegExp(value) {\n return new RegExp(value.source || '(?:)', value.flags);\n}\n\n/**\n * copy String\n *\n * @param {String} value\n * @return {String}\n */\nfunction copyString(value) {\n return new String(value);\n}\n\n/**\n * copy TypedArray\n *\n * @param {*} value\n * @return {*}\n */\nfunction copyTypedArray(value, type) {\n return globalObject[type].from(value);\n}\n\n/**\n * shallow copy\n *\n * @param {*} value\n * @return {*}\n */\nfunction shallowCopy(value) {\n return value;\n}\n\n/**\n * get empty Array\n *\n * @return {Array}\n */\nfunction getEmptyArray() {\n return [];\n}\n\n/**\n * get empty Map\n *\n * @return {Map}\n */\nfunction getEmptyMap() {\n return new Map();\n}\n\n/**\n * get empty Object\n *\n * @return {Object}\n */\nfunction getEmptyObject() {\n return {};\n}\n\n/**\n * get empty Set\n *\n * @return {Set}\n */\nfunction getEmptySet() {\n return new Set();\n}\n\nexport default new Map([\n // deep copy\n ['ArrayBuffer', copyArrayBuffer],\n ['Boolean', copyBoolean],\n ['Buffer', copyBuffer],\n ['DataView', copyDataView],\n ['Date', copyDate],\n ['Number', copyNumber],\n ['RegExp', copyRegExp],\n ['String', copyString],\n\n // typed arrays\n // TODO: pass bound function\n ['Float32Array', copyTypedArray],\n ['Float64Array', copyTypedArray],\n ['Int16Array', copyTypedArray],\n ['Int32Array', copyTypedArray],\n ['Int8Array', copyTypedArray],\n ['Uint16Array', copyTypedArray],\n ['Uint32Array', copyTypedArray],\n ['Uint8Array', copyTypedArray],\n ['Uint8ClampedArray', copyTypedArray],\n\n // shallow copy\n ['Array Iterator', shallowCopy],\n ['Map Iterator', shallowCopy],\n ['Promise', shallowCopy],\n ['Set Iterator', shallowCopy],\n ['String Iterator', shallowCopy],\n ['function', shallowCopy],\n ['global', shallowCopy],\n // NOTE: WeakMap and WeakSet cannot get entries\n ['WeakMap', shallowCopy],\n ['WeakSet', shallowCopy],\n\n // primitives\n ['boolean', shallowCopy],\n ['null', shallowCopy],\n ['number', shallowCopy],\n ['string', shallowCopy],\n ['symbol', shallowCopy],\n ['undefined', shallowCopy],\n\n // collections\n // NOTE: return empty value, because recursively copy later.\n ['Arguments', getEmptyArray],\n ['Array', getEmptyArray],\n ['Map', getEmptyMap],\n ['Object', getEmptyObject],\n ['Set', getEmptySet]\n\n // NOTE: type-detect returns following types\n // 'Location'\n // 'Document'\n // 'MimeTypeArray'\n // 'PluginArray'\n // 'HTMLQuoteElement'\n // 'HTMLTableDataCellElement'\n // 'HTMLTableHeaderCellElement'\n\n // TODO: is type-detect never return 'object'?\n // 'object'\n]);\n","import copyMap from './copy_map';\nimport { detectType } from './detector';\n\n/**\n * no operation\n */\nfunction noop() {}\n\n/**\n * copy value\n *\n * @param {*} value\n * @param {string} [type=null]\n * @param {Function} [customizer=noop]\n * @return {*}\n */\nexport function copy(value, type = null, customizer = noop) {\n if (arguments.length === 2 && typeof type === 'function') {\n customizer = type;\n type = null;\n }\n\n const valueType = type || detectType(value);\n const copyFunction = copyMap.get(valueType);\n\n if (valueType === 'Object') {\n const result = customizer(value, valueType);\n\n if (result !== undefined) {\n return result;\n }\n }\n\n // NOTE: TypedArray needs pass type to argument\n return copyFunction ? copyFunction(value, valueType) : value;\n}\n","import { detectType } from './detector';\nimport { get, isCollection, set } from './collection';\nimport { copy } from './copier';\n\n/**\n * deepcopy function\n *\n * @param {*} value\n * @param {Object|Function} [options]\n * @return {*}\n */\nexport default function deepcopy(value, options = {}) {\n if (typeof options === 'function') {\n options = {\n customizer: options\n };\n }\n\n const {\n // TODO: before/after customizer\n customizer\n // TODO: max depth\n // depth = Infinity,\n } = options;\n\n const valueType = detectType(value);\n\n if (!isCollection(valueType)) {\n return recursiveCopy(value, null, null, null, customizer);\n }\n\n const copiedValue = copy(value, valueType, customizer);\n\n const references = new WeakMap([[value, copiedValue]]);\n const visited = new WeakSet([value]);\n\n return recursiveCopy(value, copiedValue, references, visited, customizer);\n}\n\n/**\n * recursively copy\n *\n * @param {*} value target value\n * @param {*} clone clone of value\n * @param {WeakMap} references visited references of clone\n * @param {WeakSet} visited visited references of value\n * @param {Function} customizer user customize function\n * @return {*}\n */\nfunction recursiveCopy(value, clone, references, visited, customizer) {\n const type = detectType(value);\n const copiedValue = copy(value, type);\n\n // return if not a collection value\n if (!isCollection(type)) {\n return copiedValue;\n }\n\n let keys;\n\n switch (type) {\n case 'Arguments':\n case 'Array':\n keys = Object.keys(value);\n break;\n case 'Object':\n keys = Object.keys(value);\n keys.push(...Object.getOwnPropertySymbols(value));\n break;\n case 'Map':\n case 'Set':\n keys = value.keys();\n break;\n default:\n }\n\n // walk within collection with iterator\n for (let collectionKey of keys) {\n const collectionValue = get(value, collectionKey, type);\n\n if (visited.has(collectionValue)) {\n // for [Circular]\n set(clone, collectionKey, references.get(collectionValue), type);\n } else {\n const collectionValueType = detectType(collectionValue);\n const copiedCollectionValue = copy(collectionValue, collectionValueType);\n\n // save reference if value is collection\n if (isCollection(collectionValueType)) {\n references.set(collectionValue, copiedCollectionValue);\n visited.add(collectionValue);\n }\n\n set(\n clone,\n collectionKey,\n recursiveCopy(\n collectionValue,\n copiedCollectionValue,\n references,\n visited,\n customizer\n ),\n type\n );\n }\n }\n\n // TODO: isSealed/isFrozen/isExtensible\n\n return clone;\n}\n","import angular from 'angular'\nimport deepcopy from 'deepcopy'\n\nexport default httpEtagProvider\n\nfunction httpEtagProvider () {\n var httpEtagProvider = this\n\n var serviceAdapterMethods = [\n 'createCache',\n 'getCache'\n ]\n\n var cacheAdapterMethods = [\n 'setItem',\n 'getItem',\n 'removeItem',\n 'removeAllItems'\n // info method hard-coded\n ]\n\n var requiredAdapterMethods = serviceAdapterMethods.concat(cacheAdapterMethods)\n\n // Built-in adapters defined in ./cacheServiceAdapters.js\n var cacheAdapters = {}\n var cacheDefinitions = {}\n\n // Cache config defaults\n var defaultCacheId = 'httpEtagCache'\n var defaultEtagCacheConfig = {\n deepCopy: false,\n cacheResponseData: true,\n cacheService: '$cacheFactory',\n cacheOptions: {\n number: 25\n }\n }\n\n /**\n * SERVICE PROVIDER\n * .setDefaultCacheConfig(config)\n * .defineCache(cacheId, config)\n * .defineCacheServiceAdapter(serviceName, config)\n * .getCacheServiceAdapter(serviceName)\n */\n\n httpEtagProvider.setDefaultCacheConfig = function httpEtagSetDefaultCacheOptions (config) {\n defaultEtagCacheConfig = angular.extend({}, defaultEtagCacheConfig, config)\n return httpEtagProvider\n }\n\n httpEtagProvider.getDefaultCacheConfig = function httpEtagGetDefaultCacheOptions () {\n return defaultEtagCacheConfig\n }\n\n httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {\n config = angular.extend({}, defaultEtagCacheConfig, config, { id: cacheId })\n cacheDefinitions[cacheId] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.defineCacheServiceAdapter = function httpEtagDefineCacheServiceAdapter (serviceName, config) {\n if (!config) throw new Error('Missing cache service adapter configuration')\n if (!config.methods) throw new Error('Missing cache service adapter configuration methods')\n angular.forEach(requiredAdapterMethods, function (method) {\n if (typeof config.methods[method] !== 'function') {\n throw new Error('Expected cache service adapter method \"' + method + '\" to be a function')\n }\n })\n\n cacheAdapters[serviceName] = config\n return httpEtagProvider\n }\n\n httpEtagProvider.getCacheServiceAdapter = function httpEtagGetCacheServiceAdapter (serviceName) {\n return cacheAdapters[serviceName]\n }\n\n /**\n * SERVICE\n * .info()\n * .getCache(acheId)\n * .getItemCache(cacheId, itemKey)\n */\n\n httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {\n var httpEtagService = {}\n\n var services = {}\n var adaptedServices = {}\n var caches = {}\n var adaptedCaches = {}\n\n // Add default cache if not already defined\n if (!cacheDefinitions[defaultCacheId]) httpEtagProvider.defineCache(defaultCacheId)\n\n // Find/inject cache service and create adapted versions\n angular.forEach(cacheAdapters, function adaptCacheService (adapter, serviceName) {\n var service = services[serviceName] = window[serviceName] || $injector.get(serviceName)\n var adaptedService = adaptedServices[serviceName] = {}\n\n angular.forEach(serviceAdapterMethods, function (method) {\n adaptedService[method] = angular.bind({}, adapter.methods[method], service)\n })\n })\n\n // Instantiate caches and create adapted versions\n angular.forEach(cacheDefinitions, function adaptCache (config, cacheId) {\n adaptedServices[config.cacheService].createCache(cacheId, config)\n var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)\n var adaptedCache = adaptedCaches[cacheId] = {}\n // Determine whether to perform deepcopying or not\n var serviceDeepCopies = cacheAdapters[config.cacheService].config.storesDeepCopies\n var deepCopy = !serviceDeepCopies && cacheDefinitions[cacheId].deepCopy\n var copy = function (value) {\n return deepCopy ? deepcopy(value) : value\n }\n\n angular.forEach(cacheAdapterMethods, function (method) {\n var adapterMethod = cacheAdapters[config.cacheService].methods[method]\n var wrappedMethod\n var wrappedRawMethod\n\n // Wrap set/get methods to set/get to the `responseData` property of an\n // object. This is where the $http interceptor stores response data.\n if (method === 'getItem') {\n wrappedMethod = function getCacheItemResponseData (cache, itemKey, options) {\n var cachedData = adapterMethod(cache, itemKey, options)\n return cachedData && copy(cachedData.responseData)\n }\n\n wrappedRawMethod = function getCacheItemData (cache, itemKey, options) {\n return copy(adapterMethod(cache, itemKey, options))\n }\n }\n\n if (method === 'setItem') {\n wrappedMethod = function setCacheItemResponseData (cache, itemKey, value, options) {\n var cachedData = adaptedCache.$getItem(itemKey)\n value = copy(value)\n\n if (cachedData && typeof cachedData === 'object') {\n cachedData.responseData = value\n value = cachedData\n } else value = { responseData: value }\n\n adapterMethod(cache, itemKey, value, options)\n }\n\n wrappedRawMethod = function setCacheItemData (cache, itemKey, value, options) {\n adapterMethod(cache, itemKey, copy(value), options)\n }\n }\n\n adaptedCache[method] = angular.bind({}, (wrappedMethod || adapterMethod), cache)\n if (wrappedRawMethod) {\n adaptedCache['$' + method] = angular.bind({}, wrappedRawMethod, cache)\n }\n })\n\n adaptedCache.unsetItem = function adaptedCacheUnsetItemCache (itemKey) {\n adaptedCache.setItem(itemKey, undefined)\n }\n adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {\n var data = adaptedCache.$getItem(itemKey)\n delete data.etagHeader\n adaptedCache.$setItem(itemKey, data)\n }\n adaptedCache.getItemCache = function adaptedCacheGetItemCache (itemKey) {\n return httpEtagService.getItemCache(cacheId, itemKey)\n }\n adaptedCache.info = function adaptedCacheInfo () {\n return cacheDefinitions[cacheId]\n }\n adaptedCache.isCache = true\n })\n\n httpEtagService.info = function httpEtagServiceInfo () {\n return cacheDefinitions\n }\n\n httpEtagService.getCache = function httpEtagServiceGetCache (cacheId) {\n var cache = adaptedCaches[processCacheId(cacheId)]\n if (cache) return cache\n }\n\n httpEtagService.getItemCache = function httpEtagServiceGeItemCache (cacheId, itemKey) {\n var cache = httpEtagService.getCache(cacheId)\n var itemCache = {}\n if (!cache) return\n\n var methodMappings = [\n ['set', 'setItem'],\n ['get', 'getItem'],\n ['$set', '$setItem'],\n ['$get', '$getItem'],\n ['unset', 'unsetItem'],\n ['expire', 'expireItem'],\n ['remove', 'removeItem']\n ]\n\n angular.forEach(methodMappings, function mapCacheMethdodsToItemCache (methods) {\n itemCache[methods[0]] = angular.bind({}, cache[methods[1]], itemKey)\n })\n\n itemCache.info = function itemCacheInfo () {\n var itemCacheInfo = cache.info()\n itemCacheInfo.itemKey = itemKey\n return itemCacheInfo\n }\n\n itemCache.isItemCache = true\n\n return itemCache\n }\n\n httpEtagService.purgeCaches = function httpEtagPurgeCaches () {\n angular.forEach(adaptedCaches, function (cache) {\n cache.removeAllItems()\n })\n }\n\n function processCacheId (cacheId) {\n var type = typeof cacheId\n var isDefined = type === 'number' || (type === 'string' && !!cacheId)\n return isDefined ? cacheId : defaultCacheId\n }\n\n return httpEtagService\n }]\n}\n","import angular from 'angular'\nimport objectKeys from 'object-keys'\nimport arrayMap from 'array-map'\n\nexport default httpEtagHttpDecorator\n\nhttpEtagHttpDecorator.$inject = ['$delegate', 'httpEtag']\n\nfunction httpEtagHttpDecorator ($delegate, httpEtag) {\n var $http = $delegate\n var cachableHttpMethods = [\n 'GET',\n 'JSONP'\n ]\n\n function $httpDecorator (httpConfig) {\n var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()\n var hasConfig = !!httpConfig.etagCache\n var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0\n var isCachable = hasConfig && isCacheableMethod\n var httpPromise\n\n if (isCachable) {\n var etagCacheConfig = processHttpConfigEtagValue(httpConfig)\n if (etagCacheConfig) {\n var itemCache = httpEtag.getItemCache(etagCacheConfig.id, etagCacheConfig.itemKey)\n if (!itemCache) throw new Error('No defined ETag caches match specified cache ID')\n\n var cacheInfo = itemCache.info()\n var rawCacheData = itemCache.$get()\n var cachedEtag = rawCacheData && rawCacheData.etagHeader\n var cachedResponse = cachedEtag && rawCacheData.responseData\n\n // Allow easy access to cache in interceptor\n httpConfig.$$_itemCache = itemCache\n\n if (cachedEtag) {\n httpConfig.headers = angular.extend({}, httpConfig.headers, {\n 'If-None-Match': cachedEtag\n })\n }\n }\n }\n\n httpPromise = $http.apply($http, arguments)\n httpEtagPromiseFactory(httpPromise)\n\n function httpEtagPromiseFactory (httpPromise) {\n var then = httpPromise.then\n var success = httpPromise.success\n\n if (useLegacyPromiseExtensions) {\n httpPromise.cached = function httpEtagPromiseCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n callback(cachedResponse, 'cached', undefined, httpConfig, itemCache)\n }\n return httpPromise\n }\n } else {\n httpPromise.cached = function deprecatedEtagPromiseCached () {\n throw new Error('The method `cached` on the promise returned from `$http` has been disabled in favor of `ifCached`.')\n }\n }\n\n httpPromise.ifCached = function httpEtagPromiseIfCached (callback) {\n if (rawCacheData && cacheInfo.cacheResponseData) {\n // We're simply mimicking the Angular API here, so... sorry, Standard.\n // eslint-disable-next-line standard/no-callback-literal\n callback({\n data: cachedResponse,\n status: 'cached',\n headers: undefined,\n config: httpConfig\n }, itemCache)\n }\n return httpPromise\n }\n\n httpPromise.then = function httpEtagThenWrapper (successCallback, errorCallback, progressBackCallback) {\n var thenPromise = then.apply(httpPromise, [\n successCallback ? httpEtagSuccessWrapper : undefined,\n errorCallback ? httpEtagErrorWrapper : undefined,\n progressBackCallback\n ])\n\n function httpEtagSuccessWrapper (response) {\n return successCallback(response, itemCache)\n }\n\n function httpEtagErrorWrapper (response) {\n return errorCallback(response, itemCache)\n }\n\n return httpEtagPromiseFactory(thenPromise)\n }\n\n if (useLegacyPromiseExtensions && itemCache) {\n httpPromise.success = function httpEtagPromiseSuccess (callback) {\n var partializedCallback = partial(callback, undefined, undefined, undefined, undefined, itemCache)\n return success.apply(httpPromise, [partializedCallback])\n }\n }\n\n return httpPromise\n }\n\n return httpPromise\n }\n\n // Decorate the cachable shortcut methods, too\n angular.forEach(cachableHttpMethods, function (httpMethod) {\n var method = httpMethod.toLowerCase()\n $httpDecorator[method] = function httpEtagHttpShortcutWrapper (url, config) {\n config = angular.extend({}, config, {\n method: httpMethod,\n url: url\n })\n\n return $httpDecorator.call($http, config)\n }\n })\n\n // Copy over all other properties and methods\n angular.forEach($http, function copyHttpPropertyToDectorator (value, key) {\n if (!$httpDecorator[key]) $httpDecorator[key] = value\n })\n\n /**\n * HELPERS\n */\n\n function processHttpConfigEtagValue (httpConfig) {\n var etagValue = httpConfig.etagCache\n var etagValueType = typeof etagValue\n var etagCacheConfig = {}\n\n // Evaluate function first\n if (etagValueType === 'function') {\n etagValue = etagValue(httpConfig)\n etagValueType = typeof etagValue\n }\n\n // Plain, cache, or itemCache objects\n if (etagValueType === 'object') {\n var id, itemKey\n\n if (etagValue.isCache) {\n id = etagValue.info().id\n itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue.isItemCache) {\n id = etagValue.info().id\n itemKey = etagValue.info().itemKey\n } else {\n id = etagValue.id\n itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig)\n }\n\n etagCacheConfig.id = id\n etagCacheConfig.itemKey = itemKey\n } else if (etagValueType === 'string') {\n etagCacheConfig.id = etagValue\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else if (etagValue === true) {\n // Undefined cacheId will use the default cacheId as defined in provider\n etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)\n } else return\n return etagCacheConfig\n }\n\n function generateCacheItemKey (httpConfig) {\n var url = httpConfig.url\n var params = stringifyParams(httpConfig.params)\n var joiner = ((params && url.indexOf('?') > 0) ? '&' : '?')\n var queryString = (params && joiner + params) || ''\n return url + queryString\n }\n\n // Based on npm package \"query-string\"\n function stringifyParams (obj) {\n return obj ? arrayMap(objectKeys(obj).sort(), function (key) {\n var val = obj[key]\n\n if (angular.isArray(val)) {\n return arrayMap(val.sort(), function (val2) {\n return encodeURIComponent(key) + '=' + encodeURIComponent(val2)\n }).join('&')\n }\n\n return encodeURIComponent(key) + '=' + encodeURIComponent(val)\n }).join('&') : ''\n }\n\n // http://ejohn.org/blog/partial-functions-in-javascript/\n function partial (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n return function () {\n var arg = 0\n for (var i = 0; i < args.length && arg < arguments.length; i++) {\n if (args[i] === undefined) args[i] = arguments[arg++]\n }\n return fn.apply(this, args)\n }\n }\n\n return $httpDecorator\n}\n","export default httpEtagInterceptorFactory\n\nfunction httpEtagInterceptorFactory () {\n function responseInterceptor (response) {\n var itemCache = response.config.$$_itemCache\n\n if (itemCache) {\n var cacheInfo = itemCache.info()\n var cacheResponseData = cacheInfo.cacheResponseData\n var etag = response.headers().etag\n var cacheData = {}\n\n if (etag) {\n cacheData.etagHeader = etag\n if (cacheResponseData) cacheData.responseData = response.data\n itemCache.$set(cacheData)\n }\n\n delete response.config.$$_itemCache\n }\n\n return response\n }\n\n return {\n response: responseInterceptor\n }\n}\n","import angular from 'angular'\n\nexport default cacheAdaptersConfig\n\ncacheAdaptersConfig.$inject = ['httpEtagProvider']\n\nfunction cacheAdaptersConfig (httpEtagProvider) {\n httpEtagProvider\n\n .defineCacheServiceAdapter('$cacheFactory', {\n config: {\n storesDeepCopies: false\n },\n methods: {\n createCache: function createCache ($cacheFactory, cacheId, options) {\n $cacheFactory(cacheId, options)\n },\n getCache: function getCache ($cacheFactory, cacheId) {\n return $cacheFactory.get(cacheId)\n },\n setItem: function setItem (cache, itemKey, value) {\n cache.put(itemKey, value)\n },\n getItem: function getItem (cache, itemKey) {\n return cache.get(itemKey)\n },\n removeItem: function removeItem (cache, itemKey) {\n cache.remove(itemKey)\n },\n removeAllItems: function removeAllItems (cache, itemKey) {\n cache.removeAll()\n }\n }\n })\n\n .defineCacheServiceAdapter('localStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: angular.noop,\n getCache: function getCache (localStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n localStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(localStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n localStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n angular.forEach(localStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key)\n }\n })\n }\n }\n })\n\n .defineCacheServiceAdapter('sessionStorage', {\n config: {\n storesDeepCopies: true\n },\n methods: {\n createCache: angular.noop,\n getCache: function getCache (sessionStorage, cacheId) {\n return cacheId\n },\n setItem: function setItem (cacheId, itemKey, value) {\n try {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.setItem(itemKey, JSON.stringify(value))\n } catch (e) {\n\n }\n },\n getItem: function getItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n return JSON.parse(sessionStorage.getItem(itemKey))\n },\n removeItem: function removeItem (cacheId, itemKey) {\n itemKey = cacheId + ':' + itemKey\n sessionStorage.removeItem(itemKey)\n },\n removeAllItems: function removeAllItems (cacheId, itemKey) {\n var keyPrefix = cacheId + ':'\n\n angular.forEach(sessionStorage, function (value, key) {\n if (key.indexOf(keyPrefix) === 0) {\n sessionStorage.removeItem(key)\n }\n })\n }\n }\n })\n}\n","import angular from 'angular'\nimport service from './service'\nimport httpDecorator from './httpDecorator'\nimport httpInterceptor from './httpInterceptor'\nimport cacheServiceAdapters from './cacheServiceAdapters'\n\nexport default angular\n .module('http-etag', [])\n .provider('httpEtag', service)\n .config(cacheServiceAdapters)\n .config(['$provide', '$httpProvider', function addHttpEtagInterceptor ($provide, $httpProvider) {\n httpDecorator.useLegacyPromiseExtensions =\n $httpProvider.useLegacyPromiseExtensions ||\n function useLegacyPromiseExtensions () {\n return angular.version.major === 1 && angular.version.minor < 6\n }\n $provide.decorator('$http', httpDecorator)\n $httpProvider.interceptors.push(httpInterceptor)\n }])\n .name\n"],"sourceRoot":""} \ No newline at end of file