tang 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/controllers/tang/admin/subscriptions_controller.rb +1 -1
  4. data/app/jobs/tang/import_customers_job.rb +7 -1
  5. data/app/models/tang/invoice.rb +2 -2
  6. data/app/models/tang/subscription.rb +3 -3
  7. data/app/services/tang/create_subscription.rb +4 -1
  8. data/app/services/tang/delete_card.rb +4 -2
  9. data/app/services/tang/fail_invoice.rb +6 -3
  10. data/app/services/tang/save_card.rb +4 -1
  11. data/app/services/tang/update_subscription.rb +1 -1
  12. data/app/views/tang/account/cards/_payment.html.erb +0 -32
  13. data/app/views/tang/admin/subscriptions/_form.html.erb +0 -5
  14. data/app/views/tang/admin/subscriptions/show.html.erb +0 -7
  15. data/lib/css/main.css +31 -0
  16. data/lib/js/index.js +3 -2
  17. data/lib/tang/version.rb +1 -1
  18. data/spec/fixtures/stripe_webhooks/invoice.created.json +1 -2
  19. data/spec/fixtures/stripe_webhooks/invoice.payment_failed.json +172 -0
  20. data/spec/models/tang/card_spec.rb +4 -1
  21. data/spec/models/tang/charge_spec.rb +47 -1
  22. data/spec/tang_app/Gemfile.lock +70 -0
  23. data/spec/tang_app/app/javascript/packs/application.js +2 -1
  24. data/spec/tang_app/app/views/layouts/application.html.erb +1 -0
  25. data/spec/tang_app/log/development.log +342 -0
  26. data/spec/tang_app/log/test.log +52349 -0
  27. data/spec/tang_app/node_modules/fsevents/build/Release/fse.node +0 -0
  28. data/spec/tang_app/package.json +3 -0
  29. data/spec/tang_app/public/packs-test/js/application-0dded7840d00b04c8937.js +653 -0
  30. data/spec/tang_app/public/packs-test/js/application-0dded7840d00b04c8937.js.map +1 -0
  31. data/spec/tang_app/public/packs-test/manifest.json +4 -4
  32. data/spec/tang_app/public/packs/js/application-080539f58098495f5fea.js +873 -0
  33. data/spec/tang_app/public/packs/js/application-080539f58098495f5fea.js.map +1 -0
  34. data/spec/tang_app/public/packs/js/application-63744ba8e1d5132a70a7.js +653 -0
  35. data/spec/tang_app/public/packs/js/application-63744ba8e1d5132a70a7.js.map +1 -0
  36. data/spec/tang_app/public/packs/js/application-6ed6c7d5740861886e33.js +908 -0
  37. data/spec/tang_app/public/packs/js/application-6ed6c7d5740861886e33.js.map +1 -0
  38. data/spec/tang_app/public/packs/js/application-95a81db325472bcd27be.js +873 -0
  39. data/spec/tang_app/public/packs/js/application-95a81db325472bcd27be.js.map +1 -0
  40. data/spec/tang_app/public/packs/js/application-a4d14e60f459eb6278f8.js +873 -0
  41. data/spec/tang_app/public/packs/js/application-a4d14e60f459eb6278f8.js.map +1 -0
  42. data/spec/tang_app/public/packs/js/application-e5d6d1269e6e876bad16.js +654 -0
  43. data/spec/tang_app/public/packs/js/application-e5d6d1269e6e876bad16.js.map +1 -0
  44. data/spec/tang_app/public/packs/manifest.json +4 -4
  45. data/spec/tang_app/tmp/cache/webpacker/last-compilation-digest-development +1 -1
  46. data/spec/tang_app/tmp/cache/webpacker/last-compilation-digest-test +1 -1
  47. metadata +35 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/application-63744ba8e1d5132a70a7.js","sources":["webpack:///webpack/bootstrap","webpack:////Users/craigphares/Code/tang/lib/css/main.css?7cc1","webpack:////Users/craigphares/Code/tang/lib/js/index.js","webpack:///./app/javascript/packs/application.js","webpack:////Users/craigphares/Code/tang/lib/css/main.css","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"],"sourcesContent":[" \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 = \"http://localhost:3000/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/application.js\");\n","var api = require(\"!../../spec/tang_app/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../spec/tang_app/node_modules/css-loader/dist/cjs.js??ref--5-1!../../spec/tang_app/node_modules/postcss-loader/src/index.js??ref--5-2!./main.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Create a Stripe client.\nvar stripe = Stripe(process.env.STRIPE_PUBLISHABLE_KEY);\n\nconst registerElements = () => {\n\n if (!document.getElementById('card-element')) {\n return\n }\n\n // Create an instance of Elements.\n var elements = stripe.elements();\n\n // Custom styling can be passed to options when creating an Element.\n // (Note that this demo uses a wider set of styles than the guide below.)\n var style = {\n base: {\n color: '#32325d',\n fontFamily: '\"Helvetica Neue\", Helvetica, sans-serif',\n fontSmoothing: 'antialiased',\n fontSize: '16px',\n '::placeholder': {\n color: '#aab7c4'\n }\n },\n invalid: {\n color: '#fa755a',\n iconColor: '#fa755a'\n }\n };\n\n // Create an instance of the card Element.\n var card = elements.create('card', {style: style});\n\n // Add an instance of the card Element into the `card-element` <div>.\n card.mount('#card-element');\n // Handle real-time validation errors from the card Element.\n card.on('change', function(event) {\n var displayError = document.getElementById('card-errors');\n if (event.error) {\n displayError.textContent = event.error.message;\n } else {\n displayError.textContent = '';\n }\n });\n\n // Handle form submission.\n var form = document.getElementById('payment-form');\n form.addEventListener('submit', function(event) {\n event.preventDefault();\n\n const name = form.querySelector('#name')\n // const zip = form.querySelector('#zip')\n const additionalData = {\n name: name ? name.value : undefined,\n // address_zip: zip ? zip.value : undefined\n }\n\n stripe.createToken(card, additionalData).then(function(result) {\n if (result.error) {\n // Inform the user if there was an error.\n var errorElement = document.getElementById('card-errors');\n errorElement.textContent = result.error.message;\n } else {\n // Send the token to your server.\n stripeTokenHandler(result.token);\n }\n });\n });\n\n // Submit the form with the token ID.\n function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripe_token');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n // Submit the form\n form.submit();\n }\n\n}\n\nexport default registerElements","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport registerElements from '@sixoverground/tang'\nimport '@sixoverground/tang/lib/css/main.css'\n\nconsole.log('Hello World from Webpacker 1')\n\nregisterElements()","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../spec/tang_app/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \"/**\\n * The CSS shown here will not be introduced in the Quickstart guide, but shows\\n * how you can use CSS to style your Element's container.\\n */\\n .StripeElement {\\n box-sizing: border-box;\\n\\n height: 40px;\\n\\n padding: 10px 12px;\\n\\n border: 1px solid transparent;\\n border-radius: 4px;\\n background-color: white;\\n\\n box-shadow: 0 1px 3px 0 #e6ebf1;\\n transition: box-shadow 150ms ease;\\n}\\n .StripeElement--focus {\\n box-shadow: 0 1px 3px 0 #cfd7df;\\n }\\n .StripeElement--invalid {\\n border-color: #fa755a;\\n }\\n .StripeElement--webkit-autofill {\\n background-color: #fefde5 !important;\\n }\", \"\",{\"version\":3,\"sources\":[\"main.css\"],\"names\":[],\"mappings\":\"AAAA;;;EAGE;CACD;EACC,sBAAsB;;EAEtB,YAAY;;EAEZ,kBAAkB;;EAElB,6BAA6B;EAC7B,kBAAkB;EAClB,uBAAuB;;EAEvB,+BAA+B;EAE/B,iCAAiC;AACnC;CAEE;IACE,+BAA+B;EACjC;CAEA;IACE,qBAAqB;EACvB;CAEA;IACE,oCAAoC;EACtC\",\"file\":\"main.css\",\"sourcesContent\":[\"/**\\n * The CSS shown here will not be introduced in the Quickstart guide, but shows\\n * how you can use CSS to style your Element's container.\\n */\\n .StripeElement {\\n box-sizing: border-box;\\n\\n height: 40px;\\n\\n padding: 10px 12px;\\n\\n border: 1px solid transparent;\\n border-radius: 4px;\\n background-color: white;\\n\\n box-shadow: 0 1px 3px 0 #e6ebf1;\\n -webkit-transition: box-shadow 150ms ease;\\n transition: box-shadow 150ms ease;\\n}\\n \\n .StripeElement--focus {\\n box-shadow: 0 1px 3px 0 #cfd7df;\\n }\\n \\n .StripeElement--invalid {\\n border-color: #fa755a;\\n }\\n \\n .StripeElement--webkit-autofill {\\n background-color: #fefde5 !important;\\n }\"]}]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\n\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrFA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
@@ -0,0 +1,908 @@
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
+ /******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ i: moduleId,
15
+ /******/ l: false,
16
+ /******/ exports: {}
17
+ /******/ };
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.l = true;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+ /******/
36
+ /******/ // define getter function for harmony exports
37
+ /******/ __webpack_require__.d = function(exports, name, getter) {
38
+ /******/ if(!__webpack_require__.o(exports, name)) {
39
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
+ /******/ }
41
+ /******/ };
42
+ /******/
43
+ /******/ // define __esModule on exports
44
+ /******/ __webpack_require__.r = function(exports) {
45
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
+ /******/ }
48
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
49
+ /******/ };
50
+ /******/
51
+ /******/ // create a fake namespace object
52
+ /******/ // mode & 1: value is a module id, require it
53
+ /******/ // mode & 2: merge all properties of value into the ns
54
+ /******/ // mode & 4: return value when already ns object
55
+ /******/ // mode & 8|1: behave like require
56
+ /******/ __webpack_require__.t = function(value, mode) {
57
+ /******/ if(mode & 1) value = __webpack_require__(value);
58
+ /******/ if(mode & 8) return value;
59
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
+ /******/ var ns = Object.create(null);
61
+ /******/ __webpack_require__.r(ns);
62
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
+ /******/ return ns;
65
+ /******/ };
66
+ /******/
67
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
68
+ /******/ __webpack_require__.n = function(module) {
69
+ /******/ var getter = module && module.__esModule ?
70
+ /******/ function getDefault() { return module['default']; } :
71
+ /******/ function getModuleExports() { return module; };
72
+ /******/ __webpack_require__.d(getter, 'a', getter);
73
+ /******/ return getter;
74
+ /******/ };
75
+ /******/
76
+ /******/ // Object.prototype.hasOwnProperty.call
77
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
+ /******/
79
+ /******/ // __webpack_public_path__
80
+ /******/ __webpack_require__.p = "/packs/";
81
+ /******/
82
+ /******/
83
+ /******/ // Load entry module and return exports
84
+ /******/ return __webpack_require__(__webpack_require__.s = "./app/javascript/packs/application.js");
85
+ /******/ })
86
+ /************************************************************************/
87
+ /******/ ({
88
+
89
+ /***/ "../../lib/css/main.css":
90
+ /*!*****************************************************!*\
91
+ !*** /Users/craigphares/Code/tang/lib/css/main.css ***!
92
+ \*****************************************************/
93
+ /*! no static exports found */
94
+ /***/ (function(module, exports, __webpack_require__) {
95
+
96
+ var api = __webpack_require__(/*! ../../spec/tang_app/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
97
+ var content = __webpack_require__(/*! !../../spec/tang_app/node_modules/css-loader/dist/cjs.js??ref--5-1!../../spec/tang_app/node_modules/postcss-loader/src??ref--5-2!./main.css */ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!../../lib/css/main.css");
98
+
99
+ content = content.__esModule ? content.default : content;
100
+
101
+ if (typeof content === 'string') {
102
+ content = [[module.i, content, '']];
103
+ }
104
+
105
+ var options = {};
106
+
107
+ options.insert = "head";
108
+ options.singleton = false;
109
+
110
+ var update = api(content, options);
111
+
112
+
113
+
114
+ module.exports = content.locals || {};
115
+
116
+ /***/ }),
117
+
118
+ /***/ "../../lib/js/index.js":
119
+ /*!****************************************************!*\
120
+ !*** /Users/craigphares/Code/tang/lib/js/index.js ***!
121
+ \****************************************************/
122
+ /*! no exports provided */
123
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
124
+
125
+ "use strict";
126
+ __webpack_require__.r(__webpack_exports__);
127
+ /* WEBPACK VAR INJECTION */(function(process, module) {/* harmony import */ var _css_main_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../css/main.css */ "../../lib/css/main.css");
128
+ /* harmony import */ var _css_main_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_main_css__WEBPACK_IMPORTED_MODULE_0__);
129
+
130
+
131
+ // Create a Stripe client.
132
+ var stripe = Stripe(process.env.STRIPE_PUBLISHABLE_KEY);
133
+
134
+ const registerElements = () => {
135
+
136
+ if (!document.getElementById('card-element')) {
137
+ return
138
+ }
139
+
140
+ // Create an instance of Elements.
141
+ var elements = stripe.elements();
142
+
143
+ // Custom styling can be passed to options when creating an Element.
144
+ // (Note that this demo uses a wider set of styles than the guide below.)
145
+ var style = {
146
+ base: {
147
+ color: '#32325d',
148
+ fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
149
+ fontSmoothing: 'antialiased',
150
+ fontSize: '16px',
151
+ '::placeholder': {
152
+ color: '#aab7c4'
153
+ }
154
+ },
155
+ invalid: {
156
+ color: '#fa755a',
157
+ iconColor: '#fa755a'
158
+ }
159
+ };
160
+
161
+ // Create an instance of the card Element.
162
+ var card = elements.create('card', {style: style});
163
+
164
+ // Add an instance of the card Element into the `card-element` <div>.
165
+ card.mount('#card-element');
166
+ // Handle real-time validation errors from the card Element.
167
+ card.on('change', function(event) {
168
+ var displayError = document.getElementById('card-errors');
169
+ if (event.error) {
170
+ displayError.textContent = event.error.message;
171
+ } else {
172
+ displayError.textContent = '';
173
+ }
174
+ });
175
+
176
+ // Handle form submission.
177
+ var form = document.getElementById('payment-form');
178
+ form.addEventListener('submit', function(event) {
179
+ event.preventDefault();
180
+
181
+ const name = form.querySelector('#name')
182
+ // const zip = form.querySelector('#zip')
183
+ const additionalData = {
184
+ name: name ? name.value : undefined,
185
+ // address_zip: zip ? zip.value : undefined
186
+ }
187
+
188
+ stripe.createToken(card, additionalData).then(function(result) {
189
+ if (result.error) {
190
+ // Inform the user if there was an error.
191
+ var errorElement = document.getElementById('card-errors');
192
+ errorElement.textContent = result.error.message;
193
+ } else {
194
+ // Send the token to your server.
195
+ stripeTokenHandler(result.token);
196
+ }
197
+ });
198
+ });
199
+
200
+ // Submit the form with the token ID.
201
+ function stripeTokenHandler(token) {
202
+ // Insert the token ID into the form so it gets submitted to the server
203
+ var form = document.getElementById('payment-form');
204
+ var hiddenInput = document.createElement('input');
205
+ hiddenInput.setAttribute('type', 'hidden');
206
+ hiddenInput.setAttribute('name', 'stripe_token');
207
+ hiddenInput.setAttribute('value', token.id);
208
+ form.appendChild(hiddenInput);
209
+
210
+ // Submit the form
211
+ form.submit();
212
+ }
213
+
214
+ }
215
+
216
+ module.exports = { registerElements }
217
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../spec/tang_app/node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../spec/tang_app/node_modules/webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
218
+
219
+ /***/ }),
220
+
221
+ /***/ "./app/javascript/packs/application.js":
222
+ /*!*********************************************!*\
223
+ !*** ./app/javascript/packs/application.js ***!
224
+ \*********************************************/
225
+ /*! no exports provided */
226
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
227
+
228
+ "use strict";
229
+ __webpack_require__.r(__webpack_exports__);
230
+ /* harmony import */ var _sixoverground_tang__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @sixoverground/tang */ "../../lib/js/index.js");
231
+ /* eslint no-console:0 */
232
+ // This file is automatically compiled by Webpack, along with any other files
233
+ // present in this directory. You're encouraged to place your actual application logic in
234
+ // a relevant structure within app/javascript and only use these pack files to reference
235
+ // that code so it'll be compiled.
236
+ //
237
+ // To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
238
+ // layout file, like app/views/layouts/application.html.erb
239
+ // Uncomment to copy all static images under ../images to the output folder and reference
240
+ // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
241
+ // or the `imagePath` JavaScript helper below.
242
+ //
243
+ // const images = require.context('../images', true)
244
+ // const imagePath = (name) => images(name, true)
245
+
246
+ console.log('Hello World from Webpacker 1');
247
+ Object(_sixoverground_tang__WEBPACK_IMPORTED_MODULE_0__["registerElements"])();
248
+
249
+ /***/ }),
250
+
251
+ /***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!../../lib/css/main.css":
252
+ /*!*************************************************************************************************************************************************!*\
253
+ !*** ./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/postcss-loader/src??ref--5-2!/Users/craigphares/Code/tang/lib/css/main.css ***!
254
+ \*************************************************************************************************************************************************/
255
+ /*! no static exports found */
256
+ /***/ (function(module, exports, __webpack_require__) {
257
+
258
+ // Imports
259
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../spec/tang_app/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
260
+ exports = ___CSS_LOADER_API_IMPORT___(true);
261
+ // Module
262
+ exports.push([module.i, "/**\n * The CSS shown here will not be introduced in the Quickstart guide, but shows\n * how you can use CSS to style your Element's container.\n */\n .StripeElement {\n box-sizing: border-box;\n\n height: 40px;\n\n padding: 10px 12px;\n\n border: 1px solid transparent;\n border-radius: 4px;\n background-color: white;\n\n box-shadow: 0 1px 3px 0 #e6ebf1;\n transition: box-shadow 150ms ease;\n}\n .StripeElement--focus {\n box-shadow: 0 1px 3px 0 #cfd7df;\n }\n .StripeElement--invalid {\n border-color: #fa755a;\n }\n .StripeElement--webkit-autofill {\n background-color: #fefde5 !important;\n }", "",{"version":3,"sources":["main.css"],"names":[],"mappings":"AAAA;;;EAGE;CACD;EACC,sBAAsB;;EAEtB,YAAY;;EAEZ,kBAAkB;;EAElB,6BAA6B;EAC7B,kBAAkB;EAClB,uBAAuB;;EAEvB,+BAA+B;EAE/B,iCAAiC;AACnC;CAEE;IACE,+BAA+B;EACjC;CAEA;IACE,qBAAqB;EACvB;CAEA;IACE,oCAAoC;EACtC","file":"main.css","sourcesContent":["/**\n * The CSS shown here will not be introduced in the Quickstart guide, but shows\n * how you can use CSS to style your Element's container.\n */\n .StripeElement {\n box-sizing: border-box;\n\n height: 40px;\n\n padding: 10px 12px;\n\n border: 1px solid transparent;\n border-radius: 4px;\n background-color: white;\n\n box-shadow: 0 1px 3px 0 #e6ebf1;\n -webkit-transition: box-shadow 150ms ease;\n transition: box-shadow 150ms ease;\n}\n \n .StripeElement--focus {\n box-shadow: 0 1px 3px 0 #cfd7df;\n }\n \n .StripeElement--invalid {\n border-color: #fa755a;\n }\n \n .StripeElement--webkit-autofill {\n background-color: #fefde5 !important;\n }"]}]);
263
+ // Exports
264
+ module.exports = exports;
265
+
266
+
267
+ /***/ }),
268
+
269
+ /***/ "./node_modules/css-loader/dist/runtime/api.js":
270
+ /*!*****************************************************!*\
271
+ !*** ./node_modules/css-loader/dist/runtime/api.js ***!
272
+ \*****************************************************/
273
+ /*! no static exports found */
274
+ /***/ (function(module, exports, __webpack_require__) {
275
+
276
+ "use strict";
277
+
278
+ /*
279
+ MIT License http://www.opensource.org/licenses/mit-license.php
280
+ Author Tobias Koppers @sokra
281
+ */
282
+ // css base code, injected by the css-loader
283
+ // eslint-disable-next-line func-names
284
+
285
+ module.exports = function (useSourceMap) {
286
+ var list = []; // return the list of modules as css string
287
+
288
+ list.toString = function toString() {
289
+ return this.map(function (item) {
290
+ var content = cssWithMappingToString(item, useSourceMap);
291
+
292
+ if (item[2]) {
293
+ return "@media ".concat(item[2], " {").concat(content, "}");
294
+ }
295
+
296
+ return content;
297
+ }).join('');
298
+ }; // import a list of modules into the list
299
+ // eslint-disable-next-line func-names
300
+
301
+
302
+ list.i = function (modules, mediaQuery, dedupe) {
303
+ if (typeof modules === 'string') {
304
+ // eslint-disable-next-line no-param-reassign
305
+ modules = [[null, modules, '']];
306
+ }
307
+
308
+ var alreadyImportedModules = {};
309
+
310
+ if (dedupe) {
311
+ for (var i = 0; i < this.length; i++) {
312
+ // eslint-disable-next-line prefer-destructuring
313
+ var id = this[i][0];
314
+
315
+ if (id != null) {
316
+ alreadyImportedModules[id] = true;
317
+ }
318
+ }
319
+ }
320
+
321
+ for (var _i = 0; _i < modules.length; _i++) {
322
+ var item = [].concat(modules[_i]);
323
+
324
+ if (dedupe && alreadyImportedModules[item[0]]) {
325
+ // eslint-disable-next-line no-continue
326
+ continue;
327
+ }
328
+
329
+ if (mediaQuery) {
330
+ if (!item[2]) {
331
+ item[2] = mediaQuery;
332
+ } else {
333
+ item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
334
+ }
335
+ }
336
+
337
+ list.push(item);
338
+ }
339
+ };
340
+
341
+ return list;
342
+ };
343
+
344
+ function cssWithMappingToString(item, useSourceMap) {
345
+ var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
346
+
347
+ var cssMapping = item[3];
348
+
349
+ if (!cssMapping) {
350
+ return content;
351
+ }
352
+
353
+ if (useSourceMap && typeof btoa === 'function') {
354
+ var sourceMapping = toComment(cssMapping);
355
+ var sourceURLs = cssMapping.sources.map(function (source) {
356
+ return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
357
+ });
358
+ return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
359
+ }
360
+
361
+ return [content].join('\n');
362
+ } // Adapted from convert-source-map (MIT)
363
+
364
+
365
+ function toComment(sourceMap) {
366
+ // eslint-disable-next-line no-undef
367
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
368
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
369
+ return "/*# ".concat(data, " */");
370
+ }
371
+
372
+ /***/ }),
373
+
374
+ /***/ "./node_modules/process/browser.js":
375
+ /*!*****************************************!*\
376
+ !*** ./node_modules/process/browser.js ***!
377
+ \*****************************************/
378
+ /*! no static exports found */
379
+ /***/ (function(module, exports) {
380
+
381
+ // shim for using process in browser
382
+ var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
383
+ // don't break things. But we need to wrap it in a try catch in case it is
384
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
385
+ // function because try/catches deoptimize in certain engines.
386
+
387
+ var cachedSetTimeout;
388
+ var cachedClearTimeout;
389
+
390
+ function defaultSetTimout() {
391
+ throw new Error('setTimeout has not been defined');
392
+ }
393
+
394
+ function defaultClearTimeout() {
395
+ throw new Error('clearTimeout has not been defined');
396
+ }
397
+
398
+ (function () {
399
+ try {
400
+ if (typeof setTimeout === 'function') {
401
+ cachedSetTimeout = setTimeout;
402
+ } else {
403
+ cachedSetTimeout = defaultSetTimout;
404
+ }
405
+ } catch (e) {
406
+ cachedSetTimeout = defaultSetTimout;
407
+ }
408
+
409
+ try {
410
+ if (typeof clearTimeout === 'function') {
411
+ cachedClearTimeout = clearTimeout;
412
+ } else {
413
+ cachedClearTimeout = defaultClearTimeout;
414
+ }
415
+ } catch (e) {
416
+ cachedClearTimeout = defaultClearTimeout;
417
+ }
418
+ })();
419
+
420
+ function runTimeout(fun) {
421
+ if (cachedSetTimeout === setTimeout) {
422
+ //normal enviroments in sane situations
423
+ return setTimeout(fun, 0);
424
+ } // if setTimeout wasn't available but was latter defined
425
+
426
+
427
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
428
+ cachedSetTimeout = setTimeout;
429
+ return setTimeout(fun, 0);
430
+ }
431
+
432
+ try {
433
+ // when when somebody has screwed with setTimeout but no I.E. maddness
434
+ return cachedSetTimeout(fun, 0);
435
+ } catch (e) {
436
+ try {
437
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
438
+ return cachedSetTimeout.call(null, fun, 0);
439
+ } catch (e) {
440
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
441
+ return cachedSetTimeout.call(this, fun, 0);
442
+ }
443
+ }
444
+ }
445
+
446
+ function runClearTimeout(marker) {
447
+ if (cachedClearTimeout === clearTimeout) {
448
+ //normal enviroments in sane situations
449
+ return clearTimeout(marker);
450
+ } // if clearTimeout wasn't available but was latter defined
451
+
452
+
453
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
454
+ cachedClearTimeout = clearTimeout;
455
+ return clearTimeout(marker);
456
+ }
457
+
458
+ try {
459
+ // when when somebody has screwed with setTimeout but no I.E. maddness
460
+ return cachedClearTimeout(marker);
461
+ } catch (e) {
462
+ try {
463
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
464
+ return cachedClearTimeout.call(null, marker);
465
+ } catch (e) {
466
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
467
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
468
+ return cachedClearTimeout.call(this, marker);
469
+ }
470
+ }
471
+ }
472
+
473
+ var queue = [];
474
+ var draining = false;
475
+ var currentQueue;
476
+ var queueIndex = -1;
477
+
478
+ function cleanUpNextTick() {
479
+ if (!draining || !currentQueue) {
480
+ return;
481
+ }
482
+
483
+ draining = false;
484
+
485
+ if (currentQueue.length) {
486
+ queue = currentQueue.concat(queue);
487
+ } else {
488
+ queueIndex = -1;
489
+ }
490
+
491
+ if (queue.length) {
492
+ drainQueue();
493
+ }
494
+ }
495
+
496
+ function drainQueue() {
497
+ if (draining) {
498
+ return;
499
+ }
500
+
501
+ var timeout = runTimeout(cleanUpNextTick);
502
+ draining = true;
503
+ var len = queue.length;
504
+
505
+ while (len) {
506
+ currentQueue = queue;
507
+ queue = [];
508
+
509
+ while (++queueIndex < len) {
510
+ if (currentQueue) {
511
+ currentQueue[queueIndex].run();
512
+ }
513
+ }
514
+
515
+ queueIndex = -1;
516
+ len = queue.length;
517
+ }
518
+
519
+ currentQueue = null;
520
+ draining = false;
521
+ runClearTimeout(timeout);
522
+ }
523
+
524
+ process.nextTick = function (fun) {
525
+ var args = new Array(arguments.length - 1);
526
+
527
+ if (arguments.length > 1) {
528
+ for (var i = 1; i < arguments.length; i++) {
529
+ args[i - 1] = arguments[i];
530
+ }
531
+ }
532
+
533
+ queue.push(new Item(fun, args));
534
+
535
+ if (queue.length === 1 && !draining) {
536
+ runTimeout(drainQueue);
537
+ }
538
+ }; // v8 likes predictible objects
539
+
540
+
541
+ function Item(fun, array) {
542
+ this.fun = fun;
543
+ this.array = array;
544
+ }
545
+
546
+ Item.prototype.run = function () {
547
+ this.fun.apply(null, this.array);
548
+ };
549
+
550
+ process.title = 'browser';
551
+ process.browser = true;
552
+ process.env = {};
553
+ process.argv = [];
554
+ process.version = ''; // empty string to avoid regexp issues
555
+
556
+ process.versions = {};
557
+
558
+ function noop() {}
559
+
560
+ process.on = noop;
561
+ process.addListener = noop;
562
+ process.once = noop;
563
+ process.off = noop;
564
+ process.removeListener = noop;
565
+ process.removeAllListeners = noop;
566
+ process.emit = noop;
567
+ process.prependListener = noop;
568
+ process.prependOnceListener = noop;
569
+
570
+ process.listeners = function (name) {
571
+ return [];
572
+ };
573
+
574
+ process.binding = function (name) {
575
+ throw new Error('process.binding is not supported');
576
+ };
577
+
578
+ process.cwd = function () {
579
+ return '/';
580
+ };
581
+
582
+ process.chdir = function (dir) {
583
+ throw new Error('process.chdir is not supported');
584
+ };
585
+
586
+ process.umask = function () {
587
+ return 0;
588
+ };
589
+
590
+ /***/ }),
591
+
592
+ /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
593
+ /*!****************************************************************************!*\
594
+ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
595
+ \****************************************************************************/
596
+ /*! no static exports found */
597
+ /***/ (function(module, exports, __webpack_require__) {
598
+
599
+ "use strict";
600
+
601
+
602
+ var isOldIE = function isOldIE() {
603
+ var memo;
604
+ return function memorize() {
605
+ if (typeof memo === 'undefined') {
606
+ // Test for IE <= 9 as proposed by Browserhacks
607
+ // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
608
+ // Tests for existence of standard globals is to allow style-loader
609
+ // to operate correctly into non-standard environments
610
+ // @see https://github.com/webpack-contrib/style-loader/issues/177
611
+ memo = Boolean(window && document && document.all && !window.atob);
612
+ }
613
+
614
+ return memo;
615
+ };
616
+ }();
617
+
618
+ var getTarget = function getTarget() {
619
+ var memo = {};
620
+ return function memorize(target) {
621
+ if (typeof memo[target] === 'undefined') {
622
+ var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
623
+
624
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
625
+ try {
626
+ // This will throw an exception if access to iframe is blocked
627
+ // due to cross-origin restrictions
628
+ styleTarget = styleTarget.contentDocument.head;
629
+ } catch (e) {
630
+ // istanbul ignore next
631
+ styleTarget = null;
632
+ }
633
+ }
634
+
635
+ memo[target] = styleTarget;
636
+ }
637
+
638
+ return memo[target];
639
+ };
640
+ }();
641
+
642
+ var stylesInDom = [];
643
+
644
+ function getIndexByIdentifier(identifier) {
645
+ var result = -1;
646
+
647
+ for (var i = 0; i < stylesInDom.length; i++) {
648
+ if (stylesInDom[i].identifier === identifier) {
649
+ result = i;
650
+ break;
651
+ }
652
+ }
653
+
654
+ return result;
655
+ }
656
+
657
+ function modulesToDom(list, options) {
658
+ var idCountMap = {};
659
+ var identifiers = [];
660
+
661
+ for (var i = 0; i < list.length; i++) {
662
+ var item = list[i];
663
+ var id = options.base ? item[0] + options.base : item[0];
664
+ var count = idCountMap[id] || 0;
665
+ var identifier = "".concat(id, " ").concat(count);
666
+ idCountMap[id] = count + 1;
667
+ var index = getIndexByIdentifier(identifier);
668
+ var obj = {
669
+ css: item[1],
670
+ media: item[2],
671
+ sourceMap: item[3]
672
+ };
673
+
674
+ if (index !== -1) {
675
+ stylesInDom[index].references++;
676
+ stylesInDom[index].updater(obj);
677
+ } else {
678
+ stylesInDom.push({
679
+ identifier: identifier,
680
+ updater: addStyle(obj, options),
681
+ references: 1
682
+ });
683
+ }
684
+
685
+ identifiers.push(identifier);
686
+ }
687
+
688
+ return identifiers;
689
+ }
690
+
691
+ function insertStyleElement(options) {
692
+ var style = document.createElement('style');
693
+ var attributes = options.attributes || {};
694
+
695
+ if (typeof attributes.nonce === 'undefined') {
696
+ var nonce = true ? __webpack_require__.nc : undefined;
697
+
698
+ if (nonce) {
699
+ attributes.nonce = nonce;
700
+ }
701
+ }
702
+
703
+ Object.keys(attributes).forEach(function (key) {
704
+ style.setAttribute(key, attributes[key]);
705
+ });
706
+
707
+ if (typeof options.insert === 'function') {
708
+ options.insert(style);
709
+ } else {
710
+ var target = getTarget(options.insert || 'head');
711
+
712
+ if (!target) {
713
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
714
+ }
715
+
716
+ target.appendChild(style);
717
+ }
718
+
719
+ return style;
720
+ }
721
+
722
+ function removeStyleElement(style) {
723
+ // istanbul ignore if
724
+ if (style.parentNode === null) {
725
+ return false;
726
+ }
727
+
728
+ style.parentNode.removeChild(style);
729
+ }
730
+ /* istanbul ignore next */
731
+
732
+
733
+ var replaceText = function replaceText() {
734
+ var textStore = [];
735
+ return function replace(index, replacement) {
736
+ textStore[index] = replacement;
737
+ return textStore.filter(Boolean).join('\n');
738
+ };
739
+ }();
740
+
741
+ function applyToSingletonTag(style, index, remove, obj) {
742
+ var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
743
+
744
+ /* istanbul ignore if */
745
+
746
+ if (style.styleSheet) {
747
+ style.styleSheet.cssText = replaceText(index, css);
748
+ } else {
749
+ var cssNode = document.createTextNode(css);
750
+ var childNodes = style.childNodes;
751
+
752
+ if (childNodes[index]) {
753
+ style.removeChild(childNodes[index]);
754
+ }
755
+
756
+ if (childNodes.length) {
757
+ style.insertBefore(cssNode, childNodes[index]);
758
+ } else {
759
+ style.appendChild(cssNode);
760
+ }
761
+ }
762
+ }
763
+
764
+ function applyToTag(style, options, obj) {
765
+ var css = obj.css;
766
+ var media = obj.media;
767
+ var sourceMap = obj.sourceMap;
768
+
769
+ if (media) {
770
+ style.setAttribute('media', media);
771
+ } else {
772
+ style.removeAttribute('media');
773
+ }
774
+
775
+ if (sourceMap && btoa) {
776
+ css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
777
+ } // For old IE
778
+
779
+ /* istanbul ignore if */
780
+
781
+
782
+ if (style.styleSheet) {
783
+ style.styleSheet.cssText = css;
784
+ } else {
785
+ while (style.firstChild) {
786
+ style.removeChild(style.firstChild);
787
+ }
788
+
789
+ style.appendChild(document.createTextNode(css));
790
+ }
791
+ }
792
+
793
+ var singleton = null;
794
+ var singletonCounter = 0;
795
+
796
+ function addStyle(obj, options) {
797
+ var style;
798
+ var update;
799
+ var remove;
800
+
801
+ if (options.singleton) {
802
+ var styleIndex = singletonCounter++;
803
+ style = singleton || (singleton = insertStyleElement(options));
804
+ update = applyToSingletonTag.bind(null, style, styleIndex, false);
805
+ remove = applyToSingletonTag.bind(null, style, styleIndex, true);
806
+ } else {
807
+ style = insertStyleElement(options);
808
+ update = applyToTag.bind(null, style, options);
809
+
810
+ remove = function remove() {
811
+ removeStyleElement(style);
812
+ };
813
+ }
814
+
815
+ update(obj);
816
+ return function updateStyle(newObj) {
817
+ if (newObj) {
818
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
819
+ return;
820
+ }
821
+
822
+ update(obj = newObj);
823
+ } else {
824
+ remove();
825
+ }
826
+ };
827
+ }
828
+
829
+ module.exports = function (list, options) {
830
+ options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
831
+ // tags it will allow on a page
832
+
833
+ if (!options.singleton && typeof options.singleton !== 'boolean') {
834
+ options.singleton = isOldIE();
835
+ }
836
+
837
+ list = list || [];
838
+ var lastIdentifiers = modulesToDom(list, options);
839
+ return function update(newList) {
840
+ newList = newList || [];
841
+
842
+ if (Object.prototype.toString.call(newList) !== '[object Array]') {
843
+ return;
844
+ }
845
+
846
+ for (var i = 0; i < lastIdentifiers.length; i++) {
847
+ var identifier = lastIdentifiers[i];
848
+ var index = getIndexByIdentifier(identifier);
849
+ stylesInDom[index].references--;
850
+ }
851
+
852
+ var newLastIdentifiers = modulesToDom(newList, options);
853
+
854
+ for (var _i = 0; _i < lastIdentifiers.length; _i++) {
855
+ var _identifier = lastIdentifiers[_i];
856
+
857
+ var _index = getIndexByIdentifier(_identifier);
858
+
859
+ if (stylesInDom[_index].references === 0) {
860
+ stylesInDom[_index].updater();
861
+
862
+ stylesInDom.splice(_index, 1);
863
+ }
864
+ }
865
+
866
+ lastIdentifiers = newLastIdentifiers;
867
+ };
868
+ };
869
+
870
+ /***/ }),
871
+
872
+ /***/ "./node_modules/webpack/buildin/harmony-module.js":
873
+ /*!*******************************************!*\
874
+ !*** (webpack)/buildin/harmony-module.js ***!
875
+ \*******************************************/
876
+ /*! no static exports found */
877
+ /***/ (function(module, exports) {
878
+
879
+ module.exports = function (originalModule) {
880
+ if (!originalModule.webpackPolyfill) {
881
+ var module = Object.create(originalModule); // module.parent = undefined by default
882
+
883
+ if (!module.children) module.children = [];
884
+ Object.defineProperty(module, "loaded", {
885
+ enumerable: true,
886
+ get: function get() {
887
+ return module.l;
888
+ }
889
+ });
890
+ Object.defineProperty(module, "id", {
891
+ enumerable: true,
892
+ get: function get() {
893
+ return module.i;
894
+ }
895
+ });
896
+ Object.defineProperty(module, "exports", {
897
+ enumerable: true
898
+ });
899
+ module.webpackPolyfill = 1;
900
+ }
901
+
902
+ return module;
903
+ };
904
+
905
+ /***/ })
906
+
907
+ /******/ });
908
+ //# sourceMappingURL=application-6ed6c7d5740861886e33.js.map