(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ /***/ "./src/$$_lazy_route_resource lazy recursive": /*!**********************************************************!*\ !*** ./src/$$_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 = "./src/$$_lazy_route_resource lazy recursive"; /***/ }), /***/ "./src/app/app-bootstrap.module.ts": /*!*****************************************!*\ !*** ./src/app/app-bootstrap.module.ts ***! \*****************************************/ /*! exports provided: AppBootstrapModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppBootstrapModule", function() { return AppBootstrapModule; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var AppBootstrapModule = /** @class */ (function () { function AppBootstrapModule() { } AppBootstrapModule = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({ imports: [ _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"] ], declarations: [] }) ], AppBootstrapModule); return AppBootstrapModule; }()); /***/ }), /***/ "./src/app/app-routing.module.ts": /*!***************************************!*\ !*** ./src/app/app-routing.module.ts ***! \***************************************/ /*! exports provided: AppRoutingModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); /* harmony import */ var _help_help_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./help/help.component */ "./src/app/help/help.component.ts"); /* harmony import */ var _start_start_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./start/start.component */ "./src/app/start/start.component.ts"); /* harmony import */ var _auth_guard_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./auth-guard.service */ "./src/app/auth-guard.service.ts"); /* harmony import */ var _session_expired_session_expired_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./session-expired/session-expired.component */ "./src/app/session-expired/session-expired.component.ts"); /* harmony import */ var _home_home_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./home/home.component */ "./src/app/home/home.component.ts"); /* harmony import */ var _logout_logout_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./logout/logout.component */ "./src/app/logout/logout.component.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var routes = [ { path: '', redirectTo: '/start', pathMatch: 'full' }, { path: 'start', component: _start_start_component__WEBPACK_IMPORTED_MODULE_3__["StartComponent"] }, { path: 'help', component: _help_help_component__WEBPACK_IMPORTED_MODULE_2__["HelpComponent"] }, { path: 'logout', component: _logout_logout_component__WEBPACK_IMPORTED_MODULE_7__["LogoutComponent"] }, { path: 'home', component: _home_home_component__WEBPACK_IMPORTED_MODULE_6__["HomeComponent"], canActivate: [_auth_guard_service__WEBPACK_IMPORTED_MODULE_4__["AuthGuardService"]] }, { path: 'expired', component: _session_expired_session_expired_component__WEBPACK_IMPORTED_MODULE_5__["SessionExpiredComponent"] }, { path: 'contact', component: _help_help_component__WEBPACK_IMPORTED_MODULE_2__["HelpComponent"], resolve: { url: 'externalUrlRedirectResolver' }, data: { externalUrl: 'https://familytech.byu.edu/contact.html' } } ]; var AppRoutingModule = /** @class */ (function () { function AppRoutingModule() { } AppRoutingModule = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forRoot(routes)], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]] }) ], AppRoutingModule); return AppRoutingModule; }()); /***/ }), /***/ "./src/app/app.component.html": /*!************************************!*\ !*** ./src/app/app.component.html ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n \n
\n \n
\n \n
\n
" /***/ }), /***/ "./src/app/app.component.scss": /*!************************************!*\ !*** ./src/app/app.component.scss ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "/*\n * Sticky footer styles\n */\n.all-wrap {\n min-height: 100vh; }\n.page-wrap {\n display: flex;\n flex-direction: column;\n min-height: 100vh; }\n.content {\n flex: 1; }\n/*\n * Make component injected by router full height\n */\nmain {\n display: flex;\n flex-direction: column; }\n" /***/ }), /***/ "./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 _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var AppComponent = /** @class */ (function () { function AppComponent() { this.title = 'Tree Sweeper'; } AppComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-root', template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"), styles: [__webpack_require__(/*! ./app.component.scss */ "./src/app/app.component.scss")] }) ], 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 _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); /* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js"); /* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts"); /* harmony import */ var _navbar_navbar_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./navbar/navbar.component */ "./src/app/navbar/navbar.component.ts"); /* harmony import */ var _home_home_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./home/home.component */ "./src/app/home/home.component.ts"); /* harmony import */ var _footer_footer_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./footer/footer.component */ "./src/app/footer/footer.component.ts"); /* harmony import */ var _loader_loader_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./loader/loader.component */ "./src/app/loader/loader.component.ts"); /* harmony import */ var _logout_logout_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logout/logout.component */ "./src/app/logout/logout.component.ts"); /* harmony import */ var _session_expired_session_expired_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./session-expired/session-expired.component */ "./src/app/session-expired/session-expired.component.ts"); /* harmony import */ var _start_start_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./start/start.component */ "./src/app/start/start.component.ts"); /* harmony import */ var _sweep_options_sweep_options_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sweep-options/sweep-options.component */ "./src/app/sweep-options/sweep-options.component.ts"); /* harmony import */ var _sweep_results_sweep_results_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sweep-results/sweep-results.component */ "./src/app/sweep-results/sweep-results.component.ts"); /* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts"); /* harmony import */ var _help_help_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./help/help.component */ "./src/app/help/help.component.ts"); /* harmony import */ var _material_module__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./material.module */ "./src/app/material.module.ts"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./link.service */ "./src/app/link.service.ts"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./fs.service */ "./src/app/fs.service.ts"); /* harmony import */ var _app_bootstrap_module__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! .//app-bootstrap.module */ "./src/app/app-bootstrap.module.ts"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); /* harmony import */ var _filter_control_filter_control_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./filter-control/filter-control.component */ "./src/app/filter-control/filter-control.component.ts"); /* harmony import */ var _loading_indicator_loading_indicator_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./loading-indicator/loading-indicator.component */ "./src/app/loading-indicator/loading-indicator.component.ts"); /* harmony import */ var _last_sweep_summary_last_sweep_summary_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./last-sweep-summary/last-sweep-summary.component */ "./src/app/last-sweep-summary/last-sweep-summary.component.ts"); /* harmony import */ var _result_list_result_list_component__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./result-list/result-list.component */ "./src/app/result-list/result-list.component.ts"); /* harmony import */ var _person_results_person_results_component__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./person-results/person-results.component */ "./src/app/person-results/person-results.component.ts"); /* harmony import */ var _result_component_result_component_component__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./result-component/result-component.component */ "./src/app/result-component/result-component.component.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var AppModule = /** @class */ (function () { function AppModule() { } AppModule = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ declarations: [ _app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"], _navbar_navbar_component__WEBPACK_IMPORTED_MODULE_5__["NavbarComponent"], _home_home_component__WEBPACK_IMPORTED_MODULE_6__["HomeComponent"], _footer_footer_component__WEBPACK_IMPORTED_MODULE_7__["FooterComponent"], _loader_loader_component__WEBPACK_IMPORTED_MODULE_8__["LoaderComponent"], _logout_logout_component__WEBPACK_IMPORTED_MODULE_9__["LogoutComponent"], _session_expired_session_expired_component__WEBPACK_IMPORTED_MODULE_10__["SessionExpiredComponent"], _start_start_component__WEBPACK_IMPORTED_MODULE_11__["StartComponent"], _sweep_options_sweep_options_component__WEBPACK_IMPORTED_MODULE_12__["SweepOptionsComponent"], _sweep_results_sweep_results_component__WEBPACK_IMPORTED_MODULE_13__["SweepResultsComponent"], _help_help_component__WEBPACK_IMPORTED_MODULE_15__["HelpComponent"], _filter_control_filter_control_component__WEBPACK_IMPORTED_MODULE_21__["FilterControlComponent"], _loading_indicator_loading_indicator_component__WEBPACK_IMPORTED_MODULE_22__["LoadingIndicatorComponent"], _last_sweep_summary_last_sweep_summary_component__WEBPACK_IMPORTED_MODULE_23__["LastSweepSummaryComponent"], _result_list_result_list_component__WEBPACK_IMPORTED_MODULE_24__["ResultListComponent"], _person_results_person_results_component__WEBPACK_IMPORTED_MODULE_25__["PersonResultsComponent"], _result_component_result_component_component__WEBPACK_IMPORTED_MODULE_26__["ResultComponentComponent"], ], imports: [ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"], _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_3__["BrowserAnimationsModule"], _app_routing_module__WEBPACK_IMPORTED_MODULE_14__["AppRoutingModule"], _material_module__WEBPACK_IMPORTED_MODULE_16__["MaterialModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"], _app_routing_module__WEBPACK_IMPORTED_MODULE_14__["AppRoutingModule"], _app_bootstrap_module__WEBPACK_IMPORTED_MODULE_19__["AppBootstrapModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_20__["FormsModule"] ], entryComponents: [ _loader_loader_component__WEBPACK_IMPORTED_MODULE_8__["LoaderComponent"] ], providers: [_link_service__WEBPACK_IMPORTED_MODULE_17__["LinkService"], _fs_service__WEBPACK_IMPORTED_MODULE_18__["FsService"], { provide: 'externalUrlRedirectResolver', useValue: function (route, state) { window.location.href = route.data.externalUrl; } }], bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"]] }) ], AppModule); return AppModule; }()); /***/ }), /***/ "./src/app/auth-guard.service.ts": /*!***************************************!*\ !*** ./src/app/auth-guard.service.ts ***! \***************************************/ /*! exports provided: AuthGuardService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthGuardService", function() { return AuthGuardService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fs.service */ "./src/app/fs.service.ts"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./link.service */ "./src/app/link.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var AuthGuardService = /** @class */ (function () { function AuthGuardService(fsService, router, link) { this.fsService = fsService; this.router = router; this.link = link; } AuthGuardService.prototype.canActivate = function (route, state) { //console.log(route.queryParamMap); if (route.queryParamMap.has('fstoken')) { this.fsService.logIn(route.queryParamMap.get('fstoken')); this.router.navigate([route.url[0].path]); return false; } else if (this.fsService.isAuthenticated()) { return true; } else { this.router.navigate(['start']); return false; } }; AuthGuardService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", [_fs_service__WEBPACK_IMPORTED_MODULE_2__["FsService"], _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"], _link_service__WEBPACK_IMPORTED_MODULE_3__["LinkService"]]) ], AuthGuardService); return AuthGuardService; }()); /***/ }), /***/ "./src/app/checkerResults.ts": /*!***********************************!*\ !*** ./src/app/checkerResults.ts ***! \***********************************/ /*! exports provided: CheckerResults */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckerResults", function() { return CheckerResults; }); /* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./personResults */ "./src/app/personResults.ts"); var RESULTS_KEY = "treesweeper-results"; var CheckerResults = /** @class */ (function () { function CheckerResults() { this.rawResults = {}; this.totalResults = 0; this.numImpossible = 0; this.numUnlikely = 0; this.numResearch = 0; } // Adds a new result, creating a PersonResults container if necessary CheckerResults.prototype.addResult = function (result) { var results = this.rawResults[result.pid]; if (!results) { results = new _personResults__WEBPACK_IMPORTED_MODULE_0__["PersonResults"](result.name, result.pid, result.generation); } results.addResult(result); this.rawResults[results.getPid()] = results; this.totalResults++; if (result.type === "IMPOSSIBLE") ++this.numImpossible; else if (result.type === "UNLIKELY") ++this.numUnlikely; else if (result.type === "RESEARCH") ++this.numResearch; }; // Generates an array with all results so far CheckerResults.prototype.resultArray = function () { var results = []; // Get all results in the map for (var key in this.rawResults) { if (this.rawResults.hasOwnProperty(key)) results.push(this.rawResults[key]); } return results; }; CheckerResults.prototype.setTotal = function (value) { this.totalResults = value; }; CheckerResults.prototype.setPerson = function (person) { this.rawResults[person.getPid()] = person; }; return CheckerResults; }()); /***/ }), /***/ "./src/app/constraint.ts": /*!*******************************!*\ !*** ./src/app/constraint.ts ***! \*******************************/ /*! exports provided: Constraint */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Constraint", function() { return Constraint; }); var Constraint = /** @class */ (function () { function Constraint(id) { this.id = id; this.enabled = true; this.ids = []; } Constraint.prototype.isEnabled = function () { return this.enabled; }; Constraint.prototype.setEnabled = function (enabled) { this.enabled = enabled; }; Constraint.prototype.getId = function () { return this.id; }; Constraint.prototype.addId = function (id) { if (!this.ids) this.ids = []; this.ids.push(id); }; Constraint.prototype.getIds = function () { return this.ids; }; Constraint.prototype.containsId = function (id) { return this.ids.includes(id); }; return Constraint; }()); /***/ }), /***/ "./src/app/constraintCategory.ts": /*!***************************************!*\ !*** ./src/app/constraintCategory.ts ***! \***************************************/ /*! exports provided: ConstraintCategory */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConstraintCategory", function() { return ConstraintCategory; }); /* harmony import */ var _constraint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constraint */ "./src/app/constraint.ts"); var ConstraintCategory = /** @class */ (function () { function ConstraintCategory(name) { this.name = name; this.constraints = []; } ConstraintCategory.prototype.add = function (id) { var constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"](id); this.constraints.push(constraint); }; ConstraintCategory.prototype.addConstraint = function (constraint) { this.constraints.push(constraint); }; // This method loads with all the currently-defined constraints. ConstraintCategory.prototype.loadDefaults = function () { var constraintCategories = []; // Initialize constraint categories // First category: parent-child relationship constraints var category = new ConstraintCategory("Parent-Child Relationship"); var constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Parent should have a realistic age at birth of children"); constraint.addId("Father has realistic age at birth of first child"); constraint.addId("Mother has realistic age at birth of first child"); constraint.addId("Father has realistic age at birth of last child"); constraint.addId("Mother has realistic age at birth of last child"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Parent's children should be born during their lifespan"); constraint.addId("Parent is born before their children"); constraint.addId("Parent dies after children are born"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should not have too many parents"); constraint.addId("Person does not have too many parents"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should not be their own ancestor"); constraint.addId("Person is not their own ancestor"); category.addConstraint(constraint); constraintCategories.push(category); // Second category: christening constraints category = new ConstraintCategory("Christening"); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should be christened at a reasonable age"); constraint.addId("Person was christened at a reasonable age"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should be christened in their lifespan"); constraint.addId("Person was christened after they were born"); constraint.addId("Person was christened before they died"); category.addConstraint(constraint); constraintCategories.push(category); // Third category: lifespan constraints category = new ConstraintCategory("Lifespan"); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should have a reasonable lifespan"); constraint.addId("Woman has a reasonable lifespan"); constraint.addId("Man has a reasonable lifespan"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should die after they were born"); constraint.addId("Person died after they were born"); category.addConstraint(constraint); constraintCategories.push(category); // Fourth category: marriage constraints category = new ConstraintCategory("Marriage"); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should have a reasonable age at marriage"); constraint.addId("Husband has realistic age at marriage"); constraint.addId("Wife has realistic age at marriage"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should be married in their lifespan"); constraint.addId("Person was alive at marriage"); constraint.addId("Person was born at marriage"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Couple's children should be born a reasonable amount of time after marriage"); constraint.addId("Couple has been married a reasonable amount of time before first child"); constraint.addId("Couple has been married a reasonable amount of time before last child"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Couple's ages should not be too different"); constraint.addId("Age gap between spouses is not too large"); category.addConstraint(constraint); constraintCategories.push(category); // Fifth category: research constraints category = new ConstraintCategory("Research"); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should have sources"); constraint.addId("Person has sources"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Couple should not be missing children"); constraint.addId("Couple is not missing children at beginning of their marriage"); constraint.addId("Couple is not missing children at the end of mothers child bearing years"); constraint.addId("Couple is not missing middle children"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should not be missing a spouse"); constraint.addId("Person is not missing a spouse"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should have a known gender"); constraint.addId("Person has a known gender"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Person should have vital dates"); constraint.addId("Person has vital dates"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Parents should not have duplicate children"); constraint.addId("Parent has no duplicate children"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("Children should not have duplicate parents"); constraint.addId("Child has no duplicate parents"); category.addConstraint(constraint); constraint = new _constraint__WEBPACK_IMPORTED_MODULE_0__["Constraint"]("People should not have duplicate spouses"); constraint.addId("Person has no duplicate spouses"); category.addConstraint(constraint); constraintCategories.push(category); return constraintCategories; }; return ConstraintCategory; }()); /***/ }), /***/ "./src/app/data-store.service.ts": /*!***************************************!*\ !*** ./src/app/data-store.service.ts ***! \***************************************/ /*! exports provided: DataStoreService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataStoreService", function() { return DataStoreService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _importOptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./importOptions */ "./src/app/importOptions.ts"); /* harmony import */ var _checkerResults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./checkerResults */ "./src/app/checkerResults.ts"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filter */ "./src/app/filter.ts"); /* harmony import */ var _sorter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sorter */ "./src/app/sorter.ts"); /* harmony import */ var _status__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./status */ "./src/app/status.ts"); /* harmony import */ var _socket__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./socket */ "./src/app/socket.ts"); /* harmony import */ var _serializer_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./serializer.service */ "./src/app/serializer.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var OPTIONS_KEY = "treesweeper-options"; var RESULTS_KEY = "treesweeper-results"; var FILTER_KEY = "treesweeper-filters"; var DataStoreService = /** @class */ (function () { function DataStoreService(serializer) { this.useCurrentUser = true; this.rootPid = ""; this.rootType = "Current User"; // If there is a stored sweep, load it if (sessionStorage.getItem(OPTIONS_KEY)) { this.lastSweepOptions = _importOptions__WEBPACK_IMPORTED_MODULE_1__["ImportOptions"].loadFromStorage(); } if (sessionStorage.getItem(RESULTS_KEY)) { this.lastSweepResults = serializer.deserializeCheckerResults(sessionStorage.getItem(RESULTS_KEY)); } else { this.lastSweepResults = new _checkerResults__WEBPACK_IMPORTED_MODULE_2__["CheckerResults"](); } // Initialize the filter and sort methods this.retrieveFilterState(); // Initialize arrays for display this.rawResults = this.lastSweepResults.resultArray(); this.filteredResults = this.filter.filter(this.rawResults); this.refinedResults = this.sorter.sort(this.filteredResults); // Initialize messages this.message = ""; this.submessage = ""; } DataStoreService.prototype.newSweep = function (options) { // Cancel old socket, if it's running if (this.socket) this.socket.kill(); // Update stored sweep options this.lastSweepOptions = options; sessionStorage.setItem(OPTIONS_KEY, JSON.stringify(options, null, 2)); // Make new results object this.lastSweepResults = new _checkerResults__WEBPACK_IMPORTED_MODULE_2__["CheckerResults"](); sessionStorage.removeItem(RESULTS_KEY); sessionStorage.setItem(RESULTS_KEY, JSON.stringify(this.lastSweepResults, null, 2)); // Initialize arrays for display this.rawResults = this.lastSweepResults.resultArray(); if (this.filter) this.filter = this.filter.clone(); else this.filter = new _filter__WEBPACK_IMPORTED_MODULE_3__["Filter"](); this.filteredResults = this.filter.filter(this.rawResults); var sortMethod = this.sorter.getMethod(); this.sorter = new _sorter__WEBPACK_IMPORTED_MODULE_4__["Sorter"](this.filter); this.sorter.sortBy(sortMethod); this.refinedResults = this.sorter.sort(this.filteredResults); // start new sweep this.status = new _status__WEBPACK_IMPORTED_MODULE_5__["Status"](100); this.status.setValue(0); this.status.loading = true; // Open socket connection if (window.location.host.startsWith("localhost")) { // This is a development environment, use unsecured socket this.socket = new _socket__WEBPACK_IMPORTED_MODULE_6__["TreeSweepSocket"]("ws://" + window.location.host + "/import", this.status, options, this); } else { // This is a production environment, use secured socket this.socket = new _socket__WEBPACK_IMPORTED_MODULE_6__["TreeSweepSocket"]("wss://" + window.location.host + "/import", this.status, options, this); } }; DataStoreService.prototype.handleUpdate = function (update) { update.execute(this); }; DataStoreService.prototype.addData = function (result) { this.lastSweepResults.addResult(result); this.dataChanged(); }; DataStoreService.prototype.saveFilterState = function () { // Store filter and sort status var filterState = { filter: this.filter, sortMethod: this.sorter.getMethod() }; sessionStorage.setItem(FILTER_KEY, JSON.stringify(filterState, null, 2)); }; DataStoreService.prototype.retrieveFilterState = function () { if (sessionStorage.getItem(FILTER_KEY)) { var savedState = JSON.parse(sessionStorage.getItem(FILTER_KEY)); this.filter = new _filter__WEBPACK_IMPORTED_MODULE_3__["Filter"](); this.filter.displayImpossible = savedState.filter.displayImpossible; this.filter.displayOkay = savedState.filter.displayOkay; this.filter.displayResearch = savedState.filter.displayResearch; this.filter.displayUnlikely = savedState.filter.displayUnlikely; this.sorter = new _sorter__WEBPACK_IMPORTED_MODULE_4__["Sorter"](this.filter); this.sorter.sortBy(savedState.sortMethod); } else { this.filter = new _filter__WEBPACK_IMPORTED_MODULE_3__["Filter"](); this.sorter = new _sorter__WEBPACK_IMPORTED_MODULE_4__["Sorter"](this.filter); } }; DataStoreService.prototype.dataChanged = function () { this.saveFilterState(); this.rawResults = this.lastSweepResults.resultArray(); this.filteredResults = this.filter.filter(this.rawResults); this.refinedResults = this.sorter.sort(this.filteredResults); }; DataStoreService.prototype.changeFilter = function () { this.saveFilterState(); this.filteredResults = this.filter.filter(this.rawResults); this.refinedResults = this.sorter.sort(this.filteredResults); }; DataStoreService.prototype.changeSort = function (type) { this.saveFilterState(); this.sorter.sortBy(type); this.refinedResults = this.sorter.sort(this.filteredResults); }; DataStoreService.prototype.saveSweep = function () { sessionStorage.setItem(RESULTS_KEY, JSON.stringify(this.lastSweepResults, null, 2)); }; DataStoreService.prototype.toggleImpossible = function () { this.filter.displayImpossible = !this.filter.displayImpossible; }; DataStoreService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }) // This service is responsible for storing data that is shared between components , __metadata("design:paramtypes", [_serializer_service__WEBPACK_IMPORTED_MODULE_7__["SerializerService"]]) ], DataStoreService); return DataStoreService; }()); /***/ }), /***/ "./src/app/familySearchX/FHTLX.ts": /*!****************************************!*\ !*** ./src/app/familySearchX/FHTLX.ts ***! \****************************************/ /*! exports provided: FHTLX */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FHTLX", function() { return FHTLX; }); /* harmony import */ var _docCookies__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docCookies */ "./src/app/familySearchX/docCookies.ts"); /* harmony import */ var _FamilySearchX__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FamilySearchX */ "./src/app/familySearchX/FamilySearchX.ts"); var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var FHTLX = /** @class */ (function (_super) { __extends(FHTLX, _super); function FHTLX() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.PARENT_DOMAIN = window.location.host.startsWith("localhost") ? "" : ".familytech.byu.edu"; return _this; } FHTLX.authServiceRedirect = function (redirectUri) { _FamilySearchX__WEBPACK_IMPORTED_MODULE_1__["FamilySearchX"].uploadConfig(redirectUri, function (options) { var request = new XMLHttpRequest(); var uri = "https://auth.fhtl.org/?redirect=" + options.redirectUri; //new auth service. auth.familytech.byu.edu was the old one request.open("GET", uri); request.send(); }, function (error) { }); }; FHTLX.finishAuthService = function (configLocation, callback, failureUri) { var accessToken = null; if (accessToken = localStorage.getItem("fs_access_token")) { // accessToken = window.location.href.split("fstoken=")[1]; // console.log("Access Token:", accessToken); } _FamilySearchX__WEBPACK_IMPORTED_MODULE_1__["FamilySearchX"].uploadConfig(configLocation, function (initOptions) { var fhtlx = new FHTLX(initOptions); // If we already have the token, set it in the cookie. if (accessToken) { fhtlx.setAccessToken(accessToken); } var verifyToken = function (error, response) { if (!!error) { console.error("Could not obtain auth token."); } else { callback(fhtlx); } }; if (fhtlx.getAccessToken()) { callback(fhtlx); } else if (!fhtlx.oauthResponse(verifyToken) && failureUri) { window.location = failureUri; } }, function (error) { console.error("err:", error); // window.location = 'login'; if (failureUri) { window.location = failureUri; } }); }; FHTLX.prototype.setAccessToken = function (accessToken) { this.accessToken = accessToken; if (this.saveAccessToken) { // Expire in 2 hours, though tokens can expire before that after 1 hour of inactivity. _docCookies__WEBPACK_IMPORTED_MODULE_0__["docCookies"].setItem(this.tokenCookie, accessToken, 7200, this.tokenCookiePath, this.PARENT_DOMAIN); } return this; }; FHTLX.prototype.assignAccessToken = function (accessToken) { this.accessToken = accessToken; }; FHTLX.prototype.storeSession = function (fsSession) { this.setAccessToken(fsSession.fs_access_token); _docCookies__WEBPACK_IMPORTED_MODULE_0__["docCookies"].setItem('FS_SESSION', JSON.stringify(fsSession), 7200, this.tokenCookiePath, this.PARENT_DOMAIN); }; FHTLX.prototype.readyAccessToken = function (fsSession) { this.accessToken = fsSession.fs_access_token; this.userPID = fsSession.fs_user.pid; }; FHTLX.prototype.deleteSession = function () { this.deleteAccessToken(); _docCookies__WEBPACK_IMPORTED_MODULE_0__["docCookies"].removeItem('FS_SESSION', this.tokenCookiePath, this.PARENT_DOMAIN); }; FHTLX.checkAccessToken = function () { var sessionStr = _docCookies__WEBPACK_IMPORTED_MODULE_0__["docCookies"].getItem('FS_SESSION'); if (!!sessionStr) { try { var fsSession = JSON.parse(sessionStr); return fsSession; } catch (err) { return undefined; } } else { return undefined; } }; return FHTLX; }(_FamilySearchX__WEBPACK_IMPORTED_MODULE_1__["FamilySearchX"])); /***/ }), /***/ "./src/app/familySearchX/FamilySearchX.ts": /*!************************************************!*\ !*** ./src/app/familySearchX/FamilySearchX.ts ***! \************************************************/ /*! exports provided: FamilySearchX */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FamilySearchX", function() { return FamilySearchX; }); /*====================================================================================================== [][][][]/ [][][][] Licensure [][][][]\ Although this SDK does not directly include any code from the "Lite JS SDK for the FamilySearch API" github project (https://github.com/FamilySearch/fs-js-lite), it is designed to be compatible therewith. As such, we will post their MIT licensure statement here, noting that the code in this project is the exclusive property of Brigam Young University, and was developed by student researchers in the BYU Family History Technology Lab as an extension to the aformentioned project. Lite JS SDK for the FamilySearch API License: -------------------------------------------------------------------------------- MIT License Copyright (c) 2016 York Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- ======================================================================================================*/ var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var FSLink = /** @class */ (function () { function FSLink() { } return FSLink; }()); var FSResourceReference = /** @class */ (function () { function FSResourceReference() { } return FSResourceReference; }()); var FSExtensibleData = /** @class */ (function () { function FSExtensibleData() { } return FSExtensibleData; }()); var FSHypermediaEnabledData = /** @class */ (function (_super) { __extends(FSHypermediaEnabledData, _super); function FSHypermediaEnabledData() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.links = {}; return _this; } return FSHypermediaEnabledData; }(FSExtensibleData)); var FSFamilyView = /** @class */ (function (_super) { __extends(FSFamilyView, _super); function FSFamilyView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.children = []; return _this; } return FSFamilyView; }(FSHypermediaEnabledData)); var FSAttribution = /** @class */ (function (_super) { __extends(FSAttribution, _super); function FSAttribution() { return _super !== null && _super.apply(this, arguments) || this; } return FSAttribution; }(FSExtensibleData)); var FSQualifier = /** @class */ (function () { function FSQualifier() { } return FSQualifier; }()); var FSSourceReference = /** @class */ (function (_super) { __extends(FSSourceReference, _super); function FSSourceReference() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.qualifiers = []; return _this; } return FSSourceReference; }(FSHypermediaEnabledData)); var FSNote = /** @class */ (function (_super) { __extends(FSNote, _super); function FSNote() { return _super !== null && _super.apply(this, arguments) || this; } return FSNote; }(FSHypermediaEnabledData)); var FSConclusion = /** @class */ (function (_super) { __extends(FSConclusion, _super); function FSConclusion() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.notes = []; return _this; } return FSConclusion; }(FSHypermediaEnabledData)); var FSGender = /** @class */ (function (_super) { __extends(FSGender, _super); function FSGender() { return _super !== null && _super.apply(this, arguments) || this; } return FSGender; }(FSConclusion)); var FSTextValue = /** @class */ (function () { function FSTextValue() { } return FSTextValue; }()); var FSDate = /** @class */ (function (_super) { __extends(FSDate, _super); function FSDate() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.normalized = []; return _this; } return FSDate; }(FSExtensibleData)); var FSNamePart = /** @class */ (function (_super) { __extends(FSNamePart, _super); function FSNamePart() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.qualifiers = []; return _this; } return FSNamePart; }(FSExtensibleData)); var FSNameForm = /** @class */ (function (_super) { __extends(FSNameForm, _super); function FSNameForm() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.parts = []; return _this; } return FSNameForm; }(FSExtensibleData)); var FSName = /** @class */ (function (_super) { __extends(FSName, _super); function FSName() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.nameForms = []; return _this; } return FSName; }(FSConclusion)); var FSPlaceReference = /** @class */ (function (_super) { __extends(FSPlaceReference, _super); function FSPlaceReference() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.normalized = []; return _this; } return FSPlaceReference; }(FSExtensibleData)); var FSFact = /** @class */ (function (_super) { __extends(FSFact, _super); function FSFact() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.qualifiers = []; return _this; } return FSFact; }(FSConclusion)); var FSDisplayProperties = /** @class */ (function (_super) { __extends(FSDisplayProperties, _super); function FSDisplayProperties() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.familiesAsParent = []; _this.familiesAsChild = []; return _this; } return FSDisplayProperties; }(FSExtensibleData)); var FSEvidenceReference = /** @class */ (function (_super) { __extends(FSEvidenceReference, _super); function FSEvidenceReference() { return _super !== null && _super.apply(this, arguments) || this; } return FSEvidenceReference; }(FSHypermediaEnabledData)); var FSSubject = /** @class */ (function (_super) { __extends(FSSubject, _super); function FSSubject() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.evidence = []; _this.media = []; _this.identifiers = {}; return _this; } return FSSubject; }(FSConclusion)); var FSPerson = /** @class */ (function (_super) { __extends(FSPerson, _super); function FSPerson() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.names = []; _this.facts = []; return _this; } return FSPerson; }(FSSubject)); var FSRelationship = /** @class */ (function (_super) { __extends(FSRelationship, _super); function FSRelationship() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.facts = []; return _this; } return FSRelationship; }(FSSubject)); var FSChildAndParentRelationship = /** @class */ (function (_super) { __extends(FSChildAndParentRelationship, _super); function FSChildAndParentRelationship() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.fatherFacts = []; _this.motherFacts = []; return _this; } return FSChildAndParentRelationship; }(FSSubject)); var FSUser = /** @class */ (function (_super) { __extends(FSUser, _super); function FSUser() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.links = {}; return _this; } return FSUser; }(FSExtensibleData)); // #endregion /*============================================================================================= [][][][]/ [][][][] FamilySearchX Definition [][][][]\ =============================================================================================*/ // #region FSX Definition var FamilySearchX = /** @class */ (function (_super) { __extends(FamilySearchX, _super); function FamilySearchX(options) { var _this = _super.call(this, options) || this; _this.userPID = ""; return _this; } /*============================================================================================= [][][][]/ [][][][] Init & Utils [][][][]\ =============================================================================================*/ // #region Init and Utils /** * This method is designed principally as a means of loading up a configuration file. * @param uri * @param handler */ FamilySearchX.uploadConfig = function (uri, handler, errorHandler) { var request = new XMLHttpRequest(); request.addEventListener("load", function () { var data = this.response; if (data instanceof String) { handler(JSON.parse(data)); } else { handler(data); } }); request.addEventListener("error", function () { errorHandler(this.response); }); request.open("GET", uri); request.responseType = "json"; request.send(); }; FamilySearchX.prototype.logout = function (handler) { this.post("/platform/logout", {}, function (error, response) { console.log("%c User has been logged out", "color: #ffdd00"); handler && handler(error, response); }); }; FamilySearchX.prototype.isPID = function (field) { return !!(/[a-zA-Z0-9]{4}-[a-zA-Z0-9]{3}/g).exec(field); }; // #endregion /*============================================================================================= [][][][]/ [][][][] User API [][][][]\ =============================================================================================*/ // #region User API /** * Gets the current user person * @param handler */ FamilySearchX.prototype.getCurrentTreePerson = function (handler) { this.get('/platform/tree/current-person', handler); }; /** * Gets the information for the current user. * @param handler */ FamilySearchX.prototype.getCurrentUser = function (handler) { var _this = this; this.get('/platform/users/current', function (error, response) { try { if (!error) { var res = (JSON.parse(response.body)); var user = res.users[0]; _this.userPID = user.personId; handler(error, user); } } catch (e) { handler({ apiError: error, parsingError: e }, null); } }); }; /** * Gets a FamilySearch person information for a user. * @param user * @param handler */ FamilySearchX.prototype.getPersonFromUser = function (user, handler) { if (!!user.links && !!user.links.person) { this.get(user.links.person.href, handler); } else { this.get("/platform/tree/persons/" + user.personId, handler); } }; /** * Gets the user's ancestry and returns the RAW results. * @param handler * @param generations * @param spouse * @param marriageDetails * @param descendants * @param personDetails */ FamilySearchX.prototype.getUserWithAncestry = function (handler, generations, spouse, marriageDetails, descendants, personDetails) { var _this = this; if (generations === void 0) { generations = 8; } if (spouse === void 0) { spouse = ""; } if (!this.userPID) { this.getCurrentUser(function (error, user) { _this.getUserWithAncestry(handler, generations, spouse, marriageDetails, descendants, personDetails); }); return; } else { this.getPersonWithAncestry(this.userPID, handler, generations, spouse, marriageDetails, descendants, personDetails); } }; /** * Gets the user's descendancy and returns the RAW results. * @param handler * @param generations * @param spouse * @param marriageDetails * @param personDetails */ FamilySearchX.prototype.getUserWithDescendancy = function (handler, generations, spouse, marriageDetails, personDetails) { var _this = this; if (generations === void 0) { generations = 2; } if (spouse === void 0) { spouse = ""; } if (!this.userPID) { this.getCurrentUser(function (error, user) { _this.getUserWithDescendancy(handler, generations, spouse, marriageDetails, personDetails); }); return; } else { this.getPersonWithDescendancy(this.userPID, handler, generations, spouse, marriageDetails, personDetails); } }; // #endregion /*============================================================================================= [][][][]/ [][][][] Person API [][][][]\ =============================================================================================*/ // #region Person API /** * Get a particular person's data from the family tree * @param pid * @param handler * @param relatives (Optional) boolean whether or not relatives should be included with the results. Defaults to false * @param sourceDescriptions (Optional) boolean whether or not sourceDescriptions should be included with the results. Defaults to false */ FamilySearchX.prototype.getPerson = function (pid, handler, relatives, sourceDescriptions) { if (relatives === void 0) { relatives = false; } if (sourceDescriptions === void 0) { sourceDescriptions = false; } var uri = '/platform/tree/persons/' + pid; var params = []; if (relatives) { params.push("relatives=true"); } if (sourceDescriptions) { params.push("sourceDescriptions=true"); } if (params.length) { uri += "?" + params.join("&"); } this.get(uri, handler); }; /** * Get the data for a collection of people. * @param pids * @param handler */ FamilySearchX.prototype.getPersons = function (pids, handler) { var limit = 500; // Handle inproperly sized requests. if (pids.length > limit) { console.error("getPersons() called to FS with", pids.length, "ids. The limit is", limit, "."); pids = pids.slice(0, limit); } var list = pids.reduce(function (curr, pid) { return curr += (pid + ","); }, "").substr(0, -1); // Final API call this.get('/platform/tree/persons?pids=' + list, handler); }; /** * Gets a person with their ancestry and returns the RAW results. * @param pid * @param handler * @param generations * @param spouse * @param marriageDetails * @param descendants * @param personDetails */ FamilySearchX.prototype.getPersonWithAncestry = function (pid, handler, generations, spouse, marriageDetails, descendants, personDetails) { if (generations === void 0) { generations = 2; } if (spouse === void 0) { spouse = ""; } var maxGenerations = 8; var baseUri = "/platform/tree/ancestry?person=" + pid; var uri = baseUri; if (generations > 0) { if (generations > maxGenerations) { console.error("getPersonWithDescendancy() requested", generations, "generations. The limit is", maxGenerations, "."); generations = maxGenerations; } uri += "&generations=" + generations; } if (spouse != "") { uri += "&spouse=" + spouse; } if (marriageDetails) { uri += "&marriageDetails=true"; } if (personDetails) { uri += "&personDetails=true"; } if (descendants) { uri += "&descendants=true"; } this.get(uri, handler); }; /** * Gets a person with their descendancy and returns the RAW results. * @param pid * @param handler * @param generations * @param spouse * @param marriageDetails * @param personDetails */ FamilySearchX.prototype.getPersonWithDescendancy = function (pid, handler, generations, spouse, marriageDetails, personDetails) { if (generations === void 0) { generations = 2; } if (spouse === void 0) { spouse = ""; } var maxGenerations = 2; var baseUri = "/platform/tree/descendancy?person=" + pid; var uri = baseUri; if (generations > 0) { if (generations > maxGenerations) { console.error("getPersonWithDescendancy() requested", generations, "generations. The limit is", maxGenerations, "."); generations = maxGenerations; } uri += "&generations=" + generations; } if (spouse != "") { uri += "&spouse=" + spouse; } if (marriageDetails) { uri += "&marriageDetails=true"; } if (personDetails) { uri += "&personDetails=true"; } this.get(uri, handler); }; /** * Gets a person with their ancestry and returns the processed results. * @param pid * @param handler * @param generations * @param spouse * @param marriageDetails * @param personDetails */ FamilySearchX.prototype.getPersonAncestry = function (pid, handler, generations) { var desc = new FSXAncestryBuilder(this, pid, generations); // console.log("Running ancestry!"); desc.run().then(function (res) { // console.log("Ancestry Data:", res); handler(null, res.people); }, function (rej) { console.log("Ancestry Failed:", rej); handler(rej, []); }); }; /** * Gets a person with their descendancy and returns the processed results. * @param pid * @param handler * @param generations * @param spouse * @param marriageDetails * @param personDetails */ FamilySearchX.prototype.getPersonDescendancy = function (pid, handler, generations) { var desc = new FSXDescendancyBuilder(this, pid, generations); // console.log("Running descendancy!"); desc.run().then(function (res) { // console.log("Descendancy Data:", res); handler(null, res.people); }, function (rej) { console.log("Descendancy Failed:", rej); handler(rej, []); }); }; /** * Gets a person's parents. * @param pid * @param handler */ FamilySearchX.prototype.getPersonWithParents = function (pid, handler) { this.get("/platform/tree/persons/" + pid + "/parents", handler); }; /** * Gets a person's spouses. * @param pid * @param handler */ FamilySearchX.prototype.getPersonWithSpouses = function (pid, handler) { this.get("/platform/tree/persons/" + pid + "/spouses", handler); }; /** * Gets a person's children. * @param pid * @param handler */ FamilySearchX.prototype.getPersonWithChildren = function (pid, handler) { this.get("/platform/tree/persons/" + pid + "/children", handler); }; /** * Gets a person's families. * @param pid * @param handler */ FamilySearchX.prototype.getPersonWithFamilies = function (pid, handler, sourceDescriptions) { var uri = "/platform/tree/persons/" + pid + "/families"; if (sourceDescriptions) { uri += "?sourceDescriptions=true"; } this.get(uri, handler); }; // #endregion /*============================================================================================= [][][][]/ [][][][] Memories and Sources [][][][]\ =============================================================================================*/ // #region Memories and Sources /** * Retrieves the description for a portrait picture attached as the primary portrait for an individual. * @param pid * @param handler * @param defaultUri An unencoded URI for a default image if no portrait is found. */ FamilySearchX.prototype.getPersonPortrait = function (pid, handler, defaultUri) { var uri = "/platform/tree/persons/" + pid + "/portrait"; if (defaultUri) { uri += "?default=" + encodeURIComponent(defaultUri); } this.get(uri, handler); }; /** * Retrieves descriptions for all of the portrait pictures available for an individual. * @param pid * @param handler */ FamilySearchX.prototype.getPersonPortraits = function (pid, handler) { this.get("/platform/tree/persons/" + pid + "/portraits", handler); }; /** * Retrieves descriptions for all of the memories available for an individual. * @param pid * @param handler * @param count The number of stories to request * @param startIndex The start index for the returned stories * @param filter If there is a particular type of resource desired, a filter may be used. Either "Photo", "Document", or "Story". */ FamilySearchX.prototype.getPersonMemories = function (pid, handler, count, startIndex, filter) { var url = "/platform/tree/persons/" + pid + "/memories"; var params = []; if (count > 0) { params.push("count=" + count); } if (startIndex > 0) { params.push("start=" + startIndex); } if (filter && (filter === "Photo" || filter === "Document" || filter === "Story")) { params.push("type=" + filter); } if (params.length) { url += "?" + params.join("&"); } this.get("/platform/tree/persons/" + pid + "/memories", handler); }; /** * Retrieves descriptions for all of the story memories available for an individual. * @param pid * @param handler * @param count The number of stories to request. If blank or negative, requests them all. * @param startIndex The start index for the returned stories If blank or negative, defaults to 0. */ FamilySearchX.prototype.getPersonStoryMemories = function (pid, handler, count, startIndex) { this.getPersonMemories(pid, handler, count, startIndex, "Story"); }; /** * Retrieves descriptions for all of the document memories available for an individual. * @param pid * @param handler * @param count The number of documents to request * @param startIndex The start index for the returned documents */ FamilySearchX.prototype.getPersonDocumentMemories = function (pid, handler, count, startIndex) { this.getPersonMemories(pid, handler, count, startIndex, "Document"); }; /** * Retrieves descriptions for all of the photo memories available for an individual. * @param pid * @param handler * @param count The number of documents to request * @param startIndex The start index for the returned documents */ FamilySearchX.prototype.getPersonPhotoMemories = function (pid, handler, count, startIndex) { this.getPersonMemories(pid, handler, count, startIndex, "Photo"); }; /** * Retrieves descriptions for all of the memories available for an individual. * @param pid * @param handler * @param count The number of photos to request * @param startIndex The start index for the returned photos */ FamilySearchX.prototype.getAllPersonMemories = function (pid, handler, count, startIndex) { this.getPersonMemories(pid, handler, count, startIndex); }; /** * Provides a list of all sources attached to a person. * @param pid * @param handler */ FamilySearchX.prototype.getPersonSources = function (pid, handler) { this.get("/platform/tree/persons/" + pid + "/sources", handler); }; // #endregion /*============================================================================================= [][][][]/ [][][][] Matches & Duplicates [][][][]\ =============================================================================================*/ // #region Matches FamilySearchX.prototype.getPersonDuplicateMatches = function (pid, handler, includeNotAMatchDeclarations) { var uri = "/platform/tree/persons/" + pid + "/matches"; if (includeNotAMatchDeclarations) { uri += "?includeNotAMatchDeclarations=true"; } this.get(uri, { headers: { "Accept": "application/x-gedcomx-atom+json" } }, handler); }; FamilySearchX.prototype.getPersonRecordMatches = function (pid, handler, status, count, confidence) { if (status === void 0) { status = "pending"; } if (count === void 0) { count = 5; } if (confidence === void 0) { confidence = -1; } var uri = "/platform/tree/persons/" + pid + "/matches"; var params = [ "status=" + status, "collection=" + encodeURIComponent("records"), "count=" + count ]; if (confidence > -1) { confidence = Math.min(confidence, 5); // The max cap on this is 5. params.push("confidence=" + confidence); } // Meld all of the query parameters onto the uri if (params.length) { uri += "?" + params.join("&"); } this.get(uri, { headers: { "Accept": "application/x-gedcomx-atom+json" } }, handler); }; // #endregion /*============================================================================================= [][][][]/ [][][][] Redirect To FamilySearch [][][][]\ =============================================================================================*/ // #region FamilySearch Redirect /** * Opens up a new tab to the FamilySearch person page. * Differs from viewInFamilySearchTab() in that the API docs say that eventually it might not require the user to reauthenticate. * @param pid */ FamilySearchX.prototype.openNewTabFamilySearchPerson = function (pid) { window.open("https://api.familysearch.org/redirect?person=" + pid + "&access_token=" + this.getAccessToken()); }; /** * Opens up a new tab to the FamilySearch person page. * Will definitely require the user to log in to FamilySearch again if they haven't already. * @param pid */ FamilySearchX.prototype.viewInFamilySearchTab = function (pid) { window.open("https://familysearch.org/tree/#view=ancestor&person=" + pid); }; return FamilySearchX; }(FamilySearch)); /** * FamilySearch currently ships descendancy data with a list of people only connected by a * descendancyNumber field in their display properties. * The descendancyNumber is currently a d'Aboville number. * The FSXdAbovilleParser class provides functionality for converting between the string * provided and a parsed data object with easy reference to the d'Aboville numbers for parents and the default spouse. */ var FSXdAbovilleParser = /** @class */ (function () { function FSXdAbovilleParser() { } /** * Extracts relevant data from a descendancy number * @param daboId the d'Aboville identifier for a particular person within a tree. */ FSXdAbovilleParser.getData = function (daboId) { var parts = daboId.split("."); var out = { parentA: "", parentB: "", spouse: "", subject: parts.join("."), generation: parts.length - 1 }; // Calculate Spouse out.spouse = parts.slice(0, -1).join(".") + (parts.length > 1 ? "." : "") + this.toggleSpouse(parts[parts.length - 1]); var last = parts[parts.length - 1]; parts = parts.slice(0, -1); if (parts.length && !this.isSpouse(last)) { if (this.isSpouse(parts[parts.length - 1])) { out.parentA = parts.slice(0, -1).join(".") + (parts.length > 1 ? "." : "") + this.toggleSpouse(parts[parts.length - 1]); out.parentB = parts.join("."); } else { out.parentA = parts.join("."); out.parentB = parts.slice(0, -1).join(".") + (parts.length > 1 ? "." : "") + this.toggleSpouse(parts[parts.length - 1]); } } return out; }; FSXdAbovilleParser.isSpouse = function (target) { return (target.indexOf("-S") !== -1); }; FSXdAbovilleParser.toggleSpouse = function (target) { if (!this.isSpouse(target)) { return target + "-S"; } else { return target.split("-S")[0]; } }; return FSXdAbovilleParser; }()); var FSXPedigreeBuilder = /** @class */ (function () { function FSXPedigreeBuilder(fsx, pid, generations) { this.fsx = fsx; this.pid = pid; this.generations = generations; if (generations > this.getMaxRecommendedGenerations()) { console.error("You requested downloading", this.generations, "generations of data. This may take a while."); } this.cache = {}; } FSXPedigreeBuilder.prototype.run = function () { var _this = this; var allPeople = []; return new Promise(function (resolve, reject) { var leavesOutStanding = 0; var runStep = function (pid, generationsRemaining) { // console.log("Step:", generationsRemaining); var nextSet = Math.min(generationsRemaining, _this.getMaxGenerations()); leavesOutStanding++; _this.runGenerations(pid, nextSet).then(function (data) { generationsRemaining -= nextSet; allPeople = allPeople.concat(data.allPeople); if (--leavesOutStanding === 0) { resolve({ root: _this.pid, people: allPeople }); return; } if (generationsRemaining !== 0 && data.leafIds.length != 0) { data.leafIds.forEach(function (leaf) { runStep(leaf, generationsRemaining); }); } }, function (rejection) { reject(rejection); }); }; runStep(_this.pid, _this.generations); }); }; /** * Descendancy data does not ship with relationship references. We're going to add them, so we * generate the appropriate arrays in the display properties. * @param person */ FSXPedigreeBuilder.prototype.addRelationshipArrays = function (person) { if (!person.display.familiesAsParent) { person.display.familiesAsParent = []; } if (!person.display.familiesAsChild) { person.display.familiesAsChild = []; } }; /** * Adds a child for a person under a particular spouse. * @param subject The person receiving a child * @param spouseId The ID of the other parent of the child * @param childId The PID of the child */ FSXPedigreeBuilder.prototype.addChild = function (subject, spouseId, childId) { var spouseView; var childObject = { resource: "FSXChildof-" + subject.id + "," + spouseId + ":" + childId, resourceId: childId }; if (!subject.display.familiesAsParent.some(function (view) { if (view.parent1.resourceId === subject.id || view.parent2.resourceId === subject.id) { spouseView = view; if (!view.children.some(function (ref) { return ref.resourceId === childId; })) { view.children.push(childObject); } return true; } return false; })) { spouseView = new FSFamilyView(); spouseView.links = {}; spouseView.id = "FSXFamilyViewof-" + subject.id + "," + spouseId; spouseView.parent1 = { resource: "FSXSpouseof-" + subject.id + ":" + spouseId, resourceId: subject.id }; spouseView.parent2 = { resource: "FSXSpouseof-" + spouseId + ":" + subject.id, resourceId: spouseId }; spouseView.children = [ childObject ]; subject.display.familiesAsParent.push(spouseView); } }; /** * Adds a spouse to a person, creating a families as parent entry with the designated spouse. * @param subject The person receiving a child * @param spouseId The ID of the spouse */ FSXPedigreeBuilder.prototype.addSpouse = function (subject, spouseId) { var spouseView; if (!subject.display.familiesAsParent.some(function (view) { return (view.parent1.resourceId === spouseId || view.parent2.resourceId === spouseId); })) { spouseView = new FSFamilyView(); spouseView.links = {}; spouseView.id = "FSXFamilyViewof-" + subject.id + "," + spouseId; spouseView.parent1 = { resource: "FSXSpouseof-" + subject.id + ":" + spouseId, resourceId: subject.id }; spouseView.parent2 = { resource: "FSXSpouseof-" + spouseId + ":" + subject.id, resourceId: spouseId }; spouseView.children = []; subject.display.familiesAsParent.push(spouseView); } // console.log("Added spouse:", subject.id, spouseId, spouseView); }; /** * Adds a spouse to a person, creating a families as parent entry with the designated spouse. * @param subject The person receiving a child * @param spouseId The ID of the spouse */ FSXPedigreeBuilder.prototype.addParents = function (subject, parentAId, parentBId) { var spouseView; var childReference = { resource: "FSXChildof-" + parentAId + "," + parentBId + ":" + subject.id, resourceId: subject.id }; if (!subject.display.familiesAsChild.some(function (view) { if ((view.parent1.resourceId == parentAId && view.parent2.resourceId === parentBId) || (view.parent1.resourceId == parentBId && view.parent2.resourceId === parentAId)) { if (!view.children.some(function (ref) { return (ref.resourceId === subject.id); })) { view.children.push(childReference); } return true; } return false; })) { spouseView = new FSFamilyView(); spouseView.links = {}; spouseView.id = "FSXFamilyViewof-" + parentAId + "," + parentBId; spouseView.parent1 = { resource: "FSXSpouseof-" + parentAId + ":" + parentBId, resourceId: parentAId }; spouseView.parent2 = { resource: "FSXSpouseof-" + parentBId + ":" + parentAId, resourceId: parentBId }; spouseView.children = [childReference]; subject.display.familiesAsChild.push(spouseView); } // console.log("Added parents:", subject.id, parentAId, parentBId); }; return FSXPedigreeBuilder; }()); var FSXDescendancyBuilder = /** @class */ (function (_super) { __extends(FSXDescendancyBuilder, _super); function FSXDescendancyBuilder() { return _super !== null && _super.apply(this, arguments) || this; } FSXDescendancyBuilder.prototype.getMaxGenerations = function () { return FSXDescendancyBuilder.MAX_GENERATIONS_PER_CALL; }; FSXDescendancyBuilder.prototype.getMaxRecommendedGenerations = function () { return FSXDescendancyBuilder.MAX_GENERATIONS_RECOMMENDED; }; FSXDescendancyBuilder.prototype.runGenerations = function (pid, generations) { var _this = this; return new Promise(function (resolve, reject) { _this.fsx.getPersonWithDescendancy(_this.pid, function (error, response) { if (error) { reject(error); return; } if (!!response.data) { resolve(_this.connectDescendancyData(response.data.persons, generations)); return; } resolve(); }, generations, "", true, true); }); }; /** * Given a group of people, it will attach the PID's of linked family members to the people, * creating a tree that is more intuitive than using the d'Aboville numbers. * @param people */ FSXDescendancyBuilder.prototype.connectDescendancyData = function (people, generations) { var _this = this; var leaves = []; var descMap = {}; // Cache, fill out the relationship areas, and store the descendancyNumber; people.forEach(function (subject) { if (!_this.cache[subject.id]) { _this.cache[subject.id] = subject; } _this.addRelationshipArrays(subject); descMap[subject.display.descendancyNumber] = subject.id; }); var data, parentAId, parentBId, spouseId, parentA, parentB, spouse; var i = 0; people.forEach(function (subject) { data = FSXdAbovilleParser.getData(subject.display.descendancyNumber); // Get the d'Aboville parsing if (data.generation === generations) { leaves.push(subject.id); } parentAId = descMap[data.parentA]; parentBId = descMap[data.parentB]; spouseId = descMap[data.spouse]; if (!!parentAId) { parentA = _this.cache[parentAId]; _this.addChild(parentA, parentBId, subject.id); } if (!!parentBId) { parentB = _this.cache[parentBId]; _this.addChild(parentB, parentAId, subject.id); } if (!!parentAId || !!parentBId) { _this.addParents(subject, parentAId, parentBId); } if (!!spouseId) { spouse = _this.cache[spouseId]; _this.addSpouse(subject, spouseId); } }); return { allPeople: people, leafIds: leaves }; }; FSXDescendancyBuilder.MAX_GENERATIONS_PER_CALL = 2; FSXDescendancyBuilder.MAX_GENERATIONS_RECOMMENDED = 5; return FSXDescendancyBuilder; }(FSXPedigreeBuilder)); var FSXAncestryBuilder = /** @class */ (function (_super) { __extends(FSXAncestryBuilder, _super); function FSXAncestryBuilder() { return _super !== null && _super.apply(this, arguments) || this; } FSXAncestryBuilder.prototype.getMaxGenerations = function () { return FSXAncestryBuilder.MAX_GENERATIONS_PER_CALL; }; FSXAncestryBuilder.prototype.getMaxRecommendedGenerations = function () { return FSXAncestryBuilder.MAX_GENERATIONS_RECOMMENDED; }; FSXAncestryBuilder.prototype.runGenerations = function (pid, generations) { var _this = this; return new Promise(function (resolve, reject) { _this.fsx.getPersonWithAncestry(_this.pid, function (error, response) { if (error) { reject(error); return; } if (!!response.data) { resolve(_this.connectAncestryData(response.data.persons, generations)); return; } resolve(); }, generations, "", true, false, true); }); }; FSXAncestryBuilder.prototype.connectAncestryData = function (people, generations) { var _this = this; var leaves = []; var ahnenMap = {}; // Cache, fill out the relationship areas, and store the descendancyNumber; people.forEach(function (subject) { if (!_this.cache[subject.id]) { _this.cache[subject.id] = subject; } _this.addRelationshipArrays(subject); ahnenMap[subject.display.ascendancyNumber] = subject.id; }); var ahnen, ahnenNumber, parentAAhnen, parentBAhnen, spouseAhnen, parentAId, parentBId, spouseId, parentA, parentB, spouse; var i = 0; people.forEach(function (subject) { ahnen = subject.display.ascendancyNumber; if (FSXdAbovilleParser.isSpouse(ahnen)) { var spouseAhnen_1 = FSXdAbovilleParser.toggleSpouse(ahnen); _this.addSpouse(subject, spouseAhnen_1); _this.addSpouse(_this.cache[ahnenMap[spouseAhnen_1]], ahnen); return; } ahnenNumber = parseInt(ahnen); parentAId = ahnenMap[ahnenNumber * 2]; parentBId = ahnenMap[ahnenNumber * 2 + 1]; spouseId = ahnenMap[FSXdAbovilleParser.toggleSpouse(ahnen)]; if (!!parentAId) { parentA = _this.cache[parentAId]; _this.addChild(parentA, parentBId, subject.id); } if (!!parentBId) { parentB = _this.cache[parentBId]; _this.addChild(parentB, parentAId, subject.id); } if (!!parentAId || !!parentBId) { _this.addParents(subject, parentAId, parentBId); } else if (ahnenNumber >= (i = Math.pow(2, generations)) && ahnenNumber < 2 * i) { leaves.push(subject.id); } if (!!spouseId) { spouse = _this.cache[spouseId]; _this.addSpouse(subject, spouseId); } }); return { allPeople: people, leafIds: leaves }; }; FSXAncestryBuilder.MAX_GENERATIONS_PER_CALL = 8; FSXAncestryBuilder.MAX_GENERATIONS_RECOMMENDED = 16; return FSXAncestryBuilder; }(FSXPedigreeBuilder)); // #endregion /***/ }), /***/ "./src/app/familySearchX/docCookies.ts": /*!*********************************************!*\ !*** ./src/app/familySearchX/docCookies.ts ***! \*********************************************/ /*! exports provided: docCookies */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "docCookies", function() { return docCookies; }); /*\ |*| |*| :: cookies.js :: |*| |*| A complete cookies reader/writer framework with full unicode support. |*| |*| Revision #3 - July 13th, 2017 |*| |*| https://developer.mozilla.org/en-US/docs/Web/API/document.cookie |*| https://developer.mozilla.org/User:fusionchess |*| https://github.com/madmurphy/cookies.js |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| |*| Syntaxes: |*| |*| * docCookies.setItem(name, value[, end[, path[, domain[, secure]]]]) |*| * docCookies.getItem(name) |*| * docCookies.removeItem(name[, path[, domain]]) |*| * docCookies.hasItem(name) |*| * docCookies.keys() |*| \*/ var docCookies = { getItem: function (sKey) { if (!sKey) { return null; } return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; }, setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) { if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; } var sExpires = ""; if (vEnd) { switch (vEnd.constructor) { case Number: sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd; /* Note: Despite officially defined in RFC 6265, the use of `max-age` is not compatible with any version of Internet Explorer, Edge and some mobile browsers. Therefore passing a number to the end parameter might not work as expected. A possible solution might be to convert the the relative time to an absolute time. For instance, replacing the previous line with: */ /* sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; expires=" + (new Date(vEnd * 1e3 + Date.now())).toUTCString(); */ break; case String: sExpires = "; expires=" + vEnd; break; case Date: sExpires = "; expires=" + vEnd.toUTCString(); break; } } var cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : ""); document.cookie = cookie; return true; }, removeItem: function (sKey, sPath, sDomain) { if (!this.hasItem(sKey)) { return false; } document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : ""); return true; }, hasItem: function (sKey) { if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; } return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); }, keys: function () { var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/); for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); } return aKeys; } }; /***/ }), /***/ "./src/app/filter-control/filter-control.component.html": /*!**************************************************************!*\ !*** ./src/app/filter-control/filter-control.component.html ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n Manage Results\n \n \n \n \n \n Filter Results\n Select all you want displayed\n \n \n \n Definite Errors\n \n \n Possible Errors\n \n \n Research Opportunities\n \n \n Okay Results\n \n \n \n \n \n \n Sort Results\n Choose how to sort results\n \n \n {{getDescription(option)}}\n \n \n \n
\n \n search  \n \n \n
\n
\n
" /***/ }), /***/ "./src/app/filter-control/filter-control.component.scss": /*!**************************************************************!*\ !*** ./src/app/filter-control/filter-control.component.scss ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".mat-card {\n margin: 5px;\n margin-left: 0; }\n\n.sort-options {\n display: inline-flex;\n flex-direction: column; }\n\n.sort-option {\n margin: 5px; }\n\n.search-field {\n width: 100%; }\n" /***/ }), /***/ "./src/app/filter-control/filter-control.component.ts": /*!************************************************************!*\ !*** ./src/app/filter-control/filter-control.component.ts ***! \************************************************************/ /*! exports provided: FilterControlComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterControlComponent", function() { return FilterControlComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var FilterControlComponent = /** @class */ (function () { function FilterControlComponent(dataService) { this.dataService = dataService; this.sortMethod = "generation"; this.sortOptions = ["name", "results", "generation"]; } FilterControlComponent.prototype.ngOnInit = function () { }; FilterControlComponent.prototype.getDescription = function (option) { switch (option) { case "name": return "Sort by Name"; case "results": return "Sort by Most Results"; case "generation": return "Sort by Generation"; default: return "Other"; } }; FilterControlComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-filter-control', template: __webpack_require__(/*! ./filter-control.component.html */ "./src/app/filter-control/filter-control.component.html"), styles: [__webpack_require__(/*! ./filter-control.component.scss */ "./src/app/filter-control/filter-control.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_1__["DataStoreService"]]) ], FilterControlComponent); return FilterControlComponent; }()); /***/ }), /***/ "./src/app/filter.ts": /*!***************************!*\ !*** ./src/app/filter.ts ***! \***************************/ /*! exports provided: Filter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Filter", function() { return Filter; }); var Filter = /** @class */ (function () { function Filter() { this.displayImpossible = true; this.displayUnlikely = true; this.displayResearch = true; this.displayOkay = true; this.searchString = ""; } Filter.prototype.clone = function () { var copy = new Filter(); copy.displayImpossible = this.displayImpossible; copy.displayOkay = this.displayOkay; copy.displayResearch = this.displayResearch; copy.displayUnlikely = this.displayUnlikely; return copy; }; Filter.prototype.filter = function (input) { var filteredResults = []; var filter = this; // For each person results, generate a filtered person's results input.forEach(function (personResult) { // If there is a search term, filter out anyone not matching the search string. // Otherwise, this shouldn't affect it at all. if (personResult.matches(filter.searchString)) { var totalResults = 0; var hasImpossibles = false; var hasUnlikely = false; if (filter.displayImpossible) { totalResults += personResult.impossible.length; if (personResult.impossible.length > 0) hasImpossibles = true; } if (filter.displayUnlikely) { totalResults += personResult.unlikely.length; if (personResult.unlikely.length > 0) hasUnlikely = true; } if (filter.displayResearch) totalResults += personResult.research.length; if (filter.displayOkay) totalResults += personResult.okay.length; // Only add to the filtered results if they have results; if all their results have been filtered out, don't show them. if (totalResults > 0) { filteredResults.push(personResult); } } }); return filteredResults; }; return Filter; }()); /***/ }), /***/ "./src/app/flaggedResult.ts": /*!**********************************!*\ !*** ./src/app/flaggedResult.ts ***! \**********************************/ /*! exports provided: FlaggedResult */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlaggedResult", function() { return FlaggedResult; }); var FlaggedResult = /** @class */ (function () { function FlaggedResult() { } return FlaggedResult; }()); /***/ }), /***/ "./src/app/footer/footer.component.html": /*!**********************************************!*\ !*** ./src/app/footer/footer.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n\n
\n

{{section.title}}

\n\n \n \n {{link.name}} \n \n \n
\n\n
\n" /***/ }), /***/ "./src/app/footer/footer.component.scss": /*!**********************************************!*\ !*** ./src/app/footer/footer.component.scss ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".section-title {\n padding-left: 14px;\n font-family: Arial, Helvetica, sans-serif;\n font-weight: lighter;\n color: white;\n margin: 0;\n font-size: 22px; }\n\n.fhtl-link {\n color: white;\n font-size: 14px;\n text-decoration: none; }\n\n.fhtl-link:hover {\n text-decoration: underline; }\n\n.section-holder {\n display: flex;\n justify-content: center;\n padding: 30px;\n margin-top: calc(100vh); }\n\n.column {\n display: block;\n padding: 0px 30px; }\n\n.link-item {\n height: 30px !important; }\n\n@media screen and (max-width: 800px) {\n .section-holder {\n display: block;\n /* display: flex; */\n margin-top: 0; }\n .column {\n padding-bottom: 20px;\n width: 50%;\n display: inline-block;\n box-sizing: border-box; } }\n\n@media screen and (max-width: 620px) {\n .section-holder {\n display: block;\n /* display: flex; */\n margin-top: 0; }\n .column {\n padding-bottom: 20px;\n display: block;\n margin: auto;\n width: 250px;\n /*This number is semi-hardcoded, but works*/ }\n .link-item {\n height: 24px !important; } }\n\n.section-holder {\n margin-top: 0; }\n" /***/ }), /***/ "./src/app/footer/footer.component.ts": /*!********************************************!*\ !*** ./src/app/footer/footer.component.ts ***! \********************************************/ /*! exports provided: FooterComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterComponent", function() { return FooterComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var FooterComponent = /** @class */ (function () { function FooterComponent(links) { this.links = links; this.footer = [ { title: 'Support Fhtl', links: [ { href: links.FHTL.home, name: 'Home' }, { href: links.FHTL.contact, name: 'Contact' }, { href: links.FHTL.people, name: 'People' }, { href: links.FHTL.donate, name: 'Donate' } ] }, { title: 'Research', links: [ { href: links.FHTL.relativeFinder, name: 'Relative Finder' }, { href: links.FHTL.virtualPedigreee, name: 'Virtual Pedigree' }, { href: links.FHTL.descendancyExplorer, name: 'Descendancy Explorer' }, { href: links.FHTL.treeSweeper, name: 'Tree Sweeper' } //TODO add brownie in the future ] }, { title: 'Visualize', links: [ { href: links.FHTL.pedigreePie, name: 'Pedigree Pie' }, { href: links.FHTL.onePageGenealogy, name: 'One Page Genealogy' }, { href: links.FHTL.familyCalendar, name: 'Family Calendar' } ] }, { title: 'Play', links: [ { href: links.FHTL.geneopardy, name: 'Geneopardy' }, { href: links.FHTL.wheelOfFamilyFortune, name: 'Wheel of Family Fortune' }, { href: links.FHTL.ancestorGames, name: 'Ancestor Games' }, { href: links.FHTL.recordQuest, name: 'Record Quest' } ] } ]; } FooterComponent.prototype.ngOnInit = function () { }; FooterComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-footer', template: __webpack_require__(/*! ./footer.component.html */ "./src/app/footer/footer.component.html"), styles: [__webpack_require__(/*! ./footer.component.scss */ "./src/app/footer/footer.component.scss")] }), __metadata("design:paramtypes", [_link_service__WEBPACK_IMPORTED_MODULE_1__["LinkService"]]) ], FooterComponent); return FooterComponent; }()); /***/ }), /***/ "./src/app/fs.service.ts": /*!*******************************!*\ !*** ./src/app/fs.service.ts ***! \*******************************/ /*! exports provided: FsService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FsService", function() { return FsService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link.service */ "./src/app/link.service.ts"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); /* harmony import */ var _utils_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.service */ "./src/app/utils.service.ts"); /* harmony import */ var _familySearchX_FHTLX__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./familySearchX/FHTLX */ "./src/app/familySearchX/FHTLX.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var FsService = /** @class */ (function () { function FsService(http, link, router, utils) { this.http = http; this.link = link; this.router = router; this.utils = utils; this.isLoggedIn = false; } FsService.prototype.verifyAuthReady = function () { var url = this.link.getAuthRedirect(window.location.origin + "/home"); if (url) { window.location.assign(url); } }; FsService.prototype.isAuthenticated = function () { return this.isLoggedIn; }; FsService.prototype.setLoggedIn = function (fsSession) { this.FhtlX.readyAccessToken(fsSession); this.link.setHomeLoggedIn(); this.isLoggedIn = true; }; FsService.prototype.logIn = function (fstoken) { this.fsSession = this.parseJwt(fstoken); this.initFhtlX(); this.FhtlX.storeSession(this.fsSession); this.setLoggedIn(this.fsSession); }; FsService.prototype.initFhtlX = function () { var initOptions = { environment: 'production', appKey: 'app Key :)', redirectUri: 'Put your redirect uri here if you want', saveAccessToken: true }; this.FhtlX = new _familySearchX_FHTLX__WEBPACK_IMPORTED_MODULE_5__["FHTLX"](initOptions); }; FsService.prototype.checkLoginStatus = function () { this.fsSession = _familySearchX_FHTLX__WEBPACK_IMPORTED_MODULE_5__["FHTLX"].checkAccessToken(); if (!!this.fsSession) { this.initFhtlX(); this.setLoggedIn(this.fsSession); return true; } else { return false; } }; FsService.prototype.logOut = function () { var _this = this; // Clear saved sweep data sessionStorage.removeItem("treesweeper-options"); sessionStorage.removeItem("treesweeper-results"); var loaderRef = this.utils.displayLoader('Logging out...', false); loaderRef.afterClosed().subscribe(function () { return _this.router.navigate(['start']); }); if (!this.FhtlX) { loaderRef.close(); //return this.router.navigate(['start']); } else { return this.FhtlX.logout(function () { _this.FhtlX.deleteSession(); _this.isLoggedIn = false; _this.link.logOut(); loaderRef.close(); //return this.router.navigate(['start']); }); } }; FsService.prototype.parseJwt = function (token) { var base64Url = token.split('.')[1]; var base64 = base64Url.replace('-', '+').replace('_', '/'); return JSON.parse(window.atob(base64)); }; FsService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], _link_service__WEBPACK_IMPORTED_MODULE_2__["LinkService"], _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"], _utils_service__WEBPACK_IMPORTED_MODULE_4__["UtilsService"]]) ], FsService); return FsService; }()); /***/ }), /***/ "./src/app/help/help.component.html": /*!******************************************!*\ !*** ./src/app/help/help.component.html ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n

About Tree Sweeper

\n
\n

Tree Sweeper was designed to help people find and fix all the annoying errors in family trees: people dying before they're born, parents being born after their children, \n and the like. FamilySearch has tools to help with this, but Tree Sweeper is easier and faster to use.\n

\n

Getting Started

\n \n

\n

Once you log in to Tree Sweeper, there are a lot of options you can choose to set. However, by default it's ready to go!
Just click on the \"Start Tree Sweep\" button and\n Tree Sweeper will download your family tree going 3 generations back from you, then will check that data for any of the errors we look for.\n There are many options you can adjust.

\n
    \n
  • Tree Sweeper can check up to 7 generations at a time--the more it checks, the longer it takes. You are generation 0, your parents\n are generation 1, and so on.

  • \n
  • You can also change who Tree Sweeper starts at by selecting \"Someone Else\" for the starting point, then putting in their FamilySearch PID.

    \n
  • \n
  • Next you can change which constraints are checked. A constraint is a rule ( or genealogical standard ), and TreeSweeper checks to see if someone in your family breaks any constraint. By default only constraints that indicate an error are checked,\n but there are different groups you can use that are more specific or even look for research opportunities. You can even choose \"Custom Constraints\" and pick them yourself!

  • \n
\n

When you have the options set to your liking, click \"Start Tree Sweep.\"

\n

Managing Results

\n

Tree Sweeper can give a lot of information, and you might not be interested in all of it. You can filter out types of results you're not interested in by using \"Filter Results\".
\n You can also change the way the information is sorted, or even search for a specific name or FamilySearch PID.

\n

Understanding Results

\n

When Tree Sweeper finds a potential problem, it will add it to the list of results on the page. All of the issues associated with a person are grouped together, and a summary\n is displayed of the types of results Tree Sweeper has found.
\n Tree Sweeper has 4 types of results, indicated by different color flags. They are:\n

\n
    \n
  • Definite Error: Definite Errors are marked with flag. They indicate that something is definitely wrong. In many cases it just means\n that a date was entered wrong, but a lot of the time there is bad data associated with a person.

  • \n
  • Possible Error: Possible Errors are marked with flag. They indicate that something is unlikely, but not\n definitely wrong. In many cases there will be nothing wrong, but this can be a subtle indicator that something is wrong.

  • \n
  • Research Opportunity: Research Opportunities are marked with flag. They indicate a research opportunity. They don't \n indicate an error per se, but can give you somewhere to start with your own family history work.

  • \n
  • Okay Result: Okay Results are marked with flag. Tree Sweeper won't start out with anything marked as Okay, but \n it's pretty common for it to give you results that you know are all right. You can mark these as okay, and undo this decision later on if you want to.

  • \n
\n
\n

That's about it. Thanks for using Tree Sweeper!

\n \n
\n
\n
\n
\n
\n
\"Tree
\n
\n
\n
\n
\n
\n\n \n
\n
\n
\n
\n
Tree Sweeper Tutorial
\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n

{{ getTitle() }}

\n
\n \n

\n

\n
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
" /***/ }), /***/ "./src/app/help/help.component.scss": /*!******************************************!*\ !*** ./src/app/help/help.component.scss ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "/*\n * Make the component fill the whole space.\n */\n:host {\n flex: 1;\n display: block; }\n.mat-card {\n margin: 5px; }\n.impossible-flag {\n color: red; }\n.unlikely-flag {\n color: yellow; }\n.research-flag {\n color: purple; }\n.okay-flag {\n color: green; }\n" /***/ }), /***/ "./src/app/help/help.component.ts": /*!****************************************!*\ !*** ./src/app/help/help.component.ts ***! \****************************************/ /*! exports provided: HelpComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HelpComponent", function() { return HelpComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var HelpComponent = /** @class */ (function () { function HelpComponent(link, router) { this.link = link; this.router = router; } HelpComponent.prototype.ngOnInit = function () { }; HelpComponent.prototype.openTutorial = function () { this.tutorialIndex = 0; $('#exampleModal').modal({}); }; HelpComponent.prototype.getTutorialIndex = function () { return this.tutorialIndex; }; HelpComponent.prototype.setTutorialIndex = function (index) { this.tutorialIndex = index; }; HelpComponent.prototype.getTitle = function () { switch (this.tutorialIndex) { case 0: return "Welcome"; case 1: return "Adjusting Options"; case 2: return "Changing the Starting Point"; case 3: return "Starting a Sweep"; case 4: return "Understanding Flags"; case 5: return "Understanding Results"; case 6: return "Marking Things Okay"; case 7: return "Sorting Results"; case 8: return "Filtering Results"; case 9: return "Contacting Us"; default: return "title"; } }; HelpComponent.prototype.getImage = function () { switch (this.tutorialIndex) { case 0: return "./assets/icons/treesweeper.jpg"; case 1: return "./assets/options.png"; case 2: return "./assets/changing_start.png"; case 3: return "./assets/started.png"; case 4: return "./assets/flags.png"; case 5: return "./assets/results.png"; case 6: return "./assets/okay.png"; case 7: return "./assets/sort.png"; case 8: return "./assets/filter.png"; case 9: return "./assets/contact.png"; default: return "./assets/icons/treesweeper.jpg"; } }; HelpComponent.prototype.getDescription = function () { switch (this.tutorialIndex) { case 0: return "Welcome to Tree Sweeper! This tutorial will show you everything you need to know to get started with Tree Sweeper. Feel free to skip it if you want!"; case 1: return "The two options you'll change the most are the number of generations and the constraint group. The number of generations is how many generations back from your starting point Tree Sweeper will check, and you can choose 1 to 7. The default is 3 generations, but you're more likely to see results if you check 5 or more.

The constraint group is the group of possible problems that Tree Sweeper looks for. Each one has a short description to tell you what kind of problems it's looking for. There's a bunch of them, try out different ones!"; case 2: return "Sometimes you may want to check the family tree of someone else on FamilySearch, not just your own. You can change the option 'Select Starting Point' to 'Someone Else' and enter the FamilySearch PID for the other person. The PID is an id given by FamilySearch and can be found on their FamilySearch page."; case 3: return "Once you're ready to run Tree Sweeper, just click 'Start Tree Sweep.' The progress bar will appear and you'll receive messages telling you what Tree Sweeper is doing. Occasionally you may see a message saying that Tree Sweeper is waiting for Family Search servers; this is normal, and may last up to a minute. It means that FamilySearch is busy and Tree Sweeper's requests for information are being delayed."; case 4: return "When you start seeing results, you will see 4 flag icons. The icons indicate how important something is. In this image, the numbers also indicate how many results with that type of flag have been received so far.
  • A red flag means that something is impossible or unheard of (a Definite Error).
  • A yellow flag means that something is unlikely, but not impossible (a Possible Error).
  • A purple flag means something is a Research Opportunity, not really an error.
  • A green flag means that you have marked something okay (an Okay Result).
"; case 5: return "When you click on a person to see their results, you will see a list of results that can also be clicked on, along with some information about that person. Clicking on one of their results will cause it to expand, like in this image. Each result has a flag, a message describing what might be wrong, and some prompts with information to verify."; case 6: return "It is likely that sometimes you'll get a result that you know isn't a problem. When this happens, you can open that result and click the 'Mark Okay' button. By default, things that you mark okay will be hidden from view. At this time, Tree Sweeper won't remember what you've marked okay after you run another tree sweep."; case 7: return "By default, Tree Sweeper sorts people by generation; that is, the number of generations they are back from you, with your most recent ancestors at the top of the list. However, you can change it to just sort by first name, or by most results."; case 8: return "You can also choose to filter out certain results if you just aren't interested in them. Each result type can be filtered out, with 'Okay' results filtered out by default. Additionally, you can search for someone's name or FamilySearch PID. Their PID is a unique id assigned by FamilySearch and you can find it on their FamilySearch page."; case 9: return "We would love to hear from you! If you have questions, comments, concerns, or suggestions please contact us! You can email us at fhtlab@gmail.com. We really appreciate feedback on how to make this app better!"; default: return ""; } }; HelpComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-help', template: __webpack_require__(/*! ./help.component.html */ "./src/app/help/help.component.html"), styles: [__webpack_require__(/*! ./help.component.scss */ "./src/app/help/help.component.scss")] }), __metadata("design:paramtypes", [_link_service__WEBPACK_IMPORTED_MODULE_1__["LinkService"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]]) ], HelpComponent); return HelpComponent; }()); /***/ }), /***/ "./src/app/home/home.component.html": /*!******************************************!*\ !*** ./src/app/home/home.component.html ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n\n \n
\n" /***/ }), /***/ "./src/app/home/home.component.scss": /*!******************************************!*\ !*** ./src/app/home/home.component.scss ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "/*\n * Make the component fill the whole space.\n */\n:host {\n flex: 1;\n display: block; }\n.test {\n align-content: center;\n padding: 0; }\n.container-fluid {\n padding-right: 5px;\n padding-left: 5px; }\n.row {\n margin-left: 0;\n margin-right: 0; }\n" /***/ }), /***/ "./src/app/home/home.component.ts": /*!****************************************!*\ !*** ./src/app/home/home.component.ts ***! \****************************************/ /*! exports provided: HomeComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HomeComponent", function() { return HomeComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var HomeComponent = /** @class */ (function () { function HomeComponent() { } HomeComponent.prototype.ngOnInit = function () { }; HomeComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-home', template: __webpack_require__(/*! ./home.component.html */ "./src/app/home/home.component.html"), styles: [__webpack_require__(/*! ./home.component.scss */ "./src/app/home/home.component.scss")] }), __metadata("design:paramtypes", []) ], HomeComponent); return HomeComponent; }()); /***/ }), /***/ "./src/app/importOptions.ts": /*!**********************************!*\ !*** ./src/app/importOptions.ts ***! \**********************************/ /*! exports provided: ImportOptions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImportOptions", function() { return ImportOptions; }); /* harmony import */ var _constraintCategory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constraintCategory */ "./src/app/constraintCategory.ts"); var OPTIONS_KEY = "treesweeper-options"; var ImportOptions = /** @class */ (function () { function ImportOptions() { this.numGenerations = -1; this.disabledConstraints = []; this.enabledConstraints = []; this.rootPid = ''; this.token = ''; } ImportOptions.prototype.setDisabledConstraints = function (disabledConstraints) { this.disabledConstraints = disabledConstraints; var enabledConstraints = []; // Load enabled constraints by looking at disabled constraints var constraintCategories = new _constraintCategory__WEBPACK_IMPORTED_MODULE_0__["ConstraintCategory"]("").loadDefaults(); constraintCategories.forEach(function (category) { category.constraints.forEach(function (constraint) { // Check if constraint is disabled var enabled = true; disabledConstraints.forEach(function (constraintName) { if (constraint.containsId(constraintName)) { enabled = false; } }); // If constraint is enabled, add it to enabled constraints if (enabled) enabledConstraints.push(constraint.getId()); }); }); this.enabledConstraints = enabledConstraints; }; ImportOptions.prototype.iWork = function () { console.log("hello world!"); }; ImportOptions.loadFromStorage = function () { if (sessionStorage.getItem(OPTIONS_KEY)) { var temp = JSON.parse(sessionStorage.getItem(OPTIONS_KEY)); var options = new ImportOptions(); return Object.assign(options, temp); } else return null; }; return ImportOptions; }()); /***/ }), /***/ "./src/app/last-sweep-summary/last-sweep-summary.component.html": /*!**********************************************************************!*\ !*** ./src/app/last-sweep-summary/last-sweep-summary.component.html ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n \n \n \n Options Used\n \n
\n
\n

Starting PID: {{dataService?.lastSweepOptions?.rootPid}}

\n

Constraint Group: {{dataService?.lastSweepOptions?.constraintGroup}}

\n

Number of Generations: {{dataService?.lastSweepOptions?.numGenerations}}

\n
\n

\n
\n

Constraints Used:

\n
\n
\n
{{constraint}}
\n
\n
\n
\n \n \n \n Summary of Results\n \n
\n
\n
Total Results: {{dataService?.lastSweepResults?.totalResults}}
\n
Definite Errors: {{dataService?.lastSweepResults?.numImpossible}}
\n
Possible Errors: {{dataService?.lastSweepResults?.numUnlikely}}
\n
Research Opportunities: {{dataService?.lastSweepResults?.numResearch}}
\n
\n \n
\n
\n
" /***/ }), /***/ "./src/app/last-sweep-summary/last-sweep-summary.component.scss": /*!**********************************************************************!*\ !*** ./src/app/last-sweep-summary/last-sweep-summary.component.scss ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/last-sweep-summary/last-sweep-summary.component.ts": /*!********************************************************************!*\ !*** ./src/app/last-sweep-summary/last-sweep-summary.component.ts ***! \********************************************************************/ /*! exports provided: LastSweepSummaryComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LastSweepSummaryComponent", function() { return LastSweepSummaryComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var LastSweepSummaryComponent = /** @class */ (function () { function LastSweepSummaryComponent(dataService) { this.dataService = dataService; } LastSweepSummaryComponent.prototype.ngOnInit = function () { }; LastSweepSummaryComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-last-sweep-summary', template: __webpack_require__(/*! ./last-sweep-summary.component.html */ "./src/app/last-sweep-summary/last-sweep-summary.component.html"), styles: [__webpack_require__(/*! ./last-sweep-summary.component.scss */ "./src/app/last-sweep-summary/last-sweep-summary.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_1__["DataStoreService"]]) ], LastSweepSummaryComponent); return LastSweepSummaryComponent; }()); /***/ }), /***/ "./src/app/link.service.ts": /*!*********************************!*\ !*** ./src/app/link.service.ts ***! \*********************************/ /*! exports provided: LinkService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkService", function() { return LinkService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var LinkService = /** @class */ (function () { function LinkService() { this.FHTL = { auth: 'https://auth.fhtl.org', home: 'https://familytech.byu.edu', contact: 'https://familytech.byu.edu/contact.html', donate: 'https://familytech.byu.edu/donate.html', people: 'https://familytech.byu.edu/people.html', relativeFinder: 'https://www.relativefinder.org', virtualPedigreee: 'http://virtual-pedigree.familytech.byu.edu', descendancyExplorer: 'http://descend.familytech.byu.edu', treeSweeper: 'https://treesweeper.familytech.byu.edu', brownie: 'https://familytech.byu.edu/apps/brownie.html', pedigreePie: 'http://pedigree-pie.familytech.byu.edu', onePageGenealogy: 'http://opg.familytech.byu.edu', familyCalendar: 'https://calendar.familytech.byu.edu', geneopardy: 'https://geneopardy.familytech.byu.edu', wheelOfFamilyFortune: 'https://wheel.familytech.byu.edu', ancestorGames: 'https://ancestorgames.familytech.byu.edu', recordQuest: 'https://recordquest.familytech.byu.edu', }; this.FS = 'https://www.familysearch.org/'; this.APP_NAME = 'Tree Sweeper'; this.home = 'start'; this.mainMenu = [ { name: 'Home', href: '/home', icon: 'home' }, { name: 'Help', href: '/help', icon: 'help' }, { name: 'Contact', href: '/contact', icon: 'contact_mail' }, ]; } LinkService.prototype.getHome = function () { return this.home; }; LinkService.prototype.setHomeLoggedIn = function () { this.home = 'home'; this.mainMenu.push({ name: 'Logout', href: 'logout', icon: 'supervised_user' }); }; LinkService.prototype.logOut = function () { this.mainMenu.pop(); this.home = 'start'; }; /** * * @param redirect the url to return to upon signing in. Defaults to the current url */ LinkService.prototype.getAuthRedirect = function (redirect) { if (redirect === void 0) { redirect = window.location.href; } return this.FHTL.auth + "?redirect=" + redirect; }; LinkService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", []) ], LinkService); return LinkService; }()); /***/ }), /***/ "./src/app/loader/loader.component.html": /*!**********************************************!*\ !*** ./src/app/loader/loader.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n \n \n \n \n \n

{{data.message}}

\n
\n
\n
\n" /***/ }), /***/ "./src/app/loader/loader.component.scss": /*!**********************************************!*\ !*** ./src/app/loader/loader.component.scss ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".message {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 0.9rem;\n font-weight: bold; }\n" /***/ }), /***/ "./src/app/loader/loader.component.ts": /*!********************************************!*\ !*** ./src/app/loader/loader.component.ts ***! \********************************************/ /*! exports provided: LoaderComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoaderComponent", function() { return LoaderComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; var LoaderComponent = /** @class */ (function () { function LoaderComponent(data) { this.data = data; } LoaderComponent.prototype.ngOnInit = function () { }; LoaderComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-loader', template: __webpack_require__(/*! ./loader.component.html */ "./src/app/loader/loader.component.html"), styles: [__webpack_require__(/*! ./loader.component.scss */ "./src/app/loader/loader.component.scss")] }), __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_angular_material__WEBPACK_IMPORTED_MODULE_1__["MAT_DIALOG_DATA"])), __metadata("design:paramtypes", [Object]) ], LoaderComponent); return LoaderComponent; }()); /***/ }), /***/ "./src/app/loading-indicator/loading-indicator.component.html": /*!********************************************************************!*\ !*** ./src/app/loading-indicator/loading-indicator.component.html ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n

Loading...

\n \n
\n

{{dataService?.message}}

\n

Waiting for Family Search servers...

\n
\n
" /***/ }), /***/ "./src/app/loading-indicator/loading-indicator.component.scss": /*!********************************************************************!*\ !*** ./src/app/loading-indicator/loading-indicator.component.scss ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/loading-indicator/loading-indicator.component.ts": /*!******************************************************************!*\ !*** ./src/app/loading-indicator/loading-indicator.component.ts ***! \******************************************************************/ /*! exports provided: LoadingIndicatorComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return LoadingIndicatorComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var LoadingIndicatorComponent = /** @class */ (function () { function LoadingIndicatorComponent(dataService) { this.dataService = dataService; } LoadingIndicatorComponent.prototype.ngOnInit = function () { }; LoadingIndicatorComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-loading-indicator', template: __webpack_require__(/*! ./loading-indicator.component.html */ "./src/app/loading-indicator/loading-indicator.component.html"), styles: [__webpack_require__(/*! ./loading-indicator.component.scss */ "./src/app/loading-indicator/loading-indicator.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_1__["DataStoreService"]]) ], LoadingIndicatorComponent); return LoadingIndicatorComponent; }()); /***/ }), /***/ "./src/app/logout/logout.component.html": /*!**********************************************!*\ !*** ./src/app/logout/logout.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n" /***/ }), /***/ "./src/app/logout/logout.component.scss": /*!**********************************************!*\ !*** ./src/app/logout/logout.component.scss ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/logout/logout.component.ts": /*!********************************************!*\ !*** ./src/app/logout/logout.component.ts ***! \********************************************/ /*! exports provided: LogoutComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogoutComponent", function() { return LogoutComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var LogoutComponent = /** @class */ (function () { function LogoutComponent(fsService) { this.fsService = fsService; this.fsService.logOut(); } LogoutComponent.prototype.ngOnInit = function () { }; LogoutComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-logout', template: __webpack_require__(/*! ./logout.component.html */ "./src/app/logout/logout.component.html"), styles: [__webpack_require__(/*! ./logout.component.scss */ "./src/app/logout/logout.component.scss")] }), __metadata("design:paramtypes", [_fs_service__WEBPACK_IMPORTED_MODULE_1__["FsService"]]) ], LogoutComponent); return LogoutComponent; }()); /***/ }), /***/ "./src/app/material.module.ts": /*!************************************!*\ !*** ./src/app/material.module.ts ***! \************************************/ /*! exports provided: MaterialModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaterialModule", function() { return MaterialModule; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js"); /* harmony import */ var _angular_material_radio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/radio */ "./node_modules/@angular/material/esm5/radio.es5.js"); /* harmony import */ var _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/slide-toggle */ "./node_modules/@angular/material/esm5/slide-toggle.es5.js"); /* harmony import */ var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/tooltip */ "./node_modules/@angular/material/esm5/tooltip.es5.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var MaterialModule = /** @class */ (function () { function MaterialModule() { } MaterialModule = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({ imports: [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatButtonModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatToolbarModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatInputModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatProgressSpinnerModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatCardModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatIconModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatSidenavModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatMenuModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatDialogModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatGridListModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatListModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatSelectModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatExpansionModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatCheckboxModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatProgressBarModule"], _angular_material_radio__WEBPACK_IMPORTED_MODULE_2__["MatRadioModule"], _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_3__["MatSlideToggleModule"], _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_4__["MatTooltipModule"]], exports: [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatButtonModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatToolbarModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatInputModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatProgressSpinnerModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatCardModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatIconModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatSidenavModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatMenuModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatDialogModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatGridListModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatListModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatSelectModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatExpansionModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatCheckboxModule"], _angular_material__WEBPACK_IMPORTED_MODULE_1__["MatProgressBarModule"], _angular_material_radio__WEBPACK_IMPORTED_MODULE_2__["MatRadioModule"], _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_3__["MatSlideToggleModule"], _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_4__["MatTooltipModule"]], }) ], MaterialModule); return MaterialModule; }()); /***/ }), /***/ "./src/app/navbar/navbar.component.html": /*!**********************************************!*\ !*** ./src/app/navbar/navbar.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n \n \n\n \n \n \n \n {{option.name}}\n \n {{option.name}}\n \n \n \n\n \n \n {{option.name}}\n \n \n \n \n \n" /***/ }), /***/ "./src/app/navbar/navbar.component.scss": /*!**********************************************!*\ !*** ./src/app/navbar/navbar.component.scss ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".header-icon {\n vertical-align: text-bottom !important; }\n\n.home-button {\n font-size: 20px; }\n\n.header-spacer {\n flex: 1 1 auto; }\n\n.menu-compact {\n display: none; }\n\n.menu-compact-button {\n display: block;\n width: 100%;\n color: white; }\n\n@media screen and (max-width: 600px) {\n .menu-standard {\n display: none; }\n .menu-compact {\n display: inline; } }\n\n.mat-button:hover {\n color: white;\n text-decoration: none; }\n" /***/ }), /***/ "./src/app/navbar/navbar.component.ts": /*!********************************************!*\ !*** ./src/app/navbar/navbar.component.ts ***! \********************************************/ /*! exports provided: NavbarComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarComponent", function() { return NavbarComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts"); /* harmony import */ var _angular_material_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/icon */ "./node_modules/@angular/material/esm5/icon.es5.js"); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var NavbarComponent = /** @class */ (function () { function NavbarComponent(fsService, router, link, matIconRegistry, domSanitizer) { this.fsService = fsService; this.router = router; this.link = link; this.matIconRegistry = matIconRegistry; this.domSanitizer = domSanitizer; this.title = link.APP_NAME; //Set the title for the page this.matIconRegistry.addSvgIcon("tree_sweeper_logo", this.domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/treesweeper.svg")); } NavbarComponent.prototype.ngOnInit = function () { // If the user is just barely logging in, don't display the help hint. if (!sessionStorage.getItem('hintStatus')) sessionStorage.setItem('hintStatus', 'noHint'); var loggedIn = this.fsService.checkLoginStatus(); // initialize popover $(document).ready(function () { $('[data-toggle="popover"]').popover(); $(document).on('click', function () { $('[data-toggle="popover"]').popover('hide'); }); // Display tutorial hint, if it hasn't already been seen this session // To make this work, the hint status is set to showHint in the doLogin() method of StartComponent. Bad design, I know, but I couldn't think of another workaround. if (sessionStorage.getItem("hintStatus") === 'showHint') { sessionStorage.setItem("hintStatus", "viewed"); $('[data-toggle="popover"]').popover('show'); } }); }; NavbarComponent.prototype.goHome = function () { this.router.navigate([this.link.getHome()]); }; NavbarComponent.prototype.goToRoute = function (link) { console.log('routing!'); if (link.includes('http')) { window.open(link, '_blank'); } else if (link === 'home') { this.goHome(); } else { this.router.navigate([link]); } }; NavbarComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-navbar', template: __webpack_require__(/*! ./navbar.component.html */ "./src/app/navbar/navbar.component.html"), styles: [__webpack_require__(/*! ./navbar.component.scss */ "./src/app/navbar/navbar.component.scss")] }), __metadata("design:paramtypes", [_fs_service__WEBPACK_IMPORTED_MODULE_3__["FsService"], _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"], _link_service__WEBPACK_IMPORTED_MODULE_2__["LinkService"], _angular_material_icon__WEBPACK_IMPORTED_MODULE_4__["MatIconRegistry"], _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__["DomSanitizer"]]) ], NavbarComponent); return NavbarComponent; }()); /***/ }), /***/ "./src/app/pdf-service.service.ts": /*!****************************************!*\ !*** ./src/app/pdf-service.service.ts ***! \****************************************/ /*! exports provided: PdfServiceService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PdfServiceService", function() { return PdfServiceService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var pdfmake_build_pdfmake__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! pdfmake/build/pdfmake */ "./node_modules/pdfmake/build/pdfmake.js"); /* harmony import */ var pdfmake_build_pdfmake__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(pdfmake_build_pdfmake__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var pdfmake_build_vfs_fonts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! pdfmake/build/vfs_fonts */ "./node_modules/pdfmake/build/vfs_fonts.js"); /* harmony import */ var pdfmake_build_vfs_fonts__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(pdfmake_build_vfs_fonts__WEBPACK_IMPORTED_MODULE_2__); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var PdfServiceService = /** @class */ (function () { function PdfServiceService() { pdfmake_build_pdfmake__WEBPACK_IMPORTED_MODULE_1__["vfs"] = pdfmake_build_vfs_fonts__WEBPACK_IMPORTED_MODULE_2__["pdfMake"].vfs; } PdfServiceService.prototype.printResults = function (results, filter, importOptions) { var docDefinition = { content: [], styles: {} }; // Make title var title = { text: "Tree Sweeper Results\n\n", style: "title", }; docDefinition.content.push(title); // Display the options the tree sweep used var optionsHeader = { text: "Options Used\n\n", style: "header" }; docDefinition.content.push(optionsHeader); var options = { alignment: "center", style: "content", columns: [ { text: "Starting PID: " + importOptions.rootPid }, { text: "Constraint Group: " + importOptions.constraintGroup }, { text: "Number of Generations: " + importOptions.numGenerations } ] }; docDefinition.content.push(options); // Display the constraints that were used var constraintHeader = { text: "\nConstraints Used\n\n", style: "header" }; docDefinition.content.push(constraintHeader); var constraints = { alignment: "center", style: "content", columns: [] }; var constraintsPerColumn = Math.floor(importOptions.enabledConstraints.length / 3); // Build first column var text = ""; for (var i = 0; i < constraintsPerColumn; i++) { text += importOptions.enabledConstraints[i] + "\n\n"; } constraints.columns.push({ text: text, width: "auto" }); // Build second column text = ""; for (var i = constraintsPerColumn; i < constraintsPerColumn * 2; i++) { text += importOptions.enabledConstraints[i] + "\n\n"; } constraints.columns.push({ text: text, width: "auto" }); // Build third column text = ""; for (var i = constraintsPerColumn * 2; i < importOptions.enabledConstraints.length; i++) { text += importOptions.enabledConstraints[i] + "\n\n"; } constraints.columns.push({ text: text, width: "auto" }); docDefinition.content.push(constraints); // Display results var resultsHeader = { text: "\nResults\n\n", style: "header" }; docDefinition.content.push(resultsHeader); // Display key docDefinition.content.push({ text: "Key:\n", italics: true, margin: [20, 0] }); var table = { table: { body: [ [{ text: "Code", bold: true }, "I", "U", "R", "O"], [{ text: "Result Type", bold: true }, "Impossible", "Unlikely", "Research", "Okay"] ] }, margin: [20, 0] }; docDefinition.content.push(table); docDefinition.content.push("\n\n"); for (var i = 0; i < results.length; ++i) { // Start results for person var person = results[i]; var personHeader = { alignment: "left", columns: [ { text: person.getName(), style: "subheader" }, { text: "PID: " + person.getPid(), style: "content", italics: true }, { text: "Generation: " + person.getGeneration(), style: "content", italics: true } ] }; docDefinition.content.push(personHeader); // Print out results for the person if (filter.displayImpossible) { var flagged = person.impossible; docDefinition = this.addResults(flagged, docDefinition); } if (filter.displayUnlikely) { var flagged = person.unlikely; docDefinition = this.addResults(flagged, docDefinition); } if (filter.displayResearch) { var flagged = person.research; docDefinition = this.addResults(flagged, docDefinition); } if (filter.displayOkay) { var flagged = person.okay; docDefinition = this.addResults(flagged, docDefinition); } // Add space before the next person docDefinition.content.push("\n"); } // Define styles var styles = { title: { fontSize: 18, bold: true, alignment: "center" }, header: { fontSize: 15, bold: true, alignment: "left" }, subheader: { fontsize: 12, bold: true }, content: { fontSize: 12, bold: false } }; docDefinition.styles = styles; pdfmake_build_pdfmake__WEBPACK_IMPORTED_MODULE_1__["createPdf"](docDefinition).download("treesweeper.pdf"); }; PdfServiceService.prototype.addResults = function (flagged, docDefinition) { // For each result in the list... for (var i = 0; i < flagged.length; ++i) { var target = flagged[i]; // Generate a header with the type of result and message var resultHeader = { text: [ { text: this.generatePrefix(target) + ": ", bold: true }, target.message ], style: "content", margin: [20, 0] }; docDefinition.content.push(resultHeader); // Generate a list of fixes var fixList = { ul: [], margin: [40, 0] }; for (var j = 0; j < target.fixes.length; j++) fixList.ul.push(target.fixes[j]); docDefinition.content.push(fixList); } return docDefinition; }; PdfServiceService.prototype.generatePrefix = function (result) { if (result.okay) return "O"; switch (result.type) { case "IMPOSSIBLE": return "I"; case "UNLIKELY": return "U"; case "RESEARCH": return "R"; default: return "M"; } }; PdfServiceService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", []) ], PdfServiceService); return PdfServiceService; }()); /***/ }), /***/ "./src/app/person-results/person-results.component.html": /*!**************************************************************!*\ !*** ./src/app/person-results/person-results.component.html ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n \n \n {{person?.name}}\n \n
flag {{person?.impossible.length}}
\n
flag {{person?.unlikely.length}}
\n
flag {{person?.research.length}}
\n
flag {{person?.okay.length}}
\n
\n
\n \n
\n
\n

FamilySearch PID: {{person?.pid}}

\n

Generation: {{person?.generation}}

\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
" /***/ }), /***/ "./src/app/person-results/person-results.component.scss": /*!**************************************************************!*\ !*** ./src/app/person-results/person-results.component.scss ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".impossible-flag {\n color: red; }\n\n.unlikely-flag {\n color: yellow; }\n\n.research-flag {\n color: purple; }\n\n.okay-flag {\n color: green; }\n\n.mat-expansion-panel-header {\n padding: 15px 24px; }\n\n.mat-expansion-panel-header-title,\n.mat-expansion-panel-header-description {\n flex-basis: 0; }\n\n.hider {\n position: inherit;\n display: inherit; }\n\n.myHeader {\n height: auto !important; }\n" /***/ }), /***/ "./src/app/person-results/person-results.component.ts": /*!************************************************************!*\ !*** ./src/app/person-results/person-results.component.ts ***! \************************************************************/ /*! exports provided: PersonResultsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PersonResultsComponent", function() { return PersonResultsComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../personResults */ "./src/app/personResults.ts"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var PersonResultsComponent = /** @class */ (function () { function PersonResultsComponent(dataService) { this.dataService = dataService; } PersonResultsComponent.prototype.ngOnInit = function () { }; PersonResultsComponent.prototype.setRootPerson = function (pid) { this.dataService.useCurrentUser = false; this.dataService.rootType = "Someone Else"; this.dataService.rootPid = pid; }; PersonResultsComponent.prototype.openFamilySearch = function (pid) { window.open("https://familysearch.org/ark:/61903/4:1:" + pid + "?context=detail", "_blank"); }; __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", _personResults__WEBPACK_IMPORTED_MODULE_1__["PersonResults"]) ], PersonResultsComponent.prototype, "person", void 0); PersonResultsComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-person-results', template: __webpack_require__(/*! ./person-results.component.html */ "./src/app/person-results/person-results.component.html"), styles: [__webpack_require__(/*! ./person-results.component.scss */ "./src/app/person-results/person-results.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_2__["DataStoreService"]]) ], PersonResultsComponent); return PersonResultsComponent; }()); /***/ }), /***/ "./src/app/personResults.ts": /*!**********************************!*\ !*** ./src/app/personResults.ts ***! \**********************************/ /*! exports provided: PersonResults */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PersonResults", function() { return PersonResults; }); var PersonResults = /** @class */ (function () { function PersonResults(name, pid, generation) { this.name = name; this.pid = pid; this.generation = generation; this.impossible = []; this.unlikely = []; this.research = []; this.okay = []; } PersonResults.prototype.addResult = function (result) { if (result.okay) this.okay.push(result); else if (this.getList(result.type) !== null) this.getList(result.type).push(result); }; PersonResults.prototype.toggleOkay = function (result) { // Remove from current list var list; if (result.okay) list = this.okay; else list = this.getList(result.type); if (list !== null) { for (var i = 0; i < list.length; ++i) { if (list[i].id === result.id) { list.splice(i, 1); } } } // Toggle okay result.okay = !result.okay; // Add to correct list this.addResult(result); }; PersonResults.prototype.getList = function (type) { switch (type) { case "IMPOSSIBLE": return this.impossible; case "UNLIKELY": return this.unlikely; case "RESEARCH": return this.research; default: return null; } }; // Determines if the results matches a given string via name or pid. Will return true if the string to check against is undefined, null, or empty. PersonResults.prototype.matches = function (value) { if (value === undefined || value === null || value.trim().length === 0) return true; else { value = value.trim(); return (this.name.includes(value) || this.pid.includes(value)); } }; PersonResults.prototype.getPid = function () { return this.pid; }; PersonResults.prototype.getName = function () { return this.name; }; PersonResults.prototype.getGeneration = function () { return this.generation; }; PersonResults.prototype.totalResults = function (filter) { var total = 0; if (filter.displayImpossible) total += this.impossible.length; if (filter.displayUnlikely) total += this.unlikely.length; if (filter.displayResearch) total += this.research.length; if (filter.displayOkay) total += this.okay.length; return total; }; return PersonResults; }()); /***/ }), /***/ "./src/app/result-component/result-component.component.html": /*!******************************************************************!*\ !*** ./src/app/result-component/result-component.component.html ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n \n flag {{result?.message}}\n \n \n help_outline{{fix}}\n \n
\n \n \n label_importantProbability: {{ prettyProbability(result.probability) }}\n \n \n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
" /***/ }), /***/ "./src/app/result-component/result-component.component.scss": /*!******************************************************************!*\ !*** ./src/app/result-component/result-component.component.scss ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".yellow {\n color: yellow; }\n\n.mat-action-row {\n justify-content: space-between; }\n\n.mat-expansion-panel-header {\n padding: 10px; }\n\n.mat-list-item {\n height: auto;\n padding: 10px; }\n\n.myHeader {\n height: auto !important; }\n" /***/ }), /***/ "./src/app/result-component/result-component.component.ts": /*!****************************************************************!*\ !*** ./src/app/result-component/result-component.component.ts ***! \****************************************************************/ /*! exports provided: ResultComponentComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultComponentComponent", function() { return ResultComponentComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../flaggedResult */ "./src/app/flaggedResult.ts"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); /* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../personResults */ "./src/app/personResults.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var ResultComponentComponent = /** @class */ (function () { function ResultComponentComponent(dataService) { this.dataService = dataService; this.result = null; this.type = ''; this.person = null; this.displayProbability = false; } ResultComponentComponent.prototype.ngOnInit = function () { }; ResultComponentComponent.prototype.toggleOkay = function (person, result) { person.toggleOkay(result); this.dataService.dataChanged(); }; ResultComponentComponent.prototype.flagColor = function () { switch (this.type) { case "IMPOSSIBLE": return "red"; case "UNLIKELY": return "yellow"; case "RESEARCH": return "purple"; case "OKAY": return "green"; default: return "blue"; } }; ResultComponentComponent.prototype.tooltipText = function (result) { switch (this.type) { case "IMPOSSIBLE": return "This is impossible."; case "UNLIKELY": return "This is unlikely; the probability is " + this.prettyProbability(result.probability); case "RESEARCH": return "This could use more research."; case "OKAY": return "This has been marked OK."; default: return ""; } }; ResultComponentComponent.prototype.prettyProbability = function (probability) { var percent = probability * 100; return percent.toFixed(4) + "%"; }; ResultComponentComponent.prototype.probabilityButtonText = function () { if (this.displayProbability) return "Hide Probability"; else return "Show Probability"; }; ResultComponentComponent.prototype.probabilityButtonIcon = function () { if (this.displayProbability) return "visibility_off"; else return "visibility"; }; ResultComponentComponent.prototype.okayButtonIcon = function () { if (this.type === "OKAY") return "cancel"; else return "check_circle_outline"; }; ResultComponentComponent.prototype.okayButtonText = function () { if (this.type === "OKAY") return "Mark Not OK"; else return "Mark OK"; }; __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", _flaggedResult__WEBPACK_IMPORTED_MODULE_1__["FlaggedResult"]) ], ResultComponentComponent.prototype, "result", void 0); __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", String) ], ResultComponentComponent.prototype, "type", void 0); __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", _personResults__WEBPACK_IMPORTED_MODULE_3__["PersonResults"]) ], ResultComponentComponent.prototype, "person", void 0); ResultComponentComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-result-component', template: __webpack_require__(/*! ./result-component.component.html */ "./src/app/result-component/result-component.component.html"), styles: [__webpack_require__(/*! ./result-component.component.scss */ "./src/app/result-component/result-component.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_2__["DataStoreService"]]) ], ResultComponentComponent); return ResultComponentComponent; }()); /***/ }), /***/ "./src/app/result-list/result-list.component.html": /*!********************************************************!*\ !*** ./src/app/result-list/result-list.component.html ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/result-list/result-list.component.scss": /*!********************************************************!*\ !*** ./src/app/result-list/result-list.component.scss ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".impossible-flag {\n color: red; }\n\n.unlikely-flag {\n color: yellow; }\n\n.research-flag {\n color: purple; }\n\n.okay-flag {\n color: green; }\n" /***/ }), /***/ "./src/app/result-list/result-list.component.ts": /*!******************************************************!*\ !*** ./src/app/result-list/result-list.component.ts ***! \******************************************************/ /*! exports provided: ResultListComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultListComponent", function() { return ResultListComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../personResults */ "./src/app/personResults.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var ResultListComponent = /** @class */ (function () { function ResultListComponent() { } ResultListComponent.prototype.ngOnInit = function () { }; __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", String) ], ResultListComponent.prototype, "type", void 0); __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", Array) ], ResultListComponent.prototype, "results", void 0); __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(), __metadata("design:type", _personResults__WEBPACK_IMPORTED_MODULE_1__["PersonResults"]) ], ResultListComponent.prototype, "person", void 0); ResultListComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-result-list', template: __webpack_require__(/*! ./result-list.component.html */ "./src/app/result-list/result-list.component.html"), styles: [__webpack_require__(/*! ./result-list.component.scss */ "./src/app/result-list/result-list.component.scss")] }), __metadata("design:paramtypes", []) ], ResultListComponent); return ResultListComponent; }()); /***/ }), /***/ "./src/app/serializer.service.ts": /*!***************************************!*\ !*** ./src/app/serializer.service.ts ***! \***************************************/ /*! exports provided: SerializerService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SerializerService", function() { return SerializerService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flaggedResult */ "./src/app/flaggedResult.ts"); /* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./personResults */ "./src/app/personResults.ts"); /* harmony import */ var _checkerResults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./checkerResults */ "./src/app/checkerResults.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var SerializerService = /** @class */ (function () { function SerializerService() { } SerializerService.prototype.deserializeFlaggedResult = function (model) { var temp = new _flaggedResult__WEBPACK_IMPORTED_MODULE_1__["FlaggedResult"](); return Object.assign(temp, model); }; SerializerService.prototype.deserializePersonResults = function (model) { var temp = new _personResults__WEBPACK_IMPORTED_MODULE_2__["PersonResults"](model.name, model.pid, model.generation); // Deserialize flagged results for (var i = 0; i < model["impossible"].length; ++i) { var element = model["impossible"][i]; var result = this.deserializeFlaggedResult(element); temp.impossible.push(result); } for (var i = 0; i < model["unlikely"].length; ++i) { var element = model["unlikely"][i]; var result = this.deserializeFlaggedResult(element); temp.unlikely.push(result); } for (var i = 0; i < model["research"].length; ++i) { var element = model["research"][i]; var result = this.deserializeFlaggedResult(element); temp.research.push(result); } for (var i = 0; i < model["okay"].length; ++i) { var element = model["okay"][i]; var result = this.deserializeFlaggedResult(element); temp.okay.push(result); } return temp; }; SerializerService.prototype.deserializeCheckerResults = function (json) { var temp = JSON.parse(json); var target = new _checkerResults__WEBPACK_IMPORTED_MODULE_3__["CheckerResults"](); target.setTotal(temp.totalResults); target.numImpossible = temp.numImpossible; target.numUnlikely = temp.numUnlikely; target.numResearch = temp.numResearch; // Get all person results for (var pid in temp.rawResults) { if (temp.rawResults.hasOwnProperty(pid)) { var person = this.deserializePersonResults(temp.rawResults[pid]); target.setPerson(person); } } return target; }; SerializerService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", []) ], SerializerService); return SerializerService; }()); /***/ }), /***/ "./src/app/session-expired/session-expired.component.html": /*!****************************************************************!*\ !*** ./src/app/session-expired/session-expired.component.html ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "

\n session-expired works!\n

\n" /***/ }), /***/ "./src/app/session-expired/session-expired.component.scss": /*!****************************************************************!*\ !*** ./src/app/session-expired/session-expired.component.scss ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/session-expired/session-expired.component.ts": /*!**************************************************************!*\ !*** ./src/app/session-expired/session-expired.component.ts ***! \**************************************************************/ /*! exports provided: SessionExpiredComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SessionExpiredComponent", function() { return SessionExpiredComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var SessionExpiredComponent = /** @class */ (function () { function SessionExpiredComponent() { } SessionExpiredComponent.prototype.ngOnInit = function () { }; SessionExpiredComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-session-expired', template: __webpack_require__(/*! ./session-expired.component.html */ "./src/app/session-expired/session-expired.component.html"), styles: [__webpack_require__(/*! ./session-expired.component.scss */ "./src/app/session-expired/session-expired.component.scss")] }), __metadata("design:paramtypes", []) ], SessionExpiredComponent); return SessionExpiredComponent; }()); /***/ }), /***/ "./src/app/socket.ts": /*!***************************!*\ !*** ./src/app/socket.ts ***! \***************************/ /*! exports provided: TreeSweepSocket */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeSweepSocket", function() { return TreeSweepSocket; }); /* harmony import */ var _updates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./updates */ "./src/app/updates.ts"); var TreeSweepSocket = /** @class */ (function () { function TreeSweepSocket(url, status, options, dataService) { // Open the connection var socket = new WebSocket(url); this.socket = socket; // Define behavior for different events socket.onopen = function () { socket.send(JSON.stringify(options, null, 2)); keepAlive(); }; socket.onmessage = function (message) { // First, figure out what type of message this is try { var input = JSON.parse(message.data); try { var update = _updates__WEBPACK_IMPORTED_MODULE_0__["Update"].typeOfUpdate(input); dataService.handleUpdate(update); } catch (err) { // Something went wrong while deserializing and classifying the object console.error(err); } } catch (err) { // Not an object console.log(message.data); } }; socket.onclose = function () { status.loading = false; cancelKeepAlive(); dataService.saveSweep(); }; socket.onerror = function (error) { status.loading = false; console.error(error.type); cancelKeepAlive(); dataService.saveSweep(); }; // These functions are necessary for keeping the socket open var timerId; var keepAlive = function () { var timeout = 5000; if (socket.readyState === socket.OPEN) socket.send(""); timerId = setTimeout(keepAlive, timeout); }; var cancelKeepAlive = function () { if (timerId) clearTimeout(timerId); }; } TreeSweepSocket.prototype.kill = function () { if (this.socket) this.socket.close(); }; return TreeSweepSocket; }()); /***/ }), /***/ "./src/app/sorter.ts": /*!***************************!*\ !*** ./src/app/sorter.ts ***! \***************************/ /*! exports provided: Sorter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sorter", function() { return Sorter; }); var Sorter = /** @class */ (function () { function Sorter(filter) { this.sortMethod = "generation"; this.filter = filter; } Sorter.prototype.getMethod = function () { return this.sortMethod; }; Sorter.prototype.sortBy = function (type) { this.sortMethod = type; }; Sorter.prototype.sort = function (input) { switch (this.sortMethod) { case "name": return this.sortByName(input); case "results": return this.sortByResults(input); case "generation": return this.sortByGeneration(input); default: return input; } }; Sorter.prototype.sortByName = function (input) { return input.sort(function (a, b) { if (a.getName() < b.getName()) return -1; else if (a.getName() === b.getName()) return 0; else return 1; }); }; Sorter.prototype.sortByResults = function (input) { var fil = this.filter; return input.sort(function (a, b) { var value = b.totalResults(fil) - a.totalResults(fil); if (value !== 0) return value; else { // If number of results is the same, sort by name. if (a.getName() < b.getName()) return -1; else if (a.getName() === b.getName()) return 0; else return 1; } }); }; Sorter.prototype.sortByGeneration = function (input) { return input.sort(function (a, b) { var value = a.getGeneration() - b.getGeneration(); if (value !== 0) return value; else { // If generation is the same, sort by name. if (a.getName() < b.getName()) return -1; else if (a.getName() === b.getName()) return 0; else return 1; } }); }; return Sorter; }()); /***/ }), /***/ "./src/app/start/start.component.html": /*!********************************************!*\ !*** ./src/app/start/start.component.html ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n
\n

Welcome to {{link.APP_NAME}}!

\n

{{appDescription}}

\n
\n
\n \n
\n\n
\n\n
\n \n
\n
\n " /***/ }), /***/ "./src/app/start/start.component.scss": /*!********************************************!*\ !*** ./src/app/start/start.component.scss ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".welcome-card {\n font-family: Arial, Helvetica, sans-serif;\n font-weight: lighter; }\n\n.welcome-title {\n font-weight: lighter; }\n\n.app-description {\n max-width: 80%;\n display: block;\n margin: auto; }\n\n.partner-section {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 30px; }\n\n.partner-logo {\n width: 120px;\n text-align: center;\n padding: 0px 20px; }\n\n.login-button {\n width: 250px;\n max-width: 100%; }\n\n.button-border {\n padding: 30px; }\n\n@media screen and (min-width: 1100px) {\n .welcome-card {\n max-width: 1000px;\n margin: 20px auto; } }\n" /***/ }), /***/ "./src/app/start/start.component.ts": /*!******************************************!*\ !*** ./src/app/start/start.component.ts ***! \******************************************/ /*! exports provided: StartComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StartComponent", function() { return StartComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _utils_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.service */ "./src/app/utils.service.ts"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts"); /* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var StartComponent = /** @class */ (function () { function StartComponent(utilsService, fsService, link) { this.utilsService = utilsService; this.fsService = fsService; this.link = link; this.appDescription = "Have you ever been looking at your family tree and found someone who died before they were born? Have you ever wished someone would fix all those annoying mistakes people make? Tree Sweeper will help you find the errors that have been put into your family tree so you can sweep them away!"; this.partnerLogos = [ '../../assets/icons/cs-logo.png', '../../assets/icons/fhtl.png', ]; } StartComponent.prototype.ngOnInit = function () { }; StartComponent.prototype.doLogin = function () { this.fsService.verifyAuthReady(); }; StartComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-start', template: __webpack_require__(/*! ./start.component.html */ "./src/app/start/start.component.html"), styles: [__webpack_require__(/*! ./start.component.scss */ "./src/app/start/start.component.scss")] }), __metadata("design:paramtypes", [_utils_service__WEBPACK_IMPORTED_MODULE_1__["UtilsService"], _fs_service__WEBPACK_IMPORTED_MODULE_2__["FsService"], _link_service__WEBPACK_IMPORTED_MODULE_3__["LinkService"]]) ], StartComponent); return StartComponent; }()); /***/ }), /***/ "./src/app/status.ts": /*!***************************!*\ !*** ./src/app/status.ts ***! \***************************/ /*! exports provided: Status */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Status", function() { return Status; }); var Status = /** @class */ (function () { function Status(target) { this.loading = false; this.mode = "determinate"; this.buffer = 0; this.target = target; this.value = 0; this.buffer = 0; } Status.prototype.setValue = function (value) { this.value = value; }; Status.prototype.setTarget = function (value) { this.target = value; }; Status.prototype.getProgress = function () { return (this.value / this.target) * 100; }; return Status; }()); /***/ }), /***/ "./src/app/sweep-options/sweep-options.component.html": /*!************************************************************!*\ !*** ./src/app/sweep-options/sweep-options.component.html ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n Options\n \n \n \n\n \n \n \n \n \n \n {{number}}\n \n \n\n \n \n \n Current User\n Someone Else\n \n \n \n \n \n \n \n\n \n \n \n Check Everything\n Research Opportunities Only\n Possible Errors Only\n Definite Errors Only\n Custom Constraints\n \n \n\n \n

{{getDescription()}}

\n\n \n \n \n \n {{category.name}}\n \n
\n {{constraint.getId()}}\n
\n
\n
\n
\n
\n\n\n
\n
\n\n" /***/ }), /***/ "./src/app/sweep-options/sweep-options.component.scss": /*!************************************************************!*\ !*** ./src/app/sweep-options/sweep-options.component.scss ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".mat-card {\n margin: 5px;\n margin-left: 0; }\n\n.mat-form-field {\n width: 100%; }\n\np {\n text-align: left; }\n\n.mat-spinner {\n margin: 0 auto; }\n\n.mat-checkbox-label {\n white-space: normal; }\n" /***/ }), /***/ "./src/app/sweep-options/sweep-options.component.ts": /*!**********************************************************!*\ !*** ./src/app/sweep-options/sweep-options.component.ts ***! \**********************************************************/ /*! exports provided: SweepOptionsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SweepOptionsComponent", function() { return SweepOptionsComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _constraintCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constraintCategory */ "./src/app/constraintCategory.ts"); /* harmony import */ var _importOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../importOptions */ "./src/app/importOptions.ts"); /* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var SweepOptionsComponent = /** @class */ (function () { function SweepOptionsComponent(fsService, dataService) { this.fsService = fsService; this.dataService = dataService; this.generationOptions = ["1", "2", "3", "4", "5", "6", "7"]; this.numGenerations = "3"; this.constraintGroup = "No Research"; this.isCustom = false; } SweepOptionsComponent.prototype.ngOnInit = function () { // This would call a static method if I wanted to take the time to figure it out. this.constraintCategories = new _constraintCategory__WEBPACK_IMPORTED_MODULE_1__["ConstraintCategory"]("").loadDefaults(); this.selectAllButResearch(); }; // Starts a new tree sweep using the options currently specified SweepOptionsComponent.prototype.startSweep = function () { // Generate constraint options object var importOptions = new _importOptions__WEBPACK_IMPORTED_MODULE_2__["ImportOptions"](); importOptions.constraintGroup = this.constraintGroup; importOptions.numGenerations = parseInt(this.numGenerations); if (this.dataService.useCurrentUser) { // Use current user's pid as root importOptions.rootPid = this.fsService.fsSession.fs_user.pid; } else { // Use manual pid as root importOptions.rootPid = this.dataService.rootPid.trim(); ; } importOptions.token = this.fsService.fsSession.fs_access_token; // Determine which constraints are disabled var disabledConstraints = []; this.constraintCategories.forEach(function (category) { category.constraints.forEach(function (constraint) { if (!constraint.isEnabled()) { var ids = constraint.getIds(); ids.forEach(function (id) { disabledConstraints.push(id); }); } }); }); importOptions.setDisabledConstraints(disabledConstraints); // Start sweep this.dataService.newSweep(importOptions); }; // Returns a description of the current constraint category SweepOptionsComponent.prototype.getDescription = function () { switch (this.constraintGroup) { case "All": return "This group checks for everything: definite errors, possible errors, and research opportunities."; case "Impossible": return "This group only looks for definite errors. Any results you see indicate that something is definitely incorrect."; case "Research": return "These constraints only give research opportunities. They may not tell you any problems, but will give you ideas of where to do your own research."; case "Custom": return "Choose what you want to look for!"; case "No Research": return "This group only looks for possible errors and will not give you any additional research opportunities."; default: return ""; } }; // Enables all constraints SweepOptionsComponent.prototype.enableConstraints = function () { this.constraintCategories.forEach(function (category) { category.constraints.forEach(function (constraint) { constraint.setEnabled(true); }); }); }; // Disables all constraints SweepOptionsComponent.prototype.disableConstraints = function () { this.constraintCategories.forEach(function (category) { category.constraints.forEach(function (constraint) { constraint.setEnabled(false); }); }); }; // Enables a specific constraint SweepOptionsComponent.prototype.enableConstraint = function (categoryName, constraintName) { this.constraintCategories.forEach(function (category) { if (category.name === categoryName) category.constraints.forEach(function (constraint) { if (constraint.getId() === constraintName) constraint.setEnabled(true); }); }); }; // Disables a specific constraint SweepOptionsComponent.prototype.disableConstraint = function (categoryName, constraintName) { this.constraintCategories.forEach(function (category) { if (category.name === categoryName) category.constraints.forEach(function (constraint) { if (constraint.getId() === constraintName) constraint.setEnabled(false); }); }); }; // Enables all constraints and sets the constraint group to "All" SweepOptionsComponent.prototype.selectAllConstraints = function () { this.constraintGroup = "All"; this.isCustom = false; this.enableConstraints(); }; SweepOptionsComponent.prototype.selectAllButResearch = function () { this.constraintGroup = "No Research"; this.isCustom = false; this.enableConstraints(); // Disable research constraints this.disableConstraint("Research", "Person should have sources"); this.disableConstraint("Research", "Couple should not be missing children"); this.disableConstraint("Research", "Person should not be missing a spouse"); this.disableConstraint("Research", "Person should have a known gender"); this.disableConstraint("Research", "Person should have vital dates"); this.disableConstraint("Research", "Parents should not have duplicate children"); this.disableConstraint("Research", "Children should not have duplicate parents"); this.disableConstraint("Research", "People should not have duplicate spouses"); }; // Enables only impossibility constraints and sets the constraint group to "Impossible" SweepOptionsComponent.prototype.selectImpossibleConstraints = function () { this.constraintGroup = "Impossible"; this.isCustom = false; this.disableConstraints(); // Enable constraints that return impossibilities this.enableConstraint("Christening", "Person should be christened in their lifespan"); this.enableConstraint("Parent-Child Relationship", "Parent's children should be born during their lifespan"); this.enableConstraint("Parent-Child Relationship", "Person should not have too many parents"); this.enableConstraint("Parent-Child Relationship", "Person should not be their own ancestor"); this.enableConstraint("Marriage", "Person should be married in their lifespan"); this.enableConstraint("Lifespan", "Person should die after they were born"); }; // Enables only research constraints and sets the constraint group to "Research" SweepOptionsComponent.prototype.selectResearchConstraints = function () { this.constraintGroup = "Research"; this.isCustom = false; this.disableConstraints(); // Enable constraints that return research opportunities this.enableConstraint("Research", "Person should have sources"); this.enableConstraint("Research", "Couple should not be missing children"); this.enableConstraint("Research", "Person should not be missing a spouse"); this.enableConstraint("Research", "Person should have a known gender"); this.enableConstraint("Research", "Person should have vital dates"); this.enableConstraint("Research", "Parents should not have duplicate children"); this.enableConstraint("Research", "Children should not have duplicate parents"); this.enableConstraint("Research", "People should not have duplicate spouses"); }; // Disables all constraints, sets the constraint group to "Custom", and exposes constraints for manual selection SweepOptionsComponent.prototype.selectCustomConstraints = function () { this.constraintGroup = "Custom"; this.isCustom = true; this.disableConstraints(); }; SweepOptionsComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-sweep-options', template: __webpack_require__(/*! ./sweep-options.component.html */ "./src/app/sweep-options/sweep-options.component.html"), styles: [__webpack_require__(/*! ./sweep-options.component.scss */ "./src/app/sweep-options/sweep-options.component.scss")] }), __metadata("design:paramtypes", [_fs_service__WEBPACK_IMPORTED_MODULE_3__["FsService"], _data_store_service__WEBPACK_IMPORTED_MODULE_4__["DataStoreService"]]) ], SweepOptionsComponent); return SweepOptionsComponent; }()); /***/ }), /***/ "./src/app/sweep-results/sweep-results.component.html": /*!************************************************************!*\ !*** ./src/app/sweep-results/sweep-results.component.html ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n Results of Last Sweep\n \n \n \n \n
\n \n

\n
\n \n

No results! Try sweeping more generations or adjusting the filters.

\n \n \n \n \n
\n
\n\n No results yet! Set any options you want, and click \"Start Tree Sweep!\"\n" /***/ }), /***/ "./src/app/sweep-results/sweep-results.component.scss": /*!************************************************************!*\ !*** ./src/app/sweep-results/sweep-results.component.scss ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".mat-card {\n margin: 5px;\n margin-left: 0;\n width: 100%; }\n" /***/ }), /***/ "./src/app/sweep-results/sweep-results.component.ts": /*!**********************************************************!*\ !*** ./src/app/sweep-results/sweep-results.component.ts ***! \**********************************************************/ /*! exports provided: SweepResultsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SweepResultsComponent", function() { return SweepResultsComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts"); /* harmony import */ var _pdf_service_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pdf-service.service */ "./src/app/pdf-service.service.ts"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var SweepResultsComponent = /** @class */ (function () { function SweepResultsComponent(dataService, pdfService) { this.dataService = dataService; this.pdfService = pdfService; } SweepResultsComponent.prototype.ngOnInit = function () { }; SweepResultsComponent = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({ selector: 'app-sweep-results', template: __webpack_require__(/*! ./sweep-results.component.html */ "./src/app/sweep-results/sweep-results.component.html"), styles: [__webpack_require__(/*! ./sweep-results.component.scss */ "./src/app/sweep-results/sweep-results.component.scss")] }), __metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_1__["DataStoreService"], _pdf_service_service__WEBPACK_IMPORTED_MODULE_2__["PdfServiceService"]]) ], SweepResultsComponent); return SweepResultsComponent; }()); /***/ }), /***/ "./src/app/updates.ts": /*!****************************!*\ !*** ./src/app/updates.ts ***! \****************************/ /*! exports provided: Update, MessageUpdate, ErrorUpdate, ResultUpdate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Update", function() { return Update; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageUpdate", function() { return MessageUpdate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorUpdate", function() { return ErrorUpdate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultUpdate", function() { return ResultUpdate; }); /* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./flaggedResult */ "./src/app/flaggedResult.ts"); var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var Update = /** @class */ (function () { function Update() { } Update.typeOfUpdate = function (input) { if (input.type) { switch (input.type) { case "UPDATE": return new MessageUpdate(input); case "ERROR": return new ErrorUpdate(input); case "RESULT": return new ResultUpdate(input); default: throw "Update has unknown type: " + input.type; } } else throw "Update has no type"; }; Update.prototype.execute = function (arg) { }; return Update; }()); var MessageUpdate = /** @class */ (function (_super) { __extends(MessageUpdate, _super); function MessageUpdate(model) { var _this = _super.call(this) || this; if (model.message) _this.message = model.message; if (model.submessage) _this.submessage = model.submessage; if (model.target && model.target >= 0) _this.target = model.target; if (model.progress && model.progress >= 0) _this.progress = model.progress; return _this; } MessageUpdate.prototype.execute = function (arg) { if (this.message) arg.message = this.message; if (this.submessage) arg.status.mode = "indeterminate"; else arg.status.mode = "determinate"; if (this.target && this.target >= 0) arg.status.setTarget(this.target); if (this.progress && this.progress >= 0) arg.status.setValue(this.progress); }; return MessageUpdate; }(Update)); var ErrorUpdate = /** @class */ (function (_super) { __extends(ErrorUpdate, _super); function ErrorUpdate(model) { var _this = _super.call(this) || this; if (model.message) _this.message = model.message; return _this; } ErrorUpdate.prototype.execute = function (arg) { if (this.message === 'Your session has expired. Please log in again to continue.') { // Handle logout var r = confirm(this.message); if (r === true) { window.location.href = '/logout'; } } else { // Alert user of error alert(this.message); } }; return ErrorUpdate; }(Update)); var ResultUpdate = /** @class */ (function (_super) { __extends(ResultUpdate, _super); function ResultUpdate(model) { var _this = _super.call(this) || this; if (model.result) { // Copy flagged result, because it has lost its class var temp = new _flaggedResult__WEBPACK_IMPORTED_MODULE_0__["FlaggedResult"](); _this.result = Object.assign(temp, model.result); } return _this; } ResultUpdate.prototype.execute = function (arg) { if (this.result) arg.addData(this.result); arg.saveSweep(); }; return ResultUpdate; }(Update)); /***/ }), /***/ "./src/app/utils.service.ts": /*!**********************************!*\ !*** ./src/app/utils.service.ts ***! \**********************************/ /*! exports provided: UtilsService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UtilsService", function() { return UtilsService; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js"); /* harmony import */ var _loader_loader_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loader/loader.component */ "./src/app/loader/loader.component.ts"); /* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js"); var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (undefined && undefined.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var UtilsService = /** @class */ (function () { function UtilsService(dialog, overlay) { this.dialog = dialog; this.overlay = overlay; } UtilsService.prototype.displayLoader = function (message, autoclose, duration) { if (autoclose === void 0) { autoclose = true; } if (duration === void 0) { duration = 2000; } var dialogRef = this.dialog.open(_loader_loader_component__WEBPACK_IMPORTED_MODULE_2__["LoaderComponent"], { data: { message: message }, minHeight: '80px', minWidth: '230px', scrollStrategy: this.overlay.scrollStrategies.block() }); if (autoclose) { setTimeout(function () { dialogRef.close(); }, duration); } else { return dialogRef; } }; UtilsService = __decorate([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({ providedIn: 'root' }), __metadata("design:paramtypes", [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatDialog"], _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_3__["Overlay"]]) ], UtilsService); return UtilsService; }()); /***/ }), /***/ "./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 }; /* * In development mode, to ignore zone related error stack frames such as * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can * import the following file, but please comment it out in production mode * because it will have performance impact when throw error */ // 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"); /* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! hammerjs */ "./node_modules/hammerjs/hammer.js"); /* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_4__); 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.log(err); }); /***/ }), /***/ 0: /*!***************************!*\ !*** multi ./src/main.ts ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! /www/treesweeper/src/treesweeper2-front-end/src/main.ts */"./src/main.ts"); /***/ }) },[[0,"runtime","vendor"]]]); //# sourceMappingURL=main.js.map