437 lines
134 KiB
JavaScript
437 lines
134 KiB
JavaScript
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ "./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css":
|
|
/*!****************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css ***!
|
|
\****************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/styles/css/base.css?./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss":
|
|
/*!******************************************************************************************************!*\
|
|
!*** ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss ***!
|
|
\******************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"body {\\n font-family: 'Poppins', sans-serif;\\n background-color: #252525; }\\n\\np {\\n font-family: 'Poppins', sans-serif;\\n font-size: 1.1em;\\n font-weight: 300;\\n line-height: 1.7em;\\n color: #999; }\\n\\na,\\na:hover,\\na:focus {\\n color: inherit;\\n text-decoration: none;\\n transition: all 0.3s; }\\n\\n.navbar {\\n padding: 15px 10px;\\n background: #fff;\\n border: none;\\n border-radius: 0 5px 5px 0;\\n margin-bottom: 40px;\\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); }\\n\\n.navbar-btn {\\n box-shadow: none;\\n outline: none !important;\\n border: none; }\\n\\n.line {\\n width: 100%;\\n height: 1px;\\n border-bottom: 1px dashed #ddd;\\n margin: 20px 0; }\\n\\ni,\\nspan {\\n display: inline-block; }\\n\\n/* ---------------------------------------------------\\r\\n SIDEBAR STYLE\\r\\n----------------------------------------------------- */\\n.wrapper {\\n display: flex;\\n align-items: stretch; }\\n\\n#sidebar {\\n min-width: 250px;\\n max-width: 250px;\\n background: #f39c12;\\n color: #252525;\\n transition: all 0.3s; }\\n\\n#sidebar.active {\\n min-width: 80px;\\n max-width: 80px;\\n text-align: center; }\\n\\n#sidebar.active .sidebar-header h3,\\n#sidebar.active .CTAs {\\n display: none; }\\n\\n.sidebar-header h3 {\\n display: inline;\\n padding-left: 0.6em;\\n vertical-align: middle; }\\n\\n#sidebar.active .sidebar-header strong {\\n display: block; }\\n\\n#sidebar ul li a {\\n text-align: left; }\\n\\n#sidebar.active ul li a {\\n padding: 20px 10px;\\n text-align: center;\\n font-size: 0.85em; }\\n\\n#sidebar.active ul li a i {\\n margin-right: 0;\\n display: block;\\n font-size: 1.8em;\\n margin-bottom: 5px; }\\n\\n#sidebar.active ul ul a {\\n padding: 10px !important; }\\n\\n#sidebar.active .dropdown-toggle::after {\\n top: auto;\\n bottom: 10px;\\n right: 50%;\\n -webkit-transform: translateX(50%);\\n -ms-transform: translateX(50%);\\n transform: translateX(50%); }\\n\\n#sidebar .sidebar-header {\\n padding: 20px;\\n background: #252525; }\\n\\n#sidebar .sidebar-header strong {\\n display: none;\\n font-size: 1.8em; }\\n\\n#sidebar ul.components {\\n padding: 20px 0;\\n border-bottom: 3px solid #252525; }\\n\\n#sidebar ul li a {\\n padding: 10px;\\n font-size: 1.1em;\\n display: block; }\\n\\n#sidebar ul li a:hover {\\n color: #7386D5;\\n background: #fff; }\\n\\n#sidebar ul li a i {\\n margin-right: 10px; }\\n\\n#sidebar ul li.active > a,\\na[aria-expanded=\\\"true\\\"] {\\n color: #f39c12;\\n background: #252525; }\\n\\na[data-toggle=\\\"collapse\\\"] {\\n position: relative; }\\n\\n.dropdown-toggle::after {\\n display: block;\\n position: absolute;\\n top: 50%;\\n right: 20px;\\n transform: translateY(-50%); }\\n\\nul ul a {\\n font-size: 0.9em !important;\\n padding-left: 30px !important;\\n background: white;\\n font-weight: bolder; }\\n\\nul.CTAs {\\n padding: 20px; }\\n\\nul.CTAs a {\\n text-align: center;\\n font-size: 0.9em !important;\\n display: block;\\n border-radius: 5px;\\n margin-bottom: 5px; }\\n\\na.download {\\n background: #fff;\\n color: #7386D5; }\\n\\na.article,\\na.article:hover {\\n background: #6d7fcc !important;\\n color: #fff !important; }\\n\\n/* ---------------------------------------------------\\r\\n CONTENT STYLE\\r\\n----------------------------------------------------- */\\n#content {\\n width: 100%;\\n padding: 20px;\\n min-height: 100vh;\\n transition: all 0.3s; }\\n\\n/* ---------------------------------------------------\\r\\n MEDIAQUERIES\\r\\n----------------------------------------------------- */\\n@media (max-width: 768px) {\\n #sidebar {\\n min-width: 80px;\\n max-width: 80px;\\n text-align: center;\\n margin-left: -80px !important; }\\n .dropdown-toggle::after {\\n top: auto;\\n bottom: 10px;\\n right: 50%;\\n -webkit-transform: translateX(50%);\\n -ms-transform: translateX(50%);\\n transform: translateX(50%); }\\n #sidebar.active {\\n margin-left: 0 !important; }\\n #sidebar .sidebar-header h3,\\n #sidebar .CTAs {\\n display: none; }\\n #sidebar .sidebar-header strong {\\n display: block; }\\n #sidebar ul li a {\\n padding: 20px 10px; }\\n #sidebar ul li a span {\\n font-size: 0.85em; }\\n #sidebar ul li a i {\\n margin-right: 0;\\n display: block; }\\n #sidebar ul ul a {\\n padding: 10px !important; }\\n #sidebar ul li a i {\\n font-size: 1.3em; }\\n #sidebar {\\n margin-left: 0; }\\n #sidebarCollapse span {\\n display: none; }\\n .text-muted {\\n color: #bcb !important; } }\\n\\n@media (min-width: 576px) {\\n .card-group > .card:first-child {\\n border-top-right-radius: .25rem;\\n border-bottom-right-radius: .25rem; }\\n .card-group > .card:not(:first-child):not(:last-child):not(:only-child) {\\n border-radius: .25rem; }\\n .card-group > .card:last-child {\\n border-top-left-radius: .25rem;\\n border-bottom-left-radius: .25rem; } }\\n\\n/* -------------------------------------------------\\r\\nADDITIONS\\r\\n--------------------------------------------------*/\\n.hide {\\n display: none; }\\n\\n.prompt {\\n display: flex;\\n width: 2em;\\n border-right: 1px solid #c99034;\\n background-color: #f5d38b;\\n width: 4%;\\n margin-bottom: 40px;\\n border-radius: 4px 0 0 4px; }\\n\\n.promptext {\\n animation: blinkingText 0.8s infinite;\\n color: #975f04;\\n text-align: center;\\n line-height: 2em;\\n font: 1.5em bolder;\\n margin: auto; }\\n\\n.good {\\n animation: anim .3s ease-in-out; }\\n\\n.repoLink {\\n color: #000;\\n font-weight: bolder;\\n text-decoration: underline; }\\n\\n.headerprompt {\\n display: flex;\\n width: 100%; }\\n\\n.logotext {\\n color: #f39c12; }\\n\\n#content nav div.collapse li a.nav-link i.far {\\n color: #f39c12;\\n font-size: 1.8em;\\n padding: 0.2em; }\\n\\n#loading-img {\\n background: url(http://preloaders.net/preloaders/360/Velocity.gif) center center no-repeat;\\n height: 100%;\\n z-index: 20; }\\n\\n.overlay {\\n background: #e9e9e9;\\n display: none;\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n opacity: 0.5; }\\n\\n.loader {\\n border: 0px solid #f3f3f3;\\n border-radius: 50%;\\n border-top: 2px solid #3498db;\\n border-right: 2px solid #3498db;\\n width: 20px;\\n height: 20px;\\n -webkit-animation: spin 2s linear infinite;\\n /* Safari */\\n animation: spin 2s linear infinite; }\\n\\n.light-red {\\n background-color: #f3d98c; }\\n\\n@keyframes spin {\\n 0% {\\n transform: rotate(0deg); }\\n 100% {\\n transform: rotate(360deg); } }\\n\\n@keyframes anim {\\n 0% {\\n display: none;\\n opacity: 0; }\\n 1% {\\n display: block;\\n opacity: 0;\\n transform: scale(0); }\\n 100% {\\n opacity: 1;\\n transform: scale(1); } }\\n\\n@keyframes blinkingText {\\n 0% {\\n color: #000; }\\n 49% {\\n color: transparent; }\\n 50% {\\n color: transparent; }\\n 99% {\\n color: transparent; }\\n 100% {\\n color: #000; } }\\n\\n/* --------------------------------------------------\\r\\n OVERRIDES\\r\\n --------------------------------------------------*/\\n.btn {\\n background-color: #f39c12;\\n color: #252525; }\\n\\n#content #header .navbar {\\n width: 96%; }\\n\\n.navbar-form {\\n width: 88%; }\\n\\n.form-control {\\n padding: .6rem 1em; }\\n\\n.container-fluid {\\n padding-left: 0.3em; }\\n\\n.card-group {\\n flex-direction: column; }\\n\\n#command.form-control {\\n width: 87%; }\\n\\n.ml-auto {\\n margin-left: 0 !important; }\\n\", \"\"]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/styles/scss/base.scss?./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/css-loader/lib/css-base.js":
|
|
/*!*************************************************!*\
|
|
!*** ./node_modules/css-loader/lib/css-base.js ***!
|
|
\*************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n//# sourceURL=webpack:///./node_modules/css-loader/lib/css-base.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/redux/es/redux.js":
|
|
/*!****************************************!*\
|
|
!*** ./node_modules/redux/es/redux.js ***!
|
|
\****************************************/
|
|
/*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose, __DO_NOT_USE__ActionTypes */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return createStore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"combineReducers\", function() { return combineReducers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindActionCreators\", function() { return bindActionCreators; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyMiddleware\", function() { return applyMiddleware; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return compose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__DO_NOT_USE__ActionTypes\", function() { return ActionTypes; });\n/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! symbol-observable */ \"./node_modules/symbol-observable/es/index.js\");\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'),\n REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;\n\n var proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n if (isDispatching) {\n throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n }\n\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected the listener to be a function.');\n }\n\n if (isDispatching) {\n throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.REPLACE });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionDescription = actionType && 'action \"' + String(actionType) + '\"' || 'an action';\n\n return 'Given ' + actionDescription + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (true) {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (true) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (true) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var store = createStore.apply(undefined, args);\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(undefined, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\nfunction isCrushed() {}\n\nif (\"development\" !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning(\"You are currently using minified code outside of NODE_ENV === 'production'. \" + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/redux/es/redux.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/lib/addStyles.js":
|
|
/*!****************************************************!*\
|
|
!*** ./node_modules/style-loader/lib/addStyles.js ***!
|
|
\****************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(/*! ./urls */ \"./node_modules/style-loader/lib/urls.js\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + \" \" + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = options.transform(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/addStyles.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/style-loader/lib/urls.js":
|
|
/*!***********************************************!*\
|
|
!*** ./node_modules/style-loader/lib/urls.js ***!
|
|
\***********************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/urls.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/symbol-observable/es/index.js":
|
|
/*!****************************************************!*\
|
|
!*** ./node_modules/symbol-observable/es/index.js ***!
|
|
\****************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ponyfill.js */ \"./node_modules/symbol-observable/es/ponyfill.js\");\n/* global window */\n\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {}\n\nvar result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root);\n/* harmony default export */ __webpack_exports__[\"default\"] = (result);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../webpack/buildin/harmony-module.js */ \"./node_modules/webpack/buildin/harmony-module.js\")(module)))\n\n//# sourceURL=webpack:///./node_modules/symbol-observable/es/index.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/symbol-observable/es/ponyfill.js":
|
|
/*!*******************************************************!*\
|
|
!*** ./node_modules/symbol-observable/es/ponyfill.js ***!
|
|
\*******************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return symbolObservablePonyfill; });\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/symbol-observable/es/ponyfill.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/webpack/buildin/global.js":
|
|
/*!***********************************!*\
|
|
!*** (webpack)/buildin/global.js ***!
|
|
\***********************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./node_modules/webpack/buildin/harmony-module.js":
|
|
/*!*******************************************!*\
|
|
!*** (webpack)/buildin/harmony-module.js ***!
|
|
\*******************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack:///(webpack)/buildin/harmony-module.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/app-event-triggers.js":
|
|
/*!**************************************!*\
|
|
!*** ./src/js/app-event-triggers.js ***!
|
|
\**************************************/
|
|
/*! no exports provided */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _services_recast_ops_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services/recast-ops.js */ \"./src/js/services/recast-ops.js\");\n/* harmony import */ var _services_dom_ops_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/dom-ops.js */ \"./src/js/services/dom-ops.js\");\n/* harmony import */ var _services_microbot_ops_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/microbot-ops.js */ \"./src/js/services/microbot-ops.js\");\n/* harmony import */ var _helpers_helper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers/helper.js */ \"./src/js/helpers/helper.js\");\n/* harmony import */ var _services_persistent_ops_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/persistent-ops.js */ \"./src/js/services/persistent-ops.js\");\n\nconst recastclient = new _services_recast_ops_js__WEBPACK_IMPORTED_MODULE_0__[\"Recast\"]();\n\n\nconst dom = new _services_dom_ops_js__WEBPACK_IMPORTED_MODULE_1__[\"DomManipulator\"]();\n\n\nconst app = new _services_microbot_ops_js__WEBPACK_IMPORTED_MODULE_2__[\"Microbot\"]();\n\n\nconst helper = new _helpers_helper_js__WEBPACK_IMPORTED_MODULE_3__[\"Helper\"]();\n\n\n\nconst $config = __webpack_require__(/*! ./config.js */ \"./src/js/config.js\");\n\n$(document).ready(() => {\n // console.log('test');\n app.setToken();\n $('#sidebarCollapse').on('click', () => {\n $('#sidebar').toggleClass('active');\n $('.hideable').toggleClass('hide');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-star').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-star').toggleClass('fas');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').toggleClass('fas');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').toggleClass('fas');\n });\n $('#command').keyup(e => {\n const code = e.keyCode ? e.keyCode : e.which;\n if (code == 13) {\n $('#widgets').children().addClass('hide');\n $('#successAlert').addClass('hide');\n $('#dangetAlert').addClass('hide');\n $('#intentBox').addClass('hide');\n const command = document.getElementById('command').value;\n if (command) {\n const text = { text: command };\n recastclient.getAndCallProcessIntent(command, text);\n } else {\n dom.showEmptyCommandMessage();\n }\n }\n });\n $('#btnFavorites').click(function () {});\n $('#btnClearCommand').click(function () {\n $('#command').val('');\n $('#command').focus();\n });\n $('#btnFireCommand').click(function () {\n hitEnter();\n });\n $('#btnSubmitConfirm').on('click', () => {\n $('#submitConfirm').removeClass('hide');\n });\n $('#submitGitData').on('click', () => {\n const data = dom.getDataFromFormAsJSON();\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n if (intent) {\n const operation = $config.intentSlugToOperations[intent].githubOperation;\n app[operation](data);\n }\n });\n $('#hideInfoAlert').on('click', () => {\n $('#intentBox').addClass('hide');\n });\n $('#hideSuccessAlert').on('click', () => {\n $('#successAlert').addClass('hide');\n });\n $('#conversations').on('click', '.close', function () {\n const $target = $(this).closest('.card');\n const line = $target.next();\n $target.hide('slow', () => {\n $target.remove();\n });\n line.hide('slow', () => {\n line.remove();\n });\n });\n $('#conversations').on('click', '.btn.btn-info.float-right', function () {\n let parentText = $(this).closest('.card-text').text();\n const command = parentText.substring(0, parentText.indexOf('Repeat'));\n hitEnter(command);\n });\n $('#hideDangerAlert').on('click', () => {\n $('#dangerAlert').addClass('hide');\n });\n $('#git_bridge').on('click', () => {\n window.location.href = 'https://github.com/login/oauth/authorize?scope=user:email:repo&client_id=f6f649a1fe2dfea082ba';\n });\n let localHistory = JSON.parse(window.localStorage.getItem('currentState'));\n window.onload = initOps();\n\n function initOps() {\n $('#command').focus();\n dom.loadConversations(helper.concatenateAndSort(localHistory));\n }\n function hitEnter(command) {\n let commandInputField = $('#command');\n if (command) commandInputField.val(command);\n let e = jQuery.Event(\"keyup\");\n e.which = 13;\n commandInputField.focus();\n commandInputField.trigger(e);\n }\n if (window.location.href.match(/\\?code=(.*)/)) {\n const code = window.location.href.match(/\\?code=(.*)/)[1];\n app.getToken(code);\n }\n});\n\n//# sourceURL=webpack:///./src/js/app-event-triggers.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/app.js":
|
|
/*!***********************!*\
|
|
!*** ./src/js/app.js ***!
|
|
\***********************/
|
|
/*! no exports provided */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../styles/scss/base.scss */ \"./src/styles/scss/base.scss\");\n/* harmony import */ var _styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _styles_css_base_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styles/css/base.css */ \"./src/styles/css/base.css\");\n/* harmony import */ var _styles_css_base_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_styles_css_base_css__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n__webpack_require__(/*! ./app-event-triggers */ \"./src/js/app-event-triggers.js\");\n\n//# sourceURL=webpack:///./src/js/app.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/config.js":
|
|
/*!**************************!*\
|
|
!*** ./src/js/config.js ***!
|
|
\**************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("module.exports = {\n gitToken: '96ead73c54cbbf023a73ee57af145b205d460851',\n recasttoken: \"26021d055040a9d9f1ad48476efab4a0\",\n intentSlugToOperations: {\n createrepo: {\n requestMethod: 'post',\n intentMessage: 'Create a Repository in Github',\n getDataOperation: 'getCreateRepoJson',\n githubOperation: 'createRepository',\n showWidgetOperation: 'showCreateRepoWidget',\n populateDataOperation: 'populateCreateRepoData',\n successMessage: 'Repository Added!',\n cardMsg: 'Requested Repository has been added and is available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'name'\n },\n createissue: {\n requestMethod: 'post',\n intentMessage: 'Raise an issue in Github',\n getDataOperation: 'getCreateIssueJson',\n githubOperation: 'createIssue',\n showWidgetOperation: 'showCreateIssueWidget',\n populateDataOperation: 'populateCreateIssueData',\n successMessage: 'Issue Created!',\n cardMsg: 'Issue Created as requested, issue details available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n closeissue: {\n requestMethod: 'post',\n intentMessage: 'Close an issue in Github',\n getDataOperation: 'getCloseIssueJson',\n githubOperation: 'closeIssue',\n showWidgetOperation: 'showCloseIssueWidget',\n populateDataOperation: 'populateCloseIssueData',\n successMessage: 'Issue Closed!',\n cardMsg: 'Issue Closed as requested, closed issue available at: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n addissuecomment: {\n requestMethod: 'post',\n intentMessage: 'Add a comment on an issue in Github',\n getDataOperation: 'getAddCommentJson',\n githubOperation: 'addIssueComment',\n showWidgetOperation: 'showAddCommentWidget',\n populateDataOperation: 'populateAddCommentData',\n successMessage: 'Comment Added!',\n cardMsg: 'Comment Added as Requested, view here: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n displaylastcomment: {\n requestMethod: 'get',\n intentMessage: 'Display last comment of an issue in Github',\n getDataOperation: 'getDisplayCommentJson',\n githubOperation: 'displayLastComment',\n showWidgetOperation: 'showDisplayCommentWidget',\n populateDataOperation: 'populateDisplayCommentData',\n successMessage: 'Comment Retrieved!',\n cardMsg: 'Please find requested comment below: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n addcollab: {\n requestMethod: 'post',\n intentMessage: 'Add a collaborator',\n getDataOperation: 'getAddCollaboratorJson',\n githubOperation: 'addCollaborator',\n showWidgetOperation: 'showAddCollaboratorWidget',\n populateDataOperation: 'populateAddCollaboratorData',\n successMessage: 'Collaborator Added!',\n cardMsg: 'Collaborator added, details available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'invitee,login'\n },\n viewrepos: {\n requestMethod: 'get',\n intentMessage: 'View Repositories for current user',\n getDataOperation: 'getViewRepositoryJson',\n githubOperation: 'viewRepositories',\n showWidgetOperation: 'showViewRepoWidget',\n populateDataOperation: 'populateViewRepoData',\n successMessage: 'Showing repositories',\n cardMsg: 'Repository Details available below: ',\n cardDataUrl: 'html_url',\n cardDataName: 'invitee,login'\n },\n resethistory: {\n requestMethod: 'purge',\n intentMessage: 'Clear all Operations History',\n successMessage: 'Purged!',\n cardMsg: 'Purged history of all Operations and Commands!'\n }\n },\n costants: {\n hiddenIntentFieldId: 'intentHidden'\n },\n actions: {\n createrepo: { type: 'ADD_REPO' },\n addcollab: { type: 'ADD_COLLAB' },\n createissue: { type: 'ADD_ISSUE' },\n addissuecomment: { type: 'ADD_COMMENT' },\n closeissue: { type: 'CLOSE_ISSUE' },\n displaylastcomment: { type: 'SHOW_LAST_COMMENT' },\n viewrepos: { type: 'VIEW_REPO' },\n action_add_query: { type: 'ADD_QUERY' },\n action_clear_history: { type: 'CLEAR_HISTORY' }\n }\n};\n\n//# sourceURL=webpack:///./src/js/config.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/data/history.js":
|
|
/*!********************************!*\
|
|
!*** ./src/js/data/history.js ***!
|
|
\********************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports) {
|
|
|
|
eval("const state = {\n createrepo: [],\n createissue: [],\n closeissue: [],\n addissuecomment: [],\n displaylastcomment: [],\n addcollab: [],\n viewrepos: [],\n queries: [],\n messages: [],\n insertionCounter: 0\n};\n\nmodule.exports = state;\n\n//# sourceURL=webpack:///./src/js/data/history.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/helpers/helper.js":
|
|
/*!**********************************!*\
|
|
!*** ./src/js/helpers/helper.js ***!
|
|
\**********************************/
|
|
/*! exports provided: Helper */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Helper\", function() { return Helper; });\nclass Helper {\n\n getLatestComment(comments) {\n if (comments && comments.length > 0) {\n return comments[comments.length - 1].body;\n }\n }\n\n compareByProperty(property) {\n return function (a, b) {\n if (a[property] < b[property]) return -1;\n if (a[property] > b[property]) return 1;\n return 0;\n };\n }\n\n clone(obj) {\n if (null == obj || \"object\" != typeof obj) return obj;\n var copy = Object.assign({}, obj);\n return copy;\n }\n\n concatenateAndSort(history) {\n // let counter = 1;\n let historyAll = [];\n for (var property in history) {\n if (history.hasOwnProperty(property) && Array.isArray(history[property])) {\n historyAll = historyAll.concat(history[property]);\n }\n }\n historyAll.sort(this.compareByProperty('insertionCounter'));\n return historyAll;\n }\n\n};\n\n//# sourceURL=webpack:///./src/js/helpers/helper.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/services/dom-ops.js":
|
|
/*!************************************!*\
|
|
!*** ./src/js/services/dom-ops.js ***!
|
|
\************************************/
|
|
/*! exports provided: DomManipulator */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DomManipulator\", function() { return DomManipulator; });\n/* harmony import */ var _helpers_helper_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/helper.js */ \"./src/js/helpers/helper.js\");\n/* harmony import */ var _views_addcollab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../views/addcollab.js */ \"./src/js/views/addcollab.js\");\n/* harmony import */ var _views_addissuecomment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../views/addissuecomment.js */ \"./src/js/views/addissuecomment.js\");\n/* harmony import */ var _views_closeissue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../views/closeissue.js */ \"./src/js/views/closeissue.js\");\n/* harmony import */ var _views_createissue_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../views/createissue.js */ \"./src/js/views/createissue.js\");\n/* harmony import */ var _views_createrepo_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../views/createrepo.js */ \"./src/js/views/createrepo.js\");\n/* harmony import */ var _views_displaylastcomment_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../views/displaylastcomment.js */ \"./src/js/views/displaylastcomment.js\");\n/* harmony import */ var _views_viewrepos_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../views/viewrepos.js */ \"./src/js/views/viewrepos.js\");\nconst $config = __webpack_require__(/*! ../config.js */ \"./src/js/config.js\");\n\nconst helper = new _helpers_helper_js__WEBPACK_IMPORTED_MODULE_0__[\"Helper\"]();\n\n\n\n\n\n\n\n\nclass DomManipulator {\n constructor() {\n this.createRepoWidgetCreated = false;\n this.commandCardCounter = 1;\n this.map = {\n 'addcollab': _views_addcollab_js__WEBPACK_IMPORTED_MODULE_1__[\"addcollab\"],\n 'addissuecomment': _views_addissuecomment_js__WEBPACK_IMPORTED_MODULE_2__[\"addissuecomment\"],\n 'closeissue': _views_closeissue_js__WEBPACK_IMPORTED_MODULE_3__[\"closeissue\"],\n 'createissue': _views_createissue_js__WEBPACK_IMPORTED_MODULE_4__[\"createissue\"],\n 'createrepo': _views_createrepo_js__WEBPACK_IMPORTED_MODULE_5__[\"createrepo\"],\n 'displaylastcomment': _views_displaylastcomment_js__WEBPACK_IMPORTED_MODULE_6__[\"displaylastcomment\"],\n 'viewrepos': _views_viewrepos_js__WEBPACK_IMPORTED_MODULE_7__[\"viewrepos\"]\n };\n }\n\n showWidget(intent) {\n let widget = document.getElementById(intent);\n if (widget) {\n if (!this.isVisible(widget)) {\n widget.classList.remove('hide');\n $('#underWidgetLine').removeClass('hide');\n }\n } else {\n let template = document.createElement('template');\n template.innerHTML = this.map[intent];\n widget = template.content.firstChild;\n if (!this.isVisible(widget)) {\n widget.classList.remove('hide');\n $('#underWidgetLine').removeClass('hide');\n }\n widgets.prepend(template.content.firstElementChild);\n }\n }\n\n displayIntentBox(intent) {\n const intentBox = document.getElementById('intentBox');\n if (!this.isVisible(intentBox)) {\n intentBox.classList.remove('hide');\n }\n $('#intentName').text(`${$config.intentSlugToOperations[intent].intentMessage} [slug: ${intent}].`);\n }\n\n showEmptyCommandMessage() {\n $('#emptyCommandMsgDisplayer').click();\n }\n\n populateRecastData(widgetName, recastResponse) {\n // var requestMethod = $config.intentSlugToOperations[widgetName]['requestMethod'];\n const operation = $config.intentSlugToOperations[widgetName].populateDataOperation;\n if (typeof this[operation] === 'function') {\n this[operation](recastResponse);\n }\n }\n\n populateCreateRepoData(recastResponse) {\n const repoNameTextField = document.getElementById('repositoryName');\n if (repoNameTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n repoNameTextField.value = repoName;\n }\n }\n\n populateCreateIssueData(recastResponse) {\n const issueTitleTextField = document.getElementById('issueTitle');\n const issueRepositoryTextField = document.getElementById('issueRepository');\n if (issueTitleTextField && recastResponse && recastResponse.entities.issue_title && recastResponse.entities.issue_title.length > 0 && recastResponse.entities.issue_title['0'].value) {\n const issueTitle = recastResponse.entities.issue_title['0'].value;\n issueTitleTextField.value = issueTitle;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n populateCloseIssueData(recastResponse) {\n const issueNumberTextField = document.getElementById('issueNumerToClose');\n const issueRepositoryTextField = document.getElementById('repoForIssueClose');\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n populateAddCollaboratorData(recastResponse) {\n const collaboratorNameTextField = document.getElementById('collaboratorName');\n const repoForCollabTextField = document.getElementById('repoForCollab');\n if (collaboratorNameTextField && recastResponse && recastResponse.entities.git_collaborator && recastResponse.entities.git_collaborator.length > 0 && recastResponse.entities.git_collaborator['0'].value) {\n const collaboratorName = recastResponse.entities.git_collaborator['0'].value;\n collaboratorNameTextField.value = collaboratorName;\n }\n if (repoForCollabTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n repoForCollabTextField.value = repoName;\n }\n }\n\n populateAddCommentData(recastResponse) {\n const repoForIssueCommentTextField = document.getElementById('repoForIssueComment');\n const issueNumberTextField = document.getElementById('issueNumber');\n const issueCommentTextArea = document.getElementById('issueComment');\n if (repoForIssueCommentTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoForIssueComment = recastResponse.entities['git-repository']['0'].value;\n repoForIssueCommentTextField.value = repoForIssueComment;\n }\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueCommentTextArea && recastResponse && recastResponse.entities.issue_comment && recastResponse.entities.issue_comment.length > 0 && recastResponse.entities.issue_comment['0'].value) {\n const issueComment = recastResponse.entities.issue_comment['0'].value;\n issueCommentTextArea.value = issueComment;\n }\n }\n\n populateDisplayCommentData(recastResponse) {\n const issueNumberTextField = document.getElementById('issueNumberForCommentView');\n const issueRepositoryTextField = document.getElementById('repoForCommentView');\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n isVisible(element) {\n return element ? !element.classList.contains('hide') : false;\n }\n\n getDataFromFormAsJSON() {\n let data = {};\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n const requestMethod = $config.intentSlugToOperations[intent].requestMethod;\n if (intent) {\n const operation = $config.intentSlugToOperations[intent].getDataOperation;\n if (typeof this[operation] === 'function') {\n data = this[operation]();\n }\n }\n return data;\n }\n\n getCreateRepoJson() {\n const data = {};\n const request = {};\n if (this.isVisible(document.getElementById('createrepo'))) {\n request.name = document.getElementById('repositoryName').value;\n request.description = document.getElementById('description').value;\n request.homepage = document.getElementById('homePageURL').value;\n request.private = document.getElementById('privateRepoChk').checked;\n request.has_issues = document.getElementById('issuesChk').checked;\n request.has_wiki = document.getElementById('wikiChk').checked;\n }\n data.request = request;\n return data;\n }\n\n getCreateIssueJson() {\n const data = {};\n data.urlParams = {};\n const request = {};\n if (this.isVisible(document.getElementById('createissue'))) {\n request.title = document.getElementById('issueTitle').value;\n request.body = document.getElementById('description').value;\n request.assignees = document.getElementById('assignees').value ? document.getElementById('assignees').value.split(',') : [];\n request.labels = document.getElementById('labels').value ? document.getElementById('labels').value.split(',') : [];\n data.urlParams.repoName = document.getElementById('issueRepository').value;\n }\n data.request = request;\n return data;\n }\n\n getCloseIssueJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('closeissue'))) {\n data.urlParams.issueId = document.getElementById('issueNumerToClose').value;\n data.urlParams.repoName = document.getElementById('repoForIssueClose').value;\n }\n return data;\n }\n\n getAddCollaboratorJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('addcollab'))) {\n data.urlParams.collaborator = document.getElementById('collaboratorName').value;\n data.urlParams.repoName = document.getElementById('repoForCollab').value;\n }\n return data;\n }\n\n getAddCommentJson() {\n const data = {};\n data.urlParams = {};\n const request = {};\n if (this.isVisible(document.getElementById('addissuecomment'))) {\n request.body = document.getElementById('issueComment').value;\n data.urlParams.issueId = document.getElementById('issueNumber').value;\n data.urlParams.repoName = document.getElementById('repoForIssueComment').value;\n }\n data.request = request;\n return data;\n }\n\n getDisplayCommentJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('displaylastcomment'))) {\n data.urlParams.issueId = document.getElementById('issueNumberForCommentView').value;\n data.urlParams.repoName = document.getElementById('repoForCommentView').value;\n }\n return data;\n }\n\n addGitOperationHistory(data) {\n const intent = data.intent;\n let requestMethod = '';\n if (intent) {\n requestMethod = $config.intentSlugToOperations[intent].requestMethod;\n }\n const conversations = document.getElementById('conversations');\n let table;\n let comment;\n // Create Elements\n const card = document.createElement('div');\n const cardBody = document.createElement('div');\n const cardTitle = document.createElement('h5');\n const closeAnchor = document.createElement('a');\n const closeHeader = document.createElement('h6');\n const cardText = document.createElement('p');\n const cardFooter = document.createElement('div');\n const textMuted = document.createElement('small');\n const underCardLine = document.createElement('div');\n\n // Add Attributes\n card.classList.add('card');\n cardBody.classList.add('card-body');\n cardTitle.classList.add('card-title');\n closeAnchor.classList.add('close');\n // closeAnchor.setAttribute('href', '#');\n cardText.classList.add('card-text');\n cardFooter.classList.add('card-footer');\n textMuted.classList.add('text-muted');\n underCardLine.classList.add('line');\n\n // Add content\n closeHeader.innerHTML = 'x';\n\n const x = this.display_ct(0, textMuted);\n if (data.type === 'command') {\n // Add content\n cardTitle.innerHTML = 'You Said';\n cardText.innerHTML = data.command;\n card.classList.add('light-red');\n const repeat = document.createElement('a');\n repeat.classList.add('btn', 'btn-info', 'float-right');\n repeat.setAttribute('role', 'button');\n repeat.setAttribute('href', '#');\n repeat.setAttribute('id', `btnRepeatCommand${data.insertionCounter}`);\n repeat.innerHTML = 'Repeat';\n cardText.appendChild(repeat);\n } else if (data.type === 'response') {\n // Add content\n cardTitle.innerHTML = 'Server Responded As..';\n if (requestMethod == 'post') {\n cardText.innerHTML = `${$config.intentSlugToOperations[intent].cardMsg}<a class='repoLink' href='${data[$config.intentSlugToOperations[intent].cardDataUrl]}'>${this.getVariable(data, $config.intentSlugToOperations[intent].cardDataName)}</a>`;\n } else if (requestMethod == 'get') {\n cardText.innerHTML = $config.intentSlugToOperations[intent].cardMsg;\n if (data && data.length && data.length > 0) {\n if (intent === 'viewrepos') {\n table = this.createRepoTable(data);\n } else if (intent === 'displaylastcomment') {\n comment = this.createCommentBody(data);\n }\n }\n } else if (requestMethod == 'purge') {\n cardTitle.innerHTML = 'Operation Completed!';\n cardText.innerHTML = data.command;\n }\n } else {\n cardTitle.innerHTML = 'Server Responded As..';\n cardText.innerHTML = `Operation failed with status: ${data.status}`;\n }\n\n // Associations\n closeAnchor.appendChild(closeHeader);\n cardTitle.appendChild(closeAnchor);\n cardBody.appendChild(cardTitle);\n cardBody.appendChild(cardText);\n if (comment) {\n cardBody.appendChild(comment);\n }\n cardFooter.appendChild(textMuted);\n card.appendChild(cardBody);\n if (table) {\n card.appendChild(table);\n }\n card.appendChild(cardFooter);\n\n conversations.insertBefore(underCardLine, conversations.firstChild);\n conversations.insertBefore(card, conversations.firstChild);\n }\n\n getVariable(data, commaSeparatedValue) {\n const arr = commaSeparatedValue.split(',');\n for (let i = 0; i < arr.length; i++) {\n data = data[arr[i]];\n }\n return data;\n }\n\n // Create table of repositories ================================================================================================== \n createRepoTable(data) {\n // Create Elements\n const table = document.createElement('table');\n const thead = document.createElement('thead');\n const tr_head = document.createElement('tr');\n const th_1 = document.createElement('th');\n const th_2 = document.createElement('th');\n const th_3 = document.createElement('th');\n const th_4 = document.createElement('th');\n const th_5 = document.createElement('th');\n const th_6 = document.createElement('th');\n const th_7 = document.createElement('th');\n\n // Add Attributes\n table.classList.add('table', 'tabled-bordered', 'table-striped', 'table-hover');\n thead.classList.add('thead-dark');\n th_1.setAttribute('scope', 'col');\n th_2.setAttribute('scope', 'col');\n th_3.setAttribute('scope', 'col');\n th_4.setAttribute('scope', 'col');\n th_5.setAttribute('scope', 'col');\n th_6.setAttribute('scope', 'col');\n th_7.setAttribute('scope', 'col');\n\n // Add Inner HTML\n th_1.innerHTML = '#';\n th_2.innerHTML = 'Repository Name';\n th_3.innerHTML = 'Repository ID';\n th_4.innerHTML = 'Created On';\n th_5.innerHTML = 'Created By';\n th_6.innerHTML = 'View Raw';\n th_7.innerHTML = 'Delete Repository';\n\n // Associations\n tr_head.appendChild(th_1);\n tr_head.appendChild(th_2);\n tr_head.appendChild(th_3);\n tr_head.appendChild(th_4);\n tr_head.appendChild(th_5);\n tr_head.appendChild(th_6);\n tr_head.appendChild(th_7);\n thead.appendChild(tr_head);\n table.appendChild(thead);\n\n for (let i = 0; i < data.length; i++) {\n const currentRepo = data[i];\n // Create Elements\n const tbody = document.createElement('tbody');\n const tr_body = document.createElement('tr');\n const th_vertical = document.createElement('th');\n const td_1 = document.createElement('td');\n const td_2 = document.createElement('td');\n const td_3 = document.createElement('td');\n const td_4 = document.createElement('td');\n const td_5 = document.createElement('td');\n const td_6 = document.createElement('td');\n\n // Add Attributes\n th_vertical.setAttribute('scope', 'row');\n tr_body.setAttribute('id', `repoRow${i}`);\n\n // Add Inner HTML\n th_vertical.innerHTML = i + 1;\n td_1.innerHTML = currentRepo.name;\n td_2.innerHTML = `<a href='${currentRepo.html_url}' class='repoLink'>${currentRepo.id}</a>`;\n td_3.innerHTML = currentRepo.created_at;\n td_4.innerHTML = `<a href='${currentRepo.owner.html_url}' class='btn btn-info'>${currentRepo.owner.login}</a>`;\n td_5.innerHTML = `<a href='${currentRepo.url}' class='btn btn-info'>View</a>`;\n td_6.innerHTML = `<a href='${currentRepo.owner.html_url}' class='btn btn-danger'>Delete</a>`;\n\n // Associations\n tr_body.appendChild(th_vertical);\n tr_body.appendChild(td_1);\n tr_body.appendChild(td_2);\n tr_body.appendChild(td_3);\n tr_body.appendChild(td_4);\n tr_body.appendChild(td_5);\n tr_body.appendChild(td_6);\n tbody.appendChild(tr_body);\n table.appendChild(tbody);\n }\n\n return table;\n }\n\n loadConversations(historyAll) {\n if (historyAll) {\n historyAll.forEach(element => {\n this.addGitOperationHistory(element);\n });\n }\n }\n\n createCommentBody(data) {\n const commentPara = document.createElement('p');\n const lastComment = helper.getLatestComment(data);\n commentPara.classList.add('card-text');\n commentPara.innerHTML = `<strong style='color:black'>COMMENT:</strong> <i>${lastComment}</i>`;\n return commentPara;\n }\n\n concealCodeInUrl() {\n window.location = 'http://localhost:8080';\n }\n\n toggleModals(response) {\n const self = this;\n const promise = response.json();\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n $('#submitConfirm').addClass('hide');\n $('#btnCancelConfirm').click();\n $('.modal-backdrop').removeClass('modal-backdrop');\n $('#underWidgetLine').addClass('hide');\n $('#intentBox').addClass('hide');\n if (response && response.status && (response.status === 201 || response.status === 200 || response.status === 204)) {\n $('#successAlert').removeClass('hide');\n $('#widgets').children().addClass('hide');\n promise.then(body => {\n $('#op-msg').text($config.intentSlugToOperations[intent].successMessage);\n $('#successAlert').removeClass('hide');\n // self.addGitOperationHistory(body, 'response');\n // clear intent\n $(`#${$config.costants.hiddenIntentFieldId}`).val('');\n });\n } else {\n $('#widgets').children().addClass('hide');\n $('#dangerAlert').removeClass('hide');\n // self.addGitOperationHistory(response.status);\n // clear intent\n $(`#${$config.costants.hiddenIntentFieldId}`).val('');\n }\n }\n\n display_ct(start, element) {\n this.start = start;\n this.element = element;\n const days = Math.floor(this.start / 86400);\n const hours = Math.floor((this.start - days * 86400) / 3600);\n const minutes = Math.floor((this.start - days * 86400 - hours * 3600) / 60);\n const secs = Math.floor(this.start - days * 86400 - hours * 3600 - minutes * 60);\n let x = '';\n if (days != 0) {\n x = `${x + days} days`;\n }\n if (hours != 0) {\n x = `${x + hours} hours`;\n }\n if (minutes != 0) {\n x = `${x + minutes} minutes`;\n }\n x = `${x + secs} seconds ago`;\n element.innerHTML = x;\n this.start = this.start + 1;\n // setTimeout(this['display_ct](this.start, this.element)', 1000 )\n }\n};\n\n//# sourceURL=webpack:///./src/js/services/dom-ops.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/services/github-ops.js":
|
|
/*!***************************************!*\
|
|
!*** ./src/js/services/github-ops.js ***!
|
|
\***************************************/
|
|
/*! exports provided: Github */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Github\", function() { return Github; });\n/* harmony import */ var _dom_ops_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom-ops.js */ \"./src/js/services/dom-ops.js\");\n/* harmony import */ var _persistent_ops_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./persistent-ops.js */ \"./src/js/services/persistent-ops.js\");\nconst config = __webpack_require__(/*! ../config.js */ \"./src/js/config.js\");\n\n\nconst dom = new _dom_ops_js__WEBPACK_IMPORTED_MODULE_0__[\"DomManipulator\"]();\n\n\nconst persistentOps = new _persistent_ops_js__WEBPACK_IMPORTED_MODULE_1__[\"PersistentOps\"]();\n\nclass Github {\n constructor() {\n this.authorizationToken = `token ${config.gitToken}`;\n }\n\n getToken(code) {\n let token = '';\n self = this;\n $.getJSON(`https://micobot.herokuapp.com/authenticate/${code}`, data => {\n console.log(data.token);\n token = data.token;\n // set cookie here\n persistentOps.setCookie('gitToken', token, 30);\n // self.authorizationToken = \"token \" + persistentOps.getCookie('gitToken');\n dom.concealCodeInUrl();\n });\n return token;\n }\n\n getCurrentUser() {\n let repositories = '';\n const url = 'https://api.github.com/user/';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n }\n }).then(response => {\n response.json().then(body => {\n repositories = body;\n console.log(repositories);\n return repositories;\n });\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n return repositories;\n }\n\n authenticate() {}\n\n viewRepositories() {\n const repositories = '';\n const url = 'https://api.github.com/user/repos';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n // response.json().then(function(body){\n // repositories = body;\n // console.log(repositories);\n // return repositories;\n // });\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n return repositories;\n }\n\n createRepository(newRepoJson) {\n const url = 'https://api.github.com/user/repos';\n const responsePromise = '';\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(newRepoJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n updateRepository(updateRepoJson, repoName) {\n repoName = 'Hello-World3';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateRepoJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n deleteRepository(repoName) {\n repoName = 'Hello-World2';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}`;\n fetch(url, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n createIssue(newIssueJson, repoName) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues`;\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(newIssueJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n updateIssue(updateIssueJson, repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n closeIssue(closeIssueJson, repoName, issueNumber) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(closeIssueJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n reopenIssue(reopenIssueJson, repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(reopenIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssue(repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n let issues = '';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n response.json().then(body => {\n issues = body;\n console.log(issues);\n return issues;\n });\n }).catch(error => console.error('Fetch Error =\\n', error));\n return issues;\n }\n\n addIssueComment(commentBodyJson, repoName, issueId) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueId}/comments`;\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(commentBodyJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayLastComment(repoName, issueNumber) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}/comments`;\n const comments = [];\n const latestComment = '';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n dom.toggleModals(response);\n // response.json().then(function(body){\n // comments = body;\n // latestComment = githubHelper.getLatestComment(comments);\n // console.log(comments);\n // console.log(latestComment);\n // });\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssuesForUser() {\n const url = 'https://api.github.com/user/issues';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssuesOnRepo() {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n addCollaborator(repoName, collaborator) {\n repoName = 'stack_route_prj7';\n collaborator = 'swat1508';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/collaborators/${collaborator}`;\n fetch(url, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n removeCollaborator(repoName, collaborator) {\n repoName = 'stack_route_prj7';\n collaborator = 'swat1508';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/collaborators/${collaborator}`;\n fetch(url, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n createUser(newuserJson) {}\n\n updateUser(updateUserJson) {}\n\n deleteUser(userId) {}\n};\n\n//# sourceURL=webpack:///./src/js/services/github-ops.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/services/microbot-ops.js":
|
|
/*!*****************************************!*\
|
|
!*** ./src/js/services/microbot-ops.js ***!
|
|
\*****************************************/
|
|
/*! exports provided: Microbot */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Microbot\", function() { return Microbot; });\n/* harmony import */ var _github_ops_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./github-ops.js */ \"./src/js/services/github-ops.js\");\n/* harmony import */ var _persistent_ops_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./persistent-ops.js */ \"./src/js/services/persistent-ops.js\");\n\nconst $github = new _github_ops_js__WEBPACK_IMPORTED_MODULE_0__[\"Github\"]();\n\n\nconst persistentOps = new _persistent_ops_js__WEBPACK_IMPORTED_MODULE_1__[\"PersistentOps\"]();\n\nclass Microbot {\n constructor(clientId, clientSecret) {\n // TODO move to config or env variables\n this.clientId = 'f6f649a1fe2dfea082ba';\n this.clientSecret = '7e9a33d05ffdb36b4a498140bb9bb06d62de4f0e';\n }\n\n getToken(code) {\n $github.getToken(code);\n }\n\n setToken() {\n $github.authorizationToken = `token ${persistentOps.getCookie('gitToken')}`;\n }\n\n getCurrentUser() {\n $github.getCurrentUser();\n }\n\n viewRepositories() {\n return $github.viewRepositories();\n }\n\n createRepository(requestData) {\n const requestJson = requestData.request;\n $github.createRepository(requestJson);\n // $github.createRepository({\n // \"name\": \"new-test-js-git-api-repo\",\n // \"description\": \"This is your first repository\",\n // \"homepage\": \"https://github.com\",\n // \"private\": false,\n // \"has_issues\": true,\n // \"has_wiki\": true\n // })\n }\n\n updateRepository(repoName, repoType) {\n $github.authenticate();\n $github.updateRepository({\n name: 'Hello-World4',\n description: 'This is your test description',\n homepage: 'https://github.com',\n private: false,\n has_issues: true,\n has_projects: true,\n has_wiki: true\n });\n }\n\n deleteRepository() {\n $github.deleteRepository();\n }\n\n createIssue(requestData) {\n const requestJson = requestData.request;\n const repoName = requestData.urlParams.repoName;\n $github.createIssue(requestJson, repoName);\n }\n\n updateIssue() {\n $github.updateIssue({\n title: 'Found a bug - title updated',\n body: 'This is the updated problem description.',\n assignees: ['mohiit1502'],\n milestone: 1,\n state: 'open',\n labels: ['bug', 'issue']\n });\n }\n\n closeIssue(requestData) {\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n $github.closeIssue({\n state: 'close'\n }, repoName, issueId);\n }\n\n displayIssue() {\n return $github.displayIssue();\n }\n\n reopenIssue() {\n $github.reopenIssue({\n milestone: 1,\n state: 'open'\n });\n }\n\n addIssueComment(requestData) {\n const requestJson = requestData.request;\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n $github.addIssueComment(requestJson, repoName, issueId);\n }\n\n displayLastComment(requestData) {\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n return $github.displayLastComment(repoName, issueId);\n }\n\n addCollaborator(requestData) {\n const repoName = requestData.urlParams.repoName;\n const collaborator = requestData.urlParams.collaborator;\n $github.addCollaborator(repoName, collaborator);\n }\n\n removeCollaborator() {\n $github.removeCollaborator();\n }\n\n callAppropriate(intent) {}\n};\n\n//# sourceURL=webpack:///./src/js/services/microbot-ops.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/services/persistent-ops.js":
|
|
/*!*******************************************!*\
|
|
!*** ./src/js/services/persistent-ops.js ***!
|
|
\*******************************************/
|
|
/*! exports provided: PersistentOps, store */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PersistentOps\", function() { return PersistentOps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"store\", function() { return store; });\n/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ \"./node_modules/redux/es/redux.js\");\n/* harmony import */ var _helpers_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/helper */ \"./src/js/helpers/helper.js\");\n/* harmony import */ var _dom_ops__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom-ops */ \"./src/js/services/dom-ops.js\");\n\nconst state = __webpack_require__(/*! ./../data/history */ \"./src/js/data/history.js\");\n\nconst helper = new _helpers_helper__WEBPACK_IMPORTED_MODULE_1__[\"Helper\"]();\n\nconst dom = new _dom_ops__WEBPACK_IMPORTED_MODULE_2__[\"DomManipulator\"]();\nconst $config = __webpack_require__(/*! ../config */ \"./src/js/config.js\");\n\nclass PersistentOps {\n\n setCookie(cname, cvalue, exdays) {\n const d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n const expires = `expires=${d.toUTCString()}`;\n document.cookie = `${cname}=${cvalue};${expires};path=/`;\n }\n\n getCookie(cname) {\n const name = `${cname}=`;\n const decodedCookie = decodeURIComponent(document.cookie);\n const ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n }\n\n}\n\nfunction mbReducer(currentState, action) {\n var nextState = {};\n let newHistory = {};\n switch (action.type) {\n case 'ADD_REPO':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'ADD_COLLAB':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'ADD_ISSUE':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'ADD_COMMENT':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'CLOSE_ISSUE':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'SHOW_LAST_COMMENT':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'VIEW_REPO':\n // let command = document.getElementById('command').value;\n // nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n // newHistory.command = command;\n // newHistory.type = 'command';\n // // newHistory.intent = 'commandbot'\n // newHistory.insertionCounter = ++nextState.insertionCounter;\n // if(nextState.queries) {\n // nextState.queries = [ ...nextState.queries, newHistory ];\n // } else {\n // nextState.queries = [ newHistory ];\n // }\n // window.localStorage.setItem('currentState', JSON.stringify(nextState));\n // return nextState;\n break;\n case 'ADD_QUERY':\n let command = document.getElementById('command').value;\n nextState = window.localStorage.getItem('currentState') ? JSON.parse(window.localStorage.getItem('currentState')) : currentState;\n newHistory.command = command;\n newHistory.type = 'command';\n // newHistory.intent = 'commandbot'\n newHistory.insertionCounter = ++nextState.insertionCounter;\n if (nextState.queries) {\n nextState.queries = [...nextState.queries, newHistory];\n } else {\n nextState.queries = [newHistory];\n }\n window.localStorage.setItem('currentState', JSON.stringify(nextState));\n return nextState;\n break;\n case 'CLEAR_HISTORY':\n nextState = helper.clone(state);\n newHistory.command = $config.intentSlugToOperations.resethistory.cardMsg;\n newHistory.type = 'response';\n newHistory.insertionCounter = 0;\n newHistory.intent = $('#' + $config.costants.hiddenIntentFieldId).val();\n nextState.messages = [newHistory];\n window.localStorage.setItem('currentState', JSON.stringify(nextState));\n return nextState;\n default:\n return currentState;\n }\n}\n\nfunction renderCards() {\n $('#conversations').empty();\n let historyAll = helper.concatenateAndSort(store.getState());\n dom.loadConversations(historyAll);\n}\n\nconst store = Object(redux__WEBPACK_IMPORTED_MODULE_0__[\"createStore\"])(mbReducer, state);\nstore.subscribe(renderCards);\n\n//# sourceURL=webpack:///./src/js/services/persistent-ops.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/services/recast-ops.js":
|
|
/*!***************************************!*\
|
|
!*** ./src/js/services/recast-ops.js ***!
|
|
\***************************************/
|
|
/*! exports provided: Recast */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Recast\", function() { return Recast; });\n/* harmony import */ var _persistent_ops__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./persistent-ops */ \"./src/js/services/persistent-ops.js\");\n/* harmony import */ var _dom_ops__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom-ops */ \"./src/js/services/dom-ops.js\");\n\nconst store = _persistent_ops__WEBPACK_IMPORTED_MODULE_0__[\"store\"];\nconst $config = __webpack_require__(/*! ../config */ \"./src/js/config.js\");\n\nconst dom = new _dom_ops__WEBPACK_IMPORTED_MODULE_1__[\"DomManipulator\"]();\n\nconst $actions = $config.actions;\n\nclass Recast {\n constructor() {\n this.recastToken = $config.recasttoken;\n this.requestUrl = \"https://api.recast.ai/v2/request\";\n }\n\n getAndCallProcessIntent(command, text) {\n self = this;\n var url = this.requestUrl + \"?text=\" + command;\n var bodyRelevant = '';\n var intent = '';\n fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json; charset=utf-8\",\n \"Authorization\": \"Token \" + this.recastToken\n },\n data: text\n }).then(function (response) {\n response.json().then(function (body) {\n bodyRelevant = body.results;\n intent = bodyRelevant.intents[0][\"slug\"];\n $('#' + $config.costants.hiddenIntentFieldId).val(intent);\n if (intent !== undefined) {\n dom.displayIntentBox(intent);\n if (intent == 'resethistory') {\n store.dispatch($actions.action_clear_history);\n return;\n }\n dom.showWidget(intent);\n dom.populateRecastData(intent, bodyRelevant);\n store.dispatch($actions.action_add_query);\n }\n return intent;\n });\n }).catch(function (error) {\n console.error('Fetch Error =\\n', error);\n });\n }\n}\n\n//# sourceURL=webpack:///./src/js/services/recast-ops.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/addcollab.js":
|
|
/*!***********************************!*\
|
|
!*** ./src/js/views/addcollab.js ***!
|
|
\***********************************/
|
|
/*! exports provided: addcollab */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addcollab\", function() { return addcollab; });\nconst addcollab = `<div id=\"addcollab\" class=\"card hide widget good\">\n <!-- <img class=\"card-img-top\" src=\"...\" alt=\"Card image cap\"> -->\n <div class=\"card-body\">\n <h5 class=\"card-title\">Create Collaborator</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"collaboratorName\">Collaborator Name</label>\n <input type=\"text\" class=\"form-control\" id=\"collaboratorName\" placeholder=\"Collaborator ID\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"repoForCollab\">Repository Name</label>\n <input type=\"text\" class=\"form-control\" id=\"repoForCollab\" placeholder=\"Repository To Add collaborator on ....\">\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"comment\">Comment:</label>\n <textarea class=\"form-control\" rows=\"3\" id=\"comment\"></textarea>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitAddCollab\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/addcollab.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/addissuecomment.js":
|
|
/*!*****************************************!*\
|
|
!*** ./src/js/views/addissuecomment.js ***!
|
|
\*****************************************/
|
|
/*! exports provided: addissuecomment */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addissuecomment\", function() { return addissuecomment; });\nconst addissuecomment = `<div id=\"addissuecomment\" class=\"card hide widget good\">\n <!-- <img class=\"card-img-top\" src=\"...\" alt=\"Card image cap\"> -->\n <div class=\"card-body\">\n <h5 class=\"card-title\">Add Comment</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"repoForIssueComment\">Repository Name</label>\n <input type=\"text\" class=\"form-control\" id=\"repoForIssueComment\" placeholder=\"Repository Name....\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"issueNumber\">Issue Number</label>\n <input type=\"text\" class=\"form-control\" id=\"issueNumber\" placeholder=\"Issue To Comment On...\">\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"issueComment\">Comment:</label>\n <textarea class=\"form-control\" rows=\"3\" id=\"issueComment\"></textarea>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitAddComment\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/addissuecomment.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/closeissue.js":
|
|
/*!************************************!*\
|
|
!*** ./src/js/views/closeissue.js ***!
|
|
\************************************/
|
|
/*! exports provided: closeissue */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeissue\", function() { return closeissue; });\nconst closeissue = `<div id=\"closeissue\" class=\"card hide widget good\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Close Issue</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"repoForIssueClose\">Repository Name</label>\n <input type=\"text\" class=\"form-control\" id=\"repoForIssueClose\" placeholder=\"Repository Name....\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"issueNumerToClose\">Issue To Close</label>\n <input type=\"text\" class=\"form-control\" id=\"issueNumerToClose\" placeholder=\"Specify issue number...\">\n </div>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitCloseIssue\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/closeissue.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/createissue.js":
|
|
/*!*************************************!*\
|
|
!*** ./src/js/views/createissue.js ***!
|
|
\*************************************/
|
|
/*! exports provided: createissue */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createissue\", function() { return createissue; });\nconst createissue = `<div id=\"createissue\" class=\"card hide widget good\">\n <!-- <img class=\"card-img-top\" src=\"...\" alt=\"Card image cap\"> -->\n <div class=\"card-body\">\n <h5 class=\"card-title\">Create Issue</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"issueTitle\">Issue Title</label>\n <input type=\"text\" class=\"form-control\" id=\"issueTitle\" placeholder=\"Issue title\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"issueRepository\">Issue Repository</label>\n <input type=\"text\" class=\"form-control\" id=\"issueRepository\" placeholder=\"Issue's Repository here\">\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"assignees\">Assignees</label>\n <input type=\"text\" class=\"form-control\" id=\"assignees\" placeholder=\"Comma Separated user IDs...\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"labels\">Issue Labels</label>\n <input type=\"text\" class=\"form-control\" id=\"labels\" placeholder=\"Comma Separated Labels...\">\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"description\">Issue Description:</label>\n <textarea class=\"form-control\" rows=\"3\" id=\"description\"></textarea>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitConfirm\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/createissue.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/createrepo.js":
|
|
/*!************************************!*\
|
|
!*** ./src/js/views/createrepo.js ***!
|
|
\************************************/
|
|
/*! exports provided: createrepo */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createrepo\", function() { return createrepo; });\nconst createrepo = `<div id=\"createrepo\" class=\"card hide widget good\">\n <div class=\"card-body\">\n <div class=\"card-title\">Create Repository</div>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"repositoryName\">Repository Name</label>\n <input type=\"text\" id=\"repositoryName\" placeholder=\"Repository Name... \" class=\"form-control\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"homePageURL\">Home Page URL</label>\n <input type=\"text\" id=\"homePageURL\" placeholder=\"Home Page URL... \" class=\"form-control\">\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group col-md-3 col-sm-3 col-lg-3 col-xs-3 mb-3\">\n <div class=\"form-check form-check-inline\">\n <input type=\"checkbox\" id=\"privateRepoChk\" value=\"Option 1\" class=\"form-check-input\">\n <label for=\"privateRepoChk\" class=\"form-check-label\">Private</label>\n </div>\n </div>\n <div class=\"form-group col-md-4 col-sm-4 col-lg-4 col-xs-4 mb-3\">\n <div class=\"form-check form-check-inline\">\n <input type=\"checkbox\" id=\"issuesChk\" value=\"Option 2\" class=\"form-check-input\">\n <label for=\"issuesChk\" class=\"form-check-label\">Allow Adding Issues?</label>\n </div>\n </div>\n <div class=\"form-group col-md-4 col-sm-4 col-lg-4 col-xs-4 mb-3\">\n <div class=\"form-check form-check-inline\">\n <input type=\"checkbox\" id=\"wikiChk\" value=\"Option 3\" class=\"form-check-input\">\n <label for=\"wikiChk\" class=\"form-check-label\">Add Wiki?</label>\n </div>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"description\">Add some Description for this repository:</label>\n <textarea rows=\"3\" class=\"form-control\" id=\"description\"></textarea>\n </div>\n <button type=\"button\" data-toggle=\"modal\" data-target=\"#submitConfirm\" id=\"submitForm\" class=\"btn btn-primary\">Submit</button>\n </form>\n </div>\n</div>\n`;\n\n//# sourceURL=webpack:///./src/js/views/createrepo.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/displaylastcomment.js":
|
|
/*!********************************************!*\
|
|
!*** ./src/js/views/displaylastcomment.js ***!
|
|
\********************************************/
|
|
/*! exports provided: displaylastcomment */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"displaylastcomment\", function() { return displaylastcomment; });\nconst displaylastcomment = `<div id=\"displaylastcomment\" class=\"card hide widget good\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Display Last Comment</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"repoForCommentView\">Repository Name</label>\n <input type=\"text\" class=\"form-control\" id=\"repoForCommentView\" placeholder=\"Repository Name....\">\n </div>\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <label for=\"issueNumberForCommentView\">Issue To Close</label>\n <input type=\"text\" class=\"form-control\" id=\"issueNumberForCommentView\" placeholder=\"Specify issue number...\">\n </div>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitCommentView\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/displaylastcomment.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/js/views/viewrepos.js":
|
|
/*!***********************************!*\
|
|
!*** ./src/js/views/viewrepos.js ***!
|
|
\***********************************/
|
|
/*! exports provided: viewrepos */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"viewrepos\", function() { return viewrepos; });\nconst viewrepos = `<div id=\"viewrepos\" class=\"card hide widget good\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">View Repositories</h5>\n <form>\n <div class=\"form-row\">\n <div class=\"form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3\">\n <p>View Repositories for the user mohiit1502?</p>\n </div>\n </div>\n <button class=\"btn btn-primary\" type=\"button\" data-toggle=\"modal\" data-dismiss=\"modal\" id=\"btnSubmitViewRepo\" data-target=\"#submitConfirm\">Submit</button>\n </form>\n </div>\n</div>`;\n\n//# sourceURL=webpack:///./src/js/views/viewrepos.js?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/styles/css/base.css":
|
|
/*!*********************************!*\
|
|
!*** ./src/styles/css/base.css ***!
|
|
\*********************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader!../../../node_modules/sass-loader/lib/loader.js!./base.css */ \"./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./src/styles/css/base.css?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/styles/scss/base.scss":
|
|
/*!***********************************!*\
|
|
!*** ./src/styles/scss/base.scss ***!
|
|
\***********************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader!../../../node_modules/sass-loader/lib/loader.js!./base.scss */ \"./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./src/styles/scss/base.scss?");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 0:
|
|
/*!*****************************!*\
|
|
!*** multi ./src/js/app.js ***!
|
|
\*****************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
eval("module.exports = __webpack_require__(/*! ./src/js/app.js */\"./src/js/app.js\");\n\n\n//# sourceURL=webpack:///multi_./src/js/app.js?");
|
|
|
|
/***/ })
|
|
|
|
/******/ }); |