{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/js-cookie/dist/js.cookie.js","webpack:///./app/javascript/packs/sessions.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","assign","target","arguments","length","source","init","converter","defaultAttributes","set","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","cookies","jar","parts","slice","join","found","read","e","remove","withAttributes","this","withConverter","freeze","path","factory","$","ready","console","log","pizza","Cookies","undefined","val","rememberMe","on","is","email","click","preventDefault","find","$popup","html","$form","ajax","type","url","data","FormData","contentType","cache","processData","success","result","status","addClass","removeClass","message","setTimeout","trigger","error","window","location","href"],"mappings":"aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,CAAC,GAUX,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,OACf,CAIAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,GAEhE,EAGAZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,GACvD,EAOArB,EAAoBsB,EAAI,SA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,EACbC,QAAS,SAAUC,GACjBzB,QAAQC,IAAI,UAAYwB,EAAOC,QAC/Bb,EAAOD,KAAK,gBAAgBe,SAAS,QACrCd,EAAOD,KAAK,6BAA6BgB,YAAY,QAEhC,KAAjBH,EAAOC,QACTb,EAAOD,KAAK,YAAYgB,YAAY,QAAQd,KAAKW,EAAOI,SACxDhB,EAAOD,KAAK,gBAAgBe,SAAS,QAGrCG,YAAW,WACTjB,EAAOD,KAAK,iBAAiBmB,QAAQ,QACvC,GAAG,MAGHlB,EAAOD,KAAK,UAAUgB,YAAY,QAAQd,KAAKW,EAAOO,MAE1D,EACAA,MAAO,SAAUP,GACjB,GAEJ,CACF,IAEA3B,EAAE,iBAAiBS,GAAG,QAAS,iBAAiB,WAC9C0B,OAAOC,SAASC,KAAO,YACzB,IAEJ,G","file":"js/sessions-f5566f76deb2208b9745.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 = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 324);\n","/*! js-cookie v3.0.5 | MIT */\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, function () {\n var current = global.Cookies;\n var exports = global.Cookies = factory();\n exports.noConflict = function () {\n global.Cookies = current;\n return exports;\n };\n }());\n})(this, function () {\n 'use strict';\n\n /* eslint-disable no-var */\n function assign(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target;\n }\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n var defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function (value) {\n return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);\n }\n };\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n\n function init(converter, defaultAttributes) {\n function set(name, value, attributes) {\n if (typeof document === 'undefined') {\n return;\n }\n attributes = assign({}, defaultAttributes, attributes);\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue;\n }\n stringifiedAttributes += '; ' + attributeName;\n if (attributes[attributeName] === true) {\n continue;\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n return document.cookie = name + '=' + converter.write(value, name) + stringifiedAttributes;\n }\n function get(name) {\n if (typeof document === 'undefined' || arguments.length && !name) {\n return;\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n if (name === found) {\n break;\n }\n } catch (e) {}\n }\n return name ? jar[name] : jar;\n }\n return Object.create({\n set,\n get,\n remove: function (name, attributes) {\n set(name, '', assign({}, attributes, {\n expires: -1\n }));\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes));\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes);\n }\n }, {\n attributes: {\n value: Object.freeze(defaultAttributes)\n },\n converter: {\n value: Object.freeze(converter)\n }\n });\n }\n var api = init(defaultConverter, {\n path: '/'\n });\n /* eslint-enable no-var */\n\n return api;\n});","import Cookies from 'js-cookie';\r\n// import $ from 'jquery';\r\n\r\n$(document).ready(function () {\r\n\r\n //highlight cut-off sign in\r\n //$(\"input[name='company[email]']\")\r\n // var $emailField = $(document).find(\"input[name='user[email]']\");\r\n // var $passwordField = $(document).find(\"input[name='user[password]']\");\r\n // $emailField.on('click', function (e) {\r\n // console.log('email target lock')\r\n // $(document).find('#email-signin').addClass('form-control-focus');\r\n // e.stopPropagation();\r\n // })\r\n // $passwordField.on('click', function (e) {\r\n // console.log('password target lock')\r\n // $(document).find('#password-signin').addClass('form-control-focus');\r\n // e.stopPropagation();\r\n // })\r\n // $(document).on('click', function () {\r\n // console.log('remove form-control-focus')\r\n // $(document).find('#email-signin').removeClass('form-control-focus')\r\n // $(document).find('#password-signin').removeClass('form-control-focus')\r\n // })\r\n //\r\n\r\n console.log('document loaded - on sign in pages')\r\n var pizza = Cookies.get('pizza')\r\n if(pizza != undefined)\r\n {\r\n $(\"input[name='user[email]']\").val(pizza)\r\n }\r\n var rememberMe = false;\r\n $(\"input[name=remember]\").on('change', function () {\r\n if ($(this).is(':checked')) {\r\n console.log('remember me')\r\n rememberMe = true\r\n }\r\n else {\r\n console.log('forget me')\r\n rememberMe = false\r\n }\r\n })\r\n $(document).on('submit', 'form', function () {\r\n if(rememberMe)\r\n {\r\n var email = $(\"input[name='user[email]']\").val()\r\n Cookies.set('pizza',email, {expires: 1})\r\n }\r\n $(\"button.loading-btn\").click();\r\n });\r\n\r\n\r\n\r\n if ($(\".verify-user\").length) {\r\n $(\".verify-user\").on(\"click\", \".btn-verification\", function (e) {\r\n e.preventDefault();\r\n\r\n if ($(\".verify-user\").find(\".verification-token\").val() != \"\") {\r\n $(\"button.loading-btn\").click();\r\n var $popup = $('#loadingModal');\r\n $popup.find(\".error, .message\").html(\"\");\r\n var $form = $(\".verify-user\").find(\"form\");\r\n\r\n $.ajax({\r\n type: \"PUT\",\r\n url: \"/verify_user\",\r\n data: new FormData($form[0]),\r\n contentType: false,\r\n cache: false,\r\n processData: false,\r\n success: function (result) {\r\n console.log(\"status \" + result.status)\r\n $popup.find(\".loading-row\").addClass(\"hide\");\r\n $popup.find(\".message-row, .button-row\").removeClass(\"hide\");\r\n\r\n if (result.status == 200) {\r\n $popup.find(\".message\").removeClass(\"hide\").html(result.message);\r\n $popup.find(\".btn-confirm\").addClass(\"hide\");\r\n // $popup.find(\".btn-redirect\").removeClass(\"hide\");\r\n\r\n setTimeout(function () {\r\n $popup.find(\".btn-redirect\").trigger(\"click\");\r\n }, 1000);\r\n }\r\n else {\r\n $popup.find(\".error\").removeClass(\"hide\").html(result.error);\r\n }\r\n },\r\n error: function (result) {\r\n }\r\n });\r\n }\r\n });\r\n\r\n $(\"#loadingModal\").on(\"click\", \".btn-redirect\", function () {\r\n window.location.href = \"/dashboard\"\r\n });\r\n }\r\n});"],"sourceRoot":""}