-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmc-client.common.js.map
1 lines (1 loc) · 82.3 KB
/
tmc-client.common.js.map
1
{"version":3,"file":"tmc-client.common.js","mappings":"yCAAA,WACE,aAEA,IAAIA,KAAKC,MAAT,CAuCAC,EAAQC,UAAUC,OAAS,SAASC,EAAMC,GACxCD,EAAOE,EAAcF,GACrBC,EAAQE,EAAeF,GACvB,IAAIG,EAAOC,KAAKC,IAAIN,GACfI,IACHA,EAAO,GACPC,KAAKC,IAAIN,GAAQI,GAEnBA,EAAKG,KAAKN,EACZ,EAEAJ,EAAQC,UAAkB,OAAI,SAASE,UAC9BK,KAAKC,IAAIJ,EAAcF,GAChC,EAEAH,EAAQC,UAAUU,IAAM,SAASR,GAC/B,IAAIS,EAASJ,KAAKC,IAAIJ,EAAcF,IACpC,OAAOS,EAASA,EAAO,GAAK,IAC9B,EAEAZ,EAAQC,UAAUY,OAAS,SAASV,GAClC,OAAOK,KAAKC,IAAIJ,EAAcF,KAAU,EAC1C,EAEAH,EAAQC,UAAUa,IAAM,SAASX,GAC/B,OAAOK,KAAKC,IAAIM,eAAeV,EAAcF,GAC/C,EAEAH,EAAQC,UAAUe,IAAM,SAASb,EAAMC,GACrCI,KAAKC,IAAIJ,EAAcF,IAAS,CAACG,EAAeF,GAClD,EAGAJ,EAAQC,UAAUgB,QAAU,SAASC,GACnC,IAAIpB,EAAOU,KACXW,OAAOC,oBAAoBZ,KAAKC,KAAKQ,SAAQ,SAASd,GACpDe,EAASf,EAAML,EAAKW,IAAIN,GAC1B,GACF,EAgCA,IAAIkB,EAAU,CACZC,KAAM,eAAgBxB,MAAQ,SAAUA,MAAQ,WAC9C,IAEE,OADA,IAAIyB,MACG,CACT,CAAE,MAAMC,GACN,OAAO,CACT,CACD,CAP+C,GAQhDC,SAAU,aAAc3B,MA+EtB4B,EAAU,CAAC,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAgDvDC,IACgB,oBAAXC,SAA4BA,OAAOC,eAC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AgBxR,GACrBuC,MAAM/B,GAAaA,EAASmC,SAC5BJ,MAEC/B,IAEA,MAAMuQ,EAAO,CAAEc,WAAUR,YAAa7Q,EAASwR,eAChB,IAA3BH,EAAS7O,QAAQ,KACnB5F,KAAKuU,IACFpU,IAAI,wBAAyB,CAC5B8T,YAAa7Q,EAASwR,eAEvBzP,MAAM6J,GAAQA,EAAIzJ,SAClBJ,MAEC0P,IAEAlB,EAAKc,SAAWI,EAAQJ,SACxBf,EAAQC,GACR1R,EAAQ0R,EAAK,KAGjBD,EAAQC,GACR1R,EAAQ0R,GACV,IAEDmB,MAAM5S,EAAO,GAEpB,CAGA6S,iBAGE,OFhEFjH,IAAAA,OAAa,YEgEJ9N,IACT,CAGAyT,UACE,OAAOA,GACT,CAGAuB,iBACE,OAAO,IAAIhT,SAAQ,CAACC,EAASC,KAC3BlC,KAAKuU,IACFpU,IAAI,+CACJgF,MAAM6J,GAAQA,EAAIzJ,SAClBJ,KAAKlD,GACL6S,MAAM5S,EAAO,GAEpB,GC5FF,IAEE+S,oBAAQ,KACRA,oBAAQ,IAEV,CAAE,MAAOjU,GACP,CAMF,S","sources":["webpack://tmc-client-js/./node_modules/fetch-polyfill/fetch.js","webpack://tmc-client-js/./node_modules/store/dist/store.legacy.js","webpack://tmc-client-js/./node_modules/store/plugins/json2.js","webpack://tmc-client-js/./node_modules/store/plugins/lib/json2.js","webpack://tmc-client-js/./node_modules/store/src/store-engine.js","webpack://tmc-client-js/./node_modules/store/src/util.js","webpack://tmc-client-js/./node_modules/store/storages/all.js","webpack://tmc-client-js/./node_modules/store/storages/cookieStorage.js","webpack://tmc-client-js/./node_modules/store/storages/localStorage.js","webpack://tmc-client-js/./node_modules/store/storages/memoryStorage.js","webpack://tmc-client-js/./node_modules/store/storages/oldFF-globalStorage.js","webpack://tmc-client-js/./node_modules/store/storages/oldIE-userDataStorage.js","webpack://tmc-client-js/./node_modules/store/storages/sessionStorage.js","webpack://tmc-client-js/./node_modules/unfetch/polyfill/index.js","webpack://tmc-client-js/webpack/bootstrap","webpack://tmc-client-js/webpack/runtime/compat get default export","webpack://tmc-client-js/webpack/runtime/define property getters","webpack://tmc-client-js/webpack/runtime/hasOwnProperty shorthand","webpack://tmc-client-js/webpack/runtime/make namespace object","webpack://tmc-client-js/./src/utils/user-store.js","webpack://tmc-client-js/./src/utils/api.js","webpack://tmc-client-js/./src/tmc-client.js","webpack://tmc-client-js/./src/index.js"],"sourcesContent":["(function() {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = name.toString();\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = value.toString();\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n var self = this\n if (headers instanceof Headers) {\n headers.forEach(function(name, values) {\n values.forEach(function(value) {\n self.append(name, value)\n })\n })\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n self.append(name, headers[name])\n })\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n // Instead of iterable for now.\n Headers.prototype.forEach = function(callback) {\n var self = this\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n callback(name, self.map[name])\n })\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return fetch.Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new fetch.Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else {\n throw new Error('unsupported BodyInit type')\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return fetch.Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return fetch.Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return fetch.Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : fetch.Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(function (text) {\n return JSON.parse(text);\n });\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(url, options) {\n options = options || {}\n this.url = url\n\n this.credentials = options.credentials || 'omit'\n this.headers = new Headers(options.headers)\n this.method = normalizeMethod(options.method || 'GET')\n this.mode = options.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && options.body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(options.body)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n var noXhrPatch =\n typeof window !== 'undefined' && !!window.ActiveXObject &&\n !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);\n\n function getXhr() {\n // from backbone.js 1.1.2\n // https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L1181\n if (noXhrPatch && !(/^(get|post|head|put|delete|options)$/i.test(this.method))) {\n this.usingActiveXhr = true;\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n return new XMLHttpRequest();\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this._initBody(bodyInit)\n this.type = 'default'\n this.url = null\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n }\n\n Body.call(Response.prototype)\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n // TODO: Request constructor should accept input, init\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n return new fetch.Promise(function(resolve, reject) {\n var xhr = getXhr();\n if (request.credentials === 'cors') {\n xhr.withCredentials = true;\n }\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n function onload() {\n if (xhr.readyState !== 4) {\n return\n }\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n xhr.onreadystatechange = onload;\n if (!self.usingActiveXhr) {\n xhr.onload = onload;\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n }\n\n xhr.open(request.method, request.url, true)\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(name, values) {\n values.forEach(function(value) {\n xhr.setRequestHeader(name, value)\n })\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n fetch.Promise = self.Promise; // you could change it to your favorite alternative\n self.fetch.polyfill = true\n})();\n","var engine = require('../src/store-engine')\n\nvar storages = require('../storages/all')\nvar plugins = [require('../plugins/json2')]\n\nmodule.exports = engine.createStore(storages, plugins)\n","module.exports = json2Plugin\n\nfunction json2Plugin() {\n\trequire('./lib/json2')\n\treturn {}\n}\n","/* eslint-disable */\n\n// json2.js\n// 2016-10-28\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n eval, for, this\n*/\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n*/\n\n\n// Create a JSON object only if one does not already exist. We create the\n// methods in a closure to avoid creating global variables.\n\nif (typeof JSON !== \"object\") {\n JSON = {};\n}\n\n(function () {\n \"use strict\";\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n// If the string contains no control characters, no quote characters, and no\n// backslash characters, then we can safely slap some quotes around it.\n// Otherwise we must also replace the offending characters with safe escape\n// sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n// Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n// If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n// If we were called with a replacer function, then call the replacer to\n// obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n// What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n// JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n// If the value is a boolean or null, convert it to a string. Note:\n// typeof null does not produce \"null\". The case is included here in\n// the remote chance that this gets fixed someday.\n\n return String(value);\n\n// If the type is \"object\", we might be dealing with an object or an array or\n// null.\n\n case \"object\":\n\n// Due to a specification blunder in ECMAScript, typeof null is \"object\",\n// so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n// Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n// Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n// The value is an array. Stringify every element. Use null as a placeholder\n// for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n// Join all of the elements together, separated with commas, and wrap them in\n// brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n// If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n// Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n// Join all of the member texts together, separated with commas,\n// and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n// If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n// The stringify method takes a value and an optional replacer, and an optional\n// space parameter, and returns a JSON text. The replacer can be a function\n// that can replace values, or an array of strings that will select the keys.\n// A default replacer method can be provided. Use of the space parameter can\n// produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n// If the space parameter is a number, make an indent string containing that\n// many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n// If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n// If there is a replacer, it must be a function or an array.\n// Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n// Make a fake root object containing our value under the key of \"\".\n// Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n// If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = function (text, reviver) {\n\n// The parse method takes a text and an optional reviver function, and returns\n// a JavaScript value if the text is a valid JSON text.\n\n var j;\n\n function walk(holder, key) {\n\n// The walk method is used to recursively walk the resulting structure so\n// that modifications can be made.\n\n var k;\n var v;\n var value = holder[key];\n if (value && typeof value === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n }\n }\n }\n return reviver.call(holder, key, value);\n }\n\n\n// Parsing happens in four stages. In the first stage, we replace certain\n// Unicode characters with escape sequences. JavaScript handles many characters\n// incorrectly, either silently deleting them, or treating them as line endings.\n\n text = String(text);\n rx_dangerous.lastIndex = 0;\n if (rx_dangerous.test(text)) {\n text = text.replace(rx_dangerous, function (a) {\n return \"\\\\u\" +\n (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n });\n }\n\n// In the second stage, we run the text against regular expressions that look\n// for non-JSON patterns. We are especially concerned with \"()\" and \"new\"\n// because they can cause invocation, and \"=\" because it can cause mutation.\n// But just to be safe, we want to reject all unexpected forms.\n\n// We split the second stage into 4 regexp operations in order to work around\n// crippling inefficiencies in IE's and Safari's regexp engines. First we\n// replace the JSON backslash pairs with \"@\" (a non-JSON character). Second, we\n// replace all simple value tokens with \"]\" characters. Third, we delete all\n// open brackets that follow a colon or comma or that begin the text. Finally,\n// we look to see that the remaining characters are only whitespace or \"]\" or\n// \",\" or \":\" or \"{\" or \"}\". If that is so, then the text is safe for eval.\n\n if (\n rx_one.test(\n text\n .replace(rx_two, \"@\")\n .replace(rx_three, \"]\")\n .replace(rx_four, \"\")\n )\n ) {\n\n// In the third stage we use the eval function to compile the text into a\n// JavaScript structure. The \"{\" operator is subject to a syntactic ambiguity\n// in JavaScript: it can begin a block or an object literal. We wrap the text\n// in parens to eliminate the ambiguity.\n\n j = eval(\"(\" + text + \")\");\n\n// In the optional fourth stage, we recursively walk the new structure, passing\n// each name/value pair to a reviver function for possible transformation.\n\n return (typeof reviver === \"function\")\n ? walk({\"\": j}, \"\")\n : j;\n }\n\n// If the text is not JSON parseable, then a SyntaxError is thrown.\n\n throw new SyntaxError(\"JSON.parse\");\n };\n }\n}());","var util = require('./util')\nvar slice = util.slice\nvar pluck = util.pluck\nvar each = util.each\nvar bind = util.bind\nvar create = util.create\nvar isList = util.isList\nvar isFunction = util.isFunction\nvar isObject = util.isObject\n\nmodule.exports = {\n\tcreateStore: createStore\n}\n\nvar storeAPI = {\n\tversion: '2.0.12',\n\tenabled: false,\n\t\n\t// get returns the value of the given key. If that value\n\t// is undefined, it returns optionalDefaultValue instead.\n\tget: function(key, optionalDefaultValue) {\n\t\tvar data = this.storage.read(this._namespacePrefix + key)\n\t\treturn this._deserialize(data, optionalDefaultValue)\n\t},\n\n\t// set will store the given value at key and returns value.\n\t// Calling set with value === undefined is equivalent to calling remove.\n\tset: function(key, value) {\n\t\tif (value === undefined) {\n\t\t\treturn this.remove(key)\n\t\t}\n\t\tthis.storage.write(this._namespacePrefix + key, this._serialize(value))\n\t\treturn value\n\t},\n\n\t// remove deletes the key and value stored at the given key.\n\tremove: function(key) {\n\t\tthis.storage.remove(this._namespacePrefix + key)\n\t},\n\n\t// each will call the given callback once for each key-value pair\n\t// in this store.\n\teach: function(callback) {\n\t\tvar self = this\n\t\tthis.storage.each(function(val, namespacedKey) {\n\t\t\tcallback.call(self, self._deserialize(val), (namespacedKey || '').replace(self._namespaceRegexp, ''))\n\t\t})\n\t},\n\n\t// clearAll will remove all the stored key-value pairs in this store.\n\tclearAll: function() {\n\t\tthis.storage.clearAll()\n\t},\n\n\t// additional functionality that can't live in plugins\n\t// ---------------------------------------------------\n\n\t// hasNamespace returns true if this store instance has the given namespace.\n\thasNamespace: function(namespace) {\n\t\treturn (this._namespacePrefix == '__storejs_'+namespace+'_')\n\t},\n\n\t// createStore creates a store.js instance with the first\n\t// functioning storage in the list of storage candidates,\n\t// and applies the the given mixins to the instance.\n\tcreateStore: function() {\n\t\treturn createStore.apply(this, arguments)\n\t},\n\t\n\taddPlugin: function(plugin) {\n\t\tthis._addPlugin(plugin)\n\t},\n\t\n\tnamespace: function(namespace) {\n\t\treturn createStore(this.storage, this.plugins, namespace)\n\t}\n}\n\nfunction _warn() {\n\tvar _console = (typeof console == 'undefined' ? null : console)\n\tif (!_console) { return }\n\tvar fn = (_console.warn ? _console.warn : _console.log)\n\tfn.apply(_console, arguments)\n}\n\nfunction createStore(storages, plugins, namespace) {\n\tif (!namespace) {\n\t\tnamespace = ''\n\t}\n\tif (storages && !isList(storages)) {\n\t\tstorages = [storages]\n\t}\n\tif (plugins && !isList(plugins)) {\n\t\tplugins = [plugins]\n\t}\n\n\tvar namespacePrefix = (namespace ? '__storejs_'+namespace+'_' : '')\n\tvar namespaceRegexp = (namespace ? new RegExp('^'+namespacePrefix) : null)\n\tvar legalNamespaces = /^[a-zA-Z0-9_\\-]*$/ // alpha-numeric + underscore and dash\n\tif (!legalNamespaces.test(namespace)) {\n\t\tthrow new Error('store.js namespaces can only have alphanumerics + underscores and dashes')\n\t}\n\t\n\tvar _privateStoreProps = {\n\t\t_namespacePrefix: namespacePrefix,\n\t\t_namespaceRegexp: namespaceRegexp,\n\n\t\t_testStorage: function(storage) {\n\t\t\ttry {\n\t\t\t\tvar testStr = '__storejs__test__'\n\t\t\t\tstorage.write(testStr, testStr)\n\t\t\t\tvar ok = (storage.read(testStr) === testStr)\n\t\t\t\tstorage.remove(testStr)\n\t\t\t\treturn ok\n\t\t\t} catch(e) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\t_assignPluginFnProp: function(pluginFnProp, propName) {\n\t\t\tvar oldFn = this[propName]\n\t\t\tthis[propName] = function pluginFn() {\n\t\t\t\tvar args = slice(arguments, 0)\n\t\t\t\tvar self = this\n\n\t\t\t\t// super_fn calls the old function which was overwritten by\n\t\t\t\t// this mixin.\n\t\t\t\tfunction super_fn() {\n\t\t\t\t\tif (!oldFn) { return }\n\t\t\t\t\teach(arguments, function(arg, i) {\n\t\t\t\t\t\targs[i] = arg\n\t\t\t\t\t})\n\t\t\t\t\treturn oldFn.apply(self, args)\n\t\t\t\t}\n\n\t\t\t\t// Give mixing function access to super_fn by prefixing all mixin function\n\t\t\t\t// arguments with super_fn.\n\t\t\t\tvar newFnArgs = [super_fn].concat(args)\n\n\t\t\t\treturn pluginFnProp.apply(self, newFnArgs)\n\t\t\t}\n\t\t},\n\n\t\t_serialize: function(obj) {\n\t\t\treturn JSON.stringify(obj)\n\t\t},\n\n\t\t_deserialize: function(strVal, defaultVal) {\n\t\t\tif (!strVal) { return defaultVal }\n\t\t\t// It is possible that a raw string value has been previously stored\n\t\t\t// in a storage without using store.js, meaning it will be a raw\n\t\t\t// string value instead of a JSON serialized string. By defaulting\n\t\t\t// to the raw string value in case of a JSON parse error, we allow\n\t\t\t// for past stored values to be forwards-compatible with store.js\n\t\t\tvar val = ''\n\t\t\ttry { val = JSON.parse(strVal) }\n\t\t\tcatch(e) { val = strVal }\n\n\t\t\treturn (val !== undefined ? val : defaultVal)\n\t\t},\n\t\t\n\t\t_addStorage: function(storage) {\n\t\t\tif (this.enabled) { return }\n\t\t\tif (this._testStorage(storage)) {\n\t\t\t\tthis.storage = storage\n\t\t\t\tthis.enabled = true\n\t\t\t}\n\t\t},\n\n\t\t_addPlugin: function(plugin) {\n\t\t\tvar self = this\n\n\t\t\t// If the plugin is an array, then add all plugins in the array.\n\t\t\t// This allows for a plugin to depend on other plugins.\n\t\t\tif (isList(plugin)) {\n\t\t\t\teach(plugin, function(plugin) {\n\t\t\t\t\tself._addPlugin(plugin)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Keep track of all plugins we've seen so far, so that we\n\t\t\t// don't add any of them twice.\n\t\t\tvar seenPlugin = pluck(this.plugins, function(seenPlugin) {\n\t\t\t\treturn (plugin === seenPlugin)\n\t\t\t})\n\t\t\tif (seenPlugin) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.plugins.push(plugin)\n\n\t\t\t// Check that the plugin is properly formed\n\t\t\tif (!isFunction(plugin)) {\n\t\t\t\tthrow new Error('Plugins must be function values that return objects')\n\t\t\t}\n\n\t\t\tvar pluginProperties = plugin.call(this)\n\t\t\tif (!isObject(pluginProperties)) {\n\t\t\t\tthrow new Error('Plugins must return an object of function properties')\n\t\t\t}\n\n\t\t\t// Add the plugin function properties to this store instance.\n\t\t\teach(pluginProperties, function(pluginFnProp, propName) {\n\t\t\t\tif (!isFunction(pluginFnProp)) {\n\t\t\t\t\tthrow new Error('Bad plugin property: '+propName+' from plugin '+plugin.name+'. Plugins should only return functions.')\n\t\t\t\t}\n\t\t\t\tself._assignPluginFnProp(pluginFnProp, propName)\n\t\t\t})\n\t\t},\n\t\t\n\t\t// Put deprecated properties in the private API, so as to not expose it to accidential\n\t\t// discovery through inspection of the store object.\n\t\t\n\t\t// Deprecated: addStorage\n\t\taddStorage: function(storage) {\n\t\t\t_warn('store.addStorage(storage) is deprecated. Use createStore([storages])')\n\t\t\tthis._addStorage(storage)\n\t\t}\n\t}\n\n\tvar store = create(_privateStoreProps, storeAPI, {\n\t\tplugins: []\n\t})\n\tstore.raw = {}\n\teach(store, function(prop, propName) {\n\t\tif (isFunction(prop)) {\n\t\t\tstore.raw[propName] = bind(store, prop)\t\t\t\n\t\t}\n\t})\n\teach(storages, function(storage) {\n\t\tstore._addStorage(storage)\n\t})\n\teach(plugins, function(plugin) {\n\t\tstore._addPlugin(plugin)\n\t})\n\treturn store\n}\n","var assign = make_assign()\nvar create = make_create()\nvar trim = make_trim()\nvar Global = (typeof window !== 'undefined' ? window : global)\n\nmodule.exports = {\n\tassign: assign,\n\tcreate: create,\n\ttrim: trim,\n\tbind: bind,\n\tslice: slice,\n\teach: each,\n\tmap: map,\n\tpluck: pluck,\n\tisList: isList,\n\tisFunction: isFunction,\n\tisObject: isObject,\n\tGlobal: Global\n}\n\nfunction make_assign() {\n\tif (Object.assign) {\n\t\treturn Object.assign\n\t} else {\n\t\treturn function shimAssign(obj, props1, props2, etc) {\n\t\t\tfor (var i = 1; i < arguments.length; i++) {\n\t\t\t\teach(Object(arguments[i]), function(val, key) {\n\t\t\t\t\tobj[key] = val\n\t\t\t\t})\n\t\t\t}\t\t\t\n\t\t\treturn obj\n\t\t}\n\t}\n}\n\nfunction make_create() {\n\tif (Object.create) {\n\t\treturn function create(obj, assignProps1, assignProps2, etc) {\n\t\t\tvar assignArgsList = slice(arguments, 1)\n\t\t\treturn assign.apply(this, [Object.create(obj)].concat(assignArgsList))\n\t\t}\n\t} else {\n\t\tfunction F() {} // eslint-disable-line no-inner-declarations\n\t\treturn function create(obj, assignProps1, assignProps2, etc) {\n\t\t\tvar assignArgsList = slice(arguments, 1)\n\t\t\tF.prototype = obj\n\t\t\treturn assign.apply(this, [new F()].concat(assignArgsList))\n\t\t}\n\t}\n}\n\nfunction make_trim() {\n\tif (String.prototype.trim) {\n\t\treturn function trim(str) {\n\t\t\treturn String.prototype.trim.call(str)\n\t\t}\n\t} else {\n\t\treturn function trim(str) {\n\t\t\treturn str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '')\n\t\t}\n\t}\n}\n\nfunction bind(obj, fn) {\n\treturn function() {\n\t\treturn fn.apply(obj, Array.prototype.slice.call(arguments, 0))\n\t}\n}\n\nfunction slice(arr, index) {\n\treturn Array.prototype.slice.call(arr, index || 0)\n}\n\nfunction each(obj, fn) {\n\tpluck(obj, function(val, key) {\n\t\tfn(val, key)\n\t\treturn false\n\t})\n}\n\nfunction map(obj, fn) {\n\tvar res = (isList(obj) ? [] : {})\n\tpluck(obj, function(v, k) {\n\t\tres[k] = fn(v, k)\n\t\treturn false\n\t})\n\treturn res\n}\n\nfunction pluck(obj, fn) {\n\tif (isList(obj)) {\n\t\tfor (var i=0; i<obj.length; i++) {\n\t\t\tif (fn(obj[i], i)) {\n\t\t\t\treturn obj[i]\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (var key in obj) {\n\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\tif (fn(obj[key], key)) {\n\t\t\t\t\treturn obj[key]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction isList(val) {\n\treturn (val != null && typeof val != 'function' && typeof val.length == 'number')\n}\n\nfunction isFunction(val) {\n\treturn val && {}.toString.call(val) === '[object Function]'\n}\n\nfunction isObject(val) {\n\treturn val && {}.toString.call(val) === '[object Object]'\n}\n","module.exports = [\n\t// Listed in order of usage preference\n\trequire('./localStorage'),\n\trequire('./oldFF-globalStorage'),\n\trequire('./oldIE-userDataStorage'),\n\trequire('./cookieStorage'),\n\trequire('./sessionStorage'),\n\trequire('./memoryStorage')\n]\n","// cookieStorage is useful Safari private browser mode, where localStorage\n// doesn't work but cookies do. This implementation is adopted from\n// https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage\n\nvar util = require('../src/util')\nvar Global = util.Global\nvar trim = util.trim\n\nmodule.exports = {\n\tname: 'cookieStorage',\n\tread: read,\n\twrite: write,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll,\n}\n\nvar doc = Global.document\n\nfunction read(key) {\n\tif (!key || !_has(key)) { return null }\n\tvar regexpStr = \"(?:^|.*;\\\\s*)\" +\n\t\tescape(key).replace(/[\\-\\.\\+\\*]/g, \"\\\\$&\") +\n\t\t\"\\\\s*\\\\=\\\\s*((?:[^;](?!;))*[^;]?).*\"\n\treturn unescape(doc.cookie.replace(new RegExp(regexpStr), \"$1\"))\n}\n\nfunction each(callback) {\n\tvar cookies = doc.cookie.split(/; ?/g)\n\tfor (var i = cookies.length - 1; i >= 0; i--) {\n\t\tif (!trim(cookies[i])) {\n\t\t\tcontinue\n\t\t}\n\t\tvar kvp = cookies[i].split('=')\n\t\tvar key = unescape(kvp[0])\n\t\tvar val = unescape(kvp[1])\n\t\tcallback(val, key)\n\t}\n}\n\nfunction write(key, data) {\n\tif(!key) { return }\n\tdoc.cookie = escape(key) + \"=\" + escape(data) + \"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/\"\n}\n\nfunction remove(key) {\n\tif (!key || !_has(key)) {\n\t\treturn\n\t}\n\tdoc.cookie = escape(key) + \"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/\"\n}\n\nfunction clearAll() {\n\teach(function(_, key) {\n\t\tremove(key)\n\t})\n}\n\nfunction _has(key) {\n\treturn (new RegExp(\"(?:^|;\\\\s*)\" + escape(key).replace(/[\\-\\.\\+\\*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\")).test(doc.cookie)\n}\n","var util = require('../src/util')\nvar Global = util.Global\n\nmodule.exports = {\n\tname: 'localStorage',\n\tread: read,\n\twrite: write,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll,\n}\n\nfunction localStorage() {\n\treturn Global.localStorage\n}\n\nfunction read(key) {\n\treturn localStorage().getItem(key)\n}\n\nfunction write(key, data) {\n\treturn localStorage().setItem(key, data)\n}\n\nfunction each(fn) {\n\tfor (var i = localStorage().length - 1; i >= 0; i--) {\n\t\tvar key = localStorage().key(i)\n\t\tfn(read(key), key)\n\t}\n}\n\nfunction remove(key) {\n\treturn localStorage().removeItem(key)\n}\n\nfunction clearAll() {\n\treturn localStorage().clear()\n}\n","// memoryStorage is a useful last fallback to ensure that the store\n// is functions (meaning store.get(), store.set(), etc will all function).\n// However, stored values will not persist when the browser navigates to\n// a new page or reloads the current page.\n\nmodule.exports = {\n\tname: 'memoryStorage',\n\tread: read,\n\twrite: write,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll,\n}\n\nvar memoryStorage = {}\n\nfunction read(key) {\n\treturn memoryStorage[key]\n}\n\nfunction write(key, data) {\n\tmemoryStorage[key] = data\n}\n\nfunction each(callback) {\n\tfor (var key in memoryStorage) {\n\t\tif (memoryStorage.hasOwnProperty(key)) {\n\t\t\tcallback(memoryStorage[key], key)\n\t\t}\n\t}\n}\n\nfunction remove(key) {\n\tdelete memoryStorage[key]\n}\n\nfunction clearAll(key) {\n\tmemoryStorage = {}\n}\n","// oldFF-globalStorage provides storage for Firefox\n// versions 6 and 7, where no localStorage, etc\n// is available.\n\nvar util = require('../src/util')\nvar Global = util.Global\n\nmodule.exports = {\n\tname: 'oldFF-globalStorage',\n\tread: read,\n\twrite: write,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll,\n}\n\nvar globalStorage = Global.globalStorage\n\nfunction read(key) {\n\treturn globalStorage[key]\n}\n\nfunction write(key, data) {\n\tglobalStorage[key] = data\n}\n\nfunction each(fn) {\n\tfor (var i = globalStorage.length - 1; i >= 0; i--) {\n\t\tvar key = globalStorage.key(i)\n\t\tfn(globalStorage[key], key)\n\t}\n}\n\nfunction remove(key) {\n\treturn globalStorage.removeItem(key)\n}\n\nfunction clearAll() {\n\teach(function(key, _) {\n\t\tdelete globalStorage[key]\n\t})\n}\n","// oldIE-userDataStorage provides storage for Internet Explorer\n// versions 6 and 7, where no localStorage, sessionStorage, etc\n// is available.\n\nvar util = require('../src/util')\nvar Global = util.Global\n\nmodule.exports = {\n\tname: 'oldIE-userDataStorage',\n\twrite: write,\n\tread: read,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll,\n}\n\nvar storageName = 'storejs'\nvar doc = Global.document\nvar _withStorageEl = _makeIEStorageElFunction()\nvar disable = (Global.navigator ? Global.navigator.userAgent : '').match(/ (MSIE 8|MSIE 9|MSIE 10)\\./) // MSIE 9.x, MSIE 10.x\n\nfunction write(unfixedKey, data) {\n\tif (disable) { return }\n\tvar fixedKey = fixKey(unfixedKey)\n\t_withStorageEl(function(storageEl) {\n\t\tstorageEl.setAttribute(fixedKey, data)\n\t\tstorageEl.save(storageName)\n\t})\n}\n\nfunction read(unfixedKey) {\n\tif (disable) { return }\n\tvar fixedKey = fixKey(unfixedKey)\n\tvar res = null\n\t_withStorageEl(function(storageEl) {\n\t\tres = storageEl.getAttribute(fixedKey)\n\t})\n\treturn res\n}\n\nfunction each(callback) {\n\t_withStorageEl(function(storageEl) {\n\t\tvar attributes = storageEl.XMLDocument.documentElement.attributes\n\t\tfor (var i=attributes.length-1; i>=0; i--) {\n\t\t\tvar attr = attributes[i]\n\t\t\tcallback(storageEl.getAttribute(attr.name), attr.name)\n\t\t}\n\t})\n}\n\nfunction remove(unfixedKey) {\n\tvar fixedKey = fixKey(unfixedKey)\n\t_withStorageEl(function(storageEl) {\n\t\tstorageEl.removeAttribute(fixedKey)\n\t\tstorageEl.save(storageName)\n\t})\n}\n\nfunction clearAll() {\n\t_withStorageEl(function(storageEl) {\n\t\tvar attributes = storageEl.XMLDocument.documentElement.attributes\n\t\tstorageEl.load(storageName)\n\t\tfor (var i=attributes.length-1; i>=0; i--) {\n\t\t\tstorageEl.removeAttribute(attributes[i].name)\n\t\t}\n\t\tstorageEl.save(storageName)\n\t})\n}\n\n// Helpers\n//////////\n\n// In IE7, keys cannot start with a digit or contain certain chars.\n// See https://github.com/marcuswestin/store.js/issues/40\n// See https://github.com/marcuswestin/store.js/issues/83\nvar forbiddenCharsRegex = new RegExp(\"[!\\\"#$%&'()*+,/\\\\\\\\:;<=>?@[\\\\]^`{|}~]\", \"g\")\nfunction fixKey(key) {\n\treturn key.replace(/^\\d/, '___$&').replace(forbiddenCharsRegex, '___')\n}\n\nfunction _makeIEStorageElFunction() {\n\tif (!doc || !doc.documentElement || !doc.documentElement.addBehavior) {\n\t\treturn null\n\t}\n\tvar scriptTag = 'script',\n\t\tstorageOwner,\n\t\tstorageContainer,\n\t\tstorageEl\n\n\t// Since #userData storage applies only to specific paths, we need to\n\t// somehow link our data to a specific path. We choose /favicon.ico\n\t// as a pretty safe option, since all browsers already make a request to\n\t// this URL anyway and being a 404 will not hurt us here. We wrap an\n\t// iframe pointing to the favicon in an ActiveXObject(htmlfile) object\n\t// (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)\n\t// since the iframe access rules appear to allow direct access and\n\t// manipulation of the document element, even for a 404 page. This\n\t// document can be used instead of the current document (which would\n\t// have been limited to the current path) to perform #userData storage.\n\ttry {\n\t\t/* global ActiveXObject */\n\t\tstorageContainer = new ActiveXObject('htmlfile')\n\t\tstorageContainer.open()\n\t\tstorageContainer.write('<'+scriptTag+'>document.w=window</'+scriptTag+'><iframe src=\"/favicon.ico\"></iframe>')\n\t\tstorageContainer.close()\n\t\tstorageOwner = storageContainer.w.frames[0].document\n\t\tstorageEl = storageOwner.createElement('div')\n\t} catch(e) {\n\t\t// somehow ActiveXObject instantiation failed (perhaps some special\n\t\t// security settings or otherwse), fall back to per-path storage\n\t\tstorageEl = doc.createElement('div')\n\t\tstorageOwner = doc.body\n\t}\n\n\treturn function(storeFunction) {\n\t\tvar args = [].slice.call(arguments, 0)\n\t\targs.unshift(storageEl)\n\t\t// See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx\n\t\t// and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx\n\t\tstorageOwner.appendChild(storageEl)\n\t\tstorageEl.addBehavior('#default#userData')\n\t\tstorageEl.load(storageName)\n\t\tstoreFunction.apply(this, args)\n\t\tstorageOwner.removeChild(storageEl)\n\t\treturn\n\t}\n}\n","var util = require('../src/util')\nvar Global = util.Global\n\nmodule.exports = {\n\tname: 'sessionStorage',\n\tread: read,\n\twrite: write,\n\teach: each,\n\tremove: remove,\n\tclearAll: clearAll\n}\n\nfunction sessionStorage() {\n\treturn Global.sessionStorage\n}\n\nfunction read(key) {\n\treturn sessionStorage().getItem(key)\n}\n\nfunction write(key, data) {\n\treturn sessionStorage().setItem(key, data)\n}\n\nfunction each(fn) {\n\tfor (var i = sessionStorage().length - 1; i >= 0; i--) {\n\t\tvar key = sessionStorage().key(i)\n\t\tfn(read(key), key)\n\t}\n}\n\nfunction remove(key) {\n\treturn sessionStorage().removeItem(key)\n}\n\nfunction clearAll() {\n\treturn sessionStorage().clear()\n}\n","self.fetch||(self.fetch=function(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u={},a=function e(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return o.map(function(e){return[e,s.getResponseHeader(e)]})},get:function(e){return s.getResponseHeader(e)},has:function(e){return null!=s.getResponseHeader(e)}}}};for(var i in s.open(n.method||\"get\",e,!0),s.onload=function(){s.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm,function(e,n){u[n]||o.push(u[n]=n)}),t(a())},s.onerror=r,s.withCredentials=\"include\"==n.credentials,n.headers)s.setRequestHeader(i,n.headers[i]);s.send(n.body||null)})});\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// @ts-check\nimport store from 'store';\n\n/** @returns {import(\"../tmc-client\").AuthenticatedUser=} */\nexport function getUser() {\n return store.get('tmc.user');\n}\n\n/** @param {import(\"../tmc-client\").AuthenticatedUser} user */\nexport function setUser(user) {\n store.set('tmc.user', user);\n}\n\nexport function removeUser() {\n store.remove('tmc.user');\n}\n","// @ts-check\nimport { getUser } from './user-store';\n\nexport default class Api {\n /** @param {string} oAuthSite */\n constructor(oAuthSite) {\n /** @type {string} */\n this.oauthSite = oAuthSite;\n }\n\n /**\n * @param{string} path\n * @param{RequestOptions} [options]\n */\n request(path, options = {}) {\n let headers = options.headers || {};\n\n const user = getUser();\n\n if ((user && user.accessToken) || options.accessToken) {\n const token = (user && user.accessToken) || options.accessToken;\n headers = Object.assign({\n authorization: 'Bearer ' + token,\n 'Content-Type': 'application/json',\n }, headers);\n }\n\n return fetch(\n new Request(\n this.oauthSite + path,\n Object.assign({ mode: 'cors' }, options, { headers }),\n ),\n ).then(\n (response) => (response.ok ? Promise.resolve(response) : Promise.reject(response)),\n );\n }\n\n /**\n * @param {string} path\n * @param {RequestOptions} [options]\n */\n post(path, options = {}) {\n return this.request(path, Object.assign({}, options, { method: 'POST' }));\n }\n\n /**\n * @param {string} path\n * @param {RequestOptions} options\n */\n get(path, options = {}) {\n return this.request(path, Object.assign({}, options, { method: 'GET' }));\n }\n}\n\n/** @typedef {RequestInit & { accessToken?: string }} RequestOptions */\n","// @ts-check\nimport Api from './utils/api';\nimport { getUser, setUser, removeUser } from './utils/user-store';\n\nclass TmcClient {\n /**\n * @param {string} clientId\n * @param {string} clientSecret\n * @param {string} [oAuthSite]\n */\n constructor(clientId, clientSecret, oAuthSite = 'https://tmc.mooc.fi') {\n /** @type {string} */\n this.clientId = clientId;\n /** @type {string} */\n this.clientSecret = clientSecret;\n /** @type {import(\"./utils/api\").default} */\n this.api = new Api(oAuthSite);\n }\n\n /**\n * @param {AuthenticateArgs} args\n * @returns {Promise<AuthenticatedUser>}\n */\n authenticate(args) {\n const { username, password } = args;\n\n return new Promise((resolve, reject) => {\n const body = [\n 'client_id=' + this.clientId,\n 'client_secret=' + this.clientSecret,\n 'username=' + encodeURIComponent(username),\n 'password=' + encodeURIComponent(password),\n 'grant_type=password',\n ].join('&');\n\n /** @type {import(\"./utils/api\").RequestOptions} */\n const options = {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body,\n };\n\n this.api\n .post('/oauth/token', options)\n .then((response) => response.json())\n .then((\n /** @type {{ access_token: string }} */\n response,\n ) => {\n const user = { username, accessToken: response.access_token };\n if (username.indexOf('@') !== -1) {\n this.api\n .get('/api/v8/users/current', {\n accessToken: response.access_token,\n })\n .then((res) => res.json())\n .then((\n /** @type {{ username: string }} */\n details,\n ) => {\n user.username = details.username;\n setUser(user);\n resolve(user);\n });\n } else {\n setUser(user);\n resolve(user);\n }\n })\n .catch(reject);\n });\n }\n\n /** @this {TmcClient} */\n unauthenticate() {\n removeUser();\n\n return this;\n }\n\n // eslint-disable-next-line class-methods-use-this\n getUser() {\n return getUser();\n }\n\n /** @returns {Promise<AuthenticatedUserDetails>} */\n getUserDetails() {\n return new Promise((resolve, reject) => {\n this.api\n .get('/api/v8/users/current?show_user_fields=true')\n .then((res) => res.json())\n .then(resolve)\n .catch(reject);\n });\n }\n}\n\nexport default TmcClient;\n\n/**\n * @typedef {Object} AuthenticatedUser\n * @property {string} username\n * @property {string} accessToken\n *\n * @typedef {Object} AuthenticateArgs\n * @property {string} username\n * @property {string} password\n *\n * @typedef {Object} UserField\n * @property {string} first_name\n * @property {string} last_name\n * @property {string} html1\n * @property {string} organizational_id\n * @property {boolean} course_announcements\n *\n * @typedef {Object} ExtraFields\n *\n * @typedef {Object} AuthenticatedUserDetails\n * @property {number} id\n * @property {string} username\n * @property {string} email\n * @property {UserField} user_field\n * @property {ExtraFields} extra_fields\n * @property {boolean} administrator\n */\n","/**\n * @module TmcClient\n */\ntry {\n /* eslint-disable global-require */\n require('fetch-polyfill');\n require('unfetch/polyfill');\n /* eslint-enable global-require */\n} catch (e) {\n // ignore\n}\n\n/* eslint-disable import/first */\nimport TmcClient from './tmc-client';\n\nexport default TmcClient;\n\n/**\n * @exports @typedef {import('./tmc-client').AuthenticatedUser} AuthenticatedUser\n * @exports @typedef {import('./tmc-client').AuthenticatedUserDetails} AuthenticatedUserDetails\n * @exports @typedef {import('./tmc-client').AuthenticateArgs} AuthenticateArgs\n * @exports @typedef {import('./tmc-client').UserField} UserField\n * @exports @typedef {import('./tmc-client').ExtraFields} ExtraFields\n */\n"],"names":["self","fetch","Headers","prototype","append","name","value","normalizeName","normalizeValue","list","this","map","push","get","values","getAll","has","hasOwnProperty","set","forEach","callback","Object","getOwnPropertyNames","support","blob","Blob","e","formData","methods","noXhrPatch","window","ActiveXObject","XMLHttpRequest","dispatchEvent","Body","call","Request","Response","input","init","request","isPrototypeOf","Promise","resolve","reject","xhr","test","method","usingActiveXhr","getXhr","onload","readyState","status","TypeError","options","statusText","headers","url","responseURL","getAllResponseHeaders","getResponseHeader","body","response","responseText","credentials","withCredentials","onreadystatechange","onerror","open","responseType","setRequestHeader","send","_bodyInit","polyfill","toString","toLowerCase","consumed","bodyUsed","fileReaderReady","reader","result","error","readBlobAsArrayBuffer","FileReader","readAsArrayBuffer","_initBody","_bodyText","_bodyBlob","FormData","_bodyFormData","Error","rejected","arrayBuffer","then","text","readAsText","decode","json","JSON","parse","upcased","toUpperCase","indexOf","mode","referrer","form","trim","split","bytes","shift","replace","join","decodeURIComponent","head","header","key","bodyInit","type","ok","engine","storages","plugins","module","exports","createStore","rx_one","rx_two","rx_three","rx_four","rx_escapable","rx_dangerous","gap","indent","meta","rep","f","n","this_value","valueOf","quote","string","lastIndex","a","c","charCodeAt","slice","str","holder","i","k","v","length","partial","mind","toJSON","isFinite","String","apply","Date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","Boolean","Number","stringify","replacer","space","reviver","j","walk","undefined","eval","SyntaxError","util","pluck","each","bind","create","isList","isFunction","isObject","storeAPI","version","enabled","optionalDefaultValue","data","storage","read","_namespacePrefix","_deserialize","remove","write","_serialize","val","namespacedKey","_namespaceRegexp","clearAll","hasNamespace","namespace","arguments","addPlugin","plugin","_addPlugin","namespacePrefix","namespaceRegexp","RegExp","_privateStoreProps","_testStorage","testStr","_assignPluginFnProp","pluginFnProp","propName","oldFn","args","newFnArgs","arg","concat","obj","strVal","defaultVal","_addStorage","seenPlugin","pluginProperties","addStorage","_console","console","warn","log","_warn","store","raw","prop","assign","props1","props2","etc","assignProps1","assignProps2","assignArgsList","F","make_create","Global","global","arr","index","Array","fn","res","_has","regexpStr","escape","unescape","doc","cookie","_","document","cookies","kvp","localStorage","getItem","setItem","removeItem","clear","memoryStorage","globalStorage","unfixedKey","disable","fixedKey","fixKey","_withStorageEl","storageEl","setAttribute","save","storageName","getAttribute","attributes","XMLDocument","documentElement","attr","removeAttribute","load","addBehavior","storageOwner","storageContainer","scriptTag","close","w","frames","createElement","storeFunction","unshift","appendChild","removeChild","_makeIEStorageElFunction","navigator","userAgent","match","forbiddenCharsRegex","sessionStorage","t","r","s","o","u","clone","keys","entries","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","definition","defineProperty","enumerable","Symbol","toStringTag","getUser","setUser","user","Api","constructor","oAuthSite","oauthSite","path","accessToken","token","authorization","post","clientId","clientSecret","api","authenticate","username","password","encodeURIComponent","access_token","details","catch","unauthenticate","getUserDetails","require"],"sourceRoot":""}