{"version":3,"sources":["webpack://EntryPoint/webpack/bootstrap","webpack://EntryPoint/./Components/Subscribe/Subscribe.jsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","subsribeStates","DEFAULT","SUBMITTING","SUCCESS","FAILURE","Subscribe","props","_this","_classCallCheck","this","_getPrototypeOf","state","subscribeEmail","screenstate","handleChange","_assertThisInitialized","handleClick","React","Component","email","test","String","event","setState","target","$","hide","show","preventDefault","callingForm","validateEmail","toLocaleLowerCase","fetch","method","headers","Accept","Content-Type","body","JSON","stringify","then","response","status","setTimeout","screenStates","_this2","react__WEBPACK_IMPORTED_MODULE_0___default","a","createElement","id","className","placeholder","type","onChange","onClick","e","style","display","containerElement","document","getElementById","ReactDOM","render"],"mappings":"2BACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAA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C,EAAAC,cAAA,QAAME,UAAU,gCAAgCjB,OAAO,QACnDa,EAAAC,EAAAC,cAAA,SAAOzE,KAAK,QAAQ4E,YAAY,2BAA2BC,KAAK,QAAQpE,MAAOyB,KAAKE,MAAMC,eAAgByC,SAAU5C,KAAKK,eAC5HgC,EAAAC,EAAAC,cAAA,UAAQE,UAAU,uBAAuBI,QAAS,SAAAC,GAAC,OAAIV,EAAK7B,YAAYuC,KAAxE,eAKLT,EAAAC,EAAAC,cAAA,OAAKC,GAAG,uBAAuBC,UAAU,oBAAoBM,MAAO,CAAEC,QAAS,SAC3EX,EAAAC,EAAAC,cAAA,MAAIE,UAAU,sBAAd,kCACJJ,EAAAC,EAAAC,cAAA,OAAKC,GAAG,uBAAuBC,UAAU,oBAAoBM,MAAO,CAAEC,QAAS,SAC3EX,EAAAC,EAAAC,cAAA,MAAIE,UAAU,sBAAd,oDACJJ,EAAAC,EAAAC,cAAA,OAAKC,GAAG,oBAAoBC,UAAU,oBAAoBM,MAAO,CAAEC,QAAS,SACxEX,EAAAC,EAAAC,cAAA,MAAIE,UAAU,sBAAd,kCACJJ,EAAAC,EAAAC,cAAA,OAAKC,GAAG,oBAAoBC,UAAU,oBAAoBM,MAAO,CAAEC,QAAS,SACxEX,EAAAC,EAAAC,cAAA,MAAIE,UAAU,sBAAd,2EAMdQ,EAAmBC,SAASC,eAAe,iBACjDC,IAASC,OAAOhB,EAAAC,EAAAC,cAAC3C,EAAD,MAAeqD","file":"subscribe.components.min.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \tvar deferredModules = [];\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 \tvar jsonpArray = window[\"webpackJsonpEntryPoint\"] = window[\"webpackJsonpEntryPoint\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([9,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nconst subsribeStates = {\r\n DEFAULT: 'default',\r\n SUBMITTING: 'submitting',\r\n SUCCESS: 'success',\r\n FAILURE: 'failure'\r\n};\r\n\r\nclass Subscribe extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n subscribeEmail: '',\r\n screenstate: subsribeStates.DEFAULT\r\n };\r\n\r\n this.handleChange = this.handleChange.bind(this);\r\n this.handleClick = this.handleClick.bind(this);\r\n }\r\n\r\n validateEmail(email) {\r\n var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(email));\r\n }\r\n\r\n handleChange(event) {\r\n this.setState({ screenstate: subsribeStates.DEFAULT, subscribeEmail: event.target.value });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submit').show();\r\n }\r\n\r\n handleClick(event) {\r\n // Prevent the default action from executing.\r\n event.preventDefault();\r\n\r\n var callingForm = this;\r\n if (this.validateEmail(this.state.subscribeEmail.toLocaleLowerCase())) {\r\n // Set the internal component state to submitting.\r\n this.setState({ state: subsribeStates.SUBMITTING });\r\n\r\n // Since state updates are async directly set the visual queue.\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submitting').show();\r\n\r\n // Post the subription request.\r\n fetch('/insights/subscribe', {\r\n method: 'POST',\r\n headers: {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify(callingForm.state.subscribeEmail)\r\n })\r\n .then(function (response) {\r\n // Check if the response was success.\r\n if (response.status === 200) {\r\n // Update the component internal state and give immediate ui feedback. \r\n callingForm.setState({ screenstate: subsribeStates.SUCCESS });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-success').show();\r\n\r\n // After 3 seconds reset the entire form.\r\n setTimeout(function () {\r\n callingForm.setState({ screenstate: subsribeStates.DEFAULT, subscribeEmail: '' });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submit').show();\r\n }, 3000);\r\n }\r\n else {\r\n callingForm.setState({ screenstate: subsribeStates.FAILURE });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-failure').show();\r\n setTimeout(function () {\r\n callingForm.setState({ screenstate: subsribeStates.DEFAULT });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submit').show();\r\n }, 3000);\r\n }\r\n setTimeout(function () {\r\n callingForm.setState({ screenstate: subsribeStates.DEFAULT });\r\n }, 3000);\r\n })\r\n .catch(function () {\r\n callingForm.setState({ state: screenStates.FAILURE });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-failure').show();\r\n setTimeout(function () {\r\n callingForm.setState({ screenstate: subsribeStates.DEFAULT });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submit').show();\r\n }, 3000);\r\n });\r\n }\r\n else {\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-validation').show();\r\n setTimeout(function () {\r\n callingForm.setState({ screenstate: subsribeStates.DEFAULT });\r\n $('.subscribe-buttons').hide();\r\n $('#subscribe-submit').show();\r\n }, 3000);\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n