diff --git a/frontend/documentation/components/AppComponent.html b/frontend/documentation/components/AppComponent.html index 715fd3f..264b1f5 100644 --- a/frontend/documentation/components/AppComponent.html +++ b/frontend/documentation/components/AppComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,235 +428,130 @@ - + - + - - - - - -
selector app-root
styleUrls./app.component.scssapp.component.scss
templateUrl./app.component.htmlapp.component.html
-
-

Index

- - - - - - - - - - - - - -
-
Properties
-
- -
-
-
-

Constructor

- - - - - +

Constructor

+
-constructor(router: Router, tokenStorage: TokenStorageService) -
+ + + + + + + + + +
+ constructor(router: Router, tokenStorage: TokenStorageService) +
+

Router import to show router-outlet.

+
+
+ Parameters : +
    +
  • +
    + router +
    +
    +

    Router

    + +
    +
  • +
+
+
+
+ + +
+

Properties

+ + + + + + + + - - - - - -
+ isLoggedIn +
+ isLoggedIn: boolean + +
- + Default value: false
-

Router import to show router-outlet.

-
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
router - Router - - No - -

Router

- -
tokenStorage - TokenStorageService - - No - -
-
-
-
- - - - - - -
- -

- Properties -

- - - - - - - - + +
- - - isLoggedIn - - -
- Default value : false -
+ + - - - -
- + showHeader
- - - - - - - - - - - -
- - - showHeader - - -
- Default value : false -
- + showHeader: boolean +
- - - - - - - - - - - + + + + +
- - - title - - -
- Type : string - -
- Default value : 'Aktienbot' -
+ Default value: false +
+ + - - - + + + + + + + + + +
- + title
-

Application title.

+
+ title: string + +
+ Default value: Aktienbot +
+

Application title.

+
+
+
- - - - - - - -
- - -
-
import { Component } from '@angular/core';
+        
+
import { Component } from '@angular/core';
 import { NavigationEnd, Router } from '@angular/router';
 import { TokenStorageService } from './Services/token.service';
 import { filter } from 'rxjs/operators';
@@ -377,60 +606,9 @@ export class AppComponent {
   }
 }
 
-
- -
-
<app-header *ngIf="showHeader"></app-header>
-<router-outlet></router-outlet>
-
-
- -
-

- ./app.component.scss -

-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -450,32 +628,9 @@ export class AppComponent {
-
- - - - - - - - - - @@ -485,17 +640,20 @@ export class AppComponent { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/BotSettingsComponent.html b/frontend/documentation/components/BotSettingsComponent.html index e840437..7d3c74e 100644 --- a/frontend/documentation/components/BotSettingsComponent.html +++ b/frontend/documentation/components/BotSettingsComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,18 +405,9 @@ - -

-

Implements

-

-

- OnInit -

- -

Metadata

- + @@ -93,6 +420,7 @@ + @@ -100,745 +428,289 @@ - + - + - - - - - -
selector app-bot-settings
styleUrls./bot-settings.component.scssbot-settings.component.scss
templateUrl./bot-settings.component.htmlbot-settings.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
-

Constructor

- - - - - +

Constructor

+
-constructor(botService: BotService, helper: HelperService, profileService: ProfileService) -
+ + + + + + +
+ constructor(botService: any, helper: any, profileService: any) +
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ addKeyword +
+ + + + addKeyword(event: MatChipInputEvent) +
+
+ Returns: any + +
+
+ + + + + + + + + + + + + + +
+ removeKeyword +
+ + + + removeKeyword(keyword: Keyword) +
+
+ Returns: any + +
+
+ + + + + + + + + + + + + + +
+ addShare +
+ + + + addShare(event: MatChipInputEvent) +
+
+ Returns: any + +
+
+ + + + + + + + + + + + + + +
+ removeShare +
+ + + + removeShare(share: Share) +
+
+ Returns: any + +
+
+ + + + + + + + + + + + + + +
+ setCronString +
+ setCronString() +
+
+ Returns: void + +
+
+
+ +
+

Properties

+ + + + + + + + - - - - - -
+ addOnBlur +
+ addOnBlur: boolean + +
- + Default value: true
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
botService - BotService - - No -
helper - HelperService - - No -
profileService - ProfileService - - No -
-
-
-
- - - - - -
- -

- Methods -

- - - - - - - - - - - - - - - - - - - -
- - - Async - addKeyword - - -
- - addKeyword(event: MatChipInputEvent) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
event - MatChipInputEvent - - No -
-
-
-
-
- Returns : Promise<void> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - Async - addShare - - -
- - addShare(event: MatChipInputEvent) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
event - MatChipInputEvent - - No -
-
-
-
-
- Returns : Promise<void> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - ngOnInit - - -
-ngOnInit() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - Async - removeKeyword - - -
- - removeKeyword(keyword: Keyword) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
keyword - Keyword - - No -
-
-
-
-
- Returns : Promise<void> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - Async - removeShare - - -
- - removeShare(share: Share) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
share - Share - - No -
-
-
-
-
- Returns : Promise<void> - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - setCronString - - -
-setCronString() -
- -
- -
- Returns : void - -
-
-
-
- -

- Properties -

- - - - - - - - + +
- - - addOnBlur - - -
- Default value : true -
+ + - - - -
- + const
- - - - - - - - - - - -
- - - cronForm - - -
- Default value : new FormControl('0 0 1/1 * *') -
- + const: any +
- - - - - - - - - - - + +
- - - Public - cronOptions - - -
- Type : CronOptions - -
- Default value : { - defaultTime: '00:00:00', - - hideMinutesTab: true, - hideHourlyTab: true, - hideDailyTab: false, - hideWeeklyTab: true, - hideMonthlyTab: true, - hideYearlyTab: true, - hideAdvancedTab: true, - hideSpecificWeekDayTab: true, - hideSpecificMonthWeekTab: true, - - use24HourTime: true, - hideSeconds: true, - - cronFlavor: 'quartz', //standard or quartz - } -
+ + - - - -
- + cronForm
- - - - - - - - - - - - - - -
- - - keywords - - -
- Type : Keyword[] - -
- Default value : [] -
- + cronForm: FormControl +
- - - - - - - - + +
- - - Readonly - separatorKeysCodes - - -
- Default value : [ENTER, COMMA] as const -
+ + - - - -
- + Public cronOptions
- - - - - - - - - - - - - - -
- - - shares - - -
- Type : Share[] - -
- Default value : [] -
- + cronOptions: CronOptions +
-
- + + + + + + + + + + + +
+ keywords +
+ keywords: Keyword[] + +
+ + + + + + + + + +
+ separatorKeysCodes +
+ separatorKeysCodes: any + +
+ + + + + + + + + +
+ shares +
+ shares: Share[] + +
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { C, COMMA, ENTER, F } from '@angular/cdk/keycodes';
 import { MatChipInputEvent } from '@angular/material/chips';
 
@@ -849,10 +721,6 @@ import { HelperService } from 'src/app/Helpers/helper.service';
 import { ProfileService } from 'src/app/Services/profile.service';
 import { FormControl } from '@angular/forms';
 
-export interface Fruit {
-  name: string;
-}
-
 export interface Share {
   isin: string;
 }
@@ -978,192 +846,9 @@ export class BotSettingsComponent implements OnInit {
   };
 }
 
-
- -
-
<mat-grid-list cols="2" rowHeight="45%">
-  <mat-grid-tile colspan="1" rowspan="1">
-    <mat-card class="card">
-      <mat-card-title class="card-title">Keywords</mat-card-title>
-      <mat-card-content>
-        <mat-form-field class="example-chip-list" appearance="fill">
-          <mat-label>Keywords</mat-label>
-          <mat-chip-list #chipList aria-label="Keyword selection">
-            <mat-chip
-              *ngFor="let keyword of keywords"
-              (removed)="removeKeyword(keyword)"
-            >
-              {{ keyword.name }}
-              <button matChipRemove>
-                <mat-icon>cancel</mat-icon>
-              </button>
-            </mat-chip>
-            <input
-              placeholder="New keyword..."
-              [matChipInputFor]="chipList"
-              [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
-              [matChipInputAddOnBlur]="addOnBlur"
-              (matChipInputTokenEnd)="addKeyword($event)"
-            />
-          </mat-chip-list>
-        </mat-form-field>
-        <span
-          >*To add a keyword, after writing, either press enter or click outside
-          of keyword input field.</span
-        >
-      </mat-card-content>
-    </mat-card>
-  </mat-grid-tile>
-  <mat-grid-tile colspan="1" rowspan="2">
-    <mat-card class="card placeholderRHS">
-      <mat-card-title class="card-title">
-        <span>Add automatic updates</span>
-      </mat-card-title>
-      <mat-card-content class="cron-content">
-        <form
-          name="form"
-          (ngSubmit)="f.form.valid && setCronString()"
-          #f="ngForm"
-          novalidate
-          class="backgorund form"
-        >
-          <cron-editor
-            class="cron-editor"
-            [formControl]="cronForm"
-            [options]="cronOptions"
-          ></cron-editor>
-          <div class="form-group footer-buttons">
-            <button class="btn btn-primary btn-block">Add</button>
-          </div>
-        </form>
-      </mat-card-content>
-    </mat-card>
-  </mat-grid-tile>
-  <mat-grid-tile colspan="1" rowspan="1">
-    <mat-card class="card">
-      <mat-card-title class="card-title">Shares</mat-card-title>
-      <mat-card-content>
-        <mat-form-field class="example-chip-list" appearance="fill">
-          <mat-label>Shares</mat-label>
-          <mat-chip-list #sharesList aria-label="Share selection">
-            <mat-chip
-              *ngFor="let share of shares"
-              (removed)="removeShare(share)"
-            >
-              {{ share.isin }}
-              <button matChipRemove>
-                <mat-icon>cancel</mat-icon>
-              </button>
-            </mat-chip>
-            <input
-              placeholder="New share..."
-              [matChipInputFor]="sharesList"
-              [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
-              [matChipInputAddOnBlur]="addOnBlur"
-              (matChipInputTokenEnd)="addShare($event)"
-            />
-          </mat-chip-list>
-        </mat-form-field>
-        <span
-          >*To add a share, after writing, either press enter or click outside
-          of keyword input field.</span
-        >
-      </mat-card-content>
-    </mat-card>
-  </mat-grid-tile>
-</mat-grid-list>
-
-
- -
-

- ./bot-settings.component.scss -

-
.form {
-  width: 100%;
-}
-
-.card {
-  width: 90%;
-  height: 80%;
-  margin: 5%;
-}
-
-.example-full-width {
-  width: 100%;
-}
-
-.card-title {
-  padding-bottom: 2.5vh;
-}
-
-mat-grid {
-  width: 100%;
-  height: 100%;
-}
-
-.example-chip-list {
-  width: 100%;
-}
-
-.placeholder {
-  height: 95%;
-}
-
-.placeholderRHS {
-  height: 90%;
-}
-
-.cron-content {
-  height: 70%;
-  overflow: auto;
-}
-
-mat-card {
-  overflow: scroll;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -1183,32 +868,9 @@ mat-card {
-
- - - - - - - - - - @@ -1218,17 +880,20 @@ mat-card { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/ConfirmationDialogComponent.html b/frontend/documentation/components/ConfirmationDialogComponent.html index 2be5e23..06b1f35 100644 --- a/frontend/documentation/components/ConfirmationDialogComponent.html +++ b/frontend/documentation/components/ConfirmationDialogComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,167 +428,92 @@ - + - + - - - - - -
selector app-confirmation-dialog
styleUrls./confirmation-dialog.component.scssconfirmation-dialog.component.scss
templateUrl./confirmation-dialog.component.htmlconfirmation-dialog.component.html
-
-

Index

- - - - - - - - - - - - - - - -
-
Methods
-
- -
-
- -
-

Constructor

- - - - - - - - - - -
-constructor() -
- -
-
- - -
+

Constructor

+ + + + + -

- Methods -

-
+ constructor() +
- - - - - - - + +
- - - confirm - - -
-confirm() -
+
- - - - - - - - - - - -
- Returns : void - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - returnBack - - -
-returnBack() -
- -
- -
- Returns : void - -
-
- +
+

Methods

+ + + + + + + + + + + + + + +
+ confirm +
+ confirm() +
+
+ Returns: void + +
+
+ + + + + + + + + + + + + + +
+ returnBack +
+ returnBack() +
+
+ Returns: void + +
+
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 
 @Component({
   selector: 'app-confirmation-dialog',
@@ -269,104 +528,9 @@ export class ConfirmationDialogComponent {
   returnBack() {}
 }
 
-
- -
-
<div class="containeer">
-  <h1 mat-dialog-title>Confirm Action</h1>
-  <div mat-dialog-content class="content">
-    <span>Are you sure, that you want to continue?</span>
-  </div>
-  <div mat-dialog-actions class="form-group footer-buttons">
-    <div class="inner">
-      <button
-        id="cancelButton"
-        class="btn btn-primary btn-block"
-        (click)="returnBack()"
-        [mat-dialog-close]="false"
-      >
-        Cancel
-      </button>
-    </div>
-    <div class="inner">
-      <button
-        id="okButton"
-        class="btn btn-danger btn-block"
-        (click)="confirm()"
-        [mat-dialog-close]="true"
-      >
-        Yes
-      </button>
-    </div>
-  </div>
-</div>
-
-
- -
-

- ./confirmation-dialog.component.scss -

-
.footer-buttons {
-  width: 100%;
-  text-align: center;
-}
-
-.spacer {
-  flex-grow: 1;
-  width: 5%;
-}
-
-.inner {
-  display: inline-block;
-  width: 50%;
-}
-
-.content {
-  height: 80%;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -386,32 +550,9 @@ export class ConfirmationDialogComponent {
-
- - - - - - - - - - @@ -421,17 +562,20 @@ export class ConfirmationDialogComponent { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/DashboardComponent.html b/frontend/documentation/components/DashboardComponent.html index 6cbf4d2..c0b75fd 100644 --- a/frontend/documentation/components/DashboardComponent.html +++ b/frontend/documentation/components/DashboardComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,18 +405,9 @@ - -

-

Implements

-

-

- OnInit -

- -

Metadata

- + @@ -93,6 +420,7 @@ + @@ -100,783 +428,328 @@ - + - + - - - - - -
selector app-dashboard
styleUrls./dashboard.component.scssdashboard.component.scss
templateUrl./dashboard.component.htmldashboard.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
-

Constructor

- - - - - +

Constructor

+
-constructor(dataService: DataService, helper: HelperService, dialog: MatDialog) -
+ + + + + + +
+ constructor(dataService: any, helper: any, dialog: MatDialog) +
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ getTransactions +
+ getTransactions() +
+
+ Returns: void + +
+
+ + + + + + + + + + + + + + +
+ openDialog +
+ openDialog() +
+
+ Returns: void + +
+
+
+ +
+

Properties

+ + + + + + + + + +
+ comment +
+ comment: string + +
+ + + + + + + + - - - - - -
+ count +
+ count: number + +
- + Default value: 0
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
dataService - DataService - - No -
helper - HelperService - - No -
dialog - MatDialog - - No -
-
-
-
- - - - - -
- -

- Methods -

- - - - - - - - - - - - - - - - - - - -
- - - getTransactions - - -
-getTransactions() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - ngOnInit - - -
-ngOnInit() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - openDialog - - -
-openDialog() -
- -
- -
- Returns : void - -
-
-
-
- -

- Properties -

- - - - - - - - - - - + +
- - - comment - - -
- Type : string - -
- Default value : '' -
+ + - - - -
- + dataSourceStocks
- - - - - - - - - - - - - - -
- - - count - - -
- Type : number - -
- Default value : 0.0 -
- + dataSourceStocks: Stock[] +
- - - - - - - - + +
- - - dataSource - - -
- Default value : ELEMENT_DATA -
+ + - - - -
- + dataSourceTransactions
- - - - - - - - - - - - - - -
- - - dataSourceStocks - - -
- Type : Stock[] - -
- Default value : [] -
- + dataSourceTransactions: TransactionData[] +
- - - - - - - - - - - + +
- - - dataSourceTransactions - - -
- Type : TransactionData[] - -
- Default value : [] -
+ + - - - -
- + depotCost
- - - - - - - - - - - - - - -
- - - depotCost - - -
- Type : number - -
- Default value : 0 -
- + depotCost: number +
- - - - - - - - - - - + + + + +
- - - depotCurrentValue - - -
- Type : number - -
- Default value : 0 -
+ Default value: 0 +
+ + - - - -
- + depotCurrentValue
- - - - - - - - - - - -
- - - Public - dialog - - -
- Type : MatDialog - -
- + depotCurrentValue: number +
- - - - - - - - - - - + + + + +
- - - displayedColumns - - -
- Type : string[] - -
- Default value : [ - 'comment', - 'weight', - 'position', - 'name', - 'symbol', - ] -
+ Default value: 0 +
+ + - - - -
- + dialog
- - - - - - - - - - - - - - -
- - - displayedColumnsStocks - - -
- Type : string[] - -
- Default value : [ - 'position', - 'name', - 'weight', - 'current-price', - ] -
- + dialog: MatDialog +
- - - - - - - - - - - + +
- - - isin - - -
- Type : string - -
- Default value : '' -
+ + - - - -
- + displayedColumns
- - - - - - - - - - - - - - -
- - - price - - -
- Type : number - -
- Default value : 0.0 -
- + displayedColumns: string[] +
- - - - - - - - - - - + +
- - - profit - - -
- Type : number - -
- Default value : 0 -
+ + - - - -
- + displayedColumnsStocks
- - - - - - - - - - - - - - -
- - - time - - -
- Type : Date - -
- Default value : new Date() -
- + displayedColumnsStocks: string[] +
-
- + + + + + + + + + + + +
+ isin +
+ isin: string + +
+ + + + + + + + + + + + +
+ price +
+ price: number + +
+ Default value: 0 +
+ + + + + + + + + + + + +
+ profit +
+ profit: number + +
+ Default value: 0 +
+ + + + + + + + + +
+ time +
+ time: Date + +
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { DataService } from 'src/app/Services/data.service';
 import { MatDialog } from '@angular/material/dialog';
 import { UserDialogComponent } from './user-dialog/user-dialog.component';
 import { HelperService } from 'src/app/Helpers/helper.service';
 
-export interface PeriodicElement {
-  name: string;
-  position: number;
-  weight: number;
-  symbol: string;
-}
-
 export interface Stock {
   count: number;
-  currentPrice: number;
-  symbol: string;
-  time: string;
+  comment: string;
+  isin: string;
+  last_transaction: string;
+  current_price: number;
 }
 
-//symbol count lastTransaction boughtPrice currentPrice(+?)
-
-const ELEMENT_DATA: PeriodicElement[] = [
-  { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
-  { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
-  { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
-];
-
 var TRANSACTION_DATA: TransactionData[] = [];
 var STOCK_DATA: Stock[] = [];
 
@@ -906,6 +779,12 @@ export class DashboardComponent implements OnInit {
   depotCost: number = 0;
   profit: number = 0;
 
+  comment: string = '';
+  isin: string = '';
+  time: Date = new Date();
+  count: number = 0.0;
+  price: number = 0.0;
+
   getTransactions() {
     var TRANSACTION_DATA: TransactionData[] = [];
     this.dataService.getTransactionData().subscribe((response: any) => {
@@ -929,24 +808,31 @@ export class DashboardComponent implements OnInit {
   }
 
   ngOnInit() {
+    /**
+     * Function gets the stock data and pushes it in the temporary object array
+     */
     this.dataService.getStockData().subscribe((response: any) => {
       var data = JSON.parse(response);
+      console.log(data);
       this.depotCurrentValue = 0;
       for (let i = 0; i < data.data.length; i++) {
         this.depotCurrentValue = data.data[i].current_price;
         STOCK_DATA.push({
           count: data.data[i].count,
-          currentPrice: data.data[i].current_price,
-          symbol: data.data[i].symbol,
-          time: data.data[i].last_transaction,
+          comment: data.data[i].comment,
+          isin: data.data[i].isin,
+          last_transaction: data.data[i].last_transaction,
+          current_price: data.data[i].current_price,
         });
       }
+      // assign data source
       this.dataSourceStocks = STOCK_DATA;
-      //TODO move to helper service
-
       this.profit += this.depotCurrentValue;
     });
 
+    /**
+     * Function gets the transaction data and pushes it in the temporary object array
+     */
     this.dataService.getTransactionData().subscribe((response: any) => {
       var data = JSON.parse(response);
       this.depotCost = 0;
@@ -960,19 +846,13 @@ export class DashboardComponent implements OnInit {
           price: data.data[i].price,
         });
       }
+      // assign data source
       this.dataSourceTransactions = TRANSACTION_DATA;
-      //TODO move to helper service
-
-      this.profit -= this.depotCost;
+      this.profit += this.depotCost;
     });
   }
 
-  comment: string = '';
-  isin: string = '';
-  time: Date = new Date();
-  count: number = 0.0;
-  price: number = 0.0;
-
+  // function to open the user dialog to create a new transaction
   openDialog(): void {
     const dialogRef = this.dialog.open(UserDialogComponent, {
       width: '50vw',
@@ -991,6 +871,7 @@ export class DashboardComponent implements OnInit {
     });
   }
 
+  // assign columns for transactions to display in html, you can change order and add/remove columns
   displayedColumns: string[] = [
     'comment',
     'weight',
@@ -998,336 +879,20 @@ export class DashboardComponent implements OnInit {
     'name',
     'symbol',
   ];
+
+  // assign columns to display in html, you can change order and add/remove columns
   displayedColumnsStocks: string[] = [
-    'position',
-    'name',
-    'weight',
-    'current-price',
+    'count',
+    'comment',
+    'isin',
+    'current_price',
+    'last_transaction',
   ];
-  dataSource = ELEMENT_DATA;
 }
 
-
- -
-
<mat-grid-list cols="2" rowHeight="45%">
-  <!-- Stocks -->
-  <mat-grid-tile colspan="1" rowspan="2">
-    <div class="stockOverview">
-      <div class="heading">
-        <div class="vertical-center">Stocks</div>
-      </div>
-      <mat-card class="placeholder">
-        <div class="stockTableLHS">
-          <table mat-table [dataSource]="dataSourceStocks">
-            <!--- Note that these columns can be defined in any order.
-                The actual rendered columns are set as a property on the row definition" -->
-
-            <!-- Symbol Column -->
-            <ng-container matColumnDef="position">
-              <th mat-header-cell *matHeaderCellDef>Symbol</th>
-              <td mat-cell *matCellDef="let element">{{ element.symbol }}</td>
-            </ng-container>
-
-            <!-- Count Column -->
-            <ng-container matColumnDef="name">
-              <th mat-header-cell *matHeaderCellDef>Count</th>
-              <td mat-cell *matCellDef="let element">{{ element.count }}</td>
-            </ng-container>
-
-            <!-- Time Column -->
-            <ng-container matColumnDef="weight">
-              <th mat-header-cell *matHeaderCellDef>Time</th>
-              <td mat-cell *matCellDef="let element">{{ element.time }}</td>
-            </ng-container>
-
-            <!-- Time Column -->
-            <ng-container matColumnDef="current-price">
-              <th mat-header-cell *matHeaderCellDef>Current Price</th>
-              <td mat-cell *matCellDef="let element">
-                {{ element.currentPrice }}
-              </td>
-            </ng-container>
-
-            <tr mat-header-row *matHeaderRowDef="displayedColumnsStocks"></tr>
-            <tr
-              mat-row
-              *matRowDef="let row; columns: displayedColumnsStocks"
-            ></tr>
-          </table>
-        </div>
-      </mat-card>
-    </div>
-  </mat-grid-tile>
-  <!-- Depot Overview -->
-  <mat-grid-tile colspan="1" rowspan="1" class="right-side">
-    <div class="depotOverview">
-      <div class="heading fix-right-side">
-        <div class="vertical-center">Depot</div>
-      </div>
-      <mat-card class="placeholderRHS content-container">
-        <div class="content">
-          <div class="row">
-            <div class="col-md-4">
-              <div class="value-set">
-                <h3>Portfolio Value</h3>
-              </div>
-            </div>
-            <div class="col-md-4">
-              <div class="value-set">
-                <h3>Portfolio Cost</h3>
-              </div>
-            </div>
-            <div class="col-md-4">
-              <div class="value-set">
-                <h3>Portfolio Profit</h3>
-              </div>
-            </div>
-          </div>
-          <br />
-          <div class="row">
-            <div class="col-6 col-sm-4">
-              <mat-icon>savings</mat-icon
-              ><span class="money">{{ depotCurrentValue.toFixed(2) }}</span>
-            </div>
-            <div class="col-6 col-sm-4">
-              <mat-icon>paid</mat-icon
-              ><span class="money">{{ depotCost.toFixed(2) }}</span>
-            </div>
-            <div class="col-6 col-sm-4">
-              <mat-icon>account_balance</mat-icon
-              ><span
-                class="money"
-                [ngClass]="{ green: profit >= 0, red: profit < 0 }"
-                >{{ profit.toFixed(2) }}</span
-              >
-            </div>
-          </div>
-        </div>
-      </mat-card>
-    </div>
-  </mat-grid-tile>
-  <!-- Transaktions -->
-  <mat-grid-tile colspan="1" rowspan="1" class="right-side">
-    <div class="depotOverviewDown">
-      <div class="heading fix-right-side">
-        <div class="vertical-center">Transactions</div>
-        <span class="spacer"></span>
-        <button
-          mat-icon-button
-          class="add-icon"
-          aria-label="Example icon-button with heart icon"
-          [disableRipple]="true"
-          (click)="openDialog()"
-        >
-          <mat-icon>add</mat-icon>
-        </button>
-      </div>
-      <mat-card class="placeholderRHS"
-        ><div class="stockTable">
-          <table mat-table [dataSource]="dataSourceTransactions">
-            <!--- Note that these columns can be defined in any order.
-                The actual rendered columns are set as a property on the row definition" -->
-
-            <!-- Position Column -->
-            <ng-container matColumnDef="position">
-              <th mat-header-cell *matHeaderCellDef>Count</th>
-              <td mat-cell *matCellDef="let element">{{ element.count }}</td>
-            </ng-container>
-
-            <!-- Comment Column -->
-            <ng-container matColumnDef="comment">
-              <th mat-header-cell *matHeaderCellDef>Comment</th>
-              <td mat-cell *matCellDef="let element">{{ element.comment }}</td>
-            </ng-container>
-
-            <!-- Name Column -->
-            <ng-container matColumnDef="name">
-              <th mat-header-cell *matHeaderCellDef>Price</th>
-              <td mat-cell *matCellDef="let element">{{ element.price }}</td>
-            </ng-container>
-
-            <!-- Weight Column -->
-            <ng-container matColumnDef="weight">
-              <th mat-header-cell *matHeaderCellDef>ISIN</th>
-              <td mat-cell *matCellDef="let element">{{ element.isin }}</td>
-            </ng-container>
-
-            <!-- Symbol Column -->
-            <ng-container matColumnDef="symbol">
-              <th mat-header-cell *matHeaderCellDef>Time</th>
-              <td mat-cell *matCellDef="let element">{{ element.time }}</td>
-            </ng-container>
-
-            <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
-            <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
-          </table></div
-      ></mat-card>
-    </div>
-  </mat-grid-tile>
-</mat-grid-list>
-
-
- -
-

- ./dashboard.component.scss -

-
// left gird
-.stockOverview {
-  height: 100%;
-  width: 100%;
-  margin-top: 10%;
-  margin-left: 10%;
-}
-
-//right grids
-.depotOverview {
-  height: 100%;
-  width: 100%;
-  margin-top: 10%;
-  margin-left: 5%;
-  margin-right: 10%;
-  text-align: center;
-}
-
-.depotOverviewDown {
-  height: 100%;
-  width: 100%;
-  margin-left: 5%;
-  margin-right: 10%;
-}
-
-.stockTable {
-  overflow: auto;
-  height: 100%;
-  width: 100%;
-}
-
-.stockTableLHS {
-  overflow: auto;
-  height: 83%;
-  width: 100%;
-}
-
-.heading {
-  font-size: xx-large;
-  height: 10%;
-  width: 100%;
-  position: relative;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.fix-right-side {
-  height: 20%;
-}
-
-.vertical-center {
-  margin: 0;
-  position: absolute;
-  top: 50%;
-  -ms-transform: translateY(-50%);
-  transform: translateY(-50%);
-}
-
-.spacer {
-  flex-grow: 1;
-}
-
-.add-icon {
-  transform: scale(2);
-  outline: none !important;
-}
-
-.right-side {
-  margin-left: 2.5%;
-}
-
-table {
-  width: 100%;
-}
-
-.placeholder {
-  height: 100%;
-}
-
-.placeholderRHS {
-  height: 80%;
-}
-
-.mat-ripple-element {
-  display: none !important;
-}
-
-.money {
-  margin-left: 2vw;
-}
-
-.green {
-  color: green;
-}
-
-.red {
-  color: red;
-}
-
-.row {
-  height: 20%;
-}
-
-.content {
-  height: inherit;
-}
-
-.content-container {
-  width: 100%;
-  display: grid;
-  align-items: center;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -1347,32 +912,9 @@ table {
-
- - - - - - - - - - @@ -1382,17 +924,20 @@ table { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/HeaderComponent.html b/frontend/documentation/components/HeaderComponent.html index 0ef8f94..6fe4020 100644 --- a/frontend/documentation/components/HeaderComponent.html +++ b/frontend/documentation/components/HeaderComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,157 +428,87 @@ - + - + - - - - - -
selector app-header
styleUrls./header.component.scssheader.component.scss
templateUrl./header.component.htmlheader.component.html
-
-

Index

- - - - - - - - - - - - - - - -
-
Methods
-
- -
-
- -
-

Constructor

- - - - - - - - - - - - - -
-constructor(tokenStorage: TokenStorageService) -
- -
-
- Parameters : - - - - - - - - - - - - - - - - - - -
NameTypeOptional
tokenStorage - TokenStorageService - - No -
-
-
-
- - -
+

Constructor

+ + + + + -

- Methods -

-
+ constructor(tokenStorage: any) +
- - - - - - - + + + + +
- - - logout - - -
-logout() -
+
+ Parameters : + +
+
+
- - - - - - - - - - - -
- Returns : void - -
- - - - - +
+

Methods

+ + + + + + + + + + + + + + +
+ logout +
+ logout() +
+
+ Returns: void + +
+
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { TokenStorageService } from 'src/app/Services/token.service';
 
 @Component({
@@ -265,91 +529,9 @@ export class HeaderComponent {
   }
 }
 
-
- -
-
<mat-toolbar>
-  <a href=""><span>Aktienbot</span></a>
-  <span class="example-spacer"></span>
-  <button
-    mat-icon-button
-    aria-label="Example icon-button with heart icon"
-    routerLink="/profile"
-  >
-    <mat-icon>account_circle</mat-icon>
-  </button>
-  <button
-    mat-icon-button
-    class="example-icon favorite-icon"
-    routerLink="/settings"
-  >
-    <mat-icon>ballot</mat-icon>
-  </button>
-  <button
-    mat-icon-button
-    aria-label="Example icon-button with heart icon"
-    (click)="logout()"
-  >
-    <mat-icon>logout</mat-icon>
-  </button>
-</mat-toolbar>
-
-
- -
-

- ./header.component.scss -

-
.example-spacer {
-  flex: 1 1 auto;
-}
-
-a {
-  color: white;
-  text-decoration: none; /* no underline */
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -369,32 +551,9 @@ a {
-
- - - - - - - - - - @@ -404,17 +563,20 @@ a { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/HelpDialogComponent.html b/frontend/documentation/components/HelpDialogComponent.html index abf3bcf..1bbb426 100644 --- a/frontend/documentation/components/HelpDialogComponent.html +++ b/frontend/documentation/components/HelpDialogComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,127 +428,68 @@ - + - + - - - - - -
selector app-help-dialog
styleUrls./help-dialog.component.scsshelp-dialog.component.scss
templateUrl./help-dialog.component.htmlhelp-dialog.component.html
-
-

Index

- - - - - - - - - - - - - - - -
-
Methods
-
- -
-
- -
-

Constructor

- - - - - - - - - - -
-constructor() -
- -
-
- - -
+

Constructor

+ + + + + -

- Methods -

-
+ constructor() +
- - - - - - - + +
- - - close - - -
-close() -
+
- - - - - - - - - - - -
- Returns : void - -
- - - - - +
+

Methods

+ + + + + + + + + + + + + + +
+ close +
+ close() +
+
+ Returns: void + +
+
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 
 @Component({
   selector: 'app-help-dialog',
@@ -227,99 +502,9 @@ export class HelpDialogComponent {
   close() {}
 }
 
-
- -
-
<div class="containeer">
-  <h1 mat-dialog-title>How to add your Telegram account</h1>
-  <div mat-dialog-content class="content">
-    <span
-      >To get your UserId, you have to write "/id" or "/auth" to the bot on
-      Telegram. (<a href="https://t.me/projektaktienbot)"
-        >https://t.me/projektaktienbot)</a
-      >)</span
-    >
-  </div>
-  <div mat-dialog-actions class="form-group footer-buttons">
-    <div class="inner">
-      <button
-        id="okButton"
-        class="btn btn-secondary btn-block"
-        (click)="close()"
-        [mat-dialog-close]="true"
-      >
-        Ok
-      </button>
-    </div>
-  </div>
-</div>
-
-
- -
-

- ./help-dialog.component.scss -

-
.footer-buttons {
-  width: 100%;
-  text-align: center;
-}
-
-.spacer {
-  flex-grow: 1;
-  width: 5%;
-}
-
-.inner {
-  display: inline-block;
-  width: 100%;
-}
-
-.content {
-  height: 80%;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -339,32 +524,9 @@ export class HelpDialogComponent {
-
- - - - - - - - - - @@ -374,17 +536,20 @@ export class HelpDialogComponent { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/LoginComponent.html b/frontend/documentation/components/LoginComponent.html index aa95b1c..6f56838 100644 --- a/frontend/documentation/components/LoginComponent.html +++ b/frontend/documentation/components/LoginComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,18 +405,9 @@ - -

-

Implements

-

-

- OnInit -

- -

Metadata

- + @@ -93,6 +420,7 @@ + @@ -100,439 +428,219 @@ - + - + - - - - - -
selector app-login
styleUrls./login.component.scsslogin.component.scss
templateUrl./login.component.htmllogin.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
-

Constructor

- - - - - +

Constructor

+
-constructor(authService: AuthService, tokenStorage: TokenStorageService, router: Router) -
+ + + + + + + + + +
+ constructor(authService: AuthService, tokenStorage: TokenStorageService, router: Router) +
+
+ Parameters : + +
+
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ onSubmit +
+ onSubmit() +
+
+ Returns: void + +
+
+ + + + + + + + + + + + + + +
+ reloadPage +
+ reloadPage() +
+
+ Returns: void + +
+
+
+ +
+

Properties

+ + + + + + + + + +
+ accountName +
+ accountName: string + +
+ + + + + + + + + +
+ errorMessage +
+ errorMessage: string + +
+ + + + + + + + + +
+ form +
+ form: any + +
+ + + + + + + + - - - - - -
+ isLoggedIn +
+ isLoggedIn: boolean + +
- + Default value: false
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
authService - AuthService - - No -
tokenStorage - TokenStorageService - - No -
router - Router - - No -
-
-
-
- - - - - -
- -

- Methods -

- - - - - - - - - - - - - - - - - - - -
- - - ngOnInit - - -
-ngOnInit() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - onSubmit - - -
-onSubmit() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - reloadPage - - -
-reloadPage() -
- -
- -
- Returns : void - -
-
-
-
- -

- Properties -

- - - - - - - - - - - + +
- - - accountName - - -
- Type : string - -
- Default value : '' -
+ + - - - -
- + isLoginFailed
- - - - - - - - - - - - - - -
- - - errorMessage - - -
- Type : string - -
- Default value : '' -
- + isLoginFailed: boolean +
- - - - - - - - - - - - - - - - - -
- - - form - - -
- Type : any - -
- Default value : { - email: null, - password: null, - } -
- -
- - - - - - - - - - - - - - -
- - - isLoggedIn - - -
- Default value : false -
- -
- - - - - - - - - - - - - - -
- - - isLoginFailed - - -
- Default value : false -
- -
-
- + + + Default value: false + + + + +
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { AuthService } from '../../Services/auth.service';
 import { TokenStorageService } from '../../Services/token.service';
 import { Router } from '@angular/router';
@@ -547,6 +655,7 @@ export class LoginComponent implements OnInit {
     email: null,
     password: null,
   };
+
   isLoggedIn = false;
   isLoginFailed = false;
   errorMessage = '';
@@ -597,148 +706,9 @@ export class LoginComponent implements OnInit {
   }
 }
 
-
- -
-
<div class="col-md-4 login-container">
-  <div class="card card-container no-border">
-    <img
-      id="profile-img"
-      src="https://i.kym-cdn.com/entries/icons/mobile/000/029/959/Screen_Shot_2019-06-05_at_1.26.32_PM.jpg"
-      class="profile-img-card"
-    />
-    <form
-      *ngIf="!isLoggedIn"
-      name="form"
-      (ngSubmit)="f.form.valid && onSubmit()"
-      #f="ngForm"
-      novalidate
-      class="backgorund"
-    >
-      <div class="form-group">
-        <label for="email">Email</label>
-        <input
-          type="email"
-          class="form-control"
-          name="email"
-          [(ngModel)]="form.email"
-          required
-          email
-          #email="ngModel"
-        />
-        <div class="alert-danger" *ngIf="email.errors && f.submitted">
-          <div *ngIf="email.errors?.['required']">Email is required</div>
-          <div *ngIf="email.errors?.['email']">
-            Email must be a valid email address
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <label for="password">Password</label>
-        <input
-          type="password"
-          class="form-control"
-          name="password"
-          [(ngModel)]="form.password"
-          required
-          minlength="6"
-          #password="ngModel"
-        />
-        <div
-          class="alert alert-danger"
-          role="alert"
-          *ngIf="password.errors && f.submitted"
-        >
-          <div *ngIf="password.errors?.['required']">Password is required</div>
-          <div *ngIf="password.errors?.['minlength']">
-            Password must be at least 6 characters
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <button class="btn btn-primary btn-block">Login</button>
-      </div>
-      <div class="form-group">
-        <div
-          class="alert alert-danger"
-          role="alert"
-          *ngIf="f.submitted && isLoginFailed"
-        >
-          Login failed: {{ errorMessage }}
-        </div>
-      </div>
-    </form>
-    <div class="alert alert-success" *ngIf="isLoggedIn">
-      Logged in as {{ accountName }}.
-    </div>
-    <button class="btn btn-secondary btn-block" routerLink="/register">
-      Sign up
-    </button>
-  </div>
-</div>
-
-
- -
-

- ./login.component.scss -

-
.login-container {
-  margin: auto;
-  width: 60vh;
-  padding-top: 10vh;
-}
-
-.no-border {
-  border: none;
-}
-
-.backgorund {
-  background-color: #181a1b;
-  color: white;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -758,32 +728,9 @@ export class LoginComponent implements OnInit {
-
- - - - - - - - - - @@ -793,17 +740,20 @@ export class LoginComponent implements OnInit { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/ProfileComponent.html b/frontend/documentation/components/ProfileComponent.html index d6d18e9..48a3eb9 100644 --- a/frontend/documentation/components/ProfileComponent.html +++ b/frontend/documentation/components/ProfileComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,18 +405,9 @@ - -

-

Implements

-

-

- OnInit -

- -

Metadata

- + @@ -93,6 +420,7 @@ + @@ -100,568 +428,233 @@ - + - + - - - - - -
selector app-profile
styleUrls./profile.component.scssprofile.component.scss
templateUrl./profile.component.htmlprofile.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
- -
-

Constructor

- - - - - - - - - - - - - -
-constructor(profileService: ProfileService, dialog: MatDialog) -
- -
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
profileService - ProfileService - - No -
dialog - MatDialog - - No -
-
-
-
- - -
+

Constructor

+ + + + + -

- Methods -

-
+ constructor(profileService: any, dialog: MatDialog) +
- - - - - - - + +
- - - ngOnInit - - -
-ngOnInit() -
+
- - - - - - - - - - - -
- Returns : void - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - onSubmit - - -
-onSubmit() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - openDialog - - -
-openDialog(action: string) -
- -
- -
- Parameters : - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
action - string - - No -
-
-
-
-
- Returns : void - -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
- - - openHelp - - -
-openHelp() -
- -
- -
- Returns : void - -
-
- - - - - - - - - - - - - - - - - - - -
- - - updateUser - - -
-updateUser() -
- -
- -
- Returns : void - -
-
-
+

Methods

+ + + + + -

- Properties -

-
+ onSubmit +
- - - - - - - - - - -
- - - Public - dialog - - -
- Type : MatDialog - -
- + onSubmit()
- - - - - - - - - - - + - - - -
- - - form - - -
- Type : any - -
- Default value : { - username: null, - email: 'example@web.com', - password: 'password', - } -
- +
+ Returns: void + +
- - - - - - - - + +
- - - passwordFormControl - - -
- Default value : new FormControl('', [ - Validators.required, - Validators.minLength(6), - ]) -
+ + - - - -
- + updateUser
- - - - - - - - + - - - -
- - - telegramIdFormControl - - -
- Default value : new FormControl('', [Validators.required]) -
- + updateUser()
- - - - - - - - - - - + - - - -
- - - userId - - -
- Type : string - -
- Default value : '' -
- +
+ Returns: void + +
- - - - - - - - + +
- - - userNameFormControl - - -
- Default value : new FormControl('', [Validators.required]) -
+ + + + + + + + + + + +
- + openDialog
+ openDialog(action: string) +
+
+ Returns: void + +
+
+ + + + + + + + + + + + + + +
+ openHelp +
+ openHelp() +
+
+ Returns: void + +
+
+
- - - - - +
+

Properties

+ + + + + + + + + +
+ dialog +
+ dialog: MatDialog + +
+ + + + + + + + + +
+ form +
+ form: any + +
+ + + + + + + + + +
+ passwordFormControl +
+ passwordFormControl: FormControl + +
+ + + + + + + + + +
+ telegramIdFormControl +
+ telegramIdFormControl: FormControl + +
+ + + + + + + + + +
+ userId +
+ userId: string + +
+ + + + + + + + + +
+ userNameFormControl +
+ userNameFormControl: FormControl + +
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { FormControl, Validators } from '@angular/forms';
 import { MatDialog } from '@angular/material/dialog';
 import { ProfileService } from 'src/app/Services/profile.service';
@@ -679,7 +672,10 @@ export class ProfileComponent implements OnInit {
     Validators.required,
     Validators.minLength(6),
   ]);
-  telegramIdFormControl = new FormControl('', [Validators.required]);
+  telegramIdFormControl = new FormControl('', [
+    Validators.required,
+    Validators.minLength(6),
+  ]);
 
   userId = '';
 
@@ -708,9 +704,11 @@ export class ProfileComponent implements OnInit {
   onSubmit() {
     if (this.userId != '') {
       console.log(this.userId);
-      this.profileService.addTelegramId(this.userId).subscribe((result) => {
-        console.log(result);
-      });
+      this.profileService
+        .addTelegramId('' + this.userId)
+        .subscribe((result) => {
+          console.log(result);
+        });
     }
   }
 
@@ -748,233 +746,9 @@ export class ProfileComponent implements OnInit {
   }
 }
 
-
- -
-
<mat-grid-list cols="2" rowHeight="45%">
-  <mat-grid-tile colspan="1" rowspan="2">
-    <mat-card class="card placeholder">
-      <mat-card-title class="card-title">Profile Information</mat-card-title>
-      <mat-card-content>
-        <form
-          class="example-form form"
-          name="form"
-          (ngSubmit)="f.form.valid && openDialog('updateUser')"
-          #f="ngForm"
-          novalidate
-        >
-          <mat-form-field class="example-full-width" appearance="fill">
-            <mat-label>Username</mat-label>
-            <input
-              type="text"
-              name="username"
-              matInput
-              [formControl]="userNameFormControl"
-              placeholder="Ex. patrick-bateman"
-              [(ngModel)]="form.username"
-              #username
-            />
-            <mat-error *ngIf="userNameFormControl.hasError('required')">
-              Username is <strong>required</strong>
-            </mat-error>
-          </mat-form-field>
-          <mat-form-field class="example-full-width" appearance="fill">
-            <mat-label>{{ form.email }}</mat-label>
-            <input
-              type="email"
-              matInput
-              name="email"
-              disabled
-              placeholder="Ex. patrickbateman@example.com"
-            />
-          </mat-form-field>
-          <mat-form-field class="example-full-width" appearance="fill">
-            <mat-label>Password</mat-label>
-            <input
-              type="password"
-              matInput
-              name="password"
-              [formControl]="passwordFormControl"
-              placeholder="Password"
-              minlength="6"
-              [(ngModel)]="form.password"
-              #password
-            />
-            <mat-error
-              *ngIf="
-                passwordFormControl.hasError('minlength') &&
-                !passwordFormControl.hasError('required')
-              "
-            >
-              Please enter a valid password
-            </mat-error>
-            <mat-error *ngIf="passwordFormControl.hasError('required')">
-              Password is <strong>required</strong>
-            </mat-error>
-          </mat-form-field>
-          <mat-form-field class="example-full-width" appearance="fill">
-            <mat-label>Repeat Password</mat-label>
-            <input
-              type="password"
-              matInput
-              [formControl]="passwordFormControl"
-              placeholder="Ex. pat@example.com"
-            />
-            <mat-error
-              *ngIf="
-                passwordFormControl.hasError('minLength') &&
-                !passwordFormControl.hasError('required')
-              "
-            >
-              Please enter a valid password
-            </mat-error>
-            <mat-error *ngIf="passwordFormControl.hasError('required')">
-              Password is <strong>required</strong>
-            </mat-error>
-          </mat-form-field>
-          <div class="form-group footer-buttons">
-            <button
-              class="btn btn-primary btn-block"
-              [disabled]="
-                passwordFormControl.hasError('required') ||
-                passwordFormControl.hasError('minLength') ||
-                userNameFormControl.hasError('required')
-              "
-            >
-              Update
-            </button>
-          </div>
-        </form>
-      </mat-card-content>
-    </mat-card>
-  </mat-grid-tile>
-  <mat-grid-tile colspan="1" rowspan="2">
-    <mat-card class="card placeholder">
-      <mat-card-title class="card-title">
-        <span>Connect Telegram Account</span>
-      </mat-card-title>
-      <mat-card-content>
-        <form
-          name="form"
-          (ngSubmit)="f.form.valid && openDialog('addTelegram')"
-          #f="ngForm"
-          novalidate
-          class="backgorund form"
-        >
-          <mat-form-field class="example-full-width" appearance="fill">
-            <mat-label>Telegram UserId</mat-label>
-            <input
-              type="text"
-              matInput
-              [formControl]="telegramIdFormControl"
-              [(ngModel)]="userId"
-              required
-              #telegramId
-            />
-            <mat-error *ngIf="telegramIdFormControl.hasError('required')">
-              Id is <strong>required</strong>
-            </mat-error>
-          </mat-form-field>
-          <div class="form-group footer-buttons">
-            <button
-              class="btn btn-primary btn-block"
-              [disabled]="telegramIdFormControl.hasError('required')"
-            >
-              Add
-            </button>
-          </div>
-        </form>
-        <button class="btn btn-secondary btn-block" (click)="openHelp()">
-          Help
-        </button>
-      </mat-card-content>
-    </mat-card>
-  </mat-grid-tile>
-</mat-grid-list>
-
-
- -
-

- ./profile.component.scss -

-
.form {
-  width: 100%;
-}
-
-.card {
-  width: 90%;
-  height: 90%;
-  margin: 5%;
-}
-
-.example-full-width {
-  width: 100%;
-}
-
-.card-title {
-  padding-bottom: 2.5vh;
-}
-
-mat-grid {
-  width: 100%;
-  height: 100%;
-}
-
-.placeholder {
-  height: 95%;
-}
-
-.placeholderRHS {
-  height: 90%;
-}
-
-.cron-content {
-  height: 70%;
-  overflow: auto;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -994,32 +768,9 @@ mat-grid {
-
- - - - - - - - - - @@ -1029,17 +780,20 @@ mat-grid { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/RegisterComponent.html b/frontend/documentation/components/RegisterComponent.html index aa0cb26..6d7659d 100644 --- a/frontend/documentation/components/RegisterComponent.html +++ b/frontend/documentation/components/RegisterComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,314 +428,192 @@ - + - + - - - - - -
selector app-register
styleUrls./register.component.scssregister.component.scss
templateUrl./register.component.htmlregister.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
-

Constructor

- - - - - +

Constructor

+
-constructor(authService: AuthService, router: Router) -
+ + + + + + + + + +
+ constructor(authService: AuthService, router: Router) +
+
+ Parameters : +
    +
  • +
    + privateauthService + : AuthService + +
    +
    + +
    +
  • +
  • +
    + privaterouter + : Router + +
    +
    + +
    +
  • +
+
+
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ onSubmit +
+ onSubmit() +
+

On submit, send user information to backend

+
+
+ Returns: void + +
+
+
+ +
+

Properties

+ + + + + + + + - - - - - -
+ checkPasswordFailed +
+ checkPasswordFailed: boolean + +
- + Default value: false
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
authService - AuthService - - No -
router - Router - - No -
-
-
-
- - - - - -
- -

- Methods -

- - - - - - - - - - - - - - - - - - - -
- - - onSubmit - - -
-onSubmit() -
- -
- -
- Returns : void - -
-
-
-
- -

- Properties -

- - - - - - - - - - - + +
- - - errorMessage - - -
- Type : string - -
- Default value : '' -
+ + - - - -
- + errorMessage
- - - - - - - - - - - - - - -
- - - form - - -
- Type : any - -
- Default value : { - email: null, - password: null, - username: null, - } -
- + errorMessage: string +
- - - - - - - - + +
- - - isSignUpFailed - - -
- Default value : false -
+ + - - - -
- + form
- - - - - - - - - - - -
- - - isSuccessful - - -
- Default value : false -
- + form: any +
-
- + + + + + + + + + + + + + + +
+ isSignUpFailed +
+ isSignUpFailed: boolean + +
+ Default value: false +
+ + + + + + + + + + + + +
+ isSuccessful +
+ isSuccessful: boolean + +
+ Default value: false +
+
- - -
-
import { Component, OnInit } from '@angular/core';
+        
+
import { Component, OnInit } from '@angular/core';
 import { Router } from '@angular/router';
 import { AuthService } from '../../Services/auth.service';
 
@@ -414,204 +626,49 @@ export class RegisterComponent {
   form: any = {
     email: null,
     password: null,
+    passwordRepeat: null,
     username: null,
   };
   isSuccessful = false;
   isSignUpFailed = false;
   errorMessage = '';
 
+  checkPasswordFailed = false;
+
   /**
    * @param  {AuthService} privateauthService
    * @param  {Router} privaterouter
    */
   constructor(private authService: AuthService, private router: Router) {}
+
+  /**
+   * On submit, send user information to backend
+   */
   onSubmit(): void {
-    const { email, username, password } = this.form;
-    this.authService.register(email, username, password).subscribe(
-      (data) => {
-        this.isSuccessful = true;
-        this.isSignUpFailed = false;
-        this.router.navigate(['/login']);
-      },
-      (err) => {
-        this.errorMessage = err.error.message;
-        this.isSignUpFailed = true;
-      }
-    );
+    // validate that passwords match
+    if (this.form.password === this.form.passwordRepeat) {
+      this.checkPasswordFailed = false;
+      const { email, username, password } = this.form;
+      this.authService.register(email, username, password).subscribe(
+        (data) => {
+          this.isSuccessful = true;
+          this.isSignUpFailed = false;
+          this.router.navigate(['/login']);
+        },
+        (err) => {
+          this.errorMessage = err.error.message;
+          this.isSignUpFailed = true;
+        }
+      );
+    } else {
+      this.checkPasswordFailed = true;
+    }
   }
 }
 
-
- -
-
<div class="col-md-4 login-container">
-  <div class="card card-container no-border">
-    <img
-      id="profile-img"
-      src="https://i.kym-cdn.com/entries/icons/mobile/000/029/959/Screen_Shot_2019-06-05_at_1.26.32_PM.jpg"
-      class="profile-img-card"
-    />
-    <form
-      *ngIf="!isSuccessful"
-      name="form"
-      (ngSubmit)="f.form.valid && onSubmit()"
-      #f="ngForm"
-      novalidate
-      class="backgorund"
-    >
-      <div class="form-group">
-        <label for="username">Username</label>
-        <input
-          type="text"
-          class="form-control"
-          name="username"
-          [(ngModel)]="form.username"
-          required
-          minlength="3"
-          maxlength="20"
-          #username="ngModel"
-        />
-        <div class="alert-danger" *ngIf="username.errors && f.submitted">
-          <div *ngIf="username.errors?.['required']">Username is required</div>
-          <div *ngIf="username.errors?.['minlength']">
-            Username must be at least 3 characters
-          </div>
-          <div *ngIf="username.errors?.['maxlength']">
-            Username must be at most 20 characters
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <label for="email">Email</label>
-        <input
-          type="email"
-          class="form-control"
-          name="email"
-          [(ngModel)]="form.email"
-          required
-          email
-          #email="ngModel"
-        />
-        <div class="alert-danger" *ngIf="email.errors && f.submitted">
-          <div *ngIf="email.errors?.['required']">Email is required</div>
-          <div *ngIf="email.errors?.['email']">
-            Email must be a valid email address
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <label for="password">Password</label>
-        <input
-          type="password"
-          class="form-control"
-          name="password"
-          [(ngModel)]="form.password"
-          required
-          minlength="6"
-          #password="ngModel"
-        />
-        <div class="alert-danger" *ngIf="password.errors && f.submitted">
-          <div *ngIf="password.errors?.['required']">Password is required</div>
-          <div *ngIf="password.errors?.['minlength']">
-            Password must be at least 6 characters
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <label for="password">Confirm Password</label>
-        <input
-          type="password"
-          class="form-control"
-          name="passwordRepeat"
-          [(ngModel)]="form.password"
-          required
-          minlength="6"
-          #passwordRepeat="ngModel"
-        />
-        <div class="alert-danger" *ngIf="password.errors && f.submitted">
-          <div *ngIf="passwordRepeat.errors?.['required']">
-            Confirmation is required
-          </div>
-        </div>
-      </div>
-      <div class="form-group">
-        <button class="btn btn-primary btn-block">Sign Up</button>
-      </div>
-      <div class="alert alert-warning" *ngIf="f.submitted && isSignUpFailed">
-        Signup failed!<br />{{ errorMessage }}
-      </div>
-    </form>
-    <div class="alert alert-success" *ngIf="isSuccessful">
-      Your registration is successful!
-    </div>
-    <button class="btn btn-secondary btn-block" routerLink="/login">
-      Go Back
-    </button>
-  </div>
-</div>
-
-
- -
-

- ./register.component.scss -

-
.login-container {
-  margin: auto;
-  width: 60vh;
-  padding-top: 10vh;
-}
-
-.no-border {
-  border: none;
-}
-
-.backgorund {
-  background-color: #181a1b;
-  color: white;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -631,32 +688,9 @@ export class RegisterComponent {
-
- - - - - - - - - - @@ -666,17 +700,20 @@ export class RegisterComponent { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/components/UserDialogComponent.html b/frontend/documentation/components/UserDialogComponent.html index cdcd271..059c115 100644 --- a/frontend/documentation/components/UserDialogComponent.html +++ b/frontend/documentation/components/UserDialogComponent.html @@ -8,59 +8,395 @@ - - +
-
- - - -
-

+

+ +
+

File

@@ -69,12 +405,9 @@ - - -

Metadata

- + @@ -87,6 +420,7 @@ + @@ -94,312 +428,157 @@ - + - + - - - - - -
selector app-user-dialog
styleUrls./user-dialog.component.scssuser-dialog.component.scss
templateUrl./user-dialog.component.htmluser-dialog.component.html
-
-

Index

- - - - - - - - - - - - - - - - - - - - -
-
Properties
-
- -
-
Methods
-
- -
-
-

Constructor

- - - - - +

Constructor

+
-constructor(dataService: DataService, dialog: MatDialog, dialogRef: MatDialogRef<UserDialogComponent>, data: TransactionData) -
+ + + + + + +
+ constructor(dataService: any, dialog: MatDialog, dialogRef: any, data: TransactionData) +
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ onSubmit +
+ onSubmit() +
+
+ Returns: void + +
+
+
+ +
+

Properties

+ + + + + + + + - - - - - -
+ countValid +
+ countValid: boolean + +
- + Default value: true
-
- Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptional
dataService - DataService - - No -
dialog - MatDialog - - No -
dialogRef - MatDialogRef<UserDialogComponent> - - No -
data - TransactionData - - No -
-
-
-
- - - - - -
- -

- Methods -

- - - - - - - - - - - - - - - - - - - -
- - - onSubmit - - -
-onSubmit() -
- -
- -
- Returns : void - -
-
-
-
- -

- Properties -

- - - - - - - - - - - + +
- - - Public - data - - -
- Type : TransactionData - -
- Decorators : -
- - @Inject(MAT_DIALOG_DATA)
-
-
+ + - - - -
- + data
- - - - - - - - - - - -
- - - Public - dialog - - -
- Type : MatDialog - -
- + data: TransactionData +
- - - - - - - - + +
- - - Public - dialogRef - - -
- Type : MatDialogRef<UserDialogComponent> - -
+ + - - - -
- + dialog
-
- + + + dialog: MatDialog + + + + + + + + + + + + + + +
+ dialogRef +
+ dialogRef: any + +
+ + + + + + + + + + + + +
+ priceValid +
+ priceValid: boolean + +
+ Default value: true +
+
- - -
-
import { Component, Inject, OnInit } from '@angular/core';
+        
+
import { Component, Inject, OnInit } from '@angular/core';
+import { FormControl } from '@angular/forms';
 import {
   MatDialog,
   MatDialogRef,
@@ -422,159 +601,44 @@ export class UserDialogComponent {
     @Inject(MAT_DIALOG_DATA) public data: TransactionData
   ) {}
 
+  countValid = true;
+  priceValid = true;
+
   onSubmit() {
-    //TODO check that price is decimal
-    console.log(
-      this.dataService
-        .createTransaction(
-          this.data.comment,
-          this.data.isin,
-          this.data.time,
-          +this.data.count,
-          +this.data.price.toFixed(2)
-        )
-        .subscribe((data) => {
-          console.log(data);
-        })
-    );
-    this.dialog.closeAll();
+    console.log(!isNaN(this.data.count));
+    if (!isNaN(this.data.count) && !isNaN(this.data.price)) {
+      this.priceValid = true;
+      this.countValid = true;
+      console.log(
+        this.dataService
+          .createTransaction(
+            this.data.comment,
+            this.data.isin,
+            this.data.time,
+            +this.data.count,
+            +this.data.price.toFixed(2) * -1
+          )
+          .subscribe((data) => {
+            console.log(data);
+          })
+      );
+      this.dialog.closeAll();
+    } else if (isNaN(this.data.count) && !isNaN(this.data.price)) {
+      this.priceValid = true;
+      this.countValid = false;
+    } else if (!isNaN(this.data.count) && isNaN(this.data.price)) {
+      this.priceValid = false;
+      this.countValid = true;
+    } else {
+      this.countValid = false;
+      this.priceValid = false;
+    }
   }
 }
 
-
- -
-
<h1 mat-dialog-title>Neue Transaktion hinzufügen</h1>
-<form
-  name="form"
-  (ngSubmit)="f.form.valid && onSubmit()"
-  #f="ngForm"
-  novalidate
-  class="backgorund"
->
-  <div class="form-group">
-    <label for="comment">Comment</label>
-    <input
-      type="comment"
-      class="form-control"
-      name="comment"
-      [(ngModel)]="data.comment"
-      required
-      comment
-      #comment="ngModel"
-    />
-  </div>
-  <div class="form-group">
-    <label for="isin">isin</label>
-    <input
-      type="isin"
-      class="form-control"
-      name="isin"
-      [(ngModel)]="data.isin"
-      required
-      isin
-      #isin="ngModel"
-    />
-  </div>
-  <div class="form-group">
-    <label for="time">Time</label>
-    <input
-      type="date"
-      class="form-control"
-      name="time"
-      [(ngModel)]="data.time"
-      required
-      time
-      #time="ngModel"
-    />
-  </div>
-  <div class="form-group">
-    <label for="count">Count</label>
-    <input
-      type="count"
-      class="form-control"
-      name="count"
-      [(ngModel)]="data.count"
-      required
-      count
-      #count="ngModel"
-    />
-  </div>
-  <div class="form-group">
-    <label for="price">Price</label>
-    <input
-      class="form-control"
-      name="price"
-      [(ngModel)]="data.price"
-      required
-      #price="ngModel"
-      type="number"
-    />
-  </div>
-  <div class="form-group footer-buttons">
-    <button class="btn btn-danger btn-block" mat-dialog-close>Cancel</button>
-    <span class="spacer"></span>
-    <button class="btn btn-primary btn-block">Confirm</button>
-  </div>
-</form>
-
-
- -
-

- ./user-dialog.component.scss -

-
.spacer {
-  flex-grow: 1;
-  width: 5%;
-}
-
-.footer-buttons {
-  display: flex;
-  width: 100%;
-}
-
-
- -
-
-
-
- Legend -
-
-
Html element -
-
-
Component -
-
-
Html element with directive -
- -
- - - - - - - - - - - - - - @@ -594,32 +658,9 @@ export class UserDialogComponent {
-
- - - - - - - - - - @@ -629,17 +670,20 @@ export class UserDialogComponent { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/coverage.html b/frontend/documentation/coverage.html index 6fdc437..b34914b 100644 --- a/frontend/documentation/coverage.html +++ b/frontend/documentation/coverage.html @@ -8,26 +8,374 @@ - - +
-
@@ -40,510 +388,343 @@ - - - - - - - - - -
- +
+ Project + 31%
- +
- + - - - - - - - - + - + - - - - - - - - - + + - + - - - + + - + - - - - - - - - - - - - - - - + + - + - - - - - - - - - + + - + - - - - - - - - - + + - + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
File Type IdentifierStatementsStatements
- - src/app/Helpers/auth.interceptor.ts + src/app/Helpers/auth.interceptor.ts interceptorAuthInterceptor - 0 % - (0/3) -
- - src/app/Helpers/auth.interceptor.ts + injectable variableauthInterceptorProviders + + AuthInterceptor + 0 % (0/1)
- - src/app/Helpers/auth.interceptor.ts - variableTOKEN_HEADER_KEY - 0 % - (0/1) -
- src/app/Helpers/helper.service.ts injectableHelperService - 0 % - (0/5) + + injectable + + HelperService + + 66 % + (2/3)
- src/app/Services/auth.service.ts injectableAuthService - 0 % - (0/4) + + injectable + + AuthService + + 100 % + (2/2)
- - src/app/Services/auth.service.ts - variableAUTH_API - 0 % - (0/1) -
- - src/app/Services/auth.service.ts - variablehttpOptions - 0 % - (0/1) -
- src/app/Services/bot.service.ts injectableBotService - 0 % - (0/8) + + injectable + + BotService + + 100 % + (6/6)
- - src/app/Services/bot.service.ts - variableAPI_URL - 0 % - (0/1) -
- src/app/Services/data.service.ts injectableDataService - 0 % - (0/6) + + injectable + + DataService + + 100 % + (4/4)
- - src/app/Services/data.service.ts - variableAPI_URL - 0 % - (0/1) -
- src/app/Services/profile.service.ts injectableProfileService - 0 % - (0/6) + + injectable + + ProfileService + + 100 % + (4/4)
- - src/app/Services/profile.service.ts - variableAPI_URL - 0 % - (0/1) -
- src/app/Services/token.service.ts injectableTokenStorageService - 0 % - (0/7) + + injectable + + TokenStorageService + + 100 % + (5/5)
- - src/app/Services/token.service.ts - variableTOKEN_KEY - 0 % - (0/1) -
- - src/app/Services/token.service.ts - variableUSER_KEY - 0 % - (0/1) -
- src/app/Views/bot-settings/bot-settings.component.ts componentBotSettingsComponent - 0 % - (0/14) -
- - src/app/Views/bot-settings/bot-settings.component.ts + component interfaceFruit - 0 % - (0/2) -
- - src/app/Views/bot-settings/bot-settings.component.ts + BotSettingsComponent interfaceKeyword - 0 % - (0/2) -
- - src/app/Views/bot-settings/bot-settings.component.ts - interfaceShare - 0 % - (0/2) -
- - src/app/Views/dashboard/dashboard.component.ts - componentDashboardComponent - 0 % - (0/19) -
- - src/app/Views/dashboard/dashboard.component.ts - interfacePeriodicElement - 0 % - (0/5) -
- - src/app/Views/dashboard/dashboard.component.ts - interfaceStock - 0 % - (0/5) -
- - src/app/Views/dashboard/dashboard.component.ts - interfaceTransactionData - 0 % - (0/6) -
- - src/app/Views/dashboard/dashboard.component.ts - variableELEMENT_DATA - 0 % - (0/1) -
- - src/app/Views/dashboard/dashboard.component.ts - variableSTOCK_DATA - 0 % - (0/1) -
- - src/app/Views/dashboard/dashboard.component.ts - variableTRANSACTION_DATA - 0 % - (0/1) -
- - src/app/Views/dashboard/user-dialog/user-dialog.component.ts - componentUserDialogComponent - 0 % - (0/6) -
- - src/app/Views/header/header.component.ts - componentHeaderComponent - 0 % - (0/3) -
- - src/app/Views/login/login.component.ts - componentLoginComponent - 0 % - (0/10) -
- - src/app/Views/profile/confirmation-dialog/confirmation-dialog.component.ts - componentConfirmationDialogComponent - 0 % - (0/4) -
- - src/app/Views/profile/help-dialog/help-dialog.component.ts - componentHelpDialogComponent - 0 % - (0/3) -
- - src/app/Views/profile/profile.component.ts - componentProfileComponent + 0 % (0/13)
- - src/app/Views/register/register.component.ts + src/app/Views/bot-settings/bot-settings.component.ts componentRegisterComponent + + interface + + Keyword + 0 % - (0/7) + (0/1) +
+ src/app/Views/bot-settings/bot-settings.component.ts + + interface + + Share + + 0 % + (0/1) +
+ src/app/Views/dashboard/dashboard.component.ts + + component + + DashboardComponent + + 6 % + (1/16) +
+ src/app/Views/dashboard/dashboard.component.ts + + interface + + Stock + + 0 % + (0/5) +
+ src/app/Views/dashboard/dashboard.component.ts + + interface + + TransactionData + + 0 % + (0/5)
- + src/app/Views/dashboard/user-dialog/user-dialog.component.ts + + component + + UserDialogComponent + + 42 % + (3/7) +
+ src/app/Views/header/header.component.ts + + component + + HeaderComponent + + 0 % + (0/2) +
+ src/app/Views/login/login.component.ts + + component + + LoginComponent + + 0 % + (0/8) +
+ src/app/Views/profile/confirmation-dialog/confirmation-dialog.component.ts + + component + + ConfirmationDialogComponent + + 0 % + (0/3) +
+ src/app/Views/profile/help-dialog/help-dialog.component.ts + + component + + HelpDialogComponent + + 0 % + (0/2) +
+ src/app/Views/profile/profile.component.ts + + component + + ProfileComponent + + 9 % + (1/11) +
+ src/app/Views/register/register.component.ts + + component + + RegisterComponent + + 14 % + (1/7) +
src/app/app.component.ts componentAppComponent - 40 % - (2/5) -
- - src/environments/environment.prod.ts + component variableenvironment - 0 % - (0/1) -
- - src/environments/environment.ts + AppComponent variableenvironment - 0 % - (0/1) -
- - src/test.ts - variablecontext - 0 % - (0/1) -
- - src/test.ts - variablerequire - 0 % - (0/1) + + 25 % + (1/4)
- - - -

results matching ""

@@ -554,32 +735,9 @@
-
- - - - - - - - - - @@ -589,17 +747,20 @@ - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/fonts/FontAwesome.otf b/frontend/documentation/fonts/FontAwesome.otf new file mode 100644 index 0000000..d4de13e Binary files /dev/null and b/frontend/documentation/fonts/FontAwesome.otf differ diff --git a/frontend/documentation/fonts/fontawesome-webfont.eot b/frontend/documentation/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..c7b00d2 Binary files /dev/null and b/frontend/documentation/fonts/fontawesome-webfont.eot differ diff --git a/frontend/documentation/fonts/fontawesome-webfont.svg b/frontend/documentation/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..8b66187 --- /dev/null +++ b/frontend/documentation/fonts/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/documentation/fonts/fontawesome-webfont.ttf b/frontend/documentation/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..f221e50 Binary files /dev/null and b/frontend/documentation/fonts/fontawesome-webfont.ttf differ diff --git a/frontend/documentation/fonts/fontawesome-webfont.woff b/frontend/documentation/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c Binary files /dev/null and b/frontend/documentation/fonts/fontawesome-webfont.woff differ diff --git a/frontend/documentation/fonts/fontawesome-webfont.woff2 b/frontend/documentation/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..7eb74fd Binary files /dev/null and b/frontend/documentation/fonts/fontawesome-webfont.woff2 differ diff --git a/frontend/documentation/graph/dependencies.svg b/frontend/documentation/graph/dependencies.svg index 3947480..e7e1527 100644 --- a/frontend/documentation/graph/dependencies.svg +++ b/frontend/documentation/graph/dependencies.svg @@ -1,180 +1,372 @@ - - + dependencies - -dependencies + +dependencies cluster_AppModule - + cluster_AppModule_declarations - + cluster_AppModule_imports - + cluster_AppModule_bootstrap - + AppComponent - -AppComponent + +AppComponent AppModule - -AppModule + +AppModule AppComponent->AppModule - - + + - + -BotSettingsComponent - -BotSettingsComponent +LoginComponent + +LoginComponent - + -BotSettingsComponent->AppModule - - +LoginComponent->AppModule + + - + -ConfirmationDialogComponent - -ConfirmationDialogComponent +HeaderComponent + +HeaderComponent - + -ConfirmationDialogComponent->AppModule - - +HeaderComponent->AppModule + + DashboardComponent - -DashboardComponent + +DashboardComponent DashboardComponent->AppModule - - - - - -HeaderComponent - -HeaderComponent - - - -HeaderComponent->AppModule - - - - - -HelpDialogComponent - -HelpDialogComponent - - - -HelpDialogComponent->AppModule - - - - - -LoginComponent - -LoginComponent - - - -LoginComponent->AppModule - - - - - -ProfileComponent - -ProfileComponent - - - -ProfileComponent->AppModule - - + + - + RegisterComponent - -RegisterComponent + +RegisterComponent - + RegisterComponent->AppModule - - + + + + + +ProfileComponent + +ProfileComponent + + + +ProfileComponent->AppModule + + + + + +BotSettingsComponent + +BotSettingsComponent + + + +BotSettingsComponent->AppModule + + - + UserDialogComponent - -UserDialogComponent + +UserDialogComponent - + UserDialogComponent->AppModule - - + + + + + +ConfirmationDialogComponent + +ConfirmationDialogComponent + + + +ConfirmationDialogComponent->AppModule + + + + + +HelpDialogComponent + +HelpDialogComponent + + + +HelpDialogComponent->AppModule + + - + AppComponent - -AppComponent + +AppComponent - + AppModule->AppComponent - - + + + + + +BrowserModule + +BrowserModule + + + +BrowserModule->AppModule + + - + AppRoutingModule - -AppRoutingModule + +AppRoutingModule - + AppRoutingModule->AppModule - - + + + + + +BrowserAnimationsModule + +BrowserAnimationsModule + + + +BrowserAnimationsModule->AppModule + + + + + +MatToolbarModule + +MatToolbarModule + + + +MatToolbarModule->AppModule + + + + + +MatIconModule + +MatIconModule + + + +MatIconModule->AppModule + + + + + +MatButtonModule + +MatButtonModule + + + +MatButtonModule->AppModule + + + + + +MatGridListModule + +MatGridListModule + + + +MatGridListModule->AppModule + + + + + +MatCardModule + +MatCardModule + + + +MatCardModule->AppModule + + + + + +MatTableModule + +MatTableModule + + + +MatTableModule->AppModule + + + + + +FormsModule + +FormsModule + + + +FormsModule->AppModule + + + + + +HttpClientModule + +HttpClientModule + + + +HttpClientModule->AppModule + + + + + +MatMenuModule + +MatMenuModule + + + +MatMenuModule->AppModule + + + + + +MatDialogModule + +MatDialogModule + + + +MatDialogModule->AppModule + + + + + +MatInputModule + +MatInputModule + + + +MatInputModule->AppModule + + + + + +ReactiveFormsModule + +ReactiveFormsModule + + + +ReactiveFormsModule->AppModule + + + + + +MatChipsModule + +MatChipsModule + + + +MatChipsModule->AppModule + + + + + +CronEditorModule + +CronEditorModule + + + +CronEditorModule->AppModule + + diff --git a/frontend/documentation/images/compodoc.png b/frontend/documentation/images/compodoc.png new file mode 100644 index 0000000..9c85608 Binary files /dev/null and b/frontend/documentation/images/compodoc.png differ diff --git a/frontend/documentation/images/compodoc.svg b/frontend/documentation/images/compodoc.svg new file mode 100644 index 0000000..e841815 --- /dev/null +++ b/frontend/documentation/images/compodoc.svg @@ -0,0 +1,185 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + compo + doc + + diff --git a/frontend/documentation/index.html b/frontend/documentation/index.html index fb0a4af..31adf3e 100644 --- a/frontend/documentation/index.html +++ b/frontend/documentation/index.html @@ -8,29 +8,376 @@ - - +
- -
+
-

Aktienbot

This project was generated with Angular CLI version 13.2.5.

Development server

@@ -56,15 +403,6 @@ - - - - - - - - -
@@ -76,32 +414,9 @@
-
- - - - - - - - - - @@ -111,17 +426,20 @@ - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/AuthInterceptor.html b/frontend/documentation/injectables/AuthInterceptor.html new file mode 100644 index 0000000..523dab0 --- /dev/null +++ b/frontend/documentation/injectables/AuthInterceptor.html @@ -0,0 +1,531 @@ + + + + + + aktienbot documentation + + + + + + + + + + + + +
+
+ +
+
+ + + + + + + + +
+
+

+

File

+

+

+ src/app/Helpers/auth.interceptor.ts +

+ + +
+

Constructor

+ + + + + + + +
+ constructor(token: TokenStorageService) +
+
+ +
+

Methods

+ + + + + + + + + + + + + + +
+ intercept +
+ intercept(req: HttpRequest, next: HttpHandler) +
+
+ Returns: any + +
+
+
+ +
+
+
import { HTTP_INTERCEPTORS, HttpEvent } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import {
+  HttpInterceptor,
+  HttpHandler,
+  HttpRequest,
+} from '@angular/common/http';
+import { TokenStorageService } from '../Services/token.service';
+import { Observable } from 'rxjs';
+const TOKEN_HEADER_KEY = 'Authorization';
+@Injectable()
+export class AuthInterceptor implements HttpInterceptor {
+  constructor(private token: TokenStorageService) {}
+  intercept(
+    req: HttpRequest<any>,
+    next: HttpHandler
+  ): Observable<HttpEvent<any>> {
+    let authReq = req;
+    const token = this.token.getToken();
+    if (token != null) {
+      authReq = req.clone({
+        headers: req.headers.set(TOKEN_HEADER_KEY, 'Bearer ' + token),
+      });
+    }
+    return next.handle(authReq);
+  }
+}
+export const authInterceptorProviders = [
+  { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
+];
+
+
+
+ + + + + + + +
+
+

results matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/documentation/injectables/AuthService.html b/frontend/documentation/injectables/AuthService.html index 9852d7a..8914865 100644 --- a/frontend/documentation/injectables/AuthService.html +++ b/frontend/documentation/injectables/AuthService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,277 +406,137 @@

    - - +
    +

    Constructor

    + + + + + + + +
    + constructor(http: HttpClient) +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - - - - -
    -constructor(http: HttpClient) -
    - -
    -
    - Parameters : - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    http - HttpClient - - No -
    -
    -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - login - - -
    -login(email: string, password: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    email - string - - No -
    password - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - register - - -
    -register(email: string, username: string, password: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    email - string - - No -
    username - string - - No -
    password - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + login +
    + login(email: string, password: string) +
    +

    Function to login user

    +
    +
    + Parameters : +
      +
    • +
      + email +
      +
      + +
      +
    • +
    • +
      + password +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + register +
    + register(email: string, username: string, password: string) +
    +

    Function to register user

    +
    +
    + Parameters : +
      +
    • +
      + email +
      +
      + +
      +
    • +
    • +
      + username +
      +
      + +
      +
    • +
    • +
      + password +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    +
    - - -
    -
    import { Injectable } from '@angular/core';
    +    
    +
    import { Injectable } from '@angular/core';
     import { HttpClient, HttpHeaders } from '@angular/common/http';
     import { Observable } from 'rxjs';
     const AUTH_API = 'https://gruppe1.testsites.info/api/user';
    @@ -348,6 +552,7 @@ export class AuthService {
       constructor(private http: HttpClient) {}
     
       /**
    +   * Function to login user
        * @param  {string} email
        * @param  {string} password
        * @returns Observable
    @@ -360,6 +565,7 @@ export class AuthService {
       }
     
       /**
    +   * Function to register user
        * @param  {string} email
        * @param  {string} username
        * @param  {string} password
    @@ -379,7 +585,6 @@ export class AuthService {
     }
     
    -
    @@ -388,12 +593,6 @@ export class AuthService { - - - - - -

    results matching ""

    @@ -404,32 +603,9 @@ export class AuthService {
    -
    - - - - - - - - - - @@ -439,17 +615,20 @@ export class AuthService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/BotService.html b/frontend/documentation/injectables/BotService.html index 0ce4e61..c504b13 100644 --- a/frontend/documentation/injectables/BotService.html +++ b/frontend/documentation/injectables/BotService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,521 +406,281 @@

    - - +
    +

    Constructor

    + + + + + + + +
    + constructor(http: HttpClient, tokenStorage: TokenStorageService) +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - - - - -
    -constructor(http: HttpClient, tokenStorage: TokenStorageService) -
    - -
    -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    http - HttpClient - - No -
    tokenStorage - TokenStorageService - - No -
    -
    -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - Public - createKeyword - - -
    - - createKeyword(keyword: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    keyword - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - createShare - - -
    - - createShare(isin: string, comment: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    isin - string - - No -
    comment - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - deleteKeyword - - -
    - - deleteKeyword(keyword: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    keyword - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - deleteShare - - -
    - - deleteShare(symbol: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    symbol - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getKeywords - - -
    - - getKeywords() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getSymbols - - -
    - - getSymbols() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + Public getKeywords +
    + + + + getKeywords() +
    +

    Function to get all keywords

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public createKeyword +
    + + + + createKeyword(keyword: string) +
    +

    Function to create a keyword

    +
    +
    + Parameters : +
      +
    • +
      + keyword +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public deleteKeyword +
    + + + + deleteKeyword(keyword: string) +
    +

    Function to delete a keyword

    +
    +
    + Parameters : +
      +
    • +
      + keyword +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public getSymbols +
    + + + + getSymbols() +
    +

    Function to get all shares

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public createShare +
    + + + + createShare(isin: string, comment: string) +
    +

    Function to create a share

    +
    +
    + Parameters : +
      +
    • +
      + keyword +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public deleteShare +
    + + + + deleteShare(symbol: string) +
    +

    Function to delete a share

    +
    +
    + Parameters : +
      +
    • +
      + symbol +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    +
    - - -
    -
    import { HttpClient, HttpHeaders } from '@angular/common/http';
    +    
    +
    import { HttpClient, HttpHeaders } from '@angular/common/http';
     import { Injectable } from '@angular/core';
     import { Observable } from 'rxjs';
     import { TokenStorageService } from './token.service';
    @@ -593,6 +697,7 @@ export class BotService {
       ) {}
     
       /**
    +   * Function to get all keywords
        * @returns Observable
        */
       public getKeywords(): Observable<any> {
    @@ -606,6 +711,7 @@ export class BotService {
       }
     
       /**
    +   * Function to create a keyword
        * @param  {string} keyword
        * @returns Observable
        */
    @@ -625,6 +731,7 @@ export class BotService {
       }
     
       /**
    +   * Function to delete a keyword
        * @param  {string} keyword
        * @returns Observable
        */
    @@ -641,6 +748,7 @@ export class BotService {
       }
     
       /**
    +   * Function to get all shares
        * @returns Observable
        */
       public getSymbols(): Observable<any> {
    @@ -654,6 +762,7 @@ export class BotService {
       }
     
       /**
    +   * Function to create a share
        * @param  {string} keyword
        * @returns Observable
        */
    @@ -674,6 +783,7 @@ export class BotService {
       }
     
       /**
    +   * Function to delete a share
        * @param  {string} symbol
        * @returns Observable
        */
    @@ -691,7 +801,6 @@ export class BotService {
     }
     
    -
    @@ -700,12 +809,6 @@ export class BotService { - - - - - -

    results matching ""

    @@ -716,32 +819,9 @@ export class BotService {
    -
    - - - - - - - - - - @@ -751,17 +831,20 @@ export class BotService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/DataService.html b/frontend/documentation/injectables/DataService.html index 61a3299..30727bc 100644 --- a/frontend/documentation/injectables/DataService.html +++ b/frontend/documentation/injectables/DataService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,378 +406,233 @@

    - - +
    +

    Constructor

    + + + + + + + + + + +
    + constructor(http: HttpClient, tokenStorage: TokenStorageService) +
    +
    + Parameters : +
      +
    • +
      + privatehttp + : HttpClient + +
      +
      + +
      +
    • +
    • +
      + privatetokenStorage + : TokenStorageService + +
      +
      + +
      +
    • +
    +
    +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - - - - -
    -constructor(http: HttpClient, tokenStorage: TokenStorageService) -
    - -
    -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    http - HttpClient - - No -
    tokenStorage - TokenStorageService - - No -
    -
    -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - Public - createTransaction - - -
    - - createTransaction(comment: string, isin: string, time: string, count: number, price: number) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    comment - string - - No -
    isin - string - - No -
    time - string - - No -
    count - number - - No -
    price - number - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getKeywords - - -
    - - getKeywords() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getStockData - - -
    - - getStockData() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getTransactionData - - -
    - - getTransactionData() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + Public getStockData +
    + + + + getStockData() +
    +

    Function to get all portfolio data

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public getTransactionData +
    + + + + getTransactionData() +
    +

    Function to get all transaction data

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public createTransaction +
    + + + + createTransaction(comment: string, isin: string, time: string, count: number, price: number) +
    +

    Function to create a transaction

    +
    +
    + Parameters : +
      +
    • +
      + symbol +
      +
      + +
      +
    • +
    • +
      + time + : Date + +
      +
      + +
      +
    • +
    • +
      + count +
      +
      + +
      +
    • +
    • +
      + price +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public getKeywords +
    + + + + getKeywords() +
    +

    Function to get all keywords

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    +
    - - -
    -
    import { Injectable, OnInit } from '@angular/core';
    +    
    +
    import { Injectable, OnInit } from '@angular/core';
     import { HttpClient, HttpHeaders } from '@angular/common/http';
     import { delay, Observable } from 'rxjs';
     import { TokenStorageService } from './token.service';
    @@ -452,6 +651,7 @@ export class DataService {
       ) {}
     
       /**
    +   * Function to get all portfolio data
        * @returns Observable
        */
       public getStockData(): Observable<any> {
    @@ -465,6 +665,7 @@ export class DataService {
       }
     
       /**
    +   * Function to get all transaction data
        * @returns Observable
        */
       public getTransactionData(): Observable<any> {
    @@ -478,6 +679,7 @@ export class DataService {
       }
     
       /**
    +   * Function to create a transaction
        * @param  {string} symbol
        * @param  {Date} time
        * @param  {number} count
    @@ -512,6 +714,7 @@ export class DataService {
       }
     
       /**
    +   * Function to get all keywords
        * @returns Observable
        */
       public getKeywords(): Observable<any> {
    @@ -526,7 +729,6 @@ export class DataService {
     }
     
    -
    @@ -535,12 +737,6 @@ export class DataService { - - - - - -

    results matching ""

    @@ -551,32 +747,9 @@ export class DataService {
    -
    - - - - - - - - - - @@ -586,17 +759,20 @@ export class DataService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/HelperService.html b/frontend/documentation/injectables/HelperService.html index c76971b..5adf041 100644 --- a/frontend/documentation/injectables/HelperService.html +++ b/frontend/documentation/injectables/HelperService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,247 +406,131 @@

    - - +
    +

    Constructor

    + + + + + + + +
    + constructor(botService: BotService) +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - - - - -
    -constructor(botService: BotService) -
    - -
    -
    - Parameters : - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    botService - BotService - - No -
    -
    -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - delay - - -
    -delay(ms: number) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    ms - number - - No -
    -
    -
    -
    -
    - Returns : any - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - formatKeywordsData - - -
    -formatKeywordsData() -
    - -
    - -
    - Returns : Keyword[] - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - formatShareData - - -
    -formatShareData() -
    - -
    - -
    - Returns : Share[] - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + delay +
    + delay(ms: number) +
    +

    Function to delay loading of webpage for a smoother user experience

    +
    +
    + Parameters : +
      +
    • +
      + ms +
      +
      + +
      +
    • +
    +
    +
    + Returns: void + +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + formatShareData +
    + formatShareData() +
    +

    Function to format share data

    +
    +
    +
    +
    + Returns: Share[] + +
    +
    +

    Share

    + +
    +
    + + + + + + + + + + + + + + +
    + formatKeywordsData +
    + formatKeywordsData() +
    +
    +
    +
    + Returns: Keyword[] + +
    +
    +

    Keyword
    Function to format keyword data

    + +
    +
    +
    - - -
    -
    import { Injectable } from '@angular/core';
    +    
    +
    import { Injectable } from '@angular/core';
     import { BotService } from '../Services/bot.service';
     import { Keyword, Share } from '../Views/bot-settings/bot-settings.component';
     
    @@ -313,12 +541,17 @@ export class HelperService {
       constructor(private botService: BotService) {}
     
       /**
    +   * Function to delay loading of webpage for a smoother user experience
        * @param  {number} ms
        */
       delay(ms: number) {
         return new Promise((resolve) => setTimeout(resolve, ms));
       }
     
    +  /**
    +   * Function to format share data
    +   * @returns Share
    +   */
       formatShareData(): Share[] {
         var shares: Share[] = [];
         this.botService.getSymbols().subscribe((result) => {
    @@ -331,7 +564,10 @@ export class HelperService {
         });
         return shares;
       }
    -
    +  /**
    +   * @returns Keyword
    +   * Function to format keyword data
    +   */
       formatKeywordsData(): Keyword[] {
         var keywords: Keyword[] = [];
         this.botService.getKeywords().subscribe((result) => {
    @@ -347,7 +583,6 @@ export class HelperService {
     }
     
    -
    @@ -356,12 +591,6 @@ export class HelperService { - - - - - -

    results matching ""

    @@ -372,32 +601,9 @@ export class HelperService {
    -
    - - - - - - - - - - @@ -407,17 +613,20 @@ export class HelperService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/ProfileService.html b/frontend/documentation/injectables/ProfileService.html index 6aece76..a403a74 100644 --- a/frontend/documentation/injectables/ProfileService.html +++ b/frontend/documentation/injectables/ProfileService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,396 +406,208 @@

    - - +
    +

    Constructor

    + + + + + + + +
    + constructor(tokenStorage: TokenStorageService, http: HttpClient) +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - - - - -
    -constructor(tokenStorage: TokenStorageService, http: HttpClient) -
    - -
    -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    tokenStorage - TokenStorageService - - No -
    http - HttpClient - - No -
    -
    -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - Public - addCronString - - -
    - - addCronString(cron: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    cron - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - addTelegramId - - -
    - - addTelegramId(telegram_user_id: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    telegram_user_id - string - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getUserData - - -
    - - getUserData() -
    - -
    - -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - updateProfile - - -
    - - updateProfile(username: string, password: number) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    username - string - - No -
    password - number - - No -
    -
    -
    -
    -
    - Returns : Observable<any> - -
    -
    -

    Observable

    - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + Public getUserData +
    + + + + getUserData() +
    +

    Function to get all Userdata

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public updateProfile +
    + + + + updateProfile(username: string, password: number) +
    +

    Function to update user profile

    +
    +
    + Parameters : +
      +
    • +
      + username +
      +
      + +
      +
    • +
    • +
      + password +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public addTelegramId +
    + + + + addTelegramId(telegram_user_id: string) +
    +

    Function to add a telegram id

    +
    +
    + Parameters : +
      +
    • +
      + telegramUserID +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    + + + + + + + + + + + + + + +
    + Public addCronString +
    + + + + addCronString(cron: string) +
    +

    Function to add a cron string for automatic updates

    +
    +
    + Parameters : +
      +
    • +
      + cronString +
      +
      + +
      +
    • +
    +
    +
    + Returns: any + +
    +
    +

    Observable

    + +
    +
    +
    - - -
    -
    import { HttpClient, HttpHeaders } from '@angular/common/http';
    +    
    +
    import { HttpClient, HttpHeaders } from '@angular/common/http';
     import { Injectable } from '@angular/core';
     import { Observable } from 'rxjs';
     import { TokenStorageService } from './token.service';
    @@ -468,6 +624,7 @@ export class ProfileService {
       ) {}
     
       /**
    +   * Function to get all Userdata
        * @returns Observable
        */
       public getUserData(): Observable<any> {
    @@ -481,6 +638,7 @@ export class ProfileService {
       }
     
       /**
    +   * Function to update user profile
        * @param  {string} username
        * @param  {number} password
        * @returns Observable
    @@ -502,6 +660,7 @@ export class ProfileService {
       }
     
       /**
    +   * Function to add a telegram id
        * @param  {string} telegramUserID
        * @returns Observable
        */
    @@ -521,6 +680,7 @@ export class ProfileService {
       }
     
       /**
    +   * Function to add a cron string for automatic updates
        * @param  {string} cronString
        * @returns Observable
        */
    @@ -541,7 +701,6 @@ export class ProfileService {
     }
     
    -
    @@ -550,12 +709,6 @@ export class ProfileService { - - - - - -

    results matching ""

    @@ -566,32 +719,9 @@ export class ProfileService {
    -
    - - - - - - - - - - @@ -601,17 +731,20 @@ export class ProfileService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/injectables/TokenStorageService.html b/frontend/documentation/injectables/TokenStorageService.html index 0806c01..2ec1b7a 100644 --- a/frontend/documentation/injectables/TokenStorageService.html +++ b/frontend/documentation/injectables/TokenStorageService.html @@ -8,52 +8,396 @@ - - +
    -
    - - - -
    -
    +

    File

    @@ -62,361 +406,221 @@

    - - +
    +

    Constructor

    + + + + + + + +
    + constructor() +
    +
    -

    Index

    - - - - - - - - - - - - - - - -
    -
    Methods
    -
    - -
    -
    - -
    -

    Constructor

    - - - - - - - - - - -
    -constructor() -
    - -
    -
    - -
    - -

    - Methods -

    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getToken - - -
    - - getToken() -
    - -
    - -
    -
    -
    - Returns : string | null - -
    -
    -

    string

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - getUser - - -
    - - getUser() -
    - -
    - -
    -
    -
    - Returns : any - -
    -
    -

    any

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - saveToken - - -
    - - saveToken(token: string) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    token - string - - No -
    -
    -
    -
    -
    - Returns : void - -
    -
    -

    void

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - Public - saveUser - - -
    - - saveUser(user: any) -
    - -
    - -
    - Parameters : - - - - - - - - - - - - - - - - - - - -
    NameTypeOptional
    user - any - - No -
    -
    -
    -
    -
    - Returns : void - -
    -
    -

    void

    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - signOut - - -
    -signOut() -
    - -
    - -
    -
    -
    - Returns : void - -
    -
    -

    void

    - -
    -
    -
    +

    Methods

    + + + + + + + + + + + + + + +
    + signOut +
    + signOut() +
    +

    Function to sign out user

    +
    +
    +
    +
    + Returns: void + +
    +
    +

    void

    + +
    +
    + + + + + + + + + + + + + + +
    + Public saveToken +
    + + + + saveToken(token: string) +
    +

    Function to save token

    +
    +
    + Parameters : +
      +
    • +
      + token +
      +
      + +
      +
    • +
    +
    +
    + Returns: void + +
    +
    +

    void

    + +
    +
    + + + + + + + + + + + + + + +
    + Public getToken +
    + + + + getToken() +
    +

    Function to get token

    +
    +
    +
    +
    + Returns: string + +
    +
    +

    string

    + +
    +
    + + + + + + + + + + + + + + +
    + Public saveUser +
    + + + + saveUser(user: any) +
    +

    Function to save user

    +
    +
    + Parameters : +
      +
    • +
      + user +
      +
      + +
      +
    • +
    +
    +
    + Returns: void + +
    +
    +

    void

    + +
    +
    + + + + + + + + + + + + + + +
    + Public getUser +
    + + + + getUser() +
    +

    Function to get user

    +
    +
    +
    +
    + Returns: any + +
    +
    +

    any

    + +
    +
    +
    - - -
    -
    import { Injectable } from '@angular/core';
    +    
    +
    import { Injectable } from '@angular/core';
     const TOKEN_KEY = 'auth-token';
     const USER_KEY = 'auth-user';
     @Injectable({
    @@ -426,6 +630,7 @@ export class TokenStorageService {
       constructor() {}
     
       /**
    +   * Function to sign out user
        * @returns void
        */
       signOut(): void {
    @@ -433,6 +638,7 @@ export class TokenStorageService {
       }
     
       /**
    +   * Function to save token
        * @param  {string} token
        * @returns void
        */
    @@ -442,6 +648,7 @@ export class TokenStorageService {
       }
     
       /**
    +   * Function to get token
        * @returns string
        */
       public getToken(): string | null {
    @@ -449,6 +656,7 @@ export class TokenStorageService {
       }
     
       /**
    +   * Function to save user
        * @param  {any} user
        * @returns void
        */
    @@ -458,6 +666,7 @@ export class TokenStorageService {
       }
     
       /**
    +   * Function to get user
        * @returns any
        */
       public getUser(): any {
    @@ -470,7 +679,6 @@ export class TokenStorageService {
     }
     
    -
    @@ -479,12 +687,6 @@ export class TokenStorageService { - - - - - -

    results matching ""

    @@ -495,32 +697,9 @@ export class TokenStorageService {
    -
    - - - - - - - - - - @@ -530,17 +709,20 @@ export class TokenStorageService { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/interfaces/Keyword.html b/frontend/documentation/interfaces/Keyword.html index 93fd80c..4d81681 100644 --- a/frontend/documentation/interfaces/Keyword.html +++ b/frontend/documentation/interfaces/Keyword.html @@ -8,26 +8,374 @@ - - +
    -
    @@ -37,30 +385,22 @@ - - - - - -
    -
    +

    File

    @@ -71,32 +411,6 @@ -
    -

    Index

    - - - - - - - - - -
    -
    Properties
    -
    - -
    -
    - -

    Properties

    @@ -104,41 +418,32 @@ - - name - - - - + name - name: string - + name: string + - Type : string + Type : string - -
    - - -
    -
    import { Component, OnInit } from '@angular/core';
    +    
    +
    import { Component, OnInit } from '@angular/core';
     import { C, COMMA, ENTER, F } from '@angular/cdk/keycodes';
     import { MatChipInputEvent } from '@angular/material/chips';
     
    @@ -149,10 +454,6 @@ import { HelperService } from 'src/app/Helpers/helper.service';
     import { ProfileService } from 'src/app/Services/profile.service';
     import { FormControl } from '@angular/forms';
     
    -export interface Fruit {
    -  name: string;
    -}
    -
     export interface Share {
       isin: string;
     }
    @@ -284,10 +585,6 @@ export class BotSettingsComponent implements OnInit {
     
     
     
    -
    -
    -
    -
                        

    results matching ""

    @@ -298,32 +595,9 @@ export class BotSettingsComponent implements OnInit {
    -
    - - - - - - - - - - @@ -333,17 +607,20 @@ export class BotSettingsComponent implements OnInit { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/interfaces/Share.html b/frontend/documentation/interfaces/Share.html index f76ba97..cca3853 100644 --- a/frontend/documentation/interfaces/Share.html +++ b/frontend/documentation/interfaces/Share.html @@ -8,26 +8,374 @@ - - +
    -
    @@ -37,30 +385,22 @@ - - - - - -
    -
    +

    File

    @@ -71,32 +411,6 @@ -
    -

    Index

    - - - - - - - - - -
    -
    Properties
    -
    - -
    -
    - -

    Properties

    @@ -104,41 +418,32 @@ - - isin - - - - + isin - isin: string - + isin: string + - Type : string + Type : string - -
    - - -
    -
    import { Component, OnInit } from '@angular/core';
    +    
    +
    import { Component, OnInit } from '@angular/core';
     import { C, COMMA, ENTER, F } from '@angular/cdk/keycodes';
     import { MatChipInputEvent } from '@angular/material/chips';
     
    @@ -149,10 +454,6 @@ import { HelperService } from 'src/app/Helpers/helper.service';
     import { ProfileService } from 'src/app/Services/profile.service';
     import { FormControl } from '@angular/forms';
     
    -export interface Fruit {
    -  name: string;
    -}
    -
     export interface Share {
       isin: string;
     }
    @@ -284,10 +585,6 @@ export class BotSettingsComponent implements OnInit {
     
     
     
    -
    -
    -
    -
                        

    results matching ""

    @@ -298,32 +595,9 @@ export class BotSettingsComponent implements OnInit {
    -
    - - - - - - - - - - @@ -333,17 +607,20 @@ export class BotSettingsComponent implements OnInit { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/interfaces/Stock.html b/frontend/documentation/interfaces/Stock.html index ec41650..4174046 100644 --- a/frontend/documentation/interfaces/Stock.html +++ b/frontend/documentation/interfaces/Stock.html @@ -8,26 +8,374 @@ - - +
    -
    @@ -37,30 +385,22 @@ - - - - - -
    -
    +

    File

    @@ -71,50 +411,6 @@ -
    -

    Index

    - - - - - - - - - -
    -
    Properties
    -
    - -
    -
    - -

    Properties

    @@ -122,167 +418,149 @@ - - count - - - - + comment - count: number - + comment: string + - Type : number + Type : string - - - -
    - - currentPrice - - - - + count
    - currentPrice: number - + count: number +
    - Type : number + Type : number
    - -
    - - symbol - - - - + current_price
    - symbol: string - + current_price: number +
    - Type : string + Type : number
    + +
    - - time - - - - + isin
    - time: string - + isin: string +
    - Type : string + Type : string
    + + + + + + + + + + + + + +
    + last_transaction +
    + last_transaction: string + +
    + Type : string + +
    - - -
    -
    import { Component, OnInit } from '@angular/core';
    +    
    +
    import { Component, OnInit } from '@angular/core';
     import { DataService } from 'src/app/Services/data.service';
     import { MatDialog } from '@angular/material/dialog';
     import { UserDialogComponent } from './user-dialog/user-dialog.component';
     import { HelperService } from 'src/app/Helpers/helper.service';
     
    -export interface PeriodicElement {
    -  name: string;
    -  position: number;
    -  weight: number;
    -  symbol: string;
    -}
    -
     export interface Stock {
       count: number;
    -  currentPrice: number;
    -  symbol: string;
    -  time: string;
    +  comment: string;
    +  isin: string;
    +  last_transaction: string;
    +  current_price: number;
     }
     
    -//symbol count lastTransaction boughtPrice currentPrice(+?)
    -
    -const ELEMENT_DATA: PeriodicElement[] = [
    -  { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
    -  { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
    -  { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
    -];
    -
     var TRANSACTION_DATA: TransactionData[] = [];
     var STOCK_DATA: Stock[] = [];
     
    @@ -312,6 +590,12 @@ export class DashboardComponent implements OnInit {
       depotCost: number = 0;
       profit: number = 0;
     
    +  comment: string = '';
    +  isin: string = '';
    +  time: Date = new Date();
    +  count: number = 0.0;
    +  price: number = 0.0;
    +
       getTransactions() {
         var TRANSACTION_DATA: TransactionData[] = [];
         this.dataService.getTransactionData().subscribe((response: any) => {
    @@ -335,24 +619,31 @@ export class DashboardComponent implements OnInit {
       }
     
       ngOnInit() {
    +    /**
    +     * Function gets the stock data and pushes it in the temporary object array
    +     */
         this.dataService.getStockData().subscribe((response: any) => {
           var data = JSON.parse(response);
    +      console.log(data);
           this.depotCurrentValue = 0;
           for (let i = 0; i < data.data.length; i++) {
             this.depotCurrentValue = data.data[i].current_price;
             STOCK_DATA.push({
               count: data.data[i].count,
    -          currentPrice: data.data[i].current_price,
    -          symbol: data.data[i].symbol,
    -          time: data.data[i].last_transaction,
    +          comment: data.data[i].comment,
    +          isin: data.data[i].isin,
    +          last_transaction: data.data[i].last_transaction,
    +          current_price: data.data[i].current_price,
             });
           }
    +      // assign data source
           this.dataSourceStocks = STOCK_DATA;
    -      //TODO move to helper service
    -
           this.profit += this.depotCurrentValue;
         });
     
    +    /**
    +     * Function gets the transaction data and pushes it in the temporary object array
    +     */
         this.dataService.getTransactionData().subscribe((response: any) => {
           var data = JSON.parse(response);
           this.depotCost = 0;
    @@ -366,19 +657,13 @@ export class DashboardComponent implements OnInit {
               price: data.data[i].price,
             });
           }
    +      // assign data source
           this.dataSourceTransactions = TRANSACTION_DATA;
    -      //TODO move to helper service
    -
    -      this.profit -= this.depotCost;
    +      this.profit += this.depotCost;
         });
       }
     
    -  comment: string = '';
    -  isin: string = '';
    -  time: Date = new Date();
    -  count: number = 0.0;
    -  price: number = 0.0;
    -
    +  // function to open the user dialog to create a new transaction
       openDialog(): void {
         const dialogRef = this.dialog.open(UserDialogComponent, {
           width: '50vw',
    @@ -397,6 +682,7 @@ export class DashboardComponent implements OnInit {
         });
       }
     
    +  // assign columns for transactions to display in html, you can change order and add/remove columns
       displayedColumns: string[] = [
         'comment',
         'weight',
    @@ -404,13 +690,15 @@ export class DashboardComponent implements OnInit {
         'name',
         'symbol',
       ];
    +
    +  // assign columns to display in html, you can change order and add/remove columns
       displayedColumnsStocks: string[] = [
    -    'position',
    -    'name',
    -    'weight',
    -    'current-price',
    +    'count',
    +    'comment',
    +    'isin',
    +    'current_price',
    +    'last_transaction',
       ];
    -  dataSource = ELEMENT_DATA;
     }
     
    @@ -419,10 +707,6 @@ export class DashboardComponent implements OnInit { - - - -

    results matching ""

    @@ -433,32 +717,9 @@ export class DashboardComponent implements OnInit {
    -
    - - - - - - - - - - @@ -468,17 +729,20 @@ export class DashboardComponent implements OnInit { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/interfaces/TransactionData.html b/frontend/documentation/interfaces/TransactionData.html index 8dacff2..282d05c 100644 --- a/frontend/documentation/interfaces/TransactionData.html +++ b/frontend/documentation/interfaces/TransactionData.html @@ -8,26 +8,374 @@ - - +
    -
    @@ -37,30 +385,22 @@ - - - - - -
    -
    +

    File

    @@ -71,56 +411,6 @@ -
    -

    Index

    - - - - - - - - - -
    -
    Properties
    -
    - -
    -
    - -

    Properties

    @@ -128,200 +418,149 @@ - - comment - - - - + comment - comment: string - + comment: string + - Type : string + Type : string - - - -
    - - count - - - - + count
    - count: number - + count: number +
    - Type : number + Type : number
    - -
    - - isin - - - - + isin
    - isin: string - + isin: string +
    - Type : string + Type : string
    - -
    - - price - - - - + price
    - price: number - + price: number +
    - Type : number + Type : number
    - -
    - - time - - - - + time
    - time: string - + time: string +
    - Type : string + Type : string
    - - -
    -
    import { Component, OnInit } from '@angular/core';
    +    
    +
    import { Component, OnInit } from '@angular/core';
     import { DataService } from 'src/app/Services/data.service';
     import { MatDialog } from '@angular/material/dialog';
     import { UserDialogComponent } from './user-dialog/user-dialog.component';
     import { HelperService } from 'src/app/Helpers/helper.service';
     
    -export interface PeriodicElement {
    -  name: string;
    -  position: number;
    -  weight: number;
    -  symbol: string;
    -}
    -
     export interface Stock {
       count: number;
    -  currentPrice: number;
    -  symbol: string;
    -  time: string;
    +  comment: string;
    +  isin: string;
    +  last_transaction: string;
    +  current_price: number;
     }
     
    -//symbol count lastTransaction boughtPrice currentPrice(+?)
    -
    -const ELEMENT_DATA: PeriodicElement[] = [
    -  { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
    -  { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
    -  { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
    -];
    -
     var TRANSACTION_DATA: TransactionData[] = [];
     var STOCK_DATA: Stock[] = [];
     
    @@ -351,6 +590,12 @@ export class DashboardComponent implements OnInit {
       depotCost: number = 0;
       profit: number = 0;
     
    +  comment: string = '';
    +  isin: string = '';
    +  time: Date = new Date();
    +  count: number = 0.0;
    +  price: number = 0.0;
    +
       getTransactions() {
         var TRANSACTION_DATA: TransactionData[] = [];
         this.dataService.getTransactionData().subscribe((response: any) => {
    @@ -374,24 +619,31 @@ export class DashboardComponent implements OnInit {
       }
     
       ngOnInit() {
    +    /**
    +     * Function gets the stock data and pushes it in the temporary object array
    +     */
         this.dataService.getStockData().subscribe((response: any) => {
           var data = JSON.parse(response);
    +      console.log(data);
           this.depotCurrentValue = 0;
           for (let i = 0; i < data.data.length; i++) {
             this.depotCurrentValue = data.data[i].current_price;
             STOCK_DATA.push({
               count: data.data[i].count,
    -          currentPrice: data.data[i].current_price,
    -          symbol: data.data[i].symbol,
    -          time: data.data[i].last_transaction,
    +          comment: data.data[i].comment,
    +          isin: data.data[i].isin,
    +          last_transaction: data.data[i].last_transaction,
    +          current_price: data.data[i].current_price,
             });
           }
    +      // assign data source
           this.dataSourceStocks = STOCK_DATA;
    -      //TODO move to helper service
    -
           this.profit += this.depotCurrentValue;
         });
     
    +    /**
    +     * Function gets the transaction data and pushes it in the temporary object array
    +     */
         this.dataService.getTransactionData().subscribe((response: any) => {
           var data = JSON.parse(response);
           this.depotCost = 0;
    @@ -405,19 +657,13 @@ export class DashboardComponent implements OnInit {
               price: data.data[i].price,
             });
           }
    +      // assign data source
           this.dataSourceTransactions = TRANSACTION_DATA;
    -      //TODO move to helper service
    -
    -      this.profit -= this.depotCost;
    +      this.profit += this.depotCost;
         });
       }
     
    -  comment: string = '';
    -  isin: string = '';
    -  time: Date = new Date();
    -  count: number = 0.0;
    -  price: number = 0.0;
    -
    +  // function to open the user dialog to create a new transaction
       openDialog(): void {
         const dialogRef = this.dialog.open(UserDialogComponent, {
           width: '50vw',
    @@ -436,6 +682,7 @@ export class DashboardComponent implements OnInit {
         });
       }
     
    +  // assign columns for transactions to display in html, you can change order and add/remove columns
       displayedColumns: string[] = [
         'comment',
         'weight',
    @@ -443,13 +690,15 @@ export class DashboardComponent implements OnInit {
         'name',
         'symbol',
       ];
    +
    +  // assign columns to display in html, you can change order and add/remove columns
       displayedColumnsStocks: string[] = [
    -    'position',
    -    'name',
    -    'weight',
    -    'current-price',
    +    'count',
    +    'comment',
    +    'isin',
    +    'current_price',
    +    'last_transaction',
       ];
    -  dataSource = ELEMENT_DATA;
     }
     
    @@ -458,10 +707,6 @@ export class DashboardComponent implements OnInit { - - - -

    results matching ""

    @@ -472,32 +717,9 @@ export class DashboardComponent implements OnInit {
    -
    - - - - - - - - - - @@ -507,17 +729,20 @@ export class DashboardComponent implements OnInit { - - - - - - - - - - + + + + + + + + diff --git a/frontend/documentation/js/libs/EventDispatcher.js b/frontend/documentation/js/libs/EventDispatcher.js index f112877..b729f0d 100644 --- a/frontend/documentation/js/libs/EventDispatcher.js +++ b/frontend/documentation/js/libs/EventDispatcher.js @@ -2,4 +2,95 @@ * @author mrdoob / http://mrdoob.com/ */ -var EventDispatcher=function(){};Object.assign(EventDispatcher.prototype,{addEventListener:function(i,t){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[i]&&(e[i]=[]),-1===e[i].indexOf(t)&&e[i].push(t)},hasEventListener:function(i,t){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[i]&&-1!==e[i].indexOf(t)},removeEventListener:function(i,t){if(void 0!==this._listeners){var e=this._listeners[i];if(void 0!==e){var s=e.indexOf(t);-1!==s&&e.splice(s,1)}}},dispatchEvent:function(i){if(void 0!==this._listeners){var t=this._listeners[i.type];if(void 0!==t){i.target=this;var e=[],s=0,n=t.length;for(s=0;s1?t[t.length-1]:void 0:t[0]},this.getActiveContent=function(){var t=this.getActiveTab().getElementsByTagName("A")[0].getAttribute("href").replace("#","");return t&&document.getElementById("c-"+t)},this.tab.addEventListener("click",this.handle,!1)},d=document.querySelectorAll("[data-toggle='tab'], [data-toggle='pill']"),u=0,h=d.length;u= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth)) + }, + getScroll = function() { // also Affix and scrollSpy uses it + return { + y: window.pageYOffset || document.documentElement.scrollTop, + x: window.pageXOffset || document.documentElement.scrollLeft + } + }, + mouseHover = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout'], + tipPositions = /\b(top|bottom|left|top)+/; + + + // Native Javascript for Bootstrap 3 | Collapse + // by dnp_theme + // COLLAPSE DEFINITION + // =================== + var Collapse = function(element, options) { + options = options || {}; + + this.btn = typeof element === 'object' ? element : document.querySelector(element); + this.accordion = null; + this.collapse = null; + this.duration = 300; // default collapse transition duration + this.options = {}; + this.options.duration = (isIE && isIE < 10) ? 0 : (options.duration || this.duration); + var self = this; + var getOuterHeight = function(el) { + var s = el && (el.currentStyle || window.getComputedStyle(el)), + // the getComputedStyle polyfill would do this for us, but we want to make sure it does + btp = /px/.test(s.borderTopWidth) ? Math.round(s.borderTopWidth.replace('px', '')) : 0, + mtp = /px/.test(s.marginTop) ? Math.round(s.marginTop.replace('px', '')) : 0, + mbp = /px/.test(s.marginBottom) ? Math.round(s.marginBottom.replace('px', '')) : 0, + mte = /em/.test(s.marginTop) ? Math.round(s.marginTop.replace('em', '') * parseInt(s.fontSize)) : 0, + mbe = /em/.test(s.marginBottom) ? Math.round(s.marginBottom.replace('em', '') * parseInt(s.fontSize)) : 0; + return el.clientHeight + parseInt(btp) + parseInt(mtp) + parseInt(mbp) + parseInt(mte) + parseInt(mbe); //we need an accurate margin value + }; + + this.toggle = function(e) { + e.preventDefault(); + + if (!/\bin/.test(self.collapse.className)) { + self.open(); + } else { + self.close(); + } + }; + this.close = function() { + this._close(this.collapse); + addClass(this.btn, 'collapsed'); + }; + this.open = function() { + this._open(this.collapse); + removeClass(this.btn, 'collapsed'); + + if (this.accordion !== null) { + var active = this.accordion.querySelectorAll('.collapse.in'), + al = active.length, + i = 0; + for (i; i < al; i++) { + if (active[i] !== this.collapse) this._close(active[i]); + } + } + }; + this._open = function(c) { + this.removeEvent(); + addClass(c, 'in'); + c.setAttribute('aria-expanded', 'true'); + addClass(c, 'collapsing'); + setTimeout(function() { + c.style.height = self.getMaxHeight(c) + 'px' + c.style.overflowY = 'hidden'; + }, 0); + setTimeout(function() { + c.style.height = ''; + c.style.overflowY = ''; + removeClass(c, 'collapsing'); + self.addEvent(); + }, this.options.duration); + }; + this._close = function(c) { + this.removeEvent(); + c.setAttribute('aria-expanded', 'false'); + c.style.height = this.getMaxHeight(c) + 'px' + setTimeout(function() { + c.style.height = '0px'; + c.style.overflowY = 'hidden'; + addClass(c, 'collapsing'); + }, 0); + + setTimeout(function() { + removeClass(c, 'collapsing'); + removeClass(c, 'in'); + c.style.overflowY = ''; + c.style.height = ''; + self.addEvent(); + }, this.options.duration); + }; + this.getMaxHeight = function(l) { // get collapse trueHeight and border + var h = 0; + for (var k = 0, ll = l.children.length; k < ll; k++) { + h += getOuterHeight(l.children[k]); + } + return h; + }; + this.removeEvent = function() { + this.btn.removeEventListener('click', this.toggle, false); + }; + this.addEvent = function() { + this.btn.addEventListener('click', this.toggle, false); + }; + this.getTarget = function() { + var t = this.btn, + h = t.href && t.getAttribute('href').replace('#', ''), + d = t.getAttribute('data-target') && (t.getAttribute('data-target')), + id = h || (d && /#/.test(d)) && d.replace('#', ''), + cl = (d && d.charAt(0) === '.') && d, + //the navbar collapse trigger targets a class + c = id && document.getElementById(id) || cl && document.querySelector(cl); + return c; + }; + + // init + this.addEvent(); + this.collapse = this.getTarget(); + this.accordion = this.btn.getAttribute('data-parent') && getClosest(this.btn, this.btn.getAttribute('data-parent')); + }; + + // COLLAPSE DATA API + // ================= + var Collapses = document.querySelectorAll('[data-toggle="collapse"]'); + for (var o = 0, cll = Collapses.length; o < cll; o++) { + var collapse = Collapses[o], + options = {}; + options.duration = collapse.getAttribute('data-duration'); + new Collapse(collapse, options); + } + + // Native Javascript for Bootstrap 3 | Tab + // by dnp_theme + + // TAB DEFINITION + // =================== + var Tab = function( element,options ) { + options = options || {}; + this.tab = typeof element === 'object' ? element : document.querySelector(element); + this.tabs = this.tab.parentNode.parentNode; + this.dropdown = this.tabs.querySelector('.dropdown'); + if ( /\bdropdown-menu/.test(this.tabs.className) ) { + this.dropdown = this.tabs.parentNode; + this.tabs = this.tabs.parentNode.parentNode; + } + this.options = options; + + // default tab transition duration + this.duration = 150; + this.options.duration = (isIE && isIE < 10) ? 0 : (options.duration || this.duration); + + var self = this; + + this.handle = function(e) { + e = e || window.e; e.preventDefault(); + var next = e.target; //the tab we clicked is now the next tab + var nextContent = document.getElementById(next.getAttribute('href').replace('#','')); //this is the actual object, the next tab content to activate + + // get current active tab and content + var activeTab = self.getActiveTab(); + var activeContent = self.getActiveContent(); + + if ( !/\bactive/.test(next.parentNode.className) ) { + // toggle "active" class name + removeClass(activeTab,'active'); + addClass(next.parentNode,'active'); + + // handle dropdown menu "active" class name + if ( self.dropdown ) { + if ( !(/\bdropdown-menu/.test(self.tab.parentNode.parentNode.className)) ) { + if (/\bactive/.test(self.dropdown.className)) removeClass(self.dropdown,'active'); + } else { + if (!/\bactive/.test(self.dropdown.className)) addClass(self.dropdown,'active'); + } + } + + //1. hide current active content first + removeClass(activeContent,'in'); + + setTimeout(function() { + //2. toggle current active content from view + removeClass(activeContent,'active'); + addClass(nextContent,'active'); + }, self.options.duration); + setTimeout(function() { + //3. show next active content + addClass(nextContent,'in'); + }, self.options.duration*2); + } + }; + this.getActiveTab = function() { + var activeTabs = this.tabs.querySelectorAll('.active'); + if ( activeTabs.length === 1 && !/\bdropdown/.test(activeTabs[0].className) ) { + return activeTabs[0] + } else if ( activeTabs.length > 1 ) { + return activeTabs[activeTabs.length-1] + } + }; + this.getActiveContent = function() { + var active = this.getActiveTab().getElementsByTagName('A')[0].getAttribute('href').replace('#',''); + return active && document.getElementById(active) + }; + + // init + this.tab.addEventListener('click', this.handle, false); + }; + + // TAB DATA API + // ================= + var Tabs = document.querySelectorAll("[data-toggle='tab'], [data-toggle='pill']"); + for ( var tb = 0, tbl = Tabs.length; tb=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var X=U(arguments)?U:J;var K={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var Z=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);O.preserveToString(e[t],n)};var Y=typeof G==="function"&&typeof G["for"]==="function"&&K.symbol(G());var Q=K.symbol(G.iterator)?G.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){Q="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ee=S.Reflect;var te=String;var re={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!re.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(e==null){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"},ToObject:function(e,t){return Object(re.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return re.IsCallable(e)},ToInt32:function(e){return re.ToNumber(e)>>0},ToUint32:function(e){return re.ToNumber(e)>>>0},ToNumber:function(e){if(g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=re.ToNumber(e);if(V(t)){return 0}if(t===0||!B(t)){return t}return(t>0?1:-1)*_(k(t))},ToLength:function(e){var t=re.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return V(e)&&V(t)},SameValueZero:function(e,t){return e===t||V(e)&&V(t)},IsIterable:function(e){return re.TypeIsObject(e)&&(typeof e[Q]!=="undefined"||X(e))},GetIterator:function(e){if(X(e)){return new q(e,"value")}var t=re.GetMethod(e,Q);if(!re.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=re.Call(t,e);if(!re.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=re.ToObject(e)[t];if(r===void 0||r===null){return void 0}if(!re.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=re.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=re.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!re.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!re.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=re.IteratorNext(e);var r=re.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ee.construct){return ee.construct(e,t,o)}var i=o.prototype;if(!re.TypeIsObject(i)){i=Object.prototype}var a=m(i);var u=re.Call(e,a,t);return re.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!re.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[H];if(n===void 0||n===null){return t}if(!re.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=re.ToString(e);var i="<"+t;if(r!==""){var a=re.ToString(n);var u=a.replace(/"/g,""");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+""},IsRegExp:function IsRegExp(e){if(!re.TypeIsObject(e)){return false}var t=e[G.match];if(typeof t!=="undefined"){return!!t}return K.regex(e)},ToString:function ToString(e){return te(e)}};if(s&&Y){var ne=function defineWellKnownSymbol(e){if(K.symbol(G[e])){return G[e]}var t=G["for"]("Symbol."+e);Object.defineProperty(G,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!K.symbol(G.search)){var oe=ne("search");var ie=String.prototype.search;h(RegExp.prototype,oe,function search(e){return re.Call(ie,e,[this])});var ae=function search(e){var t=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var r=re.GetMethod(e,oe);if(typeof r!=="undefined"){return re.Call(r,e,[t])}}return re.Call(ie,t,[re.ToString(e)])};Z(String.prototype,"search",ae)}if(!K.symbol(G.replace)){var ue=ne("replace");var fe=String.prototype.replace;h(RegExp.prototype,ue,function replace(e,t){return re.Call(fe,e,[this,t])});var se=function replace(e,t){var r=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var n=re.GetMethod(e,ue);if(typeof n!=="undefined"){return re.Call(n,e,[r,t])}}return re.Call(fe,r,[re.ToString(e),t])};Z(String.prototype,"replace",se)}if(!K.symbol(G.split)){var ce=ne("split");var le=String.prototype.split;h(RegExp.prototype,ce,function split(e,t){return re.Call(le,e,[this,t])});var pe=function split(e,t){var r=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var n=re.GetMethod(e,ce);if(typeof n!=="undefined"){return re.Call(n,e,[r,t])}}return re.Call(le,r,[re.ToString(e),t])};Z(String.prototype,"split",pe)}var ve=K.symbol(G.match);var ye=ve&&function(){var e={};e[G.match]=function(){return 42};return"a".match(e)!==42}();if(!ve||ye){var he=ne("match");var be=String.prototype.match;h(RegExp.prototype,he,function match(e){return re.Call(be,e,[this])});var ge=function match(e){var t=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var r=re.GetMethod(e,he);if(typeof r!=="undefined"){return re.Call(r,e,[t])}}return re.Call(be,t,[re.ToString(e)])};Z(String.prototype,"match",ge)}}var de=function wrapConstructor(e,t,r){O.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in W||r[n]){return}O.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in W||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;O.redefine(e.prototype,"constructor",t)};var Oe=function(){return this};var me=function(e){if(s&&!z(e,H)){O.getter(e,H,Oe)}};var we=function(e,t){var r=t||function iterator(){return this};h(e,Q,r);if(!e[Q]&&K.symbol(Q)){e[Q]=r}};var je=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Se=function createDataPropertyOrThrow(e,t,r){je(e,t,r);if(!re.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var Te=function(e,t,r,n){if(!re.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!re.TypeIsObject(o)){o=r}var i=m(o);for(var a in n){if(z(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Ie=String.fromCodePoint;Z(String,"fromCodePoint",function fromCodePoint(e){return re.Call(Ie,this,arguments)})}var Ee={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return t.join("")},raw:function raw(e){var t=re.ToObject(e,"bad callSite");var r=re.ToObject(t.raw,"bad raw value");var n=r.length;var o=re.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a=o){break}f=a+1=Ce){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return Pe(t,r)},startsWith:function startsWith(e){var t=re.ToString(re.RequireObjectCoercible(this));if(re.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=re.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=A(re.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=re.ToString(re.RequireObjectCoercible(this));if(re.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=re.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:re.ToInteger(o);var a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(re.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=re.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=re.ToString(re.RequireObjectCoercible(this));var r=re.ToInteger(e);var n=t.length;if(r>=0&&r56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){Z(String.prototype,"includes",Me.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var xe=i(function(){"/a/".startsWith(/a/)});var Ne=a(function(){return"abc".startsWith("a",Infinity)===false});if(!xe||!Ne){Z(String.prototype,"startsWith",Me.startsWith);Z(String.prototype,"endsWith",Me.endsWith)}}if(Y){var Ae=a(function(){var e=/a/;e[G.match]=false;return"/a/".startsWith(e)});if(!Ae){Z(String.prototype,"startsWith",Me.startsWith)}var Re=a(function(){var e=/a/;e[G.match]=false;return"/a/".endsWith(e)});if(!Re){Z(String.prototype,"endsWith",Me.endsWith)}var _e=a(function(){var e=/a/;e[G.match]=false;return"/a/".includes(e)});if(!_e){Z(String.prototype,"includes",Me.includes)}}b(String.prototype,Me);var ke=[" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Fe=new RegExp("(^["+ke+"]+)|(["+ke+"]+$)","g");var Le=function trim(){return re.ToString(re.RequireObjectCoercible(this)).replace(Fe,"")};var De=["\x85","\u200b","\ufffe"].join("");var ze=new RegExp("["+De+"]","g");var qe=/^[\-+]0x[0-9a-f]+$/i;var We=De.trim().length!==De.length;h(String.prototype,"trim",Le,We);var Ge=function(e){return{value:e,done:arguments.length===0}};var He=function(e){re.RequireObjectCoercible(e);this._s=re.ToString(e);this._i=0};He.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ge()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ge(e.substr(t,o))};we(He.prototype);we(String.prototype,function(){return new He(this)});var Ve={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!re.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(X(e)||re.GetMethod(e,Q))!=="undefined";var u,f,s;if(a){f=re.IsConstructor(r)?Object(new r):[];var c=re.GetIterator(e);var l,p;s=0;while(true){l=re.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){re.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=re.ToObject(e);u=re.ToLength(y.length);f=re.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s2){f=arguments[2]}var s=typeof f==="undefined"?n:re.ToInteger(f);var c=s<0?A(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=re.ToObject(this);var o=re.ToLength(n.length);t=re.ToInteger(typeof t==="undefined"?0:t);r=re.ToInteger(typeof r==="undefined"?o:r);var i=t<0?A(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u1?arguments[1]:null;for(var i=0,a;i1?arguments[1]:null;for(var i=0;i1&&typeof arguments[1]!=="undefined"){return re.Call(Ze,this,arguments)}else{return t(Ze,this,e)}})}var Ye=-(Math.pow(2,32)-1);var Qe=function(e,r){var n={length:Ye};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!Qe(Array.prototype.forEach)){var et=Array.prototype.forEach;Z(Array.prototype,"forEach",function forEach(e){return re.Call(et,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.map)){var tt=Array.prototype.map;Z(Array.prototype,"map",function map(e){return re.Call(tt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.filter)){var rt=Array.prototype.filter;Z(Array.prototype,"filter",function filter(e){return re.Call(rt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.some)){var nt=Array.prototype.some;Z(Array.prototype,"some",function some(e){return re.Call(nt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.every)){var ot=Array.prototype.every;Z(Array.prototype,"every",function every(e){return re.Call(ot,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.reduce)){var it=Array.prototype.reduce;Z(Array.prototype,"reduce",function reduce(e){return re.Call(it,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.reduceRight,true)){var at=Array.prototype.reduceRight;Z(Array.prototype,"reduceRight",function reduceRight(e){return re.Call(at,this.length>=0?this:[],arguments)},true)}var ut=Number("0o10")!==8;var ft=Number("0b10")!==2;var st=y(De,function(e){return Number(e+0+e)===0});if(ut||ft||st){var ct=Number;var lt=/^0b[01]+$/i;var pt=/^0o[0-7]+$/i;var vt=lt.test.bind(lt);var yt=pt.test.bind(pt);var ht=function(e){var t;if(typeof e.valueOf==="function"){t=e.valueOf();if(K.primitive(t)){return t}}if(typeof e.toString==="function"){t=e.toString();if(K.primitive(t)){return t}}throw new TypeError("No default value")};var bt=ze.test.bind(ze);var gt=qe.test.bind(qe);var dt=function(){var e=function Number(t){var r;if(arguments.length>0){r=K.primitive(t)?t:ht(t,"number")}else{r=0}if(typeof r==="string"){r=re.Call(Le,r);if(vt(r)){r=parseInt(C(r,2),2)}else if(yt(r)){r=parseInt(C(r,2),8)}else if(bt(r)||gt(r)){r=NaN}}var n=this;var o=a(function(){ct.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new ct(r)}return ct(r)};return e}();de(ct,dt,{});b(dt,{NaN:ct.NaN,MAX_VALUE:ct.MAX_VALUE,MIN_VALUE:ct.MIN_VALUE,NEGATIVE_INFINITY:ct.NEGATIVE_INFINITY,POSITIVE_INFINITY:ct.POSITIVE_INFINITY});Number=dt;O.redefine(S,"Number",dt)}var Ot=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Ot,MIN_SAFE_INTEGER:-Ot,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:B,isInteger:function isInteger(e){return B(e)&&re.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:V});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if(![,1].find(function(e,t){return t===0})){Z(Array.prototype,"find",$e.find)}if([,1].findIndex(function(e,t){return t===0})!==0){Z(Array.prototype,"findIndex",$e.findIndex)}var mt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var wt=function ensureEnumerable(e,t){if(s&&mt(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var jt=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o1){return NaN}if(t===-1){return-Infinity}if(t===1){return Infinity}if(t===0){return t}return.5*L((1+t)/(1-t))},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=F(L(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=re.ToUint32(t);if(r===0){return 32}return Or?re.Call(Or,r):31-_(L(r+.5)*gr)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(V(t)){return NaN}if(!T(t)){return Infinity}if(t<0){t=-t}if(t>21){return F(t)/2}return(F(t)+F(-t))/2},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(k(t)>.5){return F(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o0?i/n*(i/n):i}}return n===Infinity?Infinity:n*D(r)},log2:function log2(e){return L(e)*gr},log10:function log10(e){return L(e)*dr},log1p:function log1p(e){var t=Number(e);if(t<-1||V(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(L(1+t)/(1+t-1))},sign:$,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}if(k(t)<1){return(Math.expm1(t)-Math.expm1(-t))/2}return(F(t-1)-F(-t-1))*br/2},tanh:function tanh(e){var t=Number(e);if(V(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(F(t)+F(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=re.ToUint32(e);var n=re.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||V(t)){return t}var r=$(t);var n=k(t);if(nyr||V(i)){return r*Infinity}return r*i}};b(Math,mr);h(Math,"log1p",mr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",mr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));h(Math,"tanh",mr.tanh,Math.tanh(-2e-17)!==-2e-17);h(Math,"acosh",mr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"cbrt",mr.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8);h(Math,"sinh",mr.sinh,Math.sinh(-2e-17)!==-2e-17);var wr=Math.expm1(10);h(Math,"expm1",mr.expm1,wr>22025.465794806718||wr<22025.465794806718);var jr=Math.round;var Sr=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var Tr=lr+1;var Ir=2*lr-1;var Er=[Tr,Ir].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=_(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Sr||!Er);O.preserveToString(Math.round,jr);var Pr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=mr.imul;O.preserveToString(Math.imul,Pr)}if(Math.imul.length!==2){Z(Math,"imul",function imul(e,t){return re.Call(Pr,Math,arguments); -})}var Cr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}re.IsPromise=function(e){if(!re.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!re.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(re.IsCallable(t.resolve)&&re.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&re.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=re.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(re.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=re.IsCallable(e)?e:a;var d=re.IsCallable(t)?t:u;var O=n._promise;var m;if(O.state===f){if(O.reactionLength===0){O.fulfillReactionHandler0=g;O.rejectReactionHandler0=d;O.reactionCapability0=i}else{var w=3*(O.reactionLength-1);O[w+l]=g;O[w+p]=d;O[w+v]=i}O.reactionLength+=1}else if(O.state===s){m=O.result;h(g,i,m)}else if(O.state===c){m=O.result;h(d,i,m)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Cr==="function"){b(S,{Promise:Cr});var Mr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var xr=!i(function(){S.Promise.reject(42).then(null,5).then(null,W)});var Nr=i(function(){S.Promise.call(3,W)});var Ar=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Rr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var _r=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};_r.prototype=Promise.prototype;_r.all=Promise.all;var kr=a(function(){return!!_r.all([1,2])});if(!Mr||!xr||!Nr||Ar||!Rr||kr){Promise=Cr;Z(S,"Promise",Cr)}if(Promise.all.length!==1){var Fr=Promise.all;Z(Promise,"all",function all(e){return re.Call(Fr,this,arguments)})}if(Promise.race.length!==1){var Lr=Promise.race;Z(Promise,"race",function race(e){return re.Call(Lr,this,arguments)})}if(Promise.resolve.length!==1){var Dr=Promise.resolve;Z(Promise,"resolve",function resolve(e){return re.Call(Dr,this,arguments)})}if(Promise.reject.length!==1){var zr=Promise.reject;Z(Promise,"reject",function reject(e){return re.Call(zr,this,arguments)})}wt(Promise,"all");wt(Promise,"race");wt(Promise,"resolve");wt(Promise,"reject");me(Promise)}var qr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Wr=qr(["z","a","bb"]);var Gr=qr(["z",1,"a","3",2]);if(s){var Hr=function fastkey(e){if(!Wr){return null}if(typeof e==="undefined"||e===null){return"^"+re.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Gr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Vr=function emptyObject(){return Object.create?Object.create(null):{}};var Br=function addIterableToMap(e,n,o){if(r(o)||K.string(o)){l(o,function(e){if(!re.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.set;if(!re.IsCallable(a)){throw new TypeError("bad map")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!re.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){re.IteratorClose(i,true);throw s}}}}};var $r=function addIterableToSet(e,n,o){if(r(o)||K.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.add;if(!re.IsCallable(a)){throw new TypeError("bad set")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){re.IteratorClose(i,true);throw s}}}}};var Ur={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!re.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+re.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={next:function next(){var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ge()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ge(n)}}this.i=void 0;return Ge()}};we(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Te(this,Map,a,{_es6map:true,_head:null,_storage:Vr(),_size:0});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){Br(Map,e,arguments[0])}return e};a=u.prototype;O.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t=Hr(e);if(t!==null){var r=this._storage[t];if(r){return r.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Hr(e);if(t!==null){return typeof this._storage[t]!=="undefined"}var r=this._head;var n=r;while((n=n.next)!==r){if(re.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Hr(e);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(re.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Hr(t);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}while((n=n.next)!==r){if(re.SameValueZero(n.key,t)){n.key=n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._size=0;this._storage=Vr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});we(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!re.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+re.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Te(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Vr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){$r(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=e["[[SetData]]"]=new Ur.Map;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};O.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Hr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Hr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Hr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Vr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return this["[[SetData]]"].values()},entries:function entries(){r(this,"entries");u(this);return this["[[SetData]]"].entries()},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);we(i.prototype,i.prototype.values);return i}()};if(S.Map||S.Set){var Jr=a(function(){return new Map([[1,2]]).get(1)===2});if(!Jr){var Xr=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new Xr;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=m(Xr.prototype);h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,Xr)}var Kr=new Map;var Zr=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var Yr=Kr.set(1,2)===Kr;if(!Zr||!Yr){var Qr=Map.prototype.set;Z(Map.prototype,"set",function set(e,r){t(Qr,this,e===0?0:e,r);return this})}if(!Zr){var en=Map.prototype.get;var tn=Map.prototype.has;b(Map.prototype,{get:function get(e){return t(en,this,e===0?0:e)},has:function has(e){return t(tn,this,e===0?0:e)}},true);O.preserveToString(Map.prototype.get,en);O.preserveToString(Map.prototype.has,tn)}var rn=new Set;var nn=function(e){e["delete"](0);e.add(-0);return!e.has(0)}(rn);var on=rn.add(1)===rn;if(!nn||!on){var an=Set.prototype.add;Set.prototype.add=function add(e){t(an,this,e===0?0:e);return this};O.preserveToString(Set.prototype.add,an)}if(!nn){var un=Set.prototype.has;Set.prototype.has=function has(e){return t(un,this,e===0?0:e)};O.preserveToString(Set.prototype.has,un);var fn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(fn,this,e===0?0:e)};O.preserveToString(Set.prototype["delete"],fn)}var sn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var cn=Object.setPrototypeOf&&!sn;var ln=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||cn||!ln){var pn=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new pn;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=pn.prototype;h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,pn)}var vn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var yn=Object.setPrototypeOf&&!vn;var hn=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||yn||!hn){var bn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new bn;if(arguments.length>0){$r(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=bn.prototype;h(S.Set.prototype,"constructor",S.Set,true);O.preserveToString(S.Set,bn)}var gn=new S.Map;var dn=!a(function(){return gn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||gn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof gn.keys().next!=="function"||dn||!sn){b(S,{Map:Ur.Map,Set:Ur.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}we(Object.getPrototypeOf((new S.Map).keys()));we(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var On=S.Set.prototype.has;Z(S.Set.prototype,"has",function has(e){return t(On,this,e)})}}b(S,Ur);me(S.Map);me(S.Set)}var mn=function throwUnlessTargetIsObject(e){if(!re.TypeIsObject(e)){throw new TypeError("target must be an object")}};var wn={apply:function apply(){return re.Call(re.Call,null,arguments)},construct:function construct(e,t){if(!re.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!re.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return re.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){mn(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){mn(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(wn,{ownKeys:function ownKeys(e){mn(e);var t=Object.getOwnPropertyNames(e);if(re.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var jn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(wn,{isExtensible:function isExtensible(e){mn(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){mn(e);return jn(function(){Object.preventExtensions(e)})}})}if(s){var Sn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Sn(o,t,r)}if("value"in n){return n.value}if(n.get){return re.Call(n.get,r)}return void 0};var Tn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Tn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!re.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ee.defineProperty(o,r,{value:n})}else{return ee.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(wn,{defineProperty:function defineProperty(e,t,r){mn(e);return jn(function(){Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){mn(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){mn(e);var r=arguments.length>2?arguments[2]:e;return Sn(e,t,r)},set:function set(e,t,r){mn(e);var n=arguments.length>3?arguments[3]:e;return Tn(e,t,r,n)}})}if(Object.getPrototypeOf){var In=Object.getPrototypeOf;wn.getPrototypeOf=function getPrototypeOf(e){mn(e);return In(e)}}if(Object.setPrototypeOf&&wn.getPrototypeOf){var En=function(e,t){var r=t;while(r){if(e===r){return true}r=wn.getPrototypeOf(r)}return false};Object.assign(wn,{setPrototypeOf:function setPrototypeOf(e,t){mn(e);if(t!==null&&!re.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ee.getPrototypeOf(e)){return true}if(ee.isExtensible&&!ee.isExtensible(e)){return false}if(En(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var Pn=function(e,t){if(!re.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){Z(S.Reflect,e,t)}}};Object.keys(wn).forEach(function(e){Pn(e,wn[e])});var Cn=S.Reflect.getPrototypeOf;if(c&&Cn&&Cn.name!=="getPrototypeOf"){Z(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Cn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){Z(S.Reflect,"setPrototypeOf",wn.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){Z(S.Reflect,"defineProperty",wn.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){Z(S.Reflect,"construct",wn.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var Mn=Date.prototype.toString;var xn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return re.Call(Mn,this)};Z(Date.prototype,"toString",xn)}var Nn={anchor:function anchor(e){return re.CreateHTML(this,"a","name",e)},big:function big(){return re.CreateHTML(this,"big","","")},blink:function blink(){return re.CreateHTML(this,"blink","","")},bold:function bold(){return re.CreateHTML(this,"b","","")},fixed:function fixed(){return re.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return re.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return re.CreateHTML(this,"font","size",e)},italics:function italics(){return re.CreateHTML(this,"i","","")},link:function link(e){return re.CreateHTML(this,"a","href",e)},small:function small(){return re.CreateHTML(this,"small","","")},strike:function strike(){return re.CreateHTML(this,"strike","","")},sub:function sub(){return re.CreateHTML(this,"sub","","")},sup:function sub(){return re.CreateHTML(this,"sup","","")}};l(Object.keys(Nn),function(e){var r=String.prototype[e];var n=false;if(re.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){Z(String.prototype,e,Nn[e])}});var An=function(){if(!Y){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e(G())!=="undefined"){return true}if(e([G()])!=="[null]"){return true}var t={a:G()};t[G()]=true;if(e(t)!=="{}"){return true}return false}();var Rn=a(function(){if(!Y){return true}return JSON.stringify(Object(G()))==="{}"&&JSON.stringify([Object(G())])==="[{}]"});if(An||!Rn){var _n=JSON.stringify;Z(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=re.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(K.symbol(n)){return St({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return _n.apply(this,o)})}return S}); \ No newline at end of file +})}var Cr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}re.IsPromise=function(e){if(!re.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!re.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(re.IsCallable(t.resolve)&&re.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&re.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=re.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(re.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=re.IsCallable(e)?e:a;var d=re.IsCallable(t)?t:u;var O=n._promise;var m;if(O.state===f){if(O.reactionLength===0){O.fulfillReactionHandler0=g;O.rejectReactionHandler0=d;O.reactionCapability0=i}else{var w=3*(O.reactionLength-1);O[w+l]=g;O[w+p]=d;O[w+v]=i}O.reactionLength+=1}else if(O.state===s){m=O.result;h(g,i,m)}else if(O.state===c){m=O.result;h(d,i,m)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Cr==="function"){b(S,{Promise:Cr});var Mr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var xr=!i(function(){S.Promise.reject(42).then(null,5).then(null,W)});var Nr=i(function(){S.Promise.call(3,W)});var Ar=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Rr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var _r=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};_r.prototype=Promise.prototype;_r.all=Promise.all;var kr=a(function(){return!!_r.all([1,2])});if(!Mr||!xr||!Nr||Ar||!Rr||kr){Promise=Cr;Z(S,"Promise",Cr)}if(Promise.all.length!==1){var Fr=Promise.all;Z(Promise,"all",function all(e){return re.Call(Fr,this,arguments)})}if(Promise.race.length!==1){var Lr=Promise.race;Z(Promise,"race",function race(e){return re.Call(Lr,this,arguments)})}if(Promise.resolve.length!==1){var Dr=Promise.resolve;Z(Promise,"resolve",function resolve(e){return re.Call(Dr,this,arguments)})}if(Promise.reject.length!==1){var zr=Promise.reject;Z(Promise,"reject",function reject(e){return re.Call(zr,this,arguments)})}wt(Promise,"all");wt(Promise,"race");wt(Promise,"resolve");wt(Promise,"reject");me(Promise)}var qr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Wr=qr(["z","a","bb"]);var Gr=qr(["z",1,"a","3",2]);if(s){var Hr=function fastkey(e){if(!Wr){return null}if(typeof e==="undefined"||e===null){return"^"+re.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Gr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Vr=function emptyObject(){return Object.create?Object.create(null):{}};var Br=function addIterableToMap(e,n,o){if(r(o)||K.string(o)){l(o,function(e){if(!re.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.set;if(!re.IsCallable(a)){throw new TypeError("bad map")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!re.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){re.IteratorClose(i,true);throw s}}}}};var $r=function addIterableToSet(e,n,o){if(r(o)||K.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.add;if(!re.IsCallable(a)){throw new TypeError("bad set")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){re.IteratorClose(i,true);throw s}}}}};var Ur={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!re.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+re.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={next:function next(){var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ge()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ge(n)}}this.i=void 0;return Ge()}};we(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Te(this,Map,a,{_es6map:true,_head:null,_storage:Vr(),_size:0});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){Br(Map,e,arguments[0])}return e};a=u.prototype;O.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t=Hr(e);if(t!==null){var r=this._storage[t];if(r){return r.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Hr(e);if(t!==null){return typeof this._storage[t]!=="undefined"}var r=this._head;var n=r;while((n=n.next)!==r){if(re.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Hr(e);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(re.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Hr(t);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}while((n=n.next)!==r){if(re.SameValueZero(n.key,t)){n.key=n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._size=0;this._storage=Vr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});we(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!re.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+re.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Te(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Vr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){$r(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=e["[[SetData]]"]=new Ur.Map;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};O.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Hr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Hr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Hr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Vr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return this["[[SetData]]"].values()},entries:function entries(){r(this,"entries");u(this);return this["[[SetData]]"].entries()},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);we(i.prototype,i.prototype.values);return i}()};if(S.Map||S.Set){var Jr=a(function(){return new Map([[1,2]]).get(1)===2});if(!Jr){var Xr=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new Xr;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=m(Xr.prototype);h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,Xr)}var Kr=new Map;var Zr=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var Yr=Kr.set(1,2)===Kr;if(!Zr||!Yr){var Qr=Map.prototype.set;Z(Map.prototype,"set",function set(e,r){t(Qr,this,e===0?0:e,r);return this})}if(!Zr){var en=Map.prototype.get;var tn=Map.prototype.has;b(Map.prototype,{get:function get(e){return t(en,this,e===0?0:e)},has:function has(e){return t(tn,this,e===0?0:e)}},true);O.preserveToString(Map.prototype.get,en);O.preserveToString(Map.prototype.has,tn)}var rn=new Set;var nn=function(e){e["delete"](0);e.add(-0);return!e.has(0)}(rn);var on=rn.add(1)===rn;if(!nn||!on){var an=Set.prototype.add;Set.prototype.add=function add(e){t(an,this,e===0?0:e);return this};O.preserveToString(Set.prototype.add,an)}if(!nn){var un=Set.prototype.has;Set.prototype.has=function has(e){return t(un,this,e===0?0:e)};O.preserveToString(Set.prototype.has,un);var fn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(fn,this,e===0?0:e)};O.preserveToString(Set.prototype["delete"],fn)}var sn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var cn=Object.setPrototypeOf&&!sn;var ln=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||cn||!ln){var pn=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new pn;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=pn.prototype;h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,pn)}var vn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var yn=Object.setPrototypeOf&&!vn;var hn=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||yn||!hn){var bn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new bn;if(arguments.length>0){$r(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=bn.prototype;h(S.Set.prototype,"constructor",S.Set,true);O.preserveToString(S.Set,bn)}var gn=new S.Map;var dn=!a(function(){return gn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||gn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof gn.keys().next!=="function"||dn||!sn){b(S,{Map:Ur.Map,Set:Ur.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}we(Object.getPrototypeOf((new S.Map).keys()));we(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var On=S.Set.prototype.has;Z(S.Set.prototype,"has",function has(e){return t(On,this,e)})}}b(S,Ur);me(S.Map);me(S.Set)}var mn=function throwUnlessTargetIsObject(e){if(!re.TypeIsObject(e)){throw new TypeError("target must be an object")}};var wn={apply:function apply(){return re.Call(re.Call,null,arguments)},construct:function construct(e,t){if(!re.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!re.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return re.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){mn(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){mn(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(wn,{ownKeys:function ownKeys(e){mn(e);var t=Object.getOwnPropertyNames(e);if(re.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var jn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(wn,{isExtensible:function isExtensible(e){mn(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){mn(e);return jn(function(){Object.preventExtensions(e)})}})}if(s){var Sn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Sn(o,t,r)}if("value"in n){return n.value}if(n.get){return re.Call(n.get,r)}return void 0};var Tn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Tn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!re.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ee.defineProperty(o,r,{value:n})}else{return ee.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(wn,{defineProperty:function defineProperty(e,t,r){mn(e);return jn(function(){Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){mn(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){mn(e);var r=arguments.length>2?arguments[2]:e;return Sn(e,t,r)},set:function set(e,t,r){mn(e);var n=arguments.length>3?arguments[3]:e;return Tn(e,t,r,n)}})}if(Object.getPrototypeOf){var In=Object.getPrototypeOf;wn.getPrototypeOf=function getPrototypeOf(e){mn(e);return In(e)}}if(Object.setPrototypeOf&&wn.getPrototypeOf){var En=function(e,t){var r=t;while(r){if(e===r){return true}r=wn.getPrototypeOf(r)}return false};Object.assign(wn,{setPrototypeOf:function setPrototypeOf(e,t){mn(e);if(t!==null&&!re.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ee.getPrototypeOf(e)){return true}if(ee.isExtensible&&!ee.isExtensible(e)){return false}if(En(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var Pn=function(e,t){if(!re.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){Z(S.Reflect,e,t)}}};Object.keys(wn).forEach(function(e){Pn(e,wn[e])});var Cn=S.Reflect.getPrototypeOf;if(c&&Cn&&Cn.name!=="getPrototypeOf"){Z(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Cn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){Z(S.Reflect,"setPrototypeOf",wn.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){Z(S.Reflect,"defineProperty",wn.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){Z(S.Reflect,"construct",wn.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var Mn=Date.prototype.toString;var xn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return re.Call(Mn,this)};Z(Date.prototype,"toString",xn)}var Nn={anchor:function anchor(e){return re.CreateHTML(this,"a","name",e)},big:function big(){return re.CreateHTML(this,"big","","")},blink:function blink(){return re.CreateHTML(this,"blink","","")},bold:function bold(){return re.CreateHTML(this,"b","","")},fixed:function fixed(){return re.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return re.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return re.CreateHTML(this,"font","size",e)},italics:function italics(){return re.CreateHTML(this,"i","","")},link:function link(e){return re.CreateHTML(this,"a","href",e)},small:function small(){return re.CreateHTML(this,"small","","")},strike:function strike(){return re.CreateHTML(this,"strike","","")},sub:function sub(){return re.CreateHTML(this,"sub","","")},sup:function sub(){return re.CreateHTML(this,"sup","","")}};l(Object.keys(Nn),function(e){var r=String.prototype[e];var n=false;if(re.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){Z(String.prototype,e,Nn[e])}});var An=function(){if(!Y){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e(G())!=="undefined"){return true}if(e([G()])!=="[null]"){return true}var t={a:G()};t[G()]=true;if(e(t)!=="{}"){return true}return false}();var Rn=a(function(){if(!Y){return true}return JSON.stringify(Object(G()))==="{}"&&JSON.stringify([Object(G())])==="[{}]"});if(An||!Rn){var _n=JSON.stringify;Z(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=re.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(K.symbol(n)){return St({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return _n.apply(this,o)})}return S}); +//# sourceMappingURL=es6-shim.map diff --git a/frontend/documentation/js/libs/highlight.pack.js b/frontend/documentation/js/libs/highlight.pack.js new file mode 100644 index 0000000..501fcd7 --- /dev/null +++ b/frontend/documentation/js/libs/highlight.pack.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.9.0 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function i(e){return k.test(e)}function a(e){var n,t,r,a,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(a=o[n],i(a)||R(a))return a}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,i){for(var a=e.firstChild;a;a=a.nextSibling)3===a.nodeType?i+=a.nodeValue.length:1===a.nodeType&&(n.push({event:"start",offset:i,node:a}),i=r(a,i),t(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:i,node:a}));return i}(e,0),n}function c(e,r,i){function a(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){l+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=a();if(l+=n(i.substring(s,g[0].offset)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=a();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(i.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(i,a){if(!i.compiled){if(i.compiled=!0,i.k=i.k||i.bK,i.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof i.k?c("keyword",i.k):E(i.k).forEach(function(e){c(e,i.k[e])}),i.k=u}i.lR=t(i.l||/\w+/,!0),a&&(i.bK&&(i.b="\\b("+i.bK.split(" ").join("|")+")\\b"),i.b||(i.b=/\B|\b/),i.bR=t(i.b),i.e||i.eW||(i.e=/\B|\b/),i.e&&(i.eR=t(i.e)),i.tE=n(i.e)||"",i.eW&&a.tE&&(i.tE+=(i.e?"|":"")+a.tE)),i.i&&(i.iR=t(i.i)),null==i.r&&(i.r=1),i.c||(i.c=[]);var s=[];i.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?i:e)}),i.c=s,i.c.forEach(function(e){r(e,i)}),i.starts&&r(i.starts,a);var l=i.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([i.tE,i.i]).map(n).filter(Boolean);i.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,i,a){function o(e,n){var t,i;for(t=0,i=n.c.length;i>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!i&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var i=r?"":y.classPrefix,a='',a+n+o}function p(){var e,t,r,i;if(!E.k)return n(B);for(i="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)i+=n(B.substring(t,r.index)),e=g(E,r),e?(M+=e[1],i+=h(e[0],n(r[0]))):i+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return i+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var i=E;i.skip?B+=n:(i.rE||i.eE||(B+=n),b(),i.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),i.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=a||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substring(O,I.index),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},i=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>i.r&&(i=t),t.r>r.r&&(i=r,r=t)}),i.language&&(r.second_best=i),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"
    ":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,i=[e.trim()];return e.match(/\bhljs\b/)||i.push("hljs"),-1===e.indexOf(r)&&i.push(r),i.join(" ").trim()}function p(e){var n,t,r,o,s,p=a(e);i(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
    ",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var i=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return i.c.push(e.PWM),i.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),i},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],k:r,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/%/,r:0},{bK:"constructor",e:/\{/,eE:!0,c:["self",{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}]},{b:/module\./,k:{built_in:"module"},r:0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}}); \ No newline at end of file diff --git a/frontend/documentation/js/libs/highlightjs-line-numbers.min.js b/frontend/documentation/js/libs/highlightjs-line-numbers.min.js new file mode 100644 index 0000000..494ab81 --- /dev/null +++ b/frontend/documentation/js/libs/highlightjs-line-numbers.min.js @@ -0,0 +1 @@ +!function(e){"use strict";function t(){"complete"===document.readyState?n():e.addEventListener("DOMContentLoaded",n)}function n(){try{var e=document.querySelectorAll("code.hljs:not(.bash)");for(var t in e)e.hasOwnProperty(t)&&r(e[t])}catch(n){console.error("LineNumbers error: ",n)}}function r(e){if("object"==typeof e){var t=e.parentNode,n=o(t.outerText);if(n>1){for(var r="",c=0;n>c;c++)r+=c+1+"\n";var l=document.createElement("code");l.className="hljs hljs-line-numbers",l.style["float"]="left",l.textContent=r,t.insertBefore(l,e)}}}function o(e){if(0===e.length)return 0;var t=/\r\n|\r|\n/g,n=e.match(t);return n=n?n.length:0,e[e.length-1].match(t)||(n+=1),n}"undefined"==typeof e.hljs?console.error("highlight.js not detected!"):(e.hljs.initLineNumbersOnLoad=t,e.hljs.lineNumbersBlock=r)}(window); diff --git a/frontend/documentation/js/libs/svg-pan-zoom.min.js b/frontend/documentation/js/libs/svg-pan-zoom.min.js index 807f0e4..63da886 100644 --- a/frontend/documentation/js/libs/svg-pan-zoom.min.js +++ b/frontend/documentation/js/libs/svg-pan-zoom.min.js @@ -1,3 +1,782 @@ -// svg-pan-zoom v3.6.0 +// svg-pan-zoom v3.2.5 // https://github.com/ariutta/svg-pan-zoom -!function t(e,o,n){function i(r,a){if(!o[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var h=o[r]={exports:{}};e[r][0].call(h.exports,function(t){var o=e[r][1][t];return i(o?o:t)},h,h.exports,t,e,o,n)}return o[r].exports}for(var s="function"==typeof require&&require,r=0;r=0;n--)this.eventListeners.hasOwnProperty(o[n])&&delete this.eventListeners[o[n]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!this.options.preventMouseEventsDefault&&h);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var t=this;this.wheelListener=function(e){return t.handleMouseWheel(e)};var e=!this.options.preventMouseEventsDefault;n.on(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var t=!this.options.preventMouseEventsDefault;n.off(this.options.eventsListenerElement||this.svg,this.wheelListener,t),this.options.mouseWheelZoomEnabled=!1}},l.prototype.handleMouseWheel=function(t){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1);var e=t.deltaY||1,o=Date.now()-this.lastMouseWheelEventTime,n=3+Math.max(0,30-o);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in t&&0===t.deltaMode&&t.wheelDelta&&(e=0===t.deltaY?0:Math.abs(t.wheelDelta)/t.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/n;var i=this.svg.getScreenCTM().inverse(),s=r.getEventPoint(t,this.svg).matrixTransform(i),a=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(a,s)}},l.prototype.zoomAtPoint=function(t,e,o){var n=this.viewport.getOriginalState();o?(t=Math.max(this.options.minZoom*n.zoom,Math.min(this.options.maxZoom*n.zoom,t)),t/=this.getZoom()):this.getZoom()*tthis.options.maxZoom*n.zoom&&(t=this.options.maxZoom*n.zoom/this.getZoom());var i=this.viewport.getCTM(),s=e.matrixTransform(i.inverse()),r=this.svg.createSVGMatrix().translate(s.x,s.y).scale(t).translate(-s.x,-s.y),a=i.multiply(r);a.a!==i.a&&this.viewport.setCTM(a)},l.prototype.zoom=function(t,e){this.zoomAtPoint(t,r.getSvgCenterPoint(this.svg,this.width,this.height),e)},l.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)},l.prototype.publicZoomAtPoint=function(t,e,o){if(o&&(t=this.computeFromRelativeZoom(t)),"SVGPoint"!==s.getType(e)){if(!("x"in e&&"y"in e))throw new Error("Given point is invalid");e=r.createSVGPoint(this.svg,e.x,e.y)}this.zoomAtPoint(t,e,o)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled){var e=t.target.getAttribute("class")||"";if(e.indexOf("svg-pan-zoom-control")>-1)return!1}var o;o=t.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=r.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(o,n)},l.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),s.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&s.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=r.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var e=r.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),o=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(o)}},l.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)},l.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)},l.prototype.center=function(){var t=this.viewport.getViewBox(),e=.5*(this.width-(t.width+2*t.x)*this.getZoom()),o=.5*(this.height-(t.height+2*t.y)*this.getZoom());this.getPublicInstance().pan({x:e,y:o})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)},l.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)},l.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}},l.prototype.resize=function(){var t=r.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var t=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var e in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],!this.options.preventMouseEventsDefault&&h);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(e){return e.svg!==t.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var t=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return t.options.panEnabled=!0,t.pi},disablePan:function(){return t.options.panEnabled=!1,t.pi},isPanEnabled:function(){return!!t.options.panEnabled},pan:function(e){return t.pan(e),t.pi},panBy:function(e){return t.panBy(e),t.pi},getPan:function(){return t.getPan()},setBeforePan:function(e){return t.options.beforePan=null===e?null:s.proxy(e,t.publicInstance),t.pi},setOnPan:function(e){return t.options.onPan=null===e?null:s.proxy(e,t.publicInstance),t.pi},enableZoom:function(){return t.options.zoomEnabled=!0,t.pi},disableZoom:function(){return t.options.zoomEnabled=!1,t.pi},isZoomEnabled:function(){return!!t.options.zoomEnabled},enableControlIcons:function(){return t.options.controlIconsEnabled||(t.options.controlIconsEnabled=!0,i.enable(t)),t.pi},disableControlIcons:function(){return t.options.controlIconsEnabled&&(t.options.controlIconsEnabled=!1,i.disable(t)),t.pi},isControlIconsEnabled:function(){return!!t.options.controlIconsEnabled},enableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!0,t.pi},disableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!1,t.pi},isDblClickZoomEnabled:function(){return!!t.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return t.enableMouseWheelZoom(),t.pi},disableMouseWheelZoom:function(){return t.disableMouseWheelZoom(),t.pi},isMouseWheelZoomEnabled:function(){return!!t.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return t.options.zoomScaleSensitivity=e,t.pi},setMinZoom:function(e){return t.options.minZoom=e,t.pi},setMaxZoom:function(e){return t.options.maxZoom=e,t.pi},setBeforeZoom:function(e){return t.options.beforeZoom=null===e?null:s.proxy(e,t.publicInstance),t.pi},setOnZoom:function(e){return t.options.onZoom=null===e?null:s.proxy(e,t.publicInstance),t.pi},zoom:function(e){return t.publicZoom(e,!0),t.pi},zoomBy:function(e){return t.publicZoom(e,!1),t.pi},zoomAtPoint:function(e,o){return t.publicZoomAtPoint(e,o,!0),t.pi},zoomAtPointBy:function(e,o){return t.publicZoomAtPoint(e,o,!1),t.pi},zoomIn:function(){return this.zoomBy(1+t.options.zoomScaleSensitivity),t.pi},zoomOut:function(){return this.zoomBy(1/(1+t.options.zoomScaleSensitivity)),t.pi},getZoom:function(){return t.getRelativeZoom()},setOnUpdatedCTM:function(e){return t.options.onUpdatedCTM=null===e?null:s.proxy(e,t.publicInstance),t.pi},resetZoom:function(){return t.resetZoom(),t.pi},resetPan:function(){return t.resetPan(),t.pi},reset:function(){return t.reset(),t.pi},fit:function(){return t.fit(),t.pi},contain:function(){return t.contain(),t.pi},center:function(){return t.center(),t.pi},updateBBox:function(){return t.updateBBox(),t.pi},resize:function(){return t.resize(),t.pi},getSizes:function(){return{width:t.width,height:t.height,realZoom:t.getZoom(),viewBox:t.viewport.getViewBox()}},destroy:function(){return t.destroy(),t.pi}}),this.publicInstance};var c=[],p=function(t,e){var o=s.getSvg(t);if(null===o)return null;for(var n=c.length-1;n>=0;n--)if(c[n].svg===o)return c[n].instance.getPublicInstance();return c.push({svg:o,instance:new l(o,e)}),c[c.length-1].instance.getPublicInstance()};e.exports=p},{"./control-icons":2,"./shadow-viewport":3,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(t,e,o){var n=t("./utilities"),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var o=null;if(o=n.isElement(e)?e:t.querySelector(e),!o){var i=Array.prototype.slice.call(t.childNodes||t.children).filter(function(t){return"defs"!==t.nodeName&&"#text"!==t.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(o=i[0])}if(!o){var s="viewport-"+(new Date).toISOString().replace(/\D/g,"");o=document.createElementNS(this.svgNS,"g"),o.setAttribute("id",s);var r=t.childNodes||t.children;if(r&&r.length>0)for(var a=r.length;a>0;a--)"defs"!==r[r.length-a].nodeName&&o.appendChild(r[r.length-a]);t.appendChild(o)}var l=[];return o.getAttribute("class")&&(l=o.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),o.setAttribute("class",l.join(" "))),o},setupSvgAttributes:function(t){if(t.setAttribute("xmlns",this.svgNS),t.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),t.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==t.parentNode){var e=t.getAttribute("style")||"";e.toLowerCase().indexOf("overflow")===-1&&t.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:n.throttle(function(){for(var t=document.querySelectorAll("defs"),e=t.length,o=0;oe?(clearTimeout(a),a=null,l=h,s=t.apply(n,i),a||(n=i=null)):a||o.trailing===!1||(a=setTimeout(u,c)),s}},createRequestAnimationFrame:function(t){var e=null;return"auto"!==t&&t<60&&t>1&&(e=Math.floor(1e3/t)),null===e?window.requestAnimationFrame||n(33):n(e)}}},{}]},{},[1]); \ No newline at end of file +! function t(e, o, n) { + function i(r, a) { + if (!o[r]) { + if (!e[r]) { + var l = "function" == typeof require && require; + if (!a && l) return l(r, !0); + if (s) return s(r, !0); + var u = new Error("Cannot find module '" + r + "'"); + throw u.code = "MODULE_NOT_FOUND", u + } + var h = o[r] = { + exports: {} + }; + e[r][0].call(h.exports, function(t) { + var o = e[r][1][t]; + return i(o ? o : t) + }, h, h.exports, t, e, o, n) + } + return o[r].exports + } + for (var s = "function" == typeof require && require, r = 0; r < n.length; r++) i(n[r]); + return i +}({ + 1: [function(t, e) { + var o = t("./svg-pan-zoom.js"); + ! function(t) { + "function" == typeof define && define.amd ? define("svg-pan-zoom", function() { + return o + }) : "undefined" != typeof e && e.exports && (e.exports = o, t.svgPanZoom = o) + }(window, document) + }, { + "./svg-pan-zoom.js": 4 + }], + 2: [function(t, e) { + var o = t("./svg-utilities"); + e.exports = { + enable: function(t) { + var e = t.svg.querySelector("defs"); + e || (e = document.createElementNS(o.svgNS, "defs"), t.svg.appendChild(e)); + var n = document.createElementNS(o.svgNS, "style"); + n.setAttribute("type", "text/css"), n.textContent = ".svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }", e.appendChild(n); + var i = document.createElementNS(o.svgNS, "g"); + i.setAttribute("id", "svg-pan-zoom-controls"), i.setAttribute("transform", "translate(" + (t.width - 70) + " " + (t.height - 76) + ") scale(0.75)"), i.setAttribute("class", "svg-pan-zoom-control"), i.appendChild(this._createZoomIn(t)), i.appendChild(this._createZoomReset(t)), i.appendChild(this._createZoomOut(t)), t.svg.appendChild(i), t.controlIcons = i + }, + _createZoomIn: function(t) { + var e = document.createElementNS(o.svgNS, "g"); + e.setAttribute("id", "svg-pan-zoom-zoom-in"), e.setAttribute("transform", "translate(30.5 5) scale(0.015)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() { + t.getPublicInstance().zoomIn() + }, !1), e.addEventListener("touchstart", function() { + t.getPublicInstance().zoomIn() + }, !1); + var n = document.createElementNS(o.svgNS, "rect"); + n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("width", "1500"), n.setAttribute("height", "1400"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n); + var i = document.createElementNS(o.svgNS, "path"); + return i.setAttribute("d", "M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i), e + }, + _createZoomReset: function(t) { + var e = document.createElementNS(o.svgNS, "g"); + e.setAttribute("id", "svg-pan-zoom-reset-pan-zoom"), e.setAttribute("transform", "translate(5 35) scale(0.4)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() { + t.getPublicInstance().reset() + }, !1), e.addEventListener("touchstart", function() { + t.getPublicInstance().reset() + }, !1); + var n = document.createElementNS(o.svgNS, "rect"); + n.setAttribute("x", "2"), n.setAttribute("y", "2"), n.setAttribute("width", "182"), n.setAttribute("height", "58"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n); + var i = document.createElementNS(o.svgNS, "path"); + i.setAttribute("d", "M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i); + var s = document.createElementNS(o.svgNS, "path"); + return s.setAttribute("d", "M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z"), s.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(s), e + }, + _createZoomOut: function(t) { + var e = document.createElementNS(o.svgNS, "g"); + e.setAttribute("id", "svg-pan-zoom-zoom-out"), e.setAttribute("transform", "translate(30.5 70) scale(0.015)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() { + t.getPublicInstance().zoomOut() + }, !1), e.addEventListener("touchstart", function() { + t.getPublicInstance().zoomOut() + }, !1); + var n = document.createElementNS(o.svgNS, "rect"); + n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("width", "1500"), n.setAttribute("height", "1400"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n); + var i = document.createElementNS(o.svgNS, "path"); + return i.setAttribute("d", "M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i), e + }, + disable: function(t) { + t.controlIcons && (t.controlIcons.parentNode.removeChild(t.controlIcons), t.controlIcons = null) + } + } + }, { + "./svg-utilities": 5 + }], + 3: [function(t, e) { + var o = t("./svg-utilities"), + n = t("./utilities"), + i = function(t, e) { + this.init(t, e) + }; + i.prototype.init = function(t, e) { + this.viewport = t, this.options = e, this.originalState = { + zoom: 1, + x: 0, + y: 0 + }, this.activeState = { + zoom: 1, + x: 0, + y: 0 + }, this.updateCTMCached = n.proxy(this.updateCTM, this), this.requestAnimationFrame = n.createRequestAnimationFrame(this.options.refreshRate), this.viewBox = { + x: 0, + y: 0, + width: 0, + height: 0 + }, this.cacheViewBox(), this.processCTM(), this.updateCTM() + }, i.prototype.cacheViewBox = function() { + var t = this.options.svg.getAttribute("viewBox"); + if (t) { + var e = t.split(/[\s\,]/).filter(function(t) { + return t + }).map(parseFloat); + this.viewBox.x = e[0], this.viewBox.y = e[1], this.viewBox.width = e[2], this.viewBox.height = e[3]; + var o = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height); + this.activeState.zoom = o, this.activeState.x = (this.options.width - this.viewBox.width * o) / 2, this.activeState.y = (this.options.height - this.viewBox.height * o) / 2, this.updateCTMOnNextFrame(), this.options.svg.removeAttribute("viewBox") + } else { + var n = this.viewport.getBBox(); + this.viewBox.x = n.x, this.viewBox.y = n.y, this.viewBox.width = n.width, this.viewBox.height = n.height + } + }, i.prototype.recacheViewBox = function() { + var t = this.viewport.getBoundingClientRect(), + e = t.width / this.getZoom(), + o = t.height / this.getZoom(); + this.viewBox.x = 0, this.viewBox.y = 0, this.viewBox.width = e, this.viewBox.height = o + }, i.prototype.getViewBox = function() { + return n.extend({}, this.viewBox) + }, i.prototype.processCTM = function() { + var t = this.getCTM(); + if (this.options.fit || this.options.contain) { + var e; + e = this.options.fit ? Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height) : Math.max(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height), t.a = e, t.d = e, t.e = -this.viewBox.x * e, t.f = -this.viewBox.y * e + } + if (this.options.center) { + var o = .5 * (this.options.width - (this.viewBox.width + 2 * this.viewBox.x) * t.a), + n = .5 * (this.options.height - (this.viewBox.height + 2 * this.viewBox.y) * t.a); + t.e = o, t.f = n + } + this.originalState.zoom = t.a, this.originalState.x = t.e, this.originalState.y = t.f, this.setCTM(t) + }, i.prototype.getOriginalState = function() { + return n.extend({}, this.originalState) + }, i.prototype.getState = function() { + return n.extend({}, this.activeState) + }, i.prototype.getZoom = function() { + return this.activeState.zoom + }, i.prototype.getRelativeZoom = function() { + return this.activeState.zoom / this.originalState.zoom + }, i.prototype.computeRelativeZoom = function(t) { + return t / this.originalState.zoom + }, i.prototype.getPan = function() { + return { + x: this.activeState.x, + y: this.activeState.y + } + }, i.prototype.getCTM = function() { + var t = this.options.svg.createSVGMatrix(); + return t.a = this.activeState.zoom, t.b = 0, t.c = 0, t.d = this.activeState.zoom, t.e = this.activeState.x, t.f = this.activeState.y, t + }, i.prototype.setCTM = function(t) { + var e = this.isZoomDifferent(t), + o = this.isPanDifferent(t); + if (e || o) { + if (e && this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(t.a)) === !1 && (t.a = t.d = this.activeState.zoom, e = !1), o) { + var i = this.options.beforePan(this.getPan(), { + x: t.e, + y: t.f + }), + s = !1, + r = !1; + i === !1 ? (t.e = this.getPan().x, t.f = this.getPan().y, s = r = !0) : n.isObject(i) && (i.x === !1 ? (t.e = this.getPan().x, s = !0) : n.isNumber(i.x) && (t.e = i.x), i.y === !1 ? (t.f = this.getPan().y, r = !0) : n.isNumber(i.y) && (t.f = i.y)), s && r && (o = !1) + }(e || o) && (this.updateCache(t), this.updateCTMOnNextFrame(), e && this.options.onZoom(this.getRelativeZoom()), o && this.options.onPan(this.getPan())) + } + }, i.prototype.isZoomDifferent = function(t) { + return this.activeState.zoom !== t.a + }, i.prototype.isPanDifferent = function(t) { + return this.activeState.x !== t.e || this.activeState.y !== t.f + }, i.prototype.updateCache = function(t) { + this.activeState.zoom = t.a, this.activeState.x = t.e, this.activeState.y = t.f + }, i.prototype.pendingUpdate = !1, i.prototype.updateCTMOnNextFrame = function() { + this.pendingUpdate || (this.pendingUpdate = !0, this.requestAnimationFrame.call(window, this.updateCTMCached)) + }, i.prototype.updateCTM = function() { + o.setCTM(this.viewport, this.getCTM(), this.defs), this.pendingUpdate = !1 + }, e.exports = function(t, e) { + return new i(t, e) + } + }, { + "./svg-utilities": 5, + "./utilities": 7 + }], + 4: [function(t, e) { + var o = t("./uniwheel"), + n = t("./control-icons"), + i = t("./utilities"), + s = t("./svg-utilities"), + r = t("./shadow-viewport"), + a = function(t, e) { + this.init(t, e) + }, + l = { + viewportSelector: ".svg-pan-zoom_viewport", + panEnabled: !0, + controlIconsEnabled: !1, + zoomEnabled: !0, + dblClickZoomEnabled: !0, + mouseWheelZoomEnabled: !0, + preventMouseEventsDefault: !0, + zoomScaleSensitivity: .1, + minZoom: .5, + maxZoom: 10, + fit: !0, + contain: !1, + center: !0, + refreshRate: "auto", + beforeZoom: null, + onZoom: null, + beforePan: null, + onPan: null, + customEventsHandler: null, + eventsListenerElement: null + }; + a.prototype.init = function(t, e) { + var o = this; + this.svg = t, this.defs = t.querySelector("defs"), s.setupSvgAttributes(this.svg), this.options = i.extend(i.extend({}, l), e), this.state = "none"; + var a = s.getBoundingClientRectNormalized(t); + this.width = a.width, this.height = a.height, this.viewport = r(s.getOrCreateViewport(this.svg, this.options.viewportSelector), { + svg: this.svg, + width: this.width, + height: this.height, + fit: this.options.fit, + contain: this.options.contain, + center: this.options.center, + refreshRate: this.options.refreshRate, + beforeZoom: function(t, e) { + return o.viewport && o.options.beforeZoom ? o.options.beforeZoom(t, e) : void 0 + }, + onZoom: function(t) { + return o.viewport && o.options.onZoom ? o.options.onZoom(t) : void 0 + }, + beforePan: function(t, e) { + return o.viewport && o.options.beforePan ? o.options.beforePan(t, e) : void 0 + }, + onPan: function(t) { + return o.viewport && o.options.onPan ? o.options.onPan(t) : void 0 + } + }); + var u = this.getPublicInstance(); + u.setBeforeZoom(this.options.beforeZoom), u.setOnZoom(this.options.onZoom), u.setBeforePan(this.options.beforePan), u.setOnPan(this.options.onPan), this.options.controlIconsEnabled && n.enable(this), this.lastMouseWheelEventTime = Date.now(), this.setupHandlers() + }, a.prototype.setupHandlers = function() { + var t = this, + e = null; + if (this.eventListeners = { + mousedown: function(e) { + return t.handleMouseDown(e, null) + }, + touchstart: function(o) { + var n = t.handleMouseDown(o, e); + return e = o, n + }, + mouseup: function(e) { + return t.handleMouseUp(e) + }, + touchend: function(e) { + return t.handleMouseUp(e) + }, + mousemove: function(e) { + return t.handleMouseMove(e) + }, + touchmove: function(e) { + return t.handleMouseMove(e) + }, + mouseleave: function(e) { + return t.handleMouseUp(e) + }, + touchleave: function(e) { + return t.handleMouseUp(e) + }, + touchcancel: function(e) { + return t.handleMouseUp(e) + } + }, null != this.options.customEventsHandler) { + this.options.customEventsHandler.init({ + svgElement: this.svg, + eventsListenerElement: this.options.eventsListenerElement, + instance: this.getPublicInstance() + }); + var o = this.options.customEventsHandler.haltEventListeners; + if (o && o.length) + for (var n = o.length - 1; n >= 0; n--) this.eventListeners.hasOwnProperty(o[n]) && delete this.eventListeners[o[n]] + } + for (var i in this.eventListeners)(this.options.eventsListenerElement || this.svg).addEventListener(i, this.eventListeners[i], !1); + this.options.mouseWheelZoomEnabled && (this.options.mouseWheelZoomEnabled = !1, this.enableMouseWheelZoom()) + }, a.prototype.enableMouseWheelZoom = function() { + if (!this.options.mouseWheelZoomEnabled) { + var t = this; + this.wheelListener = function(e) { + return t.handleMouseWheel(e) + }, o.on(this.options.eventsListenerElement || this.svg, this.wheelListener, !1), this.options.mouseWheelZoomEnabled = !0 + } + }, a.prototype.disableMouseWheelZoom = function() { + this.options.mouseWheelZoomEnabled && (o.off(this.options.eventsListenerElement || this.svg, this.wheelListener, !1), this.options.mouseWheelZoomEnabled = !1) + }, a.prototype.handleMouseWheel = function(t) { + if (this.options.zoomEnabled && "none" === this.state) { + this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1); + var e = t.deltaY || 1, + o = Date.now() - this.lastMouseWheelEventTime, + n = 3 + Math.max(0, 30 - o); + this.lastMouseWheelEventTime = Date.now(), "deltaMode" in t && 0 === t.deltaMode && t.wheelDelta && (e = 0 === t.deltaY ? 0 : Math.abs(t.wheelDelta) / t.deltaY), e = e > -.3 && .3 > e ? e : (e > 0 ? 1 : -1) * Math.log(Math.abs(e) + 10) / n; + var i = this.svg.getScreenCTM().inverse(), + r = s.getEventPoint(t, this.svg).matrixTransform(i), + a = Math.pow(1 + this.options.zoomScaleSensitivity, -1 * e); + this.zoomAtPoint(a, r) + } + }, a.prototype.zoomAtPoint = function(t, e, o) { + var n = this.viewport.getOriginalState(); + o ? (t = Math.max(this.options.minZoom * n.zoom, Math.min(this.options.maxZoom * n.zoom, t)), t /= this.getZoom()) : this.getZoom() * t < this.options.minZoom * n.zoom ? t = this.options.minZoom * n.zoom / this.getZoom() : this.getZoom() * t > this.options.maxZoom * n.zoom && (t = this.options.maxZoom * n.zoom / this.getZoom()); + var i = this.viewport.getCTM(), + s = e.matrixTransform(i.inverse()), + r = this.svg.createSVGMatrix().translate(s.x, s.y).scale(t).translate(-s.x, -s.y), + a = i.multiply(r); + a.a !== i.a && this.viewport.setCTM(a) + }, a.prototype.zoom = function(t, e) { + this.zoomAtPoint(t, s.getSvgCenterPoint(this.svg, this.width, this.height), e) + }, a.prototype.publicZoom = function(t, e) { + e && (t = this.computeFromRelativeZoom(t)), this.zoom(t, e) + }, a.prototype.publicZoomAtPoint = function(t, e, o) { + if (o && (t = this.computeFromRelativeZoom(t)), !("SVGPoint" !== i.getType(e) && "x" in e && "y" in e)) throw new Error("Given point is invalid"); + e = s.createSVGPoint(this.svg, e.x, e.y), this.zoomAtPoint(t, e, o) + }, a.prototype.getZoom = function() { + return this.viewport.getZoom() + }, a.prototype.getRelativeZoom = function() { + return this.viewport.getRelativeZoom() + }, a.prototype.computeFromRelativeZoom = function(t) { + return t * this.viewport.getOriginalState().zoom + }, a.prototype.resetZoom = function() { + var t = this.viewport.getOriginalState(); + this.zoom(t.zoom, !0) + }, a.prototype.resetPan = function() { + this.pan(this.viewport.getOriginalState()) + }, a.prototype.reset = function() { + this.resetZoom(), this.resetPan() + }, a.prototype.handleDblClick = function(t) { + if (this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), this.options.controlIconsEnabled) { + var e = t.target.getAttribute("class") || ""; + if (e.indexOf("svg-pan-zoom-control") > -1) return !1 + } + var o; + o = t.shiftKey ? 1 / (2 * (1 + this.options.zoomScaleSensitivity)) : 2 * (1 + this.options.zoomScaleSensitivity); + var n = s.getEventPoint(t, this.svg).matrixTransform(this.svg.getScreenCTM().inverse()); + this.zoomAtPoint(o, n) + }, a.prototype.handleMouseDown = function(t, e) { + this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), i.mouseAndTouchNormalize(t, this.svg), this.options.dblClickZoomEnabled && i.isDblClick(t, e) ? this.handleDblClick(t) : (this.state = "pan", this.firstEventCTM = this.viewport.getCTM(), this.stateOrigin = s.getEventPoint(t, this.svg).matrixTransform(this.firstEventCTM.inverse())) + }, a.prototype.handleMouseMove = function(t) { + if (this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), "pan" === this.state && this.options.panEnabled) { + var e = s.getEventPoint(t, this.svg).matrixTransform(this.firstEventCTM.inverse()), + o = this.firstEventCTM.translate(e.x - this.stateOrigin.x, e.y - this.stateOrigin.y); + this.viewport.setCTM(o) + } + }, a.prototype.handleMouseUp = function(t) { + this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), "pan" === this.state && (this.state = "none") + }, a.prototype.fit = function() { + var t = this.viewport.getViewBox(), + e = Math.min(this.width / t.width, this.height / t.height); + this.zoom(e, !0) + }, a.prototype.contain = function() { + var t = this.viewport.getViewBox(), + e = Math.max(this.width / t.width, this.height / t.height); + this.zoom(e, !0) + }, a.prototype.center = function() { + var t = this.viewport.getViewBox(), + e = .5 * (this.width - (t.width + 2 * t.x) * this.getZoom()), + o = .5 * (this.height - (t.height + 2 * t.y) * this.getZoom()); + this.getPublicInstance().pan({ + x: e, + y: o + }) + }, a.prototype.updateBBox = function() { + this.viewport.recacheViewBox() + }, a.prototype.pan = function(t) { + var e = this.viewport.getCTM(); + e.e = t.x, e.f = t.y, this.viewport.setCTM(e) + }, a.prototype.panBy = function(t) { + var e = this.viewport.getCTM(); + e.e += t.x, e.f += t.y, this.viewport.setCTM(e) + }, a.prototype.getPan = function() { + var t = this.viewport.getState(); + return { + x: t.x, + y: t.y + } + }, a.prototype.resize = function() { + var t = s.getBoundingClientRectNormalized(this.svg); + this.width = t.width, this.height = t.height, this.options.controlIconsEnabled && (this.getPublicInstance().disableControlIcons(), this.getPublicInstance().enableControlIcons()) + }, a.prototype.destroy = function() { + var t = this; + this.beforeZoom = null, this.onZoom = null, this.beforePan = null, this.onPan = null, null != this.options.customEventsHandler && this.options.customEventsHandler.destroy({ + svgElement: this.svg, + eventsListenerElement: this.options.eventsListenerElement, + instance: this.getPublicInstance() + }); + for (var e in this.eventListeners)(this.options.eventsListenerElement || this.svg).removeEventListener(e, this.eventListeners[e], !1); + this.disableMouseWheelZoom(), this.getPublicInstance().disableControlIcons(), this.reset(), u = u.filter(function(e) { + return e.svg !== t.svg + }), delete this.options, delete this.publicInstance, delete this.pi, this.getPublicInstance = function() { + return null + } + }, a.prototype.getPublicInstance = function() { + var t = this; + return this.publicInstance || (this.publicInstance = this.pi = { + enablePan: function() { + return t.options.panEnabled = !0, t.pi + }, + disablePan: function() { + return t.options.panEnabled = !1, t.pi + }, + isPanEnabled: function() { + return !!t.options.panEnabled + }, + pan: function(e) { + return t.pan(e), t.pi + }, + panBy: function(e) { + return t.panBy(e), t.pi + }, + getPan: function() { + return t.getPan() + }, + setBeforePan: function(e) { + return t.options.beforePan = null === e ? null : i.proxy(e, t.publicInstance), t.pi + }, + setOnPan: function(e) { + return t.options.onPan = null === e ? null : i.proxy(e, t.publicInstance), t.pi + }, + enableZoom: function() { + return t.options.zoomEnabled = !0, t.pi + }, + disableZoom: function() { + return t.options.zoomEnabled = !1, t.pi + }, + isZoomEnabled: function() { + return !!t.options.zoomEnabled + }, + enableControlIcons: function() { + return t.options.controlIconsEnabled || (t.options.controlIconsEnabled = !0, n.enable(t)), t.pi + }, + disableControlIcons: function() { + return t.options.controlIconsEnabled && (t.options.controlIconsEnabled = !1, n.disable(t)), t.pi + }, + isControlIconsEnabled: function() { + return !!t.options.controlIconsEnabled + }, + enableDblClickZoom: function() { + return t.options.dblClickZoomEnabled = !0, t.pi + }, + disableDblClickZoom: function() { + return t.options.dblClickZoomEnabled = !1, t.pi + }, + isDblClickZoomEnabled: function() { + return !!t.options.dblClickZoomEnabled + }, + enableMouseWheelZoom: function() { + return t.enableMouseWheelZoom(), t.pi + }, + disableMouseWheelZoom: function() { + return t.disableMouseWheelZoom(), t.pi + }, + isMouseWheelZoomEnabled: function() { + return !!t.options.mouseWheelZoomEnabled + }, + setZoomScaleSensitivity: function(e) { + return t.options.zoomScaleSensitivity = e, t.pi + }, + setMinZoom: function(e) { + return t.options.minZoom = e, t.pi + }, + setMaxZoom: function(e) { + return t.options.maxZoom = e, t.pi + }, + setBeforeZoom: function(e) { + return t.options.beforeZoom = null === e ? null : i.proxy(e, t.publicInstance), t.pi + }, + setOnZoom: function(e) { + return t.options.onZoom = null === e ? null : i.proxy(e, t.publicInstance), t.pi + }, + zoom: function(e) { + return t.publicZoom(e, !0), t.pi + }, + zoomBy: function(e) { + return t.publicZoom(e, !1), t.pi + }, + zoomAtPoint: function(e, o) { + return t.publicZoomAtPoint(e, o, !0), t.pi + }, + zoomAtPointBy: function(e, o) { + return t.publicZoomAtPoint(e, o, !1), t.pi + }, + zoomIn: function() { + return this.zoomBy(1 + t.options.zoomScaleSensitivity), t.pi + }, + zoomOut: function() { + return this.zoomBy(1 / (1 + t.options.zoomScaleSensitivity)), t.pi + }, + getZoom: function() { + return t.getRelativeZoom() + }, + resetZoom: function() { + return t.resetZoom(), t.pi + }, + resetPan: function() { + return t.resetPan(), t.pi + }, + reset: function() { + return t.reset(), t.pi + }, + fit: function() { + return t.fit(), t.pi + }, + contain: function() { + return t.contain(), t.pi + }, + center: function() { + return t.center(), t.pi + }, + updateBBox: function() { + return t.updateBBox(), t.pi + }, + resize: function() { + return t.resize(), t.pi + }, + getSizes: function() { + return { + width: t.width, + height: t.height, + realZoom: t.getZoom(), + viewBox: t.viewport.getViewBox() + } + }, + destroy: function() { + return t.destroy(), t.pi + } + }), this.publicInstance + }; + var u = [], + h = function(t, e) { + var o = i.getSvg(t); + if (null === o) return null; + for (var n = u.length - 1; n >= 0; n--) + if (u[n].svg === o) return u[n].instance.getPublicInstance(); + return u.push({ + svg: o, + instance: new a(o, e) + }), u[u.length - 1].instance.getPublicInstance() + }; + e.exports = h + }, { + "./control-icons": 2, + "./shadow-viewport": 3, + "./svg-utilities": 5, + "./uniwheel": 6, + "./utilities": 7 + }], + 5: [function(t, e) { + var o = t("./utilities"), + n = "unknown"; + document.documentMode && (n = "ie"), e.exports = { + svgNS: "http://www.w3.org/2000/svg", + xmlNS: "http://www.w3.org/XML/1998/namespace", + xmlnsNS: "http://www.w3.org/2000/xmlns/", + xlinkNS: "http://www.w3.org/1999/xlink", + evNS: "http://www.w3.org/2001/xml-events", + getBoundingClientRectNormalized: function(t) { + if (t.clientWidth && t.clientHeight) return { + width: t.clientWidth, + height: t.clientHeight + }; + if (t.getBoundingClientRect()) return t.getBoundingClientRect(); + throw new Error("Cannot get BoundingClientRect for SVG.") + }, + getOrCreateViewport: function(t, e) { + var n = null; + if (n = o.isElement(e) ? e : t.querySelector(e), !n) { + var i = Array.prototype.slice.call(t.childNodes || t.children).filter(function(t) { + return "defs" !== t.nodeName && "#text" !== t.nodeName + }); + 1 === i.length && "g" === i[0].nodeName && null === i[0].getAttribute("transform") && (n = i[0]) + } + if (!n) { + var s = "viewport-" + (new Date).toISOString().replace(/\D/g, ""); + n = document.createElementNS(this.svgNS, "g"), n.setAttribute("id", s); + var r = t.childNodes || t.children; + if (r && r.length > 0) + for (var a = r.length; a > 0; a--) "defs" !== r[r.length - a].nodeName && n.appendChild(r[r.length - a]); + t.appendChild(n) + } + var l = []; + return n.getAttribute("class") && (l = n.getAttribute("class").split(" ")), ~l.indexOf("svg-pan-zoom_viewport") || (l.push("svg-pan-zoom_viewport"), n.setAttribute("class", l.join(" "))), n + }, + setupSvgAttributes: function(t) { + if (t.setAttribute("xmlns", this.svgNS), t.setAttributeNS(this.xmlnsNS, "xmlns:xlink", this.xlinkNS), t.setAttributeNS(this.xmlnsNS, "xmlns:ev", this.evNS), null !== t.parentNode) { + var e = t.getAttribute("style") || ""; - 1 === e.toLowerCase().indexOf("overflow") && t.setAttribute("style", "overflow: hidden; " + e) + } + }, + internetExplorerRedisplayInterval: 300, + refreshDefsGlobal: o.throttle(function() { + for (var t = document.querySelectorAll("defs"), e = t.length, o = 0; e > o; o++) { + var n = t[o]; + n.parentNode.insertBefore(n, n) + } + }, this.internetExplorerRedisplayInterval), + setCTM: function(t, e, o) { + var i = this, + s = "matrix(" + e.a + "," + e.b + "," + e.c + "," + e.d + "," + e.e + "," + e.f + ")"; + t.setAttributeNS(null, "transform", s), "ie" === n && o && (o.parentNode.insertBefore(o, o), window.setTimeout(function() { + i.refreshDefsGlobal() + }, i.internetExplorerRedisplayInterval)) + }, + getEventPoint: function(t, e) { + var n = e.createSVGPoint(); + return o.mouseAndTouchNormalize(t, e), n.x = t.clientX, n.y = t.clientY, n + }, + getSvgCenterPoint: function(t, e, o) { + return this.createSVGPoint(t, e / 2, o / 2) + }, + createSVGPoint: function(t, e, o) { + var n = t.createSVGPoint(); + return n.x = e, n.y = o, n + } + } + }, { + "./utilities": 7 + }], + 6: [function(t, e) { + e.exports = function() { + function t(t, e, o) { + var n = function(t) { + !t && (t = window.event); + var o = { + originalEvent: t, + target: t.target || t.srcElement, + type: "wheel", + deltaMode: "MozMousePixelScroll" == t.type ? 0 : 1, + deltaX: 0, + delatZ: 0, + preventDefault: function() { + t.preventDefault ? t.preventDefault() : t.returnValue = !1 + } + }; + return "mousewheel" == u ? (o.deltaY = -1 / 40 * t.wheelDelta, t.wheelDeltaX && (o.deltaX = -1 / 40 * t.wheelDeltaX)) : o.deltaY = t.detail, e(o) + }; + return c.push({ + element: t, + fn: n, + capture: o + }), n + } + + function e(t, e) { + for (var o = 0; o < c.length; o++) + if (c[o].element === t && c[o].capture === e) return c[o].fn; + return function() {} + } + + function o(t, e) { + for (var o = 0; o < c.length; o++) + if (c[o].element === t && c[o].capture === e) return c.splice(o, 1) + } + + function n(e, o, n, i) { + var s; + s = "wheel" === u ? n : t(e, n, i), e[a](h + o, s, i || !1) + } + + function i(t, n, i, s) { + cb = "wheel" === u ? i : e(t, s), t[l](h + n, cb, s || !1), o(t, s) + } + + function s(t, e, o) { + n(t, u, e, o), "DOMMouseScroll" == u && n(t, "MozMousePixelScroll", e, o) + } + + function r(t, e, o) { + i(t, u, e, o), "DOMMouseScroll" == u && i(t, "MozMousePixelScroll", e, o) + } + var a, l, u, h = "", + c = []; + return window.addEventListener ? (a = "addEventListener", l = "removeEventListener") : (a = "attachEvent", l = "detachEvent", h = "on"), u = "onwheel" in document.createElement("div") ? "wheel" : void 0 !== document.onmousewheel ? "mousewheel" : "DOMMouseScroll", { + on: s, + off: r + } + }() + }, {}], + 7: [function(t, e) { + function o(t) { + return function(e) { + window.setTimeout(e, t) + } + } + e.exports = { + extend: function(t, e) { + t = t || {}; + for (var o in e) t[o] = this.isObject(e[o]) ? this.extend(t[o], e[o]) : e[o]; + return t + }, + isElement: function(t) { + return t instanceof HTMLElement || t instanceof SVGElement || t instanceof SVGSVGElement || t && "object" == typeof t && null !== t && 1 === t.nodeType && "string" == typeof t.nodeName + }, + isObject: function(t) { + return "[object Object]" === Object.prototype.toString.call(t) + }, + isNumber: function(t) { + return !isNaN(parseFloat(t)) && isFinite(t) + }, + getSvg: function(t) { + var e, o; + if (this.isElement(t)) e = t; + else { + if (!("string" == typeof t || t instanceof String)) throw new Error("Provided selector is not an HTML object nor String"); + if (e = document.querySelector(t), !e) throw new Error("Provided selector did not find any elements. Selector: " + t) + } + if ("svg" === e.tagName.toLowerCase()) o = e; + else if ("object" === e.tagName.toLowerCase()) o = e.contentDocument.documentElement; + else { + if ("embed" !== e.tagName.toLowerCase()) throw new Error("img" === e.tagName.toLowerCase() ? 'Cannot script an SVG in an "img" element. Please use an "object" element or an in-line SVG.' : "Cannot get SVG."); + o = e.getSVGDocument().documentElement + } + return o + }, + proxy: function(t, e) { + return function() { + return t.apply(e, arguments) + } + }, + getType: function(t) { + return Object.prototype.toString.apply(t).replace(/^\[object\s/, "").replace(/\]$/, "") + }, + mouseAndTouchNormalize: function(t, e) { + if (void 0 === t.clientX || null === t.clientX) + if (t.clientX = 0, t.clientY = 0, void 0 !== t.changedTouches && t.changedTouches.length) { + if (void 0 !== t.changedTouches[0].clientX) t.clientX = t.changedTouches[0].clientX, t.clientY = t.changedTouches[0].clientY; + else if (void 0 !== t.changedTouches[0].pageX) { + var o = e.getBoundingClientRect(); + t.clientX = t.changedTouches[0].pageX - o.left, t.clientY = t.changedTouches[0].pageY - o.top + } + } else void 0 !== t.originalEvent && void 0 !== t.originalEvent.clientX && (t.clientX = t.originalEvent.clientX, t.clientY = t.originalEvent.clientY) + }, + isDblClick: function(t, e) { + if (2 === t.detail) return !0; + if (void 0 !== e && null !== e) { + var o = t.timeStamp - e.timeStamp, + n = Math.sqrt(Math.pow(t.clientX - e.clientX, 2) + Math.pow(t.clientY - e.clientY, 2)); + return 250 > o && 10 > n + } + return !1 + }, + now: Date.now || function() { + return (new Date).getTime() + }, + throttle: function(t, e, o) { + var n, i, s, r = this, + a = null, + l = 0; + o || (o = {}); + var u = function() { + l = o.leading === !1 ? 0 : r.now(), a = null, s = t.apply(n, i), a || (n = i = null) + }; + return function() { + var h = r.now(); + l || o.leading !== !1 || (l = h); + var c = e - (h - l); + return n = this, i = arguments, 0 >= c || c > e ? (clearTimeout(a), a = null, l = h, s = t.apply(n, i), a || (n = i = null)) : a || o.trailing === !1 || (a = setTimeout(u, c)), s + } + }, + createRequestAnimationFrame: function(t) { + var e = null; + return "auto" !== t && 60 > t && t > 1 && (e = Math.floor(1e3 / t)), null === e ? window.requestAnimationFrame || o(33) : o(e) + } + } + }, {}] +}, {}, [1]); diff --git a/frontend/documentation/js/menu.js b/frontend/documentation/js/menu.js index 2c84393..ecbd029 100644 --- a/frontend/documentation/js/menu.js +++ b/frontend/documentation/js/menu.js @@ -1,321 +1,56 @@ -document.addEventListener('DOMContentLoaded', function () { +document.addEventListener('DOMContentLoaded', function() { var menuCollapsed = false, mobileMenu = document.getElementById('mobile-menu'); + document.getElementById('btn-menu').addEventListener('click', function() { + if (menuCollapsed) { + mobileMenu.style.display = 'none'; + } else { + mobileMenu.style.display = 'block'; + document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden'; + } + menuCollapsed = !menuCollapsed; + }); - var localContextInUrl = ''; + // collapse menu + var classnameMenuToggler = document.getElementsByClassName('menu-toggler'), + faAngleUpClass = 'fa-angle-up', + faAngleDownClass = 'fa-angle-down', + toggleItemMenu = function(e) { + e.preventDefault(); + var element = $(e.target); + if (element.hasClass(faAngleUpClass)) { + element.addClass(faAngleDownClass); + element.removeClass(faAngleUpClass); + } else { + element.addClass(faAngleUpClass); + element.removeClass(faAngleDownClass); + } + }; - if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') { - switch (COMPODOC_CURRENT_PAGE_CONTEXT) { - case 'additional-page': - localContextInUrl = 'additional-documentation'; - break; - case 'class': - localContextInUrl = 'classes'; - break; - case 'miscellaneous-functions': - case 'miscellaneous-variables': - case 'miscellaneous-typealiases': - case 'miscellaneous-enumerations': - localContextInUrl = 'miscellaneous'; - default: - break; + for (var i = 0; i < classnameMenuToggler.length; i++) { + classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false); + } + + // Scroll to active link + var menus = document.querySelectorAll('.menu'), + i = 0, + len = menus.length, + activeMenu, + activeMenuClass, + activeLink; + + for (i; i 0) { - for (var i = 0; i < $darkModeToggleSwitchers.length; i++) { - $darkModeToggleSwitchers[i].addEventListener('change', function (event) { - darkModeState = !darkModeState; - toggleDarkMode(darkModeState); - }); - } - } - }, 0); }); diff --git a/frontend/documentation/js/search/lunr.min.js b/frontend/documentation/js/search/lunr.min.js index cdc94cd..22776bb 100644 --- a/frontend/documentation/js/search/lunr.min.js +++ b/frontend/documentation/js/search/lunr.min.js @@ -1,6 +1,6 @@ /** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 - * Copyright (C) 2020 Oliver Nightingale + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.2 + * Copyright (C) 2016 Oliver Nightingale * @license MIT */ -!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.9",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); +!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.7.2",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){if(!arguments.length||null==e||void 0==e)return[];if(Array.isArray(e))return e.map(function(e){return t.utils.asString(e).toLowerCase()});var n=t.tokenizer.seperator||t.tokenizer.separator;return e.toString().trim().toLowerCase().split(n)},t.tokenizer.seperator=!1,t.tokenizer.separator=/[\s\-]+/,t.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},t.tokenizer.label="default",t.tokenizer.registeredFunctions={"default":t.tokenizer},t.tokenizer.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing tokenizer: "+n),e.label=n,this.registeredFunctions[n]=e},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(o===t)return r;t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r]}return o===t?r:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;)t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r];return o>t?r:t>o?r+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,r=0,o=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>o-1||r>s-1)break;a[i]!==h[r]?a[i]h[r]&&r++:(n.add(a[i]),i++,r++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone();for(var r=0,o=n.toArray();rp;p++)c[p]===a&&d++;h+=d/f*l.boost}}this.tokenStore.add(a,{ref:o,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(this.tokenizerFn(e)),i=new t.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*o,h=this,u=this.tokenStore.expand(e).reduce(function(n,r){var o=h.corpusTokens.indexOf(r),s=h.idf(r),u=1,l=new t.SortedSet;if(r!==e){var c=Math.max(3,r.length-e.length);u=1/Math.log(c)}o>-1&&i.insert(o,a*s*u);for(var f=h.tokenStore.get(r),d=Object.keys(f),p=d.length,v=0;p>v;v++)l.add(f[d[v]].ref);return n.union(l)},new t.SortedSet);r.push(u)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,r=new t.Vector,o=0;i>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*h)}return r},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",h="^("+r+")?"+o+r+o+r,u="^("+r+")?"+i,l=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(u),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+r+i+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,F=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,_=/^(.+?)(s|t)(ion)$/,z=/^(.+?)e$/,O=/ll$/,P=new RegExp("^"+r+i+"[^aeiouwxy]$"),T=function(n){var i,r,o,s,a,h,u;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=p,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=g,a=m,s.test(n)){var T=s.exec(n);s=l,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,u=k,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=x,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+t[r])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+e[r])}if(s=F,a=_,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=z,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=P,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=O,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t.charAt(0),r=t.slice(1);return i in n||(n[i]={docs:{}}),0===r.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(r,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n element for each result res.results.forEach(function(res) { - var context = res.title.split(' - ')[0]; - if (typeof groups[context] === 'undefined') { - groups[context] = { - results: [res] - } - } else { - groups[context].results.push(res) - } - }); - - var sortedGroups = Object.keys(groups).sort(); - - for (var i = 0; i < sortedGroups.length; i++) { - var property = sortedGroups[i]; - var $li = $('
  • ', { - 'class': 'search-results-group' + 'class': 'search-results-item' }); - var finalPropertyLabel = ''; - var propertyLabels = property.split('-'); - - if (propertyLabels.length === 2 && propertyLabels[0] !== 'miscellaneous' && propertyLabels[0] !== 'additional') { - finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' - ' + propertyLabels[1].charAt(0).toUpperCase() + propertyLabels[1].substring(1) + ' (' + groups[property].results.length + ')'; - } else if (propertyLabels[0] === 'additional') { - finalPropertyLabel = 'Additional pages' + ' (' + groups[property].results.length + ')' - } else { - finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' (' + groups[property].results.length + ')' + + var $title = $('

    '); + + var $link = $('', { + 'href': res.url, + 'text': res.title + }); + + var content = res.body.trim(); + if (content.length > MAX_DESCRIPTION_SIZE) { + content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...'; } - var $groupTitle = $('

    ', { - 'text': finalPropertyLabel - }); - $groupTitle.appendTo($li); - - var $ulResults = $('