(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ /***/ "./$$_lazy_route_resource lazy recursive": /*!******************************************************!*\ !*** ./$$_lazy_route_resource lazy namespace object ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function webpackEmptyAsyncContext(req) { // Here Promise.resolve().then() is used instead of new Promise() to prevent // uncaught exception popping up in devtools return Promise.resolve().then(function() { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; }); } webpackEmptyAsyncContext.keys = function() { return []; }; webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; module.exports = webpackEmptyAsyncContext; webpackEmptyAsyncContext.id = "./$$_lazy_route_resource lazy recursive"; /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/app.component.html": /*!**************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/app.component.html ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/components/card/card.component.html": /*!*******************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/components/card/card.component.html ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/components/main/main.component.html": /*!*******************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/components/main/main.component.html ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n Card Workout!\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n
\n\n
\n
\n \n
\n
\n Previous Card\n
\n
\n \n
\n
\n Current Card\n
\n
\n \n
\n
\n Current Exercise\n
\n
\n
\n
\n \n
\n -1\" class=\"\" [number]=\"workoutDeck[previousCardNumber].value\" [suit]=\"workoutDeck[previousCardNumber].suit\"\n (cardEmitter)=\"displayExercise()\" (click)=\"decrementCardCounter()\">\n
\n \n
\n \n
\n \n
\n
\n
\n
{{exercise}}
\n

{{reps}} reps

\n
\n
\n
\n
\n
" /***/ }), /***/ "./src/app/app.component.css": /*!***********************************!*\ !*** ./src/app/app.component.css ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwcC5jb21wb25lbnQuY3NzIn0= */" /***/ }), /***/ "./src/app/app.component.ts": /*!**********************************!*\ !*** ./src/app/app.component.ts ***! \**********************************/ /*! exports provided: AppComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var AppComponent = /** @class */ (function () { function AppComponent() { this.title = 'cardWorkout'; } AppComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-root', template: __webpack_require__(/*! raw-loader!./app.component.html */ "./node_modules/raw-loader/index.js!./src/app/app.component.html"), styles: [__webpack_require__(/*! ./app.component.css */ "./src/app/app.component.css")] }) ], AppComponent); return AppComponent; }()); /***/ }), /***/ "./src/app/app.module.ts": /*!*******************************!*\ !*** ./src/app/app.module.ts ***! \*******************************/ /*! exports provided: AppModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); /* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts"); /* harmony import */ var _components_main_main_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/main/main.component */ "./src/app/components/main/main.component.ts"); /* harmony import */ var _components_card_card_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/card/card.component */ "./src/app/components/card/card.component.ts"); var AppModule = /** @class */ (function () { function AppModule() { } AppModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({ declarations: [ _app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"], _components_main_main_component__WEBPACK_IMPORTED_MODULE_5__["MainComponent"], _components_card_card_component__WEBPACK_IMPORTED_MODULE_6__["CardComponent"], ], imports: [ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"] ], providers: [], bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"]] }) ], AppModule); return AppModule; }()); /***/ }), /***/ "./src/app/components/card/card.component.css": /*!****************************************************!*\ !*** ./src/app/components/card/card.component.css ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".margins {\r\n margin: 12px;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9jYXJkL2NhcmQuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLFlBQVk7QUFDaEIiLCJmaWxlIjoic3JjL2FwcC9jb21wb25lbnRzL2NhcmQvY2FyZC5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm1hcmdpbnMge1xyXG4gICAgbWFyZ2luOiAxMnB4O1xyXG59Il19 */" /***/ }), /***/ "./src/app/components/card/card.component.ts": /*!***************************************************!*\ !*** ./src/app/components/card/card.component.ts ***! \***************************************************/ /*! exports provided: CardComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardComponent", function() { return CardComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var CardComponent = /** @class */ (function () { function CardComponent(changeDetector) { this.changeDetector = changeDetector; this.cardEmitter = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); } CardComponent.prototype.ngOnInit = function () { console.log(this.number); if (this.number < 10) { this.fileString = this.suit + '0' + this.number; } if (this.number >= 10) { this.fileString = this.suit + this.number; } }; CardComponent.prototype.ngOnChanges = function (changes) { //Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here. //Add '${implements OnChanges}' to the class. this.ngOnInit(); this.changeDetector.detectChanges(); }; CardComponent.ctorParameters = function () { return [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] } ]; }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], CardComponent.prototype, "number", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], CardComponent.prototype, "suit", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])() ], CardComponent.prototype, "cardEmitter", void 0); CardComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'card', template: __webpack_require__(/*! raw-loader!./card.component.html */ "./node_modules/raw-loader/index.js!./src/app/components/card/card.component.html"), styles: [__webpack_require__(/*! ./card.component.css */ "./src/app/components/card/card.component.css")] }) ], CardComponent); return CardComponent; }()); /***/ }), /***/ "./src/app/components/main/exercises.json": /*!************************************************!*\ !*** ./src/app/components/main/exercises.json ***! \************************************************/ /*! exports provided: c, d, h, s, default */ /***/ (function(module) { module.exports = JSON.parse("{\"c\":[\"Pull Up\",\"Table/Desk Inverted Row\",\"Rear Delt Fly (Dumbbell or Milk Jug\",\"Upright Row (Backpack or Milk Jug)\"],\"d\":[\"Bicep Curl\",\"Skullcrushers (on a table) or Close Grip Pus-Ups\",\"Bicycle Crunch or Reverse Crunch\",\"Standing Calf Raise\"],\"h\":[\"Walking Lunge (Dumbbell or backpack to load)\",\"Bulgarian Split Squat\",\"Single Leg Hip Thrust\",\"Nordic Ham Curl\"],\"s\":[\"Push-Up or Incline Push-Up\",\"Pike Push-Up or Vertical Push-Up\",\"Standing Press (Milk jug or dumbbells)\",\"Milk Jug Lateral Raise or Doorway Lateral Raise (for time)\"]}"); /***/ }), /***/ "./src/app/components/main/main.component.css": /*!****************************************************!*\ !*** ./src/app/components/main/main.component.css ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".container {\r\n margin-top: 2em;\r\n}\r\n\r\n.alert {\r\n text-align: center;\r\n}\r\n\r\n.center {\r\n display: flex;\r\n justify-content: center; \r\n}\r\n\r\n.sticky-card {\r\n max-height: 50%;\r\n width: 100%;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9tYWluL21haW4uY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLGVBQWU7QUFDbkI7O0FBRUE7SUFDSSxrQkFBa0I7QUFDdEI7O0FBRUE7SUFDSSxhQUFhO0lBQ2IsdUJBQXVCO0FBQzNCOztBQUNBO0lBQ0ksZUFBZTtJQUNmLFdBQVc7QUFDZiIsImZpbGUiOiJzcmMvYXBwL2NvbXBvbmVudHMvbWFpbi9tYWluLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY29udGFpbmVyIHtcclxuICAgIG1hcmdpbi10b3A6IDJlbTtcclxufVxyXG5cclxuLmFsZXJ0IHtcclxuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLmNlbnRlciB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7ICAgIFxyXG59XHJcbi5zdGlja3ktY2FyZCB7XHJcbiAgICBtYXgtaGVpZ2h0OiA1MCU7XHJcbiAgICB3aWR0aDogMTAwJTtcclxufSJdfQ== */" /***/ }), /***/ "./src/app/components/main/main.component.ts": /*!***************************************************!*\ !*** ./src/app/components/main/main.component.ts ***! \***************************************************/ /*! exports provided: MainComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MainComponent", function() { return MainComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var MainComponent = /** @class */ (function () { function MainComponent(changeDetector) { this.changeDetector = changeDetector; this.numCards = 20; this.previousCardNumber = -1; this.currentCardNumber = 0; this.defaultCardNumber = 20; this.suits = ['s', 'd', 'c', 'h']; this.values = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13']; this.exercisesJson = __webpack_require__(/*! ./exercises.json */ "./src/app/components/main/exercises.json"); this.cCounter = 0; this.dCounter = 0; this.hCounter = 0; this.sCounter = 0; } MainComponent.prototype.ngOnInit = function () { this.deck = this.createDeck(); this.shuffleDeck(this.deck); }; MainComponent.prototype.createCards = function () { this.showCards = true; this.workoutDeck = this.deck.slice(0, this.numCards); this.displayExercise(); }; MainComponent.prototype.resetCards = function () { this.showCards = false; this.deck = undefined; this.deck = this.createDeck(); this.shuffleDeck(this.deck); this.workoutDeck = this.deck.slice(0, this.numCards); this.showCards = true; this.reps = undefined; this.rest = false; this.exercise = undefined; this.currentCardNumber = 0; this.previousCardNumber = -1; }; MainComponent.prototype.createDeck = function () { var deck = new Array(); var card; for (var i = 0; i < this.suits.length; i++) { for (var n = 0; n < this.values.length; n++) { card = { value: this.values[n], suit: this.suits[i] }; deck.push(card); } } return deck; }; MainComponent.prototype.shuffleDeck = function (deck) { var location1; var location2; var temp; for (var i = 0; i < 2000; i++) { location1 = Math.floor((Math.random() * deck.length)); location2 = Math.floor((Math.random() * deck.length)); temp = deck[location1]; deck[location1] = deck[location2]; deck[location2] = temp; } }; MainComponent.prototype.displayExercise = function () { var currentCard = this.workoutDeck[this.currentCardNumber]; console.log(currentCard); if (currentCard.value !== 1) { this.rest = undefined; this.reps = Number(currentCard.value) + 10; if (currentCard.suit === 'c') { this.exercise = this.exercisesJson.c[this.cCounter]; this.cCounter += 1; } else if (currentCard.suit === 'd') { this.exercise = this.exercisesJson.d[this.dCounter]; this.dCounter += 1; } else if (currentCard.suit === 'h') { this.exercise = this.exercisesJson.h[this.hCounter]; this.hCounter += 1; } else if (currentCard.suit === 's') { this.exercise = this.exercisesJson.s[this.sCounter]; this.sCounter += 1; } if (this.cCounter > 3) { this.cCounter = 0; } else if (this.dCounter > 3) { this.dCounter = 0; } else if (this.hCounter > 3) { this.hCounter = 0; } else if (this.sCounter > 3) { this.sCounter = 0; } } else { this.exercise = undefined; this.reps = undefined; this.rest = true; } }; MainComponent.prototype.incrementCardCounter = function () { this.displayExercise(); this.currentCardNumber += 1; this.previousCardNumber += 1; }; MainComponent.prototype.decrementCardCounter = function () { this.displayExercise(); this.currentCardNumber -= 1; this.previousCardNumber -= 1; }; MainComponent.ctorParameters = function () { return [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] } ]; }; MainComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'main', template: __webpack_require__(/*! raw-loader!./main.component.html */ "./node_modules/raw-loader/index.js!./src/app/components/main/main.component.html"), styles: [__webpack_require__(/*! ./main.component.css */ "./src/app/components/main/main.component.css")] }) ], MainComponent); return MainComponent; }()); /***/ }), /***/ "./src/environments/environment.ts": /*!*****************************************!*\ !*** ./src/environments/environment.ts ***! \*****************************************/ /*! exports provided: environment */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; }); // This file can be replaced during build by using the `fileReplacements` array. // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. var environment = { production: false }; /* * For easier debugging in development mode, you can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact * on performance if an error is thrown. */ // import 'zone.js/dist/zone-error'; // Included with Angular CLI. /***/ }), /***/ "./src/main.ts": /*!*********************!*\ !*** ./src/main.ts ***! \*********************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js"); /* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts"); if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) { Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])(); } Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"]) .catch(function (err) { return console.error(err); }); /***/ }), /***/ 0: /*!***************************!*\ !*** multi ./src/main.ts ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! C:\Users\Will\Documents\Coding\cardWorkout\src\main.ts */"./src/main.ts"); /***/ }) },[[0,"runtime","vendor"]]]); //# sourceMappingURL=main-es5.js.map